UNPKG

56.2 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@fortawesome/free-solid-svg-icons"),require("@angular/forms"),require("@fortawesome/angular-fontawesome"),require("@ngx-translate/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@ng-bootstrap/ng-bootstrap"),require("@ngx-translate/http-loader"),require("@angular/platform-browser")):"function"==typeof define&&define.amd?define("ng-jhipster",["exports","@angular/core","@fortawesome/free-solid-svg-icons","@angular/forms","@fortawesome/angular-fontawesome","@ngx-translate/core","rxjs","rxjs/operators","@angular/common","@ng-bootstrap/ng-bootstrap","@ngx-translate/http-loader","@angular/platform-browser"],e):e((t=t||self)["ng-jhipster"]={},t.ng.core,t.freeSolidSvgIcons,t.ng.forms,t.angularFontawesome,t.i1,t.rxjs,t.rxjs.operators,t.ng.common,t.ngBootstrap,t.httpLoader,t.ng.platformBrowser)}(this,(function(t,e,n,r,a,s,i,o,c,l,u,d){"use strict";var p=function(){this.sortIcon=n.faSort,this.sortAscIcon=n.faSortUp,this.sortDescIcon=n.faSortDown,this.i18nEnabled=!1,this.defaultI18nLang="en",this.noi18nMessage="translation-not-found",this.alertAsToast=!1,this.alertTimeout=5e3,this.classBadgeTrue="badge badge-success",this.classBadgeFalse="badge badge-danger",this.classTrue="fa fa-lg fa-check text-success",this.classFalse="fa fa-lg fa-times text-danger"};p.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new p},token:p,providedIn:"root"}),p.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var h=function(){function t(t){this.CONFIG_OPTIONS=Object.assign(Object.assign({},new p),t)}return t.prototype.getConfig=function(){return this.CONFIG_OPTIONS},t}();h.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new h(e.ɵɵinject(p))},token:h,providedIn:"root"}),h.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:p}]};var g=function(){function t(t){this.i18nEnabled=t.CONFIG_OPTIONS.i18nEnabled}return t.prototype.i18nValues=function(){return{first:(this.page-1)*this.itemsPerPage==0?1:(this.page-1)*this.itemsPerPage+1,second:this.page*this.itemsPerPage<this.total?this.page*this.itemsPerPage:this.total,total:this.total}},t}();g.decorators=[{type:e.Component,args:[{selector:"jhi-item-count",template:'\n <div *ngIf="i18nEnabled; else noI18n" class="info jhi-item-count" jhiTranslate="global.item-count" [translateValues]="i18nValues()">\n /* [attr.translateValues] is used to get entire values in tests */\n </div>\n <ng-template #noI18n class="info jhi-item-count">\n Showing\n {{ (page - 1) * itemsPerPage == 0 ? 1 : (page - 1) * itemsPerPage + 1 }}\n - {{ page * itemsPerPage < total ? page * itemsPerPage : total }} of {{ total }} items.\n </ng-template>\n '}]}],g.ctorParameters=function(){return[{type:h}]},g.propDecorators={page:[{type:e.Input}],total:[{type:e.Input}],itemsPerPage:[{type:e.Input}]};var m=function(){function t(t){this.config=t.getConfig()}return t.prototype.ngOnInit=function(){void 0===this.textTrue?void 0===this.classTrue&&(this.classTrue=this.config.classTrue):void 0===this.classTrue&&(this.classTrue=this.config.classBadgeTrue),void 0===this.textFalse?void 0===this.classFalse&&(this.classFalse=this.config.classFalse):void 0===this.classFalse&&(this.classFalse=this.config.classBadgeFalse)},t}();function f(t){function e(t,e){return e.includes(t,e.length-t.length)}return t.length/4*3-(e("==",n=t)?2:e("=",n)?1:0);var n}m.decorators=[{type:e.Component,args:[{selector:"jhi-boolean",template:'\n <span [ngClass]="value ? classTrue : classFalse" [innerHtml]="value ? textTrue : textFalse"> </span>\n '}]}],m.ctorParameters=function(){return[{type:h}]},m.propDecorators={value:[{type:e.Input}],classTrue:[{type:e.Input}],classFalse:[{type:e.Input}],textTrue:[{type:e.Input}],textFalse:[{type:e.Input}]};var v=function(){function t(){}return t.prototype.validate=function(t){return t.value&&f(t.value)>this.jhiMaxbytes?{maxbytes:{valid:!1}}:null},t}();v.decorators=[{type:e.Directive,args:[{selector:"[jhiMaxbytes][ngModel]",providers:[{provide:r.NG_VALIDATORS,useExisting:e.forwardRef((function(){return v})),multi:!0}]}]}],v.ctorParameters=function(){return[]},v.propDecorators={jhiMaxbytes:[{type:e.Input}]};var y=function(){function t(){}return t.prototype.validate=function(t){return t.value&&f(t.value)<this.jhiMinbytes?{minbytes:{valid:!1}}:null},t}();y.decorators=[{type:e.Directive,args:[{selector:"[jhiMinbytes][ngModel]",providers:[{provide:r.NG_VALIDATORS,useExisting:e.forwardRef((function(){return y})),multi:!0}]}]}],y.ctorParameters=function(){return[]},y.propDecorators={jhiMinbytes:[{type:e.Input}]};var b=function(){function t(){}return t.prototype.validate=function(t){return void 0===t.value||null===t.value||t.value<=this.jhiMax?null:{max:{valid:!1}}},t}();b.decorators=[{type:e.Directive,args:[{selector:"[jhiMax][ngModel]",providers:[{provide:r.NG_VALIDATORS,useExisting:e.forwardRef((function(){return b})),multi:!0}]}]}],b.ctorParameters=function(){return[]},b.propDecorators={jhiMax:[{type:e.Input}]};var j=function(){function t(){}return t.prototype.validate=function(t){return void 0===t.value||null===t.value||t.value>=this.jhiMin?null:{min:{valid:!1}}},t}();j.decorators=[{type:e.Directive,args:[{selector:"[jhiMin][ngModel]",providers:[{provide:r.NG_VALIDATORS,useExisting:e.forwardRef((function(){return j})),multi:!0}]}]}],j.ctorParameters=function(){return[]},j.propDecorators={jhiMin:[{type:e.Input}]};var I=function(){function t(){this.predicateChange=new e.EventEmitter,this.ascendingChange=new e.EventEmitter}return t.prototype.sort=function(t){this.ascending=t!==this.predicate||!this.ascending,this.predicate=t,this.predicateChange.emit(t),this.ascendingChange.emit(this.ascending),this.callback()},t}();I.decorators=[{type:e.Directive,args:[{selector:"[jhiSort]"}]}],I.ctorParameters=function(){return[]},I.propDecorators={predicate:[{type:e.Input}],ascending:[{type:e.Input}],callback:[{type:e.Input}],predicateChange:[{type:e.Output}],ascendingChange:[{type:e.Output}]};var x=function(){function t(t,e){this.jhiSort=t,this.jhiSort=t;var n=e.getConfig();this.sortIcon=n.sortIcon,this.sortAscIcon=n.sortAscIcon,this.sortDescIcon=n.sortDescIcon}return t.prototype.ngAfterContentInit=function(){this.jhiSort.predicate&&"_score"!==this.jhiSort.predicate&&this.jhiSort.predicate===this.jhiSortBy&&(this.updateIconDefinition(this.iconComponent,this.jhiSort.ascending?this.sortAscIcon:this.sortDescIcon),this.jhiSort.activeIconComponent=this.iconComponent)},t.prototype.onClick=function(){this.jhiSort.predicate&&"_score"!==this.jhiSort.predicate&&(this.jhiSort.sort(this.jhiSortBy),this.updateIconDefinition(this.jhiSort.activeIconComponent,this.sortIcon),this.updateIconDefinition(this.iconComponent,this.jhiSort.ascending?this.sortAscIcon:this.sortDescIcon),this.jhiSort.activeIconComponent=this.iconComponent)},t.prototype.updateIconDefinition=function(t,e){t&&(t.icon=e.iconName,t.render())},t}();x.decorators=[{type:e.Directive,args:[{selector:"[jhiSortBy]"}]}],x.ctorParameters=function(){return[{type:I,decorators:[{type:e.Host}]},{type:h}]},x.propDecorators={jhiSortBy:[{type:e.Input}],iconComponent:[{type:e.ContentChild,args:[a.FaIconComponent,{static:!0}]}],onClick:[{type:e.HostListener,args:["click"]}]};var M=function(){function t(t,e){this.translateService=t,this.configService=e,this.currentLang="en"}return t.prototype.init=function(){var t=this.configService.getConfig();this.currentLang=t.defaultI18nLang,this.translateService.setDefaultLang(this.currentLang),this.translateService.use(this.currentLang)},t.prototype.changeLanguage=function(t){this.currentLang=t,this.configService.CONFIG_OPTIONS.defaultI18nLang=t,this.translateService.use(this.currentLang)},t.prototype.getCurrent=function(){return Promise.resolve(this.currentLang)},t.prototype.getCurrentLanguage=function(){return this.currentLang},t}();M.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new M(e.ɵɵinject(s.TranslateService),e.ɵɵinject(h))},token:M,providedIn:"root"}),M.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],M.ctorParameters=function(){return[{type:s.TranslateService},{type:h}]};var S=function(){function t(t,e,n){this.configService=t,this.el=e,this.translateService=n,this.directiveDestroyed=new i.Subject}return t.prototype.ngOnInit=function(){var t=this;this.configService.getConfig().i18nEnabled&&this.translateService.onLangChange.pipe(o.takeUntil(this.directiveDestroyed)).subscribe((function(){t.getTranslation()}))},t.prototype.ngOnChanges=function(){this.configService.getConfig().i18nEnabled&&this.getTranslation()},t.prototype.ngOnDestroy=function(){this.directiveDestroyed.next(),this.directiveDestroyed.complete()},t.prototype.getTranslation=function(){var t=this;this.translateService.get(this.jhiTranslate,this.translateValues).pipe(o.takeUntil(this.directiveDestroyed)).subscribe((function(e){t.el.nativeElement.innerHTML=e}),(function(){return t.configService.getConfig().noi18nMessage+"["+t.jhiTranslate+"]"}))},t}();S.decorators=[{type:e.Directive,args:[{selector:"[jhiTranslate]"}]}],S.ctorParameters=function(){return[{type:h},{type:e.ElementRef},{type:s.TranslateService,decorators:[{type:e.Optional}]}]},S.propDecorators={jhiTranslate:[{type:e.Input}],translateValues:[{type:e.Input}]};var D=function(){function t(t){this.configService=t}return t.prototype.handle=function(t){var e=t.key;return this.configService.getConfig().noi18nMessage+"["+e+"]"},t}(),C=function(t,e){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};
2/*! *****************************************************************************
3 Copyright (c) Microsoft Corporation.
4
5 Permission to use, copy, modify, and/or distribute this software for any
6 purpose with or without fee is hereby granted.
7
8 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 PERFORMANCE OF THIS SOFTWARE.
15 ***************************************************************************** */Object.create;function T(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,a,s=n.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(a)throw a.error}}return i}function P(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}Object.create;var k=function(){function t(t){this.activeModal=t,this.threadDumpAll=0,this.threadDumpBlocked=0,this.threadDumpRunnable=0,this.threadDumpTimedWaiting=0,this.threadDumpWaiting=0}return t.prototype.ngOnInit=function(){var t=this;this.threadDump.forEach((function(e){"RUNNABLE"===e.threadState?t.threadDumpRunnable+=1:"WAITING"===e.threadState?t.threadDumpWaiting+=1:"TIMED_WAITING"===e.threadState?t.threadDumpTimedWaiting+=1:"BLOCKED"===e.threadState&&(t.threadDumpBlocked+=1)})),this.threadDumpAll=this.threadDumpRunnable+this.threadDumpWaiting+this.threadDumpTimedWaiting+this.threadDumpBlocked},t.prototype.getBadgeClass=function(t){return"RUNNABLE"===t?"badge-success":"WAITING"===t?"badge-info":"TIMED_WAITING"===t?"badge-warning":"BLOCKED"===t?"badge-danger":void 0},t}();k.decorators=[{type:e.Component,args:[{selector:"jhi-thread-modal",template:'\n <div class="modal-header">\n <h4 class="modal-title" jhiTranslate="metrics.jvm.threads.dump.title">Threads dump</h4>\n <button type="button" class="close" (click)="activeModal.dismiss(\'closed\')">&times;</button>\n </div>\n <div class="modal-body">\n <span class="badge badge-primary" (click)="threadDumpFilter = {}">\n All&nbsp;<span class="badge badge-pill badge-default">{{ threadDumpAll }}</span> </span\n >&nbsp;\n <span class="badge badge-success" (click)="threadDumpFilter = { threadState: \'RUNNABLE\' }">\n Runnable&nbsp;<span class="badge badge-pill badge-default">{{ threadDumpRunnable }}</span> </span\n >&nbsp;\n <span class="badge badge-info" (click)="threadDumpFilter = { threadState: \'WAITING\' }"\n >Waiting&nbsp;<span class="badge badge-pill badge-default">{{ threadDumpWaiting }}</span></span\n >&nbsp;\n <span class="badge badge-warning" (click)="threadDumpFilter = { threadState: \'TIMED_WAITING\' }">\n Timed Waiting&nbsp;<span class="badge badge-pill badge-default">{{ threadDumpTimedWaiting }}</span> </span\n >&nbsp;\n <span class="badge badge-danger" (click)="threadDumpFilter = { threadState: \'BLOCKED\' }"\n >Blocked&nbsp;<span class="badge badge-pill badge-default">{{ threadDumpBlocked }}</span></span\n >&nbsp;\n <div class="mt-2">&nbsp;</div>\n Filter\n <input type="text" [(ngModel)]="threadDumpFilter" class="form-control" />\n <div class="pad" *ngFor="let entry of (threadDump | pureFilter: threadDumpFilter:\'lockName\' | keys)">\n <h6>\n <span class="badge" [ngClass]="getBadgeClass(entry.value.threadState)">{{ entry.value.threadState }}</span\n >&nbsp;{{ entry.value.threadName }}\n (ID\n {{ entry.value.threadId }})\n <a (click)="entry.show = !entry.show" href="javascript:void(0);">\n <span [hidden]="entry.show" jhiTranslate="metrics.jvm.threads.dump.show">Show StackTrace</span>\n <span [hidden]="!entry.show" jhiTranslate="metrics.jvm.threads.dump.hide">Hide StackTrace</span>\n </a>\n </h6>\n <div class="card" [hidden]="!entry.show">\n <div class="card-body">\n <div *ngFor="let st of (entry.value.stackTrace | keys)" class="break">\n <samp\n >{{ st.value.className }}.{{ st.value.methodName }}(<code\n >{{ st.value.fileName }}:{{ st.value.lineNumber }}</code\n >)</samp\n >\n <span class="mt-1"></span>\n </div>\n </div>\n </div>\n <table class="table table-sm table-responsive">\n <thead>\n <tr>\n <th jhiTranslate="metrics.jvm.threads.dump.blockedtime">Blocked Time</th>\n <th jhiTranslate="metrics.jvm.threads.dump.blockedcount">Blocked Count</th>\n <th jhiTranslate="metrics.jvm.threads.dump.waitedtime">Waited Time</th>\n <th jhiTranslate="metrics.jvm.threads.dump.waitedcount">Waited Count</th>\n <th jhiTranslate="metrics.jvm.threads.dump.lockname">Lock Name</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>{{ entry.value.blockedTime }}</td>\n <td>{{ entry.value.blockedCount }}</td>\n <td>{{ entry.value.waitedTime }}</td>\n <td>{{ entry.value.waitedCount }}</td>\n <td class="thread-dump-modal-lock" title="{{ entry.value.lockName }}">\n <code>{{ entry.value.lockName }}</code>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary float-left" data-dismiss="modal" (click)="activeModal.dismiss(\'closed\')">\n Done\n </button>\n </div>\n '}]}],k.ctorParameters=function(){return[{type:l.NgbActiveModal}]};var N=function(){};N.decorators=[{type:e.Component,args:[{selector:"jhi-jvm-memory",template:'\n <h4 jhiTranslate="metrics.jvm.memory.title">Memory</h4>\n <div *ngIf="!updating">\n <div *ngFor="let entry of (jvmMemoryMetrics | keys)">\n <span *ngIf="entry.value.max != -1; else other">\n <span>{{ entry.key }}</span> ({{ entry.value.used / 1048576 | number: \'1.0-0\' }}M /\n {{ entry.value.max / 1048576 | number: \'1.0-0\' }}M)\n </span>\n <div>Committed : {{ entry.value.committed / 1048576 | number: \'1.0-0\' }}M</div>\n <ng-template #other\n ><span\n ><span>{{ entry.key }}</span> {{ entry.value.used / 1048576 | number: \'1.0-0\' }}M</span\n >\n </ng-template>\n <ngb-progressbar\n *ngIf="entry.value.max != -1"\n type="success"\n [value]="(100 * entry.value.used) / entry.value.max"\n [striped]="true"\n [animated]="false"\n >\n <span>{{ (entry.value.used * 100) / entry.value.max | number: \'1.0-0\' }}%</span>\n </ngb-progressbar>\n </div>\n </div>\n '}]}],N.propDecorators={jvmMemoryMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var A=function(){function t(t){this.modalService=t}return t.prototype.ngOnInit=function(){var t=this;this.threadStats={threadDumpRunnable:0,threadDumpWaiting:0,threadDumpTimedWaiting:0,threadDumpBlocked:0,threadDumpAll:0},this.threadData.forEach((function(e){"RUNNABLE"===e.threadState?t.threadStats.threadDumpRunnable+=1:"WAITING"===e.threadState?t.threadStats.threadDumpWaiting+=1:"TIMED_WAITING"===e.threadState?t.threadStats.threadDumpTimedWaiting+=1:"BLOCKED"===e.threadState&&(t.threadStats.threadDumpBlocked+=1)})),this.threadStats.threadDumpAll=this.threadStats.threadDumpRunnable+this.threadStats.threadDumpWaiting+this.threadStats.threadDumpTimedWaiting+this.threadStats.threadDumpBlocked},t.prototype.open=function(){this.modalService.open(k).componentInstance.threadDump=this.threadData},t}();A.decorators=[{type:e.Component,args:[{selector:"jhi-jvm-threads",template:'\n <h4 jhiTranslate="metrics.jvm.threads.title">Threads</h4>\n <span><span jhiTranslate="metrics.jvm.threads.runnable">Runnable</span> {{ threadStats.threadDumpRunnable }}</span>\n <ngb-progressbar\n [value]="threadStats.threadDumpRunnable"\n [max]="threadStats.threadDumpAll"\n [striped]="true"\n [animated]="false"\n type="success"\n >\n <span>{{ (threadStats.threadDumpRunnable * 100) / threadStats.threadDumpAll | number: \'1.0-0\' }}%</span>\n </ngb-progressbar>\n <span><span jhiTranslate="metrics.jvm.threads.timedwaiting">Timed Waiting</span> ({{ threadStats.threadDumpTimedWaiting }})</span>\n <ngb-progressbar\n [value]="threadStats.threadDumpTimedWaiting"\n [max]="threadStats.threadDumpAll"\n [striped]="true"\n [animated]="false"\n type="warning"\n >\n <span>{{ (threadStats.threadDumpTimedWaiting * 100) / threadStats.threadDumpAll | number: \'1.0-0\' }}%</span>\n </ngb-progressbar>\n <span><span jhiTranslate="metrics.jvm.threads.waiting">Waiting</span> ({{ threadStats.threadDumpWaiting }})</span>\n <ngb-progressbar\n [value]="threadStats.threadDumpWaiting"\n [max]="threadStats.threadDumpAll"\n [striped]="true"\n [animated]="false"\n type="warning"\n >\n <span>{{ (threadStats.threadDumpWaiting * 100) / threadStats.threadDumpAll | number: \'1.0-0\' }}%</span>\n </ngb-progressbar>\n <span><span jhiTranslate="metrics.jvm.threads.blocked">Blocked</span> ({{ threadStats.threadDumpBlocked }})</span>\n <ngb-progressbar\n [value]="threadStats.threadDumpBlocked"\n [max]="threadStats.threadDumpAll"\n [striped]="true"\n [animated]="false"\n type="success"\n >\n <span>{{ (threadStats.threadDumpBlocked * 100) / threadStats.threadDumpAll | number: \'1.0-0\' }}%</span>\n </ngb-progressbar>\n <div>Total: {{ threadStats.threadDumpAll }}</div>\n <button class="hand btn btn-primary btn-sm" (click)="open()" data-toggle="modal" data-target="#threadDump">\n <span>Expand</span>\n </button>\n '}]}],A.ctorParameters=function(){return[{type:l.NgbModal}]},A.propDecorators={threadData:[{type:e.Input}]};var B=function(){function t(){}return t.prototype.filterNaN=function(t){return isNaN(t)?0:t},t}();B.decorators=[{type:e.Component,args:[{selector:"jhi-metrics-cache",template:'\n <h3 jhiTranslate="metrics.cache.title">Cache statistics</h3>\n <div class="table-responsive" *ngIf="!updating">\n <table class="table table-striped">\n <thead>\n <tr>\n <th jhiTranslate="metrics.cache.cachename">Cache name</th>\n <th class="text-right" data-translate="metrics.cache.hits">Cache Hits</th>\n <th class="text-right" data-translate="metrics.cache.misses">Cache Misses</th>\n <th class="text-right" data-translate="metrics.cache.gets">Cache Gets</th>\n <th class="text-right" data-translate="metrics.cache.puts">Cache Puts</th>\n <th class="text-right" data-translate="metrics.cache.removals">Cache Removals</th>\n <th class="text-right" data-translate="metrics.cache.evictions">Cache Evictions</th>\n <th class="text-right" data-translate="metrics.cache.hitPercent">Cache Hit %</th>\n <th class="text-right" data-translate="metrics.cache.missPercent">Cache Miss %</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let entry of (cacheMetrics | keys)">\n <td>{{ entry.key }}</td>\n <td class="text-right">{{ entry.value[\'cache.gets.hit\'] }}</td>\n <td class="text-right">{{ entry.value[\'cache.gets.miss\'] }}</td>\n <td class="text-right">{{ entry.value[\'cache.gets.hit\'] + entry.value[\'cache.gets.miss\'] }}</td>\n <td class="text-right">{{ entry.value[\'cache.puts\'] }}</td>\n <td class="text-right">{{ entry.value[\'cache.removals\'] }}</td>\n <td class="text-right">{{ entry.value[\'cache.evictions\'] }}</td>\n <td class="text-right">\n {{\n filterNaN(\n (100 * entry.value[\'cache.gets.hit\']) / (entry.value[\'cache.gets.hit\'] + entry.value[\'cache.gets.miss\'])\n ) | number: \'1.0-4\'\n }}\n </td>\n <td class="text-right">\n {{\n filterNaN(\n (100 * entry.value[\'cache.gets.miss\']) /\n (entry.value[\'cache.gets.hit\'] + entry.value[\'cache.gets.miss\'])\n ) | number: \'1.0-4\'\n }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n '}]}],B.propDecorators={cacheMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var O=function(){function t(){}return t.prototype.filterNaN=function(t){return isNaN(t)?0:t},t}();O.decorators=[{type:e.Component,args:[{selector:"jhi-metrics-datasource",template:'\n <h3 jhiTranslate="metrics.datasource.title">DataSource statistics (time in millisecond)</h3>\n <div class="table-responsive" *ngIf="!updating">\n <table class="table table-striped">\n <thead>\n <tr>\n <th>\n <span jhiTranslate="metrics.datasource.usage">Connection Pool Usage</span> (active:\n {{ datasourceMetrics.active.value }}, min: {{ datasourceMetrics.min.value }}, max:\n {{ datasourceMetrics.max.value }}, idle: {{ datasourceMetrics.idle.value }})\n </th>\n <th class="text-right" jhiTranslate="metrics.datasource.count">Count</th>\n <th class="text-right" jhiTranslate="metrics.datasource.mean">Mean</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.min">Min</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p50">p50</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p75">p75</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p95">p95</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p99">p99</th>\n <th class="text-right" jhiTranslate="metrics.datasource.max">Max</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>Acquire</td>\n <td class="text-right">{{ datasourceMetrics.acquire.count }}</td>\n <td class="text-right">{{ filterNaN(datasourceMetrics.acquire.mean) | number: \'1.0-2\' }}</td>\n <td class="text-right">{{ datasourceMetrics.acquire[\'0.0\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.acquire[\'0.5\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.acquire[\'0.75\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.acquire[\'0.95\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.acquire[\'0.99\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ filterNaN(datasourceMetrics.acquire.max) | number: \'1.0-2\' }}</td>\n </tr>\n <tr>\n <td>Creation</td>\n <td class="text-right">{{ datasourceMetrics.creation.count }}</td>\n <td class="text-right">{{ filterNaN(datasourceMetrics.creation.mean) | number: \'1.0-2\' }}</td>\n <td class="text-right">{{ datasourceMetrics.creation[\'0.0\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.creation[\'0.5\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.creation[\'0.75\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.creation[\'0.95\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.creation[\'0.99\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ filterNaN(datasourceMetrics.creation.max) | number: \'1.0-2\' }}</td>\n </tr>\n <tr>\n <td>Usage</td>\n <td class="text-right">{{ datasourceMetrics.usage.count }}</td>\n <td class="text-right">{{ filterNaN(datasourceMetrics.usage.mean) | number: \'1.0-2\' }}</td>\n <td class="text-right">{{ datasourceMetrics.usage[\'0.0\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.usage[\'0.5\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.usage[\'0.75\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.usage[\'0.95\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ datasourceMetrics.usage[\'0.99\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ filterNaN(datasourceMetrics.usage.max) | number: \'1.0-2\' }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n '}]}],O.propDecorators={datasourceMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var L=function(){};L.decorators=[{type:e.Component,args:[{selector:"jhi-metrics-endpoints-requests",template:'\n <h3>Endpoints requests (time in millisecond)</h3>\n <div class="table-responsive" *ngIf="!updating">\n <table class="table table-striped">\n <thead>\n <tr>\n <th>Method</th>\n <th>Endpoint url</th>\n <th class="text-right">Count</th>\n <th class="text-right">Mean</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor="let entry of (endpointsRequestsMetrics | keys)">\n <tr *ngFor="let method of (entry.value | keys)">\n <td>{{ method.key }}</td>\n <td>{{ entry.key }}</td>\n <td class="text-right">{{ method.value.count }}</td>\n <td class="text-right">{{ method.value.mean | number: \'1.0-3\' }}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n '}]}],L.propDecorators={endpointsRequestsMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var F=function(){};F.decorators=[{type:e.Component,args:[{selector:"jhi-metrics-garbagecollector",template:'\n <div class="row">\n <div class="col-md-4">\n <div *ngIf="garbageCollectorMetrics">\n <span>\n GC Live Data Size/GC Max Data Size ({{\n garbageCollectorMetrics[\'jvm.gc.live.data.size\'] / 1048576 | number: \'1.0-0\'\n }}M / {{ garbageCollectorMetrics[\'jvm.gc.max.data.size\'] / 1048576 | number: \'1.0-0\' }}M)</span\n >\n <ngb-progressbar\n [max]="garbageCollectorMetrics[\'jvm.gc.max.data.size\']"\n [value]="garbageCollectorMetrics[\'jvm.gc.live.data.size\']"\n [striped]="true"\n [animated]="false"\n type="success"\n >\n <span\n >{{\n (100 * garbageCollectorMetrics[\'jvm.gc.live.data.size\']) / garbageCollectorMetrics[\'jvm.gc.max.data.size\']\n | number: \'1.0-2\'\n }}%</span\n >\n </ngb-progressbar>\n </div>\n </div>\n <div class="col-md-4">\n <div *ngIf="garbageCollectorMetrics">\n <span>\n GC Memory Promoted/GC Memory Allocated ({{\n garbageCollectorMetrics[\'jvm.gc.memory.promoted\'] / 1048576 | number: \'1.0-0\'\n }}M / {{ garbageCollectorMetrics[\'jvm.gc.memory.allocated\'] / 1048576 | number: \'1.0-0\' }}M)</span\n >\n <ngb-progressbar\n [max]="garbageCollectorMetrics[\'jvm.gc.memory.allocated\']"\n [value]="garbageCollectorMetrics[\'jvm.gc.memory.promoted\']"\n [striped]="true"\n [animated]="false"\n type="success"\n >\n <span\n >{{\n (100 * garbageCollectorMetrics[\'jvm.gc.memory.promoted\']) /\n garbageCollectorMetrics[\'jvm.gc.memory.allocated\'] | number: \'1.0-2\'\n }}%</span\n >\n </ngb-progressbar>\n </div>\n </div>\n <div class="col-md-4">\n <div class="row" *ngIf="garbageCollectorMetrics">\n <div class="col-md-9">Classes loaded</div>\n <div class="col-md-3 text-right">{{ garbageCollectorMetrics.classesLoaded }}</div>\n </div>\n <div class="row" *ngIf="garbageCollectorMetrics">\n <div class="col-md-9">Classes unloaded</div>\n <div class="col-md-3 text-right">{{ garbageCollectorMetrics.classesUnloaded }}</div>\n </div>\n </div>\n <div class="table-responsive" *ngIf="!updating && garbageCollectorMetrics">\n <table class="table table-striped">\n <thead>\n <tr>\n <th></th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.count">Count</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.mean">Mean</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.min">Min</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p50">p50</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p75">p75</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p95">p95</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.p99">p99</th>\n <th class="text-right" jhiTranslate="metrics.servicesstats.table.max">Max</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>jvm.gc.pause</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'].count }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'].mean | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'][\'0.0\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'][\'0.5\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'][\'0.75\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'][\'0.95\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'][\'0.99\'] | number: \'1.0-3\' }}</td>\n <td class="text-right">{{ garbageCollectorMetrics[\'jvm.gc.pause\'].max | number: \'1.0-3\' }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n '}]}],F.propDecorators={garbageCollectorMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var E=function(){function t(){}return t.prototype.filterNaN=function(t){return isNaN(t)?0:t},t}();E.decorators=[{type:e.Component,args:[{selector:"jhi-metrics-request",template:'\n <h3 jhiTranslate="metrics.jvm.http.title">HTTP requests (time in millisecond)</h3>\n <table class="table table-striped" *ngIf="!updating">\n <thead>\n <tr>\n <th jhiTranslate="metrics.jvm.http.table.code">Code</th>\n <th jhiTranslate="metrics.jvm.http.table.count">Count</th>\n <th class="text-right" jhiTranslate="metrics.jvm.http.table.mean">Mean</th>\n <th class="text-right" jhiTranslate="metrics.jvm.http.table.max">Max</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let entry of (requestMetrics[\'percode\'] | keys)">\n <td>{{ entry.key }}</td>\n <td>\n <ngb-progressbar\n [max]="requestMetrics[\'all\'].count"\n [value]="entry.value.count"\n [striped]="true"\n [animated]="false"\n type="success"\n >\n <span>{{ entry.value.count }}</span>\n </ngb-progressbar>\n </td>\n <td class="text-right">\n {{ filterNaN(entry.value.mean) | number: \'1.0-2\' }}\n </td>\n <td class="text-right">{{ entry.value.max | number: \'1.0-2\' }}</td>\n </tr>\n </tbody>\n </table>\n '}]}],E.propDecorators={requestMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var W=function(){function t(){}return t.prototype.convertMillisecondsToDuration=function(t){var e={year:315576e5,month:2629746e3,day:864e5,hour:36e5,minute:6e4,second:1e3},n="";for(var r in e)if(Math.floor(t/e[r])>0){var a="";Math.floor(t/e[r])>1&&(a="s"),n+=Math.floor(t/e[r]).toString()+" "+r.toString()+a+" ",t-=e[r]*Math.floor(t/e[r])}return n},t}();W.decorators=[{type:e.Component,args:[{selector:"jhi-metrics-system",template:'\n <h4>System</h4>\n <div class="row" *ngIf="!updating">\n <div class="col-md-4">Uptime</div>\n <div class="col-md-8 text-right">{{ convertMillisecondsToDuration(systemMetrics[\'process.uptime\']) }}</div>\n </div>\n <div class="row" *ngIf="!updating">\n <div class="col-md-4">Start time</div>\n <div class="col-md-8 text-right">{{ systemMetrics[\'process.start.time\'] | date: \'full\' }}</div>\n </div>\n <div class="row" *ngIf="!updating">\n <div class="col-md-9">Process CPU usage</div>\n <div class="col-md-3 text-right">{{ 100 * systemMetrics[\'process.cpu.usage\'] | number: \'1.0-2\' }} %</div>\n </div>\n <ngb-progressbar\n [value]="100 * systemMetrics[\'process.cpu.usage\']"\n [striped]="true"\n [animated]="false"\n type="success"\n *ngIf="!updating"\n >\n <span>{{ 100 * systemMetrics[\'process.cpu.usage\'] | number: \'1.0-2\' }} %</span>\n </ngb-progressbar>\n <div class="row" *ngIf="!updating">\n <div class="col-md-9">System CPU usage</div>\n <div class="col-md-3 text-right">{{ 100 * systemMetrics[\'system.cpu.usage\'] | number: \'1.0-2\' }} %</div>\n </div>\n <ngb-progressbar\n [value]="100 * systemMetrics[\'system.cpu.usage\']"\n [striped]="true"\n [animated]="false"\n type="success"\n *ngIf="!updating"\n >\n <span>{{ 100 * systemMetrics[\'system.cpu.usage\'] | number: \'1.0-2\' }} %</span>\n </ngb-progressbar>\n <div class="row" *ngIf="!updating">\n <div class="col-md-9">System CPU count</div>\n <div class="col-md-3 text-right">{{ systemMetrics[\'system.cpu.count\'] }}</div>\n </div>\n <div class="row" *ngIf="!updating">\n <div class="col-md-9">System 1m Load average</div>\n <div class="col-md-3 text-right">{{ systemMetrics[\'system.load.average.1m\'] | number: \'1.0-2\' }}</div>\n </div>\n <div class="row" *ngIf="!updating">\n <div class="col-md-9">Process files max</div>\n <div class="col-md-3 text-right">{{ systemMetrics[\'process.files.max\'] | number: \'1.0-0\' }}</div>\n </div>\n <div class="row" *ngIf="!updating">\n <div class="col-md-9">Process files open</div>\n <div class="col-md-3 text-right">{{ systemMetrics[\'process.files.open\'] | number: \'1.0-0\' }}</div>\n </div>\n '}]}],W.propDecorators={systemMetrics:[{type:e.Input}],updating:[{type:e.Input}]};var q=function(){function t(){}return t.prototype.transform=function(t){return null!==t&&(t=t.toLowerCase()),t.substring(0,1).toUpperCase()+t.substring(1)},t}();q.decorators=[{type:e.Pipe,args:[{name:"capitalize"}]}];var R=function(){function t(){}return t.prototype.transform=function(t,e,n){if(void 0===e||""===e)return t;var r="function"==typeof e?e():e;return"number"==typeof r?t.filter(this.filterByNumber(r,n)):"boolean"==typeof r?t.filter(this.filterByBoolean(r,n)):"string"==typeof r?t.filter(this.filterByString(r,n)):"object"==typeof r?t.filter(this.filterByObject(r)):t.filter(this.filterDefault(r,n))},t.prototype.filterByNumber=function(t,e){return function(n){return n&&!t||"object"==typeof n&&e?n[e]&&"number"==typeof n[e]&&n[e]===t:"number"==typeof n&&n===t}},t.prototype.filterByBoolean=function(t,e){return function(n){return"object"==typeof n&&e?n[e]&&"boolean"==typeof n[e]&&n[e]===t:"boolean"==typeof n&&n===t}},t.prototype.filterByString=function(t,e){return function(n){return n&&!t||"object"==typeof n&&e?n[e]&&"string"==typeof n[e]&&n[e].toLowerCase().includes(t.toLowerCase()):"string"==typeof n&&n.toLowerCase().includes(t.toLowerCase())}},t.prototype.filterDefault=function(t,e){return function(n){return n&&!t||"object"==typeof n&&e?n[e]&&t===n:t===n}},t.prototype.filterByObject=function(t){var e=this;return function(n){var r,a,s=Object.keys(t),i=!1;try{for(var o=T(s),c=o.next();!c.done;c=o.next()){var l=c.value;i="number"==typeof t[l]?e.filterByNumber(t[l])(n[l]):"boolean"==typeof t[l]?e.filterByBoolean(t[l])(n[l]):"string"==typeof t[l]?e.filterByString(t[l])(n[l]):e.filterDefault(t[l])(n[l])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}return i}},t}();R.decorators=[{type:e.Pipe,args:[{name:"filter",pure:!1}]}];var J=function(){function t(){}return t.prototype.transform=function(t){var e,n,r=[],a=Object.keys(t);try{for(var s=T(a),i=s.next();!i.done;i=s.next()){var o=i.value;r.push({key:o,value:t[o]})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return r},t}();J.decorators=[{type:e.Pipe,args:[{name:"keys"}]}];var U=function(){function t(){}return t.prototype.transform=function(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=!1),""===e?n?t.sort().reverse():t.sort():t.sort((function(t,r){return t[e]<r[e]?n?1:-1:r[e]<t[e]?n?-1:1:0}))},t}();U.decorators=[{type:e.Pipe,args:[{name:"orderBy"}]}];var _=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){function n(){this.constructor=t}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.transform=function(e,n,r){return t.prototype.transform.call(this,e,n,r)},e}(R);_.decorators=[{type:e.Pipe,args:[{name:"pureFilter"}]}];var z=function(){function t(){}return t.prototype.transform=function(t,e,n){if(isNaN(e))return t;if(e<=0)return"";if(t&&t.length>e){if(t=t.substring(0,e),n)for(;t.endsWith(" ");)t=t.substr(0,t.length-1);else{var r=t.lastIndexOf(" ");-1!==r&&(t=t.substr(0,r))}return t+"..."}return t},t}();z.decorators=[{type:e.Pipe,args:[{name:"truncateCharacters"}]}];var G=function(){function t(){}return t.prototype.transform=function(t,e){if(isNaN(e))return t;if(e<=0)return"";if(t){var n=t.split(/\s+/);n.length>e&&(t=n.slice(0,e).join(" ")+"...")}return t},t}();G.decorators=[{type:e.Pipe,args:[{name:"truncateWords"}]}];var V=[q,R,J,U,_,z,G],H=[b,j,v,y,I,x],Z=[g,m,N,A,E,L,B,O,W,F,k];var K=function(){function t(){}return t.forRoot=function(e){return{ngModule:t,providers:[{provide:p,useValue:e}]}},t}();K.decorators=[{type:e.NgModule,args:[{imports:[c.CommonModule,l.NgbModule,r.FormsModule],declarations:P(V,H,Z,[S]),entryComponents:[k],exports:P(V,H,Z,[S,c.CommonModule])}]}];var $=function(){function t(){}return t.prototype.parseAscending=function(t){var e=t.split(",");return!((e=e.length>1?e:t.split("%2C")).length>1)||"asc"===e.slice(-1)[0]},t.prototype.parsePage=function(t){return parseInt(t,10)},t.prototype.parsePredicate=function(t){return t.split(",")[0].split("%2C")[0]},t}();$.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new $},token:$,providedIn:"root"}),$.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],$.ctorParameters=function(){return[]};var Q=function(){function t(){}return t.prototype.parse=function(t){if(0===t.length)throw new Error("input must not be of zero length");var e=t.split(","),n={};return e.forEach((function(t){var e=t.split(";");if(2!==e.length)throw new Error('section could not be split on ";"');var r=e[0].replace(/<(.*)>/,"$1").trim(),a={};r.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),(function(t,e,n,r){return a[e]=r}));var s=a.page;"string"==typeof s&&(s=parseInt(s,10));var i=e[1].replace(/rel="(.*)"/,"$1").trim();n[i]=s})),n},t}();Q.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new Q},token:Q,providedIn:"root"}),Q.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],Q.ctorParameters=function(){return[]};var X=function(){function t(){}return t.prototype.abbreviate=function(t,e){return void 0===e&&(e="..."),t.length<30?t:t?t.substring(0,15)+e+t.slice(-10):""},t.prototype.byteSize=function(t){return this.formatAsBytes(this.size(t))},t.prototype.openFile=function(t,e){if(window.navigator&&window.navigator.msSaveOrOpenBlob){for(var n=atob(e),r=new Array(n.length),a=0;a<n.length;a++)r[a]=n.charCodeAt(a);var s=new Uint8Array(r),i=new Blob([s],{type:t});window.navigator.msSaveOrOpenBlob(i)}else{var o="data:"+t+";base64,"+e;window.open().document.write('<iframe src="'+o+'" frameborder="0" style="border:0; top:0; left:0; bottom:0; right:0; width:100%; height:100%;" allowfullscreen></iframe>')}},t.prototype.toBase64=function(t,e){var n=new FileReader;n.onload=function(t){var n=t.target.result.substr(t.target.result.indexOf("base64,")+"base64,".length);e(n)},n.readAsDataURL(t)},t.prototype.clearInputImage=function(t,e,n,r,a){t&&n&&r&&(Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=null),Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=null),e&&a&&e.nativeElement.querySelector("#"+a)&&(e.nativeElement.querySelector("#"+a).value=null))},t.prototype.setFileData=function(t,e,n,r){var a=this;return new Promise((function(s,i){if(t&&t.target&&t.target.files&&t.target.files[0]){var o=t.target.files[0];r&&!o.type.startsWith("image/")?i("File was expected to be an image but was found to be "+o.type):a.toBase64(o,(function(t){e[n]=t,e[n+"ContentType"]=o.type,s(e)}))}else i("Base64 data was not set as file could not be extracted from passed parameter: "+t)}))},t.prototype.loadFileToForm=function(t,e,n,r){var a=this;return new i.Observable((function(s){var i=t.target;if(i.files&&i.files[0]){var o=i.files[0];if(r&&!o.type.startsWith("image/")){var c={message:"File was expected to be an image but was found to be '"+o.type+"'",key:"not.image",params:{fileType:o.type}};s.error(c)}else{var l=n+"ContentType";a.toBase64(o,(function(t){var r;e.patchValue(((r={})[n]=t,r[l]=o.type,r)),s.next(),s.complete()}))}}else{c={message:"Could not extract file",key:"could.not.extract",params:{event:t}};s.error(c)}}))},t.prototype.downloadFile=function(t,e,n){for(var r=atob(e),a=new Array(r.length),s=0;s<r.length;s++)a[s]=r.charCodeAt(s);var i=new Uint8Array(a),o=new Blob([i],{type:t}),c=document.createElement("a");c.href=window.URL.createObjectURL(o),c.download=n,c.target="_blank",c.click()},t.prototype.endsWith=function(t,e){return e.includes(t,e.length-t.length)},t.prototype.paddingSize=function(t){return this.endsWith("==",t)?2:this.endsWith("=",t)?1:0},t.prototype.size=function(t){return t.length/4*3-this.paddingSize(t)},t.prototype.formatAsBytes=function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")+" bytes"},t}();X.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new X},token:X,providedIn:"root"}),X.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],X.ctorParameters=function(){return[]};var Y=function(){function t(){this.pattern="yyyy-MM-dd",this.datePipe=new c.DatePipe("en")}return t.prototype.convertDateTimeFromServer=function(t){return t?new Date(t):null},t.prototype.convertLocalDateFromServer=function(t){if(t){var e=t.split("-");return new Date(e[0],e[1]-1,e[2])}return null},t.prototype.convertLocalDateToServer=function(t,e){if(void 0===e&&(e=this.pattern),t){var n=new Date(t.year,t.month-1,t.day);return this.datePipe.transform(n,e)}return null},t.prototype.dateformat=function(){return this.pattern},t.prototype.toDate=function(t){if(null==t)return null;var e=t.split(/\D+/);return 7===e.length?new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5],e[6]):6===e.length?new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5]):new Date(e[0],e[1]-1,e[2],e[3],e[4])},t}();Y.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new Y},token:Y,providedIn:"root"}),Y.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],Y.ctorParameters=function(){return[]};var tt=function(){function t(){var t=this;this.observable=i.Observable.create((function(e){t.observer=e})).pipe(o.share())}return t.prototype.broadcast=function(t){this.observer&&this.observer.next(t)},t.prototype.subscribe=function(t,e){return this.observable.pipe(o.filter((function(e){return"string"==typeof e?e===t:e.name===t})),o.map((function(t){if("string"!=typeof t)return t}))).subscribe(e)},t.prototype.destroy=function(t){t.unsubscribe()},t}();tt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new tt},token:tt,providedIn:"root"}),tt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],tt.ctorParameters=function(){return[]};var et=function(t,e){this.name=t,this.content=e},nt=function(){function t(t,e,n,r){this.sanitizer=t,this.configService=e,this.ngZone=n,this.translateService=r;var a=this.configService.getConfig();this.toast=a.alertAsToast,this.i18nEnabled=a.i18nEnabled,this.alertId=0,this.alerts=[],this.timeout=a.alertTimeout}return t.prototype.clear=function(){this.alerts.splice(0,this.alerts.length)},t.prototype.get=function(){return this.alerts},t.prototype.success=function(t,e,n){return this.addAlert({type:"success",msg:t,params:e,timeout:this.timeout,toast:this.isToast(),position:n},[])},t.prototype.error=function(t,e,n){return this.addAlert({type:"danger",msg:t,params:e,timeout:this.timeout,toast:this.isToast(),position:n},[])},t.prototype.warning=function(t,e,n){return this.addAlert({type:"warning",msg:t,params:e,timeout:this.timeout,toast:this.isToast(),position:n},[])},t.prototype.info=function(t,e,n){return this.addAlert({type:"info",msg:t,params:e,timeout:this.timeout,toast:this.isToast(),position:n},[])},t.prototype.addAlert=function(t,e){var n=this;t.id=this.alertId++,this.i18nEnabled&&t.msg&&(t.msg=this.translateService.instant(t.msg,t.params));var r=this.factory(t);return t.timeout&&t.timeout>0&&this.ngZone.runOutsideAngular((function(){setTimeout((function(){n.ngZone.run((function(){n.closeAlert(t.id,e)}))}),t.timeout)})),r},t.prototype.closeAlert=function(t,e){var n=e&&e.length>0?e:this.alerts;return this.closeAlertByIndex(n.map((function(t){return t.id})).indexOf(t),n)},t.prototype.closeAlertByIndex=function(t,e){return e.splice(t,1)},t.prototype.isToast=function(){return this.toast},t.prototype.factory=function(t){var n=this,r={type:t.type,msg:this.sanitizer.sanitize(e.SecurityContext.HTML,t.msg),id:t.id,timeout:t.timeout,toast:t.toast,position:t.position?t.position:"top right",scoped:t.scoped,close:function(e){return n.closeAlert(t.id,e)}};return r.scoped||this.alerts.push(r),r},t}();nt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new nt(e.ɵɵinject(d.DomSanitizer),e.ɵɵinject(h),e.ɵɵinject(e.NgZone),e.ɵɵinject(s.TranslateService,8))},token:nt,providedIn:"root"}),nt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],nt.ctorParameters=function(){return[{type:d.DomSanitizer},{type:h},{type:e.NgZone},{type:s.TranslateService,decorators:[{type:e.Optional}]}]};var rt=function(){function t(){this.keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}return t.prototype.encode=function(t){for(var e="",n="",r="",a="",s="",i="",o="",c="",l=0;l<t.length;)n=(i=t.charCodeAt(l++))>>2,r=(3&i)<<4|(o=t.charCodeAt(l++))>>4,a=(15&o)<<2|(c=t.charCodeAt(l++))>>6,s=63&c,isNaN(o)?a=s=64:isNaN(c)&&(s=64),e=e+this.keyStr.charAt(n)+this.keyStr.charAt(r)+this.keyStr.charAt(a)+this.keyStr.charAt(s),i=o=c="",n=r=a=s="";return e},t.prototype.decode=function(t){var e="",n="",r="",a="",s="",i="",o="",c=0;for(t=t.replace(/[^A-Za-z0-9+/=]/g,"");c<t.length;)s=this.keyStr.indexOf(t.charAt(c++))<<2|(n=this.keyStr.indexOf(t.charAt(c++)))>>4,i=(15&n)<<4|(r=this.keyStr.indexOf(t.charAt(c++)))>>2,o=(3&r)<<6|(a=this.keyStr.indexOf(t.charAt(c++))),e+=String.fromCharCode(s),64!==r&&(e+=String.fromCharCode(i)),64!==a&&(e+=String.fromCharCode(o)),s=i=o="",n=r=a="";return e},t}();rt.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new rt},token:rt,providedIn:"root"}),rt.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}];var at=function(){function t(t){this.paginationUtil=t}return t.prototype.resolve=function(t,e){var n=t.queryParams.page?t.queryParams.page:"1",r=t.data.defaultSort?t.data.defaultSort:"id,asc",a=t.queryParams.sort?t.queryParams.sort:r;return{page:this.paginationUtil.parsePage(n),predicate:this.paginationUtil.parsePredicate(a),ascending:this.paginationUtil.parseAscending(a)}},t}();at.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new at(e.ɵɵinject($))},token:at,providedIn:"root"}),at.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],at.ctorParameters=function(){return[{type:$}]},t.JhiAlertService=nt,t.JhiBase64Service=rt,t.JhiBooleanComponent=m,t.JhiCapitalizePipe=q,t.JhiConfigService=h,t.JhiDataUtils=X,t.JhiDateUtils=Y,t.JhiEventManager=tt,t.JhiEventWithContent=et,t.JhiFilterPipe=R,t.JhiItemCountComponent=g,t.JhiKeysPipe=J,t.JhiLanguageService=M,t.JhiMaxValidatorDirective=b,t.JhiMaxbytesValidatorDirective=v,t.JhiMinValidatorDirective=j,t.JhiMinbytesValidatorDirective=y,t.JhiMissingTranslationHandler=D,t.JhiModuleConfig=p,t.JhiOrderByPipe=U,t.JhiPaginationUtil=$,t.JhiParseLinks=Q,t.JhiPureFilterPipe=_,t.JhiResolvePagingParams=at,t.JhiSortByDirective=x,t.JhiSortDirective=I,t.JhiTranslateDirective=S,t.JhiTruncateCharactersPipe=z,t.JhiTruncateWordsPipe=G,t.NgJhipsterModule=K,t.missingTranslationHandler=function(t){return new D(t)},t.translatePartialLoader=function(t){return new u.TranslateHttpLoader(t,"i18n/",".json?buildTimestamp="+process.env.BUILD_TIMESTAMP)},t.ɵa=V,t.ɵb=H,t.ɵc=Z,t.ɵd=N,t.ɵe=A,t.ɵf=E,t.ɵg=L,t.ɵh=B,t.ɵi=O,t.ɵj=W,t.ɵk=F,t.ɵl=k,Object.defineProperty(t,"__esModule",{value:!0})}));
16//# sourceMappingURL=ng-jhipster.umd.min.js.map
\No newline at end of file