PageSourceSearch

https://repuestos-d6c3d.firebaseapp.com/_nuxt/j4ZjxLf1.js

js repuestos-d6c3d.firebaseapp.com collected 2026-10-03 08:14:35 UTC 18,437 bytes, 1 lines download raw bytes

1import{_ as L}from"./BsqTxom4.js";import{a9 as q,u as F,s as $,r as h,q as O,c as l,b as e,e as f,F as j,x as S,d as y,w as R,f as m,v as x,j as G,o as a,t as u,p as M,n as J}from"#entry";import{u as W}from"./DHwOP2XV.js";const X={class:"mb-8"},K={class:"flex justify-between items-center"},Q={class:"space-y-6"},Y={class:"flex justify-between items-start mb-4"},Z={class:"text-lg font-semibold text-gray-900"},ee={class:"text-sm text-gray-500"},te={class:"mb-4"},oe={class:"text-gray-600"},se={class:"mb-6"},re={class:"relative"},le={key:0,class:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ae={key:1,class:"text-xs font-bold"},ne={class:"ml-4 flex-1"},ie={class:"text-xs text-gray-500"},de={class:"flex justify-between items-center pt-4 border-t"},ue={class:"flex space-x-3"},ce={key:1,class:"px-4 py-2 bg-purple-600 text-white text-sm rounded-lg hover:bg-purple-700 transition-colors"},pe={class:"text-sm text-gray-500"},me={key:0,class:"text-center py-12 bg-white rounded-xl shadow-lg"},xe={key:0,class:"fixed inset-0 bg-black bg-opacity-60 flex items-center justify-center z-50 p-4 backdrop-blur-sm"},ge={class:"bg-white rounded-2xl max-w-4xl w-full max-h-[95vh] overflow-hidden shadow-2xl transform transition-all duration-300"},ve={class:"bg-gradient-to-r from-blue-600 to-blue-700 px-8 py-6"},be={class:"flex items-center justify-between"},he={class:"p-8 space-y-8 max-h-[70vh] overflow-y-auto"},fe={class:"space-y-3"},ye={class:"space-y-3"},we={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ke={class:"space-y-3"},Ce={class:"space-y-3"},Me={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},_e={class:"space-y-3"},je={class:"space-y-3"},Se={class:"bg-gray-50 px-8 py-6 border-t border-gray-200"},Ve={class:"flex justify-between items-center"},Be={class:"flex space-x-4"},Ee=["disabled"],He={key:0,class:"w-5 h-5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},ze={key:1,class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Te={key:2},Ae={key:3},Ie=q({__name:"solicitudes",setup(De){F({title:"Mis Solicitudes - AutoPiezas360",meta:[{name:"robots",content:"noindex, nofollow"}]});const d=$(),g=h([]),p=h(!1),v=h(!1),s=h({descripcion:"",vin:"",marca:"",modelo:"",ano:"",telefono:""}),w=[{key:"solicitud_enviada",titulo:"Solicitud Enviada",descripcion:"Hemos recibido tu solicitud y estamos buscando el repuesto"},{key:"producto_encontrado",titulo:"Producto Encontrado",descripcion:"Hemos encontrado tu repuesto y subido la foto para confirmación"},{key:"pendiente_pago",titulo:"Pendiente de Pago",descripcion:"Confirma el producto y procede con el pago"},{key:"producto_viajando",titulo:"Producto Viajando",descripcion:"Tu repuesto está siendo importado desde el extranjero"},{key:"llegada_chile",titulo:"Llegada a Chile",descripcion:"El producto ha llegado a Chile y está en proceso de despacho"},{key:"despachando",titulo:"Despachando",descripcion:"Tu pedido está siendo preparado para entrega"},{key:"entregado",titulo:"Entregado",descripcion:"¡Tu repuesto ha sido entregado exitosamente!"}],V=r=>r?new Intl.DateTimeFormat("es-CL",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(r)):"No disponible",B=r=>({solicitud_enviada:"bg-yellow-100 text-yellow-800",producto_encontrado:"bg-blue-100 text-blue-800",pendiente_pago:"bg-orange-100 text-orange-800",producto_viajando:"bg-purple-100 text-purple-800",llegada_chile:"bg-indigo-100 text-indigo-800",despachando:"bg-pink-100 text-pink-800",entregado:"bg-green-100 text-green-800"})[r]||"bg-gray-100 text-gray-800",E=r=>{const t=w.find(o=>o.key===r);return t?t.titulo:r},k=(r,t)=>{const o=w.map(C=>C.key),n=o.indexOf(r);return o.indexOf(t)<=n},H=(r,t)=>k(r,t)?"bg-green-500 border-green-500":"bg-white border-gray-300",z=()=>{J("/cliente/pagos")},_=async()=>{v.value=!0;try{const{createPedido:r}=W(),t={byUserId:d.user?.uid||null,byName:d.user?.displayName||d.user?.email||"Cliente",byRole:"cliente"},o={descripcion:s.value.descripcion,vehicle:{marca:s.value.marca||null,modelo:s.value.modelo||null,ano:s.value.ano?parseInt(s.value.ano):null,vin:s.value.vin||null},telefono:s.value.telefono||null,price:null,userId:d.user?.uid||"",createdBy:d.user?.uid||null,createdByRole:"cliente",assignedTo:null},{id:n,numero:c}=await r(o,t);g.value.unshift({id:n,numero:c,descripcion:o.descripcion,marca:o.vehicle.marca,modelo:o.vehicle.modelo,ano:o.vehicle.ano,estado:"solicitud_enviada",createdAt:new Date,fechaEstimada:null}),s.value={descripcion:"",vin:"",marca:"",modelo:"",ano:"",telefono:""},p.value=!1,alert(`Solicitud #${c} creada exitosamente. Te contactaremos pronto.`)}catch(r){console.error("Error creando solicitud:",r),alert("Error al crear la solicitud. Por favor, inténtalo nuevamente.")}finally{v.value=!1}},T=async()=>{try{const{$firestore:r}=G(),{collection:t,query:o,where:n,getDocs:c,orderBy:C}=await L(async()=>{const{collection:b,query:i,where:N,getDocs:P,orderBy:U}=await import("#entry").then(I=>I.aC);return{collection:b,query:i,where:N,getDocs:P,orderBy:U}},[],import.meta.url);if(!d.user?.uid)return;const A=o(t(r,"pedidos"),n("userId","==",d.user.uid),C("createdAt","desc")),D=await c(A);g.value=[],D.forEach(b=>{const i=b.data();g.value.push({id:b.id,numero:i.numero,descripcion:i.descripcion,marca:i.marca,modelo:i.modelo,ano:i.ano,estado:i.estado,createdAt:i.createdAt?.toDate()||new Date,fechaEstimada:i.fechaEstimada})})}catch(r){console.error("Error cargando solicitudes:",r)}};return O(async()=>{await d.checkAuthState(),await T()}),(r,t)=>(a(),l("div",null,[e("div",X,[e("div",K,[t[11]||(t[11]=e("div",null,[e("h1",{class:"text-3xl font-bold text-gray-900"},"Mis Solicitudes"),e("p",{class:"text-gray-600 mt-2"},"Gestiona tus solicitudes de repuestos importados")],-1)),e("button",{onClick:t[0]||(t[0]=o=>p.value=!0),class:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium flex items-center space-x-2"},[...t[10]||(t[10]=[e("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})],-1),e("span",null,"Nueva Solicitud",-1)])])])]),e("div",Q,[(a(!0),l(j,null,S(g.value,o=>(a(),l("div",{key:o.id,class:"bg-white rounded-xl shadow-lg p-6 border border-gray-100"},[e("div",Y,[e("div",null,[e("h3",Z,"Solicitud #"+u(o.numero),1),e("p",ee,u(V(o.createdAt)),1)]),e("span",{class:M(["inline-flex px-3 py-1 text-sm font-medium rounded-full",B(o.estado)])},u(E(o.estado)),3)]),e("div",te,[t[12]||(t[12]=e("h4",{class:"text-sm font-medium text-gray-700 mb-2"},"Descripción:",-1)),e("p",oe,u(o.descripcion),1)]),e("div",se,[t[15]||(t[15]=e("h4",{class:"text-sm font-medium text-gray-700 mb-4"},"Estado de la Solicitud:",-1)),e("div",re,[t[14]||(t[14]=e("div",{class:"absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),(a(),l(j,null,S(w,(n,c)=>e("div",{key:n.key,class:"relative flex items-start mb-6 last:mb-0"},[e("div",{class:M(["flex items-center justify-center w-8 h-8 rounded-full border-2 relative z-10",H(o.estado,n.key)])},[k(o.estado,n.key)?(a(),l("svg",le,[...t[13]||(t[13]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):(a(),l("span",ae,u(c+1),1))],2),e("div",ne,[e("h5",{class:M(["text-sm font-medium",k(o.estado,n.key)?"text-gray-900":"text-gray-500"])},u(n.titulo),3),e("p",ie,u(n.descripcion),1)])])),64))])]),e("div",de,[e("div",ue,[o.estado==="pendiente_pago"?(a(),l("button",{key:0,onClick:z,class:"px-4 py-2 bg-green-600 text-white text-sm rounded-lg hover:bg-green-700 transition-colors"}," Ir a Pagar ")):f("",!0),o.estado==="entregado"?(a(),l("button",ce," Calificar Servicio ")):f("",!0)]),e("span",pe," Estimado de entrega: "+u(o.fechaEstimada||"7 días hábiles"),1)])]))),128)),g.value.length===0?(a(),l("div",me,[t[16]||(t[16]=e("svg",{class:"w-16 h-16 text-gray-400 mx-auto mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})],-1)),t[17]||(t[17]=e("h3",{class:"text-lg font-medium text-gray-900 mb-2"},"No tienes solicitudes aún",-1)),t[18]||(t[18]=e("p",{class:"text-gray-500 mb-4"},"Comienza solicitando tu primer repuesto importado",-1)),e("button",{onClick:t[1]||(t[1]=o=>p.value=!0),class:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium"}," Hacer mi primera solicitud ")])):f("",!0)]),p.value?(a(),l("div",xe,[e("div",ge,[e("div",ve,[e("div",be,[t[20]||(t[20]=y('<div class="flex items-center space-x-4"><div class="w-12 h-12 bg-white bg-opacity-20 rounded-xl flex items-center justify-center"><svg class="w-6 h-6 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
1<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg></div><div><h2 class="text-2xl font-bold text-white">Nueva Solicitud</h2><p class="text-blue-100 mt-1">Solicita tu repuesto importado</p></div></div>',1)),e("button",{onClick:t[2]||(t[2]=o=>p.value=!1),class:"w-10 h-10 bg-white bg-opacity-20 hover:bg-opacity-30 rounded-xl flex items-center justify-center transition-all duration-200"},[...t[19]||(t[19]=[e("svg",{class:"w-6 h-6 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])]),e("div",he,[e("form",{onSubmit:R(_,["prevent"]),class:"space-y-8"},[t[30]||(t[30]=y('<div class="bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-xl p-6 shadow-sm"><div class="flex items-start space-x-4"><div class="w-10 h-10 bg-blue-100 rounded-xl flex items-center justify-center flex-shrink-0"><svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div><div><h4 class="text-lg font-semibold text-blue-900 mb-2">¿Necesitas ayuda?</h4><p class="text-blue-700 leading-relaxed"> Si tienes dudas sobre cómo llenar esta solicitud, un vendedor puede ayudarte. Una vez creada, podrás hacer seguimiento desde aquí. </p></div></div></div>',1)),e("div",fe,[t[21]||(t[21]=y('<label class="block text-lg font-semibold text-gray-800 mb-3"><span class="flex items-center space-x-2"><svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg><span>Descripción del repuesto</span><span class="text-red-500">*</span></span></label>',1)),m(e("textarea",{"onUpdate:modelValue":t[3]||(t[3]=o=>s.value.descripcion=o),rows:"4",required:"",class:"w-full px-4 py-4 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 text-gray-700 placeholder-gray-400 resize-none",placeholder:"Ej: Filtro de aceite para Toyota Corolla 2015, motor 1.8L, filtro original o compatible..."},null,512),[[x,s.value.descripcion]]),t[22]||(t[22]=e("p",{class:"text-sm text-gray-600 flex items-center space-x-2"},[e("svg",{class:"w-4 h-4 text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),e("span",null,"Sé lo más específico posible: marca, modelo, año, motor, tipo de repuesto, etc.")],-1))]),e("div",ye,[t[23]||(t[23]=y('<label class="block text-lg font-semibold text-gray-800 mb-3"><span class="flex items-center space-x-2"><svg class="w-5 h-5 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"></path></svg><span>VIN del vehículo</span><span class="text-sm font-normal text-gray-500">(opcional)</span></span></label>',1)),m(e("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>s.value.vin=o),type:"text",class:"w-full px-4 py-4 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 text-gray-700 placeholder-gray-400 font-mono tracking-wider",placeholder:"1HGBH41JXMN109186",maxlength:"17"},null,512),[[x,s.value.vin]]),t[24]||(t[24]=e("p",{class:"text-sm text-gray-600"},"Número de identificación del vehículo (17 caracteres alfanuméricos)",-1))]),e("div",we,[e("div",ke,[t[25]||(t[25]=e("label",{class:"block text-lg font-semibold text-gray-800 mb-3"},[e("span",{class:"flex items-center space-x-2"},[e("svg",{class:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})]),e("span",null,"Marca del vehículo")])],-1)),m(e("input",{"onUpdate:modelValue":t[5]||(t[5]=o=>s.value.marca=o),type:"text",class:"w-full px-4 py-4 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 text-gray-700 placeholder-gray-400",placeholder:"Toyota, Honda, Ford, Chevrolet..."},null,512),[[x,s.value.marca]])]),e("div",Ce,[t[26]||(t[26]=e("label",{class:"block text-lg font-semibold text-gray-800 mb
1-3"},[e("span",{class:"flex items-center space-x-2"},[e("svg",{class:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})]),e("span",null,"Modelo del vehículo")])],-1)),m(e("input",{"onUpdate:modelValue":t[6]||(t[6]=o=>s.value.modelo=o),type:"text",class:"w-full px-4 py-4 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 text-gray-700 placeholder-gray-400",placeholder:"Corolla, Civic, Focus, Cruze..."},null,512),[[x,s.value.modelo]])])]),e("div",Me,[e("div",_e,[t[27]||(t[27]=e("label",{class:"block text-lg font-semibold text-gray-800 mb-3"},[e("span",{class:"flex items-center space-x-2"},[e("svg",{class:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})]),e("span",null,"Año del vehículo")])],-1)),m(e("input",{"onUpdate:modelValue":t[7]||(t[7]=o=>s.value.ano=o),type:"number",min:"1990",max:"2026",class:"w-full px-4 py-4 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 text-gray-700 placeholder-gray-400",placeholder:"2020"},null,512),[[x,s.value.ano]])]),e("div",je,[t[28]||(t[28]=e("label",{class:"block text-lg font-semibold text-gray-800 mb-3"},[e("span",{class:"flex items-center space-x-2"},[e("svg",{class:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})]),e("span",null,"Teléfono de contacto")])],-1)),m(e("input",{"onUpdate:modelValue":t[8]||(t[8]=o=>s.value.telefono=o),type:"tel",class:"w-full px-4 py-4 border-2 border-gray-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-200 text-gray-700 placeholder-gray-400",placeholder:"+56912345678"},null,512),[[x,s.value.telefono]]),t[29]||(t[29]=e("p",{class:"text-sm text-gray-600 flex items-center space-x-2"},[e("svg",{class:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})]),e("span",null,"Un vendedor se pondrá en contacto contigo por WhatsApp o email cuando encontremos el producto")],-1))])])],32)]),e("div",Se,[e("div",Ve,[t[33]||(t[33]=e("div",{class:"text-sm text-gray-600"},[e("span",{class:"flex items-center space-x-2"},[e("svg",{class:"w-4 h-4 text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]),e("span",null,"Tiempo estimado de entrega: 7 días hábiles")])],-1)),e("div",Be,[e("button",{type:"button",onClick:t[9]||(t[9]=o=>p.value=!1),class:"px-8 py-3 border-2 border-gray-300 text-gray-700 rounded-xl hover:bg-gray-50 hover:border-gray-400 transition-all duration-200 font-medium"}," Cancelar "),e("button",{onClick:_,disabled:v.value||!s.value.descripcion,class:"px-8 py-3 bg-gradient-to-r from-blue-600 to-blue-700 text-white rounded-xl hover:from-blue-700 hover:to-blue-800 disabled:from-gray-400 disabled:to-gray-500 transition-all duration-200 font-medium shadow-lg hover:shadow-xl transform hover:scale-105 disabled:transform-none disabled:shadow-none flex items-center space-x-2"},[v.value?(a(),l("svg",He,[...t[31]||(t[31]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},null,-1)])])):(a(),l("svg",ze,[...t[32]||(t[32]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"},null,-1)])])),v.value?(a(),l("span",Te,"Creando...")):(a(),l("span",Ae,"Crear Solicitud"))],8,Ee)])])])])])):f("",!0)]))}});
1export{Ie 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.