1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8071],{70928:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reported-questions",function(){return r(90775)}])},85030:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var s=r(85893);function n(e){var t=e.className,r=void 0===t?"":t,n=e.title,l=void 0===n?"No content available":n,o=e.description;return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center gap-5 py-16 text-center ".concat(r),children:[(0,s.jsx)(a,{className:"h-40 w-40 md:h-44 md:w-44"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("h3",{className:"mb-0 max-w-md text-lg font-bold tracking-tight text-foreground md:text-xl",children:l}),o&&(0,s.jsx)("p",{className:"mb-0 max-w-md text-sm text-muted-foreground",children:o})]})]})}function a(e){var t=e.className,r=void 0===t?"":t;return(0,s.jsxs)("svg",{viewBox:"0 0 200 178",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",className:r,children:[(0,s.jsx)("circle",{cx:"100",cy:"82",r:"72",fill:"hsl(var(--primary))",opacity:"0.07"}),(0,s.jsx)("rect",{x:"54",y:"34",width:"76",height:"96",rx:"12",fill:"hsl(var(--muted))",stroke:"hsl(var(--border))",strokeWidth:"2"}),(0,s.jsx)("rect",{x:"67",y:"53",width:"50",height:"7",rx:"3.5",fill:"hsl(var(--muted-foreground))",opacity:"0.35"}),(0,s.jsx)("rect",{x:"67",y:"68",width:"38",height:"7",rx:"3.5",fill:"hsl(var(--muted-foreground))",opacity:"0.28"}),(0,s.jsx)("rect",{x:"67",y:"83",width:"44",height:"7",rx:"3.5",fill:"hsl(var(--muted-foreground))",opacity:"0.22"}),(0,s.jsx)("circle",{cx:"120",cy:"106",r:"27",fill:"hsl(var(--background))",stroke:"hsl(var(--primary))",strokeWidth:"5"}),(0,s.jsx)("circle",{cx:"120",cy:"106",r:"14",fill:"hsl(var(--primary))",opacity:"0.12"}),(0,s.jsx)("line",{x1:"141",y1:"127",x2:"160",y2:"146",stroke:"hsl(var(--primary))",strokeWidth:"7",strokeLinecap:"round"}),(0,s.jsx)("circle",{cx:"48",cy:"120",r:"3.5",fill:"hsl(var(--primary))",opacity:"0.4"}),(0,s.jsx)("circle",{cx:"150",cy:"44",r:"2.5",fill:"hsl(var(--primary))",opacity:"0.35"}),(0,s.jsx)("circle",{cx:"40",cy:"60",r:"2",fill:"hsl(var(--muted-foreground))",opacity:"0.3"})]})}},96708:function(e,t,r){"use strict";function s(e){return"ONGOING"===e?{label:"Ongoing",variant:"success"}:"COMPLETED"===e?{label:"Completed",variant:"muted"}:{label:"Upcoming",variant:"blue"}}function n(e){return e&&"string"===typeof e?e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim():""}r.d(t,{L:function(){return s},V:function(){return n}})},72685:function(e,t,r){"use strict";r.d(t,{I:function(){return d}});var s=r(26042),n=r(99534),a=r(85893),l=r(67294),o=r(62461),d=l.forwardRef((function(e,t){var r=e.className,l=e.type,d=(0,n.Z)(e,["className","type"]);return(0,a.jsx)("input",(0,s.Z)({type:l,className:(0,o.cn)("flex h-10 w-full rounded-md border border-foreground
1/50 bg-background px-3 py-2 text-base text-foreground file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-[13px]",r),ref:t},d))}));d.displayName="Input"},90775:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return P}});var s=r(47568),n=r(29815),a=r(97582),l=r(85893),o=r(67294),d=r(58533),i=r(47041),c=r(23302),u=r(20291),m=r(87764),x=r(8971),f=r(47737),h=r(34622),g=r(58272),b=r(39283),p=r(89885),v=r(96076),j=r(29061),y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return j.Z.get("/Test_Series/reported_questions",{baseURL:e,params:{start:t}}).then((function(e){return e.data}))},N=r(62461),w=r(96708),_=r(35739),k=r(72685),S=r(83609),C=r(85030),Z="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";function q(e){var t=e.search,r=e.onSearchChange,s=e.status,n=e.onStatusChange,a=e.counts,o=[{key:"all",label:"All",count:a.all},{key:"Pending",label:"Pending",count:a.Pending},{key:"Resolved",label:"Resolved",count:a.Resolved}];return(0,l.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[(0,l.jsxs)("div",{className:"relative w-full lg:max-w-2xl",children:[(0,l.jsx)(m.Z,{className:"pointer-events-none absolute left-4 top-1/2 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"}),(0,l.jsx)(k.I,{value:t,onChange:function(e){return r(e.target.value)},placeholder:"Search by question text, issue type, or ID\u2026",className:"h-12 rounded-xl pl-11 text-sm"})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:gap-3",children:[(0,l.jsxs)("span",{className:"mr-1 shrink-0 text-sm text-muted-foreground",children:[a.all," ",1===a.all?"report":"reports"]}),o.map((function(e){var t=s===e.key;return(0,l.jsxs)("button",{type:"button",onClick:function(){return n(e.key)},className:(0,N.cn)("inline-flex items-center gap-2 rounded-full border px-4 py-2 text-sm font-medium transition-colors",t?"border-transparent bg-foreground text-background":"border-border bg-card text-foreground hover:bg-accent"),children:[e.label,(0,l.jsx)("span",{className:(0,N.cn)("inline-flex min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-bold",t?"bg-background/20 text-background":"bg-muted text-muted-foreground"),children:e.count})]},e.key)}))]})]})}function L(e){var t=e.hasSearch,r=e.status;return(0,l.jsxs)("div",{className:"rounded-2xl border border-dashed border-border bg-card px-6 py-12 text-center",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-foreground",children:t?"No reports match your search":"No ".concat(r.toLowerCase()," reports loaded yet")}),(0,l.jsx)("p",{className:"mx-auto mt-1 max-w-sm text-sm leading-relaxed text-muted-foreground",children:"Scroll down to load more reports, or clear your search and filters."})]})}function R(e){var t=e.item,r=e.index,s=(0,c.J)(),n=(0,o.useRef)(null),a=(0,o.useState)(!1),d=a[0],i=a[1],m=(0,o.useState)(!1),g=m[0],b=m[1];(0,o.useEffect)((function(){var e=n.current;e&&b(e.scrollHeight>200)}),[t.question]);var p="Pending"===t.status?"bg-amber-500/10 text-amber-700 dark:bg-amber-500/15 dark:text-amber-400":"bg-emerald-500/10 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-400";return(0,l.jsxs)(u.E.article,{initial:!s&&{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.16,1,.3,1],delay:r%10*.045},className:"mb-6 overflow-hidden rounded-2xl border border-border bg-card",children:[(0,l.jsxs)("div",{className:"p-5 sm:p-6",children:[(0,l.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm",style:{fontFamily:Z},children:[(0,l.jsxs)("span",{className:"text-muted-foreground",children:["TestId: ",t.test_id]}),(0,l.jsx)("span",{"aria-hidden":"true",className:"text-border",children:"|"}),(0,l.jsxs)("span",{className:"font-bold text-foreground",children:["Q #",t.question_id]})]}),(0,l.jsx)("span",{className:(0,N.cn)("shrink-0 rounded-md px-2.5 py-1 text-xs font-semibold",p),children:t.status})]}),(0,l.jsxs)("div",{className:"relative overflow-hidden transition-[max-height] duration-300 ease-out motion-reduce:transition-none",style:{maxHeight:d?"9999px":176},children:[(0,l.jsx)("div",{ref:n,className:(0,N.cn)("text-[15px] leading-7 text-foreground","[&_p]:mb-2 [&_p:last-child]:mb-0","[&_ol]:mb-0 [&_ol]:mt-2.5 [&_ol]:list-[upper-alpha] [&_ol]:space-y-1 [&_ol]:pl-5","[&_ul]:mb-0 [&_ul]:mt-2.5 [&_ul]:list-disc [&_ul]:space-y-1 [&_ul]:pl-5","[&_li]:marker:font-bold [&_li]:marker:text-muted-foreground","[&_img]:my-2.5 [&_img]:max-w-full [&_img]:rounded-lg [&_img]:border [&_img]:border-border","[&_table]:my-2.5 [&_table]:w-full [&_table]:border-collapse [&_table]:overflow-hidden [&_table]:rounded-lg [&_table]:text-xs","[&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2 [&_th]:text-left [&_th]:font-bold","[&_td]:border [&_td]:border-border [&_td]:p-2","[&_blockquote]:my-2.5 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:italic [&_blockquote]:text-muted-foreground","[&_sup]:align-super [&_sup]:text-[0.7em]"),dangerouslySetInnerHTML:{__html:t.question}}),g&&!d&&(0,l.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-card via-card/80 to-transparent"})]}),g&&(0,l.jsxs)("button",{type:"button",onClick:function(){return i((function(e){return!e}))},"aria-expanded":d,className:"mt-3 inline-flex items-center gap-1 text-sm font-semibold text-blue-600 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 dark:text-blue-400",children:[d?"Show less":"Read more",(0,l.jsx)(x.Z,{className:(0,N.cn)("h-4 w-4 transition-transform duration-300",d&&"rotate-180"),"aria-hidden":"true"})]})]}),(0,l.jsx)("div",{className:"border-t border-border bg-muted/30 px-5 py-4 sm:px-6",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[t.student_issue&&(0,l.jsx)("span",{className:"inline-flex w-fit items-center rounded-md bg-muted px-2.5 py-1 text-sm font-semibold text-foreground",children:t.student_issue}),t.reason&&(0,l.jsxs)("p",{className:"mb-0 flex items-start gap-1.5 text-sm text-muted-foreground",children:[(0,l.jsx)(f.Z,{className:"mt-0.5 h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),(0,l.jsx)("span",{children:t.reason})]})]}),(0,l.jsxs)("div",{className:"shrink-0 text-left sm:text-right",children:[(0,l.jsx)("p",{className:"mb-0 text-xs text-muted-foreground",children:"Reported on"}),(0,l.jsxs)("p",{className:"mb-0 mt-0.5 flex items-center gap-1.5 text-sm font-semibold text-foreground sm:justify-end",style:{fontFamily:Z},children:[(0,l.jsx)(h.Z,{className:"h-3.5 w-3.5 text-muted-foreground","aria-hidden":"true"}),t.added_on]})]})]})})]})}function E(){return(0,l.jsx)("div",{"aria-hidden":"true",children:[0,1,2].map((function(e){return(0,l.jsxs)("div",{className:"mb-6 overflow-hidden rounded-2xl border border-border bg-card",children:[(0,l.jsxs)("div",{className:"p-5 sm:p-6",children:[(0,l.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"h-3.5 w-24 rounded bg-muted"}),(0,l.jsx)("div",{className:"h-3.5 w-20 rounded bg-muted"})]}),(0,l.jsx)("div",{className:"h-5 w-16 rounded-md bg-muted"})]}),(0,l.jsxs)("div",{className:"space-y-2.5",children:[(0,l.jsx)("div",{className:"h-3.5 w-full rounded bg-muted"}),(0,l.jsx)("div",{className:"h-3.5 w-11/12 rounded bg-muted"}),(0,l.jsx)("div",{className:"h-3.5 w-4/5 rounded bg-muted"}),(0,l.jsx)("div",{className:"h-3.5 w-3/4 rounded bg-muted"})]})]}),(0,l.jsx)("div",{className:"border-t border-border bg-muted/30 px-5 py-4 sm:px-6",children:(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)("div",{className:"h-6 w-28 rounded-md bg-muted"}),(0,l.jsx)("div",{className:"h-3.5 w-48 rounded bg-muted"})]}),(0,l.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(0,l.jsx)("div",{className:"h-3 w-20 rounded bg-muted"}),(0,l.jsx)("div",{className:"h-3.5 w-32 rounded bg-muted"})]})]})})]},e)}))})}function M(e){var t=e.onLogin;return(0,l.jsxs)("div",{className:"rounded-2xl border border-dashed border-border bg-card px-6 py-14 text-center",children:[(0,l.jsx)("div",{className:"mx-auto mb-4 flex h-11 w-11 items-center justify-center rounded-full border border-border bg-background",children:(0,l.jsx)(g.Z,{className:"h-5 w-5 text-muted-foreground","aria-hidden":"true"})}),(0,l.jsx)("h2",{className:"mb-1.5 text-lg font-bold tracking-tight text-foreground",children:"Sign in to track y
1our reports"}),(0,l.jsx)("p",{className:"mx-auto mb-6 max-w-sm text-sm leading-relaxed text-muted-foreground",children:"The questions you report during a test are tied to your account."}),(0,l.jsxs)(_.z,{onClick:t,children:[(0,l.jsx)(b.Z,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Log in"]})]})}var P=function(){var e=(0,o.useContext)(p.Z),t=e.hasSession,r=e.toggleAuthModal,c=e.setIsLogin,u=(0,o.useState)([]),m=u[0],x=u[1],f=(0,o.useState)(0),h=f[0],g=f[1],b=(0,o.useState)(!0),j=b[0],N=b[1],_=(0,o.useState)(!1),k=_[0],Z=_[1],P=(0,o.useState)("all"),I=P[0],T=P[1],O=(0,o.useState)(""),H=O[0],z=O[1],F=(0,o.useMemo)((function(){return{all:m.length,Pending:m.filter((function(e){return"Pending"===e.status})).length,Resolved:m.filter((function(e){return"Resolved"===e.status})).length}}),[m]),W=(0,o.useMemo)((function(){var e=H.trim().toLowerCase();return m.filter((function(t){return("all"===I||t.status===I)&&(!e||[(0,w.V)(t.question),t.student_issue,t.question_id,t.test_id,t.id].map((function(e){return String(null!==e&&void 0!==e?e:"").toLowerCase()})).join(" ").includes(e))}))}),[m,I,H]),A=(0,o.useCallback)((0,s.Z)((function(){var e,t,r,s,l,o=arguments;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:if(e=o.length>0&&void 0!==o[0]?o[0]:h,k||!j)return[2];a.label=1;case 1:return a.trys.push([1,3,4,5]),Z(!0),t=(0,i.getCookie)(v.z1),[4,y(t,e)];case 2:return r=a.sent(),0===(s=(null===r||void 0===r?void 0:r.data)||[]).length?N(!1):(x((function(e){return(0,n.Z)(e).concat((0,n.Z)(s))})),g((function(e){return e+10}))),[3,5];case 3:return l=a.sent(),console.error(l),N(!1),[3,5];case 4:return Z(!1),[7];case 5:return[2]}}
1))})),[h,k,j]);return(0,o.useEffect)((function(){t?(x([]),g(0),N(!0),A(0)):(x([]),g(0),N(!0))}),[t]),(0,l.jsxs)("div",{className:"mx-auto flex min-h-screen w-full max-w-7xl flex-col gap-6 px-4 py-6 lg:gap-12 lg:py-12",children:[(0,l.jsx)(S.Z,{breadcrumbs:[{label:"Home",href:"/"},{label:"Reported Questions"}],showCategoryRow:!1}),t?(0,l.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[m.length>0&&(0,l.jsx)(q,{search:H,onSearchChange:z,status:I,onStatusChange:T,counts:F}),(0,l.jsx)(d.Z,{dataLength:m.length,next:function(){return A(h)},hasMore:j,style:{overflow:"visible"},loader:(0,l.jsx)(E,{}),endMessage:0===m.length?(0,l.jsx)(C.Z,{}):null,children:m.length>0&&0===W.length?(0,l.jsx)(L,{hasSearch:!!H.trim(),status:I}):W.map((function(e,t){return(0,l.jsx)(R,{item:e,index:t},e.id)}))})]}):(0,l.jsx)(M,{onLogin:function(){c(!0),r()}})]})}}},function(e){e.O(0,[7732,3609,9774,2888,179],(function(){return t=70928,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.