webpackJsonp([41],{

/***/ 1010:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InProgressComponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__providers_activation_service_activation_service__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_cache_settings__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_angular2_jwt__ = __webpack_require__(179);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_angular2_jwt___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_angular2_jwt__);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
 * Created by shadeeka on 4/29/18.
 */






var InProgressComponent = /** @class */ (function () {
    function InProgressComponent(actSvc, logger, settings, viewCtrl, navParams) {
        this.actSvc = actSvc;
        this.logger = logger;
        this.settings = settings;
        this.viewCtrl = viewCtrl;
        this.navParams = navParams;
        this.jwtHelper = new __WEBPACK_IMPORTED_MODULE_5_angular2_jwt__["JwtHelper"]();
        this.progressModel = [
            {
                name: 'Downloading App'
            },
            {
                name: 'Installation in progress'
            }, {
                name: 'Installing app licence'
            },
            {
                name: 'Agent Registration'
            }
        ];
    }
    InProgressComponent.prototype.ionViewDidLoad = function () {
        this.appMasterRef = this.navParams.get('master');
        this.downloadAppMaster(this.appMasterRef['app_master_id']);
    };
    InProgressComponent.prototype.downloadAppMaster = function (appMasterId) {
        var _this = this;
        this.actSvc.getAppConfig(appMasterId).subscribe(function (res) {
            _this.currentAppMaster = res;
            _this.installApps(res);
            _this.progressModel[0]['done'] = true;
            _this.progressModel[0]['complete'] = true;
        }, function (error) {
            _this.progressModel[0]['complete'] = true;
            _this.progressModel[0]['error'] = true;
            _this.progressModel[0]['errorstatus'] = 'error occurred while downloading';
            _this.logger.error(error);
        });
    };
    /*
     * fetch and install app master
     * */
    InProgressComponent.prototype.installApps = function (appMaster) {
        var _this = this;
        this.actSvc.setInstalledApp(appMaster);
        this.settings.setValue('app_master', appMaster).then(function () {
            _this.progressModel[1]['done'] = true;
            _this.progressModel[1]['complete'] = true;
            _this.registerAgent();
        }, function (e) {
            _this.progressModel[1]['complete'] = true;
            _this.progressModel[1]['error'] = true;
            _this.progressModel[1]['errorstatus'] = e['message'];
            _this.logger.error(e);
        });
    };
    /*
     * register each app with a license
     * */
    InProgressComponent.prototype.registerAgent = function () {
        var _this = this;
        var fetch$ = [];
        try {
            this.currentAppMaster.apps.forEach(function (app) {
                fetch$.push({ app_id: app['app_id'], appName: app['app_name'] });
            });
            this.actSvc.registerAgentApp(fetch$).subscribe(function (res) {
                // save app licence
                _this.logger.debug(res);
                _this.progressModel[2]['done'] = true;
                _this.progressModel[2]['complete'] = true;
                _this.saveAppLicense(fetch$, res['tokens']);
            }, function (e) {
                _this.progressModel[2]['error'] = true;
                _this.progressModel[2]['complete'] = true;
                _this.progressModel[2]['errorstatus'] = e;
                _this.logger.error(e);
            });
        }
        catch (e) {
            this.logger.error('Register Agents Apps' + e);
        }
    };
    /*
     * save app licence and check license validation
     * */
    InProgressComponent.prototype.saveAppLicense = function (apps, arr) {
        var _this = this;
        if (!arr) {
            return;
        }
        this.actSvc.setLicense(arr).then(function (res) {
            // this.viewCtrl.dismiss();
            var licenseKeys = {};
            arr.forEach(function (iapp) {
                var license = _this.jwtHelper.decodeToken(iapp['token']);
                licenseKeys[license['product_type']] = license['license_key'];
                iapp['license_key'] = license['license_key'];
                delete iapp['token'];
            });
            _this.actSvc.setLicenseKey(licenseKeys);
            _this.acknowledgeAndExitView(arr);
        }, function (err) {
        });
        // this.viewCtrl.dismiss();
    };
    /*
     * send acknowledgement for agent registration
     * */
    InProgressComponent.prototype.acknowledgeAndExitView = function (apps) {
        var _this = this;
        this.actSvc.acknowledgeAgent(apps, 'new').subscribe(function (res) {
            _this.progressModel[3]['done'] = true;
            _this.progressModel[3]['complete'] = true;
            _this.viewCtrl.dismiss();
        }, function (e) {
            _this.progressModel[3]['complete'] = true;
            _this.progressModel[3]['error'] = true;
            _this.progressModel[3]['errorstatus'] = e;
            _this.logger.error(e);
            _this.viewCtrl.dismiss();
        });
    };
    InProgressComponent = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'modal-progress',
            template: "\n<ion-header>\n <ion-navbar no-border-bottom color=\"mheader\">\n        <ion-title>\n            Installation in progress\n        </ion-title>\n    </ion-navbar>\n</ion-header>\n<ion-content>\n    <ion-grid no-padding>\n    <ion-row>\n    <ion-col>\n        <div class=\"bg-wrapper\">\n            Installing App {{appMasterRef?.name}}\n            <p>Please wait a while</p>\n        </div>\n    </ion-col>\n</ion-row>\n<ion-row>\n<ion-list class=\"progress-steps\">\n  <ion-item *ngFor=\"let step of progressModel\">\n  <ion-avatar *ngIf=\"!step.complete\" item-start>\n      <div class=\"progress float\">\n    <div class=\"progress__item\"></div>\n  </div>\n    </ion-avatar>\n    <ion-icon *ngIf=\"step.done\" item-start name=\"checkmark-circle\" color=\"c2\"></ion-icon>\n    <ion-icon *ngIf=\"step.error\" item-start name=\"close-circle\" color=\"danger\"></ion-icon>\n      {{step.name}}\n      <p *ngIf=\"step.error\">{{step.errorstatus}}</p>\n  </ion-item>\n</ion-list>\n</ion-row>\n</ion-grid>\n</ion-content>\n"
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__providers_activation_service_activation_service__["a" /* ActivationService */],
            __WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_cache_settings__["a" /* Settings */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["y" /* ViewController */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["p" /* NavParams */]])
    ], InProgressComponent);
    return InProgressComponent;
}());

//# sourceMappingURL=Inprogress.component.js.map

/***/ }),

/***/ 1011:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return PipesModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__group_filter_group_filter__ = __webpack_require__(1321);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};


var PipesModule = /** @class */ (function () {
    function PipesModule() {
    }
    PipesModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            declarations: [__WEBPACK_IMPORTED_MODULE_1__group_filter_group_filter__["a" /* GroupFilterPipe */]],
            imports: [],
            exports: [__WEBPACK_IMPORTED_MODULE_1__group_filter_group_filter__["a" /* GroupFilterPipe */]]
        })
    ], PipesModule);
    return PipesModule;
}());

//# sourceMappingURL=pipes.module.js.map

/***/ }),

/***/ 1012:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DynamicFormComponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__(23);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};


var DynamicFormComponent = /** @class */ (function () {
    function DynamicFormComponent(fb) {
        this.fb = fb;
        this.config = [];
        this.submit = new __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"]();
    }
    Object.defineProperty(DynamicFormComponent.prototype, "controls", {
        get: function () {
            return this.config.filter(function (_a) {
                var type = _a.type;
                return type !== 'button';
            });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFormComponent.prototype, "changes", {
        get: function () {
            return this.form.valueChanges;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFormComponent.prototype, "valid", {
        get: function () {
            return this.form.valid;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DynamicFormComponent.prototype, "value", {
        get: function () {
            return this.form.value;
        },
        enumerable: true,
        configurable: true
    });
    DynamicFormComponent.prototype.ngOnInit = function () {
        this.form = this.createGroup();
    };
    DynamicFormComponent.prototype.ngOnChanges = function () {
        var _this = this;
        if (this.form) {
            var controls_1 = Object.keys(this.form.controls);
            var configControls_1 = this.controls.map(function (item) { return item.name; });
            controls_1
                .filter(function (control) { return !configControls_1.includes(control); })
                .forEach(function (control) { return _this.form.removeControl(control); });
            configControls_1
                .filter(function (control) { return !controls_1.includes(control); })
                .forEach(function (name) {
                var config = _this.config.find(function (control) { return control.name === name; });
                _this.form.addControl(name, _this.createControl(config));
            });
        }
    };
    DynamicFormComponent.prototype.createGroup = function () {
        var _this = this;
        var group = this.fb.group({});
        this.controls.forEach(function (control) { return group.addControl(control.name, _this.createControl(control)); });
        return group;
    };
    DynamicFormComponent.prototype.createControl = function (config) {
        var disabled = config.disabled, validation = config.validation, value = config.value;
        return this.fb.control({ disabled: disabled, value: value }, validation);
    };
    DynamicFormComponent.prototype.handleSubmit = function (event) {
        event.preventDefault();
        event.stopPropagation();
        this.submit.emit(this.value);
    };
    DynamicFormComponent.prototype.setDisabled = function (name, disable) {
        if (this.form.controls[name]) {
            var method = disable ? 'disable' : 'enable';
            this.form.controls[name][method]();
            return;
        }
        this.config = this.config.map(function (item) {
            if (item.name === name) {
                item.disabled = disable;
            }
            return item;
        });
    };
    DynamicFormComponent.prototype.setValue = function (name, value) {
        this.form.controls[name].setValue(value, { emitEvent: true });
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
        __metadata("design:type", Array)
    ], DynamicFormComponent.prototype, "config", void 0);
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Output"])(),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_0__angular_core__["EventEmitter"])
    ], DynamicFormComponent.prototype, "submit", void 0);
    DynamicFormComponent = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            exportAs: 'dynamicForm',
            selector: 'dynamic-form',
            styles: [":host /deep/ .dynamic-field {\n  margin-bottom: 15px;\n  label {\n    display: block;\n    font-size: 16px;\n    font-weight: 400;\n    letter-spacing: 0px;\n    margin-bottom: 10px;\n    color: rgba(0, 0, 0, 0.9);\n  }\n}\n"],
            template: "<form class=\"dynamic-form\"\n      [formGroup]=\"form\"\n      (submit)=\"handleSubmit($event)\">\n      <ng-container\n        *ngFor=\"let field of config;\"\n        dynamicField\n        [config]=\"field\"\n        [group]=\"form\">\n      </ng-container>\n    </form>\n  "
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__angular_forms__["FormBuilder"]])
    ], DynamicFormComponent);
    return DynamicFormComponent;
}());

//# sourceMappingURL=dynamic-form.component.js.map

/***/ }),

/***/ 1013:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DynamicFormModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_common__ = __webpack_require__(21);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(23);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__components_dynamic_field_dynamic_field_directive__ = __webpack_require__(1322);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__containers_dynamic_form_dynamic_form_component__ = __webpack_require__(1012);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__components_form_button_form_button_component__ = __webpack_require__(699);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__components_form_input_form_input_component__ = __webpack_require__(700);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__components_form_select_form_select_component__ = __webpack_require__(701);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_filtering_select_filter_options__ = __webpack_require__(703);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__components_filtering_select_filtering_select__ = __webpack_require__(702);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};











var DynamicFormModule = /** @class */ (function () {
    function DynamicFormModule() {
    }
    DynamicFormModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["NgModule"])({
            imports: [
                __WEBPACK_IMPORTED_MODULE_1__angular_common__["CommonModule"],
                __WEBPACK_IMPORTED_MODULE_2__angular_forms__["ReactiveFormsModule"],
                __WEBPACK_IMPORTED_MODULE_2__angular_forms__["FormsModule"],
                __WEBPACK_IMPORTED_MODULE_9_ionic_angular__["h" /* IonicModule */]
            ],
            declarations: [
                __WEBPACK_IMPORTED_MODULE_3__components_dynamic_field_dynamic_field_directive__["a" /* DynamicFieldDirective */],
                __WEBPACK_IMPORTED_MODULE_4__containers_dynamic_form_dynamic_form_component__["a" /* DynamicFormComponent */],
                __WEBPACK_IMPORTED_MODULE_5__components_form_button_form_button_component__["a" /* FormButtonComponent */],
                __WEBPACK_IMPORTED_MODULE_6__components_form_input_form_input_component__["a" /* FormInputComponent */],
                __WEBPACK_IMPORTED_MODULE_7__components_form_select_form_select_component__["a" /* FormSelectComponent */],
                __WEBPACK_IMPORTED_MODULE_10__components_filtering_select_filtering_select__["a" /* FormFilterSelectComponent */],
                __WEBPACK_IMPORTED_MODULE_8__components_filtering_select_filter_options__["b" /* SelectPopoverPage */],
                __WEBPACK_IMPORTED_MODULE_8__components_filtering_select_filter_options__["a" /* FilterByPipe */]
            ],
            exports: [
                __WEBPACK_IMPORTED_MODULE_4__containers_dynamic_form_dynamic_form_component__["a" /* DynamicFormComponent */]
            ],
            entryComponents: [
                __WEBPACK_IMPORTED_MODULE_5__components_form_button_form_button_component__["a" /* FormButtonComponent */],
                __WEBPACK_IMPORTED_MODULE_6__components_form_input_form_input_component__["a" /* FormInputComponent */],
                __WEBPACK_IMPORTED_MODULE_7__components_form_select_form_select_component__["a" /* FormSelectComponent */],
                __WEBPACK_IMPORTED_MODULE_10__components_filtering_select_filtering_select__["a" /* FormFilterSelectComponent */],
                __WEBPACK_IMPORTED_MODULE_8__components_filtering_select_filter_options__["b" /* SelectPopoverPage */]
            ]
        })
    ], DynamicFormModule);
    return DynamicFormModule;
}());

//# sourceMappingURL=dynamic-form.module.js.map

/***/ }),

/***/ 1024:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(1025);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(1029);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_core__ = __webpack_require__(0);



Object(__WEBPACK_IMPORTED_MODULE_2__angular_core__["enableProdMode"])();
Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_1__app_module__["a" /* AppModule */]);
//# sourceMappingURL=main.js.map

/***/ }),

