"use strict";
(self["webpackChunkpos_marketplace"] = self["webpackChunkpos_marketplace"] || []).push([["main"],{

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AppRoutingModule": () => (/* binding */ AppRoutingModule)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ 124);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 2560);



const routes = [
    { path: '', loadChildren: () => Promise.all(/*! import() */[__webpack_require__.e("default-src_app_services_checkbrowser_service_ts-node_modules_angular_forms_fesm2020_forms_mjs"), __webpack_require__.e("src_app_login_login_module_ts")]).then(__webpack_require__.bind(__webpack_require__, /*! ./login/login.module */ 107)).then(m => m.LoginModule) },
    { path: 'menu', loadChildren: () => Promise.all(/*! import() */[__webpack_require__.e("default-src_app_services_checkbrowser_service_ts-node_modules_angular_forms_fesm2020_forms_mjs"), __webpack_require__.e("src_app_menu_menu_module_ts")]).then(__webpack_require__.bind(__webpack_require__, /*! ./menu/menu.module */ 2825)).then(m => m.MenuModule) },
    { path: '**', redirectTo: '', pathMatch: 'full' }
];
class AppRoutingModule {
}
AppRoutingModule.ɵfac = function AppRoutingModule_Factory(t) { return new (t || AppRoutingModule)(); };
AppRoutingModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({ type: AppRoutingModule });
AppRoutingModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' }), _angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](AppRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterModule], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterModule] }); })();


/***/ }),

/***/ 5041:
/*!**********************************!*\
  !*** ./src/app/app.component.ts ***!
  \**********************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AppComponent": () => (/* binding */ AppComponent)
/* harmony export */ });
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ 124);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/operators */ 116);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 635);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ 1353);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 2560);
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/platform-browser */ 4497);
/* harmony import */ var ng_http_loader__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ng-http-loader */ 6298);






class AppComponent {
    constructor(_router, titleService, activatedRoute) {
        this._router = _router;
        this.titleService = titleService;
        this.activatedRoute = activatedRoute;
    }
    ngOnInit() {
        this.overrideDateToJsonFunction();
        // Dynamic Page title : https://ultimatecourses.com/blog/dynamic-page-titles-angular-2-router-events
        this._router.events.pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_0__.filter)((event) => event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_1__.NavigationEnd))
            .pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.map)(() => this.activatedRoute), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.map)((route) => {
            while (route.firstChild) {
                route = route.firstChild;
            }
            return route;
        }), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_0__.filter)((route) => route.outlet === 'primary'), (0,rxjs_operators__WEBPACK_IMPORTED_MODULE_3__.mergeMap)((route) => route.data))
            .subscribe((event) => {
            let webName = " | Marketplace";
            if (event.title == "Dealpos x Marketplace") {
                webName = "";
            }
            this.titleService.setTitle(event['title'] + webName);
        });
    }
    overrideDateToJsonFunction() {
        //Date json serialization override
        Date.prototype.toJSON = function () {
            let v = this.getFullYear() +
                '-' + pad(this.getMonth() + 1) +
                '-' + pad(this.getDate()) +
                'T' + pad(this.getHours()) +
                ':' + pad(this.getMinutes()) +
                ':' + pad(this.getSeconds()) +
                '.' + '000';
            return v;
        };
        function pad(number) {
            if (number < 10) {
                return '0' + number;
            }
            return number;
        }
    }
}
AppComponent.ɵfac = function AppComponent_Factory(t) { return new (t || AppComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_1__.Router), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_platform_browser__WEBPACK_IMPORTED_MODULE_5__.Title), _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_1__.ActivatedRoute)); };
AppComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({ type: AppComponent, selectors: [["app-root"]], decls: 2, vars: 0, template: function AppComponent_Template(rf, ctx) { if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "router-outlet")(1, "ng-http-loader");
    } }, dependencies: [_angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterOutlet, ng_http_loader__WEBPACK_IMPORTED_MODULE_6__.NgHttpLoaderComponent], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJhcHAuY29tcG9uZW50LnNjc3MifQ== */"] });


