!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core"),require("ngx-bootstrap/component-loader"),require("ngx-bootstrap/utils"),require("ngx-bootstrap/positioning"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-bootstrap/popover",["exports","@angular/core","ngx-bootstrap/component-loader","ngx-bootstrap/utils","ngx-bootstrap/positioning","@angular/common"],o):o(((t=t||self)["ngx-bootstrap"]=t["ngx-bootstrap"]||{},t["ngx-bootstrap"].popover={}),t.ng.core,t.componentLoader,t.utils,t.positioning,t.ng.common)}(this,function(t,o,e,n,i,r){"use strict";var p=function(){function t(){this.adaptivePosition=!0,this.placement="top",this.triggers="click",this.outsideClick=!1}return t.decorators=[{type:o.Injectable}],t}(),s=function(){function t(t){Object.assign(this,t)}return Object.defineProperty(t.prototype,"isBs3",{get:function(){return n.isBs3()},enumerable:!0,configurable:!0}),t.decorators=[{type:o.Component,args:[{selector:"popover-container",changeDetection:o.ChangeDetectionStrategy.OnPush,host:{"[class]":'"popover in popover-" + placement + " " + "bs-popover-" + placement + " " + placement + " " + containerClass',"[class.show]":"!isBs3","[class.bs3]":"isBs3",role:"tooltip",style:"display:block;"},template:'
\n

{{ title }}

\n
\n \n
\n',styles:["\n :host.bs3.popover-top {\n margin-bottom: 10px;\n }\n :host.bs3.popover.top>.arrow {\n margin-left: -2px;\n }\n :host.bs3.popover.top {\n margin-bottom: 10px;\n }\n :host.popover.bottom>.arrow {\n margin-left: -4px;\n }\n :host.bs3.bs-popover-left {\n margin-right: .5rem;\n }\n :host.bs3.bs-popover-right .arrow, :host.bs3.bs-popover-left .arrow{\n margin: .3rem 0;\n }\n "]}]}],t.ctorParameters=function(){return[{type:p}]},t.propDecorators={placement:[{type:o.Input}],title:[{type:o.Input}]},t}(),a=function(){function t(t,o,e,n,i,r){this._positionService=r,this.outsideClick=!1,this.containerClass="",this._isInited=!1,this._popover=i.createLoader(o,n,e).provide({provide:p,useValue:t}),Object.assign(this,t),this.onShown=this._popover.onShown,this.onHidden=this._popover.onHidden,"undefined"!=typeof window&&o.nativeElement.addEventListener("click",function(){try{o.nativeElement.focus()}catch(t){return}})}return Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._popover.isShown},set:function(t){t?this.show():this.hide()},enumerable:!0,configurable:!0}),t.prototype.show=function(){!this._popover.isShown&&this.popover&&(this._positionService.setOptions({modifiers:{flip:{enabled:this.adaptivePosition},preventOverflow:{enabled:this.adaptivePosition}}}),this._popover.attach(s).to(this.container).position({attachment:this.placement}).show({content:this.popover,context:this.popoverContext,placement:this.placement,title:this.popoverTitle,containerClass:this.containerClass}),this.adaptivePosition||(this._positionService.calcPosition(),this._positionService.deletePositionElement(this._popover._componentRef.location)),this.isOpen=!0)},t.prototype.hide=function(){this.isOpen&&(this._popover.hide(),this.isOpen=!1)},t.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},t.prototype.ngOnInit=function(){var t=this;this._isInited||(this._isInited=!0,this._popover.listen({triggers:this.triggers,outsideClick:this.outsideClick,show:function(){return t.show()}}))},t.prototype.ngOnDestroy=function(){this._popover.dispose()},t.decorators=[{type:o.Directive,args:[{selector:"[popover]",exportAs:"bs-popover"}]}],t.ctorParameters=function(){return[{type:p},{type:o.ElementRef},{type:o.Renderer2},{type:o.ViewContainerRef},{type:e.ComponentLoaderFactory},{type:i.PositioningService}]},t.propDecorators={adaptivePosition:[{type:o.Input}],popover:[{type:o.Input}],popoverContext:[{type:o.Input}],popoverTitle:[{type:o.Input}],placement:[{type:o.Input}],outsideClick:[{type:o.Input}],triggers:[{type:o.Input}],container:[{type:o.Input}],containerClass:[{type:o.Input}],isOpen:[{type:o.Input}],onShown:[{type:o.Output}],onHidden:[{type:o.Output}]},t}(),c=function(){function t(){}return t.forRoot=function(){return{ngModule:t,providers:[p,e.ComponentLoaderFactory,i.PositioningService]}},t.decorators=[{type:o.NgModule,args:[{imports:[r.CommonModule],declarations:[a,s],exports:[a],entryComponents:[s]}]}],t}();t.PopoverConfig=p,t.PopoverContainerComponent=s,t.PopoverDirective=a,t.PopoverModule=c,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=ngx-bootstrap-popover.umd.min.js.map