(self["webpackChunkingenium"] = self["webpackChunkingenium"] || []).push([["src_app_ingresa-contrasena_ingresa-contrasena_module_ts"],{

/***/ 4268:
/*!*************************************************************************!*\
  !*** ./src/app/ingresa-contrasena/ingresa-contrasena-routing.module.ts ***!
  \*************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IngresaContrasenaPageRoutingModule": () => (/* binding */ IngresaContrasenaPageRoutingModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ 4762);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7716);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 9895);
/* harmony import */ var _ingresa_contrasena_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ingresa-contrasena.page */ 6194);




const routes = [
    {
        path: '',
        component: _ingresa_contrasena_page__WEBPACK_IMPORTED_MODULE_0__.IngresaContrasenaPage
    }
];
let IngresaContrasenaPageRoutingModule = class IngresaContrasenaPageRoutingModule {
};
IngresaContrasenaPageRoutingModule = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.NgModule)({
        imports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__.RouterModule.forChild(routes)],
        exports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__.RouterModule],
    })
], IngresaContrasenaPageRoutingModule);



/***/ }),

/***/ 2014:
/*!*****************************************************************!*\
  !*** ./src/app/ingresa-contrasena/ingresa-contrasena.module.ts ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IngresaContrasenaPageModule": () => (/* binding */ IngresaContrasenaPageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ 4762);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 7716);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/common */ 8583);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 3679);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic/angular */ 476);
/* harmony import */ var _ingresa_contrasena_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ingresa-contrasena-routing.module */ 4268);
/* harmony import */ var _ingresa_contrasena_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ingresa-contrasena.page */ 6194);
/* harmony import */ var _camera_video_camera_video_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../camera-video/camera-video.module */ 4467);
/* harmony import */ var _modal_figuras_modal_figuras_module__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../modal-figuras/modal-figuras.module */ 5436);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ngx-translate/core */ 9790);










let IngresaContrasenaPageModule = class IngresaContrasenaPageModule {
};
IngresaContrasenaPageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_5__.NgModule)({
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_6__.CommonModule,
            _angular_forms__WEBPACK_IMPORTED_MODULE_7__.FormsModule,
            _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonicModule,
            _ingresa_contrasena_routing_module__WEBPACK_IMPORTED_MODULE_0__.IngresaContrasenaPageRoutingModule,
            _camera_video_camera_video_module__WEBPACK_IMPORTED_MODULE_2__.CameraVideoModule,
            _modal_figuras_modal_figuras_module__WEBPACK_IMPORTED_MODULE_3__.ModalFigurasModule,
            _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__.TranslateModule
        ],
        declarations: [_ingresa_contrasena_page__WEBPACK_IMPORTED_MODULE_1__.IngresaContrasenaPage]
    })
], IngresaContrasenaPageModule);



/***/ }),

/***/ 6194:
/*!***************************************************************!*\
  !*** ./src/app/ingresa-contrasena/ingresa-contrasena.page.ts ***!
  \***************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "IngresaContrasenaPage": () => (/* binding */ IngresaContrasenaPage)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ 4762);
/* harmony import */ var _raw_loader_ingresa_contrasena_page_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !raw-loader!./ingresa-contrasena.page.html */ 3286);
/* harmony import */ var _ingresa_contrasena_page_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ingresa-contrasena.page.scss */ 4210);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 7716);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ 9895);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @ionic/angular */ 476);
/* harmony import */ var _services_games_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/games.service */ 1675);







