import{a as N}from"./chunk-HDQXASVT.js";import{a as j,d as P,o as l,q as S,u as F,w as L,y as W}from"./chunk-W6VI2ZDA.js";import{$b as C,Aa as d,Ab as m,Ba as g,Bb as w,Cb as b,Ea as r,Fa as c,La as u,Oa as f,Zb as v,_b as T,hc as y,ic as E,k as a,ka as p,kd as I,la as h,lc as D,mc as R,ob as _,pa as n,wc as M,xc as O}from"./chunk-UNHECMG2.js";var A=["*"],k=(()=>{class t{constructor(){this._ngbConfig=n(N),this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return this._animation??this._ngbConfig.animation}set animation(i){this._animation=i}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=p({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),x=0,H=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=m({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(e,o){e&1&&E("mouseenter",function(){return o.onMouseEnter()})("mouseleave",function(){return o.onMouseLeave()}),e&2&&(y("id",o.id),O("tooltip"+(o.tooltipClass?" "+o.tooltipClass:"")),M("fade",o.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave"},ngContentSelectors:A,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(e,o){e&1&&(D(),C(0,"div",0),v(1,"div",1),R(2),T())},styles:[`ngb-tooltip-window{pointer-events:none;position:absolute}ngb-tooltip-window .tooltip-inner{pointer-events:auto}ngb-tooltip-window.bs-tooltip-top,ngb-tooltip-window.bs-tooltip-bottom{padding-left:0;padding-right:0}ngb-tooltip-window.bs-tooltip-start,ngb-tooltip-window.bs-tooltip-end{padding-top:0;padding-bottom:0}
`],encapsulation:2,changeDetection:0})}}return t})(),tt=(()=>{class t{constructor(){this._config=n(k),this.animation=this._config.animation,this.autoClose=this._config.autoClose,this.placement=this._config.placement,this.popperOptions=this._config.popperOptions,this.triggers=this._config.triggers,this.container=this._config.container,this.disableTooltip=this._config.disableTooltip,this.tooltipClass=this._config.tooltipClass,this.openDelay=this._config.openDelay,this.closeDelay=this._config.closeDelay,this.shown=new r,this.hidden=new r,this._nativeElement=n(f).nativeElement,this._ngZone=n(c),this._document=n(g),this._changeDetector=n(I),this._injector=n(d),this._ngbTooltipWindowId=`ngb-tooltip-${x++}`,this._popupService=new L(H),this._windowRef=null,this._positioning=j(),this._mouseEnterTooltip=new a,this._mouseLeaveTooltip=new a,this._opening=!0,this._transitioning=!1}set ngbTooltip(i){this._ngbTooltip=i,!i&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(i){if(!this._opening&&this._transitioning&&(this._transitioning=!1,l(this._windowRef.location.nativeElement)),!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){let{windowRef:e,transition$:o}=this._popupService.open(this._ngbTooltip,i??this.tooltipContext,this.animation);this._opening=!0,this._transitioning=!0,this._windowRef=e,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._windowRef.setInput("onMouseEnter",()=>this._mouseEnterTooltip.next()),this._windowRef.setInput("onMouseLeave",()=>this._mouseLeaveTooltip.next()),this._getPositionTargetElement().setAttribute("aria-describedby",this._ngbTooltipWindowId),this.container==="body"&&this._document.body.appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,baseClass:"bs-tooltip",updatePopperOptions:s=>this.popperOptions(F([0,6])(s))}),Promise.resolve().then(()=>{this._positioning.update()}),this._afterRenderRef=_({mixedReadWrite:()=>{this._positioning.update()}},{injector:this._injector})}),S(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement],[this._nativeElement]),o.subscribe(()=>{this._transitioning&&(this._transitioning=!1,this.shown.emit())})}}close(i=this.animation){this._opening&&this._transitioning&&(this._transitioning=!1,l(this._windowRef.location.nativeElement)),this._windowRef!=null&&(this._getPositionTargetElement().removeAttribute("aria-describedby"),this._opening=!1,this._transitioning=!0,this._popupService.close(i).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._afterRenderRef?.destroy(),this._transitioning&&(this._transitioning=!1,this.hidden.emit()),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return this._windowRef!=null}ngOnInit(){this._unregisterListenersFn=W(this._nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay,this._mouseEnterTooltip,this._mouseLeaveTooltip)}ngOnChanges({tooltipClass:i}){i&&this.isOpen()&&this._windowRef.setInput("tooltipClass",i.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(P(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._nativeElement}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275dir=b({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",tooltipContext:"tooltipContext",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[u]})}}return t})(),it=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=h({})}}return t})();export{tt as a,it as b};
