PageSourceSearch

https://estadisticasnube.com/_next/static/chunks/pages/logs-5413bf0f39b8648a.js

js estadisticasnube.com collected 2026-10-08 20:06:07 UTC 25,568 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9203],{1966:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/logs",function(){return a(36828)}])},10185:function(e,t,a){"use strict";a.d(t,{N:function(){return d}});var s=a(85893),r=a(40645),i=a.n(r),n=a(11163),o=a(41664),l=a.n(o),c=a(83392);let d=e=>{let{noLogo:t}=e,a=(0,n.useRouter)(),r=null==a?void 0:a.pathname;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"jsx-7675c46f01fda4ff center gap20",children:[!t&&(0,s.jsx)(l(),{href:"/estadisticas?rd=y",className:"/estadisticas"===r?"text-link link-dashboard-active center":"text-link",children:(0,s.jsx)(c.TR,{size:32})}),(0,s.jsx)(l(),{href:"/dashboard",className:"/dashboard"===r?"text-link link-dashboard-active center":"text-link",children:(0,s.jsx)(c.Zr,{})}),(0,s.jsx)(l(),{href:"/facturas",className:"/facturas"===r?"text-link link-dashboard-active center":"text-link",children:(0,s.jsx)(c.QA,{})}),(0,s.jsx)(l(),{href:"/logs",className:"/logs"===r?"text-link link-dashboard-active center":"text-link",children:(0,s.jsx)(c.aV,{})})]}),(0,s.jsx)(i(),{id:"f927e5f9a809ebce",children:".link-dashboard-active{background:var(--azul-2);-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;height:40px;width:40px}"}),(0,s.jsx)(i(),{id:"a887708648c1bb00",children:".gap20.jsx-7675c46f01fda4ff{gap:20px}"})]})}},12390:function(e,t,a){"use strict";a.d(t,{H:function(){return o}});var s=a(85893),r=a(40645),i=a.n(r),n=a(67294);function o(e){let{fecha:t,long:a}=e,[r,o]=(0,n.useState)({short:"",long:""});return(0,n.useEffect)(()=>{function e(){if(t){let e=Math.floor((new Date-new Date(t))/6e4),a=Math.floor(e/60),s=e%60,r=Math.floor(a/24),i=e<1?"actualizado hace unos segundos":e<60?"actualizado hace ".concat(e," minuto").concat(e>1?"s":""):r<1?"actualizado hace ".concat(a,":").concat(s.toString().padStart(2,"0"),"h"):"actualizado hace m\xe1s de ".concat(r," d\xeda").concat(r>1?"s":"");o({short:e<1?"0m":e<60?"".concat(e,"m"):r<1?"".concat(a,":").concat(s.toString().padStart(2,"0"),"h"):"".concat(r,"d"),long:i})}}e();let a=setInterval(e,6e4);return()=>clearInterval(a)},[t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"jsx-7627e2bb78c70748 "+((a?"texto-l show":"texto-l")||""),children:r.long}),(0,s.jsx)("span",{className:"jsx-7627e2bb78c70748 "+((a?"texto-s f16 hide":"texto-s f16")||""),children:r.short}),(0,s.jsx)(i(),{id:"7627e2bb78c70748",children:".texto-s.jsx-7627e2bb78c70748{display:inline-block;margin-right:-10px}.texto-l.jsx-7627e2bb78c70748,.hide.jsx-7627e2bb78c70748{display:none}.show.jsx-7627e2bb78c70748{display:inline-block}@media(min-width:1200px){.texto-l.jsx-7627e2bb78c70748{display:inline-block}.texto-s.jsx-7627e2bb78c70748{display:none}}"})]})}},34079:function(e,t,a){"use strict";a.d(t,{p:function(){return c}});var s=a(85893),r=a(40645),i=a.n(r),n=a(67294),o=a(29061),l=a(10185);let c=e=>{let{habilitar:t}=e,[a,r]=(0,n.useState)(""),[c,d]=(0,n.useState)(!1),[x,u]=(0,n.use
1State)("");async function b(e){if(e.preventDefault(),a&&!c)return x&&u(""),d(!0),await o.Z.post("/api/dashboard/auth",{auth:a}).then(e=>{let{error:a,ok:s}=e.data;if(a||!s)throw a||"auth";return t()}).catch(e=>{d(!1),r("");let t=(null==e?void 0:e.description)||(null==e?void 0:e.message)||e;console.log("auth error:",t),u("error: ".concat(t))})}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{onClick:e=>e.stopPropagation(),className:"jsx-1665462a8474851d modal-container center",children:(0,s.jsxs)("div",{className:"jsx-1665462a8474851d modal col rel w100 gap20",children:[(0,s.jsx)(l.N,{}),(0,s.jsxs)("form",{onSubmit:b,className:"jsx-1665462a8474851d col gap20",children:[(0,s.jsx)("input",{type:"password",id:"codigo",name:"codigo",value:a,placeholder:"auth",onChange:function(e){x&&u(""),r(e.target.value.trim())},disabled:c,autoFocus:!0,className:"jsx-1665462a8474851d btn2 w100"}),(0,s.jsx)("input",{type:"submit",value:c?"verificando...":"verificar",disabled:!a||c,className:"jsx-1665462a8474851d "+((a&&!c?"btn1 pointer w100":"btn1 btn-disabled w100")||"")}),x&&(0,s.jsx)("p",{className:"jsx-1665462a8474851d m0",children:x})]})]})}),(0,s.jsx)(i(),{id:"f7191ff92b7fc96e",children:".modal-container{position:fixed;z-index:999;width:100vw;min-height:100svh;top:0;left:0;background-color:hsla(0,0%,0%,.45)}"}),(0,s.jsx)(i(),{id:"39b7a5e05cbf66c5",children:".modal.jsx-1665462a8474851d{max-width:300px;max-height:100%;background-color:#fff;padding:30px 30px 40px 30px;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;overflow-y:auto;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.gap20.jsx-1665462a8474851d{gap:20px}.m0.jsx-1665462a8474851d{margin:0}.btn-disabled.jsx-1665462a8474851d{cursor:not-allowed;opacity:.5}"})]})}},36828:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return S}});var s=a(85893),r=a(40645),i=a.n(r),n=a(67294),o=a(11163),l=a(29061),c=a(64954),d=a(3458),x=a(83392),u=a(13180),b=a(34079),f=a(10185),h=a(69349),p=a(12390);let m=["error-update-users","error-inicio","error-ventas","error-checkouts","error-productos","error-productos-nube","error-suscripcion-actualizar","error-suscripcion-buscar","error-suscripcion-cancelar","error-user-update","error-emails","error-update-carritos","error-update-clientes","error-update-orders","error-update-productos","error-big-avg-obj-size"],j=["usuario-nuevo","ecodiem","prop-id","rating","suscripcion-actualizar","suscripcion-buscar-ok","suscripcion-cancelar-ok","suscripcion-crear-ok","trial-focus-nuevo","fin-trial","meta-code","meta-tareas","meta-extra","big-nuevo"],g=[...m,"suscripcion-cancelar-ok","rating"],v=j.filter(e=>"suscripcion-cancelar-ok"!==e&&"rating"!==e),k={solo_ver:!0,user_id:"",email:"",tipo:"",detalle:"",activos:[...m,...j]};function w(e,t){let a=t.solo_ver?e.filter(e=>!e.ok):e,s=t.user_id?a.filter(e=>{var a;return null===(a=e.user_id)||void 0===a?void 0:a.toString().includes(t.user_id)}):a,r=t.email?s.filter(e=>{var a;return null===(a=e.email)||void 0===a?void 0:a.toLowerCase().includes(t.email)}):s,i=t.tipo?r.filter(e=>e.tipo.includes(t.tipo)):r,n=t.activos.length===k.activos.length?i:i.filter(e=>t.activos.includes(e.tipo));return t.detalle?n.filter(e=>{var a;return null===(a=e.detalle)||void 0===a?void 0:a.includes(t.detalle)}):n}function y(e){let{filtros:t,changeFiltros:a}=e;function r(e){let{name:s,value:r}=e.target,i="detalle"===s?r:String(r).trim().toLowerCase();a({...t,[s]:i})}let n=t.activos.length===g.length&&t.activos.every(e=>g.includes(e)),o=t.activos.length===k.activos.length;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"jsx-a538af689d37e2ce center wrap filtros f16",children:[(0,s.jsxs)("div",{className:"jsx-a538af689d37e2ce center gap10",children:[(0,s.jsx)("button",{type:"button",onClick:function(){a({...t,solo_ver:!t.solo_ver})},className:"jsx-a538af689d37e2ce "+((t.solo_ver?"input btn1 f16":"input btn2 f16")||""),children:"s\xf3lo ver"}),(0,s.jsx)("button",{type:"button",onClick:function(){a({...t,activos:n?k.activos:g})},className:"jsx-a538af689d37e2ce "+((n?"input btn1 f16":"input btn2 f16")||""),children:"s\xf3lo importantes"})]}),(0,s.jsxs)("div",{className:"jsx-a538af689d37e2ce doble",children:[(0,s.jsx)("label",{htmlFor:"tipo",className:"jsx-a538af689d37e2ce label bold",children:"Tipo"}),(0,s.jsx)("input",{type:"text",id:"tipo",name:"tipo",value:t.tipo,placeholder:"Tipo",onChange:r,className:"jsx-a538af689d37e2ce input btn2 f16"}),!o&&(0,s.jsx)("span",{className:"jsx-a538af689d37e2ce",children:" (*)"})]}),(0,s.jsxs)("div",{className:"jsx-a538af689d37e2ce doble",children:[(0,s.jsx)("label",{htmlFor:"user_id",className:"jsx-a538af689d37e2ce label bold",children:"User ID"}),(0,s.jsx)("input",{type:"text",id:"user_id",name:"user_id",value:t.user_id,placeholder:"User ID",onChange:r,className:"jsx-a538af689d37e2ce input btn2 f16"})]}),(0,s.jsxs)("div",{className:"jsx-a538af689d37e2ce doble",children:[(0,s.jsx)("label",{htmlFor:"email",className:"jsx-a538af689d37e2ce label bold",children:"Email"}),(0,s.jsx)("input",{type:"text",id:"email",name:"email",value:t.email,placeholder:"Email",onChange:r,className:"jsx-a538af689d37e2ce input btn2 f16"})]}),(0,s.jsxs)("div",{className:"jsx-a538af689d37e2ce doble",children:[(0,s.jsx)("label",{htmlFor:"detalle",className:"jsx-a538af689d37e2ce label bold",children:"Detalle"}),(0,s.jsx)("input",{type:"text",id:"detalle",name:"detalle",value:t.detalle,placeholder:"Detalle",onCh
1ange:r,className:"jsx-a538af689d37e2ce input btn2 f16"})]}),(0,s.jsx)("div",{className:"jsx-a538af689d37e2ce",children:(0,s.jsx)("button",{type:"button",onClick:()=>a(k),className:"jsx-a538af689d37e2ce input text-link f16",children:"x borrar filtros"})})]}),(0,s.jsx)(i(),{id:"a538af689d37e2ce",children:".wrap.jsx-a538af689d37e2ce{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.label.jsx-a538af689d37e2ce{margin:0 5px}input[type=text].jsx-a538af689d37e2ce{width:180px}.filtros.jsx-a538af689d37e2ce{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px}.doble.jsx-a538af689d37e2ce{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%}.gap10.jsx-a538af689d37e2ce{gap:10px}@media(min-width:1200px){.filtros.jsx-a538af689d37e2ce{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-moz-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.doble.jsx-a538af689d37e2ce{display:block;width:auto}}"})]})}async function N(e){let{desde:t,docsPrev:a=[],totalPrev:s,page:r=1,fechaPrev:i}=e;return await l.Z.post("/api/logs",{desde:t,total:s,page:r,fecha:i}).then(async e=>{let{error:s,docs:i,total:n,nextPage:o,fecha:l}=e.data;if(Array.isArray(i)){let e=[...a,...i];if(console.log("datos obtenidos de db! (".concat(e.length,"/").concat(n,") - page ").concat(r," - nextPage ").concat(o)),o)return await N({desde:t,docsPrev:e,totalPrev:n,page:o,fechaPrev:l});let s=!!t;return(0,h.d)({data:e,fecha:l,parcial:s}),{datos:e,fechaUpd:l,parcial:s}}throw s||"no hay datos"}).catch(e=>(console.log("error fetchDatos:",(0,u.Z)(e)),{error:(0,u.Z)(e)}))}function _(e){let{ver:t}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"jsx-642d357d27cdcbd1 "+((t?"dot ver":"dot ok")||"")}),(0,s.jsx)(i(),{id:"642d357d27cdcbd1",children:".dot.jsx-642d357d27cdcbd1{display:inline-block;height:15px;width:15px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%}.ver.jsx-642d357d27cdcbd1{background-color:var(--rojo);border:1px solid var(--rojo)}.ok.jsx-642d357d27cdcbd1{background-color:var(--celeste-1);border:1px solid var(--azul-2)}"})]})}function S(){let e=(0,o.useRouter)(),[t,a]=(0,n.useState)(!0),[r,m]=(0,n.useState)(!1),[j,g]=(0,n.useState)([]),[S,C]=(0,n.useState)(k),[I,D]=(0,n.useState)([]),[F,E]=(0,n.useState)([]),[U,L]=(0,n.useState)(!1),[P,Z]=(0,n.useState)(""),[T,A]=(0,n.useState)([]);function B(e){let{ultimos:t=[],guardados:a=[]}=e,s=new Map;return a.forEach(e=>s.set(e._id,e)),t.forEach(e=>s.set(e._id,e)),Array.from(s.values())}async function M(e){let{parcial:t,ultimos:a}=e;if(!t)return a;
1if(j.length)return B({ultimos:a,guardados:j});let s=await (0,h.q9)();return(null==s?void 0:s.data)&&(null==s?void 0:s.fecha)?(console.log("datos obtenidos de idb!"),B({ultimos:a,guardados:s.data})):"error"}async function R(e){let{desde:t}=e,{datos:s,fechaUpd:r,parcial:i,error:n}=await N({page:1,desde:t});if(a(!1),n){g([]),D([]);return}let o=await M({parcial:i,ultimos:s});if("error"===o){console.log("error parseDatosOk"),g([]),D([]);return}let l=o.map(e=>e.ok||v.includes(e.tipo)&&!1!==e.ok?{...e,ok:!0}:{...e,ok:!1}),c=w(l,S);g(l),D(c),Z(r),localStorage.setItem("dashboard-logs-last-upd",new Date(r).toISOString())}function O(e,t){let a={...k,tipo:S.tipo,[e]:t};C(a),D(w(j,a))}function H(e){C(e),D(w(j,e))}async function q(){if(F.length&&!U)return L(!0),await l.Z.put("/api/logs",{cambios:F}).then(async e=>{let{error:t,ok:a}=e.data;if(a&&!t){console.log("guardarCambios ok!");let e=new Map;for(let t of F)e.set(t.id,{ok:t.ok});let t=j.map(t=>{let a=e.get(t._id);return a?{...t,ok:a.ok}:t}),a=w(t,S);g(t),D(a),E([]),A([]),L(!1),(0,h.d)({data:t});return}throw t||"error..."}).catch(e=>{console.log("error guardarCambios:",(0,u.Z)(e)),L(!1)})}async function J(){if(T.length&&!U)return L(!0),await l.Z.delete("/api/logs",{data:{paraEliminar:T}}).then(async e=>{let{error:t,ok:a}=e.data;if(a&&!t){console.log("eliminarLogs ok!");let e=j.filter(e=>!T.includes(e._id)),t=w(e,S);g(e),D(t),A([]),E([]),L(!1),(0,h.d)({data:e});return}throw t||"error..."}).catch(e=>{console.log("error eliminarLogs:",(0,u.Z)(e)),L(!1)})}(0,n.useEffect)(()=>{let t=localStorage.getItem("email");(null==t?void 0:t.includes("hbjav"))?window.innerWidth<1200?(a(!1),m(!0)):R({desde:localStorage.getItem("dashboard-logs-last-upd")}):e.push("/")},[]);let Q=[{title:"Estado",dataIndex:"ok",key:"ok",align:"center",width:100,render:(e,t)=>{let a=F.find(e=>e.id===t._id);return(0,s.jsx)("button",{type:"button",className:"text-link",onClick:()=>{var s,r;return s=t._id,r=!e,void(a?E(e=>e.filter(e=>e.id!==s)):E(e=>[...e,{id:s,ok:r}]))},children:(0,s.jsxs)("div",{className:"center",children:[(0,s.jsx)(_,{ver:!e}),a&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.Tt,{inline:!0,m:"1px -2px 0 -1px"}),(0,s.jsx)(_,{ver:e})]})]})})}},{title:"Fecha",dataIndex:"fecha",key:"fecha",isString:!0,align:"center",width:120,render:(e,t)=>{let a=T.find(e=>e===t._id),[r,i]=new Intl.DateTimeFormat("es-AR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).format(new Date(e)).split(", ");return(0,s.jsxs)("span",{style:{color:a?"var(--rojo-2)":"inherit"},children:[r,(0,s.jsx)("br",{}),i]})}},{title:"Tipo",dataIndex:"tipo",key:"tipo",isString:!0,align:"center",width:200,render:(e,t)=>{let a=T.find(e=>e===t._id);return(0,s.jsxs)("div",{className:"center col",children:[(0,s.jsx)("span",{style:{color:a?"var(--rojo-2)":"inherit"},children:e}),(0,s.jsx)("span",{className:"text-link",onClick:()=>O("tipo",e),children:(0,s.jsx)(x.PR,{})})]})}},{title:"User ID",dataIndex:"user_id",key:"user_id",align:"center",width:120,render:(e,t)=>{let a=T.find(e=>e===t._id);return(0,s.jsxs)("div",{className:"center col",children:[(0,s.jsx)("span",{style:{color:a?"var(--rojo-2)":"inherit"},children:e||""}),!!e&&(0,s.jsx)("span",{className:"text-link",onClick:()=>O("user_id",e),children:(0,s.jsx)(x.PR,{})})]})}},{title:"Email",dataIndex:"email",key:"email",isString:!0,width:300,render:(e,t)=>{let a=T.find(e=>e===t._id);return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{style:{color:a?"var(--rojo-2)":"inherit"},children:e||""}),!!e&&(0,s.jsx)("span",{className:"text-link",onClick:()=>O("email",e),children:(0,s.jsx)(x.PR,{})})]})}},{title:"Detalle",dataIndex:"detalle",key:"detalle",isString:!0,render:(e,t)=>{let a=T.find(e=>e===t._id);return(0,s.jsx)("span",{style:{color:a?"var(--rojo-2)":"inherit"},children:e||""})}},{title:"",key:"eliminar",align:"center",width:80,render:(e,t)=>{let a=T.find(e=>e===t._id);return(0,s.jsx)("div",{className:"center w100",children:(0,s.jsx)("button",{type:"button",className:"text-link center",onClick:()=>{var e;return e=t._id,void(a?A(t=>t.filter(t=>t!==e)):A(t=>[...t,e]))},children:a?(0,s.jsx)(x.rF,{inline:!0,color:"var(--rojo-2)"}):(0,s.jsx)(x.x8,{})})})}}];async function X(e){a(!0),await R({desde:e})}return t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.h,{}),(0,s.jsx)("main",{className:"jsx-c1dac76a75a28025 col main",children:(0,s.jsx)("p",{className:"jsx-c1dac76a75a28025 txt-center",children:"Cargando datos..."})}),(0,s.jsx)(i(),{id:"c1dac76a75a28025",children:".txt-center.jsx-c1dac76a75a28025{text-align:center}"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.h,{hideText:!0,children:[(0,s.jsxs)("div",{className:"jsx-87d8271b45ced051 center",children:[(0,s.jsx)("div",{className:"jsx-87d8271b45ced051 gris",children:(0,s.jsx)(p.H,{fecha:P})}),(0,s.jsx)("button",{type:"button",onClick:()=>X(P),disabled:t,className:"jsx-87d8271b45ced051 text-link f16",children:(0,s.jsx)(x.L,{})})]}),(0,s.jsx)(f.N,{noLogo:!0})]}),(0,s.jsxs)("main",{className:"jsx-87d8271b45ced051 col main",children:[(0,s.jsxs)("div",{className:"jsx-87d8271b45ced051 center controles",children:[(0,s.jsx)(y,{filtros:S,changeFiltros:H}),(0,s.jsxs)("div",{className:"jsx-87d8271b45ced051 center gap10",children:[(0,s.jsx)("button",{type:"button",onClick:q,disabled:!F.length||U,className:"jsx-87d8271b45ced051 btn1 f16",children:"".concat(U?"guardando":"guardar"," (").concat(F.length,")")}),(0,s.jsx)("button",{type:"button",onClick:()=>E([]),disabled:!F.length||U,className:"jsx-87d8271b45ced051 text-link f16",children:"x"})]}),(0,s.jsxs)("div",{className:"jsx-87d8271b45ced051 center gap10",children:[(0,s.jsx)("button",{type:"button",onClick:J,disabled:!T.length||U,className:"jsx-87d8271b45ced051 btn1 f16",children:"".concat(U?"eliminando":"eliminar"," (").concat(T.length,")")}),(0,s.jsx)("button",{type:"button",onClick:()=>A([]),disabled:!T.length||U,className:"jsx-87d8271b45ced051 text-link f16",children:"x"})]})]}),(0,s.jsx)("div",{className:"jsx-87d8271b45ced051 tabla-div no-shrink f16",children:(0,s.jsx)("div",{className:"jsx-87d8271b45ced051 tabla-div-div",children:(0,s.jsx)(d.Z,{columns:Q,dataSource:I,rowKey:e=>"".concat(e.user_id||"x","_").concat(e.tipo,"_").concat(new Date(e.fecha).toISOString()),pagination:{defaultPageSize:10,perPageOpts:[5,10,25,100]},sortable:!0,sortByDefault:{dataIndex:"fecha",order:-1,isString:!0}})})}),(0,s.jsx)(z,{filtros:S,changeFiltros:H}),(0,s.jsx)("p",{className:"jsx-87d8271b45ced051 gris",children:(0,s.jsx)(p.H,{fecha:P,long:!0})}),(0,s.jsx)("button",{disabled:t,onClick:()=>X(),className:"jsx-87d8271b45ced051 btn text-link",children:t?"cargando...":"recargar todo"}),r&&(0,s.jsx)(b.p,{habilitar:function(){m(!1),a(!0),R({desde:localStorage.getItem("dashboard-logs-last-upd")})}})]}),(0,s.jsx)(i(),{id:"87d8271b45ced051",children:".main.jsx-87d8271b45ced051{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;scrollbar-gutter:stable;max-height:-webkit-calc(100vh - 65px);max-height:-moz-calc(100vh - 65px);max-height:calc(100vh - 65px);overflow-y:auto}.controles.jsx-87d8271b45ced051{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:start;
1-webkit-justify-content:flex-start;-moz-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;gap:10px;margin-bottom:8px}.gap10.jsx-87d8271b45ced051{gap:10px}.tabla-div.jsx-87d8271b45ced051{width:100%;overflow-x:auto}.tabla-div-div.jsx-87d8271b45ced051{min-width:1100px}.no-shrink.jsx-87d8271b45ced051{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0}"})]})}function z(e){let{filtros:t,changeFiltros:a}=e,[r,o]=(0,n.useState)(!1);function l(e,s){let r=s?[...t.activos,e]:t.activos.filter(t=>t!==e);a({...t,activos:r})}function c(e){a({...t,activos:e})}let d=t.activos.length===k.activos.length,x=t.activos.length===m.length&&t.activos.every(e=>m.includes(e)),u=t.activos.length===j.length&&t.activos.every(e=>j.includes(e)),b=!d&&!x&&!u;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"jsx-32bc061a7e129c05 wrap filtros f16",children:[(0,s.jsxs)("div",{className:"jsx-32bc061a7e129c05 w100 center",children:[(0,s.jsx)("button",{type:"button",onClick:()=>c(k.activos),className:"jsx-32bc061a7e129c05 "+((d?"bold text-link f16":"text-link f16")||""),children:"todos"}),(0,s.jsx)("button",{type:"button",onClick:()=>c(m),className:"jsx-32bc061a7e129c05 "+((x?"bold text-link f16":"text-link f16")||""),children:"s\xf3lo errores"}),(0,s.jsx)("button",{type:"button",onClick:()=>c(j),className:"jsx-32bc061a7e129c05 "+((u?"bold text-link f16":"text-link f16")||""),children:"s\xf3lo info"}),(0,s.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"jsx-32bc061a7e129c05 "+((b?"bold text-link f16":"text-link f16")||""),children:[r?"-":"+",b?" (".concat(t.activos.length,")"):""]})]}),r&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"jsx-32bc061a7e129c05 m0",children:"tipos - errores:"}),(0,s.jsx)("div",{className:"jsx-32bc061a7e129c05 grupos wrap",children:m.map(e=>{let a=t.activos.includes(e);return(0,s.jsx)("button",{type:"button",onClick:()=>l(e,!a),className:"jsx-32bc061a7e129c05 "+((a?"btn1 f16":"btn2 f16")||""),children:e},e)})}),(0,s.jsx)("p",{className:"jsx-32bc061a7e129c05 m0",children:"tipos - info:"}),(0,s.jsx)("div",{className:"jsx-32bc061a7e129c05 grupos wrap",children:j.map(e=>{let a=t.activos.includes(e);return(0,s.jsx)("button",{type:"button",onClick:()=>l(e,!a),className:"jsx-32bc061a7e129c05 "+((a?"btn1 f16":"btn2 f16")||""),children:e},e)})})]})]}),(0,s.jsx)(i(),{id:"32bc061a7e129c05",children:".wrap.jsx-32bc061a7e129c05{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.filtros.jsx-32bc061a7e129c05{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:start;-webkit-align-items:flex-start;-moz-box-align:start;-ms-flex-align:start;align-items:flex-start;gap:10px}.m0.jsx-32bc061a7e129c05{margin:0}.grupos.jsx-32bc061a7e129c05{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;gap:5px}"})]})}},69349:function(e,t,a){"use strict";a.d(t,{AS:function(){return i},Jl:function(){return n},Qg:function(){return c},cJ:function(){return d},d:function(){return o},q9:function(){return r},x2:function(){return l}});var s=a(24678);async function r(){if("object"==typeof self&&"object"==typeof self.indexedDB)return await (0,s.U2)("dashboardLogs")}async function i(){if("object"==typeof self&&"object"==typeof self.indexedDB)return await (0,s.U2)("dashboardUsers")}async function n(){if("object"==typeof self&&"object"==typeof self.indexedDB)return await (0,s.U2)("dashboardFacturas")}async function o(e){let{data:t,fecha:a,parcial:i}=e;try{if(!("object"==typeof self&&"object"==typeof self.indexedDB))return console.log("setLogsIdb error: idb"),"error";let e=i||!a?await r():null;if(i){if(!(null==e?void 0:e.data)||!(null==e?void 0:e.fecha))throw"parcial: no se encontraron datos previos en idb";let r=function(e){let{ultimos:t=[],guardados:a=[]}=e,s=new Map;return a.forEach(e=>s.set(e._id,e)),t.forEach(e=>s.set(e._id,e)),Array.from(s.values())}({ultimos:t,guardados:e.data});await (0,s.t8)("dashboardLogs",{data:r,fecha:a})}else if(a)await (0,s.t8)("dashboardLogs",{data:t,fecha:a});else{if(!(null==e?void 0:e.fecha))throw"parcial: no se encontraron datos previos en idb (2)";await (0,s.t8)("dashboardLogs",{data:t,fecha:e.fecha})}return console.log("setLogsIdb ok!"),"ok"}catch(e){return console.log("setLogsIdb error:",(null==e?void 0:e.description)||(null==e?void 0:e.message)||e),"error"}}async function l(e){let{data:t,fecha:a,parcial:r}=e;try{if(!("object"==typeof self&&"object"==typeof self.indexedDB))return console.log("setDashboardUsersIdb error: idb"),"error";if(r){var n;let e=await i();if(!(null==e?void 0:e.fecha)||!(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.users))throw"parcial: no se encontraron datos previos en idb";let r={users:function(e){let{ultimos:t=[],guardados:a=[]}=e,s=new Map;
1return a.forEach(e=>s.set(e.email,e)),t.forEach(e=>s.set(e.email,e)),Array.from(s.values())}({ultimos:t.users,guardados:e.data.users}),excluidos:t.excluidos};await (0,s.t8)("dashboardUsers",{data:r,fecha:a})}else await (0,s.t8)("dashboardUsers",{data:t,fecha:a});return console.log("setDashboardUsersIdb ok!"),"ok"}catch(e){return console.log("setDashboardUsersIdb error:",(null==e?void 0:e.description)||(null==e?void 0:e.message)||e),"error"}}async function c(e){let{email:t}=e;try{if(!("object"==typeof self&&"object"==typeof self.indexedDB))return console.log("deleteDashboardUserIdb error: idb"),"error";if(t){var a;let e=await i();if(!(null==e?void 0:e.fecha)||!(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.users))throw"no se encontraron datos previos en idb";let{fecha:r,data:n}=e,{users:o,excluidos:l}=n,c={users:o.filter(e=>e.email!==t),excluidos:l};await (0,s.t8)("dashboardUsers",{data:c,fecha:r})}else throw"email";return console.log("deleteDashboardUserIdb ok!"),"ok"}catch(e){return console.log("deleteDashboardUserIdb error:",(null==e?void 0:e.description)||(null==e?void 0:e.message)||e),"error"}}async function d(e){let{data:t}=e;try{if(!("object"==typeof self&&"object"==typeof self.indexedDB))return console.log("setFacturasIdb error: idb"),"error";return await (0,s.t8)("dashboardFacturas",{data:t,fecha:new Date}),console.log("setFacturasIdb ok!"),"ok"}catch(e){return console.log("setFacturasIdb error:",(null==e?void 0:e.description)||(null==e?void 0:e.message)||e),"error"}}}},function(e){e.O(0,[1664,4954,3458,2888,9774,179],function(){return e(e.s=1966)}),_N_E=e.O()}]);

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.