1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1480],{89706:function(e,s,i){var n=i(94630),t=i(57437);s.Z=(0,n.Z)((0,t.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error")},1480:function(e,s,i){i.r(s),i.d(s,{default:function(){return W}});var n=i(57437),t=i(2265),r=i(19643),a=i(46387),l=i(67208),c=i(36137),o=i(62069),d=i(67571),x=i(78693),h=i(76631),j=i(37055),Z=i(30731),u=i(96369),m=i(44164),g=i(24902),p=i(70208),v=i(32281),b=i(54301),y=i(61201),w=i(59469),f=i(89706),I=i(94630),z=(0,I.Z)((0,n.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),S=(0,I.Z)((0,n.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),q=i(29821),C=(0,I.Z)((0,n.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group"),A=(0,I.Z)((0,n.jsx)("path",{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1m-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1"}),"QuestionAnswer"),M=i(94395),P=i(52700),L=i(9609);function W(e){let{result:s}=e,[i,I]=(0,t.useState)(new Set),[W,k]=(0,t.useState)(!1),B=e=>{let s=new Set(i);s.has(e)?s.delete(e):s.add(e),I(s)},N=s.validation.filter(e=>1===e.severity),T=s.validation.filter(e=>2===e.severity),D=s.validation.filter(e=>e.severity>=3);return(0,n.jsxs)(r.Z,{spacing:3,children:[(0,n.jsx)(r.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,n.jsx)(a.Z,{variant:"h6",fontWeight:600,children:"Inspection Results"})}),(0,n.jsx)(l.Z,{variant:"outlined",children:(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(a.Z,{variant:"subtitle1",fontWeight:600,gutterBottom:!0,children:"Survey Information"}),(0,n.jsxs)(o.ZP,{container:!0,spacing:2,children:[(0,n.jsxs)(o.ZP,{item:!0,xs:12,md:6,children:[(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"Title:"})," ",s.metadata.title]}),(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"Language:"})," ",s.metadata.language]}),(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"Status:"})," ",(0,n.jsx)(d.Z,{size:"small",label:s.metadata.active?"Active":"Inactive",color:s.metadata.active?"success":"default"})]})]}),(0,n.jsxs)(o.ZP,{item:!0,xs:12,md:6,children:[(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"Created:"})," ",s.metadata.created||"Unknown"]}),(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"Modified:"})," ",s.metadata.modified||"Unknown"]}),(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"File:"})," ",s.metadata.filename]})]})]}),s.metadata.description&&(0,n.jsx)(x.Z,{sx:{mt:2},children:(0,n.jsxs)(a.Z,{variant:"body2",children:[(0,n.jsx)("strong",{children:"Description:"})," ",s.metadata.description]})})]})}),(0,n.jsx)(l.Z,{variant:"outlined",children:(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(a.Z,{variant:"subtitle1",fontWeight:600,gutterBottom:!0,children:"Survey Statistics"}),(0,n.jsxs)(o.ZP,{container:!0,spacing:2,children:[(0,n.jsx)(o.ZP,{item:!0,xs:6,sm:3,children:(0,n.jsxs)(r.Z,{alignItems:"center",spacing:1,children:[(0,n.jsx)(C,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",children:s.stats.totalGroups}),(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Groups"})]})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sm:3,children:(0,n.jsxs)(r.Z,{alignItems:"center",spacing:1,children:[(0,n.jsx)(A,{color:"primary"}),(0,n.jsx)(a.Z,{variant:"h6",children:s.stats.totalQuestions}),(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Questions"})]})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sm:3,children:(0,n.jsxs)(r.Z,{alignItems:"center",spacing:1,children:[(0,n.jsx)(f.Z,{color:"warning"}),(0,n.jsx)(a.Z,{variant:"h6",children:s.stats.mandatoryQuestions}),(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"Mandatory"})]})}),(0,n.jsx)(o.ZP,{item:!0,xs:6,sm:3,children:(0,n.jsxs)(r.Z,{alignItems:"center",spacing:1,children:[(0,n.jsx)(M.Z,{color:"info"}),(0,n.jsx)(a.Z,{variant:"h6",children:s.stats.questionsWithLogic}),(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:"With Logic"})]})})]})]})}),(0,n.jsx)(l.Z,{variant:"outlined",children:(0,n.jsxs)(c.Z,{children:[(0,n.jsxs)(r.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:2},children:[(0,n.jsx)(a.Z,{variant:"subtitle1",fontWeight:600,children:"Validation Results"}),(0,n.jsx)(h.Z,{size:"small",onClick:()=>k(!W),children:W?"Hide Details":"Show Details"})]}),(0,n.jsxs)(r.Z,{direction:"row",spacing:2,sx:{mb:2},children:[N.length>0&&(0,n.jsx)(d.Z,{icon:(0,n.jsx)(f.Z,{}),label:"".concat(N.length," Critical"),color:"error",size:"small"}),T.length>0&&(0,n.jsx)(d.Z,{icon:(0,n.jsx)(z,{}),label:"".concat(T.length," Warnings"),color:"warning",size:"small"}),D.length>0&&(0,n.jsx)(d.Z,{icon:(0,n.jsx)(S,{}),label:"".concat(D.length," Info"),color:"info",size:"small"}),0===s.validation.length&&(0,n.jsx)(d.Z,{icon:(0,n.jsx)(q.Z,{}),label:"No Issues",color:"success",size:"small"})]}),W&&s.validation.length>0&&(0,n.jsxs)(r.Z,{spacing:2,children:[N.length>0&&(0,n.jsxs)(x.Z,{children:[(0,n.jsxs)(a.Z,{variant:"subtitle2",color:"error.main",gutterBottom:!0,children:["Critical Issues (",N.length,")"]}),(0,n.jsx)(r.Z,{spacing:1,children:N.map((e,s)=>(0,n.jsx)(j.Z,{severity:"error",icon:(0,n.jsx)(f.Z,{}),sx:{"& .MuiAlert-message":{width:"100%"},border:"1px solid",borderColor:"error.main"},children:(0,n.jsxs)(r.Z,{spacing:1,children:[(0,n.jsx)(a.Z,{variant:"body2",fontWeight:500,children:e.message}),(e.questionId||e.groupId)&&(0,n.jsxs)(r.Z,{direction:"row",spacing:2,children:[e.questionId&&(0,n.jsx)(d.Z,{size:"small",label:"Question: ".concat(e.questionId),variant:"outlined",color:"error"}),e.groupId&&(0,n.jsx)(d.Z,{size:"small",label:"Group: ".concat(e.groupId),variant:"outlined",color:"error"})]})]})},"critical-".concat(s)))})]}),T.length>0&&(0,n.jsxs)(x.Z,{children:[(0,n.jsxs)(a.Z,{variant:"subtitle2",color:"warning.main",gutterBottom:!0,children:["Warnings (",T.length,")"]}),(0,n.jsx)(r.Z,{spacing:1,children:T.map((e,s)=>(0,n.jsx)(j.Z,{severity:"warning",icon:(0,n.jsx)(z,{}),sx:{"& .MuiAlert-message":{width:"100%"}},children:(0,n.jsxs)(r.Z,{spacing:1,children:[(0,n.jsx)(a.Z,{variant:"body2",children:e.message}),(e.questionId||e.groupId)&&(0,n.jsxs)(r.Z,{direction:"row",spacing:2,children:[e.questionId&&(0,n.jsx)(d.Z,{size:"small",label:"Question: ".concat(e.questionId),variant:"outlined",color:"warning"}),e.groupId&&(0,n.jsx)(d.Z,{size:"small",label:"Group: ".concat(e.groupId),variant:"outlined",color:"warning"})]})]})},"warning-".concat(s)))})]}),D.length>0&&(0,n.jsxs)(x.Z,{children:[(0,n.jsxs)(a.Z,{variant:"subtitle2",color:"info.main",gutterBottom:!0,children:["Information (",D.length,")"]}),(0,n.jsx)(r.Z,{spacing:1,children:D.map((e,s)=>(0,n.jsx)(j.Z,{severity:"info",icon:(0,n.jsx)(S,{}),sx:{"& .MuiAlert-message":{width:"100%"}},children:(0,n.jsx)(a.Z,{variant:"body2",children:e.message})},"info-".concat(s)))})]})]})]})}),(0,n.jsxs)(x.Z,{children:[(0,n.jsxs)(a.Z,{variant:"subtitle1",fontWeight:600,gutterBottom:!0,children:["Survey Structure (",s.groups.length," groups)"]}),s.groups.map(e=>{let t=s.questions.filter(s=>s.groupId===e.id),l=i.has(e.id);return(0,n.jsxs)(Z.Z,{expanded:l,onChange:()=>B(e.id),sx:{mb:1}
1,children:[(0,n.jsx)(u.Z,{expandIcon:(0,n.jsx)(P.Z,{}),children:(0,n.jsxs)(r.Z,{direction:"row",spacing:2,alignItems:"center",sx:{width:"100%"},children:[(0,n.jsx)(a.Z,{fontWeight:600,sx:{flex:1},children:e.name}),(0,n.jsx)(d.Z,{size:"small",label:"".concat(t.length," questions")}),(0,n.jsx)(d.Z,{size:"small",label:"Order: ".concat(e.order),variant:"outlined"})]})}),(0,n.jsxs)(m.Z,{children:[e.description&&(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",sx:{mb:2},children:e.description}),(0,n.jsx)(r.Z,{spacing:2,children:t.map(e=>{let i=s.validation.filter(s=>s.questionId===e.id),t=i.some(e=>1===e.severity),l=i.some(e=>2===e.severity);return(0,n.jsxs)(Z.Z,{defaultExpanded:!1,sx:{border:t?"2px solid":l?"1px solid":"none",borderColor:t?"error.main":l?"warning.main":"transparent",backgroundColor:t?"error.50":l?"warning.50":"transparent"},children:[(0,n.jsx)(u.Z,{expandIcon:(0,n.jsx)(P.Z,{}),children:(0,n.jsxs)(r.Z,{direction:"row",spacing:1,alignItems:"start",sx:{width:"100%"},children:[(0,n.jsxs)(x.Z,{sx:{flex:1},children:[(0,n.jsxs)(r.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,n.jsx)(a.Z,{fontWeight:500,children:e.code}),t&&(0,n.jsx)(g.Z,{title:"This question has critical issues",children:(0,n.jsx)(f.Z,{color:"error",fontSize:"small"})}),l&&!t&&(0,n.jsx)(g.Z,{title:"This question has warnings",children:(0,n.jsx)(z,{color:"warning",fontSize:"small"})})]}),(0,n.jsx)(a.Z,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:e.text||"(No question text)"}),i.length>0&&(0,n.jsx)(x.Z,{sx:{mt:1},children:i.map((e,s)=>(0,n.jsxs)(a.Z,{variant:"caption",color:1===e.severity?"error.main":"warning.main",sx:{display:"block"},children:["⢠",e.message]},s))})]}),(0,n.jsxs)(r.Z,{direction:"row",spacing:1,children:[(0,n.jsx)(d.Z,{size:"small",label:L.j[e.type]||e.type,variant:"outlined"}),e.mandatory&&(0,n.jsx)(d.Z,{size:"small",label:"Required",color:"warning"})]})]})}),(0,n.jsx)(m.Z,{children:(0,n.jsxs)(r.Z,{spacing:2,children:[(0,n.jsxs)(o.ZP,{container:!0,spacing:2,children:[(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,children:(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",children:["Type: ",L.j[e.type]||e.type]})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,children:(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",children:["Order: ",e.order]})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,children:(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",children:["Mandatory: ",e.mandatory?"Yes":"No"]})}),(0,n.jsx)(o.ZP,{item:!0,xs:12,sm:6,children:(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",children:["Other option: ",e.other?"Yes":"No"]})})]}),e.relevance&&"1"!==e.relevance&&(0,n.jsx)(x.Z,{children:(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",children:["Logic condition: ",e.relevance]})}),e.help&&(0,n.jsx)(x.Z,{children:(0,n.jsxs)(a.Z,{variant:"caption",color:"text.secondary",children:["Help text: ",e.help]})}),e.answers.length>0&&(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(a.Z,{variant:"subtitle2",gutterBottom:!0,children:"Answer Options"}),(0,n.jsxs)(p.Z,{size:"small",children:[(0,n.jsx)(v.Z,{children:(0,n.jsxs)(b.Z,{children:[(0,n.jsx)(y.Z,{width:100,children:"Code"}),(0,n.jsx)(y.Z,{children:"Text"})]})}),(0,n.jsx)(w.Z,{children:e.answers.map((e,s)=>(0,n.jsxs)(b.Z,{children:[(0,n.jsx)(y.Z,{children:e.code}),(0,n.jsx)(y.Z,{children:e.text})]},s))})]})]}),e.subquestions.length>0&&(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(a.Z,{variant:"subtitle2",gutterBottom:!0,children:"Sub-questions"}),(0,n.jsxs)(p.Z,{size:"small",children:[(0,n.jsx)(v.Z,{children:(0,n.jsxs)(b.Z,{children:[(0,n.jsx)(y.Z,{width:100,children:"Code"}),(0,n.jsx)(y.Z,{children:"Text"})]})}),(0,n.jsx)(w.Z,{children:e.subquestions.map((e,s)=>(0,n.jsxs)(b.Z,{children:[(0,n.jsx)(y.Z,{children:e.code}),(0,n.jsx)(y.Z,{children:e.text})]},s))})]})]}),Object.keys(e.attributes).length>0&&(0,n.jsxs)(x.Z,{children:[(0,n.jsx)(a.Z,{variant:"subtitle2",gutterBottom:!0,children:"Attributes"}),(0,n.jsx)(a.Z,{variant:"caption",color:"text.secondary",children:Object.entries(e.attributes).map(e=>{let[s,i]=e;return"".concat(s,"=").concat(i)}).join("; ")})]})]})})]},e.id)})})]})]},e.id)})]})]})}},9609:function(e,s,i){i.d(s,{j:function(){return n}});let n={T:"Long free text",S:"Short free text",U:"Huge free text",N:"Numerical input",D:"Date/Time",5:"5 point choice",L:"List (Radio)",O:"List with comment",M:"Multiple choice",P
1:"Multiple choice with comments",A:"Array (5 point choice)",B:"Array (10 point choice)",C:"Array (Yes/No/Uncertain)",E:"Array (Increase/Same/Decrease)",F:"Array (Flexible Labels)",H:"Array (Flexible Labels) by Column",Q:"Multiple short text",K:"Multiple numerical input",G:"Gender",Y:"Yes/No",I:"Language switch",X:"Boilerplate question","!":"List (Dropdown)",":":"Array (Numbers)",";":"Array (Texts)","|":"File upload","*":"Equation",R:"Ranking"}}}]);
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.