1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[691],{1877:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/painel/login",function(){return c(8275)}])},3266:function(a,b,c){"use strict";c.d(b,{J:function(){return e}});var d=c(5893);function e(a){var b=a.msg,c=a.hasError;return void 0===c||c?(0,d.jsx)("label",{children:(0,d.jsx)("span",{className:"text-xs font-semibold text-red-600",children:b})}):(0,d.jsx)(d.Fragment,{})}c(7294)},8006:function(a,b,c){"use strict";c.d(b,{F:function(){return h}});var d=c(1799),e=c(9396),f=c(5893);c(7294);var g=c(3266);function h(a){var b,c=a.label,h=a.name,i=a.register,j=a.errors,k=a.required,l=a.disabled,m=a.placeholder,n=a.type;return(0,f.jsxs)("div",{children:[(0,f.jsx)("label",{htmlFor:h,className:"label",children:c}),(0,f.jsx)("input",(0,e.Z)((0,d.Z)({type:void 0===n?"text":n,id:h,placeholder:void 0===m?" ":m,style:j[h]&&{border:"1px solid red"}},i(h)),{className:"input-text",disabled:void 0!==l&&l,required:void 0!==k&&k})),(0,f.jsx)(g.J,{msg:null===(b=j[h])|| void 0===b?void 0:b.message,hasError:j[h]})]})}},8275:function(a,b,c){"use strict";c.r(b),c.d(b,{default:function(){return o}});var d=c(7568),e=c(4051),f=c.n(e),g=c(5893),h=c(5079),i=c(8006),j=c(9259),k=c(3299),l=c(1163),m=c(7536),n=c(6501);function o(){var a=(0,l.useRouter)(),b=(0,j.Z)().setUser,c=(0,m.cI)(),e=c.register,o=c.handleSubmit,p=(c.control,c.reset,c.watch,c.formState),q=p.errors,r=p.isSubmitting;function s(){return(s=(0,d.Z)(f().mark(function c(d){var e,g;return f().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e=n.ZP.loading("Realizando login..."),c.prev=1,c.next=4,(0,k.signIn)("credentials",{redirect:!1,email:d.email,password:d.password});case 4:if(!(null==(g=c.sent)?void 0:g.error)){c.next=7;break}throw Error(g.error);case 7:b({name:"arthur"}),n.ZP.success("Login realizado com sucesso!"),a.push("/painel/dash"),c.next=16;break;case 12:c.prev=12,c.t0=c.catch(1),n.ZP.error(c.t0.message||"Erro interno");case 16:return c.prev=16,n.ZP.dismiss(e),c.finish(16);case 19:case"end":return c.stop()}},c,null,[[1,12,16,19]])}))).apply(this,arguments)}return(0,g.jsxs)("main",{className:"py-20",children:[(0,g.jsx)("h1",{className:"text-2xl font-bold text-center",children:"Intranet"}),(0,g.jsxs)("div",{className:"w-full max-w-md mx-auto",children:[(0,g.jsxs)("button",{className:"flex items-center py-2 px-5 w-full my-4 border",onClick:function(){return(0,k.signIn)("azure-ad",{callbackUrl:a.query.callbackUrl||"/painel/dash"})},children:[(0,g.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-10",width:"1em",height:"1em",viewBox:"0 0 256 256",children:[(0,g.jsx)("path",{fill:"#f1511b",d:"M121.666 121.666H0V0h121.666z"}),(0,g.jsx)("path",{fill:"#80cc28",d:"M256 121.666H134.335V0H256z"}),(0,g.jsx)("path",{fill:"#00adef",d:"M121.663 256.002H0V134.336h121.663z"}),(0,g.jsx)("path",{fill:"#fbbc09",d:"M256 256.002H134.335V134.336H256z"})]}),"Fa\xe7a login utilizando conta Microsoft"]}),(0,g.jsxs)("form",{onSubmit:o(function(a){return s.apply(this,arguments)}),children:[(0,g.jsx)(i.F,{label:"E-mail",name:"email",register:e,errors:q}),(0,g.jsx)(i.F,{type:"password",label:"senha",name:"password",register:e,errors:q}),(0,g.jsx)(h.z,{variant:"primaryGreen",type:"submit",disabled:r,children:"Entrar"})]})]})]})}},9259:function(a,b,c){"use strict";var d=(0,c(4529).Ue)(function(a){return{user:null,setUser:function(b){return a({user:b})},clearUser:function(){return a({user:null})}}});b.Z=d},7568:function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(j){c(j);return}h.done?b(i):Promise.resolve(i).then(d,e)}function e(a){return function(){var b=this,c=arguments;return new Promise(function(e,f){var g=a.apply(b,c);function h(a){d(g,e,f,h,i,"next",a)}function i(a){d(g,e,f,h,i,"throw",a)}h(void 0)})}}c.d(b,{Z:function(){return e}})}},function(a){a.O(0,[786,774,888,179],function(){var b;return a(a.s=1877)}),_N_E=a.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.