/***/ }),

/***/ 6747:
/*!*******************************!*\
  !*** ./src/app/app.module.ts ***!
  \*******************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "AppModule": () => (/* binding */ AppModule)
/* harmony export */ });
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/platform-browser */ 4497);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/common/http */ 8987);
/* harmony import */ var ng_http_loader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ng-http-loader */ 6298);
/* harmony import */ var _services_http_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./services/http.service */ 6858);
/* harmony import */ var _services_token_decode_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services/token-decode.service */ 8002);
/* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app-routing.module */ 158);
/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./app.component */ 5041);
/* harmony import */ var _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/platform-browser/animations */ 7146);
/* harmony import */ var _services_token_interceptor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./services/token.interceptor */ 3643);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ngx-toastr */ 4817);
/* harmony import */ var _component_custom_toast_custom_toast_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./component/custom-toast/custom-toast.component */ 1280);
/* harmony import */ var ngx_indexed_db__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ngx-indexed-db */ 9879);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/core */ 2560);


//spinner














const dbConfig = {
    name: 'MarketplaceDB',
    version: 1,
    objectStoresMeta: [{
            store: 'Categories',
            storeConfig: { keyPath: null, autoIncrement: true },
            storeSchema: []
        }]
};
class AppModule {
}
AppModule.ɵfac = function AppModule_Factory(t) { return new (t || AppModule)(); };
AppModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineNgModule"]({ type: AppModule, bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_3__.AppComponent] });
AppModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵdefineInjector"]({ providers: [{
            provide: _angular_common_http__WEBPACK_IMPORTED_MODULE_7__.HTTP_INTERCEPTORS,
            useClass: _services_token_interceptor__WEBPACK_IMPORTED_MODULE_4__.TokenInterceptor,
            multi: true
        }, _services_http_service__WEBPACK_IMPORTED_MODULE_0__.HttpService, _services_token_decode_service__WEBPACK_IMPORTED_MODULE_1__.TokenDecodeService], imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_8__.BrowserModule,
        _app_routing_module__WEBPACK_IMPORTED_MODULE_2__.AppRoutingModule,
        _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__.BrowserAnimationsModule,
        ngx_toastr__WEBPACK_IMPORTED_MODULE_10__.ToastrModule.forRoot({
            toastComponent: _component_custom_toast_custom_toast_component__WEBPACK_IMPORTED_MODULE_5__.CustomToastComponent,
            positionClass: "toast-bottom-right",
            closeButton: true
        }),
        _angular_common_http__WEBPACK_IMPORTED_MODULE_7__.HttpClientModule,
        ngx_indexed_db__WEBPACK_IMPORTED_MODULE_11__.NgxIndexedDBModule.forRoot(dbConfig),
        ng_http_loader__WEBPACK_IMPORTED_MODULE_12__.NgHttpLoaderModule.forRoot()] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_6__["ɵɵsetNgModuleScope"](AppModule, { declarations: [_app_component__WEBPACK_IMPORTED_MODULE_3__.AppComponent,
        _component_custom_toast_custom_toast_component__WEBPACK_IMPORTED_MODULE_5__.CustomToastComponent], imports: [_angular_platform_browser__WEBPACK_IMPORTED_MODULE_8__.BrowserModule,
        _app_routing_module__WEBPACK_IMPORTED_MODULE_2__.AppRoutingModule,
        _angular_platform_browser_animations__WEBPACK_IMPORTED_MODULE_9__.BrowserAnimationsModule, ngx_toastr__WEBPACK_IMPORTED_MODULE_10__.ToastrModule, _angular_common_http__WEBPACK_IMPORTED_MODULE_7__.HttpClientModule, ngx_indexed_db__WEBPACK_IMPORTED_MODULE_11__.NgxIndexedDBModule, ng_http_loader__WEBPACK_IMPORTED_MODULE_12__.NgHttpLoaderModule] }); })();


