(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/common'), require('@ngx-translate/http-loader'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http')) :
    typeof define === 'function' && define.amd ? define('emdev-toolkit', ['exports', '@angular/core', '@angular/forms', '@angular/common', '@ngx-translate/http-loader', 'rxjs', 'rxjs/operators', '@angular/common/http'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['emdev-toolkit'] = {}, global.ng.core, global.ng.forms, global.ng.common, global.httpLoader, global.rxjs, global.rxjs.operators, global.ng.common.http));
}(this, (function (exports, core, forms, common, httpLoader, rxjs, operators, http) { 'use strict';

    var DateValidator = /** @class */ (function () {
        function DateValidator() {
            this.validator = this.dateValidator();
        }
        DateValidator.prototype.validate = function (c) {
            return this.validator(c);
        };
        DateValidator.prototype.dateValidator = function () {
            return function (control) {
                var date = control.value;
                if (date === null || date === undefined) {
                    return { 'dateValidator': false };
                }
                control.markAsTouched();
                var toDay = new Date();
                if (typeof date._i === 'object') {
                    if (!(date._i.date > 0 && date._i.date <= 31)
                        || !((date._i.month + 1) > 0 && (date._i.month + 1) <= 12)
                        || !(date._i.year > (toDay.getFullYear() - 120))) {
                        return { 'dateValidator': true };
                    }
                }
                else if (typeof date._i === 'string') {
                    var buffer = date._i.split('/');
                    if (buffer.length === 1 && date._i.length === 8) {
                        buffer[0] = date._i.substr(0, 2);
                        buffer[1] = date._i.substr(2, 2);
                        buffer[2] = date._i.substr(4, 4);
                    }
                    if (buffer.length < 3
                        || !(Number(buffer[0]) > 0 && Number(buffer[0]) <= 31)
                        || !(Number(buffer[1]) > 0 && Number(buffer[1]) <= 12)
                        || !(Number(buffer[2]) > (toDay.getFullYear() - 120) && Number(buffer[2]))) {
                        return { 'dateValidator': true };
                    }
                }
                else {
                    var newdate = new Date(date);
                    var day = newdate.getDate();
                    var month = newdate.getMonth();
                    var year = newdate.getFullYear();
                    if (!(day > 0 && day <= 31)
                        || !((month + 1) > 0 && (month + 1) <= 12)
                        || !(year && year > (toDay.getFullYear() - 120))) {
                        return { 'dateValidator': true };
                    }
                }
                return null;
            };
        };
        return DateValidator;
    }());
    DateValidator.decorators = [
        { type: core.Directive, args: [{
                    selector: '[dateValidator][ngModel]',
                    providers: [
                        {
                            provide: forms.NG_VALIDATORS,
                            useExisting: DateValidator,
                            multi: true
                        }
                    ]
                },] }
    ];
    DateValidator.ctorParameters = function () { return []; };

    var CpfValidator = /** @class */ (function () {
        function CpfValidator() {
            this.validator = this.cpfValidator();
        }
        CpfValidator.prototype.validate = function (c) {
            return this.validator(c);
        };
        CpfValidator.prototype.cpfValidator = function () {
            return function (control) {
                var cpf = control.value;
                if (cpf === null || cpf === undefined) {
                    return { 'cpfValidator': false };
                }
                var regExp = RegExp('[0-9]{3}\.?[0-9]{3}\.?[0-9]{3}\-?[0-9]{2}');
                control.markAsTouched();
                if (!regExp.test(cpf)) {
                    return { 'cpfValidator': false };
                }
                cpf = cpf.replace(/\./g, '');
                cpf = cpf.replace(/\-/g, '');
                cpf = cpf.replace(/\_/g, '');
                if (cpf.length !== 11) {
                    return { 'cpfValidator': false };
                }
                var c = cpf.substr(0, 9);
                var dv = cpf.substr(9, 2);
                var d1 = 0;
                for (var i = 0; i < 9; i++) {
                    d1 += c.charAt(i) * (10 - i);
                }
                if (d1 === 0) {
                    return { 'cpfValidator': false };
                }
                d1 = 11 - (d1 % 11);
                if (d1 > 9) {
                    d1 = 0;
                }
                if (Number(dv.charAt(0)) !== d1) {
                    return { 'cpfValidator': false };
                }
                d1 *= 2;
                for (var i = 0; i < 9; i++) {
                    d1 += c.charAt(i) * (11 - i);
                }
                d1 = 11 - (d1 % 11);
                if (d1 > 9) {
                    d1 = 0;
                }
                if (Number(dv.charAt(1)) !== d1) {
                    return { 'cpfValidator': false };
                }
                return null;
            };
        };
        return CpfValidator;
    }());
    CpfValidator.decorators = [
        { type: core.Directive, args: [{
                    selector: '[cpfValidator][ngModel]',
                    providers: [
                        {
                            provide: forms.NG_VALIDATORS,
                            useExisting: CpfValidator,
                            multi: true
                        }
                    ]
                },] }
    ];
    CpfValidator.ctorParameters = function () { return []; };

    var EmailValidator = /** @class */ (function () {
        function EmailValidator() {
            this.validator = this.emailValidator();
        }
        EmailValidator.prototype.validate = function (c) {
            return this.validator(c);
        };
        EmailValidator.prototype.emailValidator = function () {
            return function (control) {
                var email = control.value;
                var regExp = RegExp('[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$');
                control.markAsTouched();
                if (email !== null && email !== undefined && !regExp.test(email)) {
                    return { 'emailValidator': true };
                }
                return null;
            };
        };
        return EmailValidator;
    }());
    EmailValidator.decorators = [
        { type: core.Directive, args: [{
                    selector: '[emailValidator][ngModel]',
                    providers: [
                        {
                            provide: forms.NG_VALIDATORS,
                            useExisting: EmailValidator,
                            multi: true
                        }
                    ]
                },] }
    ];
    EmailValidator.ctorParameters = function () { return []; };

    var NameValidator = /** @class */ (function () {
        function NameValidator() {
            this.validator = this.nameValidator();
        }
        NameValidator.prototype.validate = function (c) {
            return this.validator(c);
        };
        NameValidator.prototype.nameValidator = function () {
            return function (control) {
                var text = control.value;
                if (text === null || text === undefined) {
                    return { 'nameValidator': false };
                }
                control.markAsTouched();
                var regExp = RegExp('^([A-Za-zà-úÀ-Ú]|[0-9]| )+$');
                if (!regExp.test(text)) {
                    return { 'nameValidator': false };
                }
                var parts = text.split(' ');
                var current = (parts.length - 1);
                if (current < 1) {
                    return { 'nameValidator': false };
                }
                return null;
            };
        };
        return NameValidator;
    }());
    NameValidator.decorators = [
        { type: core.Directive, args: [{
                    selector: '[nameValidator][ngModel]',
                    providers: [
                        {
                            provide: forms.NG_VALIDATORS,
                            useExisting: NameValidator,
                            multi: true
                        }
                    ]
                },] }
    ];
    NameValidator.ctorParameters = function () { return []; };

    var ResumeNames = /** @class */ (function () {
        function ResumeNames() {
        }
        ResumeNames.prototype.transform = function (value) {
            if (value) {
                var args = value.trim().split(' ');
                if (args.length > 1) {
                    return args[0] + ' ' + args[args.length - 1];
                }
                return args[1];
            }
            return null;
        };
        return ResumeNames;
    }());
    ResumeNames.decorators = [
        { type: core.Pipe, args: [{ name: 'resumeNames' },] }
    ];

    var FirstLetterSplit = /** @class */ (function () {
        function FirstLetterSplit() {
        }
        FirstLetterSplit.prototype.transform = function (value) {
            if (value) {
                var args = value.trim().split(' ');
                var newValue_1 = [];
                args.forEach(function (element) {
                    newValue_1.push(element.substr(0, 1));
                });
                return newValue_1.join('');
            }
            return null;
        };
        return FirstLetterSplit;
    }());
    FirstLetterSplit.decorators = [
        { type: core.Pipe, args: [{ name: 'firstLetterSplit' },] }
    ];

    var Validators = [
        DateValidator,
        CpfValidator,
        EmailValidator,
        NameValidator,
    ];
    var Pipes = [
        ResumeNames,
        FirstLetterSplit
    ];
    var EmdevToolkitModule = /** @class */ (function () {
        function EmdevToolkitModule() {
        }
        return EmdevToolkitModule;
    }());
    EmdevToolkitModule.decorators = [
        { type: core.NgModule, args: [{
                    declarations: [
                        Validators,
                        Pipes
                    ],
                    imports: [
                        common.CommonModule
                    ],
                    exports: [
                        Validators,
                        Pipes
                    ]
                },] }
    ];

    (function (TypeEmailEnum) {
        TypeEmailEnum[TypeEmailEnum["Business"] = 0] = "Business";
        TypeEmailEnum[TypeEmailEnum["Personal"] = 1] = "Personal";
    })(exports.TypeEmailEnum || (exports.TypeEmailEnum = {}));

    (function (TypeGenderEnum) {
        TypeGenderEnum[TypeGenderEnum["male"] = 1] = "male";
        TypeGenderEnum[TypeGenderEnum["female"] = 2] = "female";
    })(exports.TypeGenderEnum || (exports.TypeGenderEnum = {}));

    (function (TypeLevelUser) {
        TypeLevelUser[TypeLevelUser["superAdministrator"] = 1] = "superAdministrator";
        TypeLevelUser[TypeLevelUser["administrator"] = 2] = "administrator";
        TypeLevelUser[TypeLevelUser["manager"] = 3] = "manager";
        TypeLevelUser[TypeLevelUser["responsible"] = 4] = "responsible";
        TypeLevelUser[TypeLevelUser["user"] = 5] = "user";
    })(exports.TypeLevelUser || (exports.TypeLevelUser = {}));

    (function (TypeResponse) {
        TypeResponse[TypeResponse["success"] = 200] = "success";
        TypeResponse[TypeResponse["created"] = 201] = "created";
        TypeResponse[TypeResponse["noContent"] = 204] = "noContent";
        TypeResponse[TypeResponse["badRequest"] = 400] = "badRequest";
        TypeResponse[TypeResponse["unauthorized"] = 401] = "unauthorized";
        TypeResponse[TypeResponse["forbidden"] = 403] = "forbidden";
        TypeResponse[TypeResponse["notFound"] = 404] = "notFound";
        TypeResponse[TypeResponse["logoutAll"] = 406] = "logoutAll";
        TypeResponse[TypeResponse["logout"] = 410] = "logout";
        TypeResponse[TypeResponse["exception"] = 500] = "exception";
        TypeResponse[TypeResponse["notImplemented"] = 501] = "notImplemented";
    })(exports.TypeResponse || (exports.TypeResponse = {}));

    (function (PersonTypeDocumentEnum) {
        PersonTypeDocumentEnum[PersonTypeDocumentEnum["CPF"] = 1] = "CPF";
    })(exports.PersonTypeDocumentEnum || (exports.PersonTypeDocumentEnum = {}));

    (function (PersonTypeContactEnum) {
        PersonTypeContactEnum[PersonTypeContactEnum["EMAIL_LOGIN"] = 1] = "EMAIL_LOGIN";
        PersonTypeContactEnum[PersonTypeContactEnum["EMAIL_NOTIFICATION"] = 2] = "EMAIL_NOTIFICATION";
        PersonTypeContactEnum[PersonTypeContactEnum["CELL_PHONE"] = 3] = "CELL_PHONE";
    })(exports.PersonTypeContactEnum || (exports.PersonTypeContactEnum = {}));

    var TokenModel = /** @class */ (function () {
        function TokenModel() {
        }
        return TokenModel;
    }());

    var PageParamsModel = /** @class */ (function () {
        function PageParamsModel() {
            this.current = 0;
            this.limit = 12;
            this.options = [5, 12, 20, 45, 60, 80, 100];
        }
        return PageParamsModel;
    }());

    var PageResponseModel = /** @class */ (function () {
        function PageResponseModel() {
            this.current = 0;
            this.limit = 25;
            this.total = 0;
        }
        return PageResponseModel;
    }());

    var LanguageModel = /** @class */ (function () {
        function LanguageModel() {
        }
        return LanguageModel;
    }());

    var SourceModel = /** @class */ (function () {
        function SourceModel() {
        }
        return SourceModel;
    }());

    var RenewTokenModel = /** @class */ (function () {
        function RenewTokenModel() {
        }
        return RenewTokenModel;
    }());

    var AppModel = /** @class */ (function () {
        function AppModel() {
        }
        return AppModel;
    }());

    var AccountAppModel = /** @class */ (function () {
        function AccountAppModel() {
        }
        return AccountAppModel;
    }());

    var NotificationsModel = /** @class */ (function () {
        function NotificationsModel() {
        }
        return NotificationsModel;
    }());

    var AppSessionService = /** @class */ (function () {
        function AppSessionService() {
            this.hasUpdateUserData = new core.EventEmitter();
        }
        AppSessionService.prototype.getDataToken = function (token) {
            if (token) {
                var buffer = token.split('.');
                if (buffer.length === 3) {
                    return JSON.parse(atob(buffer[1]));
                }
            }
            return null;
        };
        AppSessionService.prototype.goToCallback = function (storagePrefix, protocol, urlApp, autorization) {
            var stringSource = sessionStorage.getItem(storagePrefix + "source");
            var source;
            if (stringSource) {
                source = JSON.parse(stringSource);
            }
            else {
                source = {
                    app: 'profile',
                    url: protocol + "profile" + urlApp
                };
            }
            sessionStorage.removeItem(storagePrefix + "source");
            window.location.href = source.url + '?callback=' + autorization;
        };
        AppSessionService.prototype.goToAppAuth = function (app, protocol, pathAuthenticate, urlApp, sourceUrl, route) {
            if (sourceUrl === void 0) { sourceUrl = null; }
            if (route === void 0) { route = 'login'; }
            var source = btoa(JSON.stringify({
                app: app,
                url: sourceUrl
            }));
            window.location.href = "" + protocol + pathAuthenticate + urlApp + "/" + route + "/?source=" + source;
        };
        AppSessionService.prototype.goToApp = function (app, protocol, urlApp) {
            window.location.href = "" + protocol + app.path + urlApp + "/login/";
        };
        return AppSessionService;
    }());
    AppSessionService.decorators = [
        { type: core.Injectable }
    ];

    /*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */
    /* global Reflect, Promise */
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b)
                if (Object.prototype.hasOwnProperty.call(b, p))
                    d[p] = b[p]; };
        return extendStatics(d, b);
    };
    function __extends(d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    }
    var __assign = function () {
        __assign = Object.assign || function __assign(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
                s = arguments[i];
                for (var p in s)
                    if (Object.prototype.hasOwnProperty.call(s, p))
                        t[p] = s[p];
            }
            return t;
        };
        return __assign.apply(this, arguments);
    };
    function __rest(s, e) {
        var t = {};
        for (var p in s)
            if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
                t[p] = s[p];
        if (s != null && typeof Object.getOwnPropertySymbols === "function")
            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                    t[p[i]] = s[p[i]];
            }
        return t;
    }
    function __decorate(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;
    }
    function __param(paramIndex, decorator) {
        return function (target, key) { decorator(target, key, paramIndex); };
    }
    function __metadata(metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
            return Reflect.metadata(metadataKey, metadataValue);
    }
    function __awaiter(thisArg, _arguments, P, generator) {
        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
        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) : adopt(result.value).then(fulfilled, rejected); }
            step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
    }
    function __generator(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 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
                        return t;
                    if (y = 0, t)
                        op = [op[0] & 2, 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 __createBinding = Object.create ? (function (o, m, k, k2) {
        if (k2 === undefined)
            k2 = k;
        Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
    }) : (function (o, m, k, k2) {
        if (k2 === undefined)
            k2 = k;
        o[k2] = m[k];
    });
    function __exportStar(m, o) {
        for (var p in m)
            if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
                __createBinding(o, m, p);
    }
    function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
        if (m)
            return m.call(o);
        if (o && typeof o.length === "number")
            return {
                next: function () {
                    if (o && i >= o.length)
                        o = void 0;
                    return { value: o && o[i++], done: !o };
                }
            };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    }
    function __read(o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m)
            return o;
        var i = m.call(o), r, ar = [], e;
        try {
            while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
                ar.push(r.value);
        }
        catch (error) {
            e = { error: error };
        }
        finally {
            try {
                if (r && !r.done && (m = i["return"]))
                    m.call(i);
            }
            finally {
                if (e)
                    throw e.error;
            }
        }
        return ar;
    }
    /** @deprecated */
    function __spread() {
        for (var ar = [], i = 0; i < arguments.length; i++)
            ar = ar.concat(__read(arguments[i]));
        return ar;
    }
    /** @deprecated */
    function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++)
            s += arguments[i].length;
        for (var r = Array(s), k = 0, i = 0; i < il; i++)
            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                r[k] = a[j];
        return r;
    }
    function __spreadArray(to, from) {
        for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
            to[j] = from[i];
        return to;
    }
    function __await(v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
    }
    function __asyncGenerator(thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator)
            throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []), i, q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
        function verb(n) { if (g[n])
            i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
        function resume(n, v) { try {
            step(g[n](v));
        }
        catch (e) {
            settle(q[0][3], e);
        } }
        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
        function fulfill(value) { resume("next", value); }
        function reject(value) { resume("throw", value); }
        function settle(f, v) { if (f(v), q.shift(), q.length)
            resume(q[0][0], q[0][1]); }
    }
    function __asyncDelegator(o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
    }
    function __asyncValues(o) {
        if (!Symbol.asyncIterator)
            throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator], i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
    }
    function __makeTemplateObject(cooked, raw) {
        if (Object.defineProperty) {
            Object.defineProperty(cooked, "raw", { value: raw });
        }
        else {
            cooked.raw = raw;
        }
        return cooked;
    }
    ;
    var __setModuleDefault = Object.create ? (function (o, v) {
        Object.defineProperty(o, "default", { enumerable: true, value: v });
    }) : function (o, v) {
        o["default"] = v;
    };
    function __importStar(mod) {
        if (mod && mod.__esModule)
            return mod;
        var result = {};
        if (mod != null)
            for (var k in mod)
                if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
                    __createBinding(result, mod, k);
        __setModuleDefault(result, mod);
        return result;
    }
    function __importDefault(mod) {
        return (mod && mod.__esModule) ? mod : { default: mod };
    }
    function __classPrivateFieldGet(receiver, privateMap) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to get private field on non-instance");
        }
        return privateMap.get(receiver);
    }
    function __classPrivateFieldSet(receiver, privateMap, value) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to set private field on non-instance");
        }
        privateMap.set(receiver, value);
        return value;
    }

    var AppTranslateLoader = /** @class */ (function (_super) {
        __extends(AppTranslateLoader, _super);
        function AppTranslateLoader(httpClient, prefix, suffix) {
            var _this = _super.call(this, httpClient, prefix, suffix) || this;
            _this.iHttp = httpClient;
            _this.iPrefix = prefix;
            _this.iSuffix = suffix;
            return _this;
        }
        AppTranslateLoader.prototype.getTranslation = function (lang) {
            return rxjs.forkJoin([
                this.iHttp.get(this.iPrefix + '/' + this.iSuffix, { params: { lang: lang }, observe: 'body', responseType: 'json' }),
            ]).pipe(operators.map(function (response) {
                return response.reduce(function (defaults, enums) { return Object.assign(defaults, enums); });
            }));
        };
        return AppTranslateLoader;
    }(httpLoader.TranslateHttpLoader));

    var HttpService = /** @class */ (function () {
        function HttpService(http) {
            this.http = http;
        }
        HttpService.prototype.getNormalizedParams = function (params) {
            params = Object.assign([], params);
            if (params !== null) {
                Object.entries(params).forEach(function (_a) {
                    var _b = __read(_a, 2), key = _b[0], value = _b[1];
                    if (typeof value === 'object') {
                        params[key] = Object.values(value).join(',');
                    }
                });
            }
            if (params.options !== undefined) {
                delete params.options;
            }
            return params;
        };
        HttpService.prototype.get = function (url, params) {
            if (params === void 0) { params = null; }
            return this.http.get("" + url, { params: this.getNormalizedParams(params) });
        };
        HttpService.prototype.file = function (url, params) {
            if (params === void 0) { params = null; }
            return this.http.get(url, {
                params: this.getNormalizedParams(params),
                reportProgress: true,
                observe: 'events'
            });
        };
        HttpService.prototype.post = function (url, model, params) {
            if (params === void 0) { params = null; }
            return this.http.post("" + url, { model: model }, { params: this.getNormalizedParams(params) });
        };
        HttpService.prototype.put = function (url, model, params) {
            if (params === void 0) { params = null; }
            return this.http.put("" + url, { model: model }, { params: this.getNormalizedParams(params) });
        };
        HttpService.prototype.delete = function (url, data) {
            if (data === void 0) { data = null; }
            return this.http.delete("" + url, { params: this.getNormalizedParams(data) });
        };
        return HttpService;
    }());
    HttpService.decorators = [
        { type: core.Injectable }
    ];
    HttpService.ctorParameters = function () { return [
        { type: http.HttpClient }
    ]; };

    /*
     * Public API Surface of toolkit
     */

    /*
     * Public API Surface of toolkit
     */

    /**
     * Generated bundle index. Do not edit.
     */

    exports.AccountAppModel = AccountAppModel;
    exports.AppModel = AppModel;
    exports.AppSessionService = AppSessionService;
    exports.AppTranslateLoader = AppTranslateLoader;
    exports.EmdevToolkitModule = EmdevToolkitModule;
    exports.FirstLetterSplit = FirstLetterSplit;
    exports.HttpService = HttpService;
    exports.LanguageModel = LanguageModel;
    exports.NotificationsModel = NotificationsModel;
    exports.PageParamsModel = PageParamsModel;
    exports.PageResponseModel = PageResponseModel;
    exports.RenewTokenModel = RenewTokenModel;
    exports.ResumeNames = ResumeNames;
    exports.SourceModel = SourceModel;
    exports.TokenModel = TokenModel;
    exports.ɵa = DateValidator;
    exports.ɵb = CpfValidator;
    exports.ɵc = EmailValidator;
    exports.ɵd = NameValidator;
    exports.ɵe = ResumeNames;
    exports.ɵf = FirstLetterSplit;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=emdev-toolkit.umd.js.map