let IngresaContrasenaPage = class IngresaContrasenaPage {
    constructor(router, gamesService, toastController) {
        this.router = router;
        this.gamesService = gamesService;
        this.toastController = toastController;
        this.level = 1;
        this.setResults = false;
        this.counter = 0;
    }
    ngOnInit() {
        this.timestamp_init = Date.now();
        this.memorize_id = localStorage.getItem('memorize_id');
        this.valueCorrect = localStorage.getItem('password_game');
        const user = JSON.parse(localStorage.getItem('user'));
        this.level = user.level;
        this.game_header_id = localStorage.getItem('game_header_id');
        this.counting();
    }
    ngAfterViewInit() {
        setTimeout(() => {
            this.sInput.setFocus();
        }, 800);
    }
    presentToast(message) {
        return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {
            const toast = yield this.toastController.create({
                message,
                duration: 2000,
                position: 'middle',
                color: 'tertiary'
            });
            toast.present();
        });
    }
    presentToast2(message) {
        return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__awaiter)(this, void 0, void 0, function* () {
            const toast = yield this.toastController.create({
                message,
                duration: 2000,
                position: 'bottom',
                color: 'danger'
            });
            toast.present();
        });
    }
    counting() {
        var counterGame = setInterval(() => {
            let last_time = Date.now();
            let difference = last_time - this.timestamp_init;
            this.counter = this.counter + 1;
            if (this.counter >= 15) {
                clearInterval(counterGame);
                this.gamesService.memoricePasswordDetails(this.game_header_id, this.memorize_id, this.valueCorrect, this.result, difference).subscribe((res) => {
                    this.presentToast('Has finalizado el ejercicio de memoriza contraseña');
                    setTimeout(() => {
                        this.router.navigate(['/exit']);
                    }, 3000);
                }, (err) => {
                    if (err.status == 401) {
                        this.router.navigate(['/']);
                        localStorage.clear();
                    }
                });
            }
            if (this.setResults) {
                clearInterval(counterGame);
            }
        }, 1000);
    }
    onSubmit() {
        localStorage.setItem('view_set_finish', '1');
        const result = this.result;
        if (!this.setResults) {
            let last_time = Date.now();
            let difference = last_time - this.timestamp_init;
            this.gamesService.memoricePasswordDetails(this.game_header_id, this.memorize_id, this.valueCorrect, result, difference).subscribe((res) => {
                this.setResults = true;
                this.router.navigate(['/exit']);
            }, (err) => {
                this.presentToast2('Error en la conexión al servidor');
                if (err.status == 401) {
                    this.router.navigate(['/']);
                    localStorage.clear();
                }
            });
        }
    }
};
IngresaContrasenaPage.ctorParameters = () => [
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__.Router },
    { type: _services_games_service__WEBPACK_IMPORTED_MODULE_2__.GamesService },
    { type: _ionic_angular__WEBPACK_IMPORTED_MODULE_5__.ToastController }
];
IngresaContrasenaPage.propDecorators = {
    sInput: [{ type: _angular_core__WEBPACK_IMPORTED_MODULE_6__.ViewChild, args: ['inputContrasena', { static: false },] }]
};
IngresaContrasenaPage = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Component)({
        selector: 'app-ingresa-contrasena',
        template: _raw_loader_ingresa_contrasena_page_html__WEBPACK_IMPORTED_MODULE_0__.default,
        styles: [_ingresa_contrasena_page_scss__WEBPACK_IMPORTED_MODULE_1__.default]
    })
], IngresaContrasenaPage);



/***/ }),