/***/ }),

/***/ 1280:
/*!******************************************************************!*\
  !*** ./src/app/component/custom-toast/custom-toast.component.ts ***!
  \******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "CustomToastComponent": () => (/* binding */ CustomToastComponent)
/* harmony export */ });
/* harmony import */ var _angular_animations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/animations */ 4851);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ngx-toastr */ 4817);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 2560);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common */ 4666);





const _c0 = ["custom-toast-component", ""];
function CustomToastComponent_div_1_a_6_Template(rf, ctx) { if (rf & 1) {
    const _r7 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "a", 10);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function CustomToastComponent_div_1_a_6_Template_a_click_0_listener() { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r7); const ctx_r6 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](2); return _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵresetView"](ctx_r6.remove()); });
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, " x ");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} }
function CustomToastComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 6)(1, "div", 7)(2, "div")(3, "h4");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](4);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()()();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](5, "div", 8);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](6, CustomToastComponent_div_1_a_6_Template, 2, 0, "a", 9);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]()();
} if (rf & 2) {
    const ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("display", ctx_r0.state.value === "inactive" ? "none" : "");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](ctx_r0.options.titleClass);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-label", ctx_r0.title);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate"](ctx_r0.title);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](2);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx_r0.options.closeButton);
} }
const _c1 = function (a0) { return { "notitle": a0 }; };
function CustomToastComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](0, "div", 11);
} if (rf & 2) {
    const ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](ctx_r1.options.messageClass);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](4, _c1, ctx_r1.title == null))("innerHTML", ctx_r1.message, _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsanitizeHtml"]);
} }
function CustomToastComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 12);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    const ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵclassMap"](ctx_r2.options.messageClass);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngClass", _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵpureFunction1"](5, _c1, ctx_r2.title == null));
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵattribute"]("aria-label", ctx_r2.message);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtextInterpolate1"](" ", ctx_r2.message, " ");
} }
function CustomToastComponent_a_4_Template(rf, ctx) { if (rf & 1) {
    const _r9 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵgetCurrentView"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "a", 10);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵlistener"]("click", function CustomToastComponent_a_4_Template_a_click_0_listener() { _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵrestoreView"](_r9); const ctx_r8 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"](); return _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵresetView"](ctx_r8.remove()); });
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtext"](1, " x ");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} }
function CustomToastComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div");
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelement"](1, "div", 13);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
} if (rf & 2) {
    const ctx_r4 = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵnextContext"]();
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
    _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵstyleProp"]("width", ctx_r4.width + "%");
} }
class CustomToastComponent extends ngx_toastr__WEBPACK_IMPORTED_MODULE_1__.Toast {
    // constructor is only necessary when not using AoT
    constructor(toastrService, toastPackage) {
        super(toastrService, toastPackage);
        this.toastrService = toastrService;
        this.toastPackage = toastPackage;
    }
    ngOnInit() {
        //Called after the constructor, initializing input properties, and the first call to ngOnChanges.
        //Add 'implements OnInit' to the class.
    }
    action(event) {
        event.stopPropagation();
        this.toastPackage.triggerAction();
        return false;
    }
}
CustomToastComponent.ɵfac = function CustomToastComponent_Factory(t) { return new (t || CustomToastComponent)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_1__.ToastrService), _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdirectiveInject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_1__.ToastPackage)); };
CustomToastComponent.ɵcmp = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineComponent"]({ type: CustomToastComponent, selectors: [["", "custom-toast-component", ""]], features: [_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵInheritDefinitionFeature"]], attrs: _c0, decls: 6, vars: 5, consts: [[1, "toast-case"], ["class", "row toast-header", 3, "display", 4, "ngIf"], ["class", "row toast-body", "role", "alert", "aria-live", "polite", 3, "ngClass", "class", "innerHTML", 4, "ngIf"], ["class", "row toast-body", "role", "alert", "aria-live", "polite", 3, "ngClass", "class", 4, "ngIf"], ["class", "btn toast-close-button btn-sm ", 3, "click", 4, "ngIf"], [4, "ngIf"], [1, "row", "toast-header"], [1, "col-9", "px-0"], [1, "col-auto", "mt-5", "pe-0"], ["class", "btn toast-close-button btn-sm", 3, "click", 4, "ngIf"], [1, "btn", "toast-close-button", "btn-sm", 3, "click"], ["role", "alert", "aria-live", "polite", 1, "row", "toast-body", 3, "ngClass", "innerHTML"], ["role", "alert", "aria-live", "polite", 1, "row", "toast-body", 3, "ngClass"], [1, "toast-progress"]], template: function CustomToastComponent_Template(rf, ctx) { if (rf & 1) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementStart"](0, "div", 0);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](1, CustomToastComponent_div_1_Template, 7, 7, "div", 1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](2, CustomToastComponent_div_2_Template, 1, 6, "div", 2);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](3, CustomToastComponent_div_3_Template, 2, 7, "div", 3);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](4, CustomToastComponent_a_4_Template, 2, 0, "a", 4);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵtemplate"](5, CustomToastComponent_div_5_Template, 2, 2, "div", 5);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵelementEnd"]();
    } if (rf & 2) {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.title);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.message && ctx.options.enableHtml);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.message && !ctx.options.enableHtml);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.options.closeButton && ctx.title == null);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵadvance"](1);
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵproperty"]("ngIf", ctx.options.progressBar);
    } }, dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_2__.NgClass, _angular_common__WEBPACK_IMPORTED_MODULE_2__.NgIf], styles: ["[_nghost-%COMP%] {\n  background-color: white;\n  position: relative;\n  overflow: hidden;\n  margin: 0 0 6px;\n  width: 300px;\n  border-radius: 3px 3px 3px 3px;\n  color: #141414;\n  pointer-events: all;\n  cursor: pointer;\n}\n\n.toast-success[_nghost-%COMP%] {\n  border: 1.8px solid rgb(81, 163, 81);\n}\n\n.toast-info[_nghost-%COMP%] {\n  border: 1.8px solid rgb(47, 150, 180);\n}\n\n.toast-error[_nghost-%COMP%] {\n  border: 1.8px solid rgb(189, 54, 47);\n}\n\n.toast-warning[_nghost-%COMP%] {\n  border: 1.8px solid rgb(248, 148, 6);\n}\n\n.toast-case[_ngcontent-%COMP%] {\n  margin-left: 10px;\n}\n\n.toast-header[_ngcontent-%COMP%] {\n  background-clip: padding-box;\n  border-bottom: solid;\n  border-width: 1px;\n  padding-bottom: 0rem;\n  padding-top: 0rem;\n  padding-right: 0px;\n}\n\n.toast-title[_ngcontent-%COMP%] {\n  color: black;\n}\n\n.toast-body[_ngcontent-%COMP%] {\n  padding-top: 0.6rem;\n}\n\n.notitle[_ngcontent-%COMP%] {\n  margin-bottom: -1rem;\n}\n\n.toast-close-button-custom[_ngcontent-%COMP%] {\n  right: 0.2em !important;\n  top: -1.3em !important;\n}\n\n.toast-close-button-notitle[_ngcontent-%COMP%] {\n  right: 0.1em !important;\n  top: -1.3em !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS10b2FzdC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNJLHVCQUFBO0VBQ0Esa0JBQUE7RUFDQSxnQkFBQTtFQUNBLGVBQUE7RUFDQSxZQUFBO0VBQ0EsOEJBQUE7RUFDQSxjQUFBO0VBQ0EsbUJBQUE7RUFDQSxlQUFBO0FBQ0o7O0FBRUk7RUFDSSxvQ0FBQTtBQ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: { animation: [
            (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.trigger)('flyInOut', [
                (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.state)('inactive', (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                    opacity: 0,
                })),
                (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.transition)('inactive => active', (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.animate)('400ms ease-out', (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.keyframes)([
                    (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                        transform: 'translate3d(100%, 0, 0) skewX(-30deg)',
                        opacity: 0,
                    }),
                    (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                        transform: 'skewX(20deg)',
                        opacity: 1,
                    }),
                    (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                        transform: 'skewX(-5deg)',
                        opacity: 1,
                    }),
                    (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                        transform: 'none',
                        opacity: 1,
                    }),
                ]))),
                (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.transition)('active => removed', (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.animate)('400ms ease-out', (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.keyframes)([
                    (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                        opacity: 1,
                    }),
                    (0,_angular_animations__WEBPACK_IMPORTED_MODULE_3__.style)({
                        transform: 'translate3d(100%, 0, 0) skewX(30deg)',
                        opacity: 0,
                    }),
                ]))),
            ]),
        ] } });


