(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["src_app_pages_tabs_more_settings_settings_module_ts"],{

/***/ 95834:
/*!*********************************************************************!*\
  !*** ./src/app/pages/tabs/more/settings/settings-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 */   SettingsPageRoutingModule: () => (/* binding */ SettingsPageRoutingModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var _settings_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings.page */ 83564);
/*
 * Copyright (c) 2022. Группа компаний "СТЕК". Все права защищены. Разработчик: Чуриков Антон Алексеевич
 */




const routes = [{
  path: '',
  component: _settings_page__WEBPACK_IMPORTED_MODULE_0__.SettingsPage
}, {
  path: 'email-mailing-modal',
  loadChildren: () => Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./email-mailing-modal/email-mailing-modal.module */ 37447)).then(m => m.EmailMailingModalPageModule)
}];
let SettingsPageRoutingModule = class SettingsPageRoutingModule {};
SettingsPageRoutingModule = (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]
})], SettingsPageRoutingModule);


/***/ }),

/***/ 26147:
/*!*************************************************************!*\
  !*** ./src/app/pages/tabs/more/settings/settings.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 */   SettingsPageModule: () => (/* binding */ SettingsPageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/common */ 60316);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _settings_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings-routing.module */ 95834);
/* harmony import */ var _settings_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings.page */ 83564);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ngx-translate/core */ 597);
/* harmony import */ var _email_mailing_modal_email_mailing_modal_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./email-mailing-modal/email-mailing-modal.module */ 37447);
/* harmony import */ var _components_card_block_card_block_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../components/card-block/card-block.component */ 65075);
/* harmony import */ var _components_menu_item_menu_item_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../components/menu-item/menu-item.component */ 23853);
/* harmony import */ var _pipes_active_ls_active_ls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../pipes/active-ls/active-ls */ 61863);
/*
 * Copyright (c) 2022. Группа компаний "СТЕК". Все права защищены. Разработчик: Чуриков Антон Алексеевич
 */












let SettingsPageModule = class SettingsPageModule {};
SettingsPageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_7__.NgModule)({
  imports: [_angular_common__WEBPACK_IMPORTED_MODULE_8__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_9__.FormsModule, _ionic_angular__WEBPACK_IMPORTED_MODULE_10__.IonicModule, _settings_routing_module__WEBPACK_IMPORTED_MODULE_0__.SettingsPageRoutingModule, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_11__.TranslateModule, _email_mailing_modal_email_mailing_modal_module__WEBPACK_IMPORTED_MODULE_2__.EmailMailingModalPageModule, _components_card_block_card_block_component__WEBPACK_IMPORTED_MODULE_3__.CardBlockComponent, _components_menu_item_menu_item_component__WEBPACK_IMPORTED_MODULE_4__.MenuItemComponent, _pipes_active_ls_active_ls__WEBPACK_IMPORTED_MODULE_5__.ActiveLsPipe],
  declarations: [_settings_page__WEBPACK_IMPORTED_MODULE_1__.SettingsPage],
  providers: [_email_mailing_modal_email_mailing_modal_module__WEBPACK_IMPORTED_MODULE_2__.EmailMailingModalPageModule]
})], SettingsPageModule);


/***/ }),

/***/ 83564:
/*!***********************************************************!*\
  !*** ./src/app/pages/tabs/more/settings/settings.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 */   SettingsPage: () => (/* binding */ SettingsPage)
/* harmony export */ });
/* harmony import */ var D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 89204);
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _settings_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings.page.html?ngResource */ 44124);
/* harmony import */ var _settings_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings.page.scss?ngResource */ 31444);
/* harmony import */ var _settings_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_settings_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _services_request_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../services/request.service */ 80931);
/* harmony import */ var _services_helper_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../services/helper.service */ 54102);
/* harmony import */ var _services_modal_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../services/modal.service */ 5455);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! rxjs */ 75797);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! rxjs */ 5342);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! rxjs */ 56196);
/* harmony import */ var _change_data_modal_change_data_modal_page__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../change-data-modal/change-data-modal.page */ 50553);
/* harmony import */ var _services_app_theme_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../services/app-theme.service */ 43017);
/* harmony import */ var _code_verification_code_verification_page__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../code-verification/code-verification.page */ 79769);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _info_info_page__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../info/info.page */ 40871);
/* harmony import */ var ts_md5__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ts-md5 */ 96466);
/* harmony import */ var _awesome_cordova_plugins_device_ngx__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @awesome-cordova-plugins/device/ngx */ 90735);
/* harmony import */ var _services_authentication_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../services/authentication.service */ 9214);
/* harmony import */ var _pin_code_pin_code_page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../pin-code/pin-code.page */ 47033);
/* harmony import */ var _services_in_app_auth_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../services/in-app-auth.service */ 70604);
/* harmony import */ var _awesome_cordova_plugins_open_native_settings_ngx__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @awesome-cordova-plugins/open-native-settings/ngx */ 76319);
/* harmony import */ var _add_code_modal_add_code_modal_page__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../add-code-modal/add-code-modal.page */ 10297);
/* harmony import */ var _capacitor_preferences__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @capacitor/preferences */ 46493);
/* harmony import */ var _environments_storage__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../../environments/storage */ 12960);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @ngx-translate/core */ 597);
/* harmony import */ var _environments_settings__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../../../environments/settings */ 79308);
/* harmony import */ var _services_token_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../services/token.service */ 2091);
/* harmony import */ var _awesome_cordova_plugins_file_ngx__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @awesome-cordova-plugins/file/ngx */ 66411);
/* harmony import */ var _services_push_service__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../../services/push.service */ 62802);
/* harmony import */ var _services_cache_service__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../../../services/cache.service */ 8020);
/* harmony import */ var _services_debug_service__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../../../services/debug.service */ 33925);

/*
 * Copyright (c) 2022. Группа компаний "СТЕК". Все права защищены. Разработчик: Чуриков Антон Алексеевич
 */





























