import{a as ut,c as Ot}from"./chunk-H6QVTBMZ.js";import{a as zt}from"./chunk-XNR6WIGX.js";import{c as Ut,d as Ft,f as Mt,h as Rt,i as kt,k as Pt}from"./chunk-F2X3VGZZ.js";import{a as mt,b as Gt}from"./chunk-CV2ZWZQE.js";import{G as qt,H as et,I as Lt,K as it,aa as Tt,b as Vt,d as Nt,fa as Kt,ia as xt,ja as M,la as K,oa as G,t as Zt,u as Dt,y as tt}from"./chunk-R2UR7BVM.js";import{b as wt,c as Qt,d as St,f as It,g as bt,j as q}from"./chunk-HKLJ6VPZ.js";import{d as pt}from"./chunk-72CHOCZD.js";import{$b as ct,Eb as S,Fb as I,Gb as P,Hb as A,Ib as $,Jb as W,Kb as rt,Pb as at,Qb as f,Rb as Q,S as B,Sb as N,T as nt,Ua as p,Ub as H,Vb as ot,Wb as b,Xb as T,Y as j,_a as lt,da as Bt,ea as J,fa as X,ga as _t,gb as E,ha as C,hb as st,kb as V,kc as Z,lc as $t,mb as _,mc as F,na as O,nc as ht,oa as yt,oc as Ct,sb as D,tb as c,ub as jt,uc as Wt,vb as vt,wb as At,xb as w,yc as dt}from"./chunk-56X5LYJH.js";import{a as k,b as Et}from"./chunk-TSRGIXR5.js";var Yt=(()=>{class i extends zt{pathId;ngOnInit(){this.pathId="url(#"+Tt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=E({type:i,selectors:[["SpinnerIcon"]],features:[V],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(_t(),S(0,"svg",0)(1,"g"),P(2,"path",1),I(),S(3,"defs")(4,"clipPath",2),P(5,"rect",3),I()()()),e&2&&(w(n.getClassNames()),D("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),p(),D("clip-path",n.pathId),p(3),c("id",n.pathId))},encapsulation:2})}return i})();var oe=["*"],le=({dt:i})=>`
.p-iconfield {
    position: relative;
    display: block;
}

.p-inputicon {
    position: absolute;
    top: 50%;
    margin-top: calc(-1 * (${i("icon.size")} / 2));
    color: ${i("iconfield.icon.color")};
    line-height: 1;
}

.p-iconfield .p-inputicon:first-child {
    inset-inline-start: ${i("form.field.padding.x")};
}

.p-iconfield .p-inputicon:last-child {
    inset-inline-end: ${i("form.field.padding.x")};
}

.p-iconfield .p-inputtext:not(:first-child) {
    padding-inline-start: calc((${i("form.field.padding.x")} * 2) + ${i("icon.size")});
}

.p-iconfield .p-inputtext:not(:last-child) {
    padding-inline-end: calc((${i("form.field.padding.x")} * 2) + ${i("icon.size")});
}

.p-iconfield:has(.p-inputfield-sm) .p-inputicon {
    font-size: ${i("form.field.sm.font.size")};
    width: ${i("form.field.sm.font.size")};
    height: ${i("form.field.sm.font.size")};
    margin-top: calc(-1 * (${i("form.field.sm.font.size")} / 2));
}

.p-iconfield:has(.p-inputfield-lg) .p-inputicon {
    font-size: ${i("form.field.lg.font.size")};
    width: ${i("form.field.lg.font.size")};
    height: ${i("form.field.lg.font.size")};
    margin-top: calc(-1 * (${i("form.field.lg.font.size")} / 2));
}
`,re={root:"p-iconfield"},Jt=(()=>{class i extends K{name="iconfield";theme=le;classes=re;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=B({token:i,factory:i.\u0275fac})}return i})();var gi=(()=>{class i extends G{iconPosition="left";get _styleClass(){return this.styleClass}styleClass;_componentStyle=j(Jt);static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=E({type:i,selectors:[["p-iconfield"],["p-iconField"],["p-icon-field"]],hostAttrs:[1,"p-iconfield"],hostVars:6,hostBindings:function(e,n){e&2&&(w(n._styleClass),vt("p-iconfield-left",n.iconPosition==="left")("p-iconfield-right",n.iconPosition==="right"))},inputs:{iconPosition:"iconPosition",styleClass:"styleClass"},features:[Z([Jt]),V],ngContentSelectors:oe,decls:1,vars:0,template:function(e,n){e&1&&(Q(),N(0))},dependencies:[q],encapsulation:2,changeDetection:0})}return i})();var Ci=(()=>{class i extends zt{pathId;ngOnInit(){this.pathId="url(#"+Tt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=E({type:i,selectors:[["SearchIcon"]],features:[V],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(_t(),S(0,"svg",0)(1,"g"),P(2,"path",1),I(),S(3,"defs")(4,"clipPath",2),P(5,"rect",3),I()()()),e&2&&(w(n.getClassNames()),D("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),p(),D("clip-path",n.pathId),p(3),c("id",n.pathId))},encapsulation:2})}return i})();var ae=["*"],ce={root:"p-inputicon"},Xt=(()=>{class i extends K{name="inputicon";classes=ce;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=B({token:i,factory:i.\u0275fac})}return i})(),Mi=(()=>{class i extends G{styleClass;get hostClasses(){return this.styleClass}_componentStyle=j(Xt);static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=E({type:i,selectors:[["p-inputicon"],["p-inputIcon"]],hostVars:4,hostBindings:function(e,n){e&2&&(w(n.hostClasses),vt("p-inputicon",!0))},inputs:{styleClass:"styleClass"},features:[Z([Xt]),V],ngContentSelectors:ae,decls:1,vars:0,template:function(e,n){e&1&&(Q(),N(0))},dependencies:[q,M],encapsulation:2,changeDetection:0})}return i})();var te=["content"],de=["overlay"],pe=["*"],me=(i,r,t,e,n,s,o,l,g,m,d,x,y,z)=>({"p-overlay p-component":!0,"p-overlay-modal p-overlay-mask p-overlay-mask-enter":i,"p-overlay-center":r,"p-overlay-top":t,"p-overlay-top-start":e,"p-overlay-top-end":n,"p-overlay-bottom":s,"p-overlay-bottom-start":o,"p-overlay-bottom-end":l,"p-overlay-left":g,"p-overlay-left-start":m,"p-overlay-left-end":d,"p-overlay-right":x,"p-overlay-right-start":y,"p-overlay-right-end":z}),ue=(i,r,t)=>({showTransitionParams:i,hideTransitionParams:r,transform:t}),fe=i=>({value:"visible",params:i}),ge=i=>({mode:i}),_e=i=>({$implicit:i});function ye(i,r){i&1&&W(0)}function ve(i,r){if(i&1){let t=rt();S(0,"div",3,1),at("click",function(n){J(t);let s=f(2);return X(s.onOverlayContentClick(n))})("@overlayContentAnimation.start",function(n){J(t);let s=f(2);return X(s.onOverlayContentAnimationStart(n))})("@overlayContentAnimation.done",function(n){J(t);let s=f(2);return X(s.onOverlayContentAnimationDone(n))}),N(2),_(3,ye,1,0,"ng-container",4),I()}if(i&2){let t=f(2);w(t.contentStyleClass),c("ngStyle",t.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",F(11,fe,Ct(7,ue,t.showTransitionOptions,t.hideTransitionOptions,t.transformOptions[t.modal?t.overlayResponsiveDirection:"default"]))),p(3),c("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",F(15,_e,F(13,ge,t.overlayMode)))}}function Ce(i,r){if(i&1){let t=rt();S(0,"div",3,0),at("click",function(){J(t);let n=f();return X(n.onOverlayClick())}),_(2,ve,4,17,"div",2),I()}if(i&2){let t=f();w(t.styleClass),c("ngStyle",t.style)("ngClass",Wt(5,me,[t.modal,t.modal&&t.overlayResponsiveDirection==="center",t.modal&&t.overlayResponsiveDirection==="top",t.modal&&t.overlayResponsiveDirection==="top-start",t.modal&&t.overlayResponsiveDirection==="top-end",t.modal&&t.overlayResponsiveDirection==="bottom",t.modal&&t.overlayResponsiveDirection==="bottom-start",t.modal&&t.overlayResponsiveDirection==="bottom-end",t.modal&&t.overlayResponsiveDirection==="left",t.modal&&t.overlayResponsiveDirection==="left-start",t.modal&&t.overlayResponsiveDirection==="left-end",t.modal&&t.overlayResponsiveDirection==="right",t.modal&&t.overlayResponsiveDirection==="right-start",t.modal&&t.overlayResponsiveDirection==="right-end"])),p(2),c("ngIf",t.visible)}}var we=({dt:i})=>`
.p-overlay {
    position: absolute;
    top: 0;
}

.p-overlay-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.p-overlay-content {
    transform-origin: inherit;
}

.p-overlay-modal > .p-overlay-content {
    z-index: 1;
    width: 90%;
}

/* Position */
/* top */
.p-overlay-top {
    align-items: flex-start;
}
.p-overlay-top-start {
    align-items: flex-start;
    justify-content: flex-start;
}
.p-overlay-top-end {
    align-items: flex-start;
    justify-content: flex-end;
}

/* bottom */
.p-overlay-bottom {
    align-items: flex-end;
}
.p-overlay-bottom-start {
    align-items: flex-end;
    justify-content: flex-start;
}
.p-overlay-bottom-end {
    align-items: flex-end;
    justify-content: flex-end;
}

/* left */
.p-overlay-left {
    justify-content: flex-start;
}
.p-overlay-left-start {
    justify-content: flex-start;
    align-items: flex-start;
}
.p-overlay-left-end {
    justify-content: flex-start;
    align-items: flex-end;
}

/* right */
.p-overlay-right {
    justify-content: flex-end;
}
.p-overlay-right-start {
    justify-content: flex-end;
    align-items: flex-start;
}
.p-overlay-right-end {
    justify-content: flex-end;
    align-items: flex-end;
}
`,ee=(()=>{class i extends K{name="overlay";theme=we;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=B({token:i,factory:i.\u0275fac})}return i})(),Se=kt([Mt({transform:"{{transform}}",opacity:0}),Ft("{{showTransitionParams}}")]),Ie=kt([Ft("{{hideTransitionParams}}",Mt({transform:"{{transform}}",opacity:0}))]),be=(()=>{class i extends G{overlayService;zone;get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(t){this._mode=t}get style(){return ut.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(t){this._style=t}get styleClass(){return ut.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(t){this._styleClass=t}get contentStyle(){return ut.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(t){this._contentStyle=t}get contentStyleClass(){return ut.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(t){this._contentStyleClass=t}get target(){let t=this._target||this.overlayOptions?.target;return t===void 0?"@prev":t}set target(t){this._target=t}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(t){this._appendTo=t}get autoZIndex(){let t=this._autoZIndex||this.overlayOptions?.autoZIndex;return t===void 0?!0:t}set autoZIndex(t){this._autoZIndex=t}get baseZIndex(){let t=this._baseZIndex||this.overlayOptions?.baseZIndex;return t===void 0?0:t}set baseZIndex(t){this._baseZIndex=t}get showTransitionOptions(){let t=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return t===void 0?".12s cubic-bezier(0, 0, 0.2, 1)":t}set showTransitionOptions(t){this._showTransitionOptions=t}get hideTransitionOptions(){let t=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return t===void 0?".1s linear":t}set hideTransitionOptions(t){this._hideTransitionOptions=t}get listener(){return this._listener||this.overlayOptions?.listener}set listener(t){this._listener=t}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(t){this._responsive=t}get options(){return this._options}set options(t){this._options=t}visibleChange=new O;onBeforeShow=new O;onShow=new O;onBeforeHide=new O;onHide=new O;onAnimationStart=new O;onAnimationDone=new O;overlayViewChild;contentViewChild;contentTemplate;templates;_contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_appendTo;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;_componentStyle=j(ee);documentKeyboardListener;window;transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"};get modal(){if(pt(this.platformId))return this.mode==="modal"||this.overlayResponsiveOptions&&this.document.defaultView?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return k(k({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return k(k({},this.overlayOptions?.responsive),this.responsive)}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return qt(this.target,this.el?.nativeElement)}constructor(t,e){super(),this.overlayService=t,this.zone=e}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this._contentTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}show(t,e=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),e&&Dt(this.targetEl),this.modal&&Vt(this.document?.body,"p-overflow-hidden")}hide(t,e=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),e&&Dt(this.targetEl),this.modal&&Nt(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&mt.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(t){this._visible=t,this.visibleChange.emit(t)}onOverlayClick(){this.isOverlayClicked=!0}onOverlayContentClick(t){this.overlayService.add({originalEvent:t,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(t){switch(t.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&Ot.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),mt.appendOverlay(this.overlayEl,this.appendTo==="body"?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&Vt(this.overlayEl,"p-overlay-mask-leave");break}this.handleEvents("onAnimationStart",t)}onOverlayContentAnimationDone(t){let e=this.overlayEl||t.element.parentElement;switch(t.toState){case"visible":this.visible&&(this.show(e,!0),this.bindListeners());break;case"void":if(!this.visible){this.hide(e,!0),this.modalVisible=!1,this.unbindListeners(),mt.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),Ot.clear(e),this.cd.markForCheck();break}}this.handleEvents("onAnimationDone",t)}handleEvents(t,e){this[t].emit(e),this.options&&this.options[t]&&this.options[t](e),this.config?.overlayOptions&&(this.config?.overlayOptions)[t]&&(this.config?.overlayOptions)[t](e)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Gt(this.targetEl,t=>{(this.listener?this.listener(t,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(t,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",t=>{let n=!(this.targetEl&&(this.targetEl.isSameNode(t.target)||!this.isOverlayClicked&&this.targetEl.contains(t.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(t,{type:"outside",mode:this.overlayMode,valid:t.which!==3&&n}):n)&&this.hide(t),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.document.defaultView,"resize",t=>{(this.listener?this.listener(t,{type:"resize",mode:this.overlayMode,valid:!it()}):!it())&&this.hide(t,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.document.defaultView,"keydown",t=>{if(this.overlayOptions.hideOnEscape===!1||t.code!=="Escape")return;(this.listener?this.listener(t,{type:"keydown",mode:this.overlayMode,valid:!it()}):!it())&&this.zone.run(()=>{this.hide(t,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(mt.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),Ot.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners(),super.ngOnDestroy()}static \u0275fac=function(e){return new(e||i)(lt(Kt),lt(yt))};static \u0275cmp=E({type:i,selectors:[["p-overlay"]],contentQueries:function(e,n,s){if(e&1&&(H(s,te,4),H(s,xt,4)),e&2){let o;b(o=T())&&(n.contentTemplate=o.first),b(o=T())&&(n.templates=o)}},viewQuery:function(e,n){if(e&1&&(ot(de,5),ot(te,5)),e&2){let s;b(s=T())&&(n.overlayViewChild=s.first),b(s=T())&&(n.contentViewChild=s.first)}},inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[Z([ee]),V],ngContentSelectors:pe,decls:1,vars:1,consts:[["overlay",""],["content",""],[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"click","ngStyle","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){e&1&&(Q(),_(0,Ce,3,20,"div",2)),e&2&&c("ngIf",n.modalVisible)},dependencies:[q,wt,St,bt,It,M],encapsulation:2,data:{animation:[Ut("overlayContentAnimation",[Rt(":enter",[Pt(Se)]),Rt(":leave",[Pt(Ie)])])]},changeDetection:0})}return i})(),nn=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=st({type:i});static \u0275inj=nt({imports:[be,M,M]})}return i})();var ie=["content"],Te=["item"],xe=["loader"],ze=["loadericon"],Oe=["element"],Ee=["*"],Ve=(i,r,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":r,"p-virtualscroller-horizontal p-horizontal-scroll":t}),Ht=(i,r)=>({$implicit:i,options:r}),De=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),Le=i=>({"p-virtualscroller-loader-mask":i}),Fe=i=>({numCols:i}),se=i=>({options:i}),Me=()=>({styleClass:"p-virtualscroller-loading-icon"}),Re=(i,r)=>({rows:i,columns:r});function ke(i,r){i&1&&W(0)}function Pe(i,r){if(i&1&&(A(0),_(1,ke,1,0,"ng-container",10),$()),i&2){let t=f(2);p(),c("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",ht(2,Ht,t.loadedItems,t.getContentOptions()))}}function He(i,r){i&1&&W(0)}function Be(i,r){if(i&1&&(A(0),_(1,He,1,0,"ng-container",10),$()),i&2){let t=r.$implicit,e=r.index,n=f(3);p(),c("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",ht(2,Ht,t,n.getOptions(e)))}}function je(i,r){if(i&1&&(S(0,"div",11,3),_(2,Be,2,5,"ng-container",12),I()),i&2){let t=f(2);At(t.contentStyle),w(t.contentStyleClass),c("ngClass",F(8,De,t.d_loading)),D("data-pc-section","content"),p(2),c("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function Ae(i,r){if(i&1&&P(0,"div",13),i&2){let t=f(2);c("ngStyle",t.spacerStyle),D("data-pc-section","spacer")}}function $e(i,r){i&1&&W(0)}function We(i,r){if(i&1&&(A(0),_(1,$e,1,0,"ng-container",10),$()),i&2){let t=r.index,e=f(4);p(),c("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",F(4,se,e.getLoaderOptions(t,e.both&&F(2,Fe,e.numItemsInViewport.cols))))}}function Qe(i,r){if(i&1&&(A(0),_(1,We,2,6,"ng-container",15),$()),i&2){let t=f(3);p(),c("ngForOf",t.loaderArr)}}function Ne(i,r){i&1&&W(0)}function Ze(i,r){if(i&1&&(A(0),_(1,Ne,1,0,"ng-container",10),$()),i&2){let t=f(4);p(),c("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",F(3,se,$t(2,Me)))}}function qe(i,r){i&1&&P(0,"SpinnerIcon",16),i&2&&(c("styleClass","p-virtualscroller-loading-icon pi-spin"),D("data-pc-section","loadingIcon"))}function Ke(i,r){if(i&1&&_(0,Ze,2,5,"ng-container",6)(1,qe,1,2,"ng-template",null,5,dt),i&2){let t=ct(2),e=f(3);c("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function Ge(i,r){if(i&1&&(S(0,"div",14),_(1,Qe,2,1,"ng-container",6)(2,Ke,3,2,"ng-template",null,4,dt),I()),i&2){let t=ct(3),e=f(2);c("ngClass",F(4,Le,!e.loaderTemplate)),D("data-pc-section","loader"),p(),c("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function Ue(i,r){if(i&1){let t=rt();A(0),S(1,"div",7,1),at("scroll",function(n){J(t);let s=f();return X(s.onContainerScroll(n))}),_(3,Pe,2,5,"ng-container",6)(4,je,3,10,"ng-template",null,2,dt)(6,Ae,1,2,"div",8)(7,Ge,4,6,"div",9),I(),$()}if(i&2){let t=ct(5),e=f();p(),w(e._styleClass),c("ngStyle",e._style)("ngClass",Ct(12,Ve,e.inline,e.both,e.horizontal)),D("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),p(2),c("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),p(3),c("ngIf",e._showSpacer),p(),c("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function Ye(i,r){i&1&&W(0)}function Je(i,r){if(i&1&&(A(0),_(1,Ye,1,0,"ng-container",10),$()),i&2){let t=f(2);p(),c("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",ht(5,Ht,t.items,ht(2,Re,t._items,t.loadedColumns)))}}function Xe(i,r){if(i&1&&(N(0),_(1,Je,2,8,"ng-container",17)),i&2){let t=f();p(),c("ngIf",t.contentTemplate||t._contentTemplate)}}var ti=({dt:i})=>`
.p-virtualscroller {
    position: relative;
    overflow: auto;
    contain: strict;
    transform: translateZ(0);
    will-change: scroll-position;
    outline: 0 none;
}

.p-virtualscroller-content {
    position: absolute;
    top: 0;
    left: 0;
    min-height: 100%;
    min-width: 100%;
    will-change: transform;
}

.p-virtualscroller-spacer {
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 1px;
    transform-origin: 0 0;
    pointer-events: none;
}

.p-virtualscroller-loader {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: ${i("virtualscroller.loader.mask.background")};
    color: ${i("virtualscroller.loader.mask.color")};
}

.p-virtualscroller-loader-mask {
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-virtualscroller-loading-icon {
    font-size: ${i("virtualscroller.loader.icon.size")};
    width: ${i("virtualscroller.loader.icon.size")};
    height: ${i("virtualscroller.loader.icon.size")};
}

.p-virtualscroller-horizontal > .p-virtualscroller-content {
    display: flex;
}

.p-virtualscroller-inline .p-virtualscroller-content {
    position: static;
}
`,ne=(()=>{class i extends K{name="virtualscroller";theme=ti;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=B({token:i,factory:i.\u0275fac})}return i})();var ei=(()=>{class i extends G{zone;get id(){return this._id}set id(t){this._id=t}get style(){return this._style}set style(t){this._style=t}get styleClass(){return this._styleClass}set styleClass(t){this._styleClass=t}get tabindex(){return this._tabindex}set tabindex(t){this._tabindex=t}get items(){return this._items}set items(t){this._items=t}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t}get scrollHeight(){return this._scrollHeight}set scrollHeight(t){this._scrollHeight=t}get scrollWidth(){return this._scrollWidth}set scrollWidth(t){this._scrollWidth=t}get orientation(){return this._orientation}set orientation(t){this._orientation=t}get step(){return this._step}set step(t){this._step=t}get delay(){return this._delay}set delay(t){this._delay=t}get resizeDelay(){return this._resizeDelay}set resizeDelay(t){this._resizeDelay=t}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=t}get inline(){return this._inline}set inline(t){this._inline=t}get lazy(){return this._lazy}set lazy(t){this._lazy=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(t){this._loaderDisabled=t}get columns(){return this._columns}set columns(t){this._columns=t}get showSpacer(){return this._showSpacer}set showSpacer(t){this._showSpacer=t}get showLoader(){return this._showLoader}set showLoader(t){this._showLoader=t}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(t){this._numToleratedItems=t}get loading(){return this._loading}set loading(t){this._loading=t}get autoSize(){return this._autoSize}set autoSize(t){this._autoSize=t}get trackBy(){return this._trackBy}set trackBy(t){this._trackBy=t}get options(){return this._options}set options(t){this._options=t,t&&typeof t=="object"&&(Object.entries(t).forEach(([e,n])=>this[`_${e}`]!==n&&(this[`_${e}`]=n)),Object.entries(t).forEach(([e,n])=>this[`${e}`]!==n&&(this[`${e}`]=n)))}onLazyLoad=new O;onScroll=new O;onScrollIndexChange=new O;elementViewChild;contentViewChild;height;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;templates;_contentTemplate;_itemTemplate;_loaderTemplate;_loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;windowResizeListener;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;_contentStyleClass;get contentStyleClass(){return this._contentStyleClass}set contentStyleClass(t){this._contentStyleClass=t}get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(t=>this._columns?t:t.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}_componentStyle=j(ne);constructor(t){super(),this.zone=t}ngOnInit(){super.ngOnInit(),this.setInitialState()}ngOnChanges(t){super.ngOnChanges(t);let e=!1;if(this.scrollHeight=="100%"&&(this.height="100%"),t.loading){let{previousValue:n,currentValue:s}=t.loading;this.lazy&&n!==s&&s!==this.d_loading&&(this.d_loading=s,e=!0)}if(t.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),t.numToleratedItems){let{previousValue:n,currentValue:s}=t.numToleratedItems;n!==s&&s!==this.d_numToleratedItems&&(this.d_numToleratedItems=s)}if(t.options){let{previousValue:n,currentValue:s}=t.options;this.lazy&&n?.loading!==s?.loading&&s?.loading!==this.d_loading&&(this.d_loading=s.loading,e=!0),n?.numToleratedItems!==s?.numToleratedItems&&s?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=s.numToleratedItems)}this.initialized&&!e&&(t.items?.previousValue?.length!==t.items?.currentValue?.length||t.itemSize||t.scrollHeight||t.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"content":this._contentTemplate=t.template;break;case"item":this._itemTemplate=t.template;break;case"loader":this._loaderTemplate=t.template;break;case"loadericon":this._loaderIconTemplate=t.template;break;default:this._itemTemplate=t.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1,super.ngOnDestroy()}viewInit(){pt(this.platformId)&&!this.initialized&&Lt(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=et(this.elementViewChild?.nativeElement),this.defaultHeight=tt(this.elementViewChild?.nativeElement),this.defaultContentWidth=et(this.contentEl),this.defaultContentHeight=tt(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(t){this.contentEl=t||this.contentViewChild?.nativeElement||Zt(this.elementViewChild?.nativeElement,".p-virtualscroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[]}getElementRef(){return this.elementViewChild}getPageByFirst(t){return Math.floor(((t??this.first)+this.d_numToleratedItems*4)/(this._step||1))}isPageChanged(t){return this._step?this.page!==this.getPageByFirst(t??this.first):!0}scrollTo(t){this.elementViewChild?.nativeElement?.scrollTo(t)}scrollToIndex(t,e="auto"){if(this.both?t.every(s=>s>-1):t>-1){let s=this.first,{scrollTop:o=0,scrollLeft:l=0}=this.elementViewChild?.nativeElement,{numToleratedItems:g}=this.calculateNumItems(),m=this.getContentPosition(),d=this.itemSize,x=(h=0,u)=>h<=u?0:h,y=(h,u,L)=>h*u+L,z=(h=0,u=0)=>this.scrollTo({left:h,top:u,behavior:e}),v=this.both?{rows:0,cols:0}:0,U=!1,a=!1;this.both?(v={rows:x(t[0],g[0]),cols:x(t[1],g[1])},z(y(v.cols,d[1],m.left),y(v.rows,d[0],m.top)),a=this.lastScrollPos.top!==o||this.lastScrollPos.left!==l,U=v.rows!==s.rows||v.cols!==s.cols):(v=x(t,g),this.horizontal?z(y(v,d,m.left),o):z(l,y(v,d,m.top)),a=this.lastScrollPos!==(this.horizontal?l:o),U=v!==s),this.isRangeChanged=U,a&&(this.first=v)}}scrollInView(t,e,n="auto"){if(e){let{first:s,viewport:o}=this.getRenderedRange(),l=(d=0,x=0)=>this.scrollTo({left:d,top:x,behavior:n}),g=e==="to-start",m=e==="to-end";if(g){if(this.both)o.first.rows-s.rows>t[0]?l(o.first.cols*this._itemSize[1],(o.first.rows-1)*this._itemSize[0]):o.first.cols-s.cols>t[1]&&l((o.first.cols-1)*this._itemSize[1],o.first.rows*this._itemSize[0]);else if(o.first-s>t){let d=(o.first-1)*this._itemSize;this.horizontal?l(d,0):l(0,d)}}else if(m){if(this.both)o.last.rows-s.rows<=t[0]+1?l(o.first.cols*this._itemSize[1],(o.first.rows+1)*this._itemSize[0]):o.last.cols-s.cols<=t[1]+1&&l((o.first.cols+1)*this._itemSize[1],o.first.rows*this._itemSize[0]);else if(o.last-s<=t+1){let d=(o.first+1)*this._itemSize;this.horizontal?l(d,0):l(0,d)}}}else this.scrollToIndex(t,n)}getRenderedRange(){let t=(s,o)=>o||s?Math.floor(s/(o||s)):0,e=this.first,n=0;if(this.elementViewChild?.nativeElement){let{scrollTop:s,scrollLeft:o}=this.elementViewChild.nativeElement;if(this.both)e={rows:t(s,this._itemSize[0]),cols:t(o,this._itemSize[1])},n={rows:e.rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else{let l=this.horizontal?o:s;e=t(l,this._itemSize),n=e+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:e,last:n}}}calculateNumItems(){let t=this.getContentPosition(),e=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-t.left:0)||0,n=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-t.top:0)||0,s=(m,d)=>d||m?Math.ceil(m/(d||m)):0,o=m=>Math.ceil(m/2),l=this.both?{rows:s(n,this._itemSize[0]),cols:s(e,this._itemSize[1])}:s(this.horizontal?e:n,this._itemSize),g=this.d_numToleratedItems||(this.both?[o(l.rows),o(l.cols)]:o(l));return{numItemsInViewport:l,numToleratedItems:g}}calculateOptions(){let{numItemsInViewport:t,numToleratedItems:e}=this.calculateNumItems(),n=(l,g,m,d=!1)=>this.getLast(l+g+(l<m?2:3)*m,d),s=this.first,o=this.both?{rows:n(this.first.rows,t.rows,e[0]),cols:n(this.first.cols,t.cols,e[1],!0)}:n(this.first,t,e);this.last=o,this.numItemsInViewport=t,this.d_numToleratedItems=e,this.showLoader&&(this.loaderArr=this.both?Array.from({length:t.rows}).map(()=>Array.from({length:t.cols})):Array.from({length:t})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:s.cols}:0:s,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[t,e]=[et(this.contentEl),tt(this.contentEl)];t!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),e!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[n,s]=[et(this.elementViewChild.nativeElement),tt(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=n<this.defaultWidth?n+"px":this._scrollWidth||this.defaultWidth+"px"),(this.both||this.vertical)&&(this.elementViewChild.nativeElement.style.height=s<this.defaultHeight?s+"px":this._scrollHeight||this.defaultHeight+"px"),this.contentEl.style.minHeight=this.contentEl.style.minWidth="",this.contentEl.style.position="",this.elementViewChild.nativeElement.style.contain=""}})}getLast(t=0,e=!1){return this._items?Math.min(e?(this._columns||this._items[0]).length:this._items.length,t):0}getContentPosition(){if(this.contentEl){let t=getComputedStyle(this.contentEl),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),n=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:n,top:s,bottom:o,x:e+n,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}}setSize(){if(this.elementViewChild?.nativeElement){let t=this.elementViewChild.nativeElement.parentElement.parentElement,e=this._scrollWidth||`${this.elementViewChild.nativeElement.offsetWidth||t.offsetWidth}px`,n=this._scrollHeight||`${this.elementViewChild.nativeElement.offsetHeight||t.offsetHeight}px`,s=(o,l)=>this.elementViewChild.nativeElement.style[o]=l;this.both||this.horizontal?(s("height",n),s("width",e)):s("height",n)}}setSpacerSize(){if(this._items){let t=this.getContentPosition(),e=(n,s,o,l=0)=>this.spacerStyle=Et(k({},this.spacerStyle),{[`${n}`]:(s||[]).length*o+l+"px"});this.both?(e("height",this._items,this._itemSize[0],t.y),e("width",this._columns||this._items[1],this._itemSize[1],t.x)):this.horizontal?e("width",this._columns||this._items,this._itemSize,t.x):e("height",this._items,this._itemSize,t.y)}}setContentPosition(t){if(this.contentEl&&!this._appendOnly){let e=t?t.first:this.first,n=(o,l)=>o*l,s=(o=0,l=0)=>this.contentStyle=Et(k({},this.contentStyle),{transform:`translate3d(${o}px, ${l}px, 0)`});if(this.both)s(n(e.cols,this._itemSize[1]),n(e.rows,this._itemSize[0]));else{let o=n(e,this._itemSize);this.horizontal?s(o,0):s(0,o)}}}onScrollPositionChange(t){let e=t.target,n=this.getContentPosition(),s=(a,h)=>a?a>h?a-h:a:0,o=(a,h)=>h||a?Math.floor(a/(h||a)):0,l=(a,h,u,L,R,Y)=>a<=R?R:Y?u-L-R:h+R-1,g=(a,h,u,L,R,Y,gt)=>a<=Y?0:Math.max(0,gt?a<h?u:a-Y:a>h?u:a-2*Y),m=(a,h,u,L,R,Y=!1)=>{let gt=h+L+2*R;return a>=R&&(gt+=R+1),this.getLast(gt,Y)},d=s(e.scrollTop,n.top),x=s(e.scrollLeft,n.left),y=this.both?{rows:0,cols:0}:0,z=this.last,v=!1,U=this.lastScrollPos;if(this.both){let a=this.lastScrollPos.top<=d,h=this.lastScrollPos.left<=x;if(!this._appendOnly||this._appendOnly&&(a||h)){let u={rows:o(d,this._itemSize[0]),cols:o(x,this._itemSize[1])},L={rows:l(u.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],a),cols:l(u.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],h)};y={rows:g(u.rows,L.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],a),cols:g(u.cols,L.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],h)},z={rows:m(u.rows,y.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:m(u.cols,y.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},v=y.rows!==this.first.rows||z.rows!==this.last.rows||y.cols!==this.first.cols||z.cols!==this.last.cols||this.isRangeChanged,U={top:d,left:x}}}else{let a=this.horizontal?x:d,h=this.lastScrollPos<=a;if(!this._appendOnly||this._appendOnly&&h){let u=o(a,this._itemSize),L=l(u,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,h);y=g(u,L,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,h),z=m(u,y,this.last,this.numItemsInViewport,this.d_numToleratedItems),v=y!==this.first||z!==this.last||this.isRangeChanged,U=a}}return{first:y,last:z,isRangeChanged:v,scrollPos:U}}onScrollChange(t){let{first:e,last:n,isRangeChanged:s,scrollPos:o}=this.onScrollPositionChange(t);if(s){let l={first:e,last:n};if(this.setContentPosition(l),this.first=e,this.last=n,this.lastScrollPos=o,this.handleEvents("onScrollIndexChange",l),this._lazy&&this.isPageChanged(e)){let g={first:this._step?Math.min(this.getPageByFirst(e)*this._step,this.items.length-this._step):e,last:Math.min(this._step?(this.getPageByFirst(e)+1)*this._step:n,this.items.length)};(this.lazyLoadState.first!==g.first||this.lazyLoadState.last!==g.last)&&this.handleEvents("onLazyLoad",g),this.lazyLoadState=g}}}onContainerScroll(t){if(this.handleEvents("onScroll",{originalEvent:t}),this._delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){let{isRangeChanged:e}=this.onScrollPositionChange(t);(e||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst()),this.cd.detectChanges()},this._delay)}else!this.d_loading&&this.onScrollChange(t)}bindResizeListener(){pt(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let t=this.document.defaultView,e=it()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(t,e,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(Lt(this.elementViewChild?.nativeElement)){let[t,e]=[et(this.elementViewChild?.nativeElement),tt(this.elementViewChild?.nativeElement)],[n,s]=[t!==this.defaultWidth,e!==this.defaultHeight];(this.both?n||s:this.horizontal?n:this.vertical?s:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=t,this.defaultHeight=e,this.defaultContentWidth=et(this.contentEl),this.defaultContentHeight=tt(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(t,e){return this.options&&this.options[t]?this.options[t](e):this[t].emit(e)}getContentOptions(){return{contentStyleClass:`p-virtualscroller-content ${this.d_loading?"p-virtualscroller-loading":""}`,items:this.loadedItems,getItemOptions:t=>this.getOptions(t),loading:this.d_loading,getLoaderOptions:(t,e)=>this.getLoaderOptions(t,e),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(t){let e=(this._items||[]).length,n=this.both?this.first.rows+t:this.first+t;return{index:n,count:e,first:n===0,last:n===e-1,even:n%2===0,odd:n%2!==0}}getLoaderOptions(t,e){let n=this.loaderArr.length;return k({index:t,count:n,first:t===0,last:t===n-1,even:t%2===0,odd:t%2!==0},e)}static \u0275fac=function(e){return new(e||i)(lt(yt))};static \u0275cmp=E({type:i,selectors:[["p-scroller"],["p-virtualscroller"],["p-virtual-scroller"],["p-virtualScroller"]],contentQueries:function(e,n,s){if(e&1&&(H(s,ie,4),H(s,Te,4),H(s,xe,4),H(s,ze,4),H(s,xt,4)),e&2){let o;b(o=T())&&(n.contentTemplate=o.first),b(o=T())&&(n.itemTemplate=o.first),b(o=T())&&(n.loaderTemplate=o.first),b(o=T())&&(n.loaderIconTemplate=o.first),b(o=T())&&(n.templates=o)}},viewQuery:function(e,n){if(e&1&&(ot(Oe,5),ot(ie,5)),e&2){let s;b(s=T())&&(n.elementViewChild=s.first),b(s=T())&&(n.contentViewChild=s.first)}},hostVars:2,hostBindings:function(e,n){e&2&&jt("height",n.height)},inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Z([ne]),V,Bt],ngContentSelectors:Ee,decls:3,vars:2,consts:[["disabledContainer",""],["element",""],["buildInContent",""],["content",""],["buildInLoader",""],["buildInLoaderIcon",""],[4,"ngIf","ngIfElse"],[3,"scroll","ngStyle","ngClass"],["class","p-virtualscroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-virtualscroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-virtualscroller-spacer",3,"ngStyle"],[1,"p-virtualscroller-loader",3,"ngClass"],[4,"ngFor","ngForOf"],[3,"styleClass"],[4,"ngIf"]],template:function(e,n){if(e&1&&(Q(),_(0,Ue,8,16,"ng-container",6)(1,Xe,2,1,"ng-template",null,0,dt)),e&2){let s=ct(2);c("ngIf",!n._disabled)("ngIfElse",s)}},dependencies:[q,wt,Qt,St,bt,It,Yt,M],encapsulation:2})}return i})(),bn=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=st({type:i});static \u0275inj=nt({imports:[ei,M,M]})}return i})();export{gi as a,Ci as b,Yt as c,Mi as d,be as e,nn as f,ei as g,bn as h};