/***/ }),

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

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "HttpService": () => (/* binding */ HttpService)
/* harmony export */ });
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs */ 6317);
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ 833);
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ 7580);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ 2560);
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common/http */ 8987);
/* harmony import */ var ngx_toastr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ngx-toastr */ 4817);





class HttpService {
    constructor(http, toastr) {
        this.http = http;
        this.toastr = toastr;
        this._serverUrl = "";
        this.currentRequest = new rxjs__WEBPACK_IMPORTED_MODULE_0__.BehaviorSubject(0);
    }
    get serverUrl() {
        return this._serverUrl;
    }
    set serverUrl(value) {
        this._serverUrl = value;
    }
    addRequest() {
        this.currentRequest.next(this.currentRequest.value + 1);
    }
    removeRequest() {
        this.currentRequest.next(this.currentRequest.value - 1);
    }
    post(url, data, time = 100000) {
        return new rxjs__WEBPACK_IMPORTED_MODULE_1__.Observable((observer) => {
            this.addRequest();
            this.http
                .post(url, data)
                .pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_2__.timeout)(time))
                .subscribe((result) => {
                this.removeRequest();
                observer.next(result);
                observer.complete();
            }, (err) => {
                //Exception Handling
                this.removeRequest();
                if (err.status == 200) {
                    //when Response is not application/json ex: some API return text/csv
                    observer.next(err.error.text);
                    observer.complete();
                }
                else {
                    let unauthorized = this.unauthorizedErrorHandling(err);
                    if (!unauthorized) {
                        let errMessage = this.errorMessageHandling(err);
                        this.toastr.error(errMessage.message != ""
                            ? errMessage.message
                            : "An unknown error has occured!", errMessage.header, { enableHtml: true });
                    }
                    observer.error(err);
                }
            });
        });
    }
    unauthorizedErrorHandling(err) {
        let retVal = false;
        if (err.status == 401) {
            //Unauthorized Error Handling
            let token = localStorage.getItem("Token");
            if (token) {
                window.location.href = "/A/Unauthorized/Main/Unauthorized";
            }
            else {
                //redirect to Login page if there is no JWT TOKEN available
                window.location.href = "/";
            }
            retVal = true;
        }
        return retVal;
    }
    errorMessageHandling(err) {
        let header = "API Error";
        let message = "Exception Message";
        if (err.error) {
            //Handle 4XX error and 5XX Error
            header = "API Error - " + err.status;
            if (err.error.Message) {
                if (err.error.Message.indexOf("Message") != -1) {
                    let msg = JSON.parse(err.error.Message);
                    message = msg.Message;
                }
                else {
                    message = err.error.Message;
                }
            }
        }
        else {
            if (err.message) {
                //Handle timeout scenario we do not receive HTTP StatusCode
                header = "API Error - " + err.name;
                message = err.message;
            }
        }
        return { header: header, message: message };
    }
}
HttpService.ɵfac = function HttpService_Factory(t) { return new (t || HttpService)(_angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](_angular_common_http__WEBPACK_IMPORTED_MODULE_4__.HttpClient), _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵinject"](ngx_toastr__WEBPACK_IMPORTED_MODULE_5__.ToastrService)); };
HttpService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_3__["ɵɵdefineInjectable"]({ token: HttpService, factory: HttpService.ɵfac, providedIn: "root" });


/***/ }),

/***/ 8002:
/*!**************************************************!*\
  !*** ./src/app/services/token-decode.service.ts ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TokenDecodeService": () => (/* binding */ TokenDecodeService)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 2560);

class TokenDecodeService {
    constructor() { }
    GetNamePOS() {
        let jsontoken = JSON.parse(window.localStorage.getItem('user'));
        return this.ParseToken(jsontoken.Token.access_token);
    }
    ParseToken(token) {
        try {
            // Get Token Header
            const base64HeaderUrl = token.split('.')[0];
            const base64Header = base64HeaderUrl.replace('-', '+').replace('_', '/');
            const headerData = JSON.parse(window.atob(base64Header));
            // Get Token payload and date's
            const base64Url = token.split('.')[1];
            const base64 = base64Url.replace('-', '+').replace('_', '/');
            const dataJWT = JSON.parse(window.atob(base64));
            dataJWT.header = headerData;
            // TODO: add expiration at check ...
            return dataJWT;
        }
        catch (err) {
            return false;
        }
    }
}
TokenDecodeService.ɵfac = function TokenDecodeService_Factory(t) { return new (t || TokenDecodeService)(); };
TokenDecodeService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: TokenDecodeService, factory: TokenDecodeService.ɵfac, providedIn: 'root' });


/***/ }),

/***/ 3643:
/*!***********************************************!*\
  !*** ./src/app/services/token.interceptor.ts ***!
  \***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "TokenInterceptor": () => (/* binding */ TokenInterceptor)
/* harmony export */ });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 2560);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ 124);


class TokenInterceptor {
    constructor(_router) {
        this._router = _router;
    }
    intercept(request, next) {
        let jsontoken = JSON.parse(window.localStorage.getItem('user'));
        let now = new Date();
        if (jsontoken != null) {
            let expired = new Date(jsontoken.Token.expiredAt);
            if (now < expired) {
                request = request.clone({
                    setHeaders: {
                        'Content-Type': 'application/json',
                        Authorization: `Bearer ${jsontoken.Token.access_token}`
                    }
                });
            }
            else {
                request = request.clone({
                    setHeaders: {
                        'Content-Type': 'application/json'
                    }
                });
            }
        }
        else {
            request = request.clone({
                setHeaders: {
                    'Content-Type': 'application/json'
                }
            });
        }
        return next.handle(request);
    }
}
TokenInterceptor.ɵfac = function TokenInterceptor_Factory(t) { return new (t || TokenInterceptor)(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵinject"](_angular_router__WEBPACK_IMPORTED_MODULE_1__.Router)); };
TokenInterceptor.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: TokenInterceptor, factory: TokenInterceptor.ɵfac });


/***/ }),

/***/ 2340:
/*!*****************************************!*\
  !*** ./src/environments/environment.ts ***!
  \*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "environment": () => (/* binding */ environment)
/* harmony export */ });
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
const environment = {
    production: false
};
/*
 * For easier debugging in development mode, you can import the following file
 * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
 *
 * This import should be commented out in production mode because it will have a negative impact
 * on performance if an error is thrown.
 */
// import 'zone.js/plugins/zone-error';  // Included with Angular CLI.


/***/ }),

/***/ 4431:
/*!*********************!*\
  !*** ./src/main.ts ***!
  \*********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser */ 4497);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 2560);
/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app/app.module */ 6747);
/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./environments/environment */ 2340);




if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__.environment.production) {
    (0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.enableProdMode)();
}
_angular_platform_browser__WEBPACK_IMPORTED_MODULE_3__.platformBrowser().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_0__.AppModule)
    .catch(err => console.error(err));


/***/ })

},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ __webpack_require__.O(0, ["vendor"], () => (__webpack_exec__(4431)));
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=main.js.map