/***/ 1029:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* unused harmony export createTranslateLoader */
/* unused harmony export environmentFactory */
/* unused harmony export cloudSettings */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_splash_screen__ = __webpack_require__(214);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_status_bar__ = __webpack_require__(402);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_storage__ = __webpack_require__(37);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ngx_translate_core__ = __webpack_require__(86);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ngx_translate_http_loader__ = __webpack_require__(1045);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__app_component__ = __webpack_require__(1452);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__angular_platform_browser_animations__ = __webpack_require__(1457);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ionic_native_text_to_speech__ = __webpack_require__(210);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ionic_native_speech_recognition__ = __webpack_require__(1459);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__modules_components_app_component_module__ = __webpack_require__(1460);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__ncinga_sp_nsp_app_core_dist_environment_environment_variables_module__ = __webpack_require__(1462);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_auth_auth_module__ = __webpack_require__(289);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__ncinga_sp_nsp_app_core_dist_cache_cache_module__ = __webpack_require__(695);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__app_env__ = __webpack_require__(215);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__providers_activation_service_activation_service__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__providers_activation_service_env_provider__ = __webpack_require__(376);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__pages_appselect_inprogress_Inprogress_component__ = __webpack_require__(1010);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__pipes_pipes_module__ = __webpack_require__(1011);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__ncinga_sp_nsp_app_core_dist_environment_environment_variables_token__ = __webpack_require__(44);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__providers_app_master_service_app_master_service__ = __webpack_require__(1467);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__providers_app_extractor_app_extractor__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__ = __webpack_require__(51);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__ionic_native_device__ = __webpack_require__(178);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__modules_dynamic_form_dynamic_form_module__ = __webpack_require__(1013);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__modules_cloud_index__ = __webpack_require__(379);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__ncinga_sp_nsp_app_core_dist_communication_communication_module__ = __webpack_require__(71);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__ncinga_sp_nsp_reader_dist__ = __webpack_require__(321);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__ncinga_sp_nsp_counting_classifi_candc_module__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__ncinga_sp_nsp_store_ministore_module__ = __webpack_require__(999);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__ncinga_sp_nsp_counting_tracking_tracking_module__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__ionic_native_android_full_screen__ = __webpack_require__(978);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__ionic_native_file_transfer__ = __webpack_require__(291);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__ionic_native_zip__ = __webpack_require__(293);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__ionic_native_file__ = __webpack_require__(292);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__ionic_native_screen_orientation__ = __webpack_require__(378);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__pages_update_modal_update_modal__ = __webpack_require__(979);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__providers_deployment_svc_deployment_svc__ = __webpack_require__(356);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__providers_deployment_svc_version_manager__ = __webpack_require__(1468);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__ionic_native_autostart__ = __webpack_require__(980);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__ng_idle_keepalive__ = __webpack_require__(1469);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__ncinga_sp_nsp_ngx_packaging__ = __webpack_require__(1471);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__ncinga_sp_nsp_common_module__ = __webpack_require__(1473);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};















































/*
 * -----------------------------------
 *       DO NOT CHANGE THIS CLASS
 * -----------------------------------
 * Main app module which does the coordination among the modules
 * */
function createTranslateLoader(http) {
    return new __WEBPACK_IMPORTED_MODULE_6__ngx_translate_http_loader__["a" /* TranslateHttpLoader */](http, './assets/i18n/', '.json');
}
var url = '';
var cloudObj = {
    'core': {
        'app_id': 'faad0bd9',
        'urls': {
            'api': ''
        }
    }
};
url = __WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */]['protocol'] + __WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */]['service_host'] + __WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */]['deploy_services'];
cloudObj.core.urls.api = url;
function environmentFactory(logger) {
    logger.debug('-- BUILD NODE ENV NEW-- ', __WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */]);
    return __WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */];
}
var cloudSettings = cloudObj;
// console.log(cloudSettings.core.urls.api);
var AppModule = /** @class */ (function () {
    function AppModule() {
    }
    AppModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_8__app_component__["a" /* NSPCounting */],
                __WEBPACK_IMPORTED_MODULE_20__pages_appselect_inprogress_Inprogress_component__["a" /* InProgressComponent */],
                __WEBPACK_IMPORTED_MODULE_40__pages_update_modal_update_modal__["a" /* UpdateAlertModal */]
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_9__angular_platform_browser_animations__["a" /* BrowserAnimationsModule */],
                __WEBPACK_IMPORTED_MODULE_4__ionic_storage__["a" /* IonicStorageModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["b" /* HttpClientModule */],
                __WEBPACK_IMPORTED_MODULE_14__ncinga_sp_nsp_app_core_dist_environment_environment_variables_module__["a" /* EnvironmentsModule */],
                __WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_auth_auth_module__["a" /* AuthModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_16__ncinga_sp_nsp_app_core_dist_cache_cache_module__["a" /* CacheModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_12__modules_components_app_component_module__["a" /* AppComponentsModule */],
                __WEBPACK_IMPORTED_MODULE_29__ncinga_sp_nsp_app_core_dist_communication_communication_module__["a" /* CommunicationModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_30__ncinga_sp_nsp_app_core_dist__["j" /* CoreModule */].forRoot(null),
                __WEBPACK_IMPORTED_MODULE_31__ncinga_sp_nsp_reader_dist__["a" /* ReaderModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_32__ncinga_sp_nsp_counting_classifi_candc_module__["a" /* CAndCModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_33__ncinga_sp_nsp_store_ministore_module__["a" /* MiniStoreModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_34__ncinga_sp_nsp_counting_tracking_tracking_module__["e" /* TrackingModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_45__ncinga_sp_nsp_ngx_packaging__["a" /* PackingModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_46__ncinga_sp_nsp_common_module__["a" /* NSPCommonModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_44__ng_idle_keepalive__["a" /* NgIdleKeepaliveModule */].forRoot(),
                __WEBPACK_IMPORTED_MODULE_5__ngx_translate_core__["b" /* TranslateModule */].forRoot({
                    loader: {
                        provide: __WEBPACK_IMPORTED_MODULE_5__ngx_translate_core__["a" /* TranslateLoader */],
                        useFactory: (createTranslateLoader),
                        deps: [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */]]
                    }
                }),
                __WEBPACK_IMPORTED_MODULE_7_ionic_angular__["h" /* IonicModule */].forRoot(__WEBPACK_IMPORTED_MODULE_8__app_component__["a" /* NSPCounting */], {
                    tabsPlacement: 'top',
                    mode: 'md',
                    preloadModules: true
                }, {
                    links: [
                        { loadChildren: '../pages/activation/activation-page.module#ActivationPageModule', name: 'ActivationPage', segment: 'activation-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/app-landing/app-landing.module#AppLandingPageModule', name: 'AppLandingPage', segment: 'app-landing', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/appselect/appselect.module#AppselectPageModule', name: 'AppselectPage', segment: 'appselect', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/login/login.module#LoginPageModule', name: 'LoginPage', segment: 'login', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/menu/menu.module#MenuPageModule', name: 'MenuPage', segment: 'menu', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/module-config/module-config.module#ModuleConfigPageModule', name: 'ModuleConfigPage', segment: 'module-config', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/setting-up/setting-up.module#SettingUpPageModule', name: 'setting-up', segment: 'setting-up', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/settings/settings.module#SettingsPageModule', name: 'SettingsPage', segment: 'settings', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../pages/web-settings/web-settings.module#WebSettingsPageModule', name: 'WebSettingsPage', segment: 'web-settings', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-common-module/clearance/clearance.component.module#ClearanceComponentModule', name: 'ClearancePage', segment: 'clearance.component', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-common-module/scanner/scanner-landing/nsp-scanner-landing.module#NspScannerLandingModule', name: 'NspScannerLanding', segment: 'nsp-scanner-landing', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-common-module/scanner/tag-details/nsp-tag-details.module#NspTagDetailsModule', name: 'NspTagDetails', segment: 'nsp-tag-details', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/activitylog/activity.log.module#ActivityLogModule', name: 'ActivityLogComponent', segment: 'activity.log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-activity-log/aql-activity-log.module#AqlActivityLogPageModule', name: 'AqlActivityLogPage', segment: 'aql-activity-log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-department/aql-department.module#AqlDepartmentPageModule', name: 'AqlDepartmentPage', segment: 'aql-department', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-operation/aql-operation.module#AqlOperationPageModule', name: 'AqlOperationPage', segment: 'aql-operation', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-pkg-detail/aql-pkg-detail.module#AqlPkgDetailPageModule', name: 'AqlPkgDetailPage', segment: 'aql-pkg-detail', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/class-one/class-one.module#ClassOnePageModule', name: 'ClassOnePage', segment: 'class-one', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/class-two/class-two.module#ClassTwoPageModule', name: 'ClassTwoPage', segment: 'class-two', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/extrainputpage/extra.input.module#ExtraInputModule', name: 'ExtraInput', segment: 'extra.input', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/grading/grading.module#GradingPageModule', name: 'GradingPage', segment: 'grading', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/location/location.module#LocationPageModule', name: 'LocationPage', segment: 'location', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/recent/recent.module#RecentPageModule', name: 'RecentPage', segment: 'recent', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/rectified/rectified.module#RectifiedPageModule', name: 'RectifiedPage', segment: 'rectified', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/settingPage/setting-view.module#SettingViewModule', name: 'SettingView', segment: 'setting-view', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/station/station.module#StationModule', name: 'StationPage', segment: 'station', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/summary-view/summary.view.module#SummaryViewModule', name: 'SummaryViewComponent', segment: 'summary.view', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/transactionlog/transactionlog.module#TransactionlogPageModule', name: 'TransactionlogPage', segment: 'transactionlog', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-classifi/viewbuilder/view-builder.module#ViewBuilderModule', name: 'ViewBuilder', segment: 'view-builder', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/activitylog/tractivity.log.module#TRActivityLogModule', name: 'TRActivityLog', segment: 'tractivity.log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/settingPage/trsetting-view.module#TRSettingViewModule', name: 'TRSettingView', segment: 'trsetting-view', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-issue/tr-issue.module#TrIssuePageModule', name: 'TrIssuePage', segment: 'tr-issue', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-landing/tr-landing.module#TrLandingPageModule', name: 'TrLandingPage', segment: 'tr-landing', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-recent/tr-recent.module#TrRecentPageModule', name: 'TrRecentPage', segment: 'tr-recent', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-rework/tr-rework.module#TrReworkPageModule', name: 'TrReworkPage', segment: 'tr-rework', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-counting-tracking/transactionlog/trtransaction.log.module#TRTransactionLogModule', name: 'TRTransactionLog', segment: 'trtransaction.log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-dashboard/dashboards-settings/dashboards.settings.module#DashboardSettingComponents', name: 'DashboardSettings', segment: 'dashboards.settings', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-dashboard/landing-page/landing.page.module#DashboardStandPageModule', name: 'DashboardStandPage', segment: 'landing.page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-ngx-packaging/package-landing/package-landing.module#PackageLandingPageModule', name: 'PackageLandingPage', segment: 'package-landing', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkg-grading/pkg-grading.module#PkgGradingModule', name: 'PkgGradingPage', segment: 'pkg-grading', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkg-transaction-log/pkg-transaction-log.module#PkgTransactionLogPageModule', name: 'PkgTransactionLogPage', segment: 'pkg-transaction-log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkgactivitylog/pkg-activity-log.module#ActivityLogModule', name: 'PKGActivityLogComponent', segment: 'pkg-activity-log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkgsettingPage/pkg-setting-view.module#SettingViewModule', name: 'PkgSettingView', segment: 'pkg-setting-view', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-reader/dist/check-data/check-data.module#CheckDataModule', name: 'CheckData', segment: 'check-data', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-reader/dist/nsp-tag/nsp-tag.module#NspTagPageModule', name: 'NspTagPage', segment: 'nsp-tag', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-reader/dist/paired-devices/paired-devices.module#PairedDevicesModule', name: 'PairedDevices', segment: 'paired-devices', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/activity-log-new/activity-log-new.module#ActivityLogNewPageModule', name: 'ActivityLogNewPage', segment: 'activity-log-new', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/activity-log-page/store-activity-log-page.module#ActivityLogPageModule', name: 'StoreActivityLogPage', segment: 'store-activity-log-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/app-switching-page/app-switching-page.module#AppSwitchingPageModule', name: 'AppSwitchingPage', segment: 'app-switching-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/current-status-page/current-status-page.module#CurrentStatusPageModule', name: 'CurrentStatusPage', segment: 'current-status-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/gate-pass-page/gate-pass-page.module#GatePassPageModule', name: 'GatePassPage', segment: 'gate-pass-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/group-view-page/sku-group-page.module#SkuGroupPageModule', name: 'SkuGroupPage', segment: 'sku-group-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/location-page/location-page.module#LocationPageModule', name: 'StoreLocationPage', segment: 'location-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/new-group-page/new-group-page.module#NewGroupPageModule', name: 'NewGroupPage', segment: 'new-group-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/partially-control-page/partially-control-page.module#NewScanPageModule', name: 'PartiallyControlPage', segment: 'partially-control-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/scanned-report-page/scan-report-page.module#ScanReportPageModule', name: 'ScanReportPage', segment: 'scan-report-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/stock-inhand/stock-inhand.module#StockInhandPageModule', name: 'StockInhandPage', segment: 'stock-inhand', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/store-grading/store-grading.module#StoreGradingPageModule', name: 'StoreGradingPage', segment: 'store-grading', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/store-main-page/store-main-page.module#StoreMainPageModule', name: 'StoreMainPage', segment: 'store-main-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/store-settings-page/store-settings-page.module#StoreSettingsPageModule', name: 'StoreSettingsPage', segment: 'store-settings-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/summary-page/summary-page.module#SummaryPageModule', name: 'SummaryPage', segment: 'summary-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/test-page/test-page.module#TestPageModule', name: 'TestPage', segment: 'test-page', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/transaction-log/transaction-log.module#TransactionLogPageModule', name: 'TransactionLogPage', segment: 'transaction-log', priority: 'low', defaultHistory: [] },
                        { loadChildren: '../../node_modules/@ncinga-sp/nsp-store/pages/view-tag-page/view-tag-page.module#ViewTagPageModule', name: 'ViewTagPage', segment: 'view-tag-page', priority: 'low', defaultHistory: [] }
                    ]
                }),
                __WEBPACK_IMPORTED_MODULE_4__ionic_storage__["a" /* IonicStorageModule */].forRoot({
                    name: '__sparkdb',
                    driverOrder: ['indexeddb', 'sqlite', 'websql']
                }),
                __WEBPACK_IMPORTED_MODULE_28__modules_cloud_index__["a" /* CloudModule */].forRoot(cloudSettings),
                __WEBPACK_IMPORTED_MODULE_21__pipes_pipes_module__["a" /* PipesModule */],
                __WEBPACK_IMPORTED_MODULE_13_ngx_logger__["a" /* LoggerModule */].forRoot({
                    level: (__WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */].mode === 'prod') ? __WEBPACK_IMPORTED_MODULE_13_ngx_logger__["c" /* NgxLoggerLevel */].ERROR : __WEBPACK_IMPORTED_MODULE_13_ngx_logger__["c" /* NgxLoggerLevel */].TRACE,
                    serverLogLevel: (__WEBPACK_IMPORTED_MODULE_17__app_env__["a" /* ENV */].mode === 'prod') ? __WEBPACK_IMPORTED_MODULE_13_ngx_logger__["c" /* NgxLoggerLevel */].ERROR : __WEBPACK_IMPORTED_MODULE_13_ngx_logger__["c" /* NgxLoggerLevel */].TRACE,
                }),
                __WEBPACK_IMPORTED_MODULE_27__modules_dynamic_form_dynamic_form_module__["a" /* DynamicFormModule */]
            ],
            bootstrap: [__WEBPACK_IMPORTED_MODULE_7_ionic_angular__["f" /* IonicApp */]],
            entryComponents: [
                __WEBPACK_IMPORTED_MODULE_8__app_component__["a" /* NSPCounting */],
                __WEBPACK_IMPORTED_MODULE_20__pages_appselect_inprogress_Inprogress_component__["a" /* InProgressComponent */],
                __WEBPACK_IMPORTED_MODULE_40__pages_update_modal_update_modal__["a" /* UpdateAlertModal */]
            ],
            providers: [
                __WEBPACK_IMPORTED_MODULE_2__ionic_native_splash_screen__["a" /* SplashScreen */],
                { provide: __WEBPACK_IMPORTED_MODULE_30__ncinga_sp_nsp_app_core_dist__["p" /* VersionManager */], useClass: __WEBPACK_IMPORTED_MODULE_42__providers_deployment_svc_version_manager__["a" /* VersionManagerImpl */] },
                __WEBPACK_IMPORTED_MODULE_11__ionic_native_speech_recognition__["a" /* SpeechRecognition */],
                __WEBPACK_IMPORTED_MODULE_3__ionic_native_status_bar__["a" /* StatusBar */],
                __WEBPACK_IMPORTED_MODULE_10__ionic_native_text_to_speech__["a" /* TextToSpeech */],
                __WEBPACK_IMPORTED_MODULE_18__providers_activation_service_activation_service__["a" /* ActivationService */],
                __WEBPACK_IMPORTED_MODULE_19__providers_activation_service_env_provider__["a" /* EnvProvider */],
                __WEBPACK_IMPORTED_MODULE_26__ionic_native_device__["a" /* Device */],
                __WEBPACK_IMPORTED_MODULE_41__providers_deployment_svc_deployment_svc__["a" /* DeploymentService */],
                __WEBPACK_IMPORTED_MODULE_43__ionic_native_autostart__["a" /* Autostart */],
                // Keep this to enable Ionic's runtime error handling during development
                { provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["ErrorHandler"], useClass: __WEBPACK_IMPORTED_MODULE_7_ionic_angular__["g" /* IonicErrorHandler */] },
                { provide: __WEBPACK_IMPORTED_MODULE_22__ncinga_sp_nsp_app_core_dist_environment_environment_variables_token__["a" /* EnvVariables */], useFactory: environmentFactory, deps: [__WEBPACK_IMPORTED_MODULE_13_ngx_logger__["b" /* NGXLogger */]] },
                { provide: __WEBPACK_IMPORTED_MODULE_25__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__["a" /* AppMasterProvider */], useClass: __WEBPACK_IMPORTED_MODULE_23__providers_app_master_service_app_master_service__["a" /* AppMasterServiceImplementation */] },
                __WEBPACK_IMPORTED_MODULE_24__providers_app_extractor_app_extractor__["a" /* AppExtractorService */],
                __WEBPACK_IMPORTED_MODULE_35__ionic_native_android_full_screen__["a" /* AndroidFullScreen */],
                __WEBPACK_IMPORTED_MODULE_38__ionic_native_file__["a" /* File */],
                __WEBPACK_IMPORTED_MODULE_36__ionic_native_file_transfer__["a" /* FileTransfer */],
                __WEBPACK_IMPORTED_MODULE_39__ionic_native_screen_orientation__["a" /* ScreenOrientation */],
                __WEBPACK_IMPORTED_MODULE_37__ionic_native_zip__["a" /* Zip */]
            ]
        })
    ], AppModule);
    return AppModule;
}());

//# sourceMappingURL=app.module.js.map

/***/ }),

/***/ 112:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActivationService; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_rxjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_rxjs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ionic_storage__ = __webpack_require__(37);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__env_provider__ = __webpack_require__(376);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ionic_native_device__ = __webpack_require__(178);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_angular2_jwt__ = __webpack_require__(179);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_angular2_jwt___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_angular2_jwt__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utill_app_utill__ = __webpack_require__(1305);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};










var uuidv4 = __webpack_require__(183);
/*
 Generated class for the ActivationService provider.

 See https://angular.io/guide/dependency-injection for more info on providers
 and Angular DI.
 */
var ActivationService = /** @class */ (function () {
    function ActivationService(http, logger, storage, envPro, device, settings) {
        this.http = http;
        this.logger = logger;
        this.storage = storage;
        this.envPro = envPro;
        this.device = device;
        this.settings = settings;
        this.APP_ACTIVATION_TOKEN = 'nsp_act_tkn';
        this.httpOptions = {
            headers: new __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["c" /* HttpHeaders */]({
                'Content-Type': 'application/json'
            })
        };
        this.deviceId = 'web_' + uuidv4();
        this.licenseKeys = {};
        this.jwtHelper = new __WEBPACK_IMPORTED_MODULE_7_angular2_jwt__["JwtHelper"]();
        this.logger.log('Hello ActivationService Provider');
    }
    ActivationService.prototype.isActivated = function () {
        // Check if there's an unexpired JWT
        // It searches for an item in localStorage with key == 'bs_token'
        // return tokenNotExpired('', this.token);
        var _this = this;
        if (this.gatePass) {
            var totalValidLicense_1 = 0;
            if (this.gatePass.apps_tkns) {
                this.gatePass.apps_tkns.forEach(function (license) {
                    if (Object(__WEBPACK_IMPORTED_MODULE_7_angular2_jwt__["tokenNotExpired"])('', license.token)) {
                        var decodedToken = _this.jwtHelper.decodeToken(license.token);
                        _this.licenseKeys[decodedToken['product_type']] = decodedToken['license_key'];
                        totalValidLicense_1++;
                    }
                });
                if (this.gatePass.apps_tkns.length === totalValidLicense_1) {
                    return true;
                }
            }
            else {
                return false;
            }
        }
        else {
            return false;
        }
    };
    ActivationService.prototype.setInstalledApp = function (app) {
        this.installedApp = app;
        var ptypes = {};
        this.installedApp.apps.forEach(function (item) {
            ptypes[item.product_type] = item.version;
        });
        //noinspection TypeScriptUnresolvedFunction
        this.settings.setValue('versions', ptypes).then(function (res) {
        });
    };
    ActivationService.prototype.getInitConfigs = function () {
        var requiredInputs = [];
        try {
            this.installedApp.apps.forEach(function (app) {
                if (app.pre_settings) {
                    requiredInputs.push({
                        app_id: app.id,
                        app_name: app.app_name,
                        product_type: app.product_type,
                        settings: app.pre_settings
                    });
                }
                /*  app.modules.forEach(module => {
                 if (module.init_args) {
                 module.init_args.forEach(arg => {
                 requiredInputs.push(arg);
                 });
                 }
                 });*/
            });
        }
        catch (e) {
            this.logger.error(e);
        }
        return requiredInputs;
    };
    ActivationService.prototype.isActivationModuleReady = function () {
        var _this = this;
        var result = __WEBPACK_IMPORTED_MODULE_3_rxjs__["Observable"].create(function (observer) {
            _this.storage.get(_this.APP_ACTIVATION_TOKEN).then(function (tk) {
                if (tk) {
                    _this.gatePass = tk;
                    _this.token = tk.tkn;
                    _this.logger.debug('activation token found ' + _this.token);
                    observer.next('completed');
                    observer.complete();
                }
                else {
                    observer.error();
                }
            }, function () {
                observer.error();
            });
        });
        return result;
    };
    ActivationService.prototype.setLicense = function (arr) {
        this.issuedLicence = arr;
        return this.storage.set(this.APP_ACTIVATION_TOKEN, { tkn: this.token, apps_tkns: arr });
    };
    ActivationService.prototype.doActivate = function (code) {
        this.token = code;
        return this.storage.set(this.APP_ACTIVATION_TOKEN, { tkn: code });
    };
    ActivationService.prototype.resetTokens = function () {
        return this.storage.set(this.APP_ACTIVATION_TOKEN, { tkn: this.token, apps_tkns: this.issuedLicence });
    };
    ActivationService.prototype.verifyToken = function (code) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].VALIDATE_TOKEN);
        return this.http.post(url, JSON.stringify({ token: code }), this.httpOptions);
    };
    ActivationService.prototype.getAvailableApps = function () {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].GET_APPSFOR_TENAN);
        return this.http.post(url, JSON.stringify({ act_tkn: this.token }), this.httpOptions);
    };
    ActivationService.prototype.getAppConfig = function (appMasterId) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].GET_APP_MASTER);
        return this.http.post(url, JSON.stringify({ act_tkn: this.token, appmasterid: appMasterId }), this.httpOptions);
    };
    ActivationService.prototype.removeApp = function () {
        // remove app tokens
        return this.storage.remove(this.APP_ACTIVATION_TOKEN);
        // send dealocate license to server
    };
    ActivationService.prototype.registerAgentApp = function (apps) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].ACTIVATE_APP);
        /*
         *{
         'app_master_id': '',
         'teant' : '',
         'cluster' :'',
         'factory' :'',
         'dept':'',
         'lines' :[],
         'app_name' : 'Packing Qc',
         'mac_add' : '1A234Adsafsf2323',
         }
         *
         * */
        var device = (this.device.serial === 'unknown' || this.device.serial === null) ? this.deviceId : this.device.serial;
        var date = new Date();
        var stringTz = __WEBPACK_IMPORTED_MODULE_8__utill_app_utill__["a" /* tzdetect */].matches('9999')[0]; // Intl.DateTimeFormat().resolvedOptions().timeZone;
        return this.http.post(url, JSON.stringify({
            act_tkn: this.token,
            apps: apps,
            mac_add: device,
            timezone: stringTz,
            timezoneOffset: date.getTimezoneOffset()
        }), this.httpOptions);
    };
    ActivationService.prototype.acknowledgeAgent = function (apps, updatetype) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].CLIENT_PROFILE_ACK);
        var deviceMac = (this.device.serial === 'unknown' || this.device.serial === null) ? this.deviceId : this.device.serial;
        return this.http.post(url, JSON.stringify({
            act_tkn: this.token,
            device_info: {
                'mac_add': deviceMac,
                'os': this.device.platform || 'web',
                'os_version': this.device.cordova || 'web',
                'browser_type': 'Chrome',
                'browser_version': this.device.version || '0.0.0',
                'model': this.device.model || 'web',
                'manufacturer': this.device.manufacturer || 'web',
                'serial_no': deviceMac
            },
            app_configs: apps,
            type: updatetype
        }), this.httpOptions);
    };
    ActivationService.prototype.checkUpdateAvailability = function (data) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].UPDATE_DETAILS);
        return this.http.post(url, JSON.stringify(data), this.httpOptions);
    };
    /*
     * get supporting data for app presettings
     * */
    ActivationService.prototype.getPreSettingsData = function (tenantId, subject_key, params) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].SUPPORTING_DATA);
        var ptypes = [];
        this.installedApp.apps.forEach(function (app) {
            ptypes.push(app.product_type);
        });
        var msgBody = {
            tenant: tenantId,
            subject_key: subject_key,
            app_types: ptypes,
            context: 'app'
        };
        return this.http.post(url, JSON.stringify(msgBody), this.httpOptions);
    };
    /*
     * get supporting data for app presettings
     * */
    ActivationService.prototype.getFinalizedAppData = function (tenantId, subject_key, ptype, context) {
        var url = this.envPro.getEnvVar(__WEBPACK_IMPORTED_MODULE_5__env_provider__["b" /* MainServiceEndPoints */].SUPPORTING_DATA);
        var msgBody = {
            tenant: tenantId,
            subject_key: subject_key,
            app_types: [ptype],
            context: 'bctx'
        };
        return this.http.post(url, JSON.stringify(msgBody), this.httpOptions);
    };
    ActivationService.prototype.getLicenseKey = function (productType) {
        return this.licenseKeys[productType];
    };
    ActivationService.prototype.setLicenseKey = function (licenseKeys) {
        this.licenseKeys = licenseKeys;
    };
    ActivationService.prototype.removeActivation = function () {
        this.settings.setValue(this.APP_ACTIVATION_TOKEN, {});
    };
    ActivationService = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"])(),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */],
            __WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_4__ionic_storage__["b" /* Storage */],
            __WEBPACK_IMPORTED_MODULE_5__env_provider__["a" /* EnvProvider */],
            __WEBPACK_IMPORTED_MODULE_6__ionic_native_device__["a" /* Device */], __WEBPACK_IMPORTED_MODULE_9__ncinga_sp_nsp_app_core_dist__["o" /* Settings */]])
    ], ActivationService);
    return ActivationService;
}());

//# sourceMappingURL=activation-service.js.map

/***/ }),

/***/ 1305:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tzdetect; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment_timezone__ = __webpack_require__(1306);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment_timezone___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_moment_timezone__);
/**
 * Created by shadeeka on 6/15/18.
 */

var tzdetect = {
    names: __WEBPACK_IMPORTED_MODULE_0_moment_timezone___default.a.tz.names(),
    matches: function (base) {
        var results = [], now = Date.now(), makekey = function (id) {
            return [0, 4, 8, -5 * 12, 4 - 5 * 12, 8 - 5 * 12, 4 - 2 * 12, 8 - 2 * 12].map(function (months) {
                var m = __WEBPACK_IMPORTED_MODULE_0_moment_timezone___default()(now + months * 30 * 24 * 60 * 60 * 1000);
                if (id) {
                    m.tz(id);
                }
                return m.format('DDHHmm');
            }).join(' ');
        }, lockey = makekey(base);
        tzdetect.names.forEach(function (id) {
            if (makekey(id) === lockey) {
                results.push(id);
            }
        });
        return results;
    }
};
//# sourceMappingURL=app.utill.js.map

/***/ }),

/***/ 1308:
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./af": 555,
	"./af.js": 555,
	"./ar": 556,
	"./ar-dz": 557,
	"./ar-dz.js": 557,
	"./ar-kw": 558,
	"./ar-kw.js": 558,
	"./ar-ly": 559,
	"./ar-ly.js": 559,
	"./ar-ma": 560,
	"./ar-ma.js": 560,
	"./ar-sa": 561,
	"./ar-sa.js": 561,
	"./ar-tn": 562,
	"./ar-tn.js": 562,
	"./ar.js": 556,
	"./az": 563,
	"./az.js": 563,
	"./be": 564,
	"./be.js": 564,
	"./bg": 565,
	"./bg.js": 565,
	"./bm": 566,
	"./bm.js": 566,
	"./bn": 567,
	"./bn.js": 567,
	"./bo": 568,
	"./bo.js": 568,
	"./br": 569,
	"./br.js": 569,
	"./bs": 570,
	"./bs.js": 570,
	"./ca": 571,
	"./ca.js": 571,
	"./cs": 572,
	"./cs.js": 572,
	"./cv": 573,
	"./cv.js": 573,
	"./cy": 574,
	"./cy.js": 574,
	"./da": 575,
	"./da.js": 575,
	"./de": 576,
	"./de-at": 577,
	"./de-at.js": 577,
	"./de-ch": 578,
	"./de-ch.js": 578,
	"./de.js": 576,
	"./dv": 579,
	"./dv.js": 579,
	"./el": 580,
	"./el.js": 580,
	"./en-au": 581,
	"./en-au.js": 581,
	"./en-ca": 582,
	"./en-ca.js": 582,
	"./en-gb": 583,
	"./en-gb.js": 583,
	"./en-ie": 584,
	"./en-ie.js": 584,
	"./en-il": 585,
	"./en-il.js": 585,
	"./en-nz": 586,
	"./en-nz.js": 586,
	"./eo": 587,
	"./eo.js": 587,
	"./es": 588,
	"./es-do": 589,
	"./es-do.js": 589,
	"./es-us": 590,
	"./es-us.js": 590,
	"./es.js": 588,
	"./et": 591,
	"./et.js": 591,
	"./eu": 592,
	"./eu.js": 592,
	"./fa": 593,
	"./fa.js": 593,
	"./fi": 594,
	"./fi.js": 594,
	"./fo": 595,
	"./fo.js": 595,
	"./fr": 596,
	"./fr-ca": 597,
	"./fr-ca.js": 597,
	"./fr-ch": 598,
	"./fr-ch.js": 598,
	"./fr.js": 596,
	"./fy": 599,
	"./fy.js": 599,
	"./gd": 600,
	"./gd.js": 600,
	"./gl": 601,
	"./gl.js": 601,
	"./gom-latn": 602,
	"./gom-latn.js": 602,
	"./gu": 603,
	"./gu.js": 603,
	"./he": 604,
	"./he.js": 604,
	"./hi": 605,
	"./hi.js": 605,
	"./hr": 606,
	"./hr.js": 606,
	"./hu": 607,
	"./hu.js": 607,
	"./hy-am": 608,
	"./hy-am.js": 608,
	"./id": 609,
	"./id.js": 609,
	"./is": 610,
	"./is.js": 610,
	"./it": 611,
	"./it.js": 611,
	"./ja": 612,
	"./ja.js": 612,
	"./jv": 613,
	"./jv.js": 613,
	"./ka": 614,
	"./ka.js": 614,
	"./kk": 615,
	"./kk.js": 615,
	"./km": 616,
	"./km.js": 616,
	"./kn": 617,
	"./kn.js": 617,
	"./ko": 618,
	"./ko.js": 618,
	"./ky": 619,
	"./ky.js": 619,
	"./lb": 620,
	"./lb.js": 620,
	"./lo": 621,
	"./lo.js": 621,
	"./lt": 622,
	"./lt.js": 622,
	"./lv": 623,
	"./lv.js": 623,
	"./me": 624,
	"./me.js": 624,
	"./mi": 625,
	"./mi.js": 625,
	"./mk": 626,
	"./mk.js": 626,
	"./ml": 627,
	"./ml.js": 627,
	"./mn": 628,
	"./mn.js": 628,
	"./mr": 629,
	"./mr.js": 629,
	"./ms": 630,
	"./ms-my": 631,
	"./ms-my.js": 631,
	"./ms.js": 630,
	"./mt": 632,
	"./mt.js": 632,
	"./my": 633,
	"./my.js": 633,
	"./nb": 634,
	"./nb.js": 634,
	"./ne": 635,
	"./ne.js": 635,
	"./nl": 636,
	"./nl-be": 637,
	"./nl-be.js": 637,
	"./nl.js": 636,
	"./nn": 638,
	"./nn.js": 638,
	"./pa-in": 639,
	"./pa-in.js": 639,
	"./pl": 640,
	"./pl.js": 640,
	"./pt": 641,
	"./pt-br": 642,
	"./pt-br.js": 642,
	"./pt.js": 641,
	"./ro": 643,
	"./ro.js": 643,
	"./ru": 644,
	"./ru.js": 644,
	"./sd": 645,
	"./sd.js": 645,
	"./se": 646,
	"./se.js": 646,
	"./si": 647,
	"./si.js": 647,
	"./sk": 648,
	"./sk.js": 648,
	"./sl": 649,
	"./sl.js": 649,
	"./sq": 650,
	"./sq.js": 650,
	"./sr": 651,
	"./sr-cyrl": 652,
	"./sr-cyrl.js": 652,
	"./sr.js": 651,
	"./ss": 653,
	"./ss.js": 653,
	"./sv": 654,
	"./sv.js": 654,
	"./sw": 655,
	"./sw.js": 655,
	"./ta": 656,
	"./ta.js": 656,
	"./te": 657,
	"./te.js": 657,
	"./tet": 658,
	"./tet.js": 658,
	"./tg": 659,
	"./tg.js": 659,
	"./th": 660,
	"./th.js": 660,
	"./tl-ph": 661,
	"./tl-ph.js": 661,
	"./tlh": 662,
	"./tlh.js": 662,
	"./tr": 663,
	"./tr.js": 663,
	"./tzl": 664,
	"./tzl.js": 664,
	"./tzm": 665,
	"./tzm-latn": 666,
	"./tzm-latn.js": 666,
	"./tzm.js": 665,
	"./ug-cn": 667,
	"./ug-cn.js": 667,
	"./uk": 668,
	"./uk.js": 668,
	"./ur": 669,
	"./ur.js": 669,
	"./uz": 670,
	"./uz-latn": 671,
	"./uz-latn.js": 671,
	"./uz.js": 670,
	"./vi": 672,
	"./vi.js": 672,
	"./x-pseudo": 673,
	"./x-pseudo.js": 673,
	"./yo": 674,
	"./yo.js": 674,
	"./zh-cn": 675,
	"./zh-cn.js": 675,
	"./zh-hk": 676,
	"./zh-hk.js": 676,
	"./zh-tw": 677,
	"./zh-tw.js": 677
};
function webpackContext(req) {
	return __webpack_require__(webpackContextResolve(req));
};
function webpackContextResolve(req) {
	var id = map[req];
	if(!(id + 1)) // check for number or string
		throw new Error("Cannot find module '" + req + "'.");
	return id;
};
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = 1308;

/***/ }),

/***/ 1321:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GroupFilterPipe; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

/**
 * Generated class for the GroupFilterPipe pipe.
 *
 * See https://angular.io/api/core/Pipe for more info on Angular Pipes.
 */
var GroupFilterPipe = /** @class */ (function () {
    function GroupFilterPipe() {
    }
    /**
     * Takes a value and makes it lowercase.
     */
    GroupFilterPipe.prototype.transform = function (items, term) {
        // I am unsure what id is here. did you mean title?
        return items.filter(function (item) { return item.labels.indexOf(term) !== -1; });
    };
    GroupFilterPipe = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Pipe"])({
            name: 'groupFilter',
        })
    ], GroupFilterPipe);
    return GroupFilterPipe;
}());

//# sourceMappingURL=group-filter.js.map

/***/ }),

/***/ 1322:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DynamicFieldDirective; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_forms__ = __webpack_require__(23);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__form_button_form_button_component__ = __webpack_require__(699);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__form_input_form_input_component__ = __webpack_require__(700);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__form_select_form_select_component__ = __webpack_require__(701);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__filtering_select_filtering_select__ = __webpack_require__(702);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};






var components = {
    button: __WEBPACK_IMPORTED_MODULE_2__form_button_form_button_component__["a" /* FormButtonComponent */],
    input: __WEBPACK_IMPORTED_MODULE_3__form_input_form_input_component__["a" /* FormInputComponent */],
    select: __WEBPACK_IMPORTED_MODULE_4__form_select_form_select_component__["a" /* FormSelectComponent */],
    filterselect: __WEBPACK_IMPORTED_MODULE_5__filtering_select_filtering_select__["a" /* FormFilterSelectComponent */]
};
var DynamicFieldDirective = /** @class */ (function () {
    function DynamicFieldDirective(resolver, container) {
        this.resolver = resolver;
        this.container = container;
    }
    DynamicFieldDirective.prototype.ngOnChanges = function () {
        if (this.component) {
            this.component.instance.config = this.config;
            this.component.instance.group = this.group;
        }
    };
    DynamicFieldDirective.prototype.ngOnInit = function () {
        if (!components[this.config.type]) {
            var supportedTypes = Object.keys(components).join(', ');
            throw new Error("Trying to use an unsupported type (" + this.config.type + ").\n        Supported types: " + supportedTypes);
        }
        var component = this.resolver.resolveComponentFactory(components[this.config.type]);
        this.component = this.container.createComponent(component);
        this.component.instance.config = this.config;
        this.component.instance.group = this.group;
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
        __metadata("design:type", Object)
    ], DynamicFieldDirective.prototype, "config", void 0);
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_1__angular_forms__["FormGroup"])
    ], DynamicFieldDirective.prototype, "group", void 0);
    DynamicFieldDirective = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Directive"])({
            selector: '[dynamicField]'
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_core__["ComponentFactoryResolver"],
            __WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewContainerRef"]])
    ], DynamicFieldDirective);
    return DynamicFieldDirective;
}());

//# sourceMappingURL=dynamic-field.directive.js.map

/***/ }),

/***/ 1452:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return NSPCounting; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ionic_native_splash_screen__ = __webpack_require__(214);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(402);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ngx_translate_core__ = __webpack_require__(86);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist_cache_settings__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_app_state__ = __webpack_require__(27);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist_auth_auth_provider__ = __webpack_require__(91);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ncinga_sp_nsp_app_core_dist_providers_application_manager__ = __webpack_require__(288);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_activation_service_activation_service__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__providers_app_extractor_app_extractor__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__ = __webpack_require__(51);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__ionic_native_android_full_screen__ = __webpack_require__(978);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__ionic_native_screen_orientation__ = __webpack_require__(378);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__ = __webpack_require__(11);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__providers_deployment_svc_deployment_svc__ = __webpack_require__(356);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__pages_update_modal_update_modal__ = __webpack_require__(979);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__ionic_native_autostart__ = __webpack_require__(980);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__ng_idle_core__ = __webpack_require__(357);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};




















var NSPCounting = /** @class */ (function () {
    function NSPCounting(translate, platformSvc, settings, config, statusBar, logger, splashScreen, menuCtrl, appSvc, appMgr, authService, actSvc, appBuilder, appMasterSvc, depSvc, modalCtrl, androidFullScreen, autostart, idle, screenOrientation, loadingCtrl) {
        var _this = this;
        this.translate = translate;
        this.platformSvc = platformSvc;
        this.settings = settings;
        this.config = config;
        this.statusBar = statusBar;
        this.logger = logger;
        this.splashScreen = splashScreen;
        this.menuCtrl = menuCtrl;
        this.appSvc = appSvc;
        this.appMgr = appMgr;
        this.authService = authService;
        this.actSvc = actSvc;
        this.appBuilder = appBuilder;
        this.appMasterSvc = appMasterSvc;
        this.depSvc = depSvc;
        this.modalCtrl = modalCtrl;
        this.androidFullScreen = androidFullScreen;
        this.autostart = autostart;
        this.idle = idle;
        this.screenOrientation = screenOrientation;
        this.loadingCtrl = loadingCtrl;
        this.rootPage = 'setting-up';
        this.params = {};
        /*
         * Todo get pages from menu provider : purchased modules
         * */
        this.pages = [
            { title: 'Home', component: 'AppLandingPage', icon: 'home' },
            { title: 'Hot Updates', component: 'CheckUpdatePage', icon: 'search' }
        ];
        this.menuModel = [];
        this.androidFullScreen.isImmersiveModeSupported()
            .then(function () { return _this.androidFullScreen.immersiveMode(); })
            .catch(function (error) { return _this.logger.log(error); });
        this.autostart.enable();
        this.platformSvc.ready().then(function () {
            _this.logger.info('ROOT: starting app');
            // Okay, so the platform is ready and our plugins are available.
            // Here you can do any higher level native things you might need.
            _this.statusBar.styleDefault();
            _this.splashScreen.hide();
            _this.setupLocalStorage().then(function (result) {
                _this.initApp();
                //noinspection TypeScriptUnresolvedFunction
                _this.settings.getValue('orientation').then(function (res) {
                    if (res) {
                        _this.logger.debug('app orientation :', res);
                        _this.screenOrientation.lock(res);
                    }
                });
                _this.depSvc.init();
            });
            _this.startIdleTimeTracker();
            _this.appMasterSvc.init();
        });
        this.initTranslate();
    }
    NSPCounting.prototype.initTranslate = function () {
        var _this = this;
        // Set the default language for translation strings, and the current language.
        this.translate.setDefaultLang('en');
        var browserLang = this.translate.getBrowserLang();
        if (browserLang) {
            if (browserLang === 'zh') {
                var browserCultureLang = this.translate.getBrowserCultureLang();
                if (browserCultureLang.match(/-CN|CHS|Hans/i)) {
                    this.translate.use('zh-cmn-Hans');
                }
                else if (browserCultureLang.match(/-TW|CHT|Hant/i)) {
                    this.translate.use('zh-cmn-Hant');
                }
            }
            else {
                this.translate.use(this.translate.getBrowserLang());
            }
        }
        else {
            this.translate.use('en'); // Set your language here
        }
        this.translate.get(['BACK_BUTTON_TEXT']).subscribe(function (values) {
            _this.config.set('ios', 'backButtonText', values.BACK_BUTTON_TEXT);
        });
    };
    NSPCounting.prototype.initApp = function () {
        var _this = this;
        /*
         * pause and resume handlers
         * */
        this.appMgr.setupDeviceId();
        this.onPauseSubscription = this.platformSvc.pause.subscribe(function () {
            // do something meaningful when the app is put in the foreground
        });
        this.onResumeSubscription = this.platformSvc.resume.subscribe(function () {
            // do something meaningful when the app is active
            _this.appSvc.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].IDLE_TIMEOUT, Math.random());
        });
        this._subscriber = this.appSvc.subscribe(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_CHANGE, function (res) {
            _this.logger.debug(res);
            if (res) {
                var lo = _this.appBuilder.changeApp(res['product_type'], res['id']);
                if (lo) {
                    _this.doChangeApp();
                }
            }
        });
        if (location.pathname.includes('web')) {
            //  if (!this.platformSvc.is('cordova')) {
            this.nav.setRoot('WebSettingsPage', { conf: {} }, { animate: true });
        }
        else {
            // check whether app is properly activated
            this.actSvc.isActivationModuleReady().subscribe(function (res) {
                _this.logger.debug('Activation Module Ready');
            }, function () {
                _this.rootPage = 'ActivationPage';
            }, function () {
                if (_this.actSvc.isActivated()) {
                    // load app master
                    _this.appBuilder.loadAppMaster();
                    _this.menuModel = _this.appBuilder.getMainNavigation();
                    _this.authService.isAuthModuleReady().subscribe(function (x) {
                        _this.logger.debug('Authentication Module Ready');
                    }, function (e) {
                        _this.rootPage = 'LoginPage';
                    }, function () {
                        if (_this.authService.authenticated()) {
                            /* go to landing page of main module*/
                            _this.selectAndOpenPage();
                        }
                        else {
                            _this.rootPage = 'LoginPage';
                        }
                    });
                }
                else {
                    _this.rootPage = 'ActivationPage';
                }
            });
        }
        this.appSvc.subscribe('LOGIN_SUCCESSFUL', function (e) {
            /*
             * TODO: initialize all app functions
             * */
            _this.appSvc.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].IDLE_TIMEOUT, Math.random());
            _this.selectAndOpenPage();
        });
    };
    NSPCounting.prototype.setupLocalStorage = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: 
                    /*
                     * IMPORTANT : to keep app wait until it loads app profile from localstorage
                     * */
                    return [4 /*yield*/, this.settings.load().then(function (res) {
                        })];
                    case 1:
                        /*
                         * IMPORTANT : to keep app wait until it loads app profile from localstorage
                         * */
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    NSPCounting.prototype.openPage = function (page, app) {
        this.menuCtrl.close();
        // Reset the content nav to have just this page
        // we wouldn't want the back button to show in this scenario
        if (this.appBuilder.isSameApp(app['app_id'], app['product_type'])) {
            this.nav.setRoot(page.component, { conf: page.args }, { animate: true });
        }
        else {
            this.logger.debug('switch the module');
            this.appSvc.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].APP_CHANGE, { id: app['app_id'], product_type: app['product_type'] });
        }
    };
    NSPCounting.prototype.openSubPage = function (pageName, page) {
        this.menuCtrl.close();
        this.nav.push(pageName, { conf: page.args }, { animate: true });
    };
    NSPCounting.prototype.selectAndOpenPage = function () {
        return __awaiter(this, void 0, void 0, function () {
            var landing;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.appBuilder.loadAppMaster();
                        this.menuModel = this.appBuilder.getMainNavigation();
                        landing = this.appBuilder.getStartingPage();
                        return [4 /*yield*/, this.appMgr.init()];
                    case 1:
                        _a.sent();
                        this.logger.debug('============= START MAIN PAGE NAVIGATION 0 ===========');
                        this.doInitializeApp();
                        // setTimeout(()=>{
                        this.nav.setRoot(landing.component, { conf: landing.args }, { animate: true, direction: 'forward' });
                        this.logger.debug('============= START MAIN PAGE NAVIGATION 1 ===========');
                        return [2 /*return*/];
                }
            });
        });
    };
    /*
     * do app initializations after login
     * */
    NSPCounting.prototype.doInitializeApp = function () {
        var _this = this;
        if (this.platformSvc.is('cordova')) {
            this.depSvc.getUpdateDetails().subscribe(function (res) {
                _this.logger.debug('============ UPDATE CHECK Result==========');
                _this.logger.debug(res);
                if (res['isUpdateAvailable']) {
                    var updateM = _this.modalCtrl.create(__WEBPACK_IMPORTED_MODULE_17__pages_update_modal_update_modal__["a" /* UpdateAlertModal */], {
                        result: res
                    }, { cssClass: 'modal-update', enableBackdropDismiss: false });
                    updateM.present();
                }
            });
        }
        this.appMgr.initCommunicationChannel();
    };
    NSPCounting.prototype.doChangeApp = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            var loader;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        loader = this.loadingCtrl.create({
                            content: 'Please wait...'
                        });
                        loader.present();
                        return [4 /*yield*/, this.appMgr.init()];
                    case 1:
                        _a.sent();
                        this.logger.debug('============= START CHANGE APP NAVIGATION 0 ===========');
                        setTimeout(function () {
                            loader.dismiss();
                            var landing = _this.appBuilder.getStartingPage();
                            _this.nav.popToRoot();
                            _this.nav.setRoot(landing.component, { conf: landing.args }, { animate: true, direction: 'forward' });
                            _this.logger.debug('============= START CHANGE APP NAVIGATION 1 ===========');
                        }, 2000);
                        return [2 /*return*/];
                }
            });
        });
    };
    NSPCounting.prototype.doLogout = function () {
        this.authService.logout();
        this.appMgr.closeAppSession();
        this.nav.setRoot('LoginPage', null, { animate: true });
    };
    // This is to notify the idle app reset
    NSPCounting.prototype.startIdleTimeTracker = function () {
        var _this = this;
        // sets an idle timeout of 5 seconds, for testing purposes.
        this.idle.setIdle(30);
        // sets a timeout period of 5 seconds. after 10 seconds of inactivity, the user will be considered timed out.
        this.idle.setTimeout(1);
        // sets the default interrupts, in this case, things like clicks, scrolls, touches to the document
        this.idle.setInterrupts(__WEBPACK_IMPORTED_MODULE_19__ng_idle_core__["a" /* DEFAULT_INTERRUPTSOURCES */]);
        this.idle.onIdleEnd.subscribe(function () { return _this.idleState = 'No longer idle.'; });
        this.idle.onTimeout.subscribe(function () {
            _this.timedOut = true;
            _this.appSvc.notifyDataChanged(__WEBPACK_IMPORTED_MODULE_15__ncinga_sp_nsp_app_core_dist_providers_app_events__["b" /* APPEvents */].IDLE_TIMEOUT, Math.random());
            _this._resetTimer();
        });
        this._resetTimer();
    };
    NSPCounting.prototype._resetTimer = function () {
        this.idle.watch();
        this.timedOut = false;
    };
    NSPCounting.prototype.ngOnDestroy = function () {
        try {
            this.onPauseSubscription.unsubscribe();
            this.onResumeSubscription.unsubscribe();
            this.appSvc.unsubscribeMe(this._subscriber);
        }
        catch (e) {
        }
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["ViewChild"])(__WEBPACK_IMPORTED_MODULE_4_ionic_angular__["n" /* Nav */]),
        __metadata("design:type", __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["n" /* Nav */])
    ], NSPCounting.prototype, "nav", void 0);
    NSPCounting = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            template: "<ion-menu [content]=\"content\" [swipeEnabled]=\"false\" class=\"main-menu\">\n    <ion-header class=\"menu-header\" color=\"header\">\n     <ion-item>\n    <ion-thumbnail item-start>\n      <img src=\"assets/img/nfactory.png\">\n    </ion-thumbnail>\n  </ion-item>\n    </ion-header>\n    <ion-content>\n      <ion-list  *ngFor=\"let p of menuModel\">\n        <ion-list-header class=\"main-header\">{{p.name}}</ion-list-header>\n        <ion-item color=\"header\"  ion-item *ngFor=\"let m of p.children\">\n          <div  (tap)=\"openPage(m,p)\" >\n         <ion-icon class=\"menu-icon\" [name]=\"m.icon\"></ion-icon> {{m.title}}\n        </div>\n        <ion-icon item-end *ngIf=\"m.setting\"  name=\"settings\" (tap)=\"openSubPage(m.setting.component,m.setting)\"></ion-icon>\n        </ion-item>\n      </ion-list>\n    </ion-content>\n    <ion-footer class=\"menu-footer\" color=\"header\">\n    <ion-segment  color=\"header\">\n      <ion-segment-button (click)=\"doLogout()\" menuClose color=\"header\">\n        Sign Out <ion-icon name=\"log-out\"></ion-icon>\n      </ion-segment-button>\n      <ion-segment-button menuClose (click)=\"openSubPage('SettingsPage',{})\" color=\"header\">\n        Settings <ion-icon name=\"settings\"></ion-icon>\n      </ion-segment-button>\n    </ion-segment>\n  </ion-footer>\n  </ion-menu>\n  <ion-nav #content [root]=\"rootPage\" [rootParams]=\"params\"></ion-nav>"
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_3__ngx_translate_core__["c" /* TranslateService */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["r" /* Platform */],
            __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist_cache_settings__["a" /* Settings */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["c" /* Config */],
            __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */],
            __WEBPACK_IMPORTED_MODULE_11_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_1__ionic_native_splash_screen__["a" /* SplashScreen */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["l" /* MenuController */],
            __WEBPACK_IMPORTED_MODULE_6__ncinga_sp_nsp_app_core_dist_providers_app_state__["a" /* ApplicationService */],
            __WEBPACK_IMPORTED_MODULE_8__ncinga_sp_nsp_app_core_dist_providers_application_manager__["a" /* ApplicationManager */],
            __WEBPACK_IMPORTED_MODULE_7__ncinga_sp_nsp_app_core_dist_auth_auth_provider__["a" /* AuthProvider */],
            __WEBPACK_IMPORTED_MODULE_9__providers_activation_service_activation_service__["a" /* ActivationService */],
            __WEBPACK_IMPORTED_MODULE_10__providers_app_extractor_app_extractor__["a" /* AppExtractorService */],
            __WEBPACK_IMPORTED_MODULE_12__ncinga_sp_nsp_app_core_dist_providers_app_master_provider__["a" /* AppMasterProvider */],
            __WEBPACK_IMPORTED_MODULE_16__providers_deployment_svc_deployment_svc__["a" /* DeploymentService */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["m" /* ModalController */],
            __WEBPACK_IMPORTED_MODULE_13__ionic_native_android_full_screen__["a" /* AndroidFullScreen */],
            __WEBPACK_IMPORTED_MODULE_18__ionic_native_autostart__["a" /* Autostart */],
            __WEBPACK_IMPORTED_MODULE_19__ng_idle_core__["b" /* Idle */],
            __WEBPACK_IMPORTED_MODULE_14__ionic_native_screen_orientation__["a" /* ScreenOrientation */],
            __WEBPACK_IMPORTED_MODULE_4_ionic_angular__["k" /* LoadingController */]])
    ], NSPCounting);
    return NSPCounting;
}());

//# sourceMappingURL=app.component.js.map

/***/ }),

/***/ 1460:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponentsModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_header__ = __webpack_require__(1461);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_application_context__ = __webpack_require__(29);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
/**
 * Created by shadeeka on 2/26/18.
 */





var AppComponentsModule = /** @class */ (function () {
    function AppComponentsModule() {
    }
    AppComponentsModule = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_3__angular_core__["NgModule"])({
            declarations: [
                __WEBPACK_IMPORTED_MODULE_2__app_header__["a" /* AppHeader */]
            ],
            imports: [
                __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* IonicModule */],
                __WEBPACK_IMPORTED_MODULE_0__angular_common_http__["b" /* HttpClientModule */]
            ],
            entryComponents: [],
            exports: [
                __WEBPACK_IMPORTED_MODULE_2__app_header__["a" /* AppHeader */]
            ],
            providers: [
                __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_application_context__["a" /* ApplicationContext */]
            ]
        })
    ], AppComponentsModule);
    return AppComponentsModule;
}());

//# sourceMappingURL=app.component.module.js.map

/***/ }),

/***/ 1461:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppHeader; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist_providers_application_context__ = __webpack_require__(29);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
 * Created by shadeeka on 2/26/18.
 */



var AppHeader = /** @class */ (function () {
    function AppHeader(alertCtrl, appCtx) {
        this.alertCtrl = alertCtrl;
        this.appCtx = appCtx;
    }
    AppHeader.prototype.ngAfterViewInit = function () {
    };
    AppHeader.prototype.changeStation = function () {
    };
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
        __metadata("design:type", String)
    ], AppHeader.prototype, "title", void 0);
    __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Input"])(),
        __metadata("design:type", Object)
    ], AppHeader.prototype, "selectedStation", void 0);
    AppHeader = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'app-header',
            template: "<ion-navbar color=\"primary\">\n        <button ion-button menuToggle>\n            <ion-icon name=\"menu\"></ion-icon>\n        </button>\n        <ion-title>{{title}}</ion-title>\n        <ion-buttons end>\n        <button ion-button icon-only>\n           <ion-icon name=\"notifications\"></ion-icon>\n         </button>\n         <button ion-button icon-right outline (click)=\"changeStation()\">\n           <span *ngIf=\"selectedStation\">{{selectedStation.name}}</span>\n           <ion-icon name=\"pin\"></ion-icon>\n         </button>\n    </ion-buttons>\n    </ion-navbar>"
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["a" /* AlertController */], __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist_providers_application_context__["a" /* ApplicationContext */]])
    ], AppHeader);
    return AppHeader;
}());

//# sourceMappingURL=app.header.js.map

/***/ }),

/***/ 1467:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppMasterServiceImplementation; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__app_extractor_app_extractor__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_app_state__ = __webpack_require__(27);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};






/*
 Generated class for the AppMasterServiceProvider provider.

 See https://angular.io/guide/dependency-injection for more info on providers
 and Angular DI.
 */
var AppMasterServiceImplementation = /** @class */ (function (_super) {
    __extends(AppMasterServiceImplementation, _super);
    function AppMasterServiceImplementation(http, appExtSvc, logger, appSvc) {
        var _this = _super.call(this) || this;
        _this.http = http;
        _this.appExtSvc = appExtSvc;
        _this.logger = logger;
        _this.appSvc = appSvc;
        _this.viewDescriptors = [];
        _this.APP_SETTINGS = 'pre_settings';
        _this.APP_TYPE = 'product_type';
        return _this;
    }
    AppMasterServiceImplementation.prototype.init = function () {
        var _this = this;
        this.evtHandler = this.appSvc.subscribe('APP_EXTRACTION_SUCCESS', function (res) {
            _this.appMaster = _this.appExtSvc.getAppMaster();
            _this.viewDescriptors = [];
            _this.setCurrentApp();
        });
    };
    AppMasterServiceImplementation.prototype.setCurrentApp = function () {
        this.selectedAppCof = this.appExtSvc.getCurrentApp();
        if (this.selectedAppCof) {
            this.updateViewDescriptors();
        }
    };
    AppMasterServiceImplementation.prototype.getCurrentViewDescriptors = function () {
        return this.viewDescriptors;
    };
    AppMasterServiceImplementation.prototype.getRootPage = function () {
        var landingPgs = this.viewDescriptors.filter(function (viewConf) { return viewConf.is_landing; });
        return landingPgs[0];
    };
    AppMasterServiceImplementation.prototype.getPreSettingsData = function () {
        return this.selectedAppCof[this.APP_SETTINGS];
    };
    AppMasterServiceImplementation.prototype.getAppType = function () {
        return this.selectedAppCof[this.APP_TYPE];
    };
    AppMasterServiceImplementation.prototype.updateViewDescriptors = function () {
        var _this = this;
        try {
            this.selectedAppCof.modules.forEach(function (mod) {
                mod.view_descriptors.forEach(function (view) {
                    var viewCopy = Object.assign({}, view);
                    _this.viewDescriptors.push(viewCopy);
                });
            });
        }
        catch (e) {
            this.logger.error('Error while collecting view configs. Please check APP MASTER');
        }
    };
    AppMasterServiceImplementation.prototype.dispose = function () {
        try {
            this.evtHandler.unsubscribe();
        }
        catch (e) {
            this.logger.error('error when removing event handler');
        }
    };
    AppMasterServiceImplementation.prototype.getCurrentModule = function () {
        return this.selectedAppCof.modules[0];
    };
    AppMasterServiceImplementation.prototype.setData = function (data) {
    };
    AppMasterServiceImplementation.prototype.getSettingsPage = function () {
        return {};
    };
    AppMasterServiceImplementation.prototype.getAppId = function () {
    };
    AppMasterServiceImplementation.prototype.getCurrentApp = function () {
        return this.selectedAppCof;
    };
    AppMasterServiceImplementation.prototype.getAppName = function () {
        return this.selectedAppCof['name'];
    };
    AppMasterServiceImplementation.prototype.getAppIcon = function () {
        if (this.selectedAppCof.icon && this.selectedAppCof.icon !== '') {
            return this.selectedAppCof.icon;
        }
        else {
            return this.icon;
        }
    };
    AppMasterServiceImplementation = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"])(),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */],
            __WEBPACK_IMPORTED_MODULE_2__app_extractor_app_extractor__["a" /* AppExtractorService */],
            __WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */], __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_app_state__["a" /* ApplicationService */]])
    ], AppMasterServiceImplementation);
    return AppMasterServiceImplementation;
}(__WEBPACK_IMPORTED_MODULE_5__ncinga_sp_nsp_app_core_dist__["c" /* AppMasterProvider */]));

//# sourceMappingURL=app-master-service.js.map

/***/ }),

/***/ 1468:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return VersionManagerImpl; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

/**
 * Created by shadeeka on 9/26/18.
 */
var VersionManagerImpl = /** @class */ (function () {
    function VersionManagerImpl() {
        this.version = '3.5.1';
    }
    VersionManagerImpl.prototype.getVersionNumber = function () {
        return this.version;
    };
    VersionManagerImpl = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])()
    ], VersionManagerImpl);
    return VersionManagerImpl;
}());

//# sourceMappingURL=version.manager.js.map

/***/ }),

/***/ 151:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppExtractorService; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_common_http__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_cache_settings__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_app_state__ = __webpack_require__(27);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (this && this.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [0, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};





/*
 Generated class for the AppExtractorService provider.

 See https://angular.io/guide/dependency-injection for more info on providers
 and Angular DI.
 */
var AppExtractorService = /** @class */ (function () {
    function AppExtractorService(http, logger, settings, appSvc) {
        this.http = http;
        this.logger = logger;
        this.settings = settings;
        this.appSvc = appSvc;
        this.APP_MASTER_KEY = 'app_master';
        logger.log('Hello AppExtractorService Provider');
    }
    AppExtractorService.prototype.loadAppMaster = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.logger.debug('loading app master');
                return [2 /*return*/, new Promise(function (resolve) {
                        _this.appMaster = _this.settings.getCacheValue(_this.APP_MASTER_KEY);
                        _this.appMasterId = _this.appMaster['app_master_id'];
                        resolve(true);
                    })];
            });
        });
    };
    AppExtractorService.prototype.getAppMaster = function () {
        return this.appMaster;
    };
    AppExtractorService.prototype.getMainNavigation = function () {
        var mainMenu = [];
        this.logger.debug('setting main menu');
        if (this.appMaster) {
            this.appMaster.apps.forEach(function (app) {
                // iterate through modules
                var appMenu = {};
                appMenu['name'] = app.app_name;
                appMenu['product_type'] = app['product_type'];
                appMenu['app_id'] = app['app_id'];
                appMenu['children'] = [];
                // setting page data
                var settingPage = {};
                app.modules.forEach(function (module) {
                    // iterate through views
                    module.view_descriptors.forEach(function (viewConf) {
                        if (viewConf.is_landing) {
                            var menuItem = {};
                            menuItem['component'] = viewConf.view_type;
                            menuItem['icon'] = 'home';
                            menuItem['title'] = viewConf.title || 'Untitled';
                            menuItem['args'] = viewConf;
                            appMenu['children'].push(menuItem);
                        }
                        else if (viewConf.is_setting) {
                            settingPage['component'] = viewConf.view_type;
                            settingPage['args'] = viewConf;
                        }
                    });
                    if (appMenu['children'].length > 0) {
                        appMenu['children'][0]['setting'] = settingPage;
                    }
                    mainMenu.push(appMenu);
                });
            });
            this.logger.debug('Setting root page');
            var sApp_1 = this.appMaster.apps.find(function (app) { return (app.is_landing); });
            var startingApp = void 0;
            if (sApp_1) {
                startingApp = mainMenu.find(function (menu) { return menu['app_id'] === sApp_1['app_id']; });
            }
            else {
                startingApp = mainMenu[0];
            }
            this.rootPage = (startingApp['children'][0]) ? startingApp['children'][0] : {
                component: 'AppLandingPage',
                args: {}
            };
            // setup root page
            this.logger.debug('Extraction process complete');
            // find landing app
            this.currentApp = (sApp_1) ? sApp_1 : this.appMaster.apps[0];
            this.currentAppId = this.currentApp['app_id'] + '@@' + this.currentApp['product_type'];
            this.logger.debug('Starting App' + this.currentAppId);
            this.appSvc.notifyDataChanged('APP_EXTRACTION_SUCCESS', Math.random());
        }
        this.currentMenu = mainMenu;
        return mainMenu;
    };
    AppExtractorService.prototype.getStartingPage = function () {
        return this.rootPage;
    };
    AppExtractorService.prototype.getAppMasterId = function () {
        return this.appMasterId;
    };
    AppExtractorService.prototype.getCurrentAppId = function () {
        return this.currentAppId;
    };
    AppExtractorService.prototype.isSameApp = function (id, ptype) {
        var newId = id + '@@' + ptype;
        if (this.currentAppId === newId) {
            return true;
        }
        return false;
    };
    AppExtractorService.prototype.setCurrentAppId = function (id, ptype) {
        this.currentAppId = id + '@@' + ptype;
    };
    AppExtractorService.prototype.getCurrentApp = function () {
        /* let arr = this.appMaster.apps.filter( app => app.app_id === appId);
         return arr.length > 0 ? arr[0] : null;*/
        if (!this.appMaster) {
            return null;
        }
        else {
            return this.currentApp;
        }
    };
    AppExtractorService.prototype.getAllProductTypesWithVersion = function () {
        var appsMap = {};
        this.appMaster.apps.forEach(function (app) {
            appsMap[app.product_type] = app.version;
        });
        // i.e {'sewing_qc': '1.0.0', 'qc_qc': '1.0.2'}
        return appsMap;
    };
    AppExtractorService.prototype.changeApp = function (prod_type, appId) {
        return __awaiter(this, void 0, void 0, function () {
            var found, menuItems;
            return __generator(this, function (_a) {
                found = this.appMaster.apps.find(function (app) { return (app.app_id === appId && app['product_type'] === prod_type); });
                if (found) {
                    if (this.currentApp['app_id'] !== appId) {
                        this.currentApp = Object.assign({}, found);
                        this.setCurrentAppId(found['app_id'], found['product_type']);
                        this.appSvc.notifyDataChanged('APP_EXTRACTION_SUCCESS', Math.random());
                        menuItems = this.currentMenu.find(function (menu) { return menu['product_type'] === prod_type && menu['app_id'] === appId; });
                        if (menuItems) {
                            this.rootPage = menuItems['children'][0];
                        }
                        this.logger.debug('============= App change successfull =============');
                        this.appSvc.notifyDataChanged('APP_CHANGE_SUCCESS', Math.random());
                        return [2 /*return*/, true];
                    }
                    else {
                        return [2 /*return*/, false];
                    }
                }
                else {
                    return [2 /*return*/, false];
                }
                return [2 /*return*/];
            });
        });
    };
    AppExtractorService.prototype.getAppDescription = function () {
        return (this.appMaster.description) ? this.appMaster.description : 'No Description';
    };
    AppExtractorService = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_1__angular_core__["Injectable"])(),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_0__angular_common_http__["a" /* HttpClient */],
            __WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_3__ncinga_sp_nsp_app_core_dist_cache_settings__["a" /* Settings */],
            __WEBPACK_IMPORTED_MODULE_4__ncinga_sp_nsp_app_core_dist_providers_app_state__["a" /* ApplicationService */]])
    ], AppExtractorService);
    return AppExtractorService;
}());

//# sourceMappingURL=app-extractor.js.map

/***/ }),

/***/ 215:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ENV; });
/**
 * Created by shadeeka on 7/25/18.
 */
var ENV = {
    mode: 'prod',
    environmentName: 'Production Environment',
    ionicEnvName: 'prod',
    protocol: 'https://',
    auth_services: '/app_auth_services',
    licence_services: '/app_licence_services',
    image_service: '/app_image_service',
    data_services: '/app_stream_hub',
    input_services: '/app_input_service_api',
    deploy_services: '/app_deploy_services',
    event_services: '/app_event_services',
    store_data_services: '/app_stores_service_api',
    tags_services: '/app_tags_services',
    order_data_services: '/app_order_data_services',
    bctx_services: '/app_bctx_services',
    core_services: '/app_core_services',
    master_data_services: '/app_core_services',
    shift_service: '/app_shift_services',
    service_host: 'nfactorylive.ncinga.com',
    ws_protocol: 'wss://',
    ws_host: 'nfactorylive.ncinga.com',
    ws_api: '/wsapi/wsopen'
};
//# sourceMappingURL=environment.prod.js.map

/***/ }),

/***/ 356:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DeploymentService; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_extractor_app_extractor__ = __webpack_require__(151);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__activation_service_activation_service__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_env__ = __webpack_require__(215);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__modules_cloud_index__ = __webpack_require__(379);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_ionic_angular__ = __webpack_require__(5);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
 * Created by shadeeka on 9/20/18.
 */








var DeploymentService = /** @class */ (function () {
    function DeploymentService(appMasterSvc, appContext, deploy, platform, loadingCtrl, settings, logger, versionMgr, toastCtrl, actSvc) {
        this.appMasterSvc = appMasterSvc;
        this.appContext = appContext;
        this.deploy = deploy;
        this.platform = platform;
        this.loadingCtrl = loadingCtrl;
        this.settings = settings;
        this.logger = logger;
        this.versionMgr = versionMgr;
        this.toastCtrl = toastCtrl;
        this.actSvc = actSvc;
        this.APP_MASTER_KEY = 'app_master';
    }
    DeploymentService.prototype.init = function () {
        var _this = this;
        this.settings.getValue('versions').then(function (res) {
            _this.apps_with_versions = res;
        });
    };
    DeploymentService.prototype.getUpdateDetails = function () {
        var appMasterId = this.appMasterSvc.getAppMasterId();
        // let appMasterId = '5b0b7914f22adf0001c6c29c';
        var currentSubject = this.appContext.getCurrentSubject();
        if (this.apps_with_versions && JSON.stringify(this.apps_with_versions) === '{}') {
            this.logger.error('no product types found ');
            return;
        }
        return this.actSvc.checkUpdateAvailability({
            'app_master_id': appMasterId,
            'version': this.apps_with_versions,
            'binary': this.versionMgr.getVersionNumber(),
            'subject': currentSubject.id,
            'channel_tag': __WEBPACK_IMPORTED_MODULE_5__app_env__["a" /* ENV */].mode
        });
    };
    DeploymentService.prototype.downloadAndInstall = function (res) {
        var _this = this;
        var updating = this.toastCtrl.create({
            message: 'Updating application...',
            cssClass: 'bottomToast',
            position: 'top'
        });
        updating.present();
        this.updateBinaryVersions(res); // update binary versions
        this.deploy.download().then(function () { return _this.deploy.extract(); }).then(function () {
            _this.deploy.load();
        });
    };
    DeploymentService.prototype.updateVersions = function (response) {
        var ptypes = {};
        response.apps.forEach(function (item) {
            ptypes[item.product_type] = item.version;
        });
        this.apps_with_versions = ptypes;
        //noinspection TypeScriptUnresolvedFunction
        return this.settings.setValue('versions', ptypes);
    };
    DeploymentService.prototype.updateBinaryVersions = function (response) {
        for (var key in this.apps_with_versions) {
            if (this.apps_with_versions[key]) {
                this.apps_with_versions[key] = response['latest_version'];
            }
        }
        return this.settings.setValue('versions', this.apps_with_versions);
    };
    DeploymentService.prototype.checkForUpdate = function (res) {
        var _this = this;
        var checking = this.loadingCtrl.create({
            content: 'Checking for update...'
        });
        checking.present();
        var appid = this.appMasterSvc.getAppMasterId();
        this.deploy.channel = appid;
        this.deploy.check().then(function (snapshotAvailable) {
            checking.dismiss();
            if (!snapshotAvailable) {
                var toast = _this.toastCtrl.create({
                    message: 'No update available',
                    duration: 3000
                });
                toast.present();
            }
            else {
                _this.downloadAndInstall(res);
            }
        }, function (err) {
            checking.dismiss();
        });
    };
    DeploymentService.prototype.sendUpdateAck = function (updateDetails) {
        var _this = this;
        try {
            var newapps_1 = [];
            updateDetails.apps.forEach(function (item) {
                newapps_1.push({
                    app_id: item.app_id,
                    product_type: item.product_type,
                    version: item.version,
                    license_key: _this.actSvc.getLicenseKey(item.product_type)
                });
            });
            // TODO: acknowledge updates with product types
            this.actSvc.acknowledgeAgent(newapps_1, 'update').subscribe(function (res) {
            });
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    DeploymentService = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])(),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__app_extractor_app_extractor__["a" /* AppExtractorService */],
            __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["d" /* ApplicationContext */],
            __WEBPACK_IMPORTED_MODULE_6__modules_cloud_index__["b" /* Deploy */],
            __WEBPACK_IMPORTED_MODULE_7_ionic_angular__["r" /* Platform */],
            __WEBPACK_IMPORTED_MODULE_7_ionic_angular__["k" /* LoadingController */],
            __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["o" /* Settings */],
            __WEBPACK_IMPORTED_MODULE_3_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist__["p" /* VersionManager */],
            __WEBPACK_IMPORTED_MODULE_7_ionic_angular__["x" /* ToastController */],
            __WEBPACK_IMPORTED_MODULE_4__activation_service_activation_service__["a" /* ActivationService */]])
    ], DeploymentService);
    return DeploymentService;
}());

//# sourceMappingURL=deployment-svc.js.map

/***/ }),

/***/ 376:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MainServiceEndPoints; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EnvProvider; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ncinga_sp_nsp_app_core_dist_environment_environment_variables_token__ = __webpack_require__(44);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
/**
 * Created by Vijitha on 14/4/2017.
 */


var MainServiceEndPoints = /** @class */ (function () {
    function MainServiceEndPoints() {
    }
    MainServiceEndPoints.VALIDATE_TOKEN = 'VALIDATE_TOKEN';
    MainServiceEndPoints.GET_APPSFOR_TENAN = 'GET_APPSFOR_TENAN';
    MainServiceEndPoints.GET_APP_MASTER = 'GET_APP_MASTER';
    MainServiceEndPoints.ACTIVATE_APP = 'ACTIVATE_APP';
    MainServiceEndPoints.CLIENT_PROFILE_ACK = 'CLIENT_PROFILE_ACK';
    MainServiceEndPoints.UPDATE_DETAILS = 'UPDATE_DETAILS';
    MainServiceEndPoints.UPDATE_ACK = 'UPDATE_ACK';
    MainServiceEndPoints.SUPPORTING_DATA = 'SUPPORTING_DATA';
    MainServiceEndPoints.DEPLOY_SVC = 'DEPLOY_SVC';
    MainServiceEndPoints.DEPLOY_SVC_WEB = 'DEPLOY_SVC_WEB';
    MainServiceEndPoints.GET_SHIFTS = 'GET_SHIFTS';
    return MainServiceEndPoints;
}());

var EnvProvider = /** @class */ (function () {
    function EnvProvider(envVariables) {
        // console.log('Setting AuthModule CONST with ENV VAR');
        this.envVariables = envVariables;
        this.svc_host = '/no_svc_host';
        this.licence_svc = '/no_licence_host';
        this.deploy_svc = '/no_deployment_host';
        this.core_svc = '/no_core_services';
        this.shift_service = '/no_shift_service';
        this.protocol = 'http://';
        this.env_vars = new Object();
        if (envVariables.protocol) {
            this.protocol = envVariables.protocol;
        }
        if (envVariables.service_host != null) {
            this.svc_host = envVariables.service_host;
        }
        if (envVariables.licence_services) {
            this.licence_svc = envVariables.licence_services;
        }
        if (envVariables.deploy_services) {
            this.deploy_svc = envVariables.deploy_services;
        }
        if (envVariables.deploy_services) {
            this.core_svc = envVariables.core_services;
        }
        if (envVariables.shift_service) {
            this.shift_service = envVariables.shift_service;
        }
        // register all vars
        this.registerVars();
    }
    EnvProvider.prototype.registerVars = function () {
        // deployment services
        this.env_vars[MainServiceEndPoints.VALIDATE_TOKEN] = this.protocol + this.svc_host + this.licence_svc +
            '/activation/tenantapps';
        this.env_vars[MainServiceEndPoints.GET_APP_MASTER] = this.protocol + this.svc_host + this.licence_svc +
            '/activation/appmaster';
        this.env_vars[MainServiceEndPoints.ACTIVATE_APP] = this.protocol + this.svc_host + this.licence_svc +
            '/activation/activateapp';
        this.env_vars[MainServiceEndPoints.CLIENT_PROFILE_ACK] = this.protocol + this.svc_host + this.licence_svc +
            '/activation/agentack';
        this.env_vars[MainServiceEndPoints.UPDATE_DETAILS] = this.protocol + this.svc_host + this.deploy_svc +
            '/deploy/update/details';
        this.env_vars[MainServiceEndPoints.UPDATE_ACK] = this.protocol + this.svc_host + this.deploy_svc +
            '/deploy/update/ack';
        this.env_vars[MainServiceEndPoints.GET_SHIFTS] = this.protocol + this.svc_host + this.shift_service +
            '/getshiftsforsubject';
        // core platform services
        this.env_vars[MainServiceEndPoints.SUPPORTING_DATA] = this.protocol + this.svc_host + this.core_svc +
            '/appctx';
        this.env_vars[MainServiceEndPoints.DEPLOY_SVC] = this.protocol + this.svc_host + this.deploy_svc;
        this.env_vars[MainServiceEndPoints.DEPLOY_SVC_WEB] = this.protocol + this.svc_host + this.deploy_svc + '/activation/webapp/$id';
    };
    EnvProvider.prototype.getEnvVar = function (arg) {
        return this.env_vars[arg];
    };
    EnvProvider = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])(),
        __param(0, Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Inject"])(__WEBPACK_IMPORTED_MODULE_1__ncinga_sp_nsp_app_core_dist_environment_environment_variables_token__["a" /* EnvVariables */])),
        __metadata("design:paramtypes", [Object])
    ], EnvProvider);
    return EnvProvider;
}());

//# sourceMappingURL=env.provider.js.map

/***/ }),

/***/ 379:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* unused harmony export Rx */
/* unused harmony export PushRx */
/* unused harmony export FacebookAuth */
/* unused harmony export GoogleAuth */
/* unused harmony export Auth */
/* unused harmony export Client */
/* unused harmony export Config */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Deploy; });
/* unused harmony export DIContainer */
/* unused harmony export Insights */
/* unused harmony export Push */
/* unused harmony export User */
/* unused harmony export CloudSettingsToken */
/* unused harmony export provideContainer */
/* unused harmony export provideConfig */
/* unused harmony export provideAuth */
/* unused harmony export provideClient */
/* unused harmony export provideDeploy */
/* unused harmony export provideUser */
/* unused harmony export providePush */
/* unused harmony export provideFacebookAuth */
/* unused harmony export provideGoogleAuth */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CloudModule; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ionic_cloud__ = __webpack_require__(704);
/* unused harmony namespace reexport */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs__ = __webpack_require__(10);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_env__ = __webpack_require__(215);
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};





var Rx = /** @class */ (function () {
    function Rx(emitter) {
        this.emitter = emitter;
    }
    return Rx;
}());

var PushRx = /** @class */ (function (_super) {
    __extends(PushRx, _super);
    function PushRx() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    PushRx.prototype.notification = function () {
        var _this = this;
        return __WEBPACK_IMPORTED_MODULE_1_rxjs__["Observable"].fromEventPattern(function (h) {
            return _this.emitter.on('push:notification', function (data) {
                return h(data.message);
            });
        }, function (_) {
            // https://github.com/ReactiveX/rxjs/issues/1900
            // this.emitter.off(signal);
        });
    };
    return PushRx;
}(Rx));

var FacebookAuth = /** @class */ (function (_super) {
    __extends(FacebookAuth, _super);
    function FacebookAuth() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return FacebookAuth;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["f" /* FacebookAuth */]));

var GoogleAuth = /** @class */ (function (_super) {
    __extends(GoogleAuth, _super);
    function GoogleAuth() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return GoogleAuth;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["g" /* GoogleAuth */]));

var Auth = /** @class */ (function (_super) {
    __extends(Auth, _super);
    function Auth() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Auth;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["a" /* Auth */]));

var Client = /** @class */ (function (_super) {
    __extends(Client, _super);
    function Client() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Client;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["b" /* Client */]));

var Config = /** @class */ (function (_super) {
    __extends(Config, _super);
    function Config() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Config;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["c" /* Config */]));

var Deploy = /** @class */ (function (_super) {
    __extends(Deploy, _super);
    function Deploy() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Deploy;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["e" /* Deploy */]));

var DIContainer = /** @class */ (function (_super) {
    __extends(DIContainer, _super);
    function DIContainer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return DIContainer;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["d" /* DIContainer */]));

var Insights = /** @class */ (function (_super) {
    __extends(Insights, _super);
    function Insights() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Insights;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["h" /* Insights */]));

var Push = /** @class */ (function (_super) {
    __extends(Push, _super);
    function Push() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return Push;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["i" /* Push */]));

var User = /** @class */ (function (_super) {
    __extends(User, _super);
    function User() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return User;
}(__WEBPACK_IMPORTED_MODULE_0__ionic_cloud__["j" /* User */]));

var CloudSettingsToken = new __WEBPACK_IMPORTED_MODULE_2__angular_core__["InjectionToken"]('CloudSettings');
function provideContainer(settings) {
    var url = __WEBPACK_IMPORTED_MODULE_3__app_env__["a" /* ENV */]['protocol'] + __WEBPACK_IMPORTED_MODULE_3__app_env__["a" /* ENV */]['service_host'] + __WEBPACK_IMPORTED_MODULE_3__app_env__["a" /* ENV */]['deploy_services'];
    settings.core.urls.api = url;
    var container = new DIContainer();
    container.config.register(settings);
    container.core.init();
    container.cordova.bootstrap();
    return container;
}
function provideConfig(container) {
    return container.config;
}
function provideAuth(container) {
    return container.auth;
}
function provideClient(container) {
    return container.client;
}
function provideDeploy(container) {
    return container.deploy;
}
function provideUser(container) {
    return container.singleUserService.current();
}
function providePush(container) {
    var push = container.push;
    push.rx = new PushRx(container.eventEmitter);
    return push;
}
function provideFacebookAuth(container) {
    return container.facebookAuth;
}
function provideGoogleAuth(container) {
    return container.googleAuth;
}
var CloudModule = /** @class */ (function () {
    function CloudModule() {
    }
    CloudModule_1 = CloudModule;
    CloudModule.forRoot = function (settings) {
        return {
            ngModule: CloudModule_1,
            providers: [
                { provide: CloudSettingsToken, useValue: settings },
                { provide: DIContainer, useFactory: provideContainer, deps: [CloudSettingsToken] },
                { provide: Auth, useFactory: provideAuth, deps: [DIContainer] },
                { provide: Client, useFactory: provideClient, deps: [DIContainer] },
                { provide: Config, useFactory: provideConfig, deps: [DIContainer] },
                { provide: Deploy, useFactory: provideDeploy, deps: [DIContainer] },
                { provide: Push, useFactory: providePush, deps: [DIContainer] },
                { provide: User, useFactory: provideUser, deps: [DIContainer] },
                { provide: FacebookAuth, useFactory: provideFacebookAuth, deps: [DIContainer] },
                { provide: GoogleAuth, useFactory: provideGoogleAuth, deps: [DIContainer] }
            ]
        };
    };
    CloudModule = CloudModule_1 = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_2__angular_core__["NgModule"])()
    ], CloudModule);
    return CloudModule;
    var CloudModule_1;
}());

//# sourceMappingURL=index.js.map

/***/ }),

/***/ 397:
/***/ (function(module, exports) {

function webpackEmptyAsyncContext(req) {
	// Here Promise.resolve().then() is used instead of new Promise() to prevent
	// uncatched exception popping up in devtools
	return Promise.resolve().then(function() {
		throw new Error("Cannot find module '" + req + "'.");
	});
}
webpackEmptyAsyncContext.keys = function() { return []; };
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
module.exports = webpackEmptyAsyncContext;
webpackEmptyAsyncContext.id = 397;

/***/ }),

/***/ 453:
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"../../node_modules/@ncinga-sp/nsp-common-module/clearance/clearance.component.module": [
		868
	],
	"../../node_modules/@ncinga-sp/nsp-common-module/scanner/scanner-landing/nsp-scanner-landing.module": [
		1499,
		3
	],
	"../../node_modules/@ncinga-sp/nsp-common-module/scanner/tag-details/nsp-tag-details.module": [
		1500,
		31
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/activitylog/activity.log.module": [
		1501,
		30
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-activity-log/aql-activity-log.module": [
		1502,
		29
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-department/aql-department.module": [
		1503,
		28
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-operation/aql-operation.module": [
		1504,
		27
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/aql/aql-pkg-detail/aql-pkg-detail.module": [
		1505,
		4
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/class-one/class-one.module": [
		1506,
		26
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/class-two/class-two.module": [
		1507,
		10
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/extrainputpage/extra.input.module": [
		1508,
		25
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/grading/grading.module": [
		1509,
		8
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/location/location.module": [
		1510,
		7
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/recent/recent.module": [
		1511,
		24
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/rectified/rectified.module": [
		1512,
		23
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/settingPage/setting-view.module": [
		1513,
		22
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/station/station.module": [
		1514,
		9
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/summary-view/summary.view.module": [
		1515,
		21
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/transactionlog/transactionlog.module": [
		1516,
		20
	],
	"../../node_modules/@ncinga-sp/nsp-counting-classifi/viewbuilder/view-builder.module": [
		1517,
		19
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/activitylog/tractivity.log.module": [
		883
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/settingPage/trsetting-view.module": [
		899
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-issue/tr-issue.module": [
		905
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-landing/tr-landing.module": [
		904
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-recent/tr-recent.module": [
		1518,
		18
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/tr-rework/tr-rework.module": [
		1519,
		17
	],
	"../../node_modules/@ncinga-sp/nsp-counting-tracking/transactionlog/trtransaction.log.module": [
		1520,
		16
	],
	"../../node_modules/@ncinga-sp/nsp-dashboard/dashboards-settings/dashboards.settings.module": [
		1489,
		15
	],
	"../../node_modules/@ncinga-sp/nsp-dashboard/landing-page/landing.page.module": [
		1521,
		1
	],
	"../../node_modules/@ncinga-sp/nsp-ngx-packaging/package-landing/package-landing.module": [
		909
	],
	"../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkg-grading/pkg-grading.module": [
		917
	],
	"../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkg-transaction-log/pkg-transaction-log.module": [
		922
	],
	"../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkgactivitylog/pkg-activity-log.module": [
		925
	],
	"../../node_modules/@ncinga-sp/nsp-ngx-packaging/pkgsettingPage/pkg-setting-view.module": [
		928
	],
	"../../node_modules/@ncinga-sp/nsp-reader/dist/check-data/check-data.module": [
		890
	],
	"../../node_modules/@ncinga-sp/nsp-reader/dist/nsp-tag/nsp-tag.module": [
		887
	],
	"../../node_modules/@ncinga-sp/nsp-reader/dist/paired-devices/paired-devices.module": [
		891
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/activity-log-new/activity-log-new.module": [
		1479,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/activity-log-page/store-activity-log-page.module": [
		1483,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/app-switching-page/app-switching-page.module": [
		1478,
		14
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/current-status-page/current-status-page.module": [
		1482,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/gate-pass-page/gate-pass-page.module": [
		1522,
		5
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/group-view-page/sku-group-page.module": [
		1477,
		13
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/location-page/location-page.module": [
		1475,
		6
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/new-group-page/new-group-page.module": [
		1485,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/partially-control-page/partially-control-page.module": [
		1480,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/scanned-report-page/scan-report-page.module": [
		1474,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/stock-inhand/stock-inhand.module": [
		1488,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/store-grading/store-grading.module": [
		1487,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/store-main-page/store-main-page.module": [
		1476,
		12
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/store-settings-page/store-settings-page.module": [
		1523,
		2
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/summary-page/summary-page.module": [
		1484,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/test-page/test-page.module": [
		1524,
		11
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/transaction-log/transaction-log.module": [
		1486,
		0
	],
	"../../node_modules/@ncinga-sp/nsp-store/pages/view-tag-page/view-tag-page.module": [
		1481,
		0
	],
	"../pages/activation/activation-page.module": [
		1490,
		40
	],
	"../pages/app-landing/app-landing.module": [
		1491,
		39
	],
	"../pages/appselect/appselect.module": [
		1492,
		38
	],
	"../pages/login/login.module": [
		1493,
		37
	],
	"../pages/menu/menu.module": [
		1494,
		36
	],
	"../pages/module-config/module-config.module": [
		1495,
		35
	],
	"../pages/setting-up/setting-up.module": [
		1496,
		34
	],
	"../pages/settings/settings.module": [
		1497,
		33
	],
	"../pages/web-settings/web-settings.module": [
		1498,
		32
	]
};
function webpackAsyncContext(req) {
	var ids = map[req];
	if(!ids)
		return Promise.reject(new Error("Cannot find module '" + req + "'."));
	return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {
		return __webpack_require__(ids[0]);
	});
};
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
	return Object.keys(map);
};
webpackAsyncContext.id = 453;
module.exports = webpackAsyncContext;

/***/ }),

/***/ 699:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FormButtonComponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

var FormButtonComponent = /** @class */ (function () {
    function FormButtonComponent() {
    }
    FormButtonComponent = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'form-button',
            styles: ["button {\n  letter-spacing: -0.5px;\n  cursor: pointer;\n  background-color: #9d62c8;\n  outline: 0;\n  line-height: 1;\n  text-align: center;\n  padding: 12px 30px;\n  font-size: 15px;\n  font-weight: 600;\n  border-radius: 2px;\n  display: inline-block;\n  border: none;\n  color: #fff;\n  transition: background-color .3s, box-shadow .3s;\n\n  &:hover {\n    background-color: #a46dcc;\n    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);\n  }\n\n  &:disabled {\n    background: rgba(0, 0, 0, 0.2);\n    color: rgba(0, 0, 0, 0.4);\n    cursor: not-allowed;\n    box-shadow: none;\n  }\n}\n"],
            template: "<div class=\"dynamic-field form-button\"\n      [formGroup]=\"group\">\n      <button\n        [disabled]=\"config.disabled\"\n        type=\"submit\">\n        {{ config.label }}\n      </button>\n    </div>\n  "
        })
    ], FormButtonComponent);
    return FormButtonComponent;
}());

//# sourceMappingURL=form-button.component.js.map

/***/ }),

/***/ 700:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FormInputComponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

var FormInputComponent = /** @class */ (function () {
    function FormInputComponent() {
    }
    FormInputComponent = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'form-input',
            styles: ["input {\n  display: block;\n  font-family: inherit;\n  font-size: 14px;\n  width: 100%;\n  border: 1px solid #F1F2F4;\n  outline: none;\n  padding: 10px 15px;\n  color: rgba(0, 0, 0, 0.7);\n  &:focus {\n    border: 1px solid rgba(0, 0, 0, 0.4);\n    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);\n  }\n}\n"],
            template: "<div class=\"dynamic-field form-input\" [formGroup]=\"group\">\n      <label>{{ config.label }}</label>\n      <input\n        type=\"text\"\n        [attr.placeholder]=\"config.placeholder\"\n        [formControlName]=\"config.name\">\n    </div>\n  "
        })
    ], FormInputComponent);
    return FormInputComponent;
}());

//# sourceMappingURL=form-input.component.js.map

/***/ }),

/***/ 701:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FormSelectComponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};

var FormSelectComponent = /** @class */ (function () {
    function FormSelectComponent() {
    }
    FormSelectComponent = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'form-select',
            styles: ["\n.select {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  text-indent: .01px;\n  text-overflow: '';\n  overflow: hidden;\n  font-family: inherit;\n  font-size: 14px;\n  padding: 10px 15px;\n  border-radius: 0;\n  color: rgba(0, 0, 0, 0.7);\n  border: 1px solid rgba(0, 0, 0, 0.1);\n  width: 100%;\n   max-width: 100%;\n  outline: none;\n  &:focus {\n    border: 1px solid rgba(0, 0, 0, 0.4);\n    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);\n  }\n}\n"
            ],
            template: "<div class=\"col dynamic-field form-select\"\n      [formGroup]=\"group\">\n      <label>{{ config.label }}</label>\n  <ion-select [formControlName]=\"config.name\" [placeholder]=\"config.placeholder\"\n   [multiple]=\"config.multiple\" [selectOptions]=\"{title:config.label}\">\n    <ion-option *ngFor=\"let option of config.options\" [value]=\"option.id\">{{option.name}}</ion-option>\n  </ion-select>\n    </div>\n  "
        }),
        __metadata("design:paramtypes", [])
    ], FormSelectComponent);
    return FormSelectComponent;
}());

//# sourceMappingURL=form-select.component.js.map

/***/ }),

/***/ 702:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FormFilterSelectComponent; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__filter_options__ = __webpack_require__(703);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
 * Created by shadeeka on 8/28/18.
 */



var FormFilterSelectComponent = /** @class */ (function () {
    function FormFilterSelectComponent(modalCtrl) {
        this.modalCtrl = modalCtrl;
    }
    FormFilterSelectComponent.prototype.ngAfterViewInit = function () {
        this.selectedText = this.config.placeholder;
    };
    FormFilterSelectComponent.prototype.openSelect = function () {
        var _this = this;
        var modal = this.modalCtrl.create(__WEBPACK_IMPORTED_MODULE_2__filter_options__["b" /* SelectPopoverPage */], { conf: this.config }, { enableBackdropDismiss: false });
        modal.present();
        modal.onDidDismiss(function (res) {
            if (res) {
                var values_1 = [];
                var texts_1 = [];
                res.forEach(function (item) {
                    texts_1.push(item.name);
                    var itemid = item.id + '@' + item.hsk;
                    values_1.push(itemid);
                });
                _this.group.setValue({ 'subjects': values_1 });
                _this.text = texts_1.join(',');
                _this.selectedText = _this.text;
            }
        });
    };
    FormFilterSelectComponent = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'filtering-select',
            styles: ["\n.select {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  text-indent: .01px;\n  text-overflow: '';\n  overflow: hidden;\n  font-family: inherit;\n  font-size: 14px;\n  padding: 10px 15px;\n  border-radius: 0;\n  color: rgba(0, 0, 0, 0.7);\n  border: 1px solid rgba(0, 0, 0, 0.1);\n  width: 100%;\n   max-width: 100%;\n  outline: none;\n  &:focus {\n    border: 1px solid rgba(0, 0, 0, 0.4);\n    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);\n  }\n}\n.filter-select{\n   padding: 8px;\n    border: 1px solid rgba(0, 0, 0, 0.4);\n    background:\n    linear-gradient(45deg, transparent 50%, rgba(0, 0, 0, 0.7) 50%)\n      no-repeat calc(100% - 20px) calc(1em + 4px),\n    linear-gradient(135deg, rgba(0, 0, 0, 0.7) 50%, transparent 50%)\n      no-repeat calc(100% - 15px) calc(1em + 4px);\n  background-size: 5px 5px, 5px 5px;\n}\n"
            ],
            template: "<div class=\"dynamic-field form-select\"\n      [formGroup]=\"group\">\n      <label>{{ config.label }}</label>\n    <div class=\"filter-select\" (click)=\"openSelect()\">{{selectedText}}</div>\n    </div>\n  "
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["m" /* ModalController */]])
    ], FormFilterSelectComponent);
    return FormFilterSelectComponent;
}());

//# sourceMappingURL=filtering-select.js.map

/***/ }),

/***/ 703:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FilterByPipe; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SelectPopoverPage; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ngx_logger__ = __webpack_require__(4);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
 * Created by shadeeka on 8/28/18.
 */



var FilterByPipe = /** @class */ (function () {
    function FilterByPipe() {
    }
    FilterByPipe.prototype.transform = function (arr, name) {
        if (arr) {
            if (name !== 'all') {
                var data = arr.filter(function (item) { return item['label'] === name; });
                return data;
            }
            else {
                return arr;
            }
        }
    };
    FilterByPipe = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Pipe"])({ name: 'filterBy' })
    ], FilterByPipe);
    return FilterByPipe;
}());

var SelectPopoverPage = /** @class */ (function () {
    function SelectPopoverPage(viewCtrl, navParams, logger) {
        this.viewCtrl = viewCtrl;
        this.navParams = navParams;
        this.logger = logger;
        this.options = [];
        this.setUpModel();
    }
    SelectPopoverPage.prototype.setUpModel = function () {
        try {
            var data = this.navParams.get('conf');
            this.config = data;
            this.multiple = data['multiple'];
            this.options = data.options;
            if (data.filters && data.filters.length) {
                this.filerLabels = data.filters;
                this.filterKey = this.filerLabels[0];
            }
            else {
                this.getFilters();
            }
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    SelectPopoverPage.prototype.getFilters = function () {
        var _this = this;
        try {
            this.filerLabels = [];
            this.options.forEach(function (item) {
                if (_this.filerLabels.indexOf(item['label']) === -1) {
                    _this.filerLabels.push(item['label']);
                }
                item['selected'] = false;
            });
            this.filterKey = this.filerLabels[0];
        }
        catch (e) {
            this.logger.error(e);
        }
    };
    SelectPopoverPage.prototype.done = function () {
        var choosenItems = this.options.filter(function (item) { return item.selected; });
        this.viewCtrl.dismiss(choosenItems);
    };
    SelectPopoverPage.prototype.setSelected = function (item) {
        if (this.multiple) {
            item['selected'] = !item['selected'];
        }
        else {
            item['selected'] = !item['selected'];
            this.options.forEach(function (opt) {
                if (item.name !== opt.name) {
                    opt['selected'] = false;
                }
            });
        }
    };
    SelectPopoverPage.prototype.segmentChanged = function (e) {
        this.options.forEach(function (item) {
            item['selected'] = false;
        });
    };
    SelectPopoverPage.prototype.close = function () {
        this.viewCtrl.dismiss();
    };
    SelectPopoverPage = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'form-fil-select',
            template: "\n<ion-header>\n<ion-navbar no-border-bottom color=\"mheader\">\n        <ion-title>\n            {{config.placeholder}}\n        </ion-title>\n        <ion-buttons end>\n      <button ion-button (click)=\"close()\"><ion-icon name=\"close\"></ion-icon></button>\n</ion-buttons>\n    </ion-navbar>\n</ion-header>\n<ion-content>\n    <ion-list>\n      <ion-list-header>\n       <ion-segment [(ngModel)]=\"filterKey\" color=\"c6\">\n      <ion-segment-button [value]=\"label\" *ngFor=\"let label of filerLabels\" (ionChange)=\"segmentChanged($event)\">\n        <ion-icon name=\"funnel\"></ion-icon>{{label}}\n      </ion-segment-button>\n    </ion-segment>\n      </ion-list-header>\n      <span *ngIf=\"!multiple\">\n          <button ion-item *ngFor=\"let option of options | filterBy:filterKey\" (click)=\"setSelected(option)\">\n          <ion-icon *ngIf=\"!option.selected\" name=\"radio-button-off\" item-start></ion-icon>\n          <ion-icon  *ngIf=\"option.selected\" name=\"radio-button-on\" item-start></ion-icon>\n          {{option.name}}\n          </button>\n      </span>\n       <span *ngIf=\"multiple\">\n        <button ion-item *ngFor=\"let option of options | filterBy:filterKey\" (click)=\"setSelected(option)\">\n          <ion-icon *ngIf=\"!option.selected\" name=\"ios-square-outline\" item-start></ion-icon>\n          <ion-icon  *ngIf=\"option.selected\" name=\"ios-checkbox-outline\" item-start></ion-icon>\n          {{option.name}}\n          </button>\n       </span>\n    </ion-list>\n</ion-content>\n<ion-footer>\n<ion-toolbar no-border-bottom color=\"mheader\">\n<ion-buttons end>\n<button ion-button (click)=\"done()\" block>Select</button>\n</ion-buttons>\n</ion-toolbar>\n</ion-footer>"
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["y" /* ViewController */],
            __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["p" /* NavParams */], __WEBPACK_IMPORTED_MODULE_2_ngx_logger__["b" /* NGXLogger */]])
    ], SelectPopoverPage);
    return SelectPopoverPage;
}());

//# sourceMappingURL=filter.options.js.map

/***/ }),

/***/ 979:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UpdateAlertModal; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ngx_logger__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist_cache_settings__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_ionic_angular__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_activation_service_activation_service__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ionic_native_splash_screen__ = __webpack_require__(214);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__providers_deployment_svc_deployment_svc__ = __webpack_require__(356);
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
 * Created by shadeeka on 4/29/18.
 */







var UpdateAlertModal = /** @class */ (function () {
    function UpdateAlertModal(actSvc, logger, platform, settings, splashScreen, viewCtrl, depSvc, navParams) {
        this.actSvc = actSvc;
        this.logger = logger;
        this.platform = platform;
        this.settings = settings;
        this.splashScreen = splashScreen;
        this.viewCtrl = viewCtrl;
        this.depSvc = depSvc;
        this.navParams = navParams;
        this.APP_MASTER_KEY = 'app_master';
    }
    UpdateAlertModal.prototype.ionViewWillEnter = function () {
        this.mobile_os = this.platform.is('cordova');
        this.respose = this.navParams.get('result');
        if (this.respose['force'] === true) {
            this.updateApp();
        }
    };
    UpdateAlertModal.prototype.updateApp = function () {
        var _this = this;
        if (this.mobile_os && this.respose['update_type'] === 'BINARY') {
            this.updateBinary();
        }
        else if (this.respose['update_type'] === 'APP_MASTER') {
            // download app master config and save it in cache
            this.actSvc.getAppConfig(this.respose['app_master_id']).subscribe(function (response) {
                _this.logger.debug('app master download success: does nothing implement here');
                _this.depSvc.updateVersions(response);
                //noinspection TypeScriptUnresolvedFunction
                _this.settings.setValue(_this.APP_MASTER_KEY, response).then(function (res) {
                    // console.log('save app master : ', res);
                    _this.depSvc.sendUpdateAck(response);
                    // this.deploy.load();
                    _this.splashScreen.show();
                    window.location.hash = '#/';
                    window.location.reload(true);
                });
            });
        }
    };
    UpdateAlertModal.prototype.updateBinary = function () {
        var _this = this;
        this.actSvc.getAppConfig(this.respose['app_master_id']).subscribe(function (response) {
            _this.settings.setValue(_this.APP_MASTER_KEY, response).then(function (res) {
            });
            _this.depSvc.updateVersions(response);
            _this.depSvc.checkForUpdate(_this.respose); // if this is a binary update and do it
            _this.exit();
        });
    };
    UpdateAlertModal.prototype.exit = function () {
        this.viewCtrl.dismiss();
    };
    UpdateAlertModal = __decorate([
        Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
            selector: 'modal-update',
            template: "\n<ion-content>\n <ion-grid no-padding>\n    <ion-row>\n    <ion-col>\n        <div class=\"bg-wrapper\">\n            There is a new update Available\n          <p>We have improved the application</p>\n        </div>\n    </ion-col>\n</ion-row>\n<ion-row>\n<ion-list class=\"progress-steps\">\n  <ion-item>\n        Versions\n        <ion-note color=\"c6\" item-end>{{respose?.version_no}}</ion-note>\n    </ion-item>\n    <ion-item>\n        Update Type\n        <ion-note color=\"c6\" item-end>{{respose?.update_type}}</ion-note>\n    </ion-item>\n    <ion-item>\n    Product Id\n        <ion-note color=\"c6\" item-end>{{respose?.app_master_id}}</ion-note>\n    </ion-item>\n</ion-list>\n</ion-row>\n<ion-row justify-content-center>\n<ion-col col-12 class=\"text-center\">\n<button ion-button (click)=\"updateApp()\" color=\"c6\">Install Update</button>\n<!--<button ion-button icon-only (click)=\"exit()\"><ion-icon name=\"close\"></ion-icon></button>-->\n</ion-col>\n<ion-col col-2 class=\"text-center\">\n<button ion-button color=\"lgray\" clear block (click)=\"exit()\">Close</button>\n</ion-col>\n</ion-row>\n</ion-grid>\n</ion-content>\n"
        }),
        __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_4__providers_activation_service_activation_service__["a" /* ActivationService */],
            __WEBPACK_IMPORTED_MODULE_1_ngx_logger__["b" /* NGXLogger */],
            __WEBPACK_IMPORTED_MODULE_3_ionic_angular__["r" /* Platform */],
            __WEBPACK_IMPORTED_MODULE_2__ncinga_sp_nsp_app_core_dist_cache_settings__["a" /* Settings */],
            __WEBPACK_IMPORTED_MODULE_5__ionic_native_splash_screen__["a" /* SplashScreen */],
            __WEBPACK_IMPORTED_MODULE_3_ionic_angular__["y" /* ViewController */],
            __WEBPACK_IMPORTED_MODULE_6__providers_deployment_svc_deployment_svc__["a" /* DeploymentService */],
            __WEBPACK_IMPORTED_MODULE_3_ionic_angular__["p" /* NavParams */]])
    ], UpdateAlertModal);
    return UpdateAlertModal;
}());

//# sourceMappingURL=update.modal.js.map

/***/ })

},[1024]);
//# sourceMappingURL=main.js.map