(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3459],{69368:function(e,t,o){"use strict";o.d(t,{Z:function(){return w}});var r=o(63366),n=o(87462),a=o(67294),i=o(86010),l=o(94780),s=o(8423),p=o(21964),d=o(88169),c=o(85893),u=(0,d.Z)((0,c.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),m=(0,d.Z)((0,c.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),x=(0,d.Z)((0,c.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),h=o(98216),g=o(71657),f=o(90948),b=o(1588),Z=o(34867);function M(e){return(0,Z.ZP)("MuiCheckbox",e)}let v=(0,b.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),y=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],C=e=>{let{classes:t,indeterminate:o,color:r}=e,a={root:["root",o&&"indeterminate",`color${(0,h.Z)(r)}`]},i=(0,l.Z)(a,M,t);return(0,n.Z)({},t,i)},I=(0,f.ZP)(p.Z,{shouldForwardProp:e=>(0,f.FO)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:o}=e;return[t.root,o.indeterminate&&t.indeterminate,"default"!==o.color&&t[`color${(0,h.Z)(o.color)}`]]}})(({theme:e,ownerState:t})=>(0,n.Z)({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${v.checked}, &.${v.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${v.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),B=(0,c.jsx)(m,{}),k=(0,c.jsx)(u,{}),S=(0,c.jsx)(x,{}),j=a.forwardRef(function(e,t){var o,l;let s=(0,g.Z)({props:e,name:"MuiCheckbox"}),{checkedIcon:p=B,color:d="primary",icon:u=k,indeterminate:m=!1,indeterminateIcon:x=S,inputProps:h,size:f="medium",className:b}=s,Z=(0,r.Z)(s,y),M=m?x:u,v=m?x:p,j=(0,n.Z)({},s,{color:d,indeterminate:m,size:f}),w=C(j);return(0,c.jsx)(I,(0,n.Z)({type:"checkbox",inputProps:(0,n.Z)({"data-indeterminate":m},h),icon:a.cloneElement(M,{fontSize:null!=(o=M.props.fontSize)?o:f}),checkedIcon:a.cloneElement(v,{fontSize:null!=(l=v.props.fontSize)?l:f}),ownerState:j,ref:t,className:(0,i.Z)(w.root,b)},Z,{classes:w}))});var w=j},73700:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return o(73664)}])},56456:function(e,t,o){"use strict";var r=o(85893),n=o(67294),a=o(90948),i=o(61903);let l=(0,a.ZP)(i.Z)(e=>{let{theme:t}=e;return{alignItems:"flex-start","& .MuiInputLabel-root":{transform:"none",lineHeight:1.154,position:"relative",marginBottom:t.spacing(1),fontSize:t.typography.body2.fontSize,color:"".concat(t.palette.text.primary," !important")},"& .MuiInputBase-root":{borderRadius:8,backgroundColor:"transparent !important",border:"1px solid rgba(".concat(t.palette.customColors.main,", 0.2)"),transition:t.transitions.create(["border-color","box-shadow"],{duration:t.transitions.duration.shorter}),"&:not(.Mui-focused):not(.Mui-disabled):not(.Mui-error):hover":{borderColor:"rgba(".concat(t.palette.customColors.main,", 0.28)")},"&:before, &:after":{display:"none"},"&.MuiInputBase-sizeSmall":{borderRadius:6},"&.Mui-error":{borderColor:t.palette.error.main},"&.Mui-focused":{boxShadow:t.shadows[2],"& .MuiInputBase-input:not(.MuiInputBase-readOnly):not([readonly])::placeholder":{transform:"translateX(4px)"},"&.MuiInputBase-colorPrimary":{borderColor:t.palette.primary.main},"&.MuiInputBase-colorSecondary":{borderColor:t.palette.secondary.main},"&.MuiInputBase-colorInfo":{borderColor:t.palette.info.main},"&.MuiInputBase-colorSuccess":{borderColor:t.palette.success.main},"&.MuiInputBase-colorWarning":{borderColor:t.palette.warning.main},"&.MuiInputBase-colorError":{borderColor:t.palette.error.main},"&.Mui-error":{borderColor:t.palette.error.main}},"&.Mui-disabled":{backgroundColor:"".concat(t.palette.action.selected," !important")},"& .MuiInputAdornment-root":{marginTop:"0 !important"}},"& .MuiInputBase-input":{color:t.palette.text.secondary,"&:not(textarea)":{padding:"15.5px 13px"},"&:not(textarea).MuiInputBase-inputSizeSmall":{padding:"7.5px 13px"},"&:not(.MuiInputBase-readOnly):not([readonly])::placeholder":{transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter})},"&.MuiInputBase-inputAdornedStart:not(.MuiAutocomplete-input)":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd:not(.MuiAutocomplete-input)":{paddingRight:0}},"& .MuiFormHelperText-root":{lineHeight:1.154,margin:t.spacing(1,0,0),color:t.palette.text.secondary,fontSize:t.typography.body2.fontSize,"&.Mui-error":{color:t.palette.error.main}},"& .MuiSelect-select:focus, & .MuiNativeSelect-select:focus":{backgroundColor:"transparent"},"& .MuiSelect-filled .MuiChip-root":{height:22},"& .MuiAutocomplete-input":{paddingLeft:"6px !important",paddingTop:"7.5px !important",paddingBottom:"7.5px !important","&.MuiInputBase-inputSizeSmall":{paddingLeft:"6px !important",paddingTop:"2.5px !important",paddingBottom:"2.5px !important"}},"& .MuiAutocomplete-inputRoot":{paddingTop:"8px !important",paddingLeft:"8px !important",paddingBottom:"8px !important","&:not(.MuiInputBase-sizeSmall).MuiInputBase-adornedStart":{paddingLeft:"13px !important"},"&.MuiInputBase-sizeSmall":{paddingTop:"5px !important",paddingLeft:"5px !important",paddingBottom:"5px !important","& .MuiAutocomplete-tag":{margin:2,height:22}}},"& .MuiInputBase-multiline":{padding:"15.25px 13px","&.MuiInputBase-sizeSmall":{padding:"7.25px 13px"},"& textarea.MuiInputBase-inputSizeSmall:placeholder-shown":{overflowX:"hidden"}},"& + .react-datepicker__close-icon":{top:11,"&:after":{fontSize:"1.6rem !important"}}}}),s=(0,n.forwardRef)((e,t)=>{let{size:o="small",InputLabelProps:n,...a}=e;return(0,r.jsx)(l,{size:o,inputRef:t,...a,variant:"filled",InputLabelProps:{...n,shrink:!0}})});t.Z=s},73664:function(e,t,o){"use strict";o.r(t);var r=o(85893),n=o(67294),a=o(41664),i=o.n(a),l=o(25675),s=o.n(l),p=o(83321),d=o(69368),c=o(15861),u=o(93946),m=o(36919),x=o(98396),h=o(90948),g=o(2734),f=o(87109),b=o(50480),Z=o(56456),M=o(63730),v=o(16310),y=o(87536),C=o(47533),I=o(33299),B=o(11163),k=o(50591),S=o(23918),j=o(66204),w=o(67340);(0,h.ZP)("img")(e=>{let{theme:t}=e;return{zIndex:2,maxHeight:680,marginTop:t.spacing(12),marginBottom:t.spacing(12),[t.breakpoints.down(1540)]:{maxHeight:550},[t.breakpoints.down("lg")]:{maxHeight:500}}});let z=(0,h.ZP)(m.Z)(e=>{let{theme:t}=e;return{width:"100%",[t.breakpoints.up("md")]:{maxWidth:450},[t.breakpoints.up("lg")]:{maxWidth:600},[t.breakpoints.up("xl")]:{maxWidth:750}}}),P=(0,h.ZP)(i())(e=>{let{theme:t}=e;return{textDecoration:"none",color:"".concat(t.palette.primary.main," !important")}}),_=(0,h.ZP)(b.Z)(e=>{let{theme:t}=e;return{"& .MuiFormControlLabel-label":{color:t.palette.text.secondary}}}),L=v.Ry().shape({email:v.Z_().email().required(),password:v.Z_().min(5).required()}),R={password:"",email:""},E=()=>{let[e,t]=(0,n.useState)(!0),[o,a]=(0,n.useState)(!1);(0,I.useSession)();let i=(0,B.useRouter)(),l=(0,g.Z)();(0,k.Z)();let{settings:h}=(0,S.r)();(0,x.Z)(l.breakpoints.down("md"));let{skin:b}=h,{control:v,setError:w,handleSubmit:E,formState:{errors:H}}=(0,y.cI)({defaultValues:R,mode:"onBlur",resolver:(0,C.X)(L)}),T=e=>{let{email:t,password:o}=e;(0,I.signIn)("credentials",{email:t,password:o,redirect:!1}).then(e=>{if(e&&e.ok){let e=i.query.returnUrl;i.replace(e&&"/accesocms"!==e?e:"/accesocms")}else w("email",{type:"manual",message:"Email or Password is invalid"})})};return(0,r.jsx)(m.Z,{className:"content-center",sx:{backgroundColor:"background.paper"},children:(0,r.jsx)(z,{children:(0,r.jsx)(m.Z,{sx:{p:[6,12],height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsxs)(m.Z,{sx:{width:"100%",maxWidth:400},children:[(0,r.jsx)(s(),{src:"/images/logos/logo.png",width:200,height:60,alt:"Logo"}),(0,r.jsxs)(m.Z,{sx:{my:6},children:[(0,r.jsx)(c.Z,{variant:"h3",sx:{mb:1.5},children:"Bienvenidos a ".concat(j.Z.templateName,"! \uD83D\uDC4B\uD83C\uDFFB")}),(0,r.jsx)(c.Z,{sx:{color:"text.secondary"},children:"Por favor, ingrese su email y clave para iniciar sesi\xf3n"})]}),(0,r.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:E(T),children:[(0,r.jsx)(m.Z,{sx:{mb:4},children:(0,r.jsx)(y.Qr,{name:"email",control:v,rules:{required:!0},render:e=>{let{field:{value:t,onChange:o,onBlur:n}}=e;return(0,r.jsx)(Z.Z,{fullWidth:!0,autoFocus:!0,label:"Email",value:t,onBlur:n,onChange:o,placeholder:"",error:!!H.email,...H.email&&{helperText:H.email.message}})}})}),(0,r.jsx)(m.Z,{sx:{mb:1.5},children:(0,r.jsx)(y.Qr,{name:"password",control:v,rules:{required:!0},render:e=>{let{field:{value:t,onChange:n,onBlur:i}}=e;return(0,r.jsx)(Z.Z,{fullWidth:!0,value:t,onBlur:i,label:"Clave",onChange:n,id:"auth-login-v2-password",error:!!H.password,...H.password&&{helperText:H.password.message},type:o?"text":"password",InputProps:{endAdornment:(0,r.jsx)(f.Z,{position:"end",children:(0,r.jsx)(u.Z,{edge:"end",onMouseDown:e=>e.preventDefault(),onClick:()=>a(!o),children:(0,r.jsx)(M.Z,{fontSize:"1.25rem",icon:o?"tabler:eye":"tabler:eye-off"})})})}})}})}),(0,r.jsxs)(m.Z,{sx:{mb:1.75,display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between"},children:[(0,r.jsx)(_,{label:"Recordarme",control:(0,r.jsx)(d.Z,{checked:e,onChange:e=>t(e.target.checked)})}),(0,r.jsx)(c.Z,{component:P,href:"/forgot-password",children:"\xbfOlvidaste tu clave?"})]}),(0,r.jsxs)(p.Z,{fullWidth:!0,type:"submit",variant:"contained",sx:{mb:4},children:[(0,r.jsx)(M.Z,{fontSize:"1.25rem",icon:"tabler:login-2"})," Ingresar"]})]})]})})})})};E.getLayout=e=>(0,r.jsx)(w.Z,{children:e}),E.guestGuard=!0,t.default=E}},function(e){e.O(0,[7536,2216,9774,2888,179],function(){return e(e.s=73700)}),_N_E=e.O()}]);