PageSourceSearch

https://clubbolivar.com/assets/AdminFidelidadQuizzes-1vTcSjkq.js

js clubbolivar.com collected 2026-09-24 23:40:42 UTC 19,462 bytes, 2 lines download raw bytes

1import{r as g,j as e}from"./index-C86y2ZZw.js";import{ai as Te,u as P,bG as ke,i as x,bI as G,v as Q,ab as B,B as Z,bj as W,D as X,a as J,b as Y,c as ee,ao as h,I as y,bo as se,bp as te,bq as ie,br as ae,bs as T,cQ as ne,by as De,z as Ee,aC as Ie,aD as Fe,V as Oe,_ as Le,a8 as Be,bH as Ve,aP as re,aQ as oe,aR as ce,aS as le,aT as de,aU as me,aV as ue,aW as xe,w as _}from"./App-BsV2Qj_s.js";import{s as d}from"./client-DMrl-iUj.js";import{u as V}from"./useMutation-LFYmL0kD.js";import{T as $e}from"./textarea-CGKHQQc9.js";import{T as pe,a as he,b as k,c as m,d as _e,e as u}from"./table-CY4dzb33.js";import{P as $}from"./plus-HguvGPAG.js";import{B as je}from"./brain-C_rLJuSC.js";import{P as Ke}from"./pencil-C7bfbJMB.js";import{D as Re}from"./download-Bzf4CL-Y.js";import{B as Ue}from"./ban-HOf1jFgG.js";const K={title:"",description:"",image_url:"",is_active:!0,max_attempts:1,time_limit_seconds:null,valid_from:"",valid_until:"",point_action_id:"",questions:[]},He={question_text:"",question_type:"single_choice",sort_order:0,points_weight:1,options:[{option_text:"",is_correct:!0,sort_order:0},{option_text:"",is_correct:!1,sort_order:1}]};function as(){const[ge,N]=g.useState(!1),[f,z]=g.useState(null),[r,l]=g.useState(K),[D,E]=g.useState(null),[w,R]=g.useState(null),[U,fe]=g.useState(""),[v,I]=g.useState(null),C=Te(),S=V({mutationFn:async({attempt_id:s,reason:t})=>{const{data:i,error:a}=await d.functions.invoke("void-quiz-attempt",{body:{attempt_id:s,reason:t||"Anulado por administrador"}});if(a)throw new Error(a.message);if(!(i!=null&&i.success))throw new Error((i==null?void 0:i.error)||"Error al anular");return i},onSuccess:s=>{_.success(`Intento anulado${s.points_reversed?` · ${s.points_reversed} pts revertidos`:""}`),I(null),C.invalidateQueries({queryKey:["admin-quiz-participants"]}),C.invalidateQueries({queryKey:["admin-quiz-attempt-counts"]})},onError:s=>_.error(s.message)}),{data:H=[],isLoading:ve}=P({queryKey:["admin-quizzes"],queryFn:async()=>{const{data:s,error:t}=await d.from("quizzes").select("*, point_actions(name)").order("sort_order");if(t)throw t;return s||[]}}),{data:ye={}}=P({queryKey:["admin-quiz-attempt-counts"],retry:!1,queryFn:async()=>{const{data:s,error:t}=await d.from("quiz_attempts").select("quiz_id, family_profile_id");if(t)throw t;const i={};for(const n of s||[])i[n.quiz_id]||(i[n.quiz_id]=new Set),i[n.quiz_id].add(n.family_profile_id);const a={};for(const[n,c]of Object.entries(i))a[n]=c.size;return a}}),{data:b=[],isLoading:Ne,error:we}=P({queryKey:["admin-quiz-participants",w],enabled:!!w,retry:!1,queryFn:async()=>{if(!w)return[];const{data:s,error:t}=await d.from("quiz_attempts").select("id, family_profile_id, correct_count, total_questions, score_percentage, points_earned, completed_at").eq("quiz_id",w).order("completed_at",{ascending:!1});if(t)throw t;const i=Array.from(new Set((s||[]).map(n=>n.family_profile_id).filter(Boolean)));let a={};if(i.length>0){const{data:n}=await d.from("profiles").select("id, full_name, email, member_code").in("id",i);a=(n||[]).reduce((c,o)=>(c[o.id]={full_name:o.full_name,email:o.email,member_code:o.member_code},c),{})}return(s||[]).map(n=>({...n,profiles:a[n.family_profile_id]||null}))}}),{data:F=[]}=P({queryKey:["trivia-point-actions"],queryFn:async()=>{const{data:s,error:t}=await d.from("point_actions").select("id, name, points, calculation_mode, ratio_per_amount, ratio_unit_amount").eq("category","trivia").eq("is_active",!0).order("name");if(t)throw t;return s||[]}}),q=F.find(s=>s.id===r.point_action_id),be=async s=>{const{data:t}=await d.from("quizzes").select("*").eq("id",s).single();if(!t)return;const{data:i}=await d.from("quiz_questions").select("*, quiz_question_options(*)").eq("quiz_id",s).order("sort_order"),a=(i||[]).map(n=>({id:n.id,question_text:n.question_text,question_type:n.question_type,sort_order:n.sort_order,points_weight:n.points_weight,image_url:n.image_url,options:(n.quiz_question_options||[]).sort((c,o)=>c.sort_order-o.sort_order).map(c=>({id:c.id,option_text:c.option_text,is_correct:c.is_correct,sort_order:c.sort_order}))}));
1l({title:t.title,description:t.description||"",image_url:t.image_url||"",is_active:t.is_active,max_attempts:t.max_attempts,time_limit_seconds:t.time_limit_seconds,valid_from:t.valid_from?t.valid_from.slice(0,16):"",valid_until:t.valid_until?t.valid_until.slice(0,16):"",point_action_id:t.point_action_id||"",questions:a}),z(s),N(!0)},O=V({mutationFn:async()=>{let s=null;if(r.point_action_id){const{data:a,error:n}=await d.from("point_actions").select("id, category, is_active").eq("id",r.point_action_id).maybeSingle();if(n)throw n;a?a.category!=="trivia"?_.warning("La acción seleccionada no es de categoría Trivia/Quiz. Se guardará sin acción vinculada."):a.is_active?s=a.id:_.warning("La acción seleccionada está inactiva. Se guardará sin acción vinculada."):_.warning("La acción seleccionada ya no existe. Se guardará sin acción vinculada.")}const t={title:r.title,description:r.description||null,image_url:r.image_url||null,is_active:r.is_active,max_attempts:r.max_attempts,time_limit_seconds:r.time_limit_seconds,valid_from:r.valid_from||null,valid_until:r.valid_until||null,point_action_id:s};r.point_action_id&&!s&&l(a=>({...a,point_action_id:""}));let i;if(f){const{error:a}=await d.from("quizzes").update(t).eq("id",f);if(a)throw a;i=f,await d.from("quiz_questions").delete().eq("quiz_id",i)}else{const{data:a,error:n}=await d.from("quizzes").insert(t).select("id").single();if(n)throw n;i=a.id}for(const[a,n]of r.questions.entries()){const{data:c,error:o}=await d.from("quiz_questions").insert({quiz_id:i,question_text:n.question_text,question_type:n.question_type,sort_order:a,points_weight:n.points_weight,image_url:n.image_url||null}).select("id").single();if(o)throw o;const p=n.options.map((j,A)=>({question_id:c.id,option_text:j.option_text,is_correct:j.is_correct,sort_order:A}));if(p.length){const{error:j}=await d.from("quiz_question_options").insert(p);if(j)throw j}}},onSuccess:()=>{_.success(f?"Quiz actualizado":"Quiz creado"),C.invalidateQueries({queryKey:["admin-quizzes"]}),N(!1),z(null),l(K)},onError:s=>_.error(s.message)}),qe=V({mutationFn:async s=>{const{error:t}=await d.from("quizzes").delete().eq("id",s);if(t)throw t},onSuccess:()=>{_.success("Quiz eliminado"),C.invalidateQueries({queryKey:["admin-quizzes"]}),E(null)},onError:s=>_.error(s.message)}),ze=()=>l(s=>({...s,questions:[...s.questions,{...He,sort_order:s.questions.length}]})),L=(s,t)=>l(i=>({...i,questions:i.questions.map((a,n)=>n===s?{...a,...t}:a)})),Ce=s=>l(t=>({...t,questions:t.questions.filter((i,a)=>a!==s)})),Se=s=>l(t=>({...t,questions:t.questions.map((i,a)=>a===s?{...i,options:[...i.options,{option_text:"",is_correct:!1,sort_order:i.options.length}]}:i)})),M=(s,t,i)=>l(a=>({...a,questions:a.questions.map((n,c)=>c===s?{...n,options:n.options.map((o,p)=>p===t?{...o,...i}:i.is_correct&&n.question_type==="single_choice"?{...o,is_correct:!1}:o)}:n)})),Ae=(s,t)=>l(i=>({...i,questions:i.questions.map((a,n)=>n===s?{...a,options:a.options.filter((c,o)=>o!==t)}:a)})),Pe=()=>{z(null),l(K),N(!0)},Qe=r.title.trim()&&r.questions.length>0&&r.questions.every(s=>s.question_text.trim()&&s.options.length>=2&&s.options.some(t=>t.is_correct)&&s.options.every(t=>t.option_text.trim()));return e.jsx(ke,{children:e.jsxs("div",{className:"space-y-6 p-6 animate-fade-in",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"font-display text-2xl font-bold tracking-wider",children:"TRIVIAS / QUIZZES"}),e.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Gestiona quizzes vinculados al sistema de puntos."})]}),e.jsxs(x,{onClick:Pe,children:[e.jsx($,{className:"h-4 w-4 mr-2"}),"Nuevo Quiz"]})]}),e.jsx(G,{}),ve?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(Q,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):H.length===0?e.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[e.jsx(je,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),e.jsx("p",{children:"No hay quizzes creados aún."})]}):e.jsx("div",{className:"border rounded-lg overflow-hidden",children:e.jsxs(pe,{children:[e.jsx(he,{children:e.jsxs(k,{children:[e.jsx(m,{children:"Título"}),e.jsx(m,{children:"Acción de Puntos"}),e.jsx(m,{className:"text-center",children:"Participantes"}),e.jsx(m,{className:"text-center",children:"Intentos máx."}),e.jsx(m,{className:"text-center",children:"Estado"}),e.jsx(m,{className:"text-right",children:"Acciones"})]})}),e.jsx(_e,{children:H.map(s=>{var t;return e.jsxs(k,{children:[e.jsx(u,{className:"font-medium",children:s.title}),e.jsx(u,{className:"text-sm text-muted-foreground",children:((t=s.point_actions)==null?void 0:t.name)||"—"}),e.jsx(u,{className:"text-center",children:e.jsxs(x,{variant:"ghost",size:"sm",className:"gap-1.5",onClick:()=>{R(s.id),fe(s.title)},children:[e.jsx(B,{className:"h-3.5 w-3.5"}),ye[s.id]||0]})}),e.jsx(u,{className:"text-center",children:s.max_attempts}),e.jsx(u,{className:"text-center",children:e.jsx(Z,{variant:s.is_active?"default":"secondary",children:s.is_active?"Activo":"Inactivo"})}),e.jsxs(u,{className:"text-right space-x-1",children:[e.jsx(x,{variant:"ghost",size:"icon",onClick:()=>be(s.id),children:e.jsx(Ke,{className:"h-4 w-4"})}),e.jsx(x,{variant:"ghost",size:"icon",onClick:()=>E(s.id),children:e.jsx(W,{className:"h-4 w-4 text-destructive"})})]})]},s.id)})})]})}),e.jsx(X,{open:ge,onOpenChange:s=>{s||(N(!1),z(null))},children:e.jsxs(J,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[e.jsx(Y,{children:e.jsx(ee,{children:f?"Editar Qu
1iz":"Nuevo Quiz"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Título *"}),e.jsx(y,{value:r.title,onChange:s=>l(t=>({...t,title:s.target.value})),placeholder:"Trivia del mes"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Acción de Puntos vinculada"}),e.jsxs(se,{value:r.point_action_id||"none",onValueChange:s=>l(t=>({...t,point_action_id:s==="none"?"":s})),children:[e.jsx(te,{children:e.jsx(ie,{placeholder:"Seleccionar acción trivia"})}),e.jsxs(ae,{children:[e.jsx(T,{value:"none",children:"Sin acción vinculada"}),F.map(s=>e.jsx(T,{value:s.id,children:s.name},s.id))]})]}),F.length===0?e.jsxs("p",{className:"text-xs text-muted-foreground",children:['Crea primero una acción de puntos con categoría "Trivia / Quiz" en'," ",e.jsx("a",{href:"/admin/fidelidad/acciones",className:"underline text-primary",children:"Acciones de Puntos"}),"."]}):q?e.jsx("p",{className:"text-xs text-muted-foreground",children:q.calculation_mode==="ratio"?`${q.ratio_per_amount} pts por cada Bs ${q.ratio_unit_amount}`:`${q.points} pts por acción`}):null]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Descripción"}),e.jsx($e,{value:r.description,onChange:s=>l(t=>({...t,description:s.target.value})),rows:2})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Intentos máx."}),e.jsx(y,{type:"number",min:1,value:r.max_attempts,onChange:s=>l(t=>({...t,max_attempts:parseInt(s.target.value)||1}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Tiempo límite (seg)"}),e.jsx(y,{type:"number",min:0,value:r.time_limit_seconds??"",onChange:s=>l(t=>({...t,time_limit_seconds:s.target.value?parseInt(s.target.value):null})),placeholder:"Sin límite"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Válido desde"}),e.jsx(ne,{value:r.valid_from,onChange:s=>l(t=>({...t,valid_from:s}))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{children:"Válido hasta"}),e.jsx(ne,{value:r.valid_until,onChange:s=>l(t=>({...t,valid_until:s}))})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(De,{checked:r.is_active,onCheckedChange:s=>l(t=>({...t,is_active:s}))}),e.jsx(h,{children:"Activo"})]}),e.jsx(G,{}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h3",{className:"font-semibold text-lg",children:["Preguntas (",r.questions.length,")"]}),e.jsxs(x,{variant:"outline",size:"sm",onClick:ze,children:[e.jsx($,{className:"h-4 w-4 mr-1"}),"Pregunta"]})]}),r.questions.map((s,t)=>e.jsxs(Ee,{className:"border-border",children:[e.jsx(Ie,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(Fe,{className:"text-sm font-medium text-muted-foreground",children:["Pregunta ",t+1]}),e.jsx(x,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>Ce(t),children:e.jsx(W,{className:"h-3.5 w-3.5 text-destructive"})})]})}),e.jsxs(Oe,{className:"space-y-3",children:[e.jsx(y,{value:s.question_text,onChange:i=>L(t,{question_text:i.target.value}),placeholder:"¿Cuál es la pregunta?"}),e.jsxs("div",{className:"flex gap-3 items-center",children:[e.jsxs(se,{value:s.question_type,onValueChange:i=>L(t,{question_type:i}),children:[e.jsx(te,{className:"w-48",children:e.jsx(ie,{})}),e.jsxs(ae,{children:[e.jsx(T,{value:"single_choice",children:"Opción única"}),e.jsx(T,{value:"multiple_choice",children:"Opción múltiple"})]})]}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(h,{className:"text-xs",children:"Peso:"}),e.jsx(y,{type:"number",min:1,className:"w-16 h-8 text-xs",value:s.points_weight,onChange:i=>L(t,{points_weight:parseInt(i.target.value)||1})})]})]}),e.jsxs("div",{className:"space-y-2 pl-4 border-l-2 border-muted",children:[s.options.map((i,a)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>M(t,a,{is_correct:!i.is_correct}),className:`h-5 w-5 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors ${i.is_correct?"border-primary bg-primary text-primary-foreground":"border-muted-foreground
1/30"}`,children:i.is_correct&&e.jsx(Le,{className:"h-3 w-3"})}),e.jsx(y,{value:i.option_text,onChange:n=>M(t,a,{option_text:n.target.value}),placeholder:`Opción ${a+1}`,className:"h-8 text-sm"}),s.options.length>2&&e.jsx(x,{variant:"ghost",size:"icon",className:"h-7 w-7 shrink-0",onClick:()=>Ae(t,a),children:e.jsx(Be,{className:"h-3.5 w-3.5"})})]},a)),s.options.length<6&&e.jsxs(x,{variant:"ghost",size:"sm",className:"text-xs",onClick:()=>Se(t),children:[e.jsx($,{className:"h-3 w-3 mr-1"}),"Opción"]})]})]})]},t)),r.questions.length===0&&e.jsxs("div",{className:"text-center py-8 text-muted-foreground border rounded-lg border-dashed",children:[e.jsx(je,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"Agrega al menos una pregunta"})]})]})]}),e.jsxs(Ve,{children:[e.jsx(x,{variant:"outline",onClick:()=>N(!1),children:"Cancelar"}),e.jsxs(x,{onClick:()=>O.mutate(),disabled:!Qe||O.isPending,children:[O.isPending&&e.jsx(Q,{className:"h-4 w-4 mr-2 animate-spin"}),f?"Guardar":"Crear"]})]})]})}),e.jsx(re,{open:!!D,onOpenChange:s=>!s&&E(null),children:e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"¿Eliminar quiz?"}),e.jsx(de,{children:"Se eliminarán también todas las preguntas e intentos asociados."})]}),e.jsxs(me,{children:[e.jsx(ue,{children:"Cancelar"}),e.jsx(xe,{onClick:()=>D&&qe.mutate(D),className:"bg-destructive text-destructive-foreground",children:"Eliminar"})]})]})}),e.jsx(X,{open:!!w,onOpenChange:s=>{s||R(null)},children:e.jsxs(J,{className:"max-w-3xl max-h-[85vh] overflow-y-auto",children:[e.jsx(Y,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(ee,{children:["Participantes — ",U]}),e.jsxs(x,{variant:"outline",size:"sm",className:"gap-1.5",disabled:b.length===0,onClick:()=>{const s=["Nombre","Email","Código Socio","Correctas","Total Preguntas","Puntaje %","Puntos Ganados","Fecha"],t=b.map(o=>{var p,j,A;return[((p=o.profiles)==null?void 0:p.full_name)||"—",((j=o.profiles)==null?void 0:j.email)||"—",((A=o.profiles)==null?void 0:A.member_code)||"—",o.correct_count,o.total_questions,o.score_percentage,o.points_earned,new Date(o.completed_at).toLocaleString("es-BO")]}),i=[s,...t].map(o=>o.map(p=>`"${String(p).replace(/"/g,'""')}"`).join(",")).join(`
2`),a=new Blob(["\uFEFF"+i],{type:"text/csv;charset=utf-8;"}),n=URL.createObjectURL(a),c=document.createElement("a");c.href=n,c.download=`participantes_${U.replace(/\s+/g,"_")}.csv`,c.click(),URL.revokeObjectURL(n)},children:[e.jsx(Re,{className:"h-3.5 w-3.5"}),"Exportar CSV"]})]})}),Ne?e.jsx("div",{className:"flex justify-center py-8",children:e.jsx(Q,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):we?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(B,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No se pudo cargar la lista de participantes."})]}):b.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(B,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"Nadie ha participado aún en este quiz."})]}):e.jsx("div",{className:"border rounded-lg overflow-hidden",children:e.jsxs(pe,{children:[e.jsx(he,{children:e.jsxs(k,{children:[e.jsx(m,{children:"Nombre"}),e.jsx(m,{children:"Email"}),e.jsx(m,{className:"text-center",children:"Correctas"}),e.jsx(m,{className:"text-center",children:"Puntaje"}),e.jsx(m,{className:"text-center",children:"Puntos"}),e.jsx(m,{children:"Fecha"}),e.jsx(m,{className:"text-right",children:"Acciones"})]})}),e.jsx(_e,{children:b.map(s=>{var t,i;return e.jsxs(k,{children:[e.jsx(u,{className:"font-medium",children:((t=s.profiles)==null?void 0:t.full_name)||"—"}),e.jsx(u,{className:"text-sm text-muted-foreground",children:((i=s.profiles)==null?void 0:i.email)||"—"}),e.jsxs(u,{className:"text-center",children:[s.correct_count,"/",s.total_questions]}),e.jsx(u,{className:"text-center",children:e.jsxs(Z,{variant:Number(s.score_percentage)>=70?"default":"secondary",children:[s.score_percentage,"%"]})}),e.jsx(u,{className:"text-center",children:s.points_earned}),e.jsx(u,{className:"text-sm",children:new Date(s.completed_at).toLocaleStr
2ing("es-BO")}),e.jsx(u,{className:"text-right",children:e.jsxs(x,{variant:"ghost",size:"sm",className:"h-8 gap-1 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>{var a;return I({id:s.id,name:((a=s.profiles)==null?void 0:a.full_name)||"Participante"})},children:[e.jsx(Ue,{className:"h-3.5 w-3.5"}),"Anular"]})})]},s.id)})})]})}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Total: ",b.length," intento(s) de participantes únicos"]})]})}),e.jsx(re,{open:!!v,onOpenChange:s=>{s||I(null)},children:e.jsxs(oe,{children:[e.jsxs(ce,{children:[e.jsx(le,{children:"Anular participación"}),e.jsxs(de,{children:["Se eliminará el intento de ",e.jsx("strong",{children:v==null?void 0:v.name})," y se revertirán los puntos ganados. El socio podrá volver a realizar la trivia."]})]}),e.jsxs(me,{children:[e.jsx(ue,{disabled:S.isPending,children:"Cancelar"}),e.jsxs(xe,{disabled:S.isPending,onClick:s=>{s.preventDefault(),v&&S.mutate({attempt_id:v.id})},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[S.isPending&&e.jsx(Q,{className:"h-4 w-4 mr-2 animate-spin"}),"Anular intento"]})]})]})})]})})}export{as as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.