PageSourceSearch

https://www.chargeops.net/assets/organizations-CrcOVthh.js

js chargeops.net collected 2026-10-02 02:02:05 UTC 19,076 bytes, 1 lines download raw bytes

1import{r as m,j as e}from"./vendor-react-QE7wLE3r.js";import{a as U,m as ne,p as G,o as z,b2 as ue,bR as ee,bZ as he,D as ge,d as pe,Q as fe,e as je,J as I,I as Q,b as r,ar as be,E as S,h as $,bL as ie,aM as ve,aN as Ne,aO as ye,aP as ke,aR as Ce,aS as Oe,aT as we,x as ze,y as Se,n as Y,bI as R,N as Z,M as De,U as oe,X as re,ap as Ee,O as le,bQ as Ae,bU as Fe,L as ce,b5 as de,T as Me,c3 as te,bq as Re,bF as Te}from"./index-C5UqyXey.js";import{S as se}from"./switch-GFOdBmHE.js";import{S as q}from"./stat-tile-DNHiWuu4.js";import{S as Le}from"./settings-section-shell-CLKnME1b.js";import{m as w,A as Pe}from"./vendor-motion-DpnOviVe.js";import{C as _e}from"./circle-dashed-sELSrrHn.js";import{P as Ie}from"./pencil-B7Zk3_70.js";import"./vendor-radix-C7HJG0re.js";import"./cleo-stat-tile-DVNwbhMw.js";const Ue={nameRequired:"orgNameRequired",nameTooLong:"orgNameTooLong",nameAlreadyTaken:"orgNameAlreadyTaken",invalidColor:"orgInvalidColor",organizationNotFound:"organizationNotFound"};function $e(t){return t instanceof ie?typeof t.data=="string"?t.data:null:t instanceof Error?t.message:null}function He({org:t,open:n,onOpenChange:s}){const{language:d}=U(),a=(c,N)=>$(d,c,N),{toast:j}=ne(),h=G(z.organizations.mutations.create),p=G(z.organizations.mutations.update),[x,b]=m.useState(""),[l,o]=m.useState(null),[f,k]=m.useState(!1),[D,O]=m.useState(!1),[E,T]=m.useState(!1),{isConfigTabVisible:H}=ue(),L=H("visitNotices"),[B,P]=m.useState(!1),[A,F]=m.useState(null);m.useEffect(()=>{n&&(b(t?.name??""),o(t?.color??null),k(!!t?.color&&!ee.includes(t.color)),O(t?.satisfactionOptOut===!0),T(t?.visitNoticeOptOut===!0),F(null))},[n,t]);const _=l??he(x||"default"),W=async()=>{P(!0),F(null);try{if(t){const c=t.satisfactionOptOut===!0,N=t.visitNoticeOptOut===!0;await p({id:t._id,name:x,color:l===null?null:l,...D!==c?{satisfactionOptOut:D}:{},...E!==N?{visitNoticeOptOut:E}:{}}),j({title:a("organizationUpdated")})}else await h({name:x,color:l??void 0}),j({title:a("organizationCreated")});s(!1)}catch(c){const N=$e(c),C=N?Ue[N]:null;F(a(C||"common.error"))}finally{P(!1)}};return e.jsx(ge,{open:n,onOpenChange:s,children:e.jsxs(pe,{children:[e.jsx(fe,{children:e.jsx(je,{children:a(t?"editOrganization":"createOrganization")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(I,{htmlFor:"org-name",children:a("organizationName")}),e.jsx(Q,{id:"org-name",value:x,onChange:c=>b(c.target.value),maxLength:80,autoFocus:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{children:a("organizationColor")}),e.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[ee.map(c=>e.jsx("button",{type:"button",onClick:()=>{o(c),k(!1)},className:r("h-7 w-7 rounded-full border-2 transition",l===c?"border-gray-900 dark:border-white scale-110":"border-transparent"),style:{backgroundColor:c},"aria-label":c},c)),e.jsx("button",{type:"button",onClick:()=>k(c=>!c),className:r("h-7 px-2 rounded-full text-xs border",f?"bg-gray-900 text-white dark:bg-white dark:text-gray-900":"bg-transparent"),children:a("customColor")})]}),f&&e.jsx(Q,{value:l??"",onChange:c=>o(c.target.value||null),placeholder:"#3B82F6",className:"w-32"}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx("span",{className:"h-4 w-4 rounded-full",style:{backgroundColor:_}}),e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:l===null?`${a("customColor")} (auto)`:_})]})]}),t&&e.jsxs("div",{className:"co-card-inset flex items-start justify-between gap-3 p-3",children:[e.jsxs("div",{children:[e.jsx(I,{htmlFor:"org-satisfaction-opt-out",className:"text-sm font-normal text-foreground",children:a("organizationSatisfactionOptOut")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a("organizationSatisfactionOptOutHint")})]}),e.jsx(se,{id:"org-satisfaction-opt-out",checked:D,onCheckedChange:c=>O(c===!0),"data-testid":"org-satisfaction-opt-out"})]}),t&&L&&e.jsxs("div",{className:"co-card-inset flex items-start justify-between gap-3 p-3",children:[e.jsxs("div",{children:[e.jsx(I,{htmlFor:"org-visit-notice-opt-out",className:"text-sm font-normal text-foreground",children:a("organizationVisitNoticeOptOut")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a("organizationVisitNoticeOptOutHint")})]}),e.jsx(se,{id:"org-visit-notice-opt-out",checked:E,onCheckedChange:c=>T(c===!0),"data-testid":"org-visit-notice-opt-out"})]}),A&&e.jsx("p",{className:"text-sm co-text-negative",children:A})]}),e.jsxs(be,{children:[e.jsx(S,{variant:"outline",onClick:()=>s(!1),children:a("common.cancel")}),e.jsx(S,{onClick:W,disabled:B||x.trim().length===0,"data-testid":"org-edit-save",children:a(t?"common.save":"createOrganization")})]})]})})}function Be({org:t,open:n,onOpenChange:s}){const{language:d}=U(),a=(l,o)=>$(d,l,o),{toast:j}=ne(),h=G(z.organizations.mutations.deleteOrg),[p,x]=m.useState(!1);if(!t)return null;const b=async()=>{x(!0);try{const{unassignedSiteCount:l}=await h({id:t._id});j({title:a("organizationRemovedFromSites",{count:l})}),s(!1)}
1catch(l){const f=(l instanceof ie&&typeof l.data=="string"?l.data:null)==="organizationNotFound"?"organizationNotFound":null;j({variant:"destructive",title:a(f||"common.error"),description:f?void 0:ze(l)})}finally{x(!1)}};return e.jsx(ve,{open:n,onOpenChange:s,children:e.jsxs(Ne,{children:[e.jsx(ye,{children:e.jsx(ke,{children:t.siteCount>0?a("deleteOrgConfirmWithSites",{name:t.name,count:t.siteCount}):a("deleteOrgConfirm",{name:t.name})})}),e.jsxs(Ce,{children:[e.jsx(Oe,{disabled:p,children:a("common.cancel")}),e.jsx(we,{variant:"destructive",onClick:b,disabled:p,children:a("deleteOrganization")})]})]})})}function We(t,n){const s=te(n);if(!s)return null;const d=Array.from(t),a=[];let j="";d.forEach((b,l)=>{const o=te(b)||b;for(let f=0;f<o.length;f++)a.push(l);j+=o});const h=j.indexOf(s);if(h===-1||a.length===0)return null;const p=a[Math.min(h,a.length-1)],x=a[Math.min(h+s.length-1,a.length-1)]+1;return[p,x]}function J({text:t,query:n}){const s=n?We(t,n):null;if(!s)return e.jsx(e.Fragment,{children:t});const d=Array.from(t);return e.jsxs(e.Fragment,{children:[d.slice(0,s[0]).join(""),e.jsx("mark",{className:r("rounded-[3px] text-inherit","bg-[#5CC2FF]/30 dark:bg-[#5CC2FF]/25"),children:d.slice(s[0],s[1]).join("")}),d.slice(s[1]).join("")]})}const ae=18;function Ke(){const{language:t}=U(),n=i=>$(t,i),s=t==="fr",{can:d}=Se(),a=Y(z.organizations.queries.listWithCounts,{}),j=Y(z.sites.queries.getAll),h=a===void 0||j===void 0,p=a??[],x=j??[],[b,l]=m.useState(""),o=b.trim(),[f,k]=m.useState(null),[D,O]=m.useState(!1),[E,T]=m.useState(null),[H,L]=m.useState(!1),[B,P]=m.useState(new Set),A=()=>{k(null),O(!0)},F=i=>{k(i),O(!0)},_=i=>{T(i),L(!0)},W=i=>P(y=>{const u=new Set(y);return u.has(i)?u.delete(i):u.add(i),u}),{sitesByOrg:c,unassignedSites:N}=m.useMemo(()=>{const i=new Map,y=[];for(const u of x){const g={id:u.id,name:u.name,city:u.city},v=u.organizationId;if(v){const M=i.get(v);M?M.push(g):i.set(v,[g])}else y.push(g)}return{sitesByOrg:i,unassignedSites:y}},[x]),C=m.useMemo(()=>{const i=(g,v)=>{const M={key:g?g._id:"unassigned",org:g,color:g?Ae(g):Fe,allCount:v.length,sites:v,orgMatched:!1};if(!o)return!g&&v.length===0?null:M;const K=g!==null&&R(g.name,o),X=v.filter(V=>R(V.name,o)||(V.city?R(V.city,o):!1));return!K&&X.length===0?null:{...M,orgMatched:K,sites:K?v:X}},y=[];for(const g of p){const v=i(g,c.get(g._id)??[]);v&&y.push(v)}const u=i(null,N);return u&&y.push(u),y},[p,c,N,o]),xe=o?C.reduce((i,y)=>i+y.sites.filter(u=>R(u.name,o)||(u.city?R(u.city,o):!1)).length,0):x.length,me=C.filter(i=>i.org!==null).length;return e.jsxs(e.Fragment,{children:[e.jsxs(Le,{icon:Z,title:n("organizations"),count:h?void 0:p.length,description:n("organizationsDescription"),minHeightClassName:"min-h-[calc(100vh-16rem)]",className:"flex-1",contentClassName:"p-4 md:p-5 space-y-5",testId:"organizations-shell",children:[e.jsxs(w.div,{initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:.06,delayChildren:.12}}},className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsx(q,{label:n("organizations"),value:p.length,sub:s?"groupes de sites":"site groups",icon:Z,tone:"cyan",loading:h}),e.jsx(q,{label:"Sites",value:x.length,sub:s?"dans le répertoire":"in the directory",icon:De,tone:"indigo",loading:h}),e.jsx(q,{label:s?"Non assignés":"Unassigned",value:N.length,sub:s?"sites sans organisation":"sites without organization",icon:_e,tone:N.length>0?"amber":"slate",loading:h})]}),e.jsxs(w.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.3,delay:.35},className:r("rounded-2xl p-3","co-card-inset"),children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 min-w-0",children:[e.jsx(oe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400"}),e.jsx(Q,{value:b,onChange:i=>l(i.target.value),placeholder:s?"Rechercher un site ou une organisation…":"Search for a site or organization…",className:"pl-10 pr-9 h-9 bg-white/80 dark:bg-slate-950/40 border-slate-200 dark:border-slate-700"}),o&&e.jsx("button",{type:"button",onClick:()=>l(""),"aria-label":s?"Effacer la recherche":"Clear search",className:"absolute right-2.5 top-1/2 -translate-y-1/2 p-0.5 rounded-md text-slate-400 hover:text-slate-600 dar
1k:hover:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",children:e.jsx(re,{className:"h-4 w-4"})})]}),!d.manageOrganizations&&e.jsxs("span",{className:r("shrink-0 inline-flex items-center gap-1.5 h-8 px-2.5 text-[11px] font-semibold text-slate-500 dark:text-slate-400 bg-slate-100/80 dark:bg-slate-800/60 border border-slate-200/60 dark:border-slate-700/60","rounded-full"),children:[e.jsx(Ee,{className:"h-3 w-3"}),n("permissionDeniedReadOnly")]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2 text-[11px] text-slate-600 dark:text-slate-400 tabular-nums",children:[e.jsx("span",{className:r("font-semibold text-slate-700 dark:text-slate-200","co-nums"),children:me}),e.jsx("span",{children:s?"organisations":"organizations"}),e.jsx("span",{className:"text-slate-300 dark:text-slate-600",children:"·"}),e.jsx("span",{className:r("font-semibold text-slate-700 dark:text-slate-200","co-nums"),children:xe}),e.jsx("span",{children:"sites"}),o&&e.jsxs("span",{className:"truncate",children:[s?"pour":"for"," «",o,"»"]}),d.manageOrganizations&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-slate-400",children:"·"}),e.jsxs(S,{onClick:A,size:"sm",className:r("h-7 px-3 gap-1.5 text-[11px] font-semibold","rounded-full bg-primary text-primary-foreground border-0 hover:bg-[#0D0087]"),children:[e.jsx(le,{className:"h-3 w-3",strokeWidth:2.75}),n("newOrganization")]})]})]})]}),h?e.jsx(Ge,{}):C.length===0&&o?e.jsx(Ye,{query:o,fr:s,onClear:()=>l("")}):e.jsxs(w.div,{initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:.05,delayChildren:.15}}},className:"space-y-3",children:[p.length===0&&!o&&e.jsx(Qe,{fr:s,t:n,canCreate:d.manageOrganizations,onCreate:A}),e.jsx(Pe,{mode:"popLayout",children:C.map(i=>e.jsx(Ve,{group:i,query:o,fr:s,expanded:B.has(i.key),onToggleExpanded:()=>W(i.key),canManage:d.manageOrganizations,onEdit:i.org?()=>F(i.org):void 0,onDelete:i.org?()=>_(i.org):void 0},i.key))})]})]}),e.jsx(He,{org:f,open:D,onOpenChange:O}),e.jsx(Be,{org:E,open:H,onOpenChange:L})]})}function Ve({group:t,query:n,fr:s,expanded:d,onToggleExpanded:a,canManage:j,onEdit:h,onDelete:p}){const x=t.org===null,b=t.org?t.org.name:s?"Sites non assignés":"Unassigned sites",l=!n&&t.sites.length>ae,o=l&&!d?t.sites.slice(0,ae):t.sites,f=t.sites.length-o.length;return e.jsxs(w.section,{layout:!0,variants:{hidden:{opacity:0,y:12},visible:{opacity:1,y:0}},exit:{opacity:0,scale:.98},transition:{type:"spring",stiffness:320,damping:28},className:r("group/row relative overflow-hidden",r("co-tile",x&&"border-dashed")),children:[e.jsx("div",{"aria-hidden":!0,className:r("absolute","left-0 top-2 bottom-2 w-[3px] rounded-r-full"),style:{backgroundColor:t.color,opacity:x?.45:1}}),e.jsxs("div",{className:"pl-4 pr-3 py-3.5 md:pl-5 md:pr-4",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{"aria-hidden":!0,className:r("h-3 w-3 rounded-full shrink-0 ring-2 ring-white dark:ring-slate-900",x&&"opacity-60"),style:{backgroundColor:t.color}}),t.org?e.jsxs(ce,{href:`/organizations/${t.org._id}`,title:s?"Ouvrir la page de l'organisation":"Open the organization page",className:"group/orglink flex items-center gap-1 min-w-0",children:[e.jsx("h2",{className:r("nav-font text-[15px] font-semibold text-slate-900 dark:text-white truncate min-w-0 transition-colors","group-hover/orglink:text-primary dark:group-hover/orglink:text-brand-200"),children:e.jsx(J,{text:b,query:n})}),e.jsx(de,{"aria-hidden":!0,className:r("h-3.5 w-3.5 shrink-0 text-slate-300 dark:text-slate-600 transition-colors","group-hover/orglink:text-primary dark:group-hover/orglink:text-brand-200")})]}):e.jsx("h2",{className:"nav-font text-[15px] font-semibold text-slate-900 dark:text-white truncate min-w-0",children:b}),e.jsxs("span",{className:r("shrink-0 inline-flex items-center gap-1 px-2 py-0.5","co-pill"),children:[e.jsx("span",{className:r("text-xs font-bold tabular-nums text-slate-800 dark:text-slate-100","co-nums"),children:t.allCount}),e.jsx("span",{className:"text-[10px] font-semibold text-slate-600 dar
1k:text-slate-400",children:t.allCount===1?"site":"sites"})]}),j&&!x&&e.jsxs("div",{className:"ml-auto flex items-center gap-0.5 opacity-0 group-hover/row:opacity-100 focus-within:opacity-100 transition-opacity duration-200",children:[e.jsx(S,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-500 hover:text-slate-800 dark:hover:text-slate-100",onClick:h,"aria-label":s?"Modifier l'organisation":"Edit organization",children:e.jsx(Ie,{className:"h-3.5 w-3.5"})}),e.jsx(S,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-500 hover:text-rose-600 dark:hover:text-rose-400",onClick:p,"aria-label":s?"Supprimer l'organisation":"Delete organization",children:e.jsx(Me,{className:"h-3.5 w-3.5"})})]})]}),t.sites.length===0?e.jsx("p",{className:"mt-2.5 ml-[22px] text-xs text-slate-500 dark:text-slate-400 italic",children:s?"Aucun site dans cette organisation":"No sites in this organization"}):e.jsxs("div",{className:"mt-2.5 ml-[22px] flex flex-wrap gap-1.5",children:[o.map(k=>e.jsx(qe,{site:k,query:n},k.id)),f>0&&e.jsxs("button",{type:"button",onClick:a,className:"inline-flex items-center h-7 px-2.5 rounded-lg text-xs font-semibold text-slate-500 dark:text-slate-400 border border-dashed border-slate-300 dark:border-slate-600 hover:text-slate-800 dark:hover:text-slate-100 hover:border-slate-400 dark:hover:border-slate-500 transition-colors active:scale-[0.98]",children:["+",f," ",s?"de plus":"more"]}),l&&d&&e.jsx("button",{type:"button",onClick:a,className:"inline-flex items-center h-7 px-2.5 rounded-lg text-xs font-semibold text-slate-500 dark:text-slate-400 border border-dashed border-slate-300 dark:border-slate-600 hover:text-slate-800 dark:hover:text-slate-100 hover:border-slate-400 dark:hover:border-slate-500 transition-colors active:scale-[0.98]",children:s?"Réduire":"Show less"})]})]})]})}function qe({site:t,query:n}){return e.jsxs(ce,{href:`/sites/${t.id}`,className:r("group/chip inline-flex items-center gap-1.5 h-7 pl-2.5 pr-2 transition-colors duration-150 active:scale-[0.98] max-w-full","co-link-chip"),children:[e.jsx("span",{className:r("text-xs font-medium text-slate-700 dark:text-slate-200 truncate transition-colors",!1),children:e.jsx(J,{text:t.name,query:n})}),t.city&&e.jsx("span",{className:"hidden sm:inline text-[10px] text-slate-500 dark:text-slate-400 truncate max-w-[9rem]",children:e.jsx(J,{text:t.city,query:n})}),e.jsx(de,{className:r("h-3 w-3 shrink-0 text-slate-300 dark:text-slate-600 transition-colors","group-hover/chip:text-primary dark:group-hover/chip:text-brand-200")})]})}function Ge({}){return e.jsx("div",{className:"space-y-3","aria-hidden":!0,children:[0,1,2].map(t=>e.jsxs("div",{className:r("relative overflow-hidden pl-5 pr-4 py-4","co-tile"),style:{animationDelay:`${t*120}ms`},children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-1 bg-slate-200 dark:bg-slate-700"}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"h-3 w-3 rounded-full bg-slate-200 dark:bg-slate-700 animate-pulse"}),e.jsx("span",{className:"h-4 w-40 rounded bg-slate-200 dark:bg-slate-800 animate-pulse"}),e.jsx("span",{className:"h-5 w-14 rounded-lg bg-slate-100 dark:bg-slate-800 animate-pulse"})]}),e.jsx("div",{className:"mt-3 ml-[22px] flex flex-wrap gap-1.5",children:Array.from({length:5+t*2}).map((n,s)=>e.jsx("span",{className:"h-7 rounded-lg bg-slate-100 dark:bg-slate-800/70 animate-pulse",style:{width:`${64+s*37%72}px`}},s))})]},t))})}function Qe({fr:t,t:n,canCreate:s,onCreate:d}){return e.jsxs(w.div,{variants:{hidden:{opacity:0,y:10},visible:{opacity:1,y:0}},className:r("px-6 py-10 text-center","co-empty"),children:[e.jsx("div",{className:r("mx-auto h-12 w-12 flex items-center justify-center","co-chip"),children:e.jsx(Z,{className:r("h-6 w-6",""),strokeWidth:2})}),e.jsx("p",{className:"mt-4 text-sm font-medium text-slate-600 dark:text-slate-300 max-w-md mx-auto",children:n("noOrganizationsYet")}),s&&e.jsxs(S,{onClick:d,size:"sm",className:r("mt-4 h-9 px-4 gap-1.5 text-xs font-semibold active:scale-[0.98]","rounded-full bg-primary text-primary-foreground border-0 hover:bg-[#0D0087]"),children:[e.jsx(le,{className:"h-3.5 w-3.5",
1strokeWidth:2.75}),n("newOrganization")]}),!s&&e.jsx("p",{className:"mt-2 text-xs text-slate-500 dark:text-slate-400",children:t?"Un administrateur peut en créer une.":"An administrator can create one."})]})}function Ye({query:t,fr:n,onClear:s}){return e.jsxs(w.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:r("px-6 py-12 text-center","co-empty"),children:[e.jsx("div",{className:r("mx-auto h-12 w-12 flex items-center justify-center","co-chip"),children:e.jsx(oe,{className:"h-6 w-6 text-slate-500 dark:text-slate-400",strokeWidth:2})}),e.jsx("p",{className:"mt-4 text-sm font-medium text-slate-600 dark:text-slate-300",children:n?`Aucun site ni organisation ne correspond à «${t}»`:`No site or organization matches "${t}"`}),e.jsxs("button",{type:"button",onClick:s,className:"mt-3 inline-flex items-center gap-1.5 h-8 px-3 text-xs font-semibold rounded-md text-rose-600 dark:text-rose-300 hover:bg-rose-50 dark:hover:bg-rose-950/30 transition-colors active:scale-[0.98]",children:[e.jsx(re,{className:"h-3.5 w-3.5"}),n?"Effacer la recherche":"Clear search"]})]})}function rt(){const{language:t}=U(),n=d=>$(t,d),s=Y(z.organizations.queries.list,{});return Re(n("organizations"),s!==void 0?`${s.length} ${t==="fr"?s.length===1?"organisation":"organisations":s.length===1?"organization":"organizations"}`:void 0),e.jsxs("div",{className:"min-h-[calc(100vh-9rem)] -mb-8 flex flex-col",children:[e.jsx(Ke,{}),e.jsx(Te,{fullBleed:!0})]})}export{rt 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.