/***/ 4210:
/*!*****************************************************************!*\
  !*** ./src/app/ingresa-contrasena/ingresa-contrasena.page.scss ***!
  \*****************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("ion-title.title-logo {\n  font-size: 35px;\n  padding-left: 0;\n  cursor: pointer;\n  color: #fff;\n}\n\nion-col.col-header-btn-close {\n  text-align: right;\n}\n\n.ion-page {\n  background-color: #1D1F33;\n}\n\nion-header ion-grid {\n  padding: 15px 30px;\n}\n\n.title-content-contrasena {\n  color: #fff;\n  text-align: center;\n  margin-bottom: 35px;\n  margin-top: 0;\n  font-size: 24px;\n}\n\n.input-custom {\n  width: 400px;\n  margin: auto;\n}\n\n.input-custom ion-input {\n  background: #D5D5D8;\n  border: 1px solid #494979;\n  border-radius: 6px;\n  --padding-top: 10px;\n  --padding-end: 20px;\n  --padding-bottom: 11px;\n  --padding-start: 20px;\n  --background: #D5D5D8;\n  --color:#1D1F35;\n  font-weight: bold;\n  font-size: 45px;\n  text-align: center;\n}\n\n.box-content-contrasena {\n  position: relative;\n  top: 50%;\n  transform: translateY(-50%);\n  margin-top: -100px;\n}\n\n.btn-design2 {\n  --background: #6FCF97;\n  --border-width: 1px;\n  --border-style: solid;\n  --border-radius: 6px;\n  --border-color: #494979;\n  --padding-bottom: 27px;\n  --padding-end: 40px;\n  --padding-start: 40px;\n  --padding-top: 27px;\n  --color: #fff;\n  height: auto;\n  width: 100%;\n  margin: 0 auto;\n  font-size: 15px;\n  margin-top: 10px;\n  width: 400px;\n  max-width: 100%;\n  display: block;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZ3Jlc2EtY29udHJhc2VuYS5wYWdlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDSSxlQUFBO0VBQ0EsZUFBQTtFQUNBLGVBQUE7RUFDQSxXQUFBO0FBQ0o7O0FBRUE7RUFDSSxpQkFBQTtBQUNKOztBQUVBO0VBQ0kseUJBQUE7QUFDSjs7QUFFQTtFQUNJLGtCQUFBO0FBQ0o7O0FBRUE7RUFDSSxXQUFBO0VBQ0Esa0JBQUE7RUFDQSxtQkFBQTtFQUNBLGFBQUE7RUFDQSxlQUFBO0FBQ0o7O0FBRUE7RUFDSSxZQUFBO0VBQ0EsWUFBQTtBQUNKOztBQUVBO0VBQ0ksbUJBQUE7RUFDQSx5QkFBQTtFQUNBLGtCQUFBO0VBQ0EsbUJBQUE7RUFDQSxtQkFBQTtFQUNBLHNCQUFBO0VBQ0EscUJBQUE7RUFDQSxxQkFBQTtFQUNBLGVBQUE7RUFDQSxpQkFBQTtFQUNBLGVBQUE7RUFDQSxrQkFBQTtBQUNKOztBQUVBO0VBQ0ksa0JBQUE7RUFDQSxRQ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IDEwcHg7XG4gICAgd2lkdGg6IDQwMHB4O1xuICAgIG1heC13aWR0aDogMTAwJTtcbiAgICBkaXNwbGF5OiBibG9jaztcbn0iXX0= */");

/***/ }),

/***/ 3286:
/*!*******************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/ingresa-contrasena/ingresa-contrasena.page.html ***!
  \*******************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("<ion-header [translucent]=\"true\" class=\"ion-no-border\">\n  <ion-grid>\n    <ion-row>\n      <ion-col size=\"4\">\n        <ion-title class=\"title-logo\">\n          <a [routerLink]=\"['/']\" tabindex=\"0\">\n            <img src=\"assets/img/logo.png\" [attr.alt]=\"'PASSWORD.ARIA_LABELS.LOGO' | translate\">\n          </a>\n        </ion-title>\n      </ion-col>\n      <ion-col size=\"8\" class=\"col-header-btn-close\">\n        <app-camera-video></app-camera-video>\n      </ion-col>\n    </ion-row>\n  </ion-grid>\n</ion-header>\n\n<ion-content [fullscreen]=\"true\" role=\"main\">\n  <div class=\"box-content-contrasena\" role=\"region\" [attr.aria-label]=\"'PASSWORD.ARIA_LABELS.SECTION' | translate\">\n    <h1 class=\"title-content-contrasena\">{{ 'PASSWORD.TITLE' | translate }}</h1>\n    <form (ngSubmit)=\"onSubmit()\">\n      <div class=\"input-custom\">\n        <ion-input \n          [placeholder]=\"'PASSWORD.PLACEHOLDER' | translate\"\n          [(ngModel)]=\"result\" \n          type=\"text\" \n          #inputContrasena \n          name=\"results\" \n          (ngModelChange)=\"result = $event.toUpperCase()\" \n          autofocus=\"true\"\n          [attr.aria-label]=\"'PASSWORD.ARIA_LABELS.PASSWORD_INPUT' | translate\">\n        </ion-input>\n      </div>\n      <ion-button \n        class=\"btn-design2\" \n        type=\"submit\"\n        [attr.aria-label]=\"'PASSWORD.ARIA_LABELS.SUBMIT_BUTTON' | translate\">\n        {{ 'PASSWORD.SUBMIT' | translate }}\n      </ion-button>\n    </form>\n  </div>\n</ion-content>\n");

/***/ })

}]);
//# sourceMappingURL=src_app_ingresa-contrasena_ingresa-contrasena_module_ts.js.map