{"version":3,"sources":["webpack:///./src/app/login/login-routing.module.ts","webpack:///./src/app/login/login.component.html","webpack:///./src/app/login/login.component.scss","webpack:///./src/app/login/login.component.ts","webpack:///./src/app/login/login.module.ts","webpack:///./src/app/models/site.ts","webpack:///./src/app/services/site/site.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAyC;AACc;AAEJ;AAEnD,IAAM,MAAM,GAAW;IACrB;QACE,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,+DAAc;KAC1B;CACF,CAAC;AAMF;IAAA;IAAiC,CAAC;IAArB,kBAAkB;QAJ9B,8DAAQ,CAAC;YACR,OAAO,EAAE,CAAC,4DAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACxC,OAAO,EAAE,CAAC,4DAAY,CAAC;SACxB,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAA;AAAH;;;;;;;;;;;;AChB/B,65C;;;;;;;;;;;ACAA,+BAA+B,kBAAkB,uBAAuB,WAAW,YAAY,aAAa,GAAG,eAAe,6BAA6B,8BAA8B,GAAG,UAAU,yCAAyC,0CAA0C,GAAG,mCAAmC,iDAAiD,GAAG,kCAAkC,iDAAiD,GAAG,6CAA6C,+tD;;;;;;;;;;;;;;;;;;;;;;;;;;;ACA9b;AACC;AACW;AACnB;AACW;AACjB;AACS;AACO;AACnB;AAEyB;AACtB;AAO3C;IAQE,wBACU,MAAc,EACf,WAAwB,EACvB,WAAwB,EACxB,MAAqB,EACrB,KAAqB,EACrB,WAAwB;QALxB,WAAM,GAAN,MAAM,CAAQ;QACf,gBAAW,GAAX,WAAW,CAAa;QACvB,gBAAW,GAAX,WAAW,CAAa;QACxB,WAAM,GAAN,MAAM,CAAe;QACrB,UAAK,GAAL,KAAK,CAAgB;QACrB,gBAAW,GAAX,WAAW,CAAa;QATlC,UAAK,GAAG,IAAI,mDAAK,EAAE,CAAC;QACpB,WAAM,GAAG,IAAI,yDAAI,EAAE,CAAC;IAShB,CAAC;IAIL,i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,IAAI,CAAC,eAAe,EAAE,WAAQ,CAAC,CAAC;IACtG,CAAC;IAED,qCAAe,GAAf;QACE,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;QAC7D,OAAO,KAAK,CAAC,EAAE,CAAC;IAClB,CAAC;IAED,+BAAS,GAAT,UAAU,EAAU;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAW,wEAAW,CAAC,UAAU,eAAU,EAAE,YAAS,CAAC,CAAC;IAC9E,CAAC;IApBU,WAAW;QAHvB,gEAAU,CAAC;YACV,UAAU,EAAE,MAAM;SACnB,CAAC;+EAI0B,+DAAU;OAHzB,WAAW,CAqBvB;IAAD,kBAAC;CAAA;AArBuB","file":"login-login-module.js","sourcesContent":["import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nimport { LoginComponent } from './login.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: LoginComponent,\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule],\r\n})\r\nexport class LoginRoutingModule {}\r\n","module.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n Esqueceu sua senha?\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\"","module.exports = \".login-page {\\n content: \\\"\\\";\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n}\\n\\n#svgColor {\\n fill: rgb(240, 240, 240);\\n transition: fill 0.1 ease;\\n}\\n\\n.btn {\\n background-color: rgb(240, 240, 240);\\n transition: background-color 0.1 ease;\\n}\\n\\n.card-body .btn-danger:active {\\n border-color: rgba(0, 0, 0, 0.05) !important;\\n}\\n\\n.card-body .btn-danger:focus {\\n box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.05);\\n}\\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvbG9naW4vRDpcXGFcXDFcXHMvc3JjXFxhcHBcXGxvZ2luXFxsb2dpbi5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvbG9naW4vbG9naW4uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxZQUFBO0VBQ0EsbUJBQUE7RUFDQSxPQUFBO0VBQ0EsUUFBQTtFQUNBLFNBQUE7Q0NDRDs7QURFRDtFQUNFLHlCQUFBO0VBQ0EsMEJBQUE7Q0NDRDs7QURFRDtFQUNFLHFDQUFBO0VBQ0Esc0NBQUE7Q0NDRDs7QURHQztFQUNFLDZDQUFBO0NDQUg7O0FERUM7RUFDRSw2Q0FBQTtDQ0FIIiwiZmlsZSI6InNyYy9hcHAvbG9naW4vbG9naW4uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubG9naW4tcGFnZSB7XHJcbiAgY29udGVudDogJyc7XHJcbiAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gIHRvcDogMDtcclxuICBsZWZ0OiAwO1xyXG4gIHJpZ2h0OiAwO1xyXG59XHJcblxyXG4jc3ZnQ29sb3Ige1xyXG4gIGZpbGw6IHJnYigyNDAsIDI0MCwgMjQwKTtcclxuICB0cmFuc2l0aW9uOiBmaWxsIC4xIGVhc2U7XHJcbn1cclxuXHJcbi5idG4ge1xyXG4gIGJhY2tncm91bmQtY29sb3I6IHJnYigyNDAsIDI0MCwgMjQwKTtcclxuICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIC4xIGVhc2U7XHJcbn1cclxuXHJcbi5jYXJkLWJvZHkgLmJ0bi1kYW5nZXIge1xyXG4gICY6YWN0aXZlIHtcclxuICAgIGJvcmRlci1jb2xvcjogcmdiKDAwIDAwIDAwIC8gNSUpICFpbXBvcnRhbnQ7XHJcbiAgfVxyXG4gICY6Zm9jdXMge1xyXG4gICAgYm94LXNoYWRvdzogMCAwIDAgMC4ycmVtIHJnYigwMCAwMCAwMCAvIDUlKTtcclxuICB9XHJcbn0iLCIubG9naW4tcGFnZSB7XG4gIGNvbnRlbnQ6IFwiXCI7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgdG9wOiAwO1xuICBsZWZ0OiAwO1xuICByaWdodDogMDtcbn1cblxuI3N2Z0NvbG9yIHtcbiAgZmlsbDogcmdiKDI0MCwgMjQwLCAyNDApO1xuICB0cmFuc2l0aW9uOiBmaWxsIDAuMSBlYXNlO1xufVxuXG4uYnRuIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiKDI0MCwgMjQwLCAyNDApO1xuICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuMSBlYXNlO1xufVxuXG4uY2FyZC1ib2R5IC5idG4tZGFuZ2VyOmFjdGl2ZSB7XG4gIGJvcmRlci1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjA1KSAhaW1wb3J0YW50O1xufVxuLmNhcmQtYm9keSAuYnRuLWRhbmdlcjpmb2N1cyB7XG4gIGJveC1zaGFkb3c6IDAgMCAwIDAuMnJlbSByZ2JhKDAsIDAsIDAsIDAuMDUpO1xufSJdfQ== */\"","import { Component, OnInit, Type } from '@angular/core';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { BlockUI, NgBlockUI } from 'ng-block-ui';\r\nimport { AuthService } from '../services/auth/auth.service';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { MessageUtil } from '../utils/message.util';\r\nimport { environment } from 'src/environments/environment';\r\nimport { Login } from '../models/login';\r\nimport { LoginResponse } from '../models/login-response';\r\nimport { SiteService } from 'src/app/services/site/site.service';\r\nimport { Site } from 'src/app/models/site';\r\n\r\n@Component({\r\n selector: 'app-login',\r\n templateUrl: './login.component.html',\r\n styleUrls: ['./login.component.scss'],\r\n})\r\nexport class LoginComponent implements OnInit {\r\n @BlockUI() blockUI: NgBlockUI;\r\n formGroup: FormGroup;\r\n baseCss: string;\r\n curso: string;\r\n login = new Login();\r\n layout = new Site();\r\n\r\n constructor(\r\n private router: Router,\r\n public formBuilder: FormBuilder,\r\n private authService: AuthService,\r\n private toastr: ToastrService,\r\n private route: ActivatedRoute,\r\n private siteService: SiteService\r\n ) { }\r\n\r\n\r\n\r\n ngOnInit() {\r\n this.route.queryParams.subscribe((params) => {\r\n this.curso = params.source || environment.medAulaId;\r\n });\r\n this.trocaLayout();\r\n\r\n\r\n this.formGroup = this.formBuilder.group({\r\n email: ['', [Validators.required]],\r\n senha: ['', [Validators.required]],\r\n });\r\n }\r\n\r\n async trocaLayout() {\r\n this.blockUI.start(MessageUtil.AGUARDE);\r\n var corPrincipal = \"\";\r\n const botao = document.getElementById('submit');\r\n const svgColor = document.getElementById('svgColor');\r\n if(environment.medAulaId === null){\r\n corPrincipal = \"#f14a43\";\r\n botao.style.backgroundColor = corPrincipal;\r\n svgColor.style.fill = corPrincipal;\r\n }else{\r\n await this.siteService.getSiteLayout(environment.medAulaId).subscribe(\r\n (layout) => { \r\n this.layout = layout;\r\n corPrincipal = this.layout.corPrincipal;\r\n botao.style.backgroundColor = corPrincipal;\r\n svgColor.style.fill = corPrincipal;\r\n },\r\n () => this.blockUI.stop()\r\n );\r\n }\r\n this.blockUI.stop();\r\n }\r\n\r\n onLogin() {\r\n if (this.formGroup.invalid) {\r\n this.toastr.error(MessageUtil.PREENCHA_CAMPOS_OBRIGATORIOS);\r\n return;\r\n }\r\n\r\n this.blockUI.start(MessageUtil.AGUARDE);\r\n this.authService.login(this.login).subscribe(\r\n (loginResponse) => this.afterLogin(loginResponse),\r\n (err) => this.onLoginError(err)\r\n );\r\n }\r\n\r\n afterLogin(loginResponse: LoginResponse) {\r\n this.blockUI.stop();\r\n this.setLocalStorage(loginResponse);\r\n\r\n const trial = 0;\r\n const singlePlan = 1;\r\n const manyPlans = 'manyPlans';\r\n\r\n const loginOptions = new Map()\r\n .set(trial, () => this.navegarPaginaTrial())\r\n .set(singlePlan, () => this.navegarPaginaAulas(loginResponse))\r\n .set(manyPlans, () => this.navegarPaginaSelecaoPlanos());\r\n\r\n const selectedOption = loginOptions.get(loginResponse.planos.length) || loginOptions.get(manyPlans);\r\n selectedOption();\r\n }\r\n\r\n private onLoginError(err: any) {\r\n this.blockUI.stop();\r\n this.toastr.error((err.error && err.error.message) || 'Usuário ou senha inválidos!');\r\n }\r\n\r\n navegarPaginaTrial() {\r\n localStorage.setItem('cursoTrial', JSON.stringify({ id: this.curso }));\r\n this.router.navigate(['/plataforma-trial']);\r\n }\r\n\r\n navegarPaginaAulas(loginResponse) {\r\n localStorage.setItem('planoSelecionado', JSON.stringify(loginResponse.planos[0]));\r\n this.router.navigate(['/aulas']);\r\n }\r\n\r\n navegarPaginaSelecaoPlanos() {\r\n this.router.navigate(['/selecao-planos']);\r\n }\r\n\r\n setLocalStorage(result: any) {\r\n localStorage.setItem('isLoggedin', 'true');\r\n localStorage.setItem('token', result.token);\r\n localStorage.setItem('refreshToken', result.refreshToken);\r\n localStorage.setItem('planos', JSON.stringify(result.planos));\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\n\r\nimport { LoginRoutingModule } from './login-routing.module';\r\nimport { LoginComponent } from './login.component';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { InlineSVGModule } from 'ng-inline-svg';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n LoginRoutingModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule.withConfig({ addFlexToParent: false }),\r\n InlineSVGModule,\r\n ],\r\n declarations: [LoginComponent],\r\n})\r\nexport class LoginModule {}\r\n","export class Site {\r\n nome: string;\r\n situacao: string;\r\n corPrincipal: string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { CursoTrial } from 'src/app/models/curso-trial';\r\nimport { Site } from 'src/app/models/site';\r\nimport { environment } from 'src/environments/environment';\r\nimport { BehaviorSubject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class SiteService {\r\n public cursoTrialTopNavSubject = new BehaviorSubject(null);\r\n\r\n constructor(private http: HttpClient) {}\r\n\r\n getSiteLayout(id: string) {\r\n return this.http.get(`${environment.baseUrl}/sites/${id}`);\r\n }\r\n\r\n getCursoTrial() {\r\n return this.http.get(`${environment.baseApiUrl}/sites/${this.getCursoTrialId()}/trial`);\r\n }\r\n\r\n getCursoTrialId() {\r\n const curso = JSON.parse(localStorage.getItem('cursoTrial'));\r\n return curso.id;\r\n }\r\n\r\n getCursos(id: number) {\r\n return this.http.get(`${environment.baseApiUrl}/sites/${id}/cursos`);\r\n }\r\n}\r\n"],"sourceRoot":""}