let SettingsPage = class SettingsPage {
  constructor(request, helper, appTheme, inAppAuth, cache, modalService, alertCtrl, device, authService, openNativeSettings, toast, translate, file, debug) {
    this.request = request;
    this.helper = helper;
    this.appTheme = appTheme;
    this.inAppAuth = inAppAuth;
    this.cache = cache;
    this.modalService = modalService;
    this.alertCtrl = alertCtrl;
    this.device = device;
    this.authService = authService;
    this.openNativeSettings = openNativeSettings;
    this.toast = toast;
    this.translate = translate;
    this.file = file;
    this.debug = debug;
    this.emailLoading = new rxjs__WEBPACK_IMPORTED_MODULE_25__.BehaviorSubject(false);
    this.phoneLoading = new rxjs__WEBPACK_IMPORTED_MODULE_25__.BehaviorSubject(false);
    this.smsMailing = new rxjs__WEBPACK_IMPORTED_MODULE_25__.BehaviorSubject(false);
    this.mailingLoading = new rxjs__WEBPACK_IMPORTED_MODULE_25__.BehaviorSubject(false);
    this.appLangs = _environments_settings__WEBPACK_IMPORTED_MODULE_19__.APP_LANGS;
    this.cacheSize = '0';
    this.oneSignalID = _services_push_service__WEBPACK_IMPORTED_MODULE_22__.oneSignalID;
  }
  ngOnInit() {
    this.loadData();
    if (this.request.settingsEmail.value.useEmailAsLogin) {
      this.loginMethod = 'email';
    } else if (this.request.settingsPhone.value.usePhoneAsLogin) {
      this.loginMethod = 'tel';
    } else {
      this.loginMethod = 'ls';
    }
  }
  ionViewWillEnter() {
    this.cache.getCacheSize();
  }
  ionViewDidEnter() {
    if (!this.request.settingsEmail.value && !this.emailLoading.value) {
      this.loadEmail();
    }
    if (!this.request.settingsPhone.value && !this.phoneLoading.value) {
      this.loadPhone();
    }
    if (!this.request.settingsMailings.value[this.request.activeLs.value] && !this.mailingLoading.value && this.request.activeLs.value !== null) {
      this.loadMailings();
    }
  }
  loadData(refresher) {
    this.loadEmail(refresher);
    this.loadPhone(refresher);
    if (this.request.activeLs.value !== null) {
      this.loadMailings(refresher);
    }
  }
  loadEmail(refresher) {
    var _this = this;
    this.emailLoading.next(true);
    this.request.getRequest(this.request.uri.settingsEmailGet(), {
      preloader: false,
      forceUpdateCache: refresher,
      onlyCacheOrRequest: true
    }).subscribe({
      next: function () {
        var _ref = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
          _this.emailLoading.next(false);
          // Вызываем функцию коллбэк
          yield _this.request.loadSettingsEmailCallback()(result);
        });
        return function next(_x) {
          return _ref.apply(this, arguments);
        };
      }(),
      error: () => {
        this.emailLoading.next(false);
      }
    });
  }
  loadPhone(refresher) {
    var _this2 = this;
    this.phoneLoading.next(true);
    this.request.getRequest(this.request.uri.settingsPhoneGet(), {
      preloader: false,
      forceUpdateCache: refresher,
      onlyCacheOrRequest: true
    }).subscribe({
      next: function () {
        var _ref2 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
          _this2.phoneLoading.next(false);
          // Вызываем функцию коллбэк
          yield _this2.request.loadSettingsPhoneCallback()(result);
        });
        return function next(_x2) {
          return _ref2.apply(this, arguments);
        };
      }(),
      error: () => {
        this.phoneLoading.next(false);
      }
    });
  }
  loadMailings(refresher) {
    var _this3 = this;
    this.mailingLoading.next(true);
    this.request.getRequest(this.request.uri.settingsMailingsGet(), {
      preloader: false,
      forceUpdateCache: refresher,
      onlyCacheOrRequest: true,
      background: true
    }).subscribe({
      next: function () {
        var _ref3 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
          _this3.mailingLoading.next(false);
          // Вызываем функцию коллбэк
          yield _this3.request.loadSettingsMailingsCallback()(result);
        });
        return function next(_x3) {
          return _ref3.apply(this, arguments);
        };
      }(),
      error: () => {
        this.mailingLoading.next(false);
      }
    });
  }
  openChangeLoginMethodModal() {
    var _this4 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      yield _this4.modalService.openModal({
        component: _change_data_modal_change_data_modal_page__WEBPACK_IMPORTED_MODULE_6__.ChangeDataModalPage,
        componentProps: {}
      });
    })();
  }
  openSelectLogin() {
    var _this5 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (!_this5.request.settingsEmail.value || !_this5.request.settingsPhone.value || !_this5.request.settingsEmail.value.result || !_this5.request.settingsPhone.value.result) {
        _this5.loadEmail();
        _this5.loadPhone();
      } else {
        let buttons = [];
        buttons.push({
          title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.EMAIL')),
          value: 'email',
          handle: function () {
            var _ref4 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (selectBtn) {
              return new Promise(/*#__PURE__*/function () {
                var _ref5 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (resolve) {
                  if (_this5.request.settingsEmail.value.email == '' || _this5.request.settingsEmail.value.email == null) {
                    const alert = yield _this5.alertCtrl.create({
                      header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                      message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get("MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.EMAIL_REQUIRED_ALERT.MESSAGE")),
                      buttons: [{
                        text: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get("BUTTONS.CANCEL")),
                        handler: () => resolve(false)
                      }, {
                        text: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get("MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.EMAIL_REQUIRED_ALERT.BTN_ENTER_EMAIL")),
                        handler: () => {
                          _this5.openChangeEmailModal().then(modal => {
                            modal.onDidDismiss().then(ret => {
                              if (ret.data) {
                                resolve(selectBtn);
                              } else {
                                resolve(false);
                              }
                            });
                          });
                        }
                      }]
                    });
                    yield alert.present();
                  } else {
                    resolve(selectBtn);
                  }
                });
                return function (_x5) {
                  return _ref5.apply(this, arguments);
                };
              }());
            });
            return function handle(_x4) {
              return _ref4.apply(this, arguments);
            };
          }()
        });
        if (_this5.request.settingsPhone.value.phone !== '' && _this5.request.settingsPhone.value.phone !== null) {
          buttons.push({
            title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.PHONE')),
            value: 'tel'
          });
        }
        let value;
        if (_this5.request.settingsEmail.value.useEmailAsLogin) {
          value = 'email';
        } else if (_this5.request.settingsPhone.value.usePhoneAsLogin) {
          value = 'tel';
        } else {
          buttons.push({
            title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.LS')),
            value: 'ls'
          });
          value = 'ls';
        }
        _this5.helper.showActionSheet({
          type: 'select',
          buttons,
          title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.TITLE')),
          value
        }).then(/*#__PURE__*/function () {
          var _ref6 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
            if (result.value !== value) {
              _this5.request.postRequest(_this5.request.uri.settingsChangeLoginMethodPost(), {
                login: result.value
              }, {
                useCache: false
              }).subscribe(/*#__PURE__*/function () {
                var _ref7 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
                  if (!response.result) {
                    const alert = yield _this5.alertCtrl.create({
                      header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                      message: response.message,
                      buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this5.translate.get("BUTTONS.OK"))]
                    });
                    yield alert.present();
                  } else {
                    _this5.loadPhone(true);
                    _this5.loadEmail(true);
                  }
                });
                return function (_x7) {
                  return _ref7.apply(this, arguments);
                };
              }());
            }
          });
          return function (_x6) {
            return _ref6.apply(this, arguments);
          };
        }());
      }
    })();
  }
  openSelectThemeChange() {
    var _this6 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this6.helper.showActionSheet({
        type: 'select',
        title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this6.translate.get('MORE.SETTINGS_PAGE.APP.THEME.TITLE')),
        buttons: [{
          title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this6.translate.get('MORE.SETTINGS_PAGE.APP.THEME.SYSTEM')),
          value: 'system'
        }, {
          title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this6.translate.get('MORE.SETTINGS_PAGE.APP.THEME.LIGHT')),
          value: 'light'
        }, {
          title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this6.translate.get('MORE.SETTINGS_PAGE.APP.THEME.DARK')),
          value: 'dark'
        }],
        value: _this6.appTheme.theme
      }).then(/*#__PURE__*/function () {
        var _ref8 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
          if (result) {
            yield _this6.appTheme.appThemeChange(result.value);
          }
        });
        return function (_x8) {
          return _ref8.apply(this, arguments);
        };
      }());
    })();
  }
  openChangePhoneModal() {
    var _this7 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (!_this7.request.settingsPhone.value || !_this7.request.settingsPhone.value.result) {
        _this7.loadPhone(true);
      } else {
        yield _this7.modalService.openModal({
          component: _change_data_modal_change_data_modal_page__WEBPACK_IMPORTED_MODULE_6__.ChangeDataModalPage,
          componentProps: {
            title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.PHONE.TITLE')),
            inputType: 'tel',
            value: _this7.request.settingsPhone.value.phone,
            handler: value => new Promise((resolve, reject) => {
              _this7.request.postRequest(_this7.request.uri.sendCodePost(), {
                value: value.input,
                type: 'tel'
              }, {
                useCache: false
              }).subscribe(/*#__PURE__*/function () {
                var _ref9 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
                  if (result.result) {
                    _this7.modalService.openModal({
                      component: _code_verification_code_verification_page__WEBPACK_IMPORTED_MODULE_8__.CodeVerificationPage,
                      componentProps: {
                        loginType: 'tel',
                        login: value.input,
                        authData: result
                      }
                    }).then(/*#__PURE__*/function () {
                      var _ref0 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (modal) {
                        modal.onWillDismiss().then(/*#__PURE__*/function () {
                          var _ref1 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (data) {
                            if (data.data) {
                              _this7.request.postRequest(_this7.request.uri.settingsPhonePost(), {
                                activePhone: _this7.request.settingsPhone.value.phone,
                                newPhone: value.input
                              }, {
                                useCache: false
                              }).subscribe(/*#__PURE__*/function () {
                                var _ref10 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
                                  if (response.result) {
                                    yield _this7.modalService.openModal({
                                      component: _info_info_page__WEBPACK_IMPORTED_MODULE_9__.InfoPage,
                                      componentProps: {
                                        icon: 'PhoneConfirmed',
                                        header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.PHONE.CHANGE_SUCCESS_TITLE')),
                                        description: response.message
                                      }
                                    });
                                    const storeValue = _this7.request.settingsPhone.value;
                                    storeValue.phone = response.phone;
                                    yield _this7.request.invalidateCache(_this7.request.uri.settingsPhoneGet());
                                    yield _this7.request.loadSettingsPhoneCallback()(storeValue);
                                    _this7.loadPhone(true);
                                    resolve(true);
                                  } else {
                                    const alert = yield _this7.alertCtrl.create({
                                      header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                                      message: response.message || (yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get("ERROR_STRING.SAVE_ERROR"))),
                                      buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get("BUTTONS.OK"))]
                                    });
                                    yield alert.present();
                                    reject(false);
                                  }
                                });
                                return function (_x10) {
                                  return _ref10.apply(this, arguments);
                                };
                              }());
                            }
                          });
                          return function (_x1) {
                            return _ref1.apply(this, arguments);
                          };
                        }());
                      });
                      return function (_x0) {
                        return _ref0.apply(this, arguments);
                      };
                    }());
                  } else {
                    const alert = yield _this7.alertCtrl.create({
                      header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                      message: result.message || (yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get("ERROR_STRING.SAVE_ERROR"))),
                      buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this7.translate.get("BUTTONS.OK"))]
                    });
                    yield alert.present();
                    reject(false);
                  }
                });
                return function (_x9) {
                  return _ref9.apply(this, arguments);
                };
              }());
            })
          }
        });
      }
    })();
  }
  openChangeEmailModal() {
    var _this8 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (!_this8.request.settingsEmail.value || !_this8.request.settingsEmail.value.result) {
        _this8.loadEmail(true);
      } else {
        return _this8.modalService.openModal({
          component: _change_data_modal_change_data_modal_page__WEBPACK_IMPORTED_MODULE_6__.ChangeDataModalPage,
          componentProps: {
            title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.TITLE')),
            inputType: 'email',
            name: 'ChangeEmailModal',
            value: _this8.request.settingsEmail.value.email,
            handler: value => new Promise(/*#__PURE__*/function () {
              var _ref11 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (resolve) {
                if (value.input != '') {
                  _this8.request.postRequest(_this8.request.uri.sendCodePost(), {
                    value: value.input,
                    type: 'email'
                  }, {
                    useCache: false
                  }).subscribe(/*#__PURE__*/function () {
                    var _ref12 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
                      if (result.result) {
                        _this8.modalService.openModal({
                          component: _code_verification_code_verification_page__WEBPACK_IMPORTED_MODULE_8__.CodeVerificationPage,
                          componentProps: {
                            loginType: 'email',
                            login: value.input,
                            authData: result
                          }
                        }).then(/*#__PURE__*/function () {
                          var _ref13 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (modal) {
                            modal.onWillDismiss().then(/*#__PURE__*/function () {
                              var _ref14 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (data) {
                                if (data.data) {
                                  _this8.request.postRequest(_this8.request.uri.settingsEmailPost(), {
                                    newEmail: value.input
                                  }, {
                                    useCache: false
                                  }).subscribe(/*#__PURE__*/function () {
                                    var _ref15 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
                                      if (response.messages[0].result) {
                                        yield _this8.modalService.openModal({
                                          component: _info_info_page__WEBPACK_IMPORTED_MODULE_9__.InfoPage,
                                          componentProps: {
                                            icon: 'Email',
                                            header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.CHANGE_SUCCESS_TITLE')),
                                            description: response.messages[0].message
                                          }
                                        });
                                        const storeValue = _this8.request.settingsEmail.value;
                                        storeValue.email = response.email;
                                        yield _this8.request.invalidateCache(_this8.request.uri.settingsEmailGet());
                                        yield _this8.request.loadSettingsEmailCallback()(storeValue);
                                        // this.modalService.closeModalByName('ChangeEmailModal');
                                        _this8.loadEmail(true);
                                        resolve(true);
                                      } else {
                                        let message = yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.CHANGE_FAILED_TITLE'));
                                        response.messages.forEach(mess => {
                                          if (!mess.result) {
                                            message = mess.message;
                                          }
                                        });
                                        const alert = yield _this8.alertCtrl.create({
                                          header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                                          message,
                                          buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("BUTTONS.OK"))]
                                        });
                                        yield alert.present();
                                        resolve(false);
                                      }
                                    });
                                    return function (_x15) {
                                      return _ref15.apply(this, arguments);
                                    };
                                  }());
                                }
                              });
                              return function (_x14) {
                                return _ref14.apply(this, arguments);
                              };
                            }());
                          });
                          return function (_x13) {
                            return _ref13.apply(this, arguments);
                          };
                        }());
                      } else {
                        const alert = yield _this8.alertCtrl.create({
                          header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("ERROR_STRING.ERROR_HEADER")),
                          message: result.message ? result.message : yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("MODAL_PAGES.CODE_VERIFICATION.SEND_ERROR")),
                          buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("BUTTONS.OK"))]
                        });
                        yield alert.present();
                      }
                    });
                    return function (_x12) {
                      return _ref12.apply(this, arguments);
                    };
                  }());
                } else {
                  const alert = yield _this8.alertCtrl.create({
                    header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                    message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("APPEALS.APPLICATIONS_FORM_PAGE.CREATE_PAGE.EMAIL.ERROR")),
                    buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this8.translate.get("BUTTONS.OK"))]
                  });
                  yield alert.present();
                }
              });
              return function (_x11) {
                return _ref11.apply(this, arguments);
              };
            }())
          }
        });
      }
    })();
  }
  openChangePasswordModal() {
    var _this9 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      yield _this9.modalService.openModal({
        component: _change_data_modal_change_data_modal_page__WEBPACK_IMPORTED_MODULE_6__.ChangeDataModalPage,
        componentProps: {
          title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this9.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.PASSWORD.TITLE')),
          inputType: 'password',
          value: '',
          handler: value => new Promise(/*#__PURE__*/function () {
            var _ref16 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (resolve, reject) {
              if (value.input.length < 6 || value.newPass.length < 6 || value.confirmNewPass.length < 6 || value.newPass !== value.confirmNewPass) {
                const alert = yield _this9.alertCtrl.create({
                  header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this9.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                  message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this9.translate.get('MORE.SETTINGS_PAGE.ACCOUNT.PASSWORD.PASS_INVALID')),
                  buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this9.translate.get('BUTTONS.OK'))]
                });
                yield alert.present();
              } else {
                const params = {
                  oldPassword: ts_md5__WEBPACK_IMPORTED_MODULE_10__.Md5.hashStr(value.input),
                  newPassword: ts_md5__WEBPACK_IMPORTED_MODULE_10__.Md5.hashStr(value.newPass),
                  deviceUuid: _this9.device.uuid || _this9.debug.deviceUUID
                };
                _this9.request.postRequest(_this9.request.uri.sendNewPassPost(), params, {
                  useCache: false
                }).subscribe(/*#__PURE__*/function () {
                  var _ref17 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
                    const alert = yield _this9.alertCtrl.create({
                      header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this9.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                      message: result.message,
                      buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this9.translate.get("BUTTONS.OK"))]
                    });
                    yield alert.present();
                    if (result.result) {
                      yield (0,rxjs__WEBPACK_IMPORTED_MODULE_27__.firstValueFrom)((0,_services_token_service__WEBPACK_IMPORTED_MODULE_20__.storeTokens)(result.accountData));
                      resolve(false);
                    } else {
                      reject(false);
                    }
                  });
                  return function (_x18) {
                    return _ref17.apply(this, arguments);
                  };
                }());
              }
            });
            return function (_x16, _x17) {
              return _ref16.apply(this, arguments);
            };
          }())
        }
      });
    })();
  }
  openChangeSubscriptionModal() {
    var _this0 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (!_this0.request.settingsMailings.value[_this0.request.activeLs.value]) {
        _this0.loadMailings();
      } else {
        yield _this0.modalService.openModal({
          component: _change_data_modal_change_data_modal_page__WEBPACK_IMPORTED_MODULE_6__.ChangeDataModalPage,
          componentProps: {
            title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this0.translate.get('MORE.SETTINGS_PAGE.PERSONAL_ACCOUNT.TITLE')),
            inputType: 'checkbox',
            checkboxes: (() => {
              const emailMailing = [];
              const smsMailing = [];
              // eslint-disable-next-line max-len
              Object.values(_this0.request.settingsMailings.value[_this0.request.activeLs.value].parameter).map((item, key) => {
                if (item.key === 'send_kvit') {
                  emailMailing.push({
                    id: key,
                    type: item.key,
                    label: item.subTitle,
                    value: item.value
                  });
                } else if (item.key === 'send_sms') {
                  smsMailing.push({
                    id: key,
                    type: item.key,
                    rowId: item.rowId,
                    label: item.subTitle,
                    value: item.value
                  });
                }
              });
              return {
                email: emailMailing,
                sms: smsMailing
              };
            })()
          }
        });
      }
    })();
  }
  setPinCode() {
    var _this1 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      const modal = yield _this1.modalService.openModal({
        component: _pin_code_pin_code_page__WEBPACK_IMPORTED_MODULE_13__.PinCodePage,
        cssClass: 'fullscreen-modal top-modal',
        backdropDismiss: false,
        swipeToClose: false,
        componentProps: {
          type: 'setCode'
        }
      });
      modal.onDidDismiss().then(/*#__PURE__*/function () {
        var _ref18 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (data) {
          if (data.data) {
            _this1.inAppAuth.pinInst.next(true);
          }
        });
        return function (_x19) {
          return _ref18.apply(this, arguments);
        };
      }());
    })();
  }
  toggleTouchId() {
    var _this10 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (!_this10.inAppAuth.faioAvailable.value) {
        _this10.alertCtrl.create({
          header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this10.translate.get("ERROR_STRING.ATTENTION_HEADER")),
          message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this10.translate.get('MORE.SETTINGS_PAGE.APP.CODE.UNAVAILABLE')),
          buttons: [{
            text: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this10.translate.get('BUTTONS.CLOSE')),
            role: 'cancel'
          }, {
            text: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this10.translate.get('BUTTONS.SETTINGS')),
            handler: () => {
              _this10.openNativeSettings.open('settings');
            }
          }]
        }).then(alert => {
          alert.present().catch(() => {});
        });
      } else {
        if (_this10.inAppAuth.faioEnabled.value) {
          yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_17__.Preferences.set({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_18__.FAIO_ENABLED,
            value: '0'
          });
        } else {
          yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_17__.Preferences.set({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_18__.FAIO_ENABLED,
            value: '1'
          });
        }
        _this10.inAppAuth.faioEnabled.next(!_this10.inAppAuth.faioEnabled.value);
      }
    })();
  }
  openChangeCodeModal() {
    var _this11 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      if (_this11.inAppAuth.pinInst.value) {
        yield _this11.modalService.openModal({
          component: _pin_code_pin_code_page__WEBPACK_IMPORTED_MODULE_13__.PinCodePage,
          componentProps: {
            type: 'checkCode',
            openSettings: true,
            swipeToClose: true
          }
        });
      } else {
        yield _this11.modalService.openModal({
          component: _add_code_modal_add_code_modal_page__WEBPACK_IMPORTED_MODULE_16__.AddCodeModalPage,
          componentProps: {
            openSettings: true
          }
        });
      }
    })();
  }
  changePerformance() {
    var _this12 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this12.appTheme.performance.next(!_this12.appTheme.performance.value);
    })();
  }
  accountDelete() {
    var _this13 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this13.alertCtrl.create({
        header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("TEXT_STRING.ACCOUNT_REMOVE_QUESTION")),
        message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("TEXT_STRING.ACCOUNT_REMOVE_MESSAGE")),
        buttons: [{
          text: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get('BUTTONS.CANCEL')),
          role: 'cancel'
        }, {
          text: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("BUTTONS.DELETE")),
          handler: () => {
            _this13.request.postRequest(_this13.request.uri.accountRemovePost(), {}, {
              useCache: false
            }).subscribe(/*#__PURE__*/function () {
              var _ref19 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (response) {
                if (response.result) {
                  _this13.authService.logout().catch(() => {});
                  _this13.alertCtrl.create({
                    header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                    message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("TEXT_STRING.ACCOUNT_REMOVE_SUCCESS_MESSAGE")),
                    buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get('BUTTONS.OK'))]
                  }).then(/*#__PURE__*/function () {
                    var _ref20 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (alert) {
                      yield alert.present();
                    });
                    return function (_x21) {
                      return _ref20.apply(this, arguments);
                    };
                  }());
                } else {
                  _this13.alertCtrl.create({
                    header: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("ERROR_STRING.ATTENTION_HEADER")),
                    message: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get("TEXT_STRING.ACCOUNT_REMOVE_FAILED_MESSAGE")),
                    buttons: [yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this13.translate.get('BUTTONS.OK'))]
                  }).then(/*#__PURE__*/function () {
                    var _ref21 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (alert) {
                      yield alert.present();
                    });
                    return function (_x22) {
                      return _ref21.apply(this, arguments);
                    };
                  }());
                }
              });
              return function (_x20) {
                return _ref19.apply(this, arguments);
              };
            }());
          }
        }]
      }).then(/*#__PURE__*/function () {
        var _ref22 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (alert) {
          yield alert.present();
        });
        return function (_x23) {
          return _ref22.apply(this, arguments);
        };
      }());
    })();
  }
  clearAppCache() {
    var _this14 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this14.cache.clearAppCache().then(() => {
        _this14.loadData();
      });
    })();
  }
  openSelectLangChange() {
    var _this15 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      let buttons = [];
      for (const lang of _environments_settings__WEBPACK_IMPORTED_MODULE_19__.APP_LANGS) {
        buttons.push({
          title: (yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this15.translate.getTranslation(lang))).MORE.SETTINGS_PAGE.APP.LANG.VALUE,
          value: lang
        });
      }
      _this15.helper.showActionSheet({
        type: 'select',
        title: yield (0,rxjs__WEBPACK_IMPORTED_MODULE_26__.lastValueFrom)(_this15.translate.get('MORE.SETTINGS_PAGE.APP.LANG.TITLE')),
        buttons,
        value: _this15.translate.currentLang
      }).then(/*#__PURE__*/function () {
        var _ref23 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (result) {
          if (result) {
            _this15.translate.use(result.value);
            yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_17__.Preferences.set({
              key: _environments_storage__WEBPACK_IMPORTED_MODULE_18__.APPLICATION_LANG,
              value: result.value
            });
          }
        });
        return function (_x24) {
          return _ref23.apply(this, arguments);
        };
      }());
    })();
  }
  static {
    this.ctorParameters = () => [{
      type: _services_request_service__WEBPACK_IMPORTED_MODULE_3__.RequestService
    }, {
      type: _services_helper_service__WEBPACK_IMPORTED_MODULE_4__.HelperService
    }, {
      type: _services_app_theme_service__WEBPACK_IMPORTED_MODULE_7__.AppThemeService
    }, {
      type: _services_in_app_auth_service__WEBPACK_IMPORTED_MODULE_14__.InAppAuthService
    }, {
      type: _services_cache_service__WEBPACK_IMPORTED_MODULE_23__.CacheService
    }, {
      type: _services_modal_service__WEBPACK_IMPORTED_MODULE_5__.ModalService
    }, {
      type: _ionic_angular__WEBPACK_IMPORTED_MODULE_28__.AlertController
    }, {
      type: _awesome_cordova_plugins_device_ngx__WEBPACK_IMPORTED_MODULE_11__.Device
    }, {
      type: _services_authentication_service__WEBPACK_IMPORTED_MODULE_12__.AuthenticationService
    }, {
      type: _awesome_cordova_plugins_open_native_settings_ngx__WEBPACK_IMPORTED_MODULE_15__.OpenNativeSettings
    }, {
      type: _ionic_angular__WEBPACK_IMPORTED_MODULE_28__.ToastController
    }, {
      type: _ngx_translate_core__WEBPACK_IMPORTED_MODULE_29__.TranslateService
    }, {
      type: _awesome_cordova_plugins_file_ngx__WEBPACK_IMPORTED_MODULE_21__.File
    }, {
      type: _services_debug_service__WEBPACK_IMPORTED_MODULE_24__.DebugService
    }];
  }
};
SettingsPage = (0,tslib__WEBPACK_IMPORTED_MODULE_30__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_31__.Component)({
  selector: 'app-settings',
  template: _settings_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__,
  providers: [_awesome_cordova_plugins_open_native_settings_ngx__WEBPACK_IMPORTED_MODULE_15__.OpenNativeSettings],
  styles: [(_settings_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default())]
})], SettingsPage);


/***/ }),

/***/ 8020:
/*!*******************************************!*\
  !*** ./src/app/services/cache.service.ts ***!
  \*******************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   CacheService: () => (/* binding */ CacheService)
/* harmony export */ });
/* harmony import */ var D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 89204);
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _environments_storage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../environments/storage */ 12960);
/* harmony import */ var _awesome_cordova_plugins_file_ngx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @awesome-cordova-plugins/file/ngx */ 66411);
/* harmony import */ var ionic_cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ionic-cache */ 65503);
/* harmony import */ var _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @capacitor/preferences */ 46493);
/* harmony import */ var _request_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./request.service */ 80931);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ngx-translate/core */ 597);
/* harmony import */ var _debug_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./debug.service */ 33925);











let CacheService = class CacheService {
  constructor(file, cache, request, toast, translate, debug) {
    this.file = file;
    this.cache = cache;
    this.request = request;
    this.toast = toast;
    this.translate = translate;
    this.debug = debug;
    this.cacheSize = '0';
  }
  getCacheSize() {
    var _this = this;
    this.cache.getRawItems().then(/*#__PURE__*/function () {
      var _ref = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (data) {
        let size = 0;
        for (var i = 0; i < data.length; i++) {
          let objectSize = JSON.stringify(data[i]).length;
          size += objectSize * 2;
        }
        size += _this.getStorageSize();
        size += yield _this.getDownloadedFilesSize();
        _this.cacheSize = (size / 1024 / 1024).toFixed(2);
      });
      return function (_x2) {
        return _ref.apply(this, arguments);
      };
    }());
  }
  clearAppCache() {
    var _this2 = this;
    return new Promise(/*#__PURE__*/function () {
      var _ref2 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (resolve) {
        let storageData = {
          accountId: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.ACCOUNT_ID
          })).value,
          activeLS: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.ACTIVE_LS
          })).value,
          accessToken: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.ACCESS_TOKEN
          })).value,
          refreshToken: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.REFRESH_TOKEN
          })).value,
          appTheme: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.APP_THEME
          })).value,
          AppPerformance: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.APP_PERFORMANCE
          })).value,
          pinCode: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PIN_CODE
          })).value,
          pinCodeEnabled: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PIN_CODE_ENABLED
          })).value,
          pinCodeInvited: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PIN_CODE_INVITED
          })).value,
          touchID: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.FAIO_ENABLED
          })).value,
          faioChanged: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.FAIO_CHANGED
          })).value,
          availablePayments: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_PAY
          })).value,
          availablePaymentsDate: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_PAY_DATE
          })).value,
          availableAppeals: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_APPEALS
          })).value,
          availableReadings: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_READINGS
          })).value,
          availableQuality: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_QUALITY
          })).value,
          availableRecording: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_RECORDING
          })).value,
          applicationLang: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.APPLICATION_LANG
          })).value,
          authByPhone: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AUTH_BY_PHONE
          })).value,
          updateInviteClosed: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.UPDATE_INVITE_CLOSED
          })).value,
          pageMessage: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PAGE_MESSAGE
          })).value,
          pageMessageClosed: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PAGE_MESSAGE_CLOSED
          })).value,
          pageTechnicalWorks: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PAGE_TECHNICAL_WORKS
          })).value,
          pageUpdateApp: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.PAGE_UPDATE_APP
          })).value,
          settingsPayCheque: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.SETTINGS_PAY_CHEQUE
          })).value,
          settingsPayMethods: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.SETTINGS_PAY_METHODS
          })).value,
          bindings: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.BINDINGS
          })).value,
          notificationsNoReadCount: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.NOTIFICATIONS_NO_READ_COUNT
          })).value,
          divoSelectedOrg: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.DIVO_SELECTED_ORG
          })).value,
          apiUrl: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.API_URL
          })).value,
          unreliableLS: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.UNRELIABLE_LS
          })).value,
          deviceUUID: (yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.get({
            key: _environments_storage__WEBPACK_IMPORTED_MODULE_1__.DEVICE_UUID
          })).value
        };
        Promise.all([_capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.clear().then(() => {
          Object.keys(storageData).forEach(/*#__PURE__*/function () {
            var _ref3 = (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (item) {
              if (storageData[item] != null) {
                yield _capacitor_preferences__WEBPACK_IMPORTED_MODULE_3__.Preferences.set({
                  key: item,
                  value: storageData[item]
                });
              }
            });
            return function (_x4) {
              return _ref3.apply(this, arguments);
            };
          }());
          _this2.request.reset();
        }), _this2.request.cacheService.clearAll(), () => {
          return new Promise(resolve => {
            _this2.file.removeRecursively(_this2.file.dataDirectory, 'appealTemplates').finally(() => {
              resolve(true);
            });
          });
        }]).then(/*#__PURE__*/(0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
          _this2.getCacheSize();
          _this2.toast.create({
            message: _this2.translate.instant("TEXT_STRING.CACHE_CLEARED"),
            duration: 3000
          }).then(toast => {
            toast.present();
          });
          _this2.request.init().then(() => {
            resolve(true);
          });
          _this2.debug.hideDevMenu = false;
        })).catch(e => {
          console.log(e);
          resolve(false);
        });
      });
      return function (_x3) {
        return _ref2.apply(this, arguments);
      };
    }());
  }
  getStorageSize() {
    let _lsTotal = 0,
      _xLen,
      _x;
    let skip = ['CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.ACCOUNT_ID, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.ACTIVE_LS, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_PAY, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.AVAILABLE_PAY_DATE, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.REFRESH_TOKEN, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.BINDINGS, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.APP_THEME, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.ACCESS_TOKEN, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.APP_PERFORMANCE, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.NOTIFICATIONS_NO_READ_COUNT, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.SETTINGS_PAY_CHEQUE, 'CapacitorStorage.' + _environments_storage__WEBPACK_IMPORTED_MODULE_1__.SETTINGS_PAY_METHODS];
    for (_x in localStorage) {
      if (!localStorage.hasOwnProperty(_x) || skip.includes(_x)) {
        continue;
      }
      _xLen = (localStorage[_x].length + _x.length) * 2;
      _lsTotal += _xLen;
    }
    return _lsTotal;
  }
  getDownloadedFilesSize() {
    var _this3 = this;
    return (0,D_progr_mobileappv3_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        const dirEntry = yield _this3.file.resolveDirectoryUrl(_this3.file.dataDirectory);
        return yield _this3.size(dirEntry);
      } catch (e) {
        return 0;
      }
    })();
  }
  size(entry) {
    if (entry.isFile) {
      return new Promise((resolve, reject) => {
        entry.getMetadata(f => resolve(f.size), error => reject(error));
      });
    }
    if (entry.isDirectory) {
      return new Promise((resolve, reject) => {
        const directoryReader = entry.createReader();
        directoryReader.readEntries(entries => {
          Promise.all(entries.map(e => this.size(e))).then(size => {
            const dirSize = size.reduce((prev, current) => prev + current, 0);
            resolve(dirSize);
          }).catch(err => reject(err));
        }, error => reject(error));
      });
    }
  }
  static {
    this.ctorParameters = () => [{
      type: _awesome_cordova_plugins_file_ngx__WEBPACK_IMPORTED_MODULE_2__.File
    }, {
      type: ionic_cache__WEBPACK_IMPORTED_MODULE_6__.CacheService
    }, {
      type: _request_service__WEBPACK_IMPORTED_MODULE_4__.RequestService
    }, {
      type: _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.ToastController
    }, {
      type: _ngx_translate_core__WEBPACK_IMPORTED_MODULE_8__.TranslateService
    }, {
      type: _debug_service__WEBPACK_IMPORTED_MODULE_5__.DebugService
    }];
  }
};
CacheService = (0,tslib__WEBPACK_IMPORTED_MODULE_9__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_10__.Injectable)({
  providedIn: 'root'
})], CacheService);


