PageSourceSearch

https://www.lamartinierelucknow.org/_next/static/chunks/pages/admi…/viewCombineResult-c3b025a90d2e532b.js

js lamartinierelucknow.org collected 2026-10-02 13:34:03 UTC 239,063 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[42637],{50680:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/examination/result/viewCombineResult",function(){return t(57222)}])},2490:(e,l,t)=>{"use strict";t.d(l,{A:()=>j});var i=t(74848),s=t(96540),r=t(86715),d=t(91106),n=t.n(d);t(78343),t(86297);var o=t(70241);t(73863),t(34028);var a=t(70988),c=t(40961),x=t(97068),h=t(70771),y=t(15140);let j=e=>{let{pageData:l}=e,t=(0,r.useRouter)(),[d,j]=(0,s.useState)(!1),[w,u]=(0,s.useState)(!1),b=(0,s.useRef)(null),m=e=>{let l=t.pathname.split("/"),i=e.split("/");return l.length===i.length&&l.every((e,l)=>{if(e.startsWith("[")&&e.endsWith("]")){let e=i[l];return Object.values(t.query).includes(e)}return e===i[l]})};(0,s.useEffect)(()=>{if(!b.current||!document)return;let e=e=>{b.current&&!b.current.contains(e.target)&&j(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,s.useEffect)(()=>{u(!0)},[]);let g=w&&document.getElementById("extraOptionsDrawer");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"hidden md:block py-12 bg-white",children:(0,i.jsx)("div",{className:"px-4 mx-auto sm:px-6 lg:px-8 max-w-7xl",children:(0,i.jsx)("nav",{className:"flex flex-wrap items-center justify-center gap-4",children:l.map((e,l)=>{let{icon:t,text:s,link:r}=e;return(0,i.jsxs)(n(),{href:r,className:"inline-flex items-center px-4 py-3 text-sm font-medium text-gray-900 border ".concat(m(r)?"border-gray-900":"border-gray-200"," rounded-lg transition-all duration-200 ease-in-out bg-gradient-to-br from-violet-100 to-white hover:bg-gray-50 hover:shadow-md hover:-translate-y-0.5"),children:[o.A[t],s]},l)})})})}),w&&!g&&(0,i.jsx)("div",{className:"md:hidden flex flex-wrap items-center justify-center gap-2 px-4 py-3 bg-white",children:l.map((e,l)=>{let{icon:t,text:s,link:r}=e;return(0,i.jsxs)(n(),{href:r,className:"inline-flex items-center px-3 py-2 text-xs font-medium text-gray-900 border ".concat(m(r)?"border-gray-900":"border-gray-200"," rounded-lg bg-gradient-to-br from-violet-100 to-white"),children:[o.A[t],s]},l)})}),g&&(0,c.createPortal)((0,i.jsx)(()=>(0,i.jsxs)(x._s,{children:[(0,i.jsx)(x.Uz,{asChild:!0,children:(0,i.jsx)(h.$,{variant:"transparent",size:"icon",className:"h-12 w-12 text-gray-500",children:(0,i.jsx)(a.A,{className:"h-6 w-6"})})}),(0,i.jsxs)(x.zj,{className:"h-[84%] flex-col bg-gradient-to-br from-white to-violet-50",children:[(0,i.jsxs)(x.BE,{children:[(0,i.jsx)(x.gk,{children:"Navigation Menu"}),(0,i.jsx)(x.I6,{children:"Select a page to navigate"})]}),(0,i.jsxs)("div",{className:"overflow-y-auto",children:[(0,i.jsx)("div",{className:"pb-4 flex-1 border-gray-200 flex flex-col gap-1 max-h-fit",children:l.map((e,l)=>{let{text:t,link:s,icon:r}=e;return(0,i.jsx)(n(),{href:s,className:"w-full border-gray-200 border-b px-4 py-2",children:(0,i.jsxs)(h.$,{variant:"transparent",className:"w-full justify-between",children:[t,(0,i.jsx)("span",{className:"ml-2",children:o.A[r]})]})},l)})}),(0,i.jsx)(y.A,{className:"px-8"})]}),(0,i.jsx)(x.tb,{children:(0,i.jsx)(x.cp,{asChild:!0,children:(0,i.jsx)(h.$,{variant:"outline",children:"Close"})})})]})]}),{}),document.getElementById("extraOptionsDrawer"))]})}},37163:(e,l,t)=>{"use strict";t.d(l,{A:()=>r});var i=t(74848),s=t(96540);function r(){let[e,l]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=setInterval(()=>{l(e=>!e)},800);return()=>clearInterval(e)},[]),(0,i.jsx)("div",{className:"flex flex-col items-center justify-center mt-16 mb-10",children:(0,i.jsxs)("div",{className:"bg-white rounded-xl shadow-lg p-6 flex flex-col items-center",children:[(0,i.jsxs)("div",{className:"flex space-x-2 mb-4",children:[(0,i.jsx)("div",{className:"w-3 h-3 bg-purple-500 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),(0,i.jsx)("div",{className:"w-3 h-3 bg-blue-500 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),(0,i.jsx)("div",{className:"w-3 h-3 bg-green-500 rounded-full animate-bounce",style:{animationDelay:"300ms"}}),(0,i.jsx)("div",{className:"w-3 h-3 bg-yellow-500 rounded-full animate-bounce",style:{animationDelay:"450ms"}})]}),(0,i.jsx)("div",{className:"text-4xl mb-3 transition-transform ".concat(e?"scale-110":"scale-100"),children:"\uD83D\uDE80"}),(0,i.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Just a moment please!"})]})})}},5039:(e,l,t)=>{"use strict";t.d(l,{A:()=>d});var i=t(74848),s=t(2490),r=t(52669);t(96540);let d=e=>{let{additionalData:l=[]}=e,t=r.A.icons;r.A.navigationUrl.fees.studentDetails;let d=[{icon:t.bell,text:"Student Details",link:"/admin/studentDirectory/"},{icon:t.bell,text:"Local Guardian Details",link:"/admin/studentDirectory/localGuardian/"},{icon:t.reject,text:"Withdrawal Report",link:"/admin/studentDirectory/withdrawalList"},{icon:t.folder,text:"CISCE Registration",link:"/admin/boards/registration"},{icon:t.chalkboard,text:"Class 11th Subjects",link:"/admin/lms/11th/assignStudentSubject"},{icon:t.chalkboard,text:"Download Student Images",link:"/admin/studentDirectory/downloadStudentImage"},{icon:t.folder,text:"Download Nominal Roll",link:"/admin/studentDirectory/nominalRoll"},...l];return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(s.A,{pageData:d})})}},92416:(e,l,t)=>{"use strict";t.d(l,{S:()=>o});var i=t(74848),s=t(96540),r=t(92731),d=t(48404),n=t(21539);let o=s.forwardRef((e,l)=>{let{className:t,...s}=e;return(0,i.jsx)(r.bL,{ref:l,className:(0,n.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-slate-200 border-slate-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=checked]:text-slate-50 dark:border-slate-800 dark:border-slate-50 dark:ring-offset-slate-950 dar
1k:focus-visible:ring-slate-300 dark:data-[state=checked]:bg-slate-50 dark:data-[state=checked]:text-slate-900",t),...s,children:(0,i.jsx)(r.C1,{className:(0,n.cn)("flex items-center justify-center text-current"),children:(0,i.jsx)(d.A,{className:"h-4 w-4"})})})});o.displayName=r.bL.displayName},27937:(e,l,t)=>{"use strict";t.d(l,{J:()=>a});var i=t(74848),s=t(96540),r=t(95920),d=t(22732),n=t(21539);let o=(0,d.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),a=s.forwardRef((e,l)=>{let{className:t,...s}=e;return(0,i.jsx)(r.b,{ref:l,className:(0,n.cn)(o(),t),...s})});a.displayName=r.b.displayName},63619:(e,l,t)=>{"use strict";t.d(l,{TR:()=>j,bq:()=>h,eb:()=>w,gC:()=>y,l6:()=>a,s3:()=>c,yv:()=>x});var i=t(74848),s=t(96540),r=t(39201),d=t(89664),n=t(48404),o=t(21539);let a=r.bL,c=r.YJ,x=r.WT,h=s.forwardRef((e,l)=>{let{className:t,children:s,...n}=e;return(0,i.jsxs)(r.l9,{ref:l,className:(0,o.cn)("flex h-10 w-full items-center justify-between rounded-md border border-slate-200 bg-white px-3 py-2 text-sm r
1ing-offset-white placeholder:text-slate-500 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:bg-slate-950 dark:ring-offset-slate-950 dark:placeholder:text-slate-400 dark:focus:ring-slate-300",t),...n,children:[s,(0,i.jsx)(r.In,{asChild:!0,children:(0,i.jsx)(d.A,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=r.l9.displayName;let y=s.forwardRef((e,l)=>{let{className:t,children:s,position:d="popper",...n}=e;return(0,i.jsx)(r.ZL,{children:(0,i.jsx)(r.UC,{ref:l,className:(0,o.cn)("relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-200 bg-white text-slate-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50","popper"===d&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:d,...n,children:(0,i.jsx)(r.LM,{className:(0,o.cn)("p-1","popper"===d&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})})});y.displayName=r.UC.displayName;let j=s.forwardRef((e,l)=>{let{className:t,...s}=e;return(0,i.jsx)(r.JU,{ref:l,className:(0,o.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...s})});j.displayName=r.JU.displayName;let w=s.forwardRef((e,l)=>{let{className:t,children:s,...d}=e;return(0,i.jsxs)(r.q7,{ref:l,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",t),...d,children:[(0,i.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,i.jsx)(r.VF,{children:(0,i.jsx)(n.A,{className:"h-4 w-4"})})}),(0,i.jsx)(r.p4,{children:s})]})});w.displayName=r.q7.displayName,s.forwardRef((e,l)=>{let{className:t,...s}=e;return(0,i.jsx)(r.wv,{ref:l,className:(0,o.cn)("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-800",t),...s})}).displayName=r.wv.displayName},57222:(e,l,t)=>{"use strict";t.r(l),t.d(l,{__N_SSP:()=>K,default:()=>$});var i=t(74848),s=t(5039),r=t(96540),d=t(37163),n=t(39970),o=t(30033);let a=o.StyleSheet.create({page:{flexDirection:"column",backgroundColor:"#ffffff",fontFamily:"Helvetica"},header:{backgroundColor:"#d2b48c",padding:3,paddingLeft:10,flexDirection:"row",alignItems:"center",fontFamily:"Helvetica-Bold",borderBottom:1,borderTop:1,borderColor:"#000"},headerText:{fontSize:14,fontWeight:900,width:"100%",textAlign:"center",textTransform:"uppercase"},title:{fontSize:13,marginBottom:10,textAlign:"center",fontWeight:900},table:{display:"table",width:"auto",paddingBottom:0},tableRow:{margin:"auto",flexDirection:"row",width:"100%"},tableColHeader:{width:"30%",borderStyle:"solid",borderWidth:1,fontSize:12,display:"flex",justifyContent:"center",alignItems:"center"},tableCol:{width:"30%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol:{width:"14%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol2:{flex:1,borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableCellHeader:{margin:5,fontSize:10,fontWeight:"bold",fontFamily:"Helvetica-Bold"},tableCell:{margin:5,fontSize:8,textAlign:"center"},overallRow:{flexDirection:"row",justifyContent:"flex-end",marginTop:10},overallText:{fontSize:12,fontWeight:"bold"},footer:{position:"absolute",bottom:30,left:0,right:0,textAlign:"center",fontSize:10},nameField:{width:"100%",fontSize:10,fontFamily:"Helvetica-Bold",flexDirection:"row",justifyContent:"space-between",padding:2},page2tablecell:{borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0,height:16,justifyContent:"center",alignItems:"center"},page2tablesingleCellHeader:{width:"100%"},page2tableleftCell:{width:140},row:{flexDirection:"row"},page2tablerightCell:{flexGrow:1},page2table:{width:"300",borderStyle:"solid",borderWidth:1,borderRightWidth:0,borderBottomWidth:0},page2tablerow:{margin:"auto",flexDirection:"row"}}),c={page:{paddingLeft:"20px",paddingRight:"20px"},table:{textSize:20,marginTop:18,height:200,display:"table",width:"auto"},row:{flexDirection:"row"},col:{flexGrow:1,borderStyle:"solid",borderWidth:1},cell:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,textAlign:"left",width:180},cell2:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,width:250},table2:{textSize:20,marginTop:-1,display:"table",width:"auto",borderStyle:"solid",borderColor:"#000",borderWidth:1},row2:{flexDirection:"row"},col2:{flexGrow:1,borderStyle:"solid",borderWidth:1},table2cell:{margin:"auto",marginTop:5,fontSize:12,width:90},table2cell2:{margin:"auto",marginTop:5,fontSize:12,width:205},table2cell3:{margin:"auto",marginTop:5,fontSize:12,width:130},box:{textSize:20,marginTop:18,display:"table",width:"auto",borderStyle:"solid",borderColor:"#000",borderWidth:1}},x=e=>e>=90?"A":e>=80?"B":e>=70?"C":e>=60?"D":e>=40?"E":"",h=e=>{var l,t,s,d,h,y,j,w,u,b,m,g,v,f,p,T,V,C,S,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W;let{student:O,subjectData:_,grade:U,term:Y}=e;console.log("Student",O),console.log("Subject Dtaa",_);let J=O.bill[0].classSections.studentClass.className,K=O.bill[0].classSections.section.section,$=null==O?void 0:null===(s=O.termResults)||void 0===s?void 0:null===(t=s.find(e=>5==e.termId))||void 0===t?void 0:null===(l=t.termResult)||void 0===l?void 0:l.remarks,Z=_.find(e=>"G.K."===e.name),q=x(null==Z?void 0:Z.total),Q=_.filter(e=>(null==e?void 0:e.name)!=="G.K."),X=Q.filter(e=>!e.isGraded),ee=Q.filter(e=>e.isGraded),el=["Half Yearly","FINAL"];return Q[0],console.log(U,"grade"),console.log(Q,"subjects"),(0,i.jsxs)(o.Document,{children:[(0,i.jsx)(o.Page,{size:"A4",orientation:"portrait",style:c.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:400,height:50,marginTop:20}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:150,height:120}})}),(0,i.jsx)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:24,marginTop:18},children:"Annual Progress Report"}),(0,i.jsxs)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:18,marginTop:18},children:[" ","2024-2025"]}),(0,i.jsxs)(o.View,{style:c.table,children:[(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"Pupil's Name"})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell2,children:(0,n.A)(O.studentName)})})]}),(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"Class/Section"})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsxs)(o.Text,{style:c.cell2,children:[" ",(0,n.A)(J)," - ",K]})})]}),(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"Personal No."})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell2,children:O.personalNo})})]}),(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"House"})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell2,children:(0,n.A)(O.house)})})]}),(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"Date of Birth"})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell2,children:O.studentDob})})]}),(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"Father's Name"})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell2,children:(0,n.A)(O.fatherName)})})]}),(0,i.jsxs)(o.View,{style:c.row,children:[(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell,children:"Mother'
1s Name"})}),(0,i.jsx)(o.View,{style:c.col,children:(0,i.jsx)(o.Text,{style:c.cell2,children:(0,n.A)(O.motherName)})})]})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:a.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:a.header,children:(0,i.jsx)(o.Text,{style:a.headerText,children:"Annual Progress Report ".concat(Y.year," - ").concat((Y.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(O.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",O.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(J)," - ",K]})})]}),(0,i.jsxs)(o.View,{style:a.table,children:[(0,i.jsx)(o.View,{style:a.tableRow,children:(0,i.jsx)(o.View,{style:[a.tableColHeader,{width:"100%",borderLeft:0,borderBottom:0,backgroundColor:"#d2b48c"}],children:(0,i.jsx)(o.Text,{style:a.tableCellHeader,children:"MARK SHEET"})})}),(0,i.jsxs)(o.View,{style:a.tableRow,children:[(0,i.jsx)(o.View,{style:[a.tableColHeader,{borderLeft:0}],children:(0,i.jsx)(o.Text,{style:a.tableCellHeader,children:"SUBJECTS"})}),(0,i.jsx)(o.View,{style:[a.tableColHeader,{width:"84%",borderLeft:0}],children:(0,i.jsxs)(o.View,{style:{width:"100%",flexDirection:"row"},children:[el.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*el.length/(2*el.length+2)*100,"%"),borderRight:1,borderColor:"#000",flexDirection:"row"},children:el.map((e,l)=>(0,i.jsxs)(o.View,{style:{width:"".concat(100/el.length,"%"),fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:l>0?1:0,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:0==l?"Half Yearly (A)":"Final (B)"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]},l))}),(0,i.jsxs)(o.View,{style:{width:"".concat(2/(2*el.length+2)*100,"%"),fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"TOTAL 100"}),(0,i.jsx)(o.View,{style:{borderTop:1},children:(0,i.jsx)(o.Text,{style:{padding:2},children:"A (40%) + B (60%)"})})]})]})})]}),X.map((e,l)=>(0,i.jsxs)(o.View,{style:a.tableRow,children:[(0,i.jsx)(o.View,{style:a.tableCol,children:(0,i.jsx)(o.Text,{style:[a.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsxs)(o.View,{style:{width:"84%",flexDirection:"row"},children:[el.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*el.length/(2*el.length+2)*100,"%"),flexDirection:"row"},children:el.map((l,t)=>{var s,d;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(o.View,{style:[a.tableGradeCol,{width:"".concat(50/el.length,"%")}],children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null===(s=e[l])||void 0===s?void 0:s.obtain)||""})}),(0,i.jsx)(o.View,{style:[a.tableGradeCol,{width:"".concat(50/el.length,"%")}],children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null===(d=e[l])||void 0===d?void 0:d.maxMarks)||""})})]},t)})}),(0,i.jsx)(o.View,{style:[a.tableGradeCol,{width:"".concat(2/(2*el.length+2)*100,"%")}],children:(0,i.jsx)(o.Text,{style:a.tableCell,children:e.total||""})})]})]},l))]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),ee&&ee.map((e,l)=>(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[a.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(()=>{var l,t,i;let s=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:l.find(e=>1==e.termId);if(!s)return"";let r=null===(i=s.subjectWiseTotal)||void 0===i?void 0:null===(t=i.results)||void 0===t?void 0:t.find(l=>l.subjectId===e.subjectId);return(null==r?void 0:r.grade)||""})()})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(()=>{var l,t,i;let s=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:l.find(e=>5===e.termId);if(!s)return"";let r=null===(i=s.subjectWiseTotal)||void 0===i?void 0:null===(t=i.results)||void 0===t?void 0:t.find(l=>l.subjectId===e.subjectId);return(null==r?void 0:r.grade)||""})()})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:e.grade||""})})]},l)),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[a.tableCell,{textAlign:"left"}],children:"S.U.P.W."})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:x((null==O?void 0:null===(y=O.termResults)||void 0===y?void 0:null===(h=y.find(e=>1==e.termId))||void 0===h?void 0:null===(d=h.termResult)||void 0===d?void 0:d.supwMarks)*100)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:x((null==O?void 0:null===(u=O.termResults)||void 0===u?void 0:null===(w=u.find(e=>5==e.termId))||void 0===w?void 0:null===(j=w.termResult)||void 0===j?void 0:j.supwMarks)*100)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[a.tableCell,{textAlign:"left"}],children:"Value Education"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:x((null==O?void 0:null===(m=O.termResults)||void 0===m?void 0:null===(b=m.find(e=>1==e.termId).termResult)||void 0===b?void 0:b.valueEducationMarks)
1*100)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:x((null==O?void 0:null===(f=O.termResults)||void 0===f?void 0:null===(v=f.find(e=>5==e.termId))||void 0===v?void 0:null===(g=v.termResult)||void 0===g?void 0:g.valueEducationMarks)*100)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[a.tableCell,{textAlign:"left"}],children:"G.K."})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(()=>{var e,l,t;let i=null==O?void 0:null===(e=O.termResults)||void 0===e?void 0:e.find(e=>1==e.termId);if(!i)return"";let s=null===(t=i.subjectWiseTotal)||void 0===t?void 0:null===(l=t.results)||void 0===l?void 0:l.find(e=>112===e.subjectId||125==e.subjectId);return(null==s?void 0:s.grade)||""})()})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(()=>{var e,l,t;let i=null==O?void 0:null===(e=O.termResults)||void 0===e?void 0:e.find(e=>5===e.termId);if(!i)return"";let s=null===(t=i.subjectWiseTotal)||void 0===t?void 0:null===(l=t.results)||void 0===l?void 0:l.find(e=>112===e.subjectId||125===e.subjectId);return(null==s?void 0:s.grade)||""})()})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:q})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCellHeader,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderBottom:0,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"Marks Obtained"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(T=O.termResults)||void 0===T?void 0:null===(p=T.find(e=>1==e.termId))||void 0===p?void 0:p.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(C=O.termResults)||void 0===C?void 0:null===(V=C.find(e=>5==e.termId))||void 0===V?void 0:V.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:U.obtain})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"Max Marks"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(R=O.termResults)||void 0===R?void 0:null===(S=R.find(e=>1==e.termId))||void 0===S?void 0:S.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(I=O.termResults)||void 0===I?void 0:null===(A=I.find(e=>5==e.termId))||void 0===A?void 0:A.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:U.total})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"Percentage"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:a.tableCell,children:[(()=>{var e,l;let t=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:null===(e=l.find(e=>1==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:a.tableCell,children:[(()=>{var e,l;let t=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:null===(e=l.find(e=>5==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsxs)(o.Text,{style:a.tableCell,children:[(null==U?void 0:U.percentage)!==void 0&&(null==U?void 0:U.percentage)!==null&&(null==U?void 0:U.percentage)!==""?U.percentage.toFixed(2)+" %":""," "]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"Rank"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(N=O.termResults)||void 0===N?void 0:null===(k=N.find(e=>1==e.termId))||void 0===k?void 0:k.rank)||"Rank not awarded"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(H=O.termResults)||void 0===H?void 0:null===(F=H.find(e=>5==e.termId))||void 0===F?void 0:F.rank)||"Rank not awarded"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:U.rank||"Rank not awarded"})})]})]}),(0,i.jsx)(o.View,{style:{borderTop:1,marginTop:5},children:(0,i.jsx)(o.Text,{style:{textAlign:"center",fontSize:12},children:"M - Marks Obtained, MM - Maximum Marks"})})]})}),(0,i.jsx)(o.Page,{size:"A4",style:a.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:a.header,children:(0,i.jsx)(o.Text,{style:a.headerText,children:"Annual Progress Report ".concat(Y.year," - ").concat((Y.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(O.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",O.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(J)," - ",K]})})]}),(0,i.jsxs)(o.View,{style:{borderLeft:0},children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Activities & Achievements"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Activity"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"M"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IH"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IC"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IS"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"S"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"N"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"House Position"})})]}),(null==O?void 0:null===(M=O.termResults)||void 0===M?void 0:null===(z=M.find(e=>5===e.termId))||void 0===z?void 0:null===(D=z.termResult)||void 0===D?void 0:D.activityList)?Object.entries(O.termResults.find(e=>5===e.termId).termResult.activityList).map((e,l)=>{var t,s;let[r,d]=e;null===(s=O.termResults.find(e=>5===e.termId))||void 0===s||null===(t=s.activityHousePosition)||void 0===t||t[r],console.log("Values",d);let c=Array.isArray(d)?d.map(e=>e.trim().toLowerCase()):[];console.log("Normalized values",c);let x=c.some(e=>"member"===e),h=c.some(e=>"interhouse"===e),y=c.some(e=>"interschool"===e),j=c.some(e=>"interclass"===e),w=c.some(e=>"national"===e),u=c.some(e=>"state"===e);return(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(0,n.A)(r)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:x?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:h?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:j?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:y?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:u?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:w?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:(()=>{var e,l,t;let i=null===(l=O.termResults.find(e=>5===e.termId))||void 0===l?void 0:null===(e=l.activityHousePosition)||void 0===e?void 0:e[r];if(!i)return"";let s=null===(t=O.house)||void 0===t?void 0:t.toLowerCase();return s?i.houseFirst===s?"1st":i.houseSecond===s?"2nd":i.houseThird===s?"3rd":i.houseFourth===s?"4th":"":""})()})})]},l)}):(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center"},children:"No activities"})})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:10,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Attendance"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"Number of Days Present"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(P=O.termResults)||void 0===P?void 0:null===(L=P.find(e=>1==e.termId).termResult)||void 0===L?void 0:null===(B=L.remarks)||void 0===B?void 0:B.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(null==O?void 0:null===(W=O.termResults)||void 0===W?void 0:null===(G=W.find(e=>5==e.termId).termResult)||void 0===G?void 0:null===(E=G.remarks)||void 0===E?void 0:E.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:(()=>{var e,l,t,i,s,r;let d=(null==O?void 0:null===(t=O.termResults)||void 0===t?void 0:null===(l=t.find(e=>1==e.termId).termResult)||void 0===l?void 0:null===(e=l.remarks)||void 0===e?void 0:e.daysPresent)||0,n=(null==O?void 0:null===(r=O.termResults)||void 0===r?void 0:null===(s=r.find(e=>5==e.termId).termResult)||void 0===s?void 0:null===(i=s.remarks)||void 0===i?void 0:i.daysPresent)||0,o=Number(d)+Number(n);return o>0?o.toString():""})()})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"Total Number of Working Days"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"90"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"110"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:a.tableCell,children:"200"})})]}),(0,i.jsxs)(o.View,{style:{},children:[" ",(0,i.jsxs)(o.View,{style:[a.page2table,{width:"100%"}],children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Class Teacher's Evaluation"})})}),(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleftCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Characteristic"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Observation"})})]}),(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Initiative And Perseverance"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.initiativeAndPerseverance})})]}),(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Participation In Group Activity"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.participationInGroupActivity})})]}),(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleft
1Cell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Sense Of Responsibility"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.senseOfResponsibility})})]}),(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Work Habits"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.workHabits})})]}),(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Conduct"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.conduct})})]}),(null==$?void 0:$.anyAdditionalComment)&&(0,i.jsxs)(o.View,{style:a.row,children:[(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Additional Comment"})}),(0,i.jsx)(o.View,{style:[a.page2tablecell,a.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.anyAdditionalComment})})]})]})]})]}),(0,i.jsx)(o.View,{style:[a.page2table,{width:"100%"}],children:(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{width:"50%",borderRight:1},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Promotion"})}),(0,i.jsx)(o.View,{style:{width:"50%"},children:(0,i.jsx)(o.Text,{style:{...a.tableCell,textAlign:"center",whiteSpace:"nowrap"},children:(()=>{if(null==U?void 0:U.rank){var e,l,t;let i=((null==O?void 0:null===(t=O.bill[0])||void 0===t?void 0:null===(l=t.classSections)||void 0===l?void 0:null===(e=l.studentClass)||void 0===e?void 0:e.className)||"").match(/(\d+)/);if(i&&i[1]){let e=parseInt(i[1],10);return"Promoted to Class ".concat(e+1)}return"Promoted to class"}return""})()})})]})}),(0,i.jsxs)(o.View,{style:{margin:5,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1}}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1,textAlign:"center",alignItems:"center",justifyContent:"center",marginTop:5},children:(0,i.jsx)(o.Image,{src:"/signature_class1to5_HOD.jpg",style:{width:100,height:80}})}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1,alignItems:"center",justifyContent:"center",marginTop:5},children:(0,i.jsx)(o.Image,{src:"/Signature.png",style:{width:100,height:80}})})]}),(0,i.jsxs)(o.View,{style:{margin:5,marginBottom:20,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:"CLASS TEACHER"}),(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:[" ","HEAD OF DEPARTMENT"]}),(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1},children:"PRINCIPAL"})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:a.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center"},children:[(0,i.jsx)(o.Text,{style:[{marginTop:20,fontSize:16}],children:"EQUIVALENCE"}),(0,i.jsx)(o.View,{style:[c.box,{marginTop:20}]}),(0,i.jsxs)(o.View,{style:c.table2,children:[(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"GRADE"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"STANDARD"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:"PERCENTAGE"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"A"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Very Good"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:"90-100"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"B"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Good"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:"80-89"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"C"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Fair"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:"70-79"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"D"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Satisfactory"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:"60-69"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"E"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Needs Improvement"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:" 40-59"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell,children:"F"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Does not meet criteria"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell3,children:"0-39"})})]})]}),(0,i.jsx)(o.Text,{style:[{marginTop:40,fontSize:16}],children:"ACTIVITY"}),(0,i.jsxs)(o.View,{style:[c.table2,{marginTop:20}],children:[(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:{...c.table2cell2,fontFamily:"Helvetica-Bold"},children:"ABBREVIATION"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:{...c.table2cell2,fontFamily:"Helvetica-Bold"},children:"DESCRIPTION"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"IC"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Inter Class"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"IH"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Inter House"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"IS"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Inter School"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"S"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"State"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"N"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"National"})})]}),(0,i.jsxs)(o.View,{style:c.row2,children:[(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"M"})}),(0,i.jsx)(o.View,{style:c.col2,children:(0,i.jsx)(o.Text,{style:c.table2cell2,children:"Member"})})]})]})]})})]})},y=o.StyleSheet.create({page:{flexDirection:"column",backgroundColor:"#ffffff",fontFamily:"Helvetica"},header:{backgroundColor:"#d2b48c",padding:3,paddingLeft:10,flexDirection:"row",alignItems:"center",fontFamily:"Helvetica-Bold",borderBottom:1,borderTop:1,borderColor:"#000"},headerText:{fontSize:14,fontWeight:900,width:"100%",textAlign:"center",textTransform:"uppercase"},title:{fontSize:13,marginBottom:10,textAlign:"center",fontWeight:900},table:{display:"table",width:"auto",paddingBottom:0},tableRow:{margin:"auto",flexDirection:"row",width:"100%"},tableColHeader:{width:"30%",borderStyle:"solid",borderWidth:1,fontSize:12,display:"flex",justifyContent:"center",alignItems:"center"},tableCol:{width:"30%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol:{width:"14%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol2:{flex:1,borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableCellHeader:{margin:5,fontSize:10,fontWeight:"bold",fontFamily:"Helvetica-Bold"},tableCell:{margin:5,fontSize:8,textAlign:"center"},overallRow:{flexDirection:"row",justifyContent:"flex-end",marginTop:10},overallText:{fontSize:12,fontWeight:"bold"},footer:{position:"absolute",bottom:30,left:0,right:0,textAlign:"center",fontSize:10},nameField:{width:"100%",fontSize:10,fontFamily:"Helvetica-Bold",flexDirection:"row",justifyContent:"space-between",padding:2},page2tablecell:{borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0,height:16,justifyContent:"center",alignItems:"center"},page2tablesingleCellHeader:{width:"100%"},page2tableleftCell:{width:140},row:{flexDirection:"row"},page2tablerightCell:{flexGrow:1},page2table:{width:"300",borderStyle:"solid",borderWidth:1,borderRightWidth:0,borderBottomWidth:0},page2tablerow:{margin:"auto",flexDirection:"row"}}),j={page:{paddingLeft:"20px",paddingRight:"20px"},table:{textSize:20,marginTop:18,height:200,display:"table",width:"auto"},row:{flexDirection:"row"},col:{flexGrow:1,borderStyle:"solid",borderWidth:1},cell:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,textAlign:"left",width:180},cell2:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,width:250},table2:{textSize:20,marginTop:-1,display:"table",width:"auto",borderStyle:"solid",borderColor:"#000",borderWidth:1},row2:{flexDirection:"row"},col2:{flexGrow:1,borderStyle:"solid",borderWidth:1},table2cell:{margin:"auto",marginTop:5,fontSize:12,width:90},table2cell2:{margin:"auto",marginTop:5,fontSize:12,width:205},table2cell3:{margin:"auto",marginTop:5,fontSize:12,width:130},box:{textSize:20,marginTop:18,display:"table",width:"auto",borderStyle:"solid",borderColor:"#000",borderWidth:1}},w=e=>e>=90?"A":e>=80?"B":e>=70?"C":e>=60?"D":e>=40?"E":"",u=e=>{var l,t,s,d,a,c,x,h,u,b,m,g,v,f,p,T,V,C,S,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W;let{student:O,subjectData:_,grade:U,term:Y}=e;console.log("Student",O),console.log("Subject Dtaa",_);let J=O.bill[0].classSections.studentClass.className,K=O.bill[0].classSections.section.section,$=null==O?void 0:null===(s=O.termResults)||void 0===s?void 0:null===(t=s.find(e=>5==e.termId))||void 0===t?void 0:null===(l=t.termResult)||void 0===l?void 0:l.remarks,Z=_.find(e=>"G.K."===e.name);w(null==Z?void 0:Z.total);let q=_.filter(e=>(null==e?void 0:e.name)!=="G.K."),Q=q.filter(e=>!e.isGraded).sort((e,l)=>{let t=["Science","Physics","Chemistry","Biology"];
1return t.indexOf(e.name)-t.indexOf(l.name)}),X=q.filter(e=>e.isGraded),ee=["Half Yearly","FINAL"];return q[0],console.log(U,"grade"),console.log(q,"subjects"),(0,i.jsxs)(o.Document,{children:[(0,i.jsx)(o.Page,{size:"A4",orientation:"portrait",style:j.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:400,height:50,marginTop:20}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:150,height:120}})}),(0,i.jsx)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:24,marginTop:18},children:"Annual Progress Report"}),(0,i.jsxs)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:18,marginTop:18},children:[" ","2024-2025"]}),(0,i.jsxs)(o.View,{style:j.table,children:[(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"Pupil's Name"})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell2,children:(0,n.A)(O.studentName)})})]}),(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"Class/Section"})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsxs)(o.Text,{style:j.cell2,children:[" ",(0,n.A)(J)," - ",K]})})]}),(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"Personal No."})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell2,children:O.personalNo})})]}),(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"House"})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell2,children:(0,n.A)(O.house)})})]}),(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"Date of Birth"})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell2,children:O.studentDob})})]}),(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"Father's Name"})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell2,children:(0,n.A)(O.fatherName)})})]}),(0,i.jsxs)(o.View,{style:j.row,children:[(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell,children:"Mother's Name"})}),(0,i.jsx)(o.View,{style:j.col,children:(0,i.jsx)(o.Text,{style:j.cell2,children:(0,n.A)(O.motherName)})})]})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:y.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:y.header,children:(0,i.jsx)(o.Text,{style:y.headerText,children:"Annual Progress Report ".concat(Y.year," - ").concat((Y.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(O.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",O.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(J)," - ",K]})})]}),(0,i.jsxs)(o.View,{style:y.table,children:[(0,i.jsx)(o.View,{style:y.tableRow,children:(0,i.jsx)(o.View,{style:[y.tableColHeader,{width:"100%",borderLeft:0,borderBottom:0,backgroundColor:"#d2b48c"}],children:(0,i.jsx)(o.Text,{style:y.tableCellHeader,children:"MARK SHEET"})})}),(0,i.jsxs)(o.View,{style:y.tableRow,children:[(0,i.jsx)(o.View,{style:[y.tableColHeader,{borderLeft:0}],children:(0,i.jsx)(o.Text,{style:y.tableCellHeader,children:"SUBJECTS"})}),(0,i.jsx)(o.View,{style:[y.tableColHeader,{width:"84%",borderLeft:0}],children:(0,i.jsxs)(o.View,{style:{width:"100%",flexDirection:"row"},children:[ee.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*ee.length/(2*ee.length+2)*100,"%"),borderRight:1,borderColor:"#000",flexDirection:"row"},children:ee.map((e,l)=>(0,i.jsxs)(o.View,{style:{width:"".concat(100/ee.length,"%"),fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:l>0?1:0,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:0==l?"Half Yearly (A)":"Final (B)"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]},l))}),(0,i.jsxs)(o.View,{style:{width:"".concat(2/(2*ee.length+2)*100,"%"),fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"TOTAL 100"}),(0,i.jsx)(o.View,{style:{borderTop:1},children:(0,i.jsx)(o.Text,{style:{padding:2},children:"A (40%) + B (60%)"})})]})]})})]}),Q.map((e,l)=>(0,i.jsxs)(o.View,{style:y.tableRow,children:[(0,i.jsx)(o.View,{style:y.tableCol,children:(0,i.jsx)(o.Text,{style:[y.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsxs)(o.View,{style:{width:"84%",flexDirection:"row"},children:[ee.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*ee.length/(2*ee.length+2)*100,"%"),flexDirection:"row"},children:ee.map((l,t)=>{var s,d;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(o.View,{style:[y.tableGradeCol,{width:"".concat(50/ee.length,"%")}],children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null===(s=e[l])||void 0===s?void 0:s.obtain)||""})}),(0,i.jsx)(o.View,{style:[y.tableGradeCol,{width:"".concat(50/ee.length,"%")}],children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null===(d=e[l])||void 0===d?void 0:d.maxMarks)||""})})]},t)})}),(0,i.jsx)(o.View,{style:[y.tableGradeCol,{width:"".concat(2/(2*ee.length+2)*100,"%")}],children:(0,i.jsx)(o.Text,{style:y.tableCell,children:e.total||""})})]})]},l))]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),X&&X.map((e,l)=>(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[y.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(()=>{var l,t,i;let s=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:l.find(e=>1==e.termId);if(!s)return"";let r=null===(i=s.subjectWiseTotal)||void 0===i?void 0:null===(t=i.results)||void 0===t?void 0:t.find(l=>l.subjectId===e.subjectId);return(null==r?void 0:r.grade)||""})()})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(()=>{var l,t,i;let s=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:l.find(e=>5===e.termId);if(!s)return"";let r=null===(i=s.subjectWiseTotal)||void 0===i?void 0:null===(t=i.results)||void 0===t?void 0:t.find(l=>l.subjectId===e.subjectId);return(null==r?void 0:r.grade)||""})()})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:e.grade||""})})]},l)),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[y.tableCell,{textAlign:"left"}],children:"S.U.P.W."})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:w((null==O?void 0:null===(c=O.termResults)||void 0===c?void 0:null===(a=c.find(e=>1==e.termId))||void 0===a?void 0:null===(d=a.termResult)||void 0===d?void 0:d.supwMarks)*100)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:w((null==O?void 0:null===(u=O.termResults)||void 0===u?void 0:null===(h=u.find(e=>5==e.termId))||void 0===h?void 0:null===(x=h.termResult)||void 0===x?void 0:x.supwMarks)*100)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[y.tableCell,{textAlign:"left"}],children:"Value Education"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:w((null==O?void 0:null===(m=O.termResults)||void 0===m?void 0:null===(b=m.find(e=>1==e.termId).termResult)||void 0===b?void 0:b.valueEducationMarks)
1*100)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:w((null==O?void 0:null===(f=O.termResults)||void 0===f?void 0:null===(v=f.find(e=>5==e.termId))||void 0===v?void 0:null===(g=v.termResult)||void 0===g?void 0:g.valueEducationMarks)*100)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCellHeader,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderBottom:0,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"Marks Obtained"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(T=O.termResults)||void 0===T?void 0:null===(p=T.find(e=>1==e.termId))||void 0===p?void 0:p.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(C=O.termResults)||void 0===C?void 0:null===(V=C.find(e=>5==e.termId))||void 0===V?void 0:V.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:U.obtain})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"Max Marks"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(R=O.termResults)||void 0===R?void 0:null===(S=R.find(e=>1==e.termId))||void 0===S?void 0:S.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(I=O.termResults)||void 0===I?void 0:null===(A=I.find(e=>5==e.termId))||void 0===A?void 0:A.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:U.total})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"Percentage"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:y.tableCell,children:[(()=>{var e,l;let t=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:null===(e=l.find(e=>1==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:y.tableCell,children:[(()=>{var e,l;let t=null==O?void 0:null===(l=O.termResults)||void 0===l?void 0:null===(e=l.find(e=>5==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsxs)(o.Text,{style:y.tableCell,children:[(null==U?void 0:U.percentage)!==void 0&&(null==U?void 0:U.percentage)!==null&&(null==U?void 0:U.percentage)!==""?U.percentage.toFixed(2)+" %":""," "]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"Rank"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(N=O.termResults)||void 0===N?void 0:null===(k=N.find(e=>1==e.termId))||void 0===k?void 0:k.rank)||"Rank not awarded"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(H=O.termResults)||void 0===H?void 0:null===(F=H.find(e=>5==e.termId))||void 0===F?void 0:F.rank)||"Rank not awarded"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:U.rank||"Rank not awarded"})})]})]}),(0,i.jsx)(o.View,{style:{borderTop:1,marginTop:5},children:(0,i.jsx)(o.Text,{style:{textAlign:"center",fontSize:12},children:"M - Marks Obtained, MM - Maximum Marks"})})]})}),(0,i.jsx)(o.Page,{size:"A4",style:y.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:y.header,children:(0,i.jsx)(o.Text,{style:y.headerText,children:"Annual Progress Report ".concat(Y.year," - ").concat((Y.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(O.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",O.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(J)," - ",K]})})]}),(0,i.jsxs)(o.View,{style:{borderLeft:0},children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Activities & Achievements"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Activity"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"M"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IH"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IC"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IS"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"S"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"N"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"House Position"})})]}),(null==O?void 0:null===(M=O.termResults)||void 0===M?void 0:null===(z=M.find(e=>5===e.termId))||void 0===z?void 0:null===(D=z.termResult)||void 0===D?void 0:D.activityList)?Object.entries(O.termResults.find(e=>5===e.termId).termResult.activityList).filter((e,l)=>{let[t,i]=e;return""!=i}).map((e,l)=>{var t,s;let[r,d]=e;null===(s=O.termResults.find(e=>5===e.termId))||void 0===s||null===(t=s.activityHousePosition)||void 0===t||t[r],console.log("Values",d);let a=Array.isArray(d)?d.map(e=>e.trim().toLowerCase()):[d.trim().toLowerCase()];console.log("Normalized values",a);let c=a.some(e=>"member"===e),x=a.some(e=>"interhouse"===e||"interHouse"==e),h=a.some(e=>"interschool"===e||"interSchool"==e),j=a.some(e=>"interclass"===e||"interClass"==e),w=a.some(e=>"national"===e),u=a.some(e=>"state"===e);return(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(0,n.A)(r)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:c?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:x?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:j?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:h?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:u?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:w?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:(()=>{var e,l,t;let i=null===(l=O.termResults.find(e=>5===e.termId))||void 0===l?void 0:null===(e=l.activityHousePosition)||void 0===e?void 0:e[r];if(!i)return"";let s=null===(t=O.house)||void 0===t?void 0:t.toLowerCase();return s?i.houseFirst===s?"1st":i.houseSecond===s?"2nd":i.houseThird===s?"3rd":i.houseFourth===s?"4th":"":""})()})})]},l)}):(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center"},children:"No activities"})})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:10,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Attendance"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"Number of Days Present"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(P=O.termResults)||void 0===P?void 0:null===(L=P.find(e=>1==e.termId).termResult)||void 0===L?void 0:null===(B=L.remarks)||void 0===B?void 0:B.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(null==O?void 0:null===(W=O.termResults)||void 0===W?void 0:null===(G=W.find(e=>5==e.termId).termResult)||void 0===G?void 0:null===(E=G.remarks)||void 0===E?void 0:E.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:(()=>{var e,l,t,i,s,r;let d=(null==O?void 0:null===(t=O.termResults)||void 0===t?void 0:null===(l=t.find(e=>1==e.termId).termResult)||void 0===l?void 0:null===(e=l.remarks)||void 0===e?void 0:e.daysPresent)||0,n=(null==O?void 0:null===(r=O.termResults)||void 0===r?void 0:null===(s=r.find(e=>5==e.termId).termResult)||void 0===s?void 0:null===(i=s.remarks)||void 0===i?void 0:i.daysPresent)||0,o=Number(d)+Number(n);return o>0?o.toString():""})()})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"Total Number of Working Days"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"91"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:"".concat("class6"==J?"108":"class7"==J||"class8"==J?"109":"110")})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:y.tableCell,children:("class6"===J?108:"class7"===J||"class8"===J?109:110)+91})})]}),(0,i.jsxs)(o.View,{style:{},children:[" ",(0,i.jsxs)(o.View,{style:[y.page2table,{width:"100%"}],children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Class Teacher's Evaluation"})})}),(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Characteristic"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Observation"})})]}),(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Initiative And Perseverance"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.initiativeAndPerseverance})})]}),(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Participation In Group Activity"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.participationInGroupActivity})})]}),(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Sense Of Responsibility"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.senseOfResponsibility})})]}),(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Work Habits"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.workHabits})})]}),(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Conduct"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.conduct})})]}),(null==$?vo
1id 0:$.anyAdditionalComment)&&(0,i.jsxs)(o.View,{style:y.row,children:[(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Additional Comment"})}),(0,i.jsx)(o.View,{style:[y.page2tablecell,y.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==$?void 0:$.anyAdditionalComment})})]})]})]})]}),(0,i.jsx)(o.View,{style:[y.page2table,{width:"100%"}],children:(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{width:"50%",borderRight:1},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Promotion"})}),(0,i.jsx)(o.View,{style:{width:"50%"},children:(0,i.jsx)(o.Text,{style:{...y.tableCell,textAlign:"center",whiteSpace:"nowrap"},children:(()=>{if(null==U?void 0:U.rank){var e,l,t;let i=((null==O?void 0:null===(t=O.bill[0])||void 0===t?void 0:null===(l=t.classSections)||void 0===l?void 0:null===(e=l.studentClass)||void 0===e?void 0:e.className)||"").match(/(\d+)/);if(i&&i[1]){let e=parseInt(i[1],10);return"Promoted to Class ".concat(e+1)}return"Promoted to class"}return""})()})})]})}),(0,i.jsxs)(o.View,{style:{margin:5,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1}}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1,textAlign:"center",alignItems:"center",justifyContent:"center",marginTop:5},children:"class6"===J||"class7"===J||"class8"===J?(0,i.jsx)(o.Image,{src:"/signature_class6to8_HOD.png",style:{width:100,height:80}}):(0,i.jsx)(o.Image,{src:"/signature_class9to12_HOD.png",style:{width:100,height:80}})}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1,alignItems:"center",justifyContent:"center",marginTop:5},children:(0,i.jsx)(o.Image,{src:"/Signature.png",style:{width:100,height:80}})})]}),(0,i.jsxs)(o.View,{style:{margin:5,marginBottom:20,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:"CLASS TEACHER"}),(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:[" ","HEAD OF DEPARTMENT"]}),(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1},children:"PRINCIPAL"})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:y.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center"},children:[(0,i.jsx)(o.Text,{style:[{marginTop:20,fontSize:16}],children:"EQUIVALENCE"}),(0,i.jsx)(o.View,{style:[j.box,{marginTop:20}]}),(0,i.jsxs)(o.View,{style:j.table2,children:[(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"GRADE"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"STANDARD"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:"PERCENTAGE"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"A"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Very Good"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:"90-100"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"B"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Good"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:"80-89"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"C"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Fair"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:"70-79"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"D"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Satisfactory"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:"60-69"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"E"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Needs Improvement"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:" 40-59"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell,children:"F"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Does not meet criteria"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell3,children:"0-39"})})]})]}),(0,i.jsx)(o.Text,{style:[{marginTop:40,fontSize:16}],children:"ACTIVITY"}),(0,i.jsxs)(o.View,{style:[j.table2,{marginTop:20}],children:[(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:{...j.table2cell2,fontFamily:"Helvetica-Bold"},children:"ABBREVIATION"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:{...j.table2cell2,fontFamily:"Helvetica-Bold"},children:"DESCRIPTION"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"IC"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Inter Class"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"IH"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Inter House"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"IS"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Inter School"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"S"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"State"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"N"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"National"})})]}),(0,i.jsxs)(o.View,{style:j.row2,children:[(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"M"})}),(0,i.jsx)(o.View,{style:j.col2,children:(0,i.jsx)(o.Text,{style:j.table2cell2,children:"Member"})})]})]})]})})]})},b=o.StyleSheet.create({page:{flexDirection:"column",backgroundColor:"#ffffff",fontFamily:"Helvetica"},header:{backgroundColor:"#d2b48c",padding:3,paddingLeft:10,flexDirection:"row",alignItems:"center",fontFamily:"Helvetica-Bold",borderBottom:1,borderTop:1,borderColor:"#000"},headerText:{fontSize:14,fontWeight:900,width:"100%",textAlign:"center",textTransform:"uppercase"},title:{fontSize:13,marginBottom:10,textAlign:"center",fontWeight:900},table:{display:"table",width:"auto",paddingBottom:0},tableRow:{margin:"auto",flexDirection:"row",width:"100%"},tableColHeader:{width:"30%",borderStyle:"solid",borderWidth:1,fontSize:12,display:"flex",justifyContent:"center",alignItems:"center"},tableCol:{width:"30%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol:{width:"14%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol2:{flex:1,borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableCellHeader:{margin:5,fontSize:10,fontWeight:"bold",fontFamily:"Helvetica-Bold"},tableCell:{margin:5,fontSize:8,textAlign:"center"},overallRow:{flexDirection:"row",justifyContent:"flex-end",marginTop:10},overallText:{fontSize:12,fontWeight:"bold"},footer:{position:"absolute",bottom:30,left:0,right:0,textAlign:"center",fontSize:10},nameField:{width:"100%",fontSize:10,fontFamily:"Helvetica-Bold",flexDirection:"row",justifyContent:"space-between",padding:2},page2tablecell:{borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0,height:16,justifyContent:"center",alignItems:"center"},page2tablesingleCellHeader:{width:"100%"},page2tableleftCell:{width:140},row:{flexDirection:"row"},page2tablerightCell:{flexGrow:1},page2table:{width:"300",borderStyle:"solid",borderWidth:1,borderRightWidth:0,borderBottomWidth:0},page2tablerow:{margin:"auto",flexDirection:"row"}}),m={page:{paddingLeft:"20px",paddingRight:"20px"},table:{textSize:20,marginTop:18,height:200,display:"table",width:"auto"},row:{flexDirection:"row"},col:{flexGrow:1,borderStyle:"solid",borderWidth:1},cell:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,textAlign:"left",width:180},cell2:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,width:250},table2:{textSize:20,marginTop:-1,display:"table",width:"auto",borderStyle:"solid",borderColor:"#000",borderWidth:1},row2:{flexDirection:"row"},col2:{flexGrow:1,borderStyle:"solid",borderWidth:1},table2cell:{margin:"auto",marginTop:5,fontSize:12,width:90},table2cell2:{margin:"auto",marginTop:5,fontSize:12,width:205},table2cell3:{margin:"auto",marginTop:5,fontSize:12,width:130}},g=e=>e>=90?"A":e>=80?"B":e>=70?"C":e>=60?"D":e>=40?"E":"",v=e=>{var l,t,s,d,a,c,x,h,y,j,w,u,v,f,p,T,V,C,S,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W,O,_,U,Y,J,K,$,Z,q,Q,X,ee,el,et,ei,es,er,ed,en,eo,ea,ec;let{student:ex,subjectData:eh,grade:ey,term:ej,term9SubjectData:ew=[]}=e;console.log("Student",ex),console.log("Subject Data",eh);let eu=ex.bill[0].classSections.studentClass.className,eb=ex.bill[0].classSections.section.section,em=null==ex?void 0:null===(s=ex.termResults)||void 0===s?void 0:null===(t=s.find(e=>9==e.termId))||void 0===t?void 0:null===(l=t.termResult)||void 0===l?void 0:l.remarks,eg=eh.find(e=>"G.K."===e.name);g(null==eg?void 0:eg.total);let ev=eh.map(e=>"Computers"===e.name?{...e,name:"Computer Studies"}:e),ef=ev.filter(e=>!e.isGraded),ep={class1:["English","Hindi","Mathematics","Nature Studies","Computer Studies"],class2:["English","Hindi","Mathematics","Nature Studies","Computer Studies"],class3:["English","Hindi","Mathematics","Science","Social Studies","Computer Studies"],class4:["English","Hindi","Mathematics","Science","Social Studies","Computer Studies"],class5:["English","Hindi","Mathematics","Science","Social Studies","French","Sanskrit","Urdu","Computer Studies"]}[eu]||[],eT=[...ef].sort((e,l)=>{let t=e.name.toLowerCase(),i=l.name.toLowerCase(),s=ep.findIndex(e=>t.includes(e.toLowerCase())),r=ep.findIndex(e=>i.includes(e.toLowerCase()));if(-1!==s&&-1!==r&&s!==r)return s-r;if(-1!==s&&-1!==r&&s===r){let e=ep[s].toLowerCase(),l=t===e,r=i===e;return l&&!r?-1:!l&&r?1:t.localeCompare(i)}return -1!==s?-1:-1!==r?1:0});eT=eT.map(e=>"G.K."===e.name?{...e,name:"General Knowledge"}:"P.T."===e.name?{...e,name:"Sports"}:e),console.log({subjectData:eh},"kfdksdks"),console.log({grade:ey,subjectData:eh,term9SubjectData:ew,student:ex},"subjectDatdsafdsa");let eV=ev.filter(e=>e.isGraded).map(e=>"P.T."===e.name?{...e,name:"Sports"}:e),eC=["Half Yearly Term","Final"];ev[0],console.log(ey,"grade"),console.log(ev,"subjects");let eS=null==ex?void 0:null===(d=ex.termResults)||void 0===d?void 0:d.find(e=>9==e.termId),eR=null==eS?void 0:null===(a=eS.termResult)||void 0===a?void 0:a.remarks,eA=(null==ew?void 0:e
1w.length)>0?ew:eh.map(e=>{var l,t;let i=((null==eS?void 0:null===(l=eS.subjectWiseTotal)||void 0===l?void 0:l.results)||[]).find(l=>l.subjectId===e.subjectId);if(!i)return{...e};let s={};return null===(t=i.examSubjectMarks)||void 0===t||t.forEach(e=>{var l,t,i,r;let d=(null===(t=e.examSubject)||void 0===t?void 0:null===(l=t.exam)||void 0===l?void 0:l.displayName)||(null===(r=e.examSubject)||void 0===r?void 0:null===(i=r.exam)||void 0===i?void 0:i.name);d&&(s[d]={obtain:0===e.normalizedMarks&&e.theoryRemarks?e.theoryRemarks:e.normalizedMarks||0,maxMarks:e.superFolioExamSubjectWeightage||0})}),{...e,...s}});console.log("DEBUG className:",eu,"subjectOrder:",ep,"term9SubjectsNew names:",eA.map(e=>e.name));let eI=[...eA].sort((e,l)=>{let t=e.name.toLowerCase(),i=l.name.toLowerCase(),s=ep.findIndex(e=>t.includes(e.toLowerCase())),r=ep.findIndex(e=>i.includes(e.toLowerCase()));if(-1!==s&&-1!==r&&s!==r)return s-r;if(-1!==s&&-1!==r&&s===r){let e=ep[s].toLowerCase(),l=t===e,r=i===e;return l&&!r?-1:!l&&r?1:t.localeCompare(i)}return -1!==s?-1:-1!==r?1:0}),ek=eI.filter(e=>["Artificial Intelligence and Robotics","Art & Craft","Music","Dance","P.T."].includes(e.name)).map(e=>({...e,name:"P.T."===e.name?"Sports":"Computers"===e.name?"Computer Studies":"G.K."===e.name?"General Knowledge":e.name})),eN=eI.filter(e=>!["Artificial Intelligence and Robotics","Art & Craft","Music","Dance","P.T."].includes(e.name));return console.log("testing12345",{grade:ey,term9MainSubjects:eN=eN.map(e=>"G.K."===e.name?{...e,name:"General Knowledge"}:"P.T."===e.name?{...e,name:"Sports"}:e),term9Subjects:eI,extraSubjects:ek,student:ex,gradedSubjects:eV}),(0,i.jsxs)(o.Document,{children:[(0,i.jsx)(o.Page,{size:"A4",orientation:"portrait",style:m.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:400,height:50,marginTop:20}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:150,height:120}})}),(0,i.jsx)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:24,marginTop:18},children:"Annual Progress Report"}),(0,i.jsxs)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:18,marginTop:18},children:[" ","2025-26"]}),(0,i.jsxs)(o.View,{style:m.table,children:[(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"Pupil's Name"})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell2,children:(0,n.A)(ex.studentName)})})]}),(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"Class/Section"})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsxs)(o.Text,{style:m.cell2,children:[" ",(0,n.A)(eu)," - ",eb]})})]}),(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"Personal No."})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell2,children:ex.personalNo})})]}),(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"House"})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell2,children:(0,n.A)(ex.house)})})]}),(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"Date of Birth"})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell2,children:ex.studentDob?new Date(ex.studentDob.includes("-")?ex.studentDob:ex.studentDob.replace(/(\d{2})\/(\d{2})\/(\d{2})/,"20$3-$2-$1")).toLocaleDateString("en-GB"):""})})]}),(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"Father's Name"})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell2,children:(0,n.A)(ex.fatherName)})})]}),(0,i.jsxs)(o.View,{style:m.row,children:[(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell,children:"Mother'
1s Name"})}),(0,i.jsx)(o.View,{style:m.col,children:(0,i.jsx)(o.Text,{style:m.cell2,children:(0,n.A)(ex.motherName)})})]})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:b.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:b.header,children:(0,i.jsx)(o.Text,{style:b.headerText,children:"Final Examination ".concat(ej.year," - ").concat((ej.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(ex.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",ex.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(eu)," - ",eb]})})]}),(0,i.jsxs)(o.View,{style:b.table,children:[(0,i.jsx)(o.View,{style:b.tableRow,children:(0,i.jsx)(o.View,{style:[b.tableColHeader,{width:"100%",borderLeft:0,borderBottom:0,backgroundColor:"#d2b48c"}],children:(0,i.jsx)(o.Text,{style:b.tableCellHeader,children:"MARK SHEET"})})}),(0,i.jsxs)(o.View,{style:b.tableRow,children:[(0,i.jsx)(o.View,{style:[b.tableColHeader,{borderLeft:0}],children:(0,i.jsx)(o.Text,{style:b.tableCellHeader,children:"SUBJECTS"})}),(0,i.jsx)(o.View,{style:[b.tableColHeader,{width:"84%",borderLeft:0}],children:(0,i.jsxs)(o.View,{style:{width:"100%",flexDirection:"row"},children:[(0,i.jsx)(o.View,{style:{width:"66%",borderRight:1,borderColor:"#000"},children:(0,i.jsxs)(o.View,{style:{borderColor:"#000",flexDirection:"row",justifyContent:"space-between",alignContent:"center"},children:[(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"CLASS TEST"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:1,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"UNIT TEST"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:1,fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"PROJECT"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:1,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"PRACTICAL"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]})]})}),(0,i.jsxs)(o.View,{style:{width:"50%",flexDirection:"row",justifyContent:"center",alignContent:"center"},children:[(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"THEORY MARKS"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsx)(o.View,{style:{borderLeft:1,borderColor:"#000",width:"100%",fontSize:7,padding:2,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:(0,i.jsx)(o.Text,{children:"TOTAL 100"})})]})]})})]}),eN.map((e,l)=>{var t,s,r,d,a,c,x,h,y,j,w,u,m,g,v,f,p,T,V,C,S,R,A,I,k,N,F,H,D;return(0,i.jsxs)(o.View,{style:b.tableRow,children:[(0,i.jsx)(o.View,{style:b.tableCol,children:(0,i.jsx)(o.Text,{style:[b.tableCell,{textAlign:"left"},e.group&&{fontFamily:"Helvetica-Bold"}],children:(0,n.A)(e.name)})}),(0,i.jsxs)(o.View,{style:{width:"84%",flexDirection:"row"},children:[(0,i.jsxs)(o.View,{style:{width:"66%",flexDirection:"row"},children:[(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(v=null===(t=e["Class Test"])||void 0===t?void 0:t.obtain)&&void 0!==v?v:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(f=null===(s=e["Class Test"])||void 0===s?void 0:s.maxMarks)&&void 0!==f?f:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(V=null!==(T=null!==(p=null===(r=e["Unit Test"])||void 0===r?void 0:r.obtain)&&void 0!==p?p:null===(d=e["Unit Test 1"])||void 0===d?void 0:d.obtain)&&void 0!==T?T:null===(a=e["Unit Test 2"])||void 0===a?void 0:a.obtain)&&void 0!==V?V:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(R=null!==(S=null!==(C=null===(c=e["Unit Test"])||void 0===c?void 0:c.maxMarks)&&void 0!==C?C:null===(x=e["Unit Test 1"])||void 0===x?void 0:x.maxMarks)&&void 0!==S?S:null===(h=e["Unit Test 2"])||void 0===h?void 0:h.maxMarks)&&void 0!==R?R:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(A=null===(y=e.Project)||void 0===y?void 0:y.obtain)&&void 0!==A?A:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(I=null===(j=e.Project)||void 0===j?void 0:j.maxMarks)&&void 0!==I?I:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(k=null===(w=e.Practical)||void 0===w?void 0:w.obtain)&&void 0!==k?k:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(N=null===(u=e.Practical)||void 0===u?void 0:u.maxMarks)&&void 0!==N?N:""})})]}),(0,i.jsxs)(o.View,{style:{width:"50%",flexDirection:"row"},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",width:"100%"},children:[(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(F=null===(m=e.Theory)||void 0===m?void 0:m.obtain)&&void 0!==F?F:""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(H=null===(g=e.Theory)||void 0===g?void 0:g.maxMarks)&&void 0!==H?H:""})})]}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:null!==(D=e.total)&&void 0!==D?D:""})})]})]})]},l)})]}),(0,i.jsx)(o.View,{style:{backgroundColor:"#d2b48c",height:5,borderBottom:1}}),(0,i.jsxs)(o.View,{style:{marginTop:10,justifyContent:"space-between",flexDirection:"row",fontSize:10},children:[(0,i.jsxs)(o.View,{children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderBottom:0,width:200,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Marks Obtained"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==eS?void 0:eS.totalObtainedMarks)||ey.obtain})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:200,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Max Marks"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==eS?void 0:eS.totalMarks)||ey.total})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:200,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Percentage"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsxs)(o.Text,{style:b.tableCell,children:[(null==eS?void 0:null===(c=eS.totalPercentage)||void 0===c?void 0:c.toFixed(2))||(null==ey?void 0:null===(x=ey.percentage)||void 0===x?void 0:x.toFixed(2))," ","%"]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Rank"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==eS?void 0:eS.rank)||(null==ex?void 0:null===(y=ex.termResults)||void 0===y?void 0:null===(h=y.find(e=>9==e.termId))||void 0===h?void 0:h.rank)||"Failed"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"S.U.P.W. "})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsxs)(o.Text,{style:b.tableCell,children:[" ",g((null==ex?void 0:null===(u=ex.termResults)||void 0===u?void 0:null===(w=u.find(e=>9==e.termId))||void 0===w?void 0:null===(j=w.termResult)||void 0===j?void 0:j.supwMarks)*100)||""]})})]}),ek.map((e,l)=>(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:e.name})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:g(null==e?void 0:e.total)})})]},l))]}),(0,i.jsxs)(o.View,{style:{paddingRight:5},children:[(0,i.jsxs)(o.View,{style:b.page2table,children:[(0,i.jsx)(o.View,{style:b.row,children:(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablesingleCellHeader,{fontFamily:"Helvetica-Bold",fontSize:9,textAlign:"center"}],children:(0,i.jsx)(o.Text,{children:"CLASS TEACHER'S EVALUATION"})})}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,fontFamily:"Helvetica-Bold"}],children:(0,i.jsx)(o.Text,{children:"Characteristic"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7,fontFamily:"Helvetica-Bold"}],children:(0,i.jsx)(o.Text,{children:"Observation"})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Initiative And Perseverance"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eR?void 0:eR.initiativeAndPerseverance})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Participation In Group Activity"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eR?void 0:eR.participationInGroupActivity})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Sense Of Responsibility"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eR?void 0:eR.senseOfResponsibility})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Work Habits"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eR?void 0:eR.workHabits})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Conduct"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eR?void 0:eR.conduct})})]}),(null==eR?void 0:eR.anyAdditionalComment)&&(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Additional Comment"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:eR.anyAdditionalComment})})]})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:"300",marginTop:10},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Number of Days Present"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==eR?void 0:eR.daysPresent)||""})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,width:"300"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Total Number of Working Days"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"100"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,width:"300",borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Height"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null===(p=ex.termResults)||void 0===p?void 0:null===(f=p.find(e=>9==e.termId))||void 0===f?void 0:null===(v=f.termResult)||void 0===v?void 0:v.height)?"".concat(null===(C=ex.termResults)||void 0===C?void 0:null===(V=C.find(e=>9==e.termId))||void 0===V?void 0:null===(T=V.termResult)||void 0===T?void 0:T.height," CM"):""})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,width:"300"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Weight"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null===(A=ex.termResults)||void 0===A?void 0:null===(R=A.find(e=>9==e.termId))||void 0===R?void 0:null===(S=R.termResult)||void 0===S?void 0:S.weight)?"".concat(null===(N=ex.termResults)||void 0===N?void 0:null===(k=N.find(e=>9==e.termId))||void 0===k?void 0:null===(I=k.termResult)||void 0===I?void 0:I.weight," KG"):""})})]})]})]}),(0,i.jsxs)(o.View,{style:{alignContent:"center",textAlign:"center",alignItems:"center",marginBottom:5},children:[(0,i.jsx)(o.Text,{style:[{marginTop:10,marginBottom:5,fontSize:10}],children:"EQUIVALENCE"}),(0,i.jsxs)(o.View,{style:m.table2,children:[(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"GRADE"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"STANDARD"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"PERCENTAGE"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"A"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"Very Good"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"90-100"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"B"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"Go
1od"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"80-89"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"C"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"Fair"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"70-79"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"D"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"Satisfactory"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"60-69"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"E"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"Needs Improvement"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"40-59"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell,{fontSize:8}],children:"F"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell2,{fontSize:8}],children:"Does not meet criteria"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:[m.table2cell3,{fontSize:8}],children:"0-39"})})]})]})]}),(0,i.jsx)(o.View,{style:{borderTop:1,marginTop:5},children:(0,i.jsx)(o.Text,{style:{textAlign:"center",fontSize:12},children:"M - Marks Obtained, MM - Maximum Marks"})})]})}),(0,i.jsx)(o.Page,{size:"A4",style:b.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:b.header,children:(0,i.jsx)(o.Text,{style:b.headerText,children:"Annual Progress Report ".concat(ej.year," - ").concat((ej.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(ex.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",ex.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(eu)," - ",eb]})})]}),(0,i.jsxs)(o.View,{style:b.table,children:[(0,i.jsx)(o.View,{style:b.tableRow,children:(0,i.jsx)(o.View,{style:[b.tableColHeader,{width:"100%",borderLeft:0,borderBottom:0,backgroundColor:"#d2b48c"}],children:(0,i.jsx)(o.Text,{style:b.tableCellHeader,children:"MARK SHEET"})})}),(0,i.jsxs)(o.View,{style:b.tableRow,children:[(0,i.jsx)(o.View,{style:[b.tableColHeader,{borderLeft:0}],children:(0,i.jsx)(o.Text,{style:b.tableCellHeader,children:"SUBJECTS"})}),(0,i.jsx)(o.View,{style:[b.tableColHeader,{width:"84%",borderLeft:0}],children:(0,i.jsxs)(o.View,{style:{width:"100%",flexDirection:"row"},children:[eC.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*eC.length/(2*eC.length+2)*100,"%"),borderRight:1,borderColor:"#000",flexDirection:"row"},children:eC.map((e,l)=>(0,i.jsxs)(o.View,{style:{width:"".concat(100/eC.length,"%"),fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:l>0?1:0,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:0==l?"Half Yearly (A)":"Final (B)"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]},l))}),(0,i.jsxs)(o.View,{style:{width:"".concat(2/(2*eC.length+2)*100,"%"),fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"TOTAL 100"}),(0,i.jsx)(o.View,{style:{borderTop:1},children:(0,i.jsx)(o.Text,{style:{padding:2},children:"A (40%) + B (60%)"})})]})]})})]}),eT.map((e,l)=>(0,i.jsxs)(o.View,{style:b.tableRow,children:[(0,i.jsx)(o.View,{style:b.tableCol,children:(0,i.jsx)(o.Text,{style:[b.tableCell,{textAlign:"left"},e.group&&{fontFamily:"Helvetica-Bold"}],children:(0,n.A)(e.name)})}),(0,i.jsxs)(o.View,{style:{width:"84%",flexDirection:"row"},children:[eC.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*eC.length/(2*eC.length+2)*100,"%"),flexDirection:"row"},children:eC.map((l,t)=>{var s,d;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"".concat(50/eC.length,"%")}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null===(s=e[l])||void 0===s?void 0:s.obtain)||""})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"".concat(50/eC.length,"%")}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null===(d=e[l])||void 0===d?void 0:d.maxMarks)||""})})]},t)})}),(0,i.jsx)(o.View,{style:[b.tableGradeCol,{width:"".concat(2/(2*eC.length+2)*100,"%")}],children:(0,i.jsx)(o.Text,{style:b.tableCell,children:e.total||""})})]})]},l))]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),eV&&eV.map((e,l)=>{var t,s,r,d;return(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[b.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==e?void 0:null===(t=e["Half Yearly Term"])||void 0===t?void 0:t.obtain)?g(null==e?void 0:null===(s=e["Half Yearly Term"])||void 0===s?void 0:s.obtain):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==e?void 0:null===(r=e.Final)||void 0===r?void 0:r.obtain)?g(null==e?void 0:null===(d=e.Final)||void 0===d?void 0:d.obtain):""})}),(0,i.jsx)(o.View,{style:{width:"25%"}})]},l)}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[b.tableCell,{textAlign:"left"}],children:"S.U.P.W."})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(D=ex.termResults)||void 0===D?void 0:null===(H=D.find(e=>6==e.termId))||void 0===H?void 0:null===(F=H.termResult)||void 0===F?void 0:F.supwMarks)?g((null==ex?void 0:null===(B=ex.termResults)||void 0===B?void 0:null===(M=B.find(e=>6==e.termId))||void 0===M?void 0:null===(z=M.termResult)||void 0===z?void 0:z.supwMarks)*100):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(E=ex.termResults)||void 0===E?void 0:null===(P=E.find(e=>9==e.termId))||void 0===P?void 0:null===(L=P.termResult)||void 0===L?void 0:L.supwMarks)?g((null==ex?void 0:null===(O=ex.termResults)||void 0===O?void 0:null===(W=O.find(e=>9==e.termId))||void 0===W?void 0:null===(G=W.termResult)||void 0===G?void 0:G.supwMarks)*100):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCellHeader,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderBottom:0,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Marks Obtained"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(U=ex.termResults)||void 0===U?void 0:null===(_=U.find(e=>6==e.termId))||void 0===_?void 0:_.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(J=ex.termResults)||void 0===J?void 0:null===(Y=J.find(e=>9==e.termId))||void 0===Y?void 0:Y.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:ey.obtain})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Max Marks"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===($=ex.termResults)||void 0===$?void 0:null===(K=$.find(e=>6==e.termId))||void 0===K?void 0:K.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(q=ex.termResults)||void 0===q?void 0:null===(Z=q.find(e=>9==e.termId))||void 0===Z?void 0:Z.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:ey.total})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Percentage"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:b.tableCell,children:[(()=>{var e,l;let t=null==ex?void 0:null===(l=ex.termResults)||void 0===l?void 0:null===(e=l.find(e=>6==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:b.tableCell,children:[(()=>{var e,l;let t=null==ex?void 0:null===(l=ex.termResults)||void 0===l?void 0:null===(e=l.find(e=>9==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsxs)(o.Text,{style:b.tableCell,children:[(null==ey?void 0:ey.percentage)!==void 0&&(null==ey?void 0:ey.percentage)!==null&&(null==ey?void 0:ey.percentage)!==""?ey.percentage.toFixed(2)+" %":""," "]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Rank"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(X=ex.termResults)||void 0===X?void 0:null===(Q=X.find(e=>6==e.termId))||void 0===Q?void 0:Q.rank)||"Failed"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(el=ex.termResults)||void 0===el?void 0:null===(ee=el.find(e=>9==e.termId))||void 0===ee?void 0:ee.rank)||"Failed"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:ey.rank||"Failed"})})]})]}),(0,i.jsx)(o.View,{style:{borderTop:1,marginTop:5},children:(0,i.jsx)(o.Text,{style:{textAlign:"center",fontSize:12},children:"M - Marks Obtained, MM - Maximum Marks"})})]})}),(0,i.jsx)(o.Page,{size:"A4",style:b.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:b.header,children:(0,i.jsx)(o.Text,{style:b.headerText,children:"Annual Progress Report ".concat(ej.year," - ").concat((ej.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(ex.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",ex.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(eu)," - ",eb]})})]}),(0,i.jsxs)(o.View,{style:{borderLeft:0},children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Activities & Achievements"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Activity"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"M"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IH"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IC"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IS"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"S"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"N"})})]}),(null==ex?void 0:null===(es=ex.termResults)||void 0===es?void 0:null===(ei=es.find(e=>9===e.termId))||void 0===ei?void 0:null===(et=ei.termResult)||void 0===et?void 0:et.activityList)?Object.entries(ex.termResults.find(e=>9===e.termId).termResult.activityList).filter((e,l)=>{let[t,i]=e;return""!=i}).map((e,l)=>{var t,s;let[r,d]=e;null===(s=ex.termResults.find(e=>9===e.termId))||void 0===s||null===(t=s.activityHousePosition)||void 0===t||t[r],console.log("Values",d);let a=Array.isArray(d)?d.map(e=>e.trim().toLowerCase()):[d.trim().toLowerCase()];console.log("Normalized values",a);let c=a.some(e=>"member"===e),x=a.some(e=>"interhouse"===e||"interHouse"==e),h=a.some(e=>"interschool"===e||"interSchool"==e),y=a.some(e=>"interclass"===e||"interClass"==e),j=a.some(e
1=>"national"===e),w=a.some(e=>"state"===e);return(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(0,n.A)(r)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:c?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:x?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:y?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:h?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:w?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:j?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})})]},l)}):(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center"},children:"No activities"})})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:10,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Attendance"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Number of Days Present"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(en=ex.termResults)||void 0===en?void 0:null===(ed=en.find(e=>6==e.termId).termResult)||void 0===ed?void 0:null===(er=ed.remarks)||void 0===er?void 0:er.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(null==ex?void 0:null===(ec=ex.termResults)||void 0===ec?void 0:null===(ea=ec.find(e=>9==e.termId).termResult)||void 0===ea?void 0:null===(eo=ea.remarks)||void 0===eo?void 0:eo.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:(()=>{var e,l,t,i,s,r;let d=(null==ex?void 0:null===(t=ex.termResults)||void 0===t?void 0:null===(l=t.find(e=>6==e.termId).termResult)||void 0===l?void 0:null===(e=l.remarks)||void 0===e?void 0:e.daysPresent)||0,n=(null==ex?void 0:null===(r=ex.termResults)||void 0===r?void 0:null===(s=r.find(e=>9==e.termId).termResult)||void 0===s?void 0:null===(i=s.remarks)||void 0===i?void 0:i.daysPresent)||0,o=Number(d)+Number(n);return o>0?o.toString():""})()})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"Total Number of Working Days"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"99"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:"100"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:b.tableCell,children:199})})]}),(0,i.jsxs)(o.View,{style:{},children:[" ",(0,i.jsxs)(o.View,{style:[b.page2table,{width:"100%"}],children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Class Teacher's Evaluation"})})}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Characteristic"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Observation"})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Initiative And Perseverance"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==em?void 0:em.initiativeAndPerseverance})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Participation In Group Activity"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==em?void 0:em.participationInGroupActivity})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Sense Of Responsibility"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==em?void 0:em.senseOfResponsibility})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Work Habits"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==em?void 0:em.workHabits})})]}),(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Conduct"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==em?void 0:em.conduct})})]}),(null==em?void 0:em.anyAdditionalComment)&&(0,i.jsxs)(o.View,{style:b.row,children:[(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Additional Comment"})}),(0,i.jsx)(o.View,{style:[b.page2tablecell,b.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==em?void 0:em.anyAdditionalComment})})]})]})]})]}),(0,i.jsx)(o.View,{style:[b.page2table,{width:"100%"}],children:(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{width:"50%",borderRight:1},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Promotion"})}),(0,i.jsx)(o.View,{style:{width:"50%"},children:(0,i.jsx)(o.Text,{style:{...b.tableCell,textAlign:"center",whiteSpace:"nowrap"},children:(()=>
1{if([22035,22664,22691,22074,23774,22243].includes(null==ex?void 0:ex.personalNo))return"";if(null==ey?void 0:ey.rank){var e,l,t;let i=((null==ex?void 0:null===(t=ex.bill[0])||void 0===t?void 0:null===(l=t.classSections)||void 0===l?void 0:null===(e=l.studentClass)||void 0===e?void 0:e.className)||"").match(/(\d+)/);if(i&&i[1]){let e=parseInt(i[1],10);return"Promoted to Class ".concat(e+1)}return"Promoted to class"}return""})()})})]})}),(0,i.jsxs)(o.View,{style:{margin:5,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1}}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1,textAlign:"center",alignItems:"center",justifyContent:"center",marginTop:5},children:(0,i.jsx)(o.Image,{src:"/class1to5HODNew.jpg",style:{width:100,height:80}})}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1,alignItems:"center",justifyContent:"center",marginTop:5},children:(0,i.jsx)(o.Image,{src:"/Signature.png",style:{width:100,height:80}})})]}),(0,i.jsxs)(o.View,{style:{margin:5,marginBottom:20,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:"CLASS TEACHER"}),(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:[" ","HEAD OF DEPARTMENT"]}),(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1},children:"PRINCIPAL"})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:b.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center"},children:[(0,i.jsx)(o.Text,{style:[{marginTop:40,fontSize:16}],children:"ACTIVITY"}),(0,i.jsxs)(o.View,{style:[m.table2,{marginTop:20}],children:[(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:{...m.table2cell2,fontFamily:"Helvetica-Bold"},children:"ABBREVIATION"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:{...m.table2cell2,fontFamily:"Helvetica-Bold"},children:"DESCRIPTION"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"IC"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"Inter Class"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"IH"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"Inter House"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"IS"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"Inter School"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"S"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"State"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"N"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"National"})})]}),(0,i.jsxs)(o.View,{style:m.row2,children:[(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"M"})}),(0,i.jsx)(o.View,{style:m.col2,children:(0,i.jsx)(o.Text,{style:m.table2cell2,children:"Member"})})]})]})]})})]})},f=o.StyleSheet.create({page:{flexDirection:"column",backgroundColor:"#ffffff",fontFamily:"Helvetica"},header:{backgroundColor:"#d2b48c",padding:3,paddingLeft:10,flexDirection:"row",alignItems:"center",fontFamily:"Helvetica-Bold",borderBottom:1,borderTop:1,borderColor:"#000"},headerText:{fontSize:14,fontWeight:900,width:"100%",textAlign:"center",textTransform:"uppercase"},title:{fontSize:13,marginBottom:10,textAlign:"center",fontWeight:900},table:{display:"table",width:"auto",paddingBottom:0},tableRow:{margin:"auto",flexDirection:"row",width:"100%"},tableColHeader:{width:"30%",borderStyle:"solid",borderWidth:1,fontSize:12,display:"flex",justifyContent:"center",alignItems:"center"},tableCol:{width:"30%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol:{width:"14%",borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableGradeCol2:{flex:1,borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0},tableCellHeader:{margin:5,fontSize:10,fontWeight:"bold",fontFamily:"Helvetica-Bold"},tableCell:{margin:5,fontSize:8,textAlign:"center"},overallRow:{flexDirection:"row",justifyContent:"flex-end",marginTop:10},overallText:{fontSize:12,fontWeight:"bold"},footer:{position:"absolute",bottom:30,left:0,right:0,textAlign:"center",fontSize:10},nameField:{width:"100%",fontSize:10,fontFamily:"Helvetica-Bold",flexDirection:"row",justifyContent:"space-between",padding:2},page2tablecell:{borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0,height:16,justifyContent:"center",alignItems:"center"},page2tablesingleCellHeader:{width:"100%"},page2tableleftCell:{width:140},row:{flexDirection:"row"},page2tablerightCell:{flexGrow:1},page2table:{width:"300",borderStyle:"solid",borderWidth:1,borderRightWidth:0,borderBottomWidth:0},page2tablerow:{margin:"auto",flexDirection:"row"}}),p={page:{paddingLeft:"20px",paddingRight:"20px"},table:{textSize:20,marginTop:18,height:200,display:"table",width:"auto"},row:{flexDirection:"row"},col:{flexGrow:1,borderStyle:"solid",borderWidth:1},cell:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,textAlign:"left",width:180},cell2:{margin:"auto",marginTop:5,fontSize:16,paddingLeft:5,width:250},table2:{textSize:20,marginTop:-1,display:"table",width:"auto",borderStyle:"solid",borderColor:"#000",borderWidth:1},row2:{flexDirection:"row"},col2:{flexGrow:1,borderStyle:"solid",borderWidth:1},table2cell:{margin:"auto",marginTop:5,fontSize:12,width:90},table2cell2:{margin:"auto",marginTop:5,fontSize:12,width:205},table2cell3:{margin:"auto",marginTop:5,fontSize:12,width:130}},T=e=>e>=90?"A":e>=80?"B":e>=70?"C":e>=60?"D":e>=40?"E":"F",V=e=>{var l,t,s,d,a,c,x,h,y,j,w,u,b,m,g,v,V,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W,O,_,U,Y,J,K,$,Z,q,Q,X,ee,el,et,ei,es,er,ed,en,eo,ea,ec,ex,eh,ey,ej;let{student:ew,subjectData:eu,grade:eb,term:em,term9SubjectData:eg=[]}=e;console.log("Student",ew),console.log("Subject Dtaa",eu);let ev=ew.bill[0].classSections.studentClass.className,ef=ew.bill[0].classSections.section.section,ep=null==ew?void 0:null===(s=ew.termResults)||void 0===s?void 0:null===(t=s.find(e=>9==e.termId))||void 0===t?void 0:null===(l=t.termResult)||void 0===l?void 0:l.remarks,eT=eu.find(e=>"G.K."===e.name);T(null==eT?void 0:eT.total),console.log({grade:eb,subjectData:eu,term9SubjectData:eg,student:ew},"subjectDatdsafdsa");let eV=eu.filter(e=>(null==e?void 0:e.name)!=="G.K."),eC=[...eV.filter(e=>!e.isGraded)].sort((e,l)=>{let t=["English","Hindi","Science","Physics","Chemistry","Biology"],i=e.name.toLowerCase(),s=l.name.toLowerCase(),r=t.findIndex(e=>i.includes(e.toLowerCase())),d=t.findIndex(e=>s.includes(e.toLowerCase()));return -1!==r&&-1!==d?r-d:-1!==r?-1:-1!==d?1:0}),eS=eV.filter(e=>
1"class9"===ev||"class11"===ev?e.isGraded:e.isGraded&&113!==e.subjectId),eR=["Half Yearly Term","Final"];eV[0],console.log(eb,"grade"),console.log(eV,"subjects");let eA=eg||[],eI="class9"===ev||"class10"===ev||"class11"===ev||"class12"===ev,ek=eI?null:eA.find(e=>"Robotics"===e.name),eN=eI?eA.filter(e=>(null==e?void 0:e.name)!=="G.K."):eA.filter(e=>(null==e?void 0:e.name)!=="G.K."&&(null==e?void 0:e.name)!=="Art"&&(null==e?void 0:e.name)!=="Robotics"),eF=eN.filter(e=>e.group),eH=[],eD=eF.map(e=>{let l=e.subjectIds.map(e=>eN.filter(l=>l.subjectId===e&&!eH.includes(e)));return eH=[...eH,...e.subjectIds],{...e,subjects:l.flat()}}),ez=eN.filter(e=>!eH.includes(e.subjectId)&&!e.group),eM=null==ew?void 0:null===(d=ew.termResults)||void 0===d?void 0:d.find(e=>9==e.termId),eB=null==eM?void 0:null===(a=eM.termResult)||void 0===a?void 0:a.remarks,eL=e=>e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),eP=e=>{if(!e||0===e.length)return[];let l={interClass:"IC",interHouse:"IH",interSchool:"IS",state:"S",national:"N",member:"M"};return e.map(e=>l[e]).filter(e=>void 0!==e)},eE=null==eM?void 0:null===(c=eM.termResult)||void 0===c?void 0:c.activityList;eE&&Object.entries(eE).map(e=>{let[l,t]=e;return{name:eL(l),columns:eP(t)}});let eG=eI?null:eA.find(e=>"Art"===e.name),eW=eA.find(e=>"G.K."===e.name);return T(null==eW?void 0:eW.total),(0,i.jsxs)(o.Document,{children:[(0,i.jsx)(o.Page,{size:"A4",orientation:"portrait",style:p.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:400,height:50,marginTop:20}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:150,height:120}})}),(0,i.jsx)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:24,marginTop:18},children:"Annual Progress Report"}),(0,i.jsxs)(o.Text,{style:{fontFamily:"Helvetica-Bold",fontSize:18,marginTop:18},children:[" ","2025-26"]}),(0,i.jsxs)(o.View,{style:p.table,children:[(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"Pupil's Name"})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell2,children:(0,n.A)(ew.studentName)})})]}),(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"Class/Section"})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsxs)(o.Text,{style:p.cell2,children:[" ",(0,n.A)(ev)," - ",ef]})})]}),(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"Personal No."})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell2,children:ew.personalNo})})]}),(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"House"})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell2,children:(0,n.A)(ew.house)})})]}),(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"Date of Birth"})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell2,children:ew.studentDob?new Date(ew.studentDob.includes("-")?ew.studentDob:ew.studentDob.replace(/(\d{2})\/(\d{2})\/(\d{2})/,"20$3-$2-$1")).toLocaleDateString("en-GB"):""})})]}),(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"Father's Name"})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell2,children:(0,n.A)(ew.fatherName)})})]}),(0,i.jsxs)(o.View,{style:p.row,children:[(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell,children:"Mother's Name"})}),(0,i.jsx)(o.View,{style:p.col,children:(0,i.jsx)(o.Text,{style:p.cell2,children:(0,n.A)(ew.motherName)})})]})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:f.page,children:(0,i.jsxs)(o.View,{style:{borderWidth:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:f.header,children:(0,i.jsxs)(o.Text,{style:f.headerText,children:[" ","Final Examination ".concat(em.year," - ").concat((em.year+1).toString().slice(2))," "]})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(ew.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",ew.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(ev)," - ",ef]})})]}),(0,i.jsxs)(o.View,{style:f.table,children:[(0,i.jsx)(o.View,{style:f.tableRow,children:(0,i.jsx)(o.View,{style:[f.tableColHeader,{width:"100%",borderLeft:0,borderBottom:0,backgroundColor:"#d2b48c"}],children:(0,i.jsx)(o.Text,{style:f.tableCellHeader,children:"MARK SHEET"})})}),(0,i.jsxs)(o.View,{style:f.tableRow,children:[(0,i.jsx)(o.View,{style:[f.tableColHeader,{borderLeft:0}],children:(0,i.jsx)(o.Text,{style:f.tableCellHeader,children:"SUBJECTS"})}),(0,i.jsx)(o.View,{style:[f.tableColHeader,{width:"84%",borderLeft:0}],children:(0,i.jsxs)(o.View,{style:{width:"100%",flexDirection:"row"},children:[(0,i.jsx)(o.View,{style:{width:"66%",borderRight:1,borderColor:"#000"},children:(0,i.jsxs)(o.View,{style:{borderColor:"#000",flexDirection:"row",justifyContent:"space-between",alignContent:"center"},children:[(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"CLASS TEST"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:1,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"UNIT TEST"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:1,fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"PROJECT"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:1,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"PRACTICAL"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]})]})}),(0,i.jsxs)(o.View,{style:{width:"50%",flexDirection:"row",justifyContent:"center",alignContent:"center"},children:[(0,i.jsxs)(o.View,{style:{width:"100%",fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"THEORY MARKS"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]}),(0,i.jsx)(o.View,{style:{borderLeft:1,borderColor:"#000",width:"100%",fontSize:7,padding:2,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:(0,i.jsx)(o.Text,{children:"TOTAL 100"})})]})]})})]}),eD.map((e,l)=>{var t,s,r,d,a,c,x,h,y,j,w,u,b,m,g,v,p,T,V,C,S,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W,O,_,U,Y,J,K,$,Z;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.View,{style:f.tableRow,children:[(0,i.jsx)(o.View,{style:f.tableCol,children:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left",fontFamily:"Helvetica-Bold"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{width:"84%",flexDirection:"row"},children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.View,{style:{width:"66%",flexDirection:"row"},children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(I=null!==(A=null===(t=e["Class Test"])||void 0===t?void 0:t.obtain)&&void 0!==A?A:null===(s=e["CLASS TEST"])||void 0===s?void 0:s.obtain)&&void 0!==I?I:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(N=null!==(k=null===(r=e["Class Test"])||void 0===r?void 0:r.maxMarks)&&void 0!==k?k:null===(d=e["CLASS TEST"])||void 0===d?void 0:d.maxMarks)&&void 0!==N?N:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(H=null!==(F=null===(a=e["Unit Test"])||void 0===a?void 0:a.obtain)&&void 0!==F?F:null===(c=e["UNIT TEST"])||void 0===c?void 0:c.obtain)&&void 0!==H?H:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(z=null!==(D=null===(x=e["Unit Test"])||void 0===x?void 0:x.maxMarks)&&void 0!==D?D:null===(h=e["UNIT TEST"])||void 0===h?void 0:h.maxMarks)&&void 0!==z?z:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(L=null!==(B=null!==(M=null===(y=e.Project)||void 0===y?void 0:y.obtain)&&void 0!==M?M:null===(j=e.PROJECT)||void 0===j?void 0:j.obtain)&&void 0!==B?B:null===(w=e["PROJECT/LAB MANUAL/PRACTICAL"])||void 0===w?void 0:w.obtain)&&void 0!==L?L:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(G=null!==(E=null!==(P=null===(u=e.Project)||void 0===u?void 0:u.maxMarks)&&void 0!==P?P:null===(b=e.PROJECT)||void 0===b?void 0:b.maxMarks)&&void 0!==E?E:null===(m=e["PROJECT/LAB MANUAL/PRACTICAL"])||void 0===m?void 0:m.maxMarks)&&void 0!==G?G:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(O=null!==(W=null===(g=e.Practical)||void 0===g?void 0:g.obtain)&&void 0!==W?W:null===(v=e.PRACTICAL)||void 0===v?void 0:v.obtain)&&void 0!==O?O:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(U=null!==(_=null===(p=e.Practical)||void 0===p?void 0:p.maxMarks)&&void 0!==_?_:null===(T=e.PRACTICAL)||void 0===T?void 0:T.maxMarks)&&void 0!==U?U:""})})]}),(0,i.jsxs)(o.View,{style:{width:"50%",flexDirection:"row"},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",width:"100%"},children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(J=null!==(Y=null===(V=e.Theory)||void 0===V?void 0:V.obtain)&&void 0!==Y?Y:null===(C=e.THEORY)||void 0===C?void 0:C.obtain)&&void 0!==J?J:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==($=null!==(K=null===(S=e.Theory)||void 0===S?void 0:S.maxMarks)&&void 0!==K?K:null===(R=e.THEORY)||void 0===R?void 0:R.maxMarks)&&void 0!==$?$:""})})]}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(Z=e.total)&&void 0!==Z?Z:""})})]})]})})]},l),e.subjects.map((e,l)=>{var t,s,r,d,a,c,x,h,y,j,w,u,b,m,g,v,p,T,V,C,S,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W,O,_,U,Y,J,K,$,Z;return(0,i.jsxs)(o.View,{style:f.tableRow,children:[(0,i.jsx)(o.View,{style:f.tableCol,children:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{width:"84%",flexDirection:"row"},children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.View,{style:{width:"66%",flexDirection:"row"},children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(I=null!==(A=null===(t=e["Class Test"])||void 0===t?void 0:t.obtain)&&void 0!==A?A:null===(s=e["CLASS TEST"])||void 0===s?void 0:s.obtain)&&void 0!==I?I:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(N=null!==(k=null===(r=e["Class Test"])||void 0===r?void 0:r.maxMarks)&&void 0!==k?k:null===(d=e["CLASS TEST"])||void 0===d?void 0:d.maxMarks)&&void 0!==N?N:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(H=null!==(F=null===(a=e["Unit Test"])||void 0===a?void 0:a.obtain)&&void 0!==F?F:null===(c=e["UNIT TEST"])||void 0===c?void 0:c.obtain)&&void 0!==H?H:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(z=null!==(D=null===(x=e["Unit Test"])||void 0===x?void 0:x.maxMarks)&&void 0!==D?D:null===(h=e["UNIT TEST"])||void 0===h?void 0:h.maxMarks)&&void 0!==z?z:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(L=null!==(B=null!==(M=null===(y=e.Project)||void 0===y?void 0:y.obtain)&&void 0!==M?M:null===(j=e.PROJECT)||void 0===j?void 0:j.obtain)&&void 0!==B?B:null===(w=e["PROJECT/LAB MANUAL/PRACTICAL"])||void 0===w?void 0:w.obtain)&&void 0!==L?L:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(G=null!==(E=null!==(P=null===(u=e.Project)||void 0===u?void 0:u.maxMarks)&&void 0!==P?P:null===(b=e.PROJECT)||void 0===b?void 0:b.maxMarks)&&void 0!==E?E:null===(m=e["PROJECT/LAB MANUAL/PRACTICAL"])||void 0===m?void 0:m.maxMarks)&&void 0!==G?G:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(O=null!==(W=null===(g=e.Practical)||void 0===g?void 0:g.obtain)&&void 0!==W?W:null===(v=e.PRACTICAL)||void 0===v?void 0:v.obtain)&&void 0!==O?O:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(U=null!==(_=null===(p=e.Practical)||void 0===p?void 0:p.maxMarks)&&void 0!==_?_:null===(T=e.PRACTICAL)||void 0===T?void 0:T.maxMarks)&&void 0!==U?U:""})})]}),(0,i.jsxs)(o.View,{style:{width:"50%",flexDirection:"row"},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",width:"100%"},children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(J=null!==(Y=null===(V=e.Theory)||void 0===V?void 0:V.obtain)&&void 0!==Y?Y:null===(C=e.THEORY)||void 0===C?void 0:C.obtain)&&void 0!==J?J:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==($=null!==(K=null===(S=e.Theory)||void 0===S?void 0:S.maxMarks)&&void 0!==K?K:null===(R=e.THEORY)||void 0===R?void 0:R.maxMarks)&&void 0!==$?$:""})})]}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(Z=e.total)&&void 0!==Z?Z:""})})]})]})})]},l)})]})}),ez.map((e,l)=>{var t,s,r,d,a,c,x,h,y,j,w,u,b,m,g,v,p,T,V,C,S,R,A,I,k,N,F,H,D,z,M,B,L,P,E,G,W,O,_,U,Y,J,K,$,Z;return(0,i.jsxs)(o.View,{style:f.tableRow,children:[(0,i.jsx)(o.View,{style:f.tableCol,children:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{width:"84%",flexDirection:"row"},children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.View,{style:{width:"66%",flexDirection:"row"},children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,chi
1ldren:null!==(I=null!==(A=null===(t=e["Class Test"])||void 0===t?void 0:t.obtain)&&void 0!==A?A:null===(s=e["CLASS TEST"])||void 0===s?void 0:s.obtain)&&void 0!==I?I:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(N=null!==(k=null===(r=e["Class Test"])||void 0===r?void 0:r.maxMarks)&&void 0!==k?k:null===(d=e["CLASS TEST"])||void 0===d?void 0:d.maxMarks)&&void 0!==N?N:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(H=null!==(F=null===(a=e["Unit Test"])||void 0===a?void 0:a.obtain)&&void 0!==F?F:null===(c=e["UNIT TEST"])||void 0===c?void 0:c.obtain)&&void 0!==H?H:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(z=null!==(D=null===(x=e["Unit Test"])||void 0===x?void 0:x.maxMarks)&&void 0!==D?D:null===(h=e["UNIT TEST"])||void 0===h?void 0:h.maxMarks)&&void 0!==z?z:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(L=null!==(B=null!==(M=null===(y=e.Project)||void 0===y?void 0:y.obtain)&&void 0!==M?M:null===(j=e.PROJECT)||void 0===j?void 0:j.obtain)&&void 0!==B?B:null===(w=e["PROJECT/LAB MANUAL/PRACTICAL"])||void 0===w?void 0:w.obtain)&&void 0!==L?L:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(G=null!==(E=null!==(P=null===(u=e.Project)||void 0===u?void 0:u.maxMarks)&&void 0!==P?P:null===(b=e.PROJECT)||void 0===b?void 0:b.maxMarks)&&void 0!==E?E:null===(m=e["PROJECT/LAB MANUAL/PRACTICAL"])||void 0===m?void 0:m.maxMarks)&&void 0!==G?G:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(O=null!==(W=null===(g=e.Practical)||void 0===g?void 0:g.obtain)&&void 0!==W?W:null===(v=e.PRACTICAL)||void 0===v?void 0:v.obtain)&&void 0!==O?O:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(U=null!==(_=null===(p=e.Practical)||void 0===p?void 0:p.maxMarks)&&void 0!==_?_:null===(T=e.PRACTICAL)||void 0===T?void 0:T.maxMarks)&&void 0!==U?U:""})})]}),(0,i.jsxs)(o.View,{style:{width:"50%",flexDirection:"row"},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",width:"100%"},children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(J=null!==(Y=null===(V=e.Theory)||void 0===V?void 0:V.obtain)&&void 0!==Y?Y:null===(C=e.THEORY)||void 0===C?void 0:C.obtain)&&void 0!==J?J:""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==($=null!==(K=null===(S=e.Theory)||void 0===S?void 0:S.maxMarks)&&void 0!==K?K:null===(R=e.THEORY)||void 0===R?void 0:R.maxMarks)&&void 0!==$?$:""})})]}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"100%"}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:null!==(Z=e.total)&&void 0!==Z?Z:""})})]})]})})]},l)})]}),(0,i.jsx)(o.View,{style:{backgroundColor:"#d2b48c",height:5,borderBottom:1}}),(0,i.jsxs)(o.View,{style:{marginTop:10,justifyContent:"space-between",flexDirection:"row",fontSize:10},children:[(0,i.jsxs)(o.View,{children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,borderBottom:0,width:200,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Marks Obtained"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==eM?void 0:eM.totalObtainedMarks)||eb.obtain})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Max Marks"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsxs)(o.Text,{style:f.tableCell,children:[" ",(null==eM?void 0:eM.totalMarks)||eb.total]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Percentage"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsxs)(o.Text,{style:f.tableCell,children:[(null==eM?void 0:null===(x=eM.totalPercentage)||void 0===x?void 0:x.toFixed(2))||(null==eb?void 0:null===(h=eb.percentage)||void 0===h?void 0:h.toFixed(2))," ","%"]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Rank"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==eM?void 0:eM.rank)||(null==ew?void 0:null===(j=ew.termResults)||void 0===j?void 0:null===(y=j.find(e=>9==e.termId))||void 0===y?void 0:y.rank)||"Failed"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"S.U.P.W. Grade"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:T(null==ew?void 0:null===(b=ew.termResults)||void 0===b?void 0:null===(u=b.find(e=>9==e.termId))||void 0===u?void 0:null===(w=u.termResult)||void 0===w?void 0:w.supwMarks)||""})})]}),("class6"===ev||"class7"===ev||"class8"===ev)&&(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Value Education Grade"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:T(null==ew?void 0:null===(v=ew.termResults)||void 0===v?void 0:null===(g=v.find(e=>9==e.termId))||void 0===g?void 0:null===(m=g.termResult)||void 0===m?void 0:m.valueEducationMarks)||""})})]}),eG&&(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Art"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:T(null==eG?void 0:eG.total)})})]}),ek&&(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:200,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Robotics"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:T(null==ek?void 0:ek.total)})})]})]}),(0,i.jsxs)(o.View,{style:{paddingRight:5},children:[" ",(0,i.jsxs)(o.View,{style:f.page2table,children:[(0,i.jsx)(o.View,{style:f.row,children:(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablesingleCellHeader,{fontFamily:"Helvetica-Bold",fontSize:9,textAlign:"center"}],children:(0,i.jsx)(o.Text,{children:"CLASS TEACHER'S EVALUATION"})})}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,fontFamily:"Helvetica-Bold"}],children:(0,i.jsx)(o.Text,{children:"Characteristic"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7,fontFamily:"Helvetica-Bold"}],children:(0,i.jsx)(o.Text,{children:"Observation"})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Initiative And Perseverance"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eB?void 0:eB.initiativeAndPerseverance})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Participation In Group Activity"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eB?void 0:eB.participationInGroupActivity})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Sense Of Responsibility"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eB?void 0:eB.senseOfResponsibility})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Work Habits"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eB?void 0:eB.workHabits})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:"Conduct"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==eB?void 0:eB.conduct})})]}),(null==eB?void 0:eB.anyAdditionalComment)&&(0,i.jsx)(o.View,{style:{borderStyle:"solid",borderWidth:1,borderLeftWidth:0,borderTopWidth:0,padding:2,height:"auto",minHeight:16},children:(0,i.jsxs)(o.Text,{style:{fontSize:7},children:[(0,i.jsxs)(o.Text,{style:{fontFamily:"Helvetica-Bold"},children:["Additional Comment:"," "]}),null==eB?void 0:eB.anyAdditionalComment]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,width:"300",marginTop:10},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Number of Days Present"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==eB?void 0:eB.daysPresent)||""})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderWidth:1,borderTop:0,width:"300"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Total Number of Working Days"})}),(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:C(ev)})})]})," "]})]}),(0,i.jsxs)(o.View,{style:{alignContent:"center",textAlign:"center",alignItems:"center",marginBottom:5},children:[(0,i.jsx)(o.Text,{style:[{marginTop:10,marginBottom:5,fontSize:10}],children:"EQUIVALENCE"}),(0,i.jsxs)(o.View,{style:p.table2,children:[(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"GRADE"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"STANDARD"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:"PERCENTAGE"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"A"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"Very Good"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:"90-100"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"B"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"Good"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:"80-89"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"C"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"Fair"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:"70-79"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"D"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"Satisfactory"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:"60-69"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"E"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"Needs Improvement"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsxs)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:[" ","40-59"]})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell,{fontSize:8}],children:"F"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell2,{fontSize:8}],children:"Does not meet criteria"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:[p.table2cell3,{fontSize:8}],children:"0-39"})})]})]})]}),(0,i.jsx)(o.View,{style:{borderTop:1,padding:2},children:(0,i.jsx)(o.Text,{style:{textAlign:"center",fontSize:12},children:"M - Marks Obtained, MM - Maximum Marks"})})]})}),(0,i.jsx)(o.Page,{size:"A4",style:f.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:f.header,children:(0,i.jsx)(o.Text,{style:f.headerText,children:"Annual Progress Report ".concat(em.year," - ").concat((em.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(ew.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",ew.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(ev)," - ",ef]})})]}),(0,i.jsxs)(o.View,{style:f.table,children:[(0,i.jsx)(o.View,{style:f.tableRow,children:(0,i.jsx)(o.View,{style:[f.tableColHeader,{width:"100%",borderLeft:0,borderBottom:0,backgroundColor:"#d2b48c"}],children:(0,i.jsx)(o.Text,{style:f.tableCellHeader,children:"MARK SHEET"})})}),(0,i.jsxs)(o.View,{style:f.tableRow,children:[(0,i.jsx)(o.View,{style:[f.tableColHeader,{borderLeft:0}],children:(0,i.jsx)(o.Text,{style:f.tableCellHeader,children:"SUBJECTS"})}),(0,i.jsx)(o.View,{style:[f.tableColHeader,{width:"84%",borderLeft:0}],children:(0,i.jsxs)(o.View,{style:{width:"100%",flexDirection:"row"},children:[eR.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*eR.length/(2*eR.length+2)*100,"%"),borderRight:1,borderColor:"#000",flexDirection:"row"},children:eR.map((e,l)=>(0,i.jsxs)(o.View,{style:{width:"".concat(100/eR.length,"%"),fontSize:7,textAlign:"center",justifyContent:"center",borderLeft:l>0?1:0,borderColor:"#000",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:0==l?"Half Yearly (A)":"Final (B)"}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",borderTop:1},children:[(0,i.jsx)(o.Text,{style:{width:"50%",borderRight:1,padding:2},children:"M"}),(0,i.jsx)(o.Text,{style:{width:"50%",padding:2},children:"MM"})]})]},l))}),(0,i.jsxs)(o.View,{style:{width:"".concat(2/(2*eR.length+2)*100,"%"),fontSize:7,textAlign:"center",justifyContent:"center",fontFamily:"Helvetica-Bold"},children:[(0,i.jsx)(o.Text,{style:{padding:2},children:"TOTAL 100"}),(0,i.jsx)(o.View,{style:{borderTop:1},children:(0,i.jsx)(o.Text,{style:{padding:2},children:"A (40%) + B (60%)"})})]})]})})]}),eC.map((e,l)=>(0,i.jsxs)(o.View,{style:f.tableRow,children:[(0,i.jsx)(o.View,{style:f.tableCol,c
1hildren:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left"},e.group&&{fontFamily:"Helvetica-Bold"}],children:(0,n.A)(e.name)})}),(0,i.jsxs)(o.View,{style:{width:"84%",flexDirection:"row"},children:[eR.length>0&&(0,i.jsx)(o.View,{style:{width:"".concat(2*eR.length/(2*eR.length+2)*100,"%"),flexDirection:"row"},children:eR.map((l,t)=>{var s,d;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"".concat(50/eR.length,"%")}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null===(s=e[l])||void 0===s?void 0:s.obtain)||""})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"".concat(50/eR.length,"%")}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null===(d=e[l])||void 0===d?void 0:d.maxMarks)||""})})]},t)})}),(0,i.jsx)(o.View,{style:[f.tableGradeCol,{width:"".concat(2/(2*eR.length+2)*100,"%")}],children:(0,i.jsx)(o.Text,{style:f.tableCell,children:e.total||""})})]})]},l))]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),eS&&(null==eS?void 0:eS.map((e,l)=>{var t,s,r,d;return(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left"}],children:(0,n.A)(e.name)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==e?void 0:null===(t=e["Half Yearly Term"])||void 0===t?void 0:t.obtain)?T(null==e?void 0:null===(s=e["Half Yearly Term"])||void 0===s?void 0:s.obtain):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==e?void 0:null===(r=e.Final)||void 0===r?void 0:r.obtain)?T(null==e?void 0:null===(d=e.Final)||void 0===d?void 0:d.obtain):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell})})]},l)})),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left"}],children:"S.U.P.W."})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(A=ew.termResults)||void 0===A?void 0:null===(R=A.find(e=>6==e.termId))||void 0===R?void 0:null===(V=R.termResult)||void 0===V?void 0:V.supwMarks)?T(null==ew?void 0:null===(N=ew.termResults)||void 0===N?void 0:null===(k=N.find(e=>6==e.termId))||void 0===k?void 0:null===(I=k.termResult)||void 0===I?void 0:I.supwMarks):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(D=ew.termResults)||void 0===D?void 0:null===(H=D.find(e=>9==e.termId))||void 0===H?void 0:null===(F=H.termResult)||void 0===F?void 0:F.supwMarks)?T(null==ew?void 0:null===(B=ew.termResults)||void 0===B?void 0:null===(M=B.find(e=>9==e.termId))||void 0===M?void 0:null===(z=M.termResult)||void 0===z?void 0:z.supwMarks):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell})})]}),!eI&&(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:[f.tableCell,{textAlign:"left"}],children:"Value Education"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(P=ew.termResults)||void 0===P?void 0:null===(L=P.find(e=>6==e.termId).termResult)||void 0===L?void 0:L.valueEducationMarks)?T(null==ew?void 0:null===(G=ew.termResults)||void 0===G?void 0:null===(E=G.find(e=>6==e.termId).termResult)||void 0===E?void 0:E.valueEducationMarks):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(_=ew.termResults)||void 0===_?void 0:null===(O=_.find(e=>9==e.termId))||void 0===O?void 0:null===(W=O.termResult)||void 0===W?void 0:W.valueEducationMarks)?T(null==ew?void 0:null===(J=ew.termResults)||void 0===J?void 0:null===(Y=J.find(e=>9==e.termId))||void 0===Y?void 0:null===(U=Y.termResult)||void 0===U?void 0:U.valueEducationMarks):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:4,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCellHeader,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderBottom:0,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Marks Obtained"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===($=ew.termResults)||void 0===$?void 0:null===(K=$.find(e=>6==e.termId))||void 0===K?void 0:K.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(q=ew.termResults)||void 0===q?void 0:null===(Z=q.find(e=>9==e.termId))||void 0===Z?void 0:Z.totalObtainedMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:eb.obtain})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Max Marks"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(X=ew.termResults)||void 0===X?void 0:null===(Q=X.find(e=>6==e.termId))||void 0===Q?void 0:Q.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(el=ew.termResults)||void 0===el?void 0:null===(ee=el.find(e=>9==e.termId))||void 0===ee?void 0:ee.totalMarks)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:eb.total})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Percentage"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:f.tableCell,children:[(()=>{var e,l;let t=null==ew?void 0:null===(l=ew.termResults)||void 0===l?void 0:null===(e=l.find(e=>6==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:f.tableCell,children:[(()=>{var e,l;let t=null==ew?void 0:null===(l=ew.termResults)||void 0===l?void 0:null===(e=l.find(e=>9==e.termId))||void 0===e?void 0:e.totalPercentage;return null!=t&&""!==t?t.toFixed(2)+" %":""})()," "]})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsxs)(o.Text,{style:f.tableCell,children:[(null==eb?void 0:eb.percentage)!==void 0&&(null==eb?void 0:eb.percentage)!==null&&(null==eb?void 0:eb.percentage)!==""?eb.percentage.toFixed(2)+" %":""," "]})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Rank"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(ei=ew.termResults)||void 0===ei?void 0:null===(et=ei.find(e=>6==e.termId))||void 0===et?void 0:et.rank)||"Failed"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(er=ew.termResults)||void 0===er?void 0:null===(es=er.find(e=>9==e.termId))||void 0===es?void 0:es.rank)||"Failed"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:eb.rank||"Failed"})})]})]}),("class6"===ev||"class7"===ev||"class8"===ev)&&(0,i.jsxs)(o.View,{style:{borderTop:1,marginTop:5,padding:5,flexDirection:"row"},children:[(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Special Remark:"," "]}),(0,i.jsx)(o.View,{style:{flex:1,minHeight:50}})]}),(0,i.jsx)(o.View,{style:{borderTop:1,marginTop:5},children:(0,i.jsx)(o.Text,{style:{textAlign:"center",fontSize:12},children:"M - Marks Obtained, MM - Maximum Marks"})})]})}),(0,i.jsx)(o.Page,{size:"A4",style:f.page,children:(0,i.jsxs)(o.View,{style:{border:2,borderColor:"#000",margin:20},children:[(0,i.jsxs)(o.View,{style:{flexDirection:"row",gap:10,margin:2},children:[(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmcLogoTc.png",style:{width:70,height:50}})}),(0,i.jsx)(o.View,{children:(0,i.jsx)(o.Image,{src:"/logo/lmc_title.png",style:{width:430,height:50}})})]}),(0,i.jsx)(o.View,{style:f.header,children:(0,i.jsx)(o.Text,{style:f.headerText,children:"Annual Progress Report ".concat(em.year," - ").concat((em.year+1).toString().slice(2))})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",justifyContent:"space-between",padding:2,margin:5},children:[(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Name: ",(0,n.A)(ew.studentName)]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:["Personal No. : ",ew.personalNo]})}),(0,i.jsx)(o.View,{children:(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold"},children:[(0,n.A)(ev)," - ",ef]})})]}),(0,i.jsxs)(o.View,{style:{borderLeft:0},children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Activities & Achievements"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Activity"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"M"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IH"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IC"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"IS"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"S"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"N"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"House Position"})})]}),(null==ew?void 0:null===(eo=ew.termResults)||void 0===eo?void 0:null===(en=eo.find(e=>9===e.termId))||void 0===en?void 0:null===(ed=en.termResult)||void 0===ed?void 0:ed.activityList)?Object.entries(ew.termResults.find(e=>9===e.termId).termResult.activityList).filter((e,l)=>{let[t,i]=e;return""!=i}).map((e,l)=>{var t,s;let[r,d]=e;null===(s=ew.termResults.find(e=>9===e.termId))||void 0===s||null===(t=s.activityHousePosition)||void 0===t||t[r],console.log("Values",d);let a=Array.isArray(d)?d.map(e=>e.trim().toLowerCase()):[d.trim().toLowerCase()];console.log("Normalized values",a);let c=a.some(e=>"member"===e),x=a.some(e=>"interhouse"===e||"interHouse"==e),h=a.some(e=>"interschool"===e||"interSchool"==e),y=a.some(e=>"interclass"===e||"interClass"==e),j=a.some(e=>"national"===e),w=a.some(e=>"state"===e);return(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"30%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(0,n.A)(r)})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:c?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:x?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:y?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:h?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:w?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"15%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:j?(0,i.jsx)(o.Image,{src:"/logo/tickIconActivity.png",style:{width:5,height:5}}):""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:(()=>{var e,l,t;let i=null===(l=ew.termResults.find(e=>9===e.termId))||void 0===l?void 0:null===(e=l.activityHousePosition)||void 0===e?void 0:e[r],s=null===(t=ew.house)||void 0===t?void 0:t.toLowerCase();if(!i||!s)return"";let d=e=>null==e?void 0:e.split(",").map(e=>e.trim()).includes(s);return d(i.houseFirst)?"1st":d(i.houseSecond)?"2nd":d(i.houseThird)?"3rd":d(i.houseFourth)?"4th":""})()})})]},l)}):(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center"},children:"No activities"})})})]}),(0,i.jsxs)(o.View,{children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,marginBottom:0,marginTop:10,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Attendance"})})}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderLeft:0,borderTop:0,backgroundColor:"#d2b48c"},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"}})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},
1children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Half Yearly"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Final"})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold"},children:"Total"})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Number of Days Present"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(ex=ew.termResults)||void 0===ex?void 0:null===(ec=ex.find(e=>6==e.termId).termResult)||void 0===ec?void 0:null===(ea=ec.remarks)||void 0===ea?void 0:ea.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(null==ew?void 0:null===(ej=ew.termResults)||void 0===ej?void 0:null===(ey=ej.find(e=>9==e.termId).termResult)||void 0===ey?void 0:null===(eh=ey.remarks)||void 0===eh?void 0:eh.daysPresent)||""})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:(()=>{var e,l,t,i,s,r;let d=(null==ew?void 0:null===(t=ew.termResults)||void 0===t?void 0:null===(l=t.find(e=>6==e.termId).termResult)||void 0===l?void 0:null===(e=l.remarks)||void 0===e?void 0:e.daysPresent)||0,n=(null==ew?void 0:null===(r=ew.termResults)||void 0===r?void 0:null===(s=r.find(e=>9==e.termId).termResult)||void 0===s?void 0:null===(i=s.remarks)||void 0===i?void 0:i.daysPresent)||0,o=Number(d)+Number(n);return o>0?o.toString():""})()})})]}),(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,borderTop:0,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:"Total Number of Working Days"})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsxs)(o.Text,{style:f.tableCell,children:[" ",S(ev)]})}),(0,i.jsx)(o.View,{style:{borderRight:1,width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:C(ev)})}),(0,i.jsx)(o.View,{style:{width:"25%"},children:(0,i.jsx)(o.Text,{style:f.tableCell,children:C(ev)+S(ev)})})]}),(0,i.jsxs)(o.View,{style:{},children:[" ",!eI&&(0,i.jsxs)(o.View,{style:[f.page2table,{width:"100%"}],children:[(0,i.jsx)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0,backgroundColor:"#d2b48c"},children:(0,i.jsx)(o.View,{style:{width:"100%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Class Teacher's Evaluation"})})}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Characteristic"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7,fontFamily:"Helvetica-Bold",width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Observation"})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Initiative And Perseverance"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==ep?void 0:ep.initiativeAndPerseverance})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Participation In Group Activity"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==ep?void 0:ep.participationInGroupActivity})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Sense Of Responsibility"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==ep?void 0:ep.senseOfResponsibility})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Work Habits"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==ep?void 0:ep.workHabits})})]}),(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Conduct"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==ep?void 0:ep.conduct})})]}),(null==ep?void 0:ep.anyAdditionalComment)&&(0,i.jsxs)(o.View,{style:f.row,children:[(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tableleftCell,{fontSize:7,width:"50%"}],children:(0,i.jsx)(o.Text,{children:"Additional Comment"})}),(0,i.jsx)(o.View,{style:[f.page2tablecell,f.page2tablerightCell,{fontSize:7}],children:(0,i.jsx)(o.Text,{children:null==ep?void 0:ep.anyAdditionalComment})})]})]})]})]}),(0,i.jsx)(o.View,{style:[f.page2table,{width:"100%"}],children:(0,i.jsxs)(o.View,{style:{flexDirection:"row",border:1,marginTop:10,borderLeft:0},children:[(0,i.jsx)(o.View,{style:{width:"50%",borderRight:1},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,fontFamily:"Helvetica-Bold",textAlign:"center"},children:"Promotion"})}),(0,i.jsx)(o.View,{style:{width:"50%"},children:(0,i.jsx)(o.Text,{style:{...f.tableCell,textAlign:"center",whiteSpace:"nowrap"},children:(()=>
1{if(null==eb?void 0:eb.rank){var e,l,t;let i=((null==ew?void 0:null===(t=ew.bill[0])||void 0===t?void 0:null===(l=t.classSections)||void 0===l?void 0:null===(e=l.studentClass)||void 0===e?void 0:e.className)||"").match(/(\d+)/);if(i&&i[1]){let e=parseInt(i[1],10);return"Promoted to Class ".concat(e+1)}return"Promoted to class"}return""})()})})]})}),(0,i.jsxs)(o.View,{style:{margin:5,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1}}),!eI&&(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1,textAlign:"center",alignItems:"center",justifyContent:"center",marginTop:5},children:"class6"===ev||"class7"===ev||"class8"===ev?(0,i.jsx)(o.Image,{src:"/signature_class6to8_HOD.png",style:{width:100,height:80}}):(0,i.jsx)(o.Image,{src:"/signature_class9to12_HOD.png",style:{width:100,height:80}})}),(0,i.jsx)(o.View,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1,alignItems:"center",justifyContent:"center",marginTop:5},children:(0,i.jsx)(o.Image,{src:"/Signature.png",style:{width:100,height:80}})})]}),(0,i.jsxs)(o.View,{style:{margin:5,marginBottom:20,flexDirection:"row",justifyContent:"space-between"},children:[(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:"CLASS TEACHER"}),!eI&&(0,i.jsxs)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",flex:1},children:[" ","HEAD OF DEPARTMENT"]}),(0,i.jsx)(o.Text,{style:{fontSize:10,fontFamily:"Helvetica-Bold",textAlign:"center",flex:1},children:"PRINCIPAL"})]})]})}),(0,i.jsx)(o.Page,{size:"A4",style:f.page,children:(0,i.jsxs)(o.View,{style:{flex:1,alignContent:"center",textAlign:"center",alignItems:"center"},children:[(0,i.jsx)(o.Text,{style:[{marginTop:40,fontSize:16}],children:"ACTIVITY"}),(0,i.jsxs)(o.View,{style:[p.table2,{marginTop:20}],children:[(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:{...p.table2cell2,fontFamily:"Helvetica-Bold"},children:"ABBREVIATION"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:{...p.table2cell2,fontFamily:"Helvetica-Bold"},children:"DESCRIPTION"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"IC"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"Inter Class"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"IH"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"Inter House"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"IS"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"Inter School"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"S"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"State"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"N"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"National"})})]}),(0,i.jsxs)(o.View,{style:p.row2,children:[(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"M"})}),(0,i.jsx)(o.View,{style:p.col2,children:(0,i.jsx)(o.Text,{style:p.table2cell2,children:"Member"})})]})]})]})})]})},C=e=>"class6"===e||"class7"===e||"class8"===e?99:"class9"===e||"class11"===e?104:0,S=e=>"class6"===e||"class7"===e||"class8"===e?99:"class9"===e?100:"class11"===e?96:0;var R=t(70771),A=t(44513),I=t(92416),k=t(27937);t(63619);var N=t(4213),F=t(32364),H=t(51581),D=t(20154),z=t(99962),M=t(52394),B=t(31347),L=t(13368),P=t.n(L),E=t(86715),G=t(28133),W=t.n(G),O=t(84941),_=t(46005),U=t(64721),Y=t(92177);let J=()=>{let e=new Date;return 8>e.getMonth()?e.getFullYear()-1:e.getFullYear()};var K=!0;let $=e=>{let{classSectionOptions:l}
1=e,[t,a]=(0,r.useState)(""),[c,x]=(0,r.useState)([]),[y,j]=(0,r.useState)(!1),[w,b]=(0,r.useState)(!1),[m,g]=(0,r.useState)([]),[f,p]=(0,r.useState)(1),[T,C]=(0,r.useState)(1),[S,L]=(0,r.useState)(!1),[G,K]=(0,r.useState)(!1),[$,X]=(0,r.useState)(J().toString()),ee=2025==$?9:5,el=(0,r.useRef)(null);(0,E.useRouter)();let et=e=>fetch(e).then(e=>e.json()),ei=$?"/api/examination/admin/getClassSectionOptions?year=".concat($):null,{data:es,isLoading:er}=(0,Y.Ay)(ei,et,{revalidateOnFocus:!1}),ed=(null==es?void 0:es.data)||l,en="/api/examination/admin/superFolioResult/getCombineResult?classSectionsId=".concat(null==c?void 0:c.value,"&year=").concat($),{data:eo,error:ea,isLoading:ec}=(0,Y.Ay)(en,et,{revalidateOnFocus:!1});console.log("details---",eo);let{termWiseResult:ex,termsDetails:eh,subjectDetails:ey,removedSubjectIds:ej,termWiseStudents:ew,termWiseResultArray:eu}=eo||{};if((0,r.useEffect)(()=>{if((null==ew?void 0:ew.length)>0){var e;null===(e=el.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"})}},[ew]),ec)return(0,i.jsx)(d.A,{});if(ea)return(0,i.jsx)("div",{});let eb=(null==ew?void 0:ew.length)>0?null==ew?void 0:ew.filter(e=>e.studentName.toLowerCase().includes(t.toLowerCase())||e.personalNo.toString().toLowerCase().includes(t.toLowerCase())):[],em=eb.filter(e=>!1!==e.feeEligible),eg=eb.filter(e=>!1===e.feeEligible),ev=[],ef=[175,174,173,13,14,120,15,163,95,52,121,112,184,96,179];console.log("headers+++++++++++++++++",ev=[...ev,...(null==ey?void 0:ey.map(e=>{let l=!1;return(null==ef?void 0:ef.includes(e.subjectId))&&(l=!0),{subjectName:e.subjectName,subjectId:e.subjectId,isArt:l}}))||[]]);let ep=["Rank","Highest Marks","Total Marks","Total Marks Weightage","Percentage (%)"],eT=[];null==eu||eu.map(e=>{var l,t,i,s;let r=e.termId,d=e.termDetails.name,n=(null==e?void 0:null===(s=e.studentResult)||void 0===s?void 0:null===(i=s.map(e=>null==e?void 0:e.groupWiseSubjectMarksTotal))||void 0===i?void 0:null===(t=i.filter(e=>(null==e?void 0:e.length)>0))||void 0===t?void 0:null===(l=t.flat())||void 0===l?void 0:l.reduce((e,l)=>((null==e?void 0:e.find(e=>e.superFolioGroupId===l.superFolioGroupId))||(l.termId=r,l.termName=d,e.push(l)),e),[]))||[];eT.push(...n)}),console.log("subjectGroupHeaders---\x3e",eT);let eV=null==eT?void 0:eT.reduce((e,l)=>{let t=e.find(e=>e.subjectIds.length===l.subjectIds.length&&e.subjectIds.every(e=>l.subjectIds.includes(e)));if(t)t.superFolioSubjectGroups.push(l),t.termIds.push(l.termId),t.superFolioGroups.push({superFolioGroupId:l.superFolioGroupId,termId:l.termId,termName:l.termName});else{var i;e.push({subjects:null==l?void 0:null===(i=l.superFolioSubjectsDetails)||void 0===i?void 0:i.map(e=>({subjectId:e.superFolioSubject.subjectDetails.subjectId,subjectName:e.superFolioSubject.subjectDetails.subjectName})),subjectIds:l.subjectIds,groupName:l.superFolioGroup.name,termIds:[l.termId],superFolioGroups:[{superFolioGroupId:l.superFolioGroupId,termId:l.termId,termName:l.termName}],superFolioSubjectGroups:[l]})}return e},[]);console.log("subjectGroupHeadersModified---\x3e",eV);let eC=(null==ey?void 0:ey.map(e=>e.subjectId))||[];console.log("headerSubjectIds---\x3e",eC);let eS=e=>{g(l=>l.includes(e)?(L(!1),l.filter(l=>l!==e)):[...l,e])},eR=async e=>{console.log("Fetch student data..."),console.log("studentId",e);let l=await fetch("/api/examination/admin/superFolioResult/fetchStudent?studentId=".concat(e,"&termId=").concat(ee)),t=await l.json();return console.log("Raw API Response (before processing):",JSON.stringify(t,null,2)),console.log("Data1",t),{...t}},eA=e=>"medical"===e?"ML":"absent"===e?"AB":"",eI=async e=>{let l=2025==$?9:5,t=await fetch("/api/examination/admin/superFolioResult/getClassSectionResult?classSectionsId=".concat(e,"&termId=").concat(l));return await t.json()},ek=(e,l)=>{var t;let{studentResult:i,subjectExamsDetails:s,superFolioGroupSuperFolioData:r}=l||{};if(!i||!s)return[];let d=i.find(l=>l.id===e);if(!d)return[];let n=Object.keys(s||{}).map(e=>({subjectId:e,examSubjectId:Array.isArray(s[e])?s[e].map(e=>e.examSubjectId):[]})),o=[];return n.forEach(e=>{var l,t,i,s,r;let n={},a=null==d?void 0:null===(t=d.subjectWiseTotal)||void 0===t?void 0:null===(l=t.results)||void 0===l?void 0:l.find(l=>(null==l?void 0:l.subjectId)==(null==e?void 0:e.subjectId));(null==a?void 0:null===(i=a.subjectDetails)||void 0===i?void 0:i.subjectName)&&(n.name=null==a?void 0:null===(s=a.subjectDetails)||void 0===s?void 0:s.subjectName,n.subjectId=null==a?void 0:null===(r=a.subjectDetails)||void 0===r?void 0:r.subjectId,n.total=null==a?void 0:a.subjectNormalizedMarks,e.examSubjectId.forEac
1h(l=>{var t,i,s;let r=null==d?void 0:null===(t=d.subjectWiseExamMarks[null==e?void 0:e.subjectId])||void 0===t?void 0:t.find(e=>{var t;return(null==e?void 0:null===(t=e.examSubject)||void 0===t?void 0:t.examSubjectId)==l});(null==r?void 0:null===(s=r.examSubject)||void 0===s?void 0:null===(i=s.exam)||void 0===i?void 0:i.name)&&(n[r.examSubject.exam.name]={obtain:r?(null==r?void 0:r.normalizedMarks)===0&&eA(null==r?void 0:r.theoryRemarks)||(null==r?void 0:r.normalizedMarks):"NA",maxMarks:(null==r?void 0:r.superFolioExamSubjectWeightage)||0})}),o.push(n))}),null==d||null===(t=d.groupWiseSubjectMarksTotal)||void 0===t||t.forEach(e=>{o.push({name:e.superFolioGroup.name,total:e.superFolioGroupNormalizedMarks,group:!0,subjectIds:e.subjectIds})}),o};console.log(eb,"filteredData");let eN=(null==eb?void 0:eb.map(e=>{var l;let t={Name:e.studentName,PersonalNo:e.personalNo};return ev.forEach(l=>{var i,s,r;let d=null==e?void 0:null===(i=e.subjectsTotal)||void 0===i?void 0:i.find(e=>e.subjectId===l.subjectId);null==eh||eh.forEach(i=>{var s,r,d,n,o,a;let c=i.termId,x=i.name,h=null==e?void 0:null===(n=e.termResults)||void 0===n?void 0:null===(d=n.find(e=>e.termId===c))||void 0===d?void 0:null===(r=d.subjectWiseTotal)||void 0===r?void 0:null===(s=r.results)||void 0===s?void 0:s.find(e=>e.subjectId==l.subjectId),y=null===(a=ex[c])||void 0===a?void 0:null===(o=a.subjectWiseHighestMarks)||void 0===o?void 0:o.find(e=>e.subjectId==l.subjectId);(null==ej?void 0:ej.includes(l.subjectId))||(t["".concat(l.subjectName," - ").concat(x," - ").concat(l.isArt?"Grade":"Highest Marks")]=l.isArt?(null==h?void 0:h.grade)||"N/A":(null==y?void 0:y.highestMarks)||"N/A"),t["".concat(l.subjectName," - ").concat(x," - Total Marks")]=(null==h?void 0:h.theoryRemarks)||(null==h?void 0:h.subjectNormalizedMarks)||"N/A",t["".concat(l.subjectName," - ").concat(x," - Total Marks Weightage")]=(null==h?void 0:h.superFolio_NormaliseMarksTo)||"N/A"}),l.isArt&&(t["".concat(l.subjectName," - Grade")]=(null==d?void 0:d.grade)||"N/A"),t["".concat(l.subjectName," - Total Marks")]=(null==d?void 0:null===(s=d.isAbsentRemark)||void 0===s?void 0:s.length)>0&&(null==d?void 0:null===(r=d.isAbsentRemark)||void 0===r?void 0:r.join(","))||(null==d?void 0:d.totalObtainedMarks)||"N/A",t["".concat(l.subjectName," - Total Marks Weightage")]=(null==d?void 0:d.totalMarks)||"N/A"}),null==eV||eV.forEach(l=>{var i,s,r;let d=null==e?void 0:null===(i=e.groupWiseTotals)||void 0===i?void 0:i.find(e=>{var t;return null===(t=e.subjectIds)||void 0===t?void 0:t.every(e=>{var t;return null==l?void 0:null===(t=l.subjectIds)||void 0===t?void 0:t.includes(e)})});null==l||null===(s=l.subjects)||void 0===s||s.forEach(i=>{var s;null==eh||null===(s=eh.filter(e=>null==l?void 0:l.termIds.includes(e.termId)))||void 0===s||s.forEach(s=>{var r,d,n,o,a,c,x;let h=s.termId,y=s.name;null==l||null===(d=l.superFolioGroups)||void 0===d||null===(r=d.find(e=>e.termId===h))||void 0===r||r.superFolioGroupId;let j=null==e?void 0:null===(x=e.termResults)||void 0===x?void 0:null===(c=x.find(e=>e.termId===h))||void 0===c?void 0:null===(a=c.groupWiseSubjectMarksTotal)||void 0===a?void 0:null===(o=a.find(e=>{var l;return null===(l=e.subjectIds)||void 0===l?void 0:l.includes(i.subjectId)}))||void 0===o?void 0:null===(n=o.superFolioSubjectsDetails)||void 0===n?void 0:n.find(e=>(null==e?void 0:e.superFolioSubject.subjectId)===i.subjectId);t["".concat(l.groupName," - ").concat(i.subjectName," - ").concat(y," - Total Marks")]=(null==j?void 0:j.superFolio_group_individual_normalized_marks)||"N/A",t["".concat(l.groupName," - ").concat(i.subjectName," - ").concat(y," - Total Marks Weightage")]=(null==j?void 0:j.superFolio_group_individual_normalized_by)||(null==j?void 0:j.weightage)||"N/A"})}),null==eh||null===(r=eh.filter(e=>{var t;return null==l?void 0:null===(t=l.termIds)||void 0===t?void 0:t.includes(e.termId)}))||void 0===r||r.forEach(i=>{var s,r,d,n,o,a,c;let x=i.termId,h=i.name,y=null==l?void 0:null===(r=l.superFolioGroups)||void 0===r?void 0:null===(s=r.find(e=>e.termId===x))||void 0===s?void 0:s.superFolioGroupId,j=null==e?void 0:null===(o=e.termResults)||void 0===o?void 0:null===(n=o.find(e=>e.termId===x))||void 0===n?void 0:null===(d=n.groupWiseSubjectMarksTotal)||void 0===d?void 0:d.find(e=>e.superFolioGroupId===y),w=null===(c=ex[x].groupSuperFolioWiseHighestMarks)||void 0===c?void 0:null===(a=c.find(e=>e.superFolioGroupId==y))||void 0===a?void 0:a.highestMarks;t["".concat(l.groupName," - ").concat(h," - Highest Marks")]=w||"N
1/A",t["".concat(l.groupName," - ").concat(h," - Total Marks")]=(null==j?void 0:j.superFolioGroupNormalizedMarks)||"N/A",t["".concat(l.groupName," - ").concat(h," - Total Marks Weightage")]=(null==j?void 0:j.superFolioGroupNormalizedBy)||"N/A"}),t["".concat(l.groupName," - Total Marks")]=(null==d?void 0:d.totalObtainedMarks)||"N/A",t["".concat(l.groupName," - Total Marks Weightage")]=(null==d?void 0:d.totalMarks)||"N/A"}),null==eh||eh.forEach(l=>{var i;let s=l.termId,r=l.name,d=null==e?void 0:null===(i=e.termResults)||void 0===i?void 0:i.find(e=>e.termId===s);if(d){let{rank:e,highestMarks:l,totalObtainedMarks:i,totalMarks:s,totalPercentage:n}=d;t["".concat(r," - Rank")]=i&&(e||"Failed")||"N/A",t["".concat(r," - Highest Marks")]=l||"N/A",t["".concat(r," - Total Marks")]=i||"N/A",t["".concat(r," - Total Marks Weightage")]=s||"N/A",t["".concat(r," - Percentage (%)")]=n&&(null==n?void 0:n.toFixed(2))||"N/A"}}),t.Rank=(null==e?void 0:e.rank)||"Failed",t["Highest Marks"]=(null==e?void 0:e.combineHighestMarks)||0,t["Total Marks"]=(null==e?void 0:e.combineTotalObtainMarks)||0,t["Total Marks Weightage"]=(null==e?void 0:e.combineTotalMarks)||0,t["Percentage (%)"]=(null==e?void 0:null===(l=e.combineTotalPercentage)||void 0===l?void 0:l.toFixed(2))||0,t}))||[],eF=async()=>{K(!0);let e=[],l=null;if(null==c?void 0:c.value)try{l=await eI(c.value)}catch(e){console.error("Failed to fetch term 9 data:",e)}for(let c of m){try{var t,s,r,d,n,a,x,y,j,w,b,g;let m=eb.find(e=>e.id===c);if(console.log("New student",m),!m){console.error("Student with ID ".concat(c," not found in filtered data")),e.push({personalNo:"Unknown ID: "+c});continue}let{studentData:f,term:p}=await eR(c);if(!f){console.error("Failed to fetch data for student ID ".concat(c)),e.push({personalNo:m.personalNo||"Unknown"});continue}console.log("Student for PDF:",m),console.log("Student data from API:",f);let T=(null===(d=f.bill)||void 0===d?void 0:null===(r=d[0])||void 0===r?void 0:null===(s=r.classSections)||void 0===s?void 0:null===(t=s.studentClass)||void 0===t?void 0:t.className)||"";f.termResults=m.termResults;let C={total:m.combineTotalMarks||0,obtain:m.combineTotalObtainMarks||0,percentage:m.combineTotalPercentage||0,rank:m.rank||null,status:m.status||"Pass"};if(["class1","class2","class3","class4","class5"].includes(T)){let e=(null==m?void 0:null===(n=m.termResults.find(e=>9==e.termId))||void 0===n?void 0:n.termResult.supwMarks)||0,l=(null==m?void 0:null===(y=m.termResults)||void 0===y?void 0:null===(x=y.find(e=>9==e.termId))||void 0===x?void 0:null===(a=x.termResult)||void 0===a?void 0:a.valueEducationMarks)||0;e<=1?C.supwGrade=Q(100*e):C.supwGrade=Q(e),l<=1?C.valueEducationGrade=Q(100*l):C.valueEducationGrade=Q(l)}else{let e=(null==f?void 0:null===(w=f.termResults)||void 0===w?void 0:null===(j=w[0])||void 0===j?void 0:j.supwMarks)||0,l=(null==f?void 0:null===(g=f.termResults)||void 0===g?void 0:null===(b=g[0])||void 0===b?void 0:b.valueEducationMarks)||0;C.supwGrade=Q(e),C.valueEducationGrade=Q(100*l)}let S=[];ev.forEach(e=>{var l,t;let i=e.subjectId;if(!i)return;let s=null==m?void 0:null===(l=m.subjectsTotal)||void 0===l?void 0:l.find(e=>e.subjectId===i);if(!s||!(null===(t=s.subjectDetails)||void 0===t?void 0:t.subjectName))return;let r={name:s.subjectDetails.subjectName,subjectId:s.subjectDetails.subjectId,total:s.totalObtainedMarks||0,isGraded:s.isCombineGraded||!1,grade:s.grade||null},d={};m.termResults&&Array.isArray(m.termResults)&&m.termResults.forEach(e=>{var l,t;if(!e||!e.termDetails)return;let s=e.termDetails.name,r=e.termId,n=null===(t=e.subjectWiseTotal)||void 0===t?void 0:null===(l=t.results)||void 0===l?void 0:l.find(e=>e.subjectId===i);n&&(d[s]={termId:r,obtain:n.subjectNormalizedMarks||0,maxMarks:n.superFolio_NormaliseMarksTo||0,theoryRemarks:n.theoryRemarks||null,allExamSubjectRemarks:n.allExamSubjectRemarks||[]})}),Object.entries(d).forEach(e=>{let[l,t]=e;r[l]={obtain:t.theoryRemarks||t.obtain,maxMarks:t.maxMarks,remarks:t.theoryRemarks||(t.allExamSubjectRemarks.length>0?t.allExamSubjectRemarks[0]:null)}}),(null==m?void 0:m.subjectWiseExamMarks)&&m.subjectWiseExamMarks[i]&&m.subjectWiseExamMarks[i].forEac
1h(e=>{if(e.examSubject&&e.examSubject.exam){let l=e.examSubject.exam.name;r[l]||(r[l]={obtain:0===e.normalizedMarks&&e.theoryRemarks?e.theoryRemarks:e.normalizedMarks||"NA",maxMarks:e.superFolioExamSubjectWeightage||0})}}),s.combineSubjects&&Array.isArray(s.combineSubjects)&&s.combineSubjects.forEach(e=>{e.termId&&e.termName&&!r[e.termName]&&(r[e.termName]={obtain:e.theoryRemarks||e.subjectNormalizedMarks||0,maxMarks:e.superFolio_NormaliseMarksTo||0})}),S.push(r)}),(null==m?void 0:m.groupWiseTotals)&&Array.isArray(m.groupWiseTotals)?m.groupWiseTotals.forEach(e=>{if(!e||!e.groupName)return;let l={name:e.groupName,total:e.totalObtainedMarks||0,group:!0,subjectIds:e.subjectIds||[]};S.push(l)}):(null==m?void 0:m.groupWiseSubjectMarksTotal)&&Array.isArray(m.groupWiseSubjectMarksTotal)&&m.groupWiseSubjectMarksTotal.forEach(e=>{e.superFolioGroup&&S.push({name:e.superFolioGroup.name,total:e.superFolioGroupNormalizedMarks||0,group:!0,subjectIds:e.subjectIds||[]})});let R=S.sort((e,l)=>{let t=e.name.toLowerCase(),i=l.name.toLowerCase();if("english"===t)return -1;if("english"===i)return 1;if("english language"===t&&"english"!==i)return -1;if("english language"===i&&"english"!==t)return 1;let s="english literature"===t||"literature in english"===t,r="english literature"===i||"literature in english"===i;if(s&&!r)return -1;if(!s&&r)return 1;let d=["Science","Physics","Chemistry","Biology"],n=d.indexOf(e.name),o=d.indexOf(l.name);return -1!==n&&-1!==o?n-o:-1!==n?-1:-1!==o?1:t.localeCompare(i)});console.log("Sorted subjects for PDF:",R),console.log("Final grade object:",C);let A=ek(c,l),I=null;console.log($,"year"),I=2025==$&&["class1","class2","class3","class4","class5"].includes(T)?await (0,o.pdf)((0,i.jsx)(v,{student:f,grade:C,subjectData:R,term:p,term9SubjectData:A})).toBlob():2025==$?await (0,o.pdf)((0,i.jsx)(V,{student:f,grade:C,subjectData:R,term:p,term9SubjectData:A})).toBlob():["class1","class2","class3","class4","class5"].includes(T)?await (0,o.pdf)((0,i.jsx)(h,{student:f,grade:C,subjectData:R,term:p})).toBlob():await (0,o.pdf)((0,i.jsx)(u,{student:f,grade:C,subjectData:R,term:p})).toBlob(),(0,N.saveAs)(I,"Result-".concat(f.personalNo,".pdf")),U.oR.success("Downloaded report for ".concat(f.personalNo))}catch(i){console.error("Error downloading PDF:",i);let l=eb.find(e=>e.id===c),t=(null==l?void 0:l.personalNo)||"Unknown";e.push({personalNo:t}),U.oR.error("Error downloading file for student ".concat(t))}await new Promise(e=>setTimeout(e,100))}if(e.length>0){let l=new Blob([e.map((e,l)=>"".concat(l+1,". Personal No: ").concat(e.personalNo)).join("\n")],{type:"text/plain"});(0,N.saveAs)(l,"error_students.txt"),1===e.length?U.oR.warn("1 student report had errors. See error_students.txt for details."):U.oR.warn("".concat(e.length," student reports had errors. See error_students.txt for details."))}else m.length>0&&U.oR.success("All ".concat(m.length," reports downloaded successfully!"));K(!1)},eH=["class10","class12"].includes(null==c?void 0:c.className);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(P(),{children:[" ",(0,i.jsx)("title",{children:" All Results: Class 1 to 12 "})]}),(0,i.jsx)(W(),{children:'\n          (function(c,l,a,r,i,t,y){\n            c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\n            t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;\n            y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\n            })(window, document, "clarity", "script", "idh5t6em8b");\n            '}),(0,i.jsx)(s.A,{}),(0,i.jsx)("main",{children:(0,i.jsx)("div",{className:"bg-gray-50 min-h-screen",children:(0,i.jsxs)("div",{className:"px-4 py-6 mx-auto max-w-[1800px] sm:px-6 lg:px-8",children:[(0,i.jsx)("div",{className:"bg-white rounded-lg shadow-sm border p-4 mb-4",children:(0,i.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"Combined Examination Results"}),(0,i.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"View and download combined annual results for Class 1 to 12"})]}),(0,i.jsx)("div",{className:"flex items-center gap-3",children:(0,i.jsx)(_.Ay,{className:"w-40",name:"year",value:$?{value:$,label:"".concat($,"-").concat(parseInt($)+1)}:null,onChange:e=>{X((null==e?void 0:e.value)||""),x([])},options:["2024","2025"].map(e=>({value:e,label:"".concat(e,"-").concat(parseInt(e)+1)})),placeholder:"Select Year"})})]})}),(0,i.jsxs)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4 mb-4",children:[(0,i.jsxs)(A.Zp,{className:"bg-white",children:[(0,i.jsxs)(A.aR,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,i.jsx)(A.ZB,{className:"text-sm font-medium text-gray-600",children:"Total Students"}),(0,i.jsx)(F.A,{className:"h-5 w-5 text-indigo-500"})]}),(0,i.jsxs)(A.Wu,{children:[(0,i.jsxs)("div",{className:"text-3xl font-bold text-gray-900",children:[(null==em?void 0:em.length)||0,(null==eg?void 0:eg.length)>0&&(0,i.jsxs)("span",{className:"text-sm font-normal text-red-500 ml-2",children:["(",eg.length," fee pending)"]})]}),!(null==eb?void 0:eb.length)&&(0,i.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Select class to view"})]})]}),(0,i.jsxs)(A.Zp,{className:"bg-white",children:[(0,i.jsxs)(A.aR,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,i.jsx)(A.ZB,{className:"text-sm font-medium text-gray-600",children:"Selected"}),(0,i.jsx)(H.A,{className:"h-5 w-5 text-violet-500"})]}),(0,i.jsxs)(A.Wu,{children:[(0,i.jsx)("div",{className:"text-3xl font-bold text-gray-900",children:m.length}),(0,i.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:m.length>0?"Ready to download":"Select students"})]})]}),(0,i.jsx)(A.Zp,{className:"bg-white flex flex-col justify-center",children:(0,i.jsx)(A.Wu,{className:"pt-6",children:(0,i.jsxs)(R.$,{onClick:eF,className:"w-full",disabled:0===m.length||eH||G,variant:m.length>0?"default":"outline",children:[G?(0,i.jsx)(D.A,{className:"w-4 h-4 mr-2 animate-spin"}):(0,i.jsx)(z.A,{className:"w-4 h-4 mr-2"}),G?"Downloading...":"Download PDFs"]})})}),(0,i.jsx)(A.Zp,{className:"bg-white flex flex-col justify-center",children:(0,i.jsx)(A.Wu,{className:"pt-6",children:m.length>0?(0,i.jsx)(O.CSVLink,{data:eN,filename:"Combined_Result_".concat((null==c?void 0:c.label)||"All","_").concat($,".csv"),className:"w-full",children:(0,i.jsxs)(R.$,{className:"w-full",variant:"outline",children:[(0,i.jsx)(M.A,{className:"w-4 h-4 mr-2"}),"Download CSV"]})}):(0,i.jsxs)(R.$,{className:"w-full",variant:"outline",disabled:!0,children:[(0,i.jsx)(M.A,{className:"w-4 h-4 mr-2"}),"Download CSV"]})})})]}),(0,i.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border p-4 mb-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,i.jsx)("svg",{className:"w-4 h-4 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,i.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Filters"})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 relative z-40",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(k.J,{className:"text-xs text-gray-500 mb-1 block",children:"Search"}),(0,i.jsx)("input",{type:"text",className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent ".concat($?"":"bg-gray-100 cursor-not-allowed"),value:t,onChange:e=>{a(e.target.value),p(1),C(1)},placeholder:$?"Name or Personal No.":"Select year first",disabled:!$})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(k.J,{className:"text-xs text-gray-500 mb-1 block",children:"Class & Section"}),(0,i.jsx)(_.Ay,{name:"classOptions",value:c,onChange:e=>{x(e),p(1),C(1),g([]),L(!1)},options:ed,isLoading:er,placeholder:$?"Select class...":"Select year first",isDisabled:!$,styles:{control:(e,l)=>({...e,minHeight:"38px",fontSize:"14px",backgroundColor:l.isDisabled?"#f3f4f6":"white"})}})]})]})]}),(null==em?void 0:em.length)>0?(0,i.jsx)("div",{ref:el,className:"bg-white rounded-lg shadow-sm border scroll-mt-4",children:(0,i.jsx)("div",{className:"overflow-auto max-h-[70vh]",children:(0,i.jsx)("div",{className:"inline-block min-w-full py-2 align-middle md:px-6 lg:px-8",children:(0,i.jsxs)("table",{className:"min-w-full lg:divide-y lg:divide-gray-200 border-collapse",children:[(0,i.jsxs)("thead",{className:"lg:table-header-group",children:[(0,i.jsxs)("tr",{className:"z-20",children:[(0,i.jsx)("th",{className:"py-3.5 px-3 text-left text-sm whitespace-nowrap font-medium border-2 text-gray-500",rowSpan:4,style:{position:"sticky",left:0,top:0,zIndex:40,backgroundColor:"white",boxShadow:"2px 0px 4px rgba(0,0,0,0.1)"},children:(0,i.jsx)(I.S,{checked:S,onCheckedChange:()=>{m.length===em.length?(g([]),L(!1)):(g(em.map(e=>e.id)),L(!0))}})}),["Name","Personal No"].map((e,l)=>"Name"!==e?(0,i.jsx)(Z,{head:(0,n.A)(e),rowSpan:4,stickyTop:0},l):(0,i.jsx)("th",{className:"py-3.5 px-3 text-left text-sm whitespace-nowrap font-medium border-2 text-gray-500",rowSpan:4,style:{position:"sticky",left:40,top:0,zIndex:40,backgroundColor:"white",boxShadow:"2px 0px 4px rgba(0,0,0,0.1)"},children:(0,i.jsxs)("div",{className:"flex items-center justify-center",children:[(0,n.A)(e),(0,i.jsx)("svg",{className:"w-4 h-4 ml-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"})})]})},l)),ev.map(e=>(0,i.jsx)(Z,{head:"".concat((0,n.A)(e.subjectName)).concat(""),colSpan:(null==ej?void 0:ej.includes(e.subjectId))?2*((null==eh?void 0:eh.length)||1)+(e.isArt?3:2):3*((null==eh?void 0:eh.length)||1)+(e.isArt?3:2),rowSpan:1,stickyTop:0},e)),null==eV?void 0:eV.map(e=>{var l,t,s;return(0,i.jsx)(Z,{head:(0,n.A)(e.groupName),colSpan:((null==eh?void 0:null===(l=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===l?void 0:l.length)||1)*(null==e?void 0:null===(t=e.subjects)||void 0===t?void 0:t.length)*2+3*((null==eh?void 0:null===(s=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===s?void 0:s.length)||1)+2,stickyTop:0},e.groupName)}),null==eh?void 0:eh.map((e,l)=>(0,i.jsx)(Z,{head:e.name,colSpan:5,rowSpan:1,stickyTop:0},e.termId)),ep.map((e,l)=>(0,i.jsx)(Z,{head:(0,n.A)(e),rowSpan:4,colSpan:1,stickyTop:0},l))]}),(0,i.jsxs)("tr",{className:"z-20",children:[null==ev?void 0:ev.map((e,l)=>(0,i.jsxs)(i.Fragment,{children:[null==eh?void 0:eh.map((l,t)=>(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Z,{head:l.name,colSpan:(null==ej?void 0:ej.includes(e.subjectId))?2:3,stickyTop:52},l.termId)})),e.isArt&&(0,i.jsx)(Z,{head:"Grade",colSpan:1,rowSpan:3,stickyTop:52}),(0,i.jsx)(Z,{head:"Total Marks",colSpan:1,rowSpan:3,stickyTop:52}),(0,i.jsx)(Z,{head:"Total Marks Weightage",colSpan:1,rowSpan:3,stickyTop:52})]})),null==eV?void 0:eV.map((e,l)=>{var t,s;return(0,i.jsxs)(i.Fragment,{children:[null==e?void 0:null===(t=e.subjects)||void 0===t?void 0:t.map(l=>{var t;return(0,i.jsx)(Z,{head:l.subjectName,colSpan:(null==eh?void 0:null===(t=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===t?void 0:t.length)*2,rowSpan:1,stickyTop:52},l.id)}),null==eh?void 0:null===(s=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===s?void 0:s.map((e,l)=>(0,i.jsx)(Z,{head:e.name,colSpan:3,rowSpan:2,stickyTop:52})),(0,i.jsx)(Z,{head:"Obtain Marks",colSpan:1,rowSpan:3,stickyTop:52},l),(0,i.jsx)(Z,{head:"Total Marks",colSpan:1,rowSpan:3,stickyTop:52},l)]})}),null==eh?void 0:eh.map((e,l)=>ep.map((e,l)=>(0,i.jsx)(Z,{head:(0,n.A)(e),rowSpan:3,colSpan:1,stickyTop:52},l)))]}),(0,i.jsxs)("tr",{className:"z-20",children:[ev.map(e=>(0,i.jsx)(i.Fragment,{children:null==eh?void 0:eh.map((l,t)=>(0,i.jsxs)(i.Fragment,{children:[!(null==ej?void 0:ej.includes(e.subjectId))&&(0,i.jsx)(Z,{head:e.isArt?"Grade":"Highest Marks",colSpan:1,rowSpan:2,stickyTop:104}),(0,i.jsx)(Z,{head:"Total Marks",colSpan:1,rowSpan:2,stickyTop:104}),(0,i.jsx)(Z,{head:"Total Marks Weightage",colSpan:1,rowSpan:2,stickyTop:104})]}))})),null==eV?void 0:eV.map(e=>{var l;return(0,i.jsx)(i.Fragment,{children:null==e?void 0:null===(l=e.subjects)||void 0===l?void 0:l.map(l=>{var t;return(0,i.jsx)(i.Fragment,{children:null==eh?void 0:null===(t=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===t?void 0:t.map((e,t)=>(0,i.jsx)(Z,{head:e.name,colSpan:2,rowSpan:1,stickyTop:104},l.subjectId))})})})})]}),(0,i.jsx)("tr",{className:"z-20",children:null==eV?void 0:eV.map(e=>{var l,t;return(0,i.jsxs)(i.Fragment,{children:[null==e?void 0:null===(l=e.subjects)||void 0===l?void 0:l.map(l=>{var t;return(0,i.jsx)(i.Fragment,{children:null==eh?void 0:null===(t=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===t?void 0:t.map((e,l)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z,{head:"Total Marks",colSpan:1,rowSpan:1,stickyTop:156}),(0,i.jsx)(Z,{head:"Total Marks Weightage",colSpan:1,rowSpan:1,stickyTop:156})]}))})}),null==eh?void 0:null===(t=eh.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===t?void 0:t.map((e,l)=>(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Z,{head:"Highe
1st Marks",colSpan:1,rowSpan:1,stickyTop:156}),(0,i.jsx)(Z,{head:"Total Marks",colSpan:1,rowSpan:1,stickyTop:156}),(0,i.jsx)(Z,{head:"Total Marks Weightage",colSpan:1,rowSpan:1,stickyTop:156})]})}))]})})})]}),(0,i.jsx)("tbody",{className:"divide-y divide-gray-200",children:null==em?void 0:em.map((e,l)=>(0,i.jsx)(q,{index:l+1,student:e,headerSubjectIds:eC,headers:ev,subjectGroupHeaders:eT,termsDetails:eh,subjectDetails:ey,termWiseResult:ex,selected:m.includes(e.id),onSelectedChange:()=>eS(e.id),removedSubjectIds:ej,subjectGroupHeadersModified:eV},e.personalNo))})]})})})}):(0,i.jsx)("div",{className:"bg-white rounded-lg shadow-sm border p-12 text-center",children:(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,i.jsx)(B.A,{className:"h-16 w-16 text-gray-300 mb-4"}),(0,i.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No Results to Display"}),(0,i.jsx)("p",{className:"text-sm text-gray-500 max-w-sm",children:(null==c?void 0:c.value)?"No students found matching your current filters. Try adjusting the filter criteria.":"Select a year and class from the filters above to view combined examination results."})]})}),(null==eg?void 0:eg.length)>0&&(0,i.jsx)("div",{className:"mt-8",children:(0,i.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:[(0,i.jsxs)("h3",{className:"text-lg font-semibold text-red-800 mb-2",children:["Fee Pending - Report Card Not Available (",eg.length," students)"]}),(0,i.jsx)("p",{className:"text-sm text-red-600 mb-4",children:"The following students have not cleared their fees. Report card download is not available for them."}),(0,i.jsx)("div",{className:"overflow-x-auto",children:(0,i.jsxs)("table",{className:"min-w-full divide-y divide-red-200",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{className:"px-4 py-2 text-left text-sm font-medium text-red-700",children:"S.No"}),(0,i.jsx)("th",{className:"px-4 py-2 text-left text-sm font-medium text-red-700",children:"Name"}),(0,i.jsx)("th",{className:"px-4 py-2 text-left text-sm font-medium text-red-700",children:"Personal No"})]})}),(0,i.jsx)("tbody",{className:"divide-y divide-red-100",children:eg.map((e,l)=>(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900",children:l+1}),(0,i.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900 capitalize",children:(0,n.A)(e.studentName)}),(0,i.jsx)("td",{className:"px-4 py-2 text-sm text-gray-900",children:e.personalNo})]},e.id))})]})})]})})]})})})]})};function Z(e){let{head:l,rowSpan:t,colSpan:s,stickyTop:r}=e;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("th",{className:"py-3.5 px-3 text-center border-2 text-sm whitespace-normal font-medium text-gray-500 bg-white",colSpan:s||1,rowSpan:t,style:void 0!==r?{position:"sticky",top:r,zIndex:20,backgroundColor:"white"}:void 0,children:(0,i.jsxs)("div",{className:"flex items-center justify-center",children:[l,(0,i.jsx)("svg",{className:"w-4 h-4 ml-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"})})]})})})}let q=e=>{var l;let{index:t,termsDetails:s,subjectDetails:d,termWiseResult:o,student:a,headerSubjectIds:c,subjectGroupHeaders:x,selected:h,onSelectedChange:y,headers:j,removedSubjectIds:w,subjectGroupHeadersModified:u}=e;return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:"border-2 text-gray-500 text-center",style:{position:"sticky",left:0,zIndex:5,backgroundColor:"white"},children:(0,i.jsx)(I.S,{checked:h,onCheckedChange:y})}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",style:{position:"sticky",left:40,zIndex:5,backgroundColor:"white",boxShadow:"2px 0px 4px rgba(0,0,0,0.1)"},children:(0,n.A)(a.studentName)}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-semibold text-gray-900 lg:table-cell whitespace-nowrap border",children:a.personalNo}),null==j?void 0:j.map(e=>{var l,t,d;let n=null==a?void 0:null===(l=a.subjectsTotal)||void 0===l?void 0:l.find(l=>l.subjectId===e.subjectId);return(0,i.jsxs)(i.Fragment,{children:[" ",null==s?void 0:s.map(l=>{var t,s,d,n,c,x,h,y,j,u;let b=l.termId,m=null==a?void 0:null===(n=a.termResults)||void 0===n?void 0:null===(d=n.find(e=>e.termId===b))||void 0===d?void 0:null===(s=d.subjectWiseTotal)||void 0===s?void 0:null===(t=s.results)||void 0===t?void 0:t.find(l=>l.subjectId==e.subjectId),g=null===(x=o[b])||void 0===x?void 0:null===(c=x.subjectWiseHighestMarks)||void 0===c?void 0:c.find(l=>l.subjectId==e.subjectId);return null===(j=o[b])||void 0===j||null===(y=j.superFoliosDataWithSubjectTotal)||void 0===y||null===(h=y.find(l=>parseInt(l.subjectId)===parseInt(e.subjectId)))||void 0===h||h.subjectTotalMaxMarks,(0,i.jsxs)(r.Fragment,{children:[!(null==w?void 0:w.includes(e.subjectId))&&(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:e.isArt?(null==m?void 0:m.grade)||"N/A":(null==g?void 0:g.highestMarks)||"N/A"})," ",(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==m?void 0:m.theoryRemarks)||(null==m?void 0:m.subjectNormalizedMarks)||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:null!==(u=null==m?void 0:m.superFolio_NormaliseMarksTo)&&void 0!==u?u:"N/A"})]},"".concat(b,"-").concat(e.subjectId))}
1),e.isArt&&(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==n?void 0:n.grade)||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==n?void 0:null===(t=n.isAbsentRemark)||void 0===t?void 0:t.length)>0&&(null==n?void 0:null===(d=n.isAbsentRemark)||void 0===d?void 0:d.join(","))||(null==n?void 0:n.totalObtainedMarks)||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==n?void 0:n.totalMarks)||"N/A"})]})}),null==u?void 0:u.map((e,l)=>{var t,d,n;let c=null==a?void 0:null===(t=a.groupWiseTotals)||void 0===t?void 0:t.find(l=>{var t;return null===(t=l.subjectIds)||void 0===t?void 0:t.every(l=>{var t;return null==e?void 0:null===(t=e.subjectIds)||void 0===t?void 0:t.includes(l)})}),x=(null==c?void 0:c.totalObtainedMarks)||"N/A",h=(null==c?void 0:c.totalMarks)||"N/A";return(0,i.jsxs)(i.Fragment,{children:[null==e?void 0:null===(d=e.subjects)||void 0===d?void 0:d.map((t,d)=>{var n;return(0,i.jsx)(r.Fragment,{children:null==s?void 0:null===(n=s.filter(l=>null==e?void 0:e.termIds.includes(l.termId)))||void 0===n?void 0:n.map((s,n)=>{var c,x,h,y,j,w,u,b,m,g,v,f,p,T,V,C,S;let{termId:R}=s,A=null==e?void 0:null===(x=e.superFolioGroups)||void 0===x?void 0:null===(c=x.find(e=>e.termId===R))||void 0===c?void 0:c.superFolioGroupId,I=null==e?void 0:null===(h=e.superFolioSubjectGroups)||void 0===h?void 0:h.find(e=>e.termId===R);null==I||null===(y=I.superFolioSubjectsDetails)||void 0===y||y.find(e=>e.superFolioSubject.subjectId===t.subjectId);let k=null==a?void 0:null===(m=a.termResults)||void 0===m?void 0:null===(b=m.find(e=>e.termId===R))||void 0===b?void 0:null===(u=b.groupWiseSubjectMarksTotal)||void 0===u?void 0:null===(w=u.find(e=>{var l;return null===(l=e.subjectIds)||void 0===l?void 0:l.includes(t.subjectId)}))||void 0===w?void 0:null===(j=w.superFolioSubjectsDetails)||void 0===j?void 0:j.find(e=>(null==e?void 0:e.superFolioSubject.subjectId)===t.subjectId);return null===(v=o[R])||void 0===v||null===(g=v.superFolioGroupSuperFolioData)||void 0===g||g.find(e=>e.superFolioGroupId===A),null===(T=o[R])||void 0===T||null===(p=T.groupSuperFolioWiseHighestMarks)||void 0===p||null===(f=p.find(e=>e.superFolioGroupId==A))||void 0===f||f.highestMarks,(0,i.jsxs)(r.Fragment,{children:[(0,i.jsxs)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:[null!==(V=null==k?void 0:k.superFolio_group_individual_normalized_marks)&&void 0!==V?V:"N/A"," "]}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:null!==(S=null!==(C=null==k?void 0:k.superFolio_group_individual_normalized_by)&&void 0!==C?C:null==k?void 0:k.weightage)&&void 0!==S?S:"N/A"})]},"".concat(l,"-").concat(d,"-").concat(n))})},"".concat(l,"-").concat(d))}),null==s?void 0:null===(n=s.filter(l=>{var t;return null==e?void 0:null===(t=e.termIds)||void 0===t?void 0:t.includes(l.termId)}))||void 0===n?void 0:n.map((l,t)=>{var s,r,d,n,c,x,h,y,j;let w=l.termId,u=null==e?void 0:null===(r=e.superFolioGroups)||void 0===r?void 0:null===(s=r.find(e=>e.termId===w))||void 0===s?void 0:s.superFolioGroupId,b=null==a?void 0:null===(c=a.termResults)||void 0===c?void 0:null===(n=c.find(e=>e.termId===w))||void 0===n?void 0:null===(d=n.groupWiseSubjectMarksTotal)||void 0===d?void 0:d.find(e=>e.superFolioGroupId===u);null===(h=o[w])||void 0===h||null===(x=h.superFolioGroupSuperFolioData)||void 0===x||x.find(e=>e.superFolioGroupId===u);let m=null===(j=o[w].groupSuperFolioWiseHighestMarks)||void 0===j?void 0:null===(y=j.find(e=>e.superFolioGroupId==u))||void 0===y?void 0:y.highestMarks;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:m||"N/A"}),(0,i.jsxs)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:[(null==b?void 0:b.superFolioGroupNormalizedMarks)||"N/A"," "]}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==b?void 0:b.superFolioGroupNormalizedBy)||"N/A"})]})}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:x||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:h||"N/A"})]})}),null==s?void 0:s.map(e=>{var l;let t=null==e?void 0:e.termId,{rank:s,highestMarks:r,totalObtainedMarks:d,totalMarks:n,totalPercentage:o}=(null==a?void 0:null===(l=a.termResults)||void 0===l?void 0:l.find(e=>e.termId===t))||{};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:d&&(s||"Failed")||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:r||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:d||"N/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:n||"N
1/A"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:o&&(null==o?void 0:o.toFixed(2))+" %"||"N/A"})]})}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==a?void 0:a.rank)||"Failed"}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==a?void 0:a.combineHighestMarks)||0}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==a?void 0:a.combineTotalObtainMarks)||0}),(0,i.jsx)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:(null==a?void 0:a.combineTotalMarks)||0}),(0,i.jsxs)("td",{className:"px-4 py-4 text-sm font-medium text-gray-900 lg:table-cell whitespace-nowrap border",children:[(null==a?void 0:null===(l=a.combineTotalPercentage)||void 0===l?void 0:l.toFixed(2))||0," %"]})]})},Q=e=>e>=90?"A":e>=80?"B":e>=70?"C":e>=60?"D":e>=40?"E":" "},50477:()=>{},39970:(e,l,t)=>{"use strict";t.d(l,{A:()=>i});let i=e=>e&&"string"==typeof e?e.replace(/\d+/,e=>" "+e+" ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,e=>e.toUpperCase()).replace(/ (\w)/g,e=>e.toUpperCase()).toLowerCase().replace(/(^\w|\s\w)/g,e=>e.toUpperCase()):e||""}},e=>{var l=l=>e(e.s=l);e.O(0,[29964,66256,66489,39201,46005,48287,87487,27214,90636,46593,38792],()=>l(50680)),_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.