PageSourceSearch

https://artefatospro.com.br/assets/adm-login-Bar1IUky.js

js artefatospro.com.br collected 2026-09-24 14:34:41 UTC 2,856 bytes, 2 lines download raw bytes

1import{r as t,j as e}from"./vendor-react-O1HtssjF.js";import{b as g,g as w,v,w as N,h as C,x as S,f as E,y as I,e as T,q}from"./index-DE-2a8lD.js";import{I as h}from"./input-DUJeXIC_.js";import{L as p}from"./label-_lWEXx3t.js";import{z as L,L as k}from"./vendor-icons-2dxAfxR_.js";import"./vendor-query-C57Ujfuk.js";import"./vendor-radix-Cn4zZLa9.js";import"./vendor-datefns-RsZNnTnu.js";import"./vendor-openai-PX4_LG7y.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="e50b3f81-3dae-423b-a7d6-7d9ea57c7b2d",s._sentryDebugIdIdentifier="sentry-dbid-e50b3f81-3dae-423b-a7d6-7d9ea57c7b2d")}catch{}})();function K(){const{isAuthenticated:s,isLoading:a}=g(),[i,x]=t.useState(""),[l,b]=t.useState(""),[o,n]=t.useState(""),[c,u]=t.useState(!1),[m,j]=t.useState("");t.useEffect(()=>{!a&&s&&(window.location.href="/dashboard")},[s,a]);const y=async r=>{var f;if(r.preventDefault(),n(""),I&&!m){n("Confirme que você não é um robô.");return}u(!0);try{await T("POST","/api/auth/login",{email:i,password:l,"cf-turnstile-response":m}),await q.invalidateQueries({queryKey:["/api/auth/user"]}),window.location.href="/dashboard"}catch(d){n(((f=d==null?void 0:d.message)==null?void 0:f.replace(/^\d+:\s*/,""))||"Credenciais inválidas")}finally{u(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsxs("div",{className:"w-full max-w-sm",children:[e.jsxs("div",{className:"text-center mb-6",children:[e.jsx("div",{className:"flex justify-center mb-3",children:e.jsx("div",{className:"h-12 w-12 rounded-xl bg-muted flex items-center justify-center",children:e.jsx(L,{className:"h-6 w-6 text-muted-foreground"})})}),e.jsx("h1",{className:"text-xl font-semibold",children:"Acesso Administrativo"})]}),e.jsxs(w,{children:[e.jsx(v,{className:"pb-4",children:e.jsx(N,{className:"text-base text-center text-muted-foreground",children:"Área restrita"})}),e.jsx(C,{children:e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{htmlFor:"email",children:"Email"}),e.jsx(h,{id:"email",type:"email",value:i,onChange:r=>x(r.target.value),autoComplete:"email",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(p,{htmlFor:"password",children:"Senha"}),e.jsx(h,{id:"password",type:"password",value:l,onChange:r=>b(r.target.value),autoComplete:"current-password",required:!0})]}),e.jsx(S,{onToken:j}),o&&e.jsx("p",{className:"text-sm text-destructive",children:o}),e.jsxs(E,{className:"w-full",type:"submit",disabled:c,children:[c&&e.jsx(k,{className:"mr-2 h-4 w-4 animate-spin"}),"Entrar"]})]})})]})]})})}export{K as default};
2//# sourceMappingURL=adm-login-Bar1IUky.js.map

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.