/***/ }),

/***/ 31444:
/*!************************************************************************!*\
  !*** ./src/app/pages/tabs/more/settings/settings.page.scss?ngResource ***!
  \************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Imports
var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 53142);
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ 35950);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
// Module
___CSS_LOADER_EXPORT___.push([module.id, `@charset "UTF-8";
/*!
 * Copyright (c) 2022. Группа компаний "СТЕК". Все права защищены. Разработчик: Чуриков Антон Алексеевич
 */
.content-page {
  border-bottom: 24px solid transparent;
}
.content-page .ls-number {
  font-size: 12px;
  color: var(--font-color-secondary);
  text-align: center;
  margin: 0 24px;
}
.content-page .input-block {
  justify-content: flex-end;
  flex-grow: 1;
  margin-top: 24px;
}
.content-page .input-block ion-button {
  margin-top: 0;
}`, "",{"version":3,"sources":["webpack://./src/app/pages/tabs/more/settings/settings.page.scss"],"names":[],"mappings":"AAAA,gBAAgB;AAAhB;;EAAA;AAIA;EACE,qCAAA;AACF;AACE;EACE,eAAA;EACA,kCAAA;EACA,kBAAA;EACA,cAAA;AACJ;AAEE;EACE,yBAAA;EACA,YAAA;EACA,gBAAA;AAAJ;AAEI;EACE,aAAA;AAAN","sourcesContent":["/*!\n * Copyright (c) 2022. Группа компаний \"СТЕК\". Все права защищены. Разработчик: Чуриков Антон Алексеевич\n */\n\n.content-page {\n  border-bottom: 24px solid transparent;\n\n  .ls-number {\n    font-size: 12px;\n    color: var(--font-color-secondary);\n    text-align: center;\n    margin: 0 24px;\n  }\n\n  .input-block {\n    justify-content: flex-end;\n    flex-grow: 1;\n    margin-top: 24px;\n\n    ion-button {\n      margin-top: 0;\n    };\n  };\n}\n"],"sourceRoot":""}]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___.toString();


/***/ }),

/***/ 44124:
/*!************************************************************************!*\
  !*** ./src/app/pages/tabs/more/settings/settings.page.html?ngResource ***!
  \************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = "<!--\n  ~ Copyright (c) 2022. Группа компаний \"СТЕК\". Все права защищены. Разработчик: Чуриков Антон Алексеевич\n  -->\n\n<ion-header class=\"ion-no-border\">\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button text=\"\" icon=\"assets/icons/Chevron_Left.svg\"></ion-back-button>\n    </ion-buttons>\n    <ion-title>{{ 'MORE.SETTINGS_PAGE.TITLE' | translate }}</ion-title>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content>\n\n  <div class=\"content-page\">\n    @if (request.activeLs.value !== null) {\n      <div class=\"ls-number\">{{ 'MORE.SETTINGS_PAGE.LS' | translate:{value: request.activeLs.value | guardLsNumber} }}</div>\n    } @else {\n      <div class=\"ls-number\">{{ 'MORE.SETTINGS_PAGE.NOLS' | translate }}</div>\n    }\n\n    <!--  Аккаунт  -->\n    <app-card-block [title]=\"'MORE.SETTINGS_PAGE.ACCOUNT.TITLE' | translate\">\n      <!--  Телефон  -->\n      @if (helper.authByPhone.value) {\n        <app-menu-item\n            [title]=\"'MORE.SETTINGS_PAGE.ACCOUNT.PHONE.TITLE' | translate\"\n            (click)=\"openChangePhoneModal()\"\n            [disabled]=\"phoneLoading.value\"\n        >\n          @if (phoneLoading.value) {\n            {{ 'MORE.SETTINGS_PAGE.ACCOUNT.PHONE.LOADING' | translate }}\n          } @else if (!request.settingsPhone.value.result && !phoneLoading.value) {\n            {{ 'MORE.SETTINGS_PAGE.ACCOUNT.PHONE.ERROR' | translate }}\n          } @else if (request.settingsPhone.value.phone && !phoneLoading.value) {\n            {{ helper.phoneFormat(request.settingsPhone.value.phone) }}\n          } @else if (request.settingsPhone.value.phone == '' && !phoneLoading.value) {\n            {{ 'MORE.SETTINGS_PAGE.ACCOUNT.PHONE.NOT_ENTER' | translate }}\n          }\n        </app-menu-item>\n      }\n      <!--  Почта  -->\n      <app-menu-item\n          [title]=\"'MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.TITLE' | translate\"\n          (click)=\"openChangeEmailModal()\"\n          [disabled]=\"emailLoading.value\"\n      >\n        @if (emailLoading.value) {\n          {{ 'MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.LOADING' | translate }}\n        } @else if (!request.settingsEmail.value.result && !emailLoading.value) {\n          {{ 'MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.ERROR' | translate }}\n        } @else if (request.settingsEmail.value.email && !emailLoading.value) {\n          {{ request.settingsEmail.value.email }}\n        } @else if (request.settingsEmail.value.email == '' && !emailLoading.value) {\n          {{ 'MORE.SETTINGS_PAGE.ACCOUNT.EMAIL.NOT_ENTER' | translate }}\n        }\n      </app-menu-item>\n\n      <!--  Способ входа  -->\n      @if (helper.authByPhone.value || this.request.settingsEmail.value.useEmailAsLogin === false) {\n        <app-menu-item\n            [title]=\"'MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.TITLE' | translate\"\n            (click)=\"openSelectLogin()\"\n            [disabled]=\"(emailLoading.value || phoneLoading.value)\"\n        >\n          @if (emailLoading.value || phoneLoading.value) {\n            {{ 'MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.LOADING' | translate }}\n          } @else if (!emailLoading.value && !phoneLoading.value && (!request.settingsEmail.value.result || !request.settingsPhone.value.result)) {\n            {{ 'MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.ERROR' | translate }}\n          } @else if (!emailLoading.value && !phoneLoading.value && (request.settingsEmail.value.result && request.settingsPhone.value.result)) {\n            @if (request.settingsEmail.value.useEmailAsLogin) {\n              {{ 'MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.EMAIL' | translate }}\n            } @else if (request.settingsPhone.value.usePhoneAsLogin) {\n              {{ 'MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.PHONE' | translate }}\n            } @else if (!request.settingsEmail.value.useEmailAsLogin && !request.settingsPhone.value.usePhoneAsLogin) {\n              {{ 'MORE.SETTINGS_PAGE.ACCOUNT.LOGIN_METHOD.LS' | translate }}\n            }\n          }\n        </app-menu-item>\n      }\n\n      <!--  Смена пароля  -->\n      <app-menu-item\n          [title]=\"'MORE.SETTINGS_PAGE.ACCOUNT.PASSWORD.TITLE' | translate\"\n          (click)=\"openChangePasswordModal()\"\n      />\n    </app-card-block>\n\n    <!--  Лицевой счет  -->\n    <app-card-block [title]=\"'MORE.SETTINGS_PAGE.PERSONAL_ACCOUNT.TITLE' | translate\">\n      <!--  Рассылки  -->\n      <app-menu-item\n          [title]=\"'MORE.SETTINGS_PAGE.PERSONAL_ACCOUNT.MAILING.TITLE' | translate\"\n          (click)=\"openChangeSubscriptionModal()\"\n          [disabled]=\"mailingLoading.value\"\n      >\n        @if (mailingLoading.value) {\n          {{ 'MORE.SETTINGS_PAGE.PERSONAL_ACCOUNT.MAILING.LOADING' | translate }}\n        } @else if (!mailingLoading.value && !request.settingsMailings.value[request.activeLs.value]) {\n          {{ 'MORE.SETTINGS_PAGE.PERSONAL_ACCOUNT.MAILING.ERROR' | translate }}\n        }\n      </app-menu-item>\n    </app-card-block>\n\n    <!--  Приложение  -->\n    <app-card-block [title]=\"'MORE.SETTINGS_PAGE.APP.TITLE' | translate\">\n      <!--  Выбор темы  -->\n      <app-menu-item\n          [title]=\"'MORE.SETTINGS_PAGE.APP.THEME.TITLE' | translate\"\n          (click)=\"openSelectThemeChange()\"\n      >\n        @switch (appTheme.theme) {\n          @case ('system') {\n            {{ 'MORE.SETTINGS_PAGE.APP.THEME.SYSTEM' | translate }}\n          }\n          @case ('light') {\n            {{ 'MORE.SETTINGS_PAGE.APP.THEME.LIGHT' | translate }}\n          }\n          @case ('dark') {\n            {{ 'MORE.SETTINGS_PAGE.APP.THEME.DARK' | translate }}\n          }\n        }\n      </app-menu-item>\n\n      <!--  Язык  -->\n      @if (appLangs.length > 1) {\n        <app-menu-item\n            [title]=\"'MORE.SETTINGS_PAGE.APP.LANG.TITLE' | translate\"\n            (click)=\"openSelectLangChange()\"\n            [value]=\"'MORE.SETTINGS_PAGE.APP.LANG.VALUE' | translate\"\n        />\n      }\n\n      <!--  Код-пароль  -->\n      <app-menu-item\n          (click)=\"openChangeCodeModal()\"\n      >\n        @if (inAppAuth.faioType.value === 'face' ||\n        (inAppAuth.faioType.value !== 'finger' &&\n            (inAppAuth.faioErrorCode.value === -101 || inAppAuth.faioErrorCode.value === -105))) {\n          <ng-container title>\n            {{ 'MORE.SETTINGS_PAGE.APP.CODE.TITLE_FACE_ID' | translate }}\n          </ng-container>\n        } @else if (inAppAuth.faioType.value === 'finger') {\n          <ng-container title>\n            {{ 'MORE.SETTINGS_PAGE.APP.CODE.TITLE_TOUCH_ID' | translate }}\n          </ng-container>\n        } @else if (inAppAuth.faioType.value !== 'face' &&\n        inAppAuth.faioType.value !== 'finger' &&\n        inAppAuth.faioErrorCode.value !== -101 &&\n        inAppAuth.faioErrorCode.value !== -105) {\n          <ng-container title>\n            {{ 'MORE.SETTINGS_PAGE.APP.CODE.TITLE' | translate }}\n          </ng-container>\n        }\n\n        @if (inAppAuth.pinInst.value) {\n          {{ 'MORE.SETTINGS_PAGE.APP.CODE.ENABLED' | translate }}\n        } @else {\n          {{ 'MORE.SETTINGS_PAGE.APP.CODE.NONE' | translate }}\n        }\n      </app-menu-item>\n\n      <!--  Очистить кэш  -->\n      <app-menu-item\n          (click)=\"clearAppCache()\"\n          icon=\"\"\n      >\n        <div title [innerHTML]=\"'MORE.SETTINGS_PAGE.APP.CLEAR_CACHE' | translate:{cacheSize: cache.cacheSize}\"></div>\n      </app-menu-item>\n    </app-card-block>\n\n    <div class=\"input-block\">\n      <ion-button class=\"el-anim-tap\" type=\"button\" expand=\"block\" fill=\"clear\" color=\"danger\"\n                  (click)=\"accountDelete()\">{{ 'MORE.SETTINGS_PAGE.ACCOUNT_DELETE' | translate }}\n      </ion-button>\n    </div>\n  </div>\n\n</ion-content>\n";

/***/ })

}]);
//# sourceMappingURL=src_app_pages_tabs_more_settings_settings_module_ts.js.map