1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5429],{5487:function(e,n,r){r.d(n,{Ai:function(){return f},c0:function(){return p},eD:function(){return c},gF:function(){return d},y1:function(){return l},zB:function(){return u}});var t=r(5861),i=r(4687),o=r.n(i),a=r(1718),s=r(6204),c=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.Z.head("/api/identification?id=".concat(n),{headers:{"Content-Type":"application/json"}});case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),l=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.Z.post("/api/signup",n,{headers:{"Content-Type":"application/json"}});case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),u=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.Z.post("/api/signin",n,{headers:{"Content-Type":"application/json"}});case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),d=function(){var e=(0,t.Z)(o().mark((function e(n){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.Z.post("/api/forgot-password",{email:n},{headers:{"Content-Type":"application/json"}});case 2:return r=e.sent,e.abrupt("return",null===r||void 0===r?void 0:r.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),p=function(){var e=(0,t.Z)(o().mark((function e(n,r){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s.Z.post("/api/reset-password",{token:n,password:r},{headers:{"Content-Type":"application/json"}});case 2:return t=e.sent,e.abrupt("return",null===t||void 0===t?void 0:t.data);case 4:case"end":return e.stop()}}),e)})));return function(n,r){return e.apply(this,arguments)}}(),f=function(){var e=(0,t.Z)(o().mark((function e(){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.Z.get("/api/profile",{headers:{"Content-Type":"application/json"}});case 2:return n=e.sent,e.abrupt("return",null===n||void 0===n?void 0:n.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},8475:function(e,n,r){r.d(n,{D:function(){return i}});r(7313);var t=r(6417),i=function(){return(0,t.jsxs)("svg",{width:"260",height:"260",viewBox:"0 0 260 260",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"sunGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#FFE680",stopOpacity:"1"}),(0,t.jsx)("stop",{offset:"50%",stopColor:"#FFD700",stopOpacity:"1"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#E8C872",stopOpacity:"1"})]}),(0,t.jsxs)("filter",{id:"glow",children:[(0,t.jsx)("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),(0,t.jsxs)("feMerge",{children:[(0,t.jsx)("feMergeNode",{in:"coloredBlur"}),(0,t.jsx)("feMergeNode",{in:"SourceGraphic"})]})]})]}),(0,t.jsx)("circle",{cx:"130",cy:"130",r:"45",stroke:"url(#sunGradient)",strokeWidth:"10",fill:"none",filter:"url(#glow)"}),(0,t.jsxs)("g",{"transform-origin":"130 130",children:[(0,t.jsx)("path",{d:"M130 10 L130 55",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M130 205 L130 250",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M10 130 L55 130",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M205 130 L250 130",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url
1(#glow)"}),(0,t.jsx)("path",{d:"M55 55 L85 85",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M175 175 L205 205",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M55 205 L85 175",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M175 85 L205 55",stroke:"url(#sunGradient)",strokeWidth:"10",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M130 15 C135 25 135 45 130 55",stroke:"url(#sunGradient)",strokeWidth:"6",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M245 130 C235 135 215 135 205 130",stroke:"url(#sunGradient)",strokeWidth:"6",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M130 245 C125 235 125 215 130 205",stroke:"url(#sunGradient)",strokeWidth:"6",strokeLinecap:"round",filter:"url(#glow)"}),(0,t.jsx)("path",{d:"M15 130 C25 125 45 125 55 130",stroke:"url(#sunGradient)",strokeWidth:"6",strokeLinecap:"round",filter:"url(#glow)"})]})]})}},7310:function(e,n,r){r.d(n,{o:function(){return s}});var t=r(1413),i=r(5987),o=(r(7313),r(6417)),a=["text","onClick","isLoading","disabled","variant"],s=function(e){var n=e.text,r=e.onClick,s=e.isLoading,c=void 0!==s&&s,l=e.disabled,u=void 0!==l&&l,d=e.variant,p=void 0===d?"primary":d,f=(0,i.Z)(e,a);return(0,o.jsxs)("button",(0,t.Z)((0,t.Z)({className:"button ".concat(p),onClick:r,disabled:c||u},f),{},{children:[c&&(0,o.jsx)("span",{className:"button-loading"}),(0,o.jsx)("span",{children:n})]}))}},5284:function(e,n,r){r.d(n,{y:function(){return s}});r(7313);var t=r(8259),i=r(8207),o=r(6417),a={cpf:t.DC,phone:i.y,date:function(e){var n=e.replace(/\D/g,"").slice(0,8),r=n.slice(0,2),t=n.slice(2,4),i=n.slice(4,8);return n.length<=2?r:n.length<=4?"".concat(r,"/").concat(t):"".concat(r,"/").concat(t,"/").concat(i)},cep:function(e){return e?e=(e=e.replace(/\D/g,"")).replace(/(\d{5})(\d)/,"$1-$2"):""}},s=function(e){var n,r=e.label,t=e.type,i=void 0===t?"text":t,s=e.value,c=e.onChange,l=e.onBlur,u=e.error,d=e.isRequired,p=void 0!==d&&d,f=e.prefix,h=void 0===f?null:f,v=e.mask,g=void 0===v?null:v,m=e.showToggle,x=void 0!==m&&m,j=e.onToggleVisibility,k=void 0===j?void 0:j,b=e.isPasswordVisible,w=void 0!==b&&b,y=function(e){var n=e.target.value;g&&(n=a[g](n)),c(n)};return n=x?w?"text":"password":i,(0,o.jsxs)("div",{className:"form-group",children:[(0,o.jsxs)("label",{className:"label",children:[r," ",p&&"*"]}),h?(0,o.jsxs)("div",{className:"phone-prefix",children:[(0,o.jsx)("div",{className:"phone-prefix-box",children:h}),(0,o.jsx)("input",{type:n,className:"input-field",value:s,onChange:y,onBlur:l})]}):(0,o.jsxs)("div",{style:{position:"relative",display:"flex"},children:[(0,o.jsx)("input",{type:n,className:"input-field",value:s,onChange:y,onBlur:l,placeholder:r,style:{width:"100%"}}),x&&(0,o.jsx)("button",{className:"input-icon",type:"button",onClick:k,style:{position:"absolute",right:12,top:"50%",transform:"translateY(-50%)"},children:w?"\ud83d\udc41\ufe0f":"\ud83d\udc41\ufe0f\u200d\ud83d\udde8\ufe0f"})]}),u&&(0,o.jsx)("div",{className:"error-message",children:u})]})}},6865:function(e,n,r){r.d(n,{u:function(){return i}});r(7313);var t=r(6417),i=function(){return(0,t.jsx)("div",{className:"yellow-line"})}},5968:function(e,n){var r,t=null===(r={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_API_URL)||void 0===r?void 0:r.trim(),i={urlServer:t||"http://localhost:8000"},o={urlServer:t||window.location.origin},a=window.location.href.match("localhost")?i:o;n.Z=a},5429:function(e,n,r){r.r(n),r.d(n,{default:function(){return k}});var t=r(5861),i=r(9439),o=r(4687),a=r.n(o),s=r(7313),c=r(8467),l=r(1387),u=r(5116),d=r(8475),p=r(6417),f=function(e){var n=e.onStarted,r=(0,s.useState)(0),t=(0,i.Z)(r,2),o=t[0],a=t[1],c=(0,s.useState)(!1),l=(0,i.Z)(c,2),u=l[0],f=l[1],h=[{icon:"logo",title:"Bem-vindo \xe0 Iluminarte!",description:"Descubra o mundo encantado da Iluminarte!\nReserve oficinas, encontre novas atividades e viva momentos de arte, aprendizado e afeto para as crian\xe7as e fam\xedlias \u2014 tudo em poucos cliques.\n\u2728 Toque para conhecer e se apaixonar.",bg:"slide-welcome"}
1,{icon:"\ud83c\udfa8",title:"Explore Aulas",description:"Descubra uma variedade de aulas infantis: pintura, culin\xe1ria, dan\xe7a, nata\xe7\xe3o e muito mais!",bg:"slide-1"},{icon:"\u2764\ufe0f",title:"Instrutores Qualificados",description:"Conhe\xe7a educadores apaixonados por ensinar com arte, afeto e aprendizado.",bg:"slide-2"},{icon:"\u2b50",title:"Reserve com Facilidade",description:"Escolha a aula perfeita, veja hor\xe1rios dispon\xedveis e reserve em segundos!",bg:"slide-3"}],v=function(e){e===o||u||(f(!0),setTimeout((function(){a(e),setTimeout((function(){f(!1)}),50)}),300))},g=h[o];return(0,p.jsx)("div",{className:"carousel-container",children:(0,p.jsxs)("div",{className:"carousel-slide ".concat(g.bg," ").concat(u?"fade-out":""),children:[(0,p.jsx)("div",{className:"carousel-icon",children:"logo"===g.icon?(0,p.jsx)(d.D,{}):g.icon}),(0,p.jsx)("h1",{className:"carousel-title",children:g.title}),(0,p.jsx)("p",{className:"carousel-description",children:g.description}),(0,p.jsx)("div",{className:"carousel-buttons",children:o<h.length-1?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("button",{className:"carousel-button",onClick:function(){return n()},children:"Pular Introdu\xe7\xe3o"}),(0,p.jsx)("button",{className:"carousel-button carousel-button-primary",onClick:function(){o<h.length-1&&v(o+1)},children:"Pr\xf3ximo \u2192"})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("button",{className:"carousel-button",onClick:function(){o>0&&v(o-1)},children:"\u2190 Anterior"}),(0,p.jsx)("button",{className:"carousel-button carousel-button-primary",onClick:function(){return n()},children:"Come\xe7ar Agora"})]})}),(0,p.jsx)("div",{className:"carousel-dots",children:h.map((function(e,n){return(0,p.jsx)("div",{className:"carousel-dot ".concat(o===n?"active":""),onClick:function(){return function(e){v(e)}(n)}},n)}))})]})})},h=r(3137),v=r(6865),g=r(5284),m=r(7310),x=function(e){var n=e.isLoading,r=e.onNavigateToSignUp,o=e.onLogin,l=(0,c.s0)(),u=(0,s.useState)(""),d=(0,i.Z)(u,2),f=d[0],x=d[1],j=(0,s.useState)(""),k=(0,i.Z)(j,2),b=k[0],w=k[1],y=(0,s.useState)({email:"",password:""}),C=(0,i.Z)(y,2),T=C[0],N=C[1],S=(0,s.useState)(!1),Z=(0,i.Z)(S,2),L=Z[0],A=Z[1],D=function(){var e=(0,t.Z)(a().mark((function e(n){var r,t,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.preventDefault(),r={email:"",password:""},t=h.k.email(f),i=h.k.password(b),t&&(r.email=t),i&&(r.password=i),N(r),r.email||r.password||o({email:f,password:b});case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,p.jsx)("div",{className:"container",children:(0,p.jsxs)("div",{className:"content",style:{marginTop:20},children:[(0,p.jsx)("h1",{className:"title",children:"Bem vindo!"}),(0,p.jsx)(v.u,{}),(0,p.jsxs)("div",{style:{marginTop:24},children:[(0,p.jsx)(g.y,{label:"e-mail",type:"email",value:f,onChange:x,error:T.email,isRequired:!0}),(0,p.jsx)("div",{style:{marginTop:16},children:(0,p.jsx)(g.y,{label:"senha",type:"password",value:b,onChange:w,error:T.password,isRequired:!0,showToggle:!0,isPasswordVisible:L,onToggleVisibility:function(){return A(!L)}})}),(0,p.jsx)("div",{style:{textAlign:"right",marginTop:-10,marginBottom:32},children:(0,p.jsx)("button",{className:"link",onClick:function(){return l("/forgot-password")},children:"Esqueceu sua senha?"})}),(0,p.jsx)(m.o,{text:"Entrar",onClick:D,isLoading:n})]}),(0,p.jsx)("div",{style:{marginTop:24},children:(0,p.jsx)(v.u,{})}),(0,p.jsxs)("div",{style:{marginTop:16,textAlign:"center"},children:[(0,p.jsx)("span",{style:{color:"#666",fontSize:14},children:"Sem conta? "}),(0,p.jsx)("button",{className:"link-highlight",onClick:r,children:"Cadastre-se agora"})]}),(0,p.jsxs)("div",{style:{marginTop:12,textAlign:"center"},children:[(0,p.jsxs)("span",{style:{color:"#666",fontSize:14},children:["Quer ser professor?"," "]}),(0,p.jsx)("button",{className:"link-highlight",onClick:function(){return l("/register-teacher")},children:"Quero ser professor"})]}),(0,p.jsxs)("div",{style:{marginTop:8,textAlign:"center"},children:[(0,p.jsxs)("span",{style:{color:"#666",fontSize:14},children:["Quer ser monitor?"," "]}),(0,p.jsx)("button",{className:"link-highlight",onClick:function(){return l("/register-monitor")},children:"Quero ser monitor"})]}),(0,p.jsx)("div",{style:{marginTop:12,textAlign:"center"},children:(0,p.jsx)("a",{href:"/privacy-policy.html",target:"_blank",rel:"noopener noreferrer",className:"link",children:"Pol\xedtica de Privacidade"})})]})})},j=r(5487),k=function(){var e=(0,c.s0)(),n=s.useMemo((function(){return Boolean(sessionStorage.getItem("skipCarousel"))}),[]),r=s.useState(!n),o=(0,i.Z)(r,2),d=o[0],h=o[1],v=s.useState(!1),g=(0,i.Z)(v,2),m=g[0],k=g[1],b=(0,u.Z)(),w=b.authenticate,y=b.signin,C=b.canAccessAdminPanel,T=b.isMonitor;s.useEffect((function(){if(null!==w&&void 0!==w&&w.isAuthenticate){if(!C&&T)return void e("/dash/monitor-agenda");e("/dash")}}),[w,e,C,T]);var N=function(){var e=(0,t.Z)(a().mark((function e(n){var r,t,i,o,s;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,k(!0),e.next=4,(0,j.zB)(n);case 4:if(i=e.sent,o=["admin","coordenador"].includes(null===i||void 0===i||null===(r=i.profile)||void 0===r?void 0:r.user_type),s=!0===(null===i||void 0===i||null===(t=i.profile)||void 0===t?void 0:t.is_monitor),o||s){e.
1next=11;break}return(0,l.Am)("Acesso restrito a administradores, coordenadores e monitoras. Use o aplicativo Iluminarte para acessar sua conta.",{type:"error"}),e.abrupt("return");case 11:y(i.accessToken,i.profile),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(0),"E-mail ou senha invalidos!",(0,l.Am)("E-mail ou senha invalidos!",{type:"error"});case 18:return e.prev=18,k(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[0,14,18,21]])})));return function(n){return e.apply(this,arguments)}}();return d?(0,p.jsx)(f,{onStarted:function(){h(!1),sessionStorage.setItem("skipCarousel","true")}}):(0,p.jsx)(x,{onLogin:N,onNavigateToSignUp:function(){e("/register")},isLoading:m})}},1718:function(e,n,r){var t=r(1881),i=r.n(t),o=r(9884),a=r(5968),s=r(2933),c=i().create({baseURL:a.Z.urlServer,timeout:72e4,headers:{"Content-Type":"application/json"}});c.interceptors.request.use((function(e){var n=(0,o.$l)(s.Z).token;return n&&(e.headers.Authorization="Bearer ".concat(n)),e.data instanceof FormData&&delete e.headers["Content-Type"],e}),(function(e){return Promise.reject(e)})),c.interceptors.response.use((function(e){return e}),(function(e){var n;return 401===(null===(n=e.response)||void 0===n?void 0:n.status)&&((0,o.z8)(s.Z,{isAuthenticate:!1,token:"",user:null}),["#/"].includes(window.location.hash)||(window.location.hash="/")),Promise.reject(e)})),n.Z=c},6204:function(e,n,r){var t=r(1881),i=r.n(t),o=r(5968),a=i().create({baseURL:o.Z.urlServer,timeout:72e4,headers:{"Content-Type":"application/json"}});n.Z=a},8065:function(e,n,r){r.d(n,{s:function(){return t}});var t=function(e){if(11!==(e=e.replace(/[^\d]/g,"")).length)return!1;if(/^(\d)\1{10}$/.test(e))return!1;for(var n=0,r=0;r<9;r++)n+=parseInt(e.charAt(r),10)*(10-r);var t=n%11,i=t<2?0:11-t;if(parseInt(e.charAt(9),10)!==i)return!1;n=0;for(var o=0;o<10;o++)n+=parseInt(e.charAt(o),10)*(11-o);var a=(t=n%11)<2?0:11-t;return parseInt(e.charAt(10),10)===a}},8259:function(e,n,r){r.d(n,{DC:function(){return t},Uo:function(){return i}});var t=function(e){return(e=(e=(e=(e=e.replace(/\D/g,"")).replace(/(\d{3})(\d)/,"$1.$2")).replace(/(\d{3})(\d)/,"$1.$2")).replace(/(\d{3})(\d{1,2})$/,"$1-$2")).substring(0,14)},i=function(e){return e?e.toString().replace(/\D/g,""):""}},8207:function(e,n,r){r.d(n,{T:function(){return i},y:function(){return t}});var t=function(e){return e?(e=(e=(e=e.replace(/\D/g,"")).replace(/(\d{2})(\d)/,"($1) $2")).replace(/(\d)(\d{4})$/,"$1-$2")).substring(0,16):""},i=function(e){var n=e.replace(/\D/g,"").slice(0,11);return n.length<=2?n:n.length<=6?"(".concat(n.slice(0,2),") ").concat(n.slice(2)):n.length<=10?"(".concat(n.slice(0,2),") ").concat(n.slice(2,6),"-").concat(n.slice(6,10)):"(".concat(n.slice(0,2),") ").concat(n.slice(2,7),"-").concat(n.slice(7,11))}},3137:function(e,n,r){r.d(n,{k:function(){return i}});var t=r(8065),i={email:function(e){return e?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?null:"E-mail inv\xe1lido":"E-mail \xe9 obrigat\xf3rio"},password:function(e){return e?e.length<8?"Senha deve ter no m\xednimo 8 caracteres":null:"Senha \xe9 obrigat\xf3ria"},required:function(e,n){return e&&""!==e.trim()?null:"".concat(n," \xe9 obrigat\xf3rio")},cpf:function(e){if(!e)return"CPF \xe9 obrigat\xf3rio";var n=e.replace(/[^\d]/g,"");return 11!==n.length?"CPF deve ter 11 d\xedgitos":(0,t.s)(n)?null:"CPF inv\xe1lido"},phone:function(e){if(!e)return"Telefone \xe9 obrigat\xf3rio";var n=e.replace(/[^\d]/g,"");return 10!==n.length&&11!==n.length?"Telefone inv\xe1lido":null},birthDate:function(e){return e?/^\d{2}\/\d{2}\/\d{4}$/.test(e)?null:"Formato inv\xe1lido (DD/MM/AAAA)":"Data de nascimento \xe9 obrigat\xf3ria"},cep:function(e){return e?8!==e.replace(/[^\d]/g,"").length?"CEP deve ter 8 d\xedgitos":null:"CEP \xe9 obrigat\xf3rio"},number:function(e){return e?/^\d+$/.test(e.replace(/\D/g,""))?null:"Apenas n\xfameros s\xe3o permitidos":"N\xfamero \xe9 obrigat\xf3rio"}}}}]);
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.