import{ba as Bt,d as K,e as ut,i as U,j as ft,na as Qt}from"./chunk-VYRWAFSM.js";import{Ha as Mt,Ia as V,J as D,La as Rt,M as pt,Q as Dt,u as Ot,xa as Nt,z as O}from"./chunk-2XIOYYFS.js";import{D as J,F as mt,K as rt,m as Et,o as Vt,p as Ft,s as Lt,t as Pt}from"./chunk-UOI75ONS.js";import{Ab as _,Ac as b,Ad as tt,Bc as k,Cc as zt,Fb as St,Gc as Tt,Hc as y,Ia as _t,Ic as A,Ja as yt,Jc as N,Ka as wt,Na as z,Qb as H,Qc as Q,Rb as $,Rc as dt,Rd as G,Sc as x,Ta as nt,Tc as E,Ua as Ct,Ub as W,Wb as w,Xc as X,ic as j,jc as p,jd as q,kc as It,kd as bt,lc as st,ld as Z,mc as vt,md as Y,nc as P,nd as xt,sa as M,ta as R,wc as ot,xc as lt,ya as B,yc as ht,zc as T}from"./chunk-4HFZZ7HS.js";import{a as it,b as at,e as ct}from"./chunk-SZAW6ZBW.js";var qt,Zt,Gt,Ht,Jt,Ne,Kt=ct(()=>{rt();G();G();ft();ut();qt=["*"],Zt=({dt:e})=>`
.p-iconfield {
    position: relative;
    display: block;
}

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

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

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

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

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

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

.p-iconfield:has(.p-inputfield-lg) .p-inputicon {
    font-size: ${e("form.field.lg.font.size")};
    width: ${e("form.field.lg.font.size")};
    height: ${e("form.field.lg.font.size")};
    margin-top: calc(-1 * (${e("form.field.lg.font.size")} / 2));
}
`,Gt={root:"p-iconfield"},Ht=(()=>{class e extends K{name="iconfield";theme=Zt;classes=Gt;static \u0275fac=(()=>{let t;return function(n){return(t||(t=z(e)))(n||e)}})();static \u0275prov=M({token:e,factory:e.\u0275fac})}return e})(),Jt=(()=>{class e extends U{iconPosition="left";get _styleClass(){return this.styleClass}styleClass;_componentStyle=B(Ht);static \u0275fac=(()=>{let t;return function(n){return(t||(t=z(e)))(n||e)}})();static \u0275cmp=H({type:e,selectors:[["p-iconfield"],["p-iconField"],["p-icon-field"]],hostAttrs:[1,"p-iconfield"],hostVars:6,hostBindings:function(i,n){i&2&&(P(n._styleClass),st("p-iconfield-left",n.iconPosition==="left")("p-iconfield-right",n.iconPosition==="right"))},inputs:{iconPosition:"iconPosition",styleClass:"styleClass"},features:[q([Ht]),W],ngContentSelectors:qt,decls:1,vars:0,template:function(i,n){i&1&&(A(),N(0))},dependencies:[J],encapsulation:2,changeDetection:0})}return e})(),Ne=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=$({type:e});static \u0275inj=R({imports:[Jt]})}return e})()});var Ut,Xt,Wt,Yt,si,te=ct(()=>{rt();G();G();Rt();ft();ut();Ut=["*"],Xt={root:"p-inputicon"},Wt=(()=>{class e extends K{name="inputicon";classes=Xt;static \u0275fac=(()=>{let t;return function(n){return(t||(t=z(e)))(n||e)}})();static \u0275prov=M({token:e,factory:e.\u0275fac})}return e})(),Yt=(()=>{class e extends U{styleClass;get hostClasses(){return this.styleClass}_componentStyle=B(Wt);static \u0275fac=(()=>{let t;return function(n){return(t||(t=z(e)))(n||e)}})();static \u0275cmp=H({type:e,selectors:[["p-inputicon"],["p-inputIcon"]],hostVars:4,hostBindings:function(i,n){i&2&&(P(n.hostClasses),st("p-inputicon",!0))},inputs:{styleClass:"styleClass"},features:[q([Wt]),W],ngContentSelectors:Ut,decls:1,vars:0,template:function(i,n){i&1&&(A(),N(0))},dependencies:[J,V],encapsulation:2,changeDetection:0})}return e})(),si=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=$({type:e});static \u0275inj=R({imports:[Yt,V,V]})}return e})()});function me(e,c){e&1&&k(0)}function pe(e,c){if(e&1&&(T(0),w(1,me,1,0,"ng-container",10),b()),e&2){let t=y(2);_(),p("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",Y(2,gt,t.loadedItems,t.getContentOptions()))}}function ue(e,c){e&1&&k(0)}function fe(e,c){if(e&1&&(T(0),w(1,ue,1,0,"ng-container",10),b()),e&2){let t=c.$implicit,i=c.index,n=y(3);_(),p("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",Y(2,gt,t,n.getOptions(i)))}}function ge(e,c){if(e&1&&(ot(0,"div",11,3),w(2,fe,2,5,"ng-container",12),lt()),e&2){let t=y(2);vt(t.contentStyle),P(t.contentStyleClass),p("ngClass",Z(8,re,t.d_loading)),j("data-pc-section","content"),_(2),p("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function _e(e,c){if(e&1&&ht(0,"div",13),e&2){let t=y(2);p("ngStyle",t.spacerStyle),j("data-pc-section","spacer")}}function ye(e,c){e&1&&k(0)}function we(e,c){if(e&1&&(T(0),w(1,ye,1,0,"ng-container",10),b()),e&2){let t=c.index,i=y(4);_(),p("ngTemplateOutlet",i.loaderTemplate||i._loaderTemplate)("ngTemplateOutletContext",Z(4,At,i.getLoaderOptions(t,i.both&&Z(2,ce,i.numItemsInViewport.cols))))}}function Ce(e,c){if(e&1&&(T(0),w(1,we,2,6,"ng-container",15),b()),e&2){let t=y(3);_(),p("ngForOf",t.loaderArr)}}function Se(e,c){e&1&&k(0)}function Ie(e,c){if(e&1&&(T(0),w(1,Se,1,0,"ng-container",10),b()),e&2){let t=y(4);_(),p("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",Z(3,At,bt(2,he)))}}function ve(e,c){e&1&&ht(0,"SpinnerIcon",16),e&2&&(p("styleClass","p-virtualscroller-loading-icon pi-spin"),j("data-pc-section","loadingIcon"))}function ze(e,c){if(e&1&&w(0,Ie,2,5,"ng-container",6)(1,ve,1,2,"ng-template",null,5,tt),e&2){let t=X(2),i=y(3);p("ngIf",i.loaderIconTemplate||i._loaderIconTemplate)("ngIfElse",t)}}function Te(e,c){if(e&1&&(ot(0,"div",14),w(1,Ce,2,1,"ng-container",6)(2,ze,3,2,"ng-template",null,4,tt),lt()),e&2){let t=X(3),i=y(2);p("ngClass",Z(4,ae,!i.loaderTemplate)),j("data-pc-section","loader"),_(),p("ngIf",i.loaderTemplate||i._loaderTemplate)("ngIfElse",t)}}function be(e,c){if(e&1){let t=zt();T(0),ot(1,"div",7,1),Tt("scroll",function(n){yt(t);let s=y();return wt(s.onContainerScroll(n))}),w(3,pe,2,5,"ng-container",6)(4,ge,3,10,"ng-template",null,2,tt)(6,_e,1,2,"div",8)(7,Te,4,6,"div",9),lt(),b()}if(e&2){let t=X(5),i=y();_(),P(i._styleClass),p("ngStyle",i._style)("ngClass",xt(12,le,i.inline,i.both,i.horizontal)),j("id",i._id)("tabindex",i.tabindex)("data-pc-name","scroller")("data-pc-section","root"),_(2),p("ngIf",i.contentTemplate||i._contentTemplate)("ngIfElse",t),_(3),p("ngIf",i._showSpacer),_(),p("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function xe(e,c){e&1&&k(0)}function Ee(e,c){if(e&1&&(T(0),w(1,xe,1,0,"ng-container",10),b()),e&2){let t=y(2);_(),p("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",Y(5,gt,t.items,Y(2,de,t._items,t.loadedColumns)))}}function Ve(e,c){if(e&1&&(N(0),w(1,Ee,2,8,"ng-container",17)),e&2){let t=y();_(),p("ngIf",t.contentTemplate||t._contentTemplate)}}var jt,ee,ie,ne,se,oe,le,gt,re,ae,ce,At,he,de,Fe,kt,Le,Ti,Pe=ct(()=>{rt();rt();G();G();Nt();Rt();ft();Qt();ut();jt=["content"],ee=["item"],ie=["loader"],ne=["loadericon"],se=["element"],oe=["*"],le=(e,c,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":e,"p-virtualscroller-both p-both-scroll":c,"p-virtualscroller-horizontal p-horizontal-scroll":t}),gt=(e,c)=>({$implicit:e,options:c}),re=e=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":e}),ae=e=>({"p-virtualscroller-loader-mask":e}),ce=e=>({numCols:e}),At=e=>({options:e}),he=()=>({styleClass:"p-virtualscroller-loading-icon"}),de=(e,c)=>({rows:e,columns:c});Fe=({dt:e})=>`
.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: ${e("virtualscroller.loader.mask.background")};
    color: ${e("virtualscroller.loader.mask.color")};
}

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

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

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

.p-virtualscroller-inline .p-virtualscroller-content {
    position: static;
}
`,kt=(()=>{class e extends K{name="virtualscroller";theme=Fe;static \u0275fac=(()=>{let t;return function(n){return(t||(t=z(e)))(n||e)}})();static \u0275prov=M({token:e,factory:e.\u0275fac})}return e})(),Le=(()=>{class e extends U{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(([i,n])=>this[`_${i}`]!==n&&(this[`_${i}`]=n)),Object.entries(t).forEach(([i,n])=>this[`${i}`]!==n&&(this[`${i}`]=n)))}onLazyLoad=new nt;onScroll=new nt;onScrollIndexChange=new nt;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=B(kt);constructor(t){super(),this.zone=t}ngOnInit(){super.ngOnInit(),this.setInitialState()}ngOnChanges(t){super.ngOnChanges(t);let i=!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,i=!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,i=!0),n?.numToleratedItems!==s?.numToleratedItems&&s?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=s.numToleratedItems)}this.initialized&&!i&&(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(){mt(this.platformId)&&!this.initialized&&pt(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=D(this.elementViewChild?.nativeElement),this.defaultHeight=O(this.elementViewChild?.nativeElement),this.defaultContentWidth=D(this.contentEl),this.defaultContentHeight=O(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||Ot(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,i="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:u}=this.calculateNumItems(),m=this.getContentPosition(),h=this.itemSize,S=(a=0,d)=>a<=d?0:a,f=(a,d,C)=>a*d+C,I=(a=0,d=0)=>this.scrollTo({left:a,top:d,behavior:i}),g=this.both?{rows:0,cols:0}:0,F=!1,r=!1;this.both?(g={rows:S(t[0],u[0]),cols:S(t[1],u[1])},I(f(g.cols,h[1],m.left),f(g.rows,h[0],m.top)),r=this.lastScrollPos.top!==o||this.lastScrollPos.left!==l,F=g.rows!==s.rows||g.cols!==s.cols):(g=S(t,u),this.horizontal?I(f(g,h,m.left),o):I(l,f(g,h,m.top)),r=this.lastScrollPos!==(this.horizontal?l:o),F=g!==s),this.isRangeChanged=F,r&&(this.first=g)}}scrollInView(t,i,n="auto"){if(i){let{first:s,viewport:o}=this.getRenderedRange(),l=(h=0,S=0)=>this.scrollTo({left:h,top:S,behavior:n}),u=i==="to-start",m=i==="to-end";if(u){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 h=(o.first-1)*this._itemSize;this.horizontal?l(h,0):l(0,h)}}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 h=(o.first+1)*this._itemSize;this.horizontal?l(h,0):l(0,h)}}}else this.scrollToIndex(t,n)}getRenderedRange(){let t=(s,o)=>o||s?Math.floor(s/(o||s)):0,i=this.first,n=0;if(this.elementViewChild?.nativeElement){let{scrollTop:s,scrollLeft:o}=this.elementViewChild.nativeElement;if(this.both)i={rows:t(s,this._itemSize[0]),cols:t(o,this._itemSize[1])},n={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols};else{let l=this.horizontal?o:s;i=t(l,this._itemSize),n=i+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:i,last:n}}}calculateNumItems(){let t=this.getContentPosition(),i=(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,h)=>h||m?Math.ceil(m/(h||m)):0,o=m=>Math.ceil(m/2),l=this.both?{rows:s(n,this._itemSize[0]),cols:s(i,this._itemSize[1])}:s(this.horizontal?i:n,this._itemSize),u=this.d_numToleratedItems||(this.both?[o(l.rows),o(l.cols)]:o(l));return{numItemsInViewport:l,numToleratedItems:u}}calculateOptions(){let{numItemsInViewport:t,numToleratedItems:i}=this.calculateNumItems(),n=(l,u,m,h=!1)=>this.getLast(l+u+(l<m?2:3)*m,h),s=this.first,o=this.both?{rows:n(this.first.rows,t.rows,i[0]),cols:n(this.first.cols,t.cols,i[1],!0)}:n(this.first,t,i);this.last=o,this.numItemsInViewport=t,this.d_numToleratedItems=i,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,i]=[D(this.contentEl),O(this.contentEl)];t!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[n,s]=[D(this.elementViewChild.nativeElement),O(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,i=!1){return this._items?Math.min(i?(this._columns||this._items[0]).length:this._items.length,t):0}getContentPosition(){if(this.contentEl){let t=getComputedStyle(this.contentEl),i=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:i,right:n,top:s,bottom:o,x:i+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,i=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",i)):s("height",n)}}setSpacerSize(){if(this._items){let t=this.getContentPosition(),i=(n,s,o,l=0)=>this.spacerStyle=at(it({},this.spacerStyle),{[`${n}`]:(s||[]).length*o+l+"px"});this.both?(i("height",this._items,this._itemSize[0],t.y),i("width",this._columns||this._items[1],this._itemSize[1],t.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,t.x):i("height",this._items,this._itemSize,t.y)}}setContentPosition(t){if(this.contentEl&&!this._appendOnly){let i=t?t.first:this.first,n=(o,l)=>o*l,s=(o=0,l=0)=>this.contentStyle=at(it({},this.contentStyle),{transform:`translate3d(${o}px, ${l}px, 0)`});if(this.both)s(n(i.cols,this._itemSize[1]),n(i.rows,this._itemSize[0]));else{let o=n(i,this._itemSize);this.horizontal?s(o,0):s(0,o)}}}onScrollPositionChange(t){let i=t.target,n=this.getContentPosition(),s=(r,a)=>r?r>a?r-a:r:0,o=(r,a)=>a||r?Math.floor(r/(a||r)):0,l=(r,a,d,C,v,L)=>r<=v?v:L?d-C-v:a+v-1,u=(r,a,d,C,v,L,et)=>r<=L?0:Math.max(0,et?r<a?d:r-L:r>a?d:r-2*L),m=(r,a,d,C,v,L=!1)=>{let et=a+C+2*v;return r>=v&&(et+=v+1),this.getLast(et,L)},h=s(i.scrollTop,n.top),S=s(i.scrollLeft,n.left),f=this.both?{rows:0,cols:0}:0,I=this.last,g=!1,F=this.lastScrollPos;if(this.both){let r=this.lastScrollPos.top<=h,a=this.lastScrollPos.left<=S;if(!this._appendOnly||this._appendOnly&&(r||a)){let d={rows:o(h,this._itemSize[0]),cols:o(S,this._itemSize[1])},C={rows:l(d.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],r),cols:l(d.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],a)};f={rows:u(d.rows,C.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],r),cols:u(d.cols,C.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],a)},I={rows:m(d.rows,f.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:m(d.cols,f.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},g=f.rows!==this.first.rows||I.rows!==this.last.rows||f.cols!==this.first.cols||I.cols!==this.last.cols||this.isRangeChanged,F={top:h,left:S}}}else{let r=this.horizontal?S:h,a=this.lastScrollPos<=r;if(!this._appendOnly||this._appendOnly&&a){let d=o(r,this._itemSize),C=l(d,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,a);f=u(d,C,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,a),I=m(d,f,this.last,this.numItemsInViewport,this.d_numToleratedItems),g=f!==this.first||I!==this.last||this.isRangeChanged,F=r}}return{first:f,last:I,isRangeChanged:g,scrollPos:F}}onScrollChange(t){let{first:i,last:n,isRangeChanged:s,scrollPos:o}=this.onScrollPositionChange(t);if(s){let l={first:i,last:n};if(this.setContentPosition(l),this.first=i,this.last=n,this.lastScrollPos=o,this.handleEvents("onScrollIndexChange",l),this._lazy&&this.isPageChanged(i)){let u={first:this._step?Math.min(this.getPageByFirst(i)*this._step,this.items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst(i)+1)*this._step:n,this.items.length)};(this.lazyLoadState.first!==u.first||this.lazyLoadState.last!==u.last)&&this.handleEvents("onLazyLoad",u),this.lazyLoadState=u}}}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:i}=this.onScrollPositionChange(t);(i||(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(){mt(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let t=this.document.defaultView,i=Dt()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(t,i,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(pt(this.elementViewChild?.nativeElement)){let[t,i]=[D(this.elementViewChild?.nativeElement),O(this.elementViewChild?.nativeElement)],[n,s]=[t!==this.defaultWidth,i!==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=i,this.defaultContentWidth=D(this.contentEl),this.defaultContentHeight=O(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(t,i){return this.options&&this.options[t]?this.options[t](i):this[t].emit(i)}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,i)=>this.getLoaderOptions(t,i),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 i=(this._items||[]).length,n=this.both?this.first.rows+t:this.first+t;return{index:n,count:i,first:n===0,last:n===i-1,even:n%2===0,odd:n%2!==0}}getLoaderOptions(t,i){let n=this.loaderArr.length;return it({index:t,count:n,first:t===0,last:t===n-1,even:t%2===0,odd:t%2!==0},i)}static \u0275fac=function(i){return new(i||e)(St(Ct))};static \u0275cmp=H({type:e,selectors:[["p-scroller"],["p-virtualscroller"],["p-virtual-scroller"],["p-virtualScroller"]],contentQueries:function(i,n,s){if(i&1&&(Q(s,jt,4),Q(s,ee,4),Q(s,ie,4),Q(s,ne,4),Q(s,Mt,4)),i&2){let o;x(o=E())&&(n.contentTemplate=o.first),x(o=E())&&(n.itemTemplate=o.first),x(o=E())&&(n.loaderTemplate=o.first),x(o=E())&&(n.loaderIconTemplate=o.first),x(o=E())&&(n.templates=o)}},viewQuery:function(i,n){if(i&1&&(dt(se,5),dt(jt,5)),i&2){let s;x(s=E())&&(n.elementViewChild=s.first),x(s=E())&&(n.contentViewChild=s.first)}},hostVars:2,hostBindings:function(i,n){i&2&&It("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:[q([kt]),W,_t],ngContentSelectors:oe,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(i,n){if(i&1&&(A(),w(0,be,8,16,"ng-container",6)(1,Ve,2,1,"ng-template",null,0,tt)),i&2){let s=X(2);p("ngIf",!n._disabled)("ngIfElse",s)}},dependencies:[J,Et,Vt,Ft,Pt,Lt,Bt,V],encapsulation:2})}return e})(),Ti=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=$({type:e});static \u0275inj=R({imports:[Le,V,V]})}return e})()});export{Jt as a,Ne as b,Kt as c,Yt as d,si as e,te as f,Le as g,Ti as h,Pe as i};
