text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("primeng/dom"),require("primeng/api"),require("@angular/animations")):"function"==typeof define&&define.amd?define("primeng/toast",["exports","@angular/core","@angular/common","primeng/dom","primeng/api","@angular/animations"],e):e(((t=t||self).primeng=t.primeng||{},t.primeng.toast={}),t.ng.core,t.ng.common,t.primeng.dom,t.primeng.api,t.ng.animations)}(this,(function(t,e,i,s,n,o){"use strict";var a=this&&this.__decorate||function(t,e,i,s){var n,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(a=(o<3?n(a):o>3?n(e,i,a):n(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a},r=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var s,n,o=i.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return a},p=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(r(arguments[e]));return t},m=function(){function t(t){this.zone=t,this.onClose=new e.EventEmitter}return t.prototype.ngAfterViewInit=function(){this.initTimeout()},t.prototype.initTimeout=function(){var t=this;this.message.sticky||this.zone.runOutsideAngular((function(){t.timeout=setTimeout((function(){t.onClose.emit({index:t.index,message:t.message})}),t.message.life||3e3)}))},t.prototype.clearTimeout=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseEnter=function(){this.clearTimeout()},t.prototype.onMouseLeave=function(){this.initTimeout()},t.prototype.onCloseIconClick=function(t){this.clearTimeout(),this.onClose.emit({index:this.index,message:this.message}),t.preventDefault()},t.prototype.ngOnDestroy=function(){this.clearTimeout()},t.ctorParameters=function(){return[{type:e.NgZone}]},a([e.Input()],t.prototype,"message",void 0),a([e.Input()],t.prototype,"index",void 0),a([e.Input()],t.prototype,"template",void 0),a([e.Input()],t.prototype,"showTransformOptions",void 0),a([e.Input()],t.prototype,"hideTransformOptions",void 0),a([e.Input()],t.prototype,"showTransitionOptions",void 0),a([e.Input()],t.prototype,"hideTransitionOptions",void 0),a([e.Output()],t.prototype,"onClose",void 0),a([e.ViewChild("container")],t.prototype,"containerViewChild",void 0),t=a([e.Component({selector:"p-toastItem",template:'\n        <div #container [attr.id]="message.id" class="ui-toast-message ui-shadow" [@messageState]="{value: \'visible\', params: {showTransformParams: showTransformOptions, hideTransformParams: hideTransformOptions, showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}"\n            [ngClass]="{\'ui-toast-message-info\': message.severity == \'info\',\'ui-toast-message-warn\': message.severity == \'warn\',\n                \'ui-toast-message-error\': message.severity == \'error\',\'ui-toast-message-success\': message.severity == \'success\'}"\n                (mouseenter)="onMouseEnter()" (mouseleave)="onMouseLeave()" role="alert" aria-live="assertive" aria-atomic="true">\n            <div class="ui-toast-message-content">\n                <a tabindex="0" class="ui-toast-close-icon pi pi-times" (click)="onCloseIconClick($event)" (keydown.enter)="onCloseIconClick($event)" *ngIf="message.closable !== false"></a>\n                <ng-container *ngIf="!template">\n                    <span class="ui-toast-icon pi"\n                        [ngClass]="{\'pi-info-circle\': message.severity == \'info\', \'pi-exclamation-triangle\': message.severity == \'warn\',\n                            \'pi-times-circle\': message.severity == \'error\', \'pi-check\' :message.severity == \'success\'}"></span>\n                    <div class="ui-toast-message-text-content">\n                        <div class="ui-toast-summary">{{message.summary}}</div>\n                        <div class="ui-toast-detail">{{message.detail}}</div>\n                    </div>\n                </ng-container>\n                <ng-container *ngTemplateOutlet="template; context: {$implicit: message}"></ng-container>\n            </div>\n        </div>\n    ',animations:[o.trigger("messageState",[o.state("visible",o.style({transform:"translateY(0)",opacity:1})),o.transition("void => *",[o.style({transform:"{{showTransformParams}}",opacity:0}),o.animate("{{showTransitionParams}}")]),o.transition("* => void",[o.animate("{{hideTransitionParams}}",o.style({height:0,opacity:0,transform:"{{hideTransformParams}}"}))])])]})],t)}(),l=function(){function t(t,i){this.messageService=t,this.cd=i,this.autoZIndex=!0,this.baseZIndex=0,this.position="top-right",this.preventOpenDuplicates=!1,this.preventDuplicates=!1,this.showTransformOptions="translateY(100%)",this.hideTransformOptions="translateY(-100%)",this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="250ms ease-in",this.onClose=new e.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;this.messageSubscription=this.messageService.messageObserver.subscribe((function(e){if(e){if(e instanceof Array){var i=e.filter((function(e){return t.canAdd(e)}));t.add(i)}else t.canAdd(e)&&t.add([e]);t.modal&&t.messages&&t.messages.length&&t.enableModality()}})),this.clearSubscription=this.messageService.clearObserver.subscribe((function(e){e?t.key===e&&(t.messages=null):t.messages=null,t.modal&&t.disableModality()}))},t.prototype.add=function(t){this.messages=this.messages?p(this.messages,t):p(t),this.preventDuplicates&&(this.messagesArchieve=this.messagesArchieve?p(this.messagesArchieve,t):p(t))},t.prototype.canAdd=function(t){var e=this.key===t.key;return e&&this.preventOpenDuplicates&&(e=!this.containsMessage(this.messages,t)),e&&this.preventDuplicates&&(e=!this.containsMessage(this.messagesArchieve,t)),e},t.prototype.containsMessage=function(t,e){return!!t&&null!=t.find((function(t){return t.summary===e.summary&&t.detail==e.detail&&t.severity===e.severity}))},t.prototype.ngAfterContentInit=function(){var t=this;this.templates.forEach((function(e){switch(e.getType()){case"message":default:t.template=e.template}}))},t.prototype.onMessageClose=function(t){this.messages.splice(t.index,1),0===this.messages.length&&this.disableModality(),this.onClose.emit({message:t.message}),this.cd.detectChanges()},t.prototype.enableModality=function(){if(!this.mask){this.mask=document.createElement("div"),this.mask.style.zIndex=String(parseInt(this.containerViewChild.nativeElement.style.zIndex)-1),this.mask.style.display="block";s.DomHandler.addMultipleClasses(this.mask,"ui-widget-overlay ui-dialog-mask"),document.body.appendChild(this.mask)}},t.prototype.disableModality=function(){this.mask&&(document.body.removeChild(this.mask),this.mask=null)},t.prototype.onAnimationStart=function(t){"void"===t.fromState&&this.autoZIndex&&(this.containerViewChild.nativeElement.style.zIndex=String(this.baseZIndex+ ++s.DomHandler.zindex))},t.prototype.ngOnDestroy=function(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.disableModality()},t.ctorParameters=function(){return[{type:n.MessageService},{type:e.ChangeDetectorRef}]},a([e.Input()],t.prototype,"key",void 0),a([e.Input()],t.prototype,"autoZIndex",void 0),a([e.Input()],t.prototype,"baseZIndex",void 0),a([e.Input()],t.prototype,"style",void 0),a([e.Input()],t.prototype,"styleClass",void 0),a([e.Input()],t.prototype,"position",void 0),a([e.Input()],t.prototype,"modal",void 0),a([e.Input()],t.prototype,"preventOpenDuplicates",void 0),a([e.Input()],t.prototype,"preventDuplicates",void 0),a([e.Input()],t.prototype,"showTransformOptions",void 0),a([e.Input()],t.prototype,"hideTransformOptions",void 0),a([e.Input()],t.prototype,"showTransitionOptions",void 0),a([e.Input()],t.prototype,"hideTransitionOptions",void 0),a([e.Output()],t.prototype,"onClose",void 0),a([e.ViewChild("container")],t.prototype,"containerViewChild",void 0),a([e.ContentChildren(n.PrimeTemplate)],t.prototype,"templates",void 0),t=a([e.Component({selector:"p-toast",template:"\n        <div #container [ngClass]=\"{'ui-toast ui-widget': true, \n                'ui-toast-top-right': position === 'top-right',\n                'ui-toast-top-left': position === 'top-left',\n                'ui-toast-bottom-right': position === 'bottom-right',\n                'ui-toast-bottom-left': position === 'bottom-left',\n                'ui-toast-top-center': position === 'top-center',\n                'ui-toast-bottom-center': position === 'bottom-center',\n                'ui-toast-center': position === 'center'}\" \n                [ngStyle]=\"style\" [class]=\"styleClass\">\n            <p-toastItem *ngFor=\"let msg of messages; let i=index\" [message]=\"msg\" [index]=\"i\" (onClose)=\"onMessageClose($event)\"\n                    [template]=\"template\" @toastAnimation (@toastAnimation.start)=\"onAnimationStart($event)\" \n                    [showTransformOptions]=\"showTransformOptions\" [hideTransformOptions]=\"hideTransformOptions\" \n                    [showTransitionOptions]=\"showTransitionOptions\" [hideTransitionOptions]=\"hideTransitionOptions\"></p-toastItem>\n        </div>\n    ",animations:[o.trigger("toastAnimation",[o.transition(":enter, :leave",[o.query("@*",o.animateChild())])])],changeDetection:e.ChangeDetectionStrategy.Default})],t)}(),u=function(){function t(){}return t=a([e.NgModule({imports:[i.CommonModule],exports:[l,n.SharedModule],declarations:[l,m]})],t)}();t.Toast=l,t.ToastItem=m,t.ToastModule=u,Object.defineProperty(t,"__esModule",{value:!0})}));
  //# sourceMappingURL=primeng-toast.umd.min.js.map