dealposbooks 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/3rdpartylicenses.txt +36 -0
- package/chunk-3RX6VPXR.js +2 -0
- package/chunk-4KSABCT6.js +1 -0
- package/chunk-4WX4CTCF.js +1 -0
- package/{chunk-HW5TOHIY.js → chunk-6SHWLH3C.js} +1 -1
- package/{chunk-CWSZS6PH.js → chunk-AVVIJQVC.js} +1 -1
- package/{chunk-72KCMRAD.js → chunk-BFBSEK4H.js} +1 -1
- package/chunk-BMZ2A6GT.js +1 -0
- package/{chunk-PLNF5Z47.js → chunk-C6OIY3SK.js} +1 -1
- package/{chunk-TEV7GODP.js → chunk-CGUMLMMW.js} +1 -1
- package/chunk-CUPI27LK.js +1 -0
- package/{chunk-L36U5L2E.js → chunk-D7G3TZFD.js} +1 -1
- package/{chunk-WNZ52LDQ.js → chunk-ECOKK22J.js} +6 -6
- package/{chunk-DKKZGADB.js → chunk-FJNTF5KS.js} +1 -1
- package/{chunk-JGJNDRVZ.js → chunk-FRUVZQE2.js} +1 -1
- package/chunk-FT6T65H6.js +191 -0
- package/{chunk-RJKIW354.js → chunk-G7QGHGLM.js} +1 -1
- package/{chunk-ZKTMMTSB.js → chunk-HTIWSCTK.js} +1 -1
- package/chunk-KSOH6FOP.js +160 -0
- package/{chunk-2JEYUHX6.js → chunk-L3OWH62Z.js} +1 -1
- package/{chunk-NY4Q6KXA.js → chunk-LVEM3QDX.js} +2 -2
- package/chunk-MYWX5CJP.js +1 -0
- package/chunk-NFJLN5KP.js +1 -0
- package/{chunk-6YT5EOQ2.js → chunk-NHEOQJVG.js} +1 -1
- package/chunk-OB4H7LE4.js +1 -0
- package/{chunk-XJB6ZB5C.js → chunk-OM3AWD5C.js} +1 -1
- package/chunk-P7OQDOZ5.js +1 -0
- package/chunk-PFEDDKVG.js +235 -0
- package/{chunk-YYGEKYKY.js → chunk-PJF5SBZS.js} +2 -2
- package/{chunk-M3DGMI2G.js → chunk-QHTRP332.js} +1 -1
- package/{chunk-VILWNFJE.js → chunk-RYKEISKQ.js} +1 -1
- package/{chunk-USDU2OMR.js → chunk-SKH7LGD3.js} +1 -1
- package/{chunk-3O5WB452.js → chunk-SMINY2HR.js} +1 -1
- package/{chunk-RVDH4GNB.js → chunk-T4BLJS6I.js} +1 -1
- package/{chunk-UAPZHEQX.js → chunk-T6W6HJCE.js} +1 -1
- package/{chunk-37O3IGUE.js → chunk-UJUUMHOE.js} +1 -1
- package/{chunk-KWULO2RL.js → chunk-ULH6XT2Q.js} +1 -1
- package/{chunk-G4OXNPYG.js → chunk-WB6KUPUB.js} +1 -1
- package/chunk-WKMCCUUK.js +1 -0
- package/chunk-WQNK5ZUV.js +1 -0
- package/chunk-XTTFTDKZ.js +1 -0
- package/{chunk-CJM6YIDJ.js → chunk-XVXUJ33X.js} +1 -1
- package/{chunk-JGV5HMBT.js → chunk-ZNSZA7QK.js} +1 -1
- package/index.html +2 -2
- package/main-ZQK6GRTL.js +1 -0
- package/package.json +1 -1
- package/chunk-4F4YTU5A.js +0 -1
- package/chunk-B44UAABO.js +0 -1
- package/chunk-CDSOHE7R.js +0 -1
- package/chunk-D7GU77BZ.js +0 -1
- package/chunk-DGUB5VQV.js +0 -1
- package/chunk-KFF6NEEA.js +0 -1
- package/chunk-KHWYFU3R.js +0 -191
- package/chunk-LHGT7WC7.js +0 -237
- package/chunk-NYMK6LUH.js +0 -1
- package/chunk-OCLF4BGI.js +0 -160
- package/chunk-QAAN4NVX.js +0 -1
- package/chunk-QCF3XBU5.js +0 -1
- package/chunk-SWKKEI7U.js +0 -1
- package/chunk-V3VYMXUU.js +0 -1
- package/chunk-WY5VYTM5.js +0 -1
- package/main-T2PMTIHB.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Ct,d as W,f as B,g as F,h as X}from"./chunk-S35HUXPS.js";import{d as gt,e as Tt,k as _t}from"./chunk-OM3AWD5C.js";import{d as K,n as Q}from"./chunk-DFW6MEY3.js";import{$ as lt,$b as G,Da as L,Eb as A,I as D,Ka as O,Lb as S,Mb as E,Nb as c,Ob as R,Rb as p,Yb as h,Zb as m,_b as H,ac as U,cc as J,db as pt,dc as vt,eb as z,fa as b,g,ga as ut,gc as M,hc as l,ia as ht,jb as a,ka as y,kb as _,la as d,ma as dt,o as at,ob as mt,pc as f,r as rt,rc as C,s as x,t as ct,ta as $,ua as Z,xb as q,ya as N,yb as ft}from"./chunk-A63HKFUG.js";import{a as r,b as v}from"./chunk-EQDQRRRY.js";var bt=["toast-component",""];function At(s,n){if(s&1){let t=J();h(0,"button",5),M("click",function(){$(t);let i=l();return Z(i.remove())}),h(1,"span",6),f(2,"\xD7"),m()()}}function Et(s,n){if(s&1&&(G(0),f(1),U()),s&2){let t=l(2);a(),C("[",t.duplicatesCount+1,"]")}}function Rt(s,n){if(s&1&&(h(0,"div"),f(1),A(2,Et,2,1,"ng-container",4),m()),s&2){let t=l();p(t.options.titleClass),E("aria-label",t.title),a(),C(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Ht(s,n){if(s&1&&H(0,"div",7),s&2){let t=l();p(t.options.messageClass),c("innerHTML",t.message,z)}}function Mt(s,n){if(s&1&&(h(0,"div",8),f(1),m()),s&2){let t=l();p(t.options.messageClass),E("aria-label",t.message),a(),C(" ",t.message," ")}}function jt(s,n){if(s&1&&(h(0,"div"),H(1,"div",9),m()),s&2){let t=l();a(),R("width",t.width()+"%")}}function Nt(s,n){if(s&1){let t=J();h(0,"button",5),M("click",function(){$(t);let i=l();return Z(i.remove())}),h(1,"span",6),f(2,"\xD7"),m()()}}function St(s,n){if(s&1&&(G(0),f(1),U()),s&2){let t=l(2);a(),C("[",t.duplicatesCount+1,"]")}}function Bt(s,n){if(s&1&&(h(0,"div"),f(1),A(2,St,2,1,"ng-container",4),m()),s&2){let t=l();p(t.options.titleClass),E("aria-label",t.title),a(),C(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Ft(s,n){if(s&1&&H(0,"div",7),s&2){let t=l();p(t.options.messageClass),c("innerHTML",t.message,z)}}function Pt(s,n){if(s&1&&(h(0,"div",8),f(1),m()),s&2){let t=l();p(t.options.messageClass),E("aria-label",t.message),a(),C(" ",t.message," ")}}function Vt(s,n){if(s&1&&(h(0,"div"),H(1,"div",9),m()),s&2){let t=l();a(),R("width",t.width()+"%")}}var Y=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},tt=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},et=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},I=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(n,t,e,i,o,u){this.toastId=n,this.config=t,this.message=e,this.title=i,this.toastType=o,this.toastRef=u,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},yt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},It=new ht("ToastConfig"),it=class extends tt{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,e){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(n,t){let e=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=e.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},kt=(()=>{class s{_document=d(K);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),st=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},$t=(()=>{class s{_overlayContainer=d(kt);_componentFactoryResolver=d(mt);_appRef=d(S);_document=d(K);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(t){return new it(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new st(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),P=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,i,o,u){this.overlay=e,this._injector=i,this.sanitizer=o,this.ngZone=u,this.toastrConfig=r(r({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=r(r({},t.default.iconClasses),t.config.iconClasses))}show(t,e,i={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(i))}success(t,e,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}error(t,e,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}info(t,e,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}warning(t,e,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(t="",e="",i,o){let{includeTitleDuplicates:u}=this.toastrConfig;for(let T of this.toasts){let j=u&&T.title===t;if((!u||j)&&T.message===e)return T.toastRef.onDuplicate(i,o),T}return null}applyConfig(t={}){return r(r({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,i,o)):this._buildNotification(t,e,i,o)}_buildNotification(t,e,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let u=this.findDuplicate(i,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||e)&&this.toastrConfig.preventDuplicates&&u!==null)return u;this.previousToastMessage=e;let T=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(T=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let j=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let nt=e;e&&o.enableHtml&&(nt=this.sanitizer.sanitize(pt.HTML,e));let w=new et(j),V=new I(this.index,o,nt,i,t,w),wt=[{provide:I,useValue:V}],xt=N.create({providers:wt,parent:this._injector}),Dt=new Y(o.toastComponent,xt),ot=j.attach(Dt,o.newestOnTop);w.componentInstance=ot.instance;let k={toastId:this.index,title:i||"",message:e||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:V.onTap(),onAction:V.onAction(),portal:ot};return T||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{k.toastRef.activate()})),this.toasts.push(k),k}static \u0275fac=function(e){return new(e||s)(y(It),y($t),y(N),y(_t),y(L))};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Zt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.ngZone=i,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>v(r({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>v(r({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>v(r({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||s)(_(P),_(I),_(L))};static \u0275cmp=q({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,i){e&1&&M("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(vt("@flyInOut",i._state),p(i.toastClasses),R("display",i.displayStyle))},attrs:bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,i){e&1&&A(0,At,3,0,"button",0)(1,Rt,3,5,"div",1)(2,Ht,1,3,"div",2)(3,Mt,2,4,"div",3)(4,jt,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[Q],encapsulation:2,data:{animation:[Ct("flyInOut",[F("inactive",B({opacity:0})),F("active",B({opacity:1})),F("removed",B({opacity:0})),X("inactive => active",W("{{ easeTime }}ms {{ easing }}")),X("active => removed",W("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return s})(),Lt=v(r({},yt),{toastComponent:Zt}),zt=(s={})=>dt([{provide:It,useValue:{default:Lt,config:s}}]),re=(()=>{class s{static forRoot(t={}){return{ngModule:s,providers:[zt(t)]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=ft({type:s});static \u0275inj=ut({})}return s})();var qt=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.appRef=i,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||s)(_(P),_(I),_(S))};static \u0275cmp=q({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,i){e&1&&M("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(p(i.toastClasses),R("display",i.displayStyle))},attrs:bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,i){e&1&&A(0,Nt,3,0,"button",0)(1,Bt,3,5,"div",1)(2,Ft,1,3,"div",2)(3,Pt,2,4,"div",3)(4,Vt,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[Q],encapsulation:2,changeDetection:0})}return s})(),ce=v(r({},yt),{toastComponent:qt});var ve=(()=>{class s{constructor(){this.httpClient=d(Tt),this.toastr=d(P),this.requestTimeout=1e4}get(t="",e,i={}){return this.httpClient.get(`${t}${e}`,i).pipe(x(this.requestTimeout),D(this.handleError.bind(this)))}post(t="",e,i,o={}){return this.httpClient.post(`${t}${e}`,i,v(r({},o),{observe:"response"})).pipe(x(this.requestTimeout),lt(this.handleResponse.bind(this)),ct(u=>u.body),D(this.handleError.bind(this)))}put(t="",e,i,o={}){return this.httpClient.put(`${t}${e}`,i,r({},o)).pipe(x(this.requestTimeout),D(this.handleError.bind(this)))}delete(t="",e,i={}){return this.httpClient.delete(`${t}${e}`,r({},i)).pipe(x(this.requestTimeout),D(this.handleError.bind(this)))}handleResponse(t){if(t.status===200&&t.body){let e=t.body.message;e&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};return t instanceof rt&&(e.header="Timeout Error",e.message="The request took too long to complete. Please try again later."),t instanceof gt&&(Object.keys(t.error||{}).length?(e.message=t.error.Message||t.error.message,e.header=`API Error: ${t.error.title??"Error"}`):(e.header=`API Error: ${t.statusText}`,e.message=t.message)),console.error(e),this.toastr.error(e.message,e.header),at(()=>e)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{P as a,zt as b,re as c,ve as d};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import{b as yi}from"./chunk-T4BLJS6I.js";import{a as Si,b as bi,c as vi}from"./chunk-UJUUMHOE.js";import{a as Kt}from"./chunk-D7G3TZFD.js";import{a as gi}from"./chunk-NAZKZSVO.js";import{a as xi}from"./chunk-CGUMLMMW.js";import"./chunk-XVXUJ33X.js";import{a as Y,b as W}from"./chunk-36254LID.js";import{f as ot,g as Ie,h as Ce,k as qe,o as Te}from"./chunk-G7QGHGLM.js";import{a as ri,b as si,c as pi,d as _i,e as Ge,f as hi,g as fi,i as He,j as Qe}from"./chunk-SMINY2HR.js";import{a as be,b as ve}from"./chunk-BFBSEK4H.js";import{f as ui,g as Se}from"./chunk-LVEM3QDX.js";import{a as lt,b as ii,d as ni,f as li,h as oi,j as ai,o as ci,p as mi,s as Ne,t as di}from"./chunk-ULH6XT2Q.js";import{H as Ke,I as le,K as qt,L as jt,Q as Zt,Y as nt,b as Nt,c as X,d as ne,e as Fe,ea as Ut,g as Ve,ga as Yt,j as Gt,ja as Wt,l as Ht,la as Jt,ma as Xt,na as ei,oa as ti,pa as ke,q as Me,qa as Le,u as Qt}from"./chunk-ZQDTA2BC.js";import{a as z,b as he,c as fe,d as ge,e as xe,f as ye}from"./chunk-QSMNYWAY.js";import"./chunk-7BUIG2V4.js";import{a as Pt,e as U,f as ce,g as ze,h as G,i as tt,j as me,l as de,o as ue,q as $t,s as it,t as _e}from"./chunk-WKMCCUUK.js";import{d as zt}from"./chunk-P7OQDOZ5.js";import"./chunk-S35HUXPS.js";import{m as Bt}from"./chunk-OM3AWD5C.js";import{k as Je,m as Rt,n as ie,o as Xe,p as et,r as At,s as pe,t as Z}from"./chunk-DFW6MEY3.js";import{$ as je,$b as g,Ac as se,Bb as Ue,Bc as kt,Ca as A,Da as vt,Db as Ye,E as Ae,Eb as u,Ic as O,Jc as E,Ka as K,Kc as Lt,L as xt,Lc as h,Mb as L,Nb as m,Ob as Ct,Pb as Tt,Qb as ae,Rb as Be,Tb as re,Uc as F,Vc as Ee,W as yt,Wb as Ot,Wc as B,Xb as wt,Y as q,Yb as a,Yc as Dt,Zb as o,_b as C,ac as x,bc as P,c as Q,cc as R,ea as St,fa as Pe,ga as bt,gc as T,hc as d,ic as Et,jb as s,jc as We,kb as $e,kc as w,la as V,lc as j,mc as y,nc as S,oc as we,pc as c,qc as f,rc as M,t as gt,ta as b,ua as v,uc as Ft,vc as Vt,wa as Ze,wc as Mt,xb as D,xc as J,yb as It,yc as $,zc as N}from"./chunk-A63HKFUG.js";import{a as I,b as k,c as ht,e as ft}from"./chunk-EQDQRRRY.js";var De=t=>({height:t}),Pi=(t,l)=>({"p-multiselect-option":!0,"p-disabled":t,"p-focus":l}),Ci=t=>({$implicit:t}),$i=(t,l)=>({checked:t,class:l});function Bi(t,l){}function zi(t,l){t&1&&u(0,Bi,0,0,"ng-template")}function Ki(t,l){if(t&1&&u(0,zi,1,0,null,4),t&2){let e=l.class,n=d(2);m("ngTemplateOutlet",n.itemCheckboxIconTemplate)("ngTemplateOutletContext",se(2,$i,n.selected,e))}}function Ni(t,l){t&1&&(g(0),u(1,Ki,1,5,"ng-template",null,0,h),x())}function Gi(t,l){if(t&1&&(a(0,"span"),c(1),o()),t&2){let e,n=d();s(),f((e=n.label)!==null&&e!==void 0?e:"empty")}}function Hi(t,l){t&1&&P(0)}var Qi=["item"],qi=["group"],ji=["loader"],Zi=["header"],Ui=["filter"],Yi=["footer"],Wi=["emptyfilter"],Ji=["empty"],Xi=["selecteditems"],en=["checkicon"],tn=["loadingicon"],nn=["filtericon"],ln=["removetokenicon"],on=["chipicon"],an=["clearicon"],rn=["dropdownicon"],sn=["itemcheckboxicon"],pn=["headercheckboxicon"],cn=["overlay"],mn=["filterInput"],dn=["focusInput"],un=["items"],_n=["scroller"],hn=["lastHiddenFocusableEl"],fn=["firstHiddenFocusableEl"],gn=["headerCheckbox"],xn=[[["p-header"]],[["p-footer"]]],yn=["p-header","p-footer"],Sn=()=>({class:"p-multiselect-chip-icon"}),bn=(t,l)=>({$implicit:t,removeChip:l}),Ti=t=>({options:t}),vn=(t,l,e)=>({checked:t,partialSelected:l,class:e}),Oi=(t,l)=>({$implicit:t,options:l}),In=()=>({});function Cn(t,l){if(t&1&&(g(0),c(1),x()),t&2){let e=d(2);s(),f(e.label()||"empty")}}function Tn(t,l){t&1&&P(0)}function On(t,l){if(t&1){let e=R();a(0,"span",28),T("click",function(i){b(e);let r=d(4).$implicit,p=d(3);return v(p.removeOption(r,i))}),u(1,Tn,1,0,"ng-container",29),o()}if(t&2){let e=d(7);L("data-pc-section","clearicon")("aria-hidden",!0),s(),m("ngTemplateOutlet",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)("ngTemplateOutletContext",$(4,Sn))}}function wn(t,l){if(t&1&&(g(0),u(1,On,2,5,"span",27),x()),t&2){let e=d(6);s(),m("ngIf",e.chipIconTemplate||e._chipIconTemplate||e.removeTokenIconTemplate||e._removeTokenIconTemplate)}}function En(t,l){if(t&1&&u(0,wn,2,1,"ng-container",20),t&2){let e=d(5);m("ngIf",!e.disabled)}}function Fn(t,l){t&1&&(g(0),u(1,En,1,1,"ng-template",null,5,h),x())}function Vn(t,l){if(t&1){let e=R();a(0,"div",25,4)(2,"p-chip",26),T("onRemove",function(i){let r=b(e).$implicit,p=d(3);return v(p.removeOption(r,i))}),u(3,Fn,3,0,"ng-container",20),o()()}if(t&2){let e=l.$implicit,n=d(3);s(2),m("label",n.getLabelByValue(e))("removable",!0)("removeIcon",n.chipIcon),s(),m("ngIf",n.chipIconTemplate||n._chipIconTemplate||n.removeTokenIconTemplate||n._removeTokenIconTemplate)}}function Mn(t,l){if(t&1&&(g(0),c(1),x()),t&2){let e=d(3);s(),f(e.placeholder()||e.defaultLabel||"empty")}}function kn(t,l){if(t&1&&(g(0),u(1,Vn,4,4,"div",24)(2,Mn,2,1,"ng-container",20),x()),t&2){let e=d(2);s(),m("ngForOf",e.chipSelectedItems()),s(),m("ngIf",!e.modelValue()||e.modelValue().length===0)}}function Ln(t,l){if(t&1&&(g(0),u(1,Cn,2,1,"ng-container",20)(2,kn,3,2,"ng-container",20),x()),t&2){let e=d();s(),m("ngIf",e.display==="comma"),s(),m("ngIf",e.display==="chip")}}function Dn(t,l){t&1&&P(0)}function Rn(t,l){if(t&1&&(g(0),c(1),x()),t&2){let e=d(2);s(),f(e.placeholder()||e.defaultLabel||"empty")}}function An(t,l){if(t&1&&(g(0),u(1,Dn,1,0,"ng-container",29)(2,Rn,2,1,"ng-container",20),x()),t&2){let e=d();s(),m("ngTemplateOutlet",e.selectedItemsTemplate||e._selectedItemsTemplate)("ngTemplateOutletContext",se(3,bn,e.selectedOptions,e.removeOption.bind(e))),s(),m("ngIf",!e.modelValue()||e.modelValue().length===0)}}function Pn(t,l){if(t&1){let e=R();a(0,"TimesIcon",31),T("click",function(i){b(e);let r=d(2);return v(r.clear(i))}),o()}t&2&&L("data-pc-section","clearicon")("aria-hidden",!0)}function $n(t,l){}function Bn(t,l){t&1&&u(0,$n,0,0,"ng-template")}function zn(t,l){if(t&1){let e=R();a(0,"span",31),T("click",function(i){b(e);let r=d(2);return v(r.clear(i))}),u(1,Bn,1,0,null,32),o()}if(t&2){let e=d(2);L("data-pc-section","clearicon")("aria-hidden",!0),s(),m("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function Kn(t,l){if(t&1&&(g(0),u(1,Pn,1,2,"TimesIcon",30)(2,zn,2,3,"span",30),x()),t&2){let e=d();s(),m("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),s(),m("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function Nn(t,l){t&1&&P(0)}function Gn(t,l){if(t&1&&(g(0),u(1,Nn,1,0,"ng-container",32),x()),t&2){let e=d(2);s(),m("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function Hn(t,l){if(t&1&&C(0,"span",35),t&2){let e=d(3);m("ngClass","p-multiselect-loading-icon pi-spin "+e.loadingIcon)}}function Qn(t,l){t&1&&C(0,"span",36),t&2&&Be("p-multiselect-loading-icon pi pi-spinner pi-spin")}function qn(t,l){if(t&1&&(g(0),u(1,Hn,1,1,"span",33)(2,Qn,1,2,"span",34),x()),t&2){let e=d(2);s(),m("ngIf",e.loadingIcon),s(),m("ngIf",!e.loadingIcon)}}function jn(t,l){if(t&1&&(g(0),u(1,Gn,2,1,"ng-container",20)(2,qn,3,2,"ng-container",20),x()),t&2){let e=d();s(),m("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),s(),m("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function Zn(t,l){if(t&1&&C(0,"span",40),t&2){let e=d(3);m("ngClass",e.dropdownIcon),L("data-pc-section","triggericon")("aria-hidden",!0)}}function Un(t,l){t&1&&C(0,"ChevronDownIcon",41),t&2&&(m("styleClass","p-multiselect-dropdown-icon"),L("data-pc-section","triggericon")("aria-hidden",!0))}function Yn(t,l){if(t&1&&(g(0),u(1,Zn,1,3,"span",38)(2,Un,1,3,"ChevronDownIcon",39),x()),t&2){let e=d(2);s(),m("ngIf",e.dropdownIcon),s(),m("ngIf",!e.dropdownIcon)}}function Wn(t,l){}function Jn(t,l){t&1&&u(0,Wn,0,0,"ng-template")}function Xn(t,l){if(t&1&&(a(0,"span",42),u(1,Jn,1,0,null,32),o()),t&2){let e=d(2);L("data-pc-section","triggericon")("aria-hidden",!0),s(),m("ngTemplateOutlet",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function el(t,l){if(t&1&&u(0,Yn,3,2,"ng-container",20)(1,Xn,2,3,"span",37),t&2){let e=d();m("ngIf",!e.dropdownIconTemplate&&!e._dropdownIconTemplate),s(),m("ngIf",e.dropdownIconTemplate||e._dropdownIconTemplate)}}function tl(t,l){t&1&&P(0)}function il(t,l){t&1&&P(0)}function nl(t,l){if(t&1&&(g(0),u(1,il,1,0,"ng-container",29),x()),t&2){let e=d(3);s(),m("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",N(2,Ti,e.filterOptions))}}function ll(t,l){if(t&1&&C(0,"CheckIcon",41),t&2){let e=d().class;m("styleClass",e),L("data-pc-section","icon")}}function ol(t,l){}function al(t,l){t&1&&u(0,ol,0,0,"ng-template")}function rl(t,l){if(t&1&&u(0,ll,1,2,"CheckIcon",39)(1,al,1,0,null,29),t&2){let e=l.class,n=d(5);m("ngIf",!n.headerCheckboxIconTemplate&&!n._headerCheckboxIconTemplate&&n.allSelected()),s(),m("ngTemplateOutlet",n.headerCheckboxIconTemplate||n._headerCheckboxIconTemplate)("ngTemplateOutletContext",kt(3,vn,n.allSelected(),n.partialSelected(),e))}}function sl(t,l){if(t&1){let e=R();a(0,"p-checkbox",51,10),T("onChange",function(i){b(e);let r=d(4);return v(r.onToggleAll(i))}),u(2,rl,2,7,"ng-template",null,11,h),o()}if(t&2){let e=d(4);m("ngModel",e.allSelected())("ariaLabel",e.toggleAllAriaLabel)("binary",!0)("variant",e.variant)("disabled",e.disabled)}}function pl(t,l){t&1&&C(0,"SearchIcon",41),t&2&&m("styleClass","p-multiselect-filter-icon")}function cl(t,l){}function ml(t,l){t&1&&u(0,cl,0,0,"ng-template")}function dl(t,l){if(t&1&&(a(0,"span",55),u(1,ml,1,0,null,32),o()),t&2){let e=d(5);s(),m("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ul(t,l){if(t&1){let e=R();a(0,"div",52)(1,"p-iconfield")(2,"input",53,12),T("input",function(i){b(e);let r=d(4);return v(r.onFilterInputChange(i))})("keydown",function(i){b(e);let r=d(4);return v(r.onFilterKeyDown(i))})("click",function(i){b(e);let r=d(4);return v(r.onInputClick(i))})("blur",function(i){b(e);let r=d(4);return v(r.onFilterBlur(i))}),o(),a(4,"p-inputicon"),u(5,pl,1,1,"SearchIcon",39)(6,dl,2,1,"span",54),o()()()}if(t&2){let e=d(4);s(2),m("variant",e.variant)("value",e._filterValue()||"")("disabled",e.disabled),L("autocomplete",e.autocomplete)("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),s(3),m("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),s(),m("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function _l(t,l){if(t&1&&u(0,sl,4,5,"p-checkbox",49)(1,ul,7,10,"div",50),t&2){let e=d(3);m("ngIf",e.showToggleAll&&!e.selectionLimit),s(),m("ngIf",e.filter)}}function hl(t,l){if(t&1&&(a(0,"div",48),We(1),u(2,nl,2,4,"ng-container",22)(3,_l,2,2,"ng-template",null,9,h),o()),t&2){let e=we(4),n=d(2);s(2),m("ngIf",n.filterTemplate||n._filterTemplate)("ngIfElse",e)}}function fl(t,l){t&1&&P(0)}function gl(t,l){if(t&1&&u(0,fl,1,0,"ng-container",29),t&2){let e=l.$implicit,n=l.options;d(2);let i=we(9);m("ngTemplateOutlet",i)("ngTemplateOutletContext",se(2,Oi,e,n))}}function xl(t,l){t&1&&P(0)}function yl(t,l){if(t&1&&u(0,xl,1,0,"ng-container",29),t&2){let e=l.options,n=d(4);m("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",N(2,Ti,e))}}function Sl(t,l){t&1&&(g(0),u(1,yl,1,4,"ng-template",null,14,h),x())}function bl(t,l){if(t&1){let e=R();a(0,"p-scroller",56,13),T("onLazyLoad",function(i){b(e);let r=d(2);return v(r.onLazyLoad.emit(i))}),u(2,gl,1,5,"ng-template",null,3,h)(4,Sl,3,0,"ng-container",20),o()}if(t&2){let e=d(2);ae(N(9,De,e.scrollHeight)),m("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),s(4),m("ngIf",e.loaderTemplate||e._loaderTemplate)}}function vl(t,l){t&1&&P(0)}function Il(t,l){if(t&1&&(g(0),u(1,vl,1,0,"ng-container",29),x()),t&2){d();let e=we(9),n=d();s(),m("ngTemplateOutlet",e)("ngTemplateOutletContext",se(3,Oi,n.visibleOptions(),$(2,In)))}}function Cl(t,l){if(t&1&&(a(0,"span"),c(1),o()),t&2){let e=d(2).$implicit,n=d(3);s(),f(n.getOptionGroupLabel(e.optionGroup))}}function Tl(t,l){t&1&&P(0)}function Ol(t,l){if(t&1&&(g(0),a(1,"li",60),u(2,Cl,2,1,"span",20)(3,Tl,1,0,"ng-container",29),o(),x()),t&2){let e=d(),n=e.$implicit,i=e.index,r=d().options,p=d(2);s(),m("ngStyle",N(5,De,r.itemSize+"px")),L("id",p.id+"_"+p.getOptionIndex(i,r)),s(),m("ngIf",!p.groupTemplate),s(),m("ngTemplateOutlet",p.groupTemplate)("ngTemplateOutletContext",N(7,Ci,n.optionGroup))}}function wl(t,l){if(t&1){let e=R();g(0),a(1,"p-multiselect-item",61),T("onClick",function(i){b(e);let r=d().index,p=d().options,_=d(2);return v(_.onOptionSelect(i,!1,_.getOptionIndex(r,p)))})("onMouseEnter",function(i){b(e);let r=d().index,p=d().options,_=d(2);return v(_.onOptionMouseEnter(i,_.getOptionIndex(r,p)))}),o(),x()}if(t&2){let e=d(),n=e.$implicit,i=e.index,r=d().options,p=d(2);s(),m("id",p.id+"_"+p.getOptionIndex(i,r))("option",n)("selected",p.isSelected(n))("label",p.getOptionLabel(n))("disabled",p.isOptionDisabled(n))("template",p.itemTemplate||p._itemTemplate)("checkIconTemplate",p.checkIconTemplate||p._checkIconTemplate)("itemCheckboxIconTemplate",p.itemCheckboxIconTemplate||p._itemCheckboxIconTemplate)("itemSize",r.itemSize)("focused",p.focusedOptionIndex()===p.getOptionIndex(i,r))("ariaPosInset",p.getAriaPosInset(p.getOptionIndex(i,r)))("ariaSetSize",p.ariaSetSize)("variant",p.variant)}}function El(t,l){if(t&1&&u(0,Ol,4,9,"ng-container",20)(1,wl,2,13,"ng-container",20),t&2){let e=l.$implicit,n=d(3);m("ngIf",n.isOptionGroup(e)),s(),m("ngIf",!n.isOptionGroup(e))}}function Fl(t,l){if(t&1&&c(0),t&2){let e=d(4);M(" ",e.emptyFilterMessageLabel," ")}}function Vl(t,l){t&1&&P(0)}function Ml(t,l){if(t&1&&u(0,Vl,1,0,"ng-container",32),t&2){let e=d(4);m("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e.emptyTemplate||e._emptyFilterTemplate)}}function kl(t,l){if(t&1&&(a(0,"li",62),u(1,Fl,1,1)(2,Ml,1,1,"ng-container"),o()),t&2){let e=d().options,n=d(2);m("ngStyle",N(2,De,e.itemSize+"px")),s(),re(!n.emptyFilterTemplate&&!n._emptyFilterTemplate&&!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function Ll(t,l){if(t&1&&c(0),t&2){let e=d(4);M(" ",e.emptyMessageLabel," ")}}function Dl(t,l){t&1&&P(0)}function Rl(t,l){if(t&1&&u(0,Dl,1,0,"ng-container",32),t&2){let e=d(4);m("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function Al(t,l){if(t&1&&(a(0,"li",62),u(1,Ll,1,1)(2,Rl,1,1,"ng-container"),o()),t&2){let e=d().options,n=d(2);m("ngStyle",N(2,De,e.itemSize+"px")),s(),re(!n.emptyTemplate&&!n._emptyTemplate?1:2)}}function Pl(t,l){if(t&1&&(a(0,"ul",57,15),u(2,El,2,2,"ng-template",58)(3,kl,3,4,"li",59)(4,Al,3,4,"li",59),o()),t&2){let e=l.$implicit,n=l.options,i=d(2);ae(n.contentStyle),m("ngClass",n.contentStyleClass),L("aria-label",i.listLabel),s(2),m("ngForOf",e),s(),m("ngIf",i.hasFilter()&&i.isEmpty()),s(),m("ngIf",!i.hasFilter()&&i.isEmpty())}}function $l(t,l){t&1&&P(0)}function Bl(t,l){if(t&1&&(a(0,"div"),We(1,1),u(2,$l,1,0,"ng-container",32),o()),t&2){let e=d(2);s(2),m("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function zl(t,l){if(t&1){let e=R();a(0,"div",43)(1,"span",44,6),T("focus",function(i){b(e);let r=d();return v(r.onFirstHiddenFocus(i))}),o(),u(3,tl,1,0,"ng-container",32)(4,hl,5,2,"div",45),a(5,"div",46),u(6,bl,5,11,"p-scroller",47)(7,Il,2,6,"ng-container",20)(8,Pl,5,7,"ng-template",null,7,h),o(),u(10,Bl,3,1,"div",20),a(11,"span",44,8),T("focus",function(i){b(e);let r=d();return v(r.onLastHiddenFocus(i))}),o()()}if(t&2){let e=d();Be(e.panelStyleClass),m("ngClass","p-multiselect-overlay p-component")("ngStyle",e.panelStyle),L("id",e.id+"_list"),s(),L("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),s(2),m("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),s(),m("ngIf",e.showHeader),s(),Ct("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),s(),m("ngIf",e.virtualScroll),s(),m("ngIf",!e.virtualScroll),s(3),m("ngIf",e.footerFacet||e.footerTemplate||e._footerTemplate),s(),L("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var Kl=({dt:t})=>`
|
|
2
|
+
.p-multiselect {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
position: relative;
|
|
6
|
+
user-select: none;
|
|
7
|
+
background: ${t("multiselect.background")};
|
|
8
|
+
border: 1px solid ${t("multiselect.border.color")};
|
|
9
|
+
transition: background ${t("multiselect.transition.duration")}, color ${t("multiselect.transition.duration")}, border-color ${t("multiselect.transition.duration")}, outline-color ${t("multiselect.transition.duration")}, box-shadow ${t("multiselect.transition.duration")};
|
|
10
|
+
border-radius: ${t("multiselect.border.radius")};
|
|
11
|
+
outline-color: transparent;
|
|
12
|
+
box-shadow: ${t("multiselect.shadow")};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.p-multiselect.ng-invalid.ng-dirty {
|
|
16
|
+
border-color: ${t("multiselect.invalid.border.color")};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.p-multiselect:not(.p-disabled):hover {
|
|
20
|
+
border-color: ${t("multiselect.hover.border.color")};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.p-multiselect:not(.p-disabled).p-focus {
|
|
24
|
+
border-color: ${t("multiselect.focus.border.color")};
|
|
25
|
+
box-shadow: ${t("multiselect.focus.ring.shadow")};
|
|
26
|
+
outline: ${t("multiselect.focus.ring.width")} ${t("multiselect.focus.ring.style")} ${t("multiselect.focus.ring.color")};
|
|
27
|
+
outline-offset: ${t("multiselect.focus.ring.offset")};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.p-multiselect.p-variant-filled {
|
|
31
|
+
background: ${t("multiselect.filled.background")};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.p-multiselect.p-variant-filled:not(.p-disabled):hover {
|
|
35
|
+
background: ${t("multiselect.filled.hover.background")};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.p-multiselect.p-variant-filled.p-focus {
|
|
39
|
+
background: ${t("multiselect.filled.focus.background")};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.p-multiselect.p-disabled {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
background: ${t("multiselect.disabled.background")};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.p-multiselect-dropdown {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
background: transparent;
|
|
53
|
+
color: ${t("multiselect.dropdown.color")};
|
|
54
|
+
width: ${t("multiselect.dropdown.width")};
|
|
55
|
+
border-start-end-radius: ${t("multiselect.border.radius")};
|
|
56
|
+
border-end-end-radius: ${t("multiselect.border.radius")};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.p-multiselect-label-container {
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
flex: 1 1 auto;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.p-multiselect-label {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items-center;
|
|
68
|
+
gap: calc(${t("multiselect.padding.y")} / 2);
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
padding: ${t("multiselect.padding.y")} ${t("multiselect.padding.x")};
|
|
74
|
+
color: ${t("multiselect.color")};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.p-multiselect-label.p-placeholder {
|
|
78
|
+
color: ${t("multiselect.placeholder.color")};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
p-multiselect.ng-invalid.ng-dirty .p-multiselect-label.p-placeholder {
|
|
82
|
+
color: ${t("multiselect.invalid.placeholder.color")};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.p-multiselect.p-disabled .p-multiselect-label {
|
|
86
|
+
color: ${t("multiselect.disabled.color")};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-multiselect-label-empty {
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
visibility: hidden;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.p-multiselect .p-multiselect-overlay {
|
|
95
|
+
min-width: 100%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-multiselect-overlay {
|
|
99
|
+
background: ${t("multiselect.overlay.background")};
|
|
100
|
+
color: ${t("multiselect.overlay.color")};
|
|
101
|
+
border: 1px solid ${t("multiselect.overlay.border.color")};
|
|
102
|
+
border-radius: ${t("multiselect.overlay.border.radius")};
|
|
103
|
+
box-shadow: ${t("multiselect.overlay.shadow")};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.p-multiselect-header {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
padding: ${t("multiselect.list.header.padding")};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.p-multiselect-header .p-checkbox {
|
|
113
|
+
margin-inline-end: ${t("multiselect.option.gap")};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.p-multiselect-filter-container {
|
|
117
|
+
flex: 1 1 auto;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.p-multiselect-filter {
|
|
121
|
+
width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-multiselect-list-container {
|
|
125
|
+
overflow: auto;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.p-multiselect-list {
|
|
129
|
+
margin: 0;
|
|
130
|
+
padding: 0;
|
|
131
|
+
list-style-type: none;
|
|
132
|
+
padding: ${t("multiselect.list.padding")};
|
|
133
|
+
display: flex;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
gap: ${t("multiselect.list.gap")}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.p-multiselect-option {
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
font-weight: normal;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
position: relative;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: ${t("multiselect.option.gap")};
|
|
147
|
+
padding: ${t("multiselect.option.padding")};
|
|
148
|
+
border: 0 none;
|
|
149
|
+
color: ${t("multiselect.option.color")};
|
|
150
|
+
background: transparent;
|
|
151
|
+
transition: background ${t("multiselect.transition.duration")}, color ${t("multiselect.transition.duration")}, border-color ${t("multiselect.transition.duration")}, box-shadow ${t("multiselect.transition.duration")}, outline-color ${t("multiselect.transition.duration")};
|
|
152
|
+
border-radius: ${t("multiselect.option.border.radius")}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.p-multiselect-option:not(.p-multiselect-option-selected):not(.p-disabled).p-focus {
|
|
156
|
+
background: ${t("multiselect.option.focus.background")};
|
|
157
|
+
color: ${t("multiselect.option.focus.color")};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.p-multiselect-option.p-multiselect-option-selected {
|
|
161
|
+
background: ${t("multiselect.option.selected.background")};
|
|
162
|
+
color: ${t("multiselect.option.selected.color")};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.p-multiselect-option.p-multiselect-option-selected.p-focus {
|
|
166
|
+
background: ${t("multiselect.option.selected.focus.background")};
|
|
167
|
+
color: ${t("multiselect.option.selected.focus.color")};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.p-multiselect-option-group {
|
|
171
|
+
cursor: auto;
|
|
172
|
+
margin: 0;
|
|
173
|
+
padding: ${t("multiselect.option.group.padding")};
|
|
174
|
+
background: ${t("multiselect.option.group.background")};
|
|
175
|
+
color: ${t("multiselect.option.group.color")};
|
|
176
|
+
font-weight: ${t("multiselect.option.group.font.weight")};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.p-multiselect-empty-message {
|
|
180
|
+
padding: ${t("multiselect.empty.message.padding")};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.p-multiselect-label .p-chip {
|
|
184
|
+
padding-top: calc(${t("multiselect.padding.y")} / 2);
|
|
185
|
+
padding-bottom: calc(${t("multiselect.padding.y")} / 2);
|
|
186
|
+
border-radius: ${t("multiselect.chip.border.radius")};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.p-multiselect-label:has(.p-chip) {
|
|
190
|
+
padding: calc(${t("multiselect.padding.y")} / 2) calc(${t("multiselect.padding.x")} / 2);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.p-multiselect-fluid {
|
|
194
|
+
display: flex;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.p-multiselect-sm .p-multiselect-label {
|
|
198
|
+
font-size: ${t("multiselect.sm.font.size")};
|
|
199
|
+
padding-block: ${t("multiselect.sm.padding.y")};
|
|
200
|
+
padding-inline: ${t("multiselect.sm.padding.x")};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.p-multiselect-sm .p-multiselect-dropdown .p-icon {
|
|
204
|
+
font-size: ${t("multiselect.sm.font.size")};
|
|
205
|
+
width: ${t("multiselect.sm.font.size")};
|
|
206
|
+
height: ${t("multiselect.sm.font.size")};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.p-multiselect-lg .p-multiselect-label {
|
|
210
|
+
font-size: ${t("multiselect.lg.font.size")};
|
|
211
|
+
padding-block: ${t("multiselect.lg.padding.y")};
|
|
212
|
+
padding-inline: ${t("multiselect.lg.padding.x")};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.p-multiselect-lg .p-multiselect-dropdown .p-icon {
|
|
216
|
+
font-size: ${t("multiselect.lg.font.size")};
|
|
217
|
+
width: ${t("multiselect.lg.font.size")};
|
|
218
|
+
height: ${t("multiselect.lg.font.size")};
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.p-multiselect-clear-icon {
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
flex-shrink: 0;
|
|
227
|
+
background: transparent;
|
|
228
|
+
color: ${t("multiselect.clear.icon.color")};
|
|
229
|
+
}`,Nl={root:({props:t})=>({position:t.appendTo==="self"?"relative":void 0})},Gl={root:({instance:t})=>({"p-multiselect p-component p-inputwrapper":!0,"p-multiselect-display-chip":t.display==="chip","p-disabled":t.disabled,"p-invalid":t.invalid,"p-variant-filled":t.variant?t.variant==="filled":t.config.inputStyle==="filled","p-focus":t.focused,"p-inputwrapper-filled":t.filled,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-multiselect-open":t.overlayVisible,"p-multiselect-fluid":t.hasFluid,"p-multiselect-sm p-inputfield-sm":t.size==="small","p-multiselect-lg p-inputfield-lg":t.size==="large"}),labelContainer:"p-multiselect-label-container",label:({instance:t})=>({"p-multiselect-label":!0,"p-placeholder":t.label()===t.placeholder(),"p-multiselect-label-empty":!t.placeholder()&&!t.defaultLabel&&(!t.modelValue()||t.modelValue().length===0)}),chipItem:"p-multiselect-chip-item",pcChip:"p-multiselect-chip",chipIcon:"p-multiselect-chip-icon",dropdown:"p-multiselect-dropdown",loadingIcon:"p-multiselect-loading-icon",dropdownIcon:"p-multiselect-dropdown-icon",overlay:"p-multiselect-overlay p-component",header:"p-multiselect-header",pcFilterContainer:"p-multiselect-filter-container",pcFilter:"p-multiselect-filter",listContainer:"p-multiselect-list-container",list:"p-multiselect-list",optionGroup:"p-multiselect-option-group",option:({instance:t,option:l,index:e,getItemOptions:n})=>({"p-multiselect-option":!0,"p-multiselect-option-selected":t.isSelected(l)&&t.highlightOnSelect,"p-focus":t.focusedOptionIndex===t.getOptionIndex(e,n),"p-disabled":t.isOptionDisabled(l)}),emptyMessage:"p-multiselect-empty-message"},Ii=(()=>{class t extends Yt{name="multiselect";theme=Kl;classes=Gl;inlineStyles=Nl;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ze(t)))(i||t)}})();static \u0275prov=Pe({token:t,factory:t.\u0275fac})}return t})();var Hl={provide:Pt,useExisting:St(()=>ee),multi:!0},Ql=(()=>{class t extends lt{id;option;selected;label;disabled;itemSize;focused;ariaPosInset;ariaSetSize;variant;template;checkIconTemplate;itemCheckboxIconTemplate;onClick=new A;onMouseEnter=new A;onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected}),e.stopPropagation(),e.preventDefault()}onOptionMouseEnter(e){this.onMouseEnter.emit({originalEvent:e,option:this.option,selected:this.selected})}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ze(t)))(i||t)}})();static \u0275cmp=D({type:t,selectors:[["p-multiSelectItem"],["p-multiselect-item"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",F],label:"label",disabled:[2,"disabled","disabled",F],itemSize:[2,"itemSize","itemSize",Ee],focused:[2,"focused","focused",F],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",variant:"variant",template:"template",checkIconTemplate:"checkIconTemplate",itemCheckboxIconTemplate:"itemCheckboxIconTemplate"},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[Ye,Ue],decls:5,vars:27,consts:[["icon",""],["pRipple","","role","option",3,"click","mouseenter","ngStyle","ngClass","id"],[3,"ngModel","binary","tabindex","variant","ariaLabel"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,i){n&1&&(a(0,"li",1),T("click",function(p){return i.onOptionClick(p)})("mouseenter",function(p){return i.onOptionMouseEnter(p)}),a(1,"p-checkbox",2),u(2,Ni,3,0,"ng-container",3),o(),u(3,Gi,2,1,"span",3)(4,Hi,1,0,"ng-container",4),o()),n&2&&(m("ngStyle",N(20,De,i.itemSize+"px"))("ngClass",se(22,Pi,i.disabled,i.focused))("id",i.id),L("aria-label",i.label)("aria-setsize",i.ariaSetSize)("aria-posinset",i.ariaPosInset)("aria-selected",i.selected)("data-p-focused",i.focused)("data-p-highlight",i.selected)("data-p-disabled",i.disabled)("aria-checked",i.selected),s(),m("ngModel",i.selected)("binary",!0)("tabindex",-1)("variant",i.variant)("ariaLabel",i.label),s(),m("ngIf",i.itemCheckboxIconTemplate),s(),m("ngIf",!i.template),s(),m("ngTemplateOutlet",i.template)("ngTemplateOutletContext",N(25,Ci,i.option)))},dependencies:[Z,Je,ie,et,Xe,ot,it,U,tt,mi,ke],encapsulation:2})}return t})(),ee=(()=>{class t extends lt{zone;filterService;overlayService;id;ariaLabel;style;styleClass;panelStyle;panelStyleClass;inputId;disabled;fluid;readonly;group;filter=!0;filterPlaceHolder;filterLocale;overlayVisible;tabindex=0;variant;appendTo;dataKey;name;ariaLabelledBy;set displaySelectedLabel(e){this._displaySelectedLabel=e}get displaySelectedLabel(){return this._displaySelectedLabel}set maxSelectedLabels(e){this._maxSelectedLabels=e}get maxSelectedLabels(){return this._maxSelectedLabels}selectionLimit;selectedItemsLabel;showToggleAll=!0;emptyFilterMessage="";emptyMessage="";resetFilterOnHide=!1;dropdownIcon;chipIcon;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";showHeader=!0;filterBy;scrollHeight="200px";lazy=!1;virtualScroll;loading=!1;virtualScrollItemSize;loadingIcon;virtualScrollOptions;overlayOptions;ariaFilterLabel;filterMatchMode="contains";tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;autofocusFilter=!1;display="comma";autocomplete="off";size;showClear=!1;autofocus;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.log("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.log("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}set defaultLabel(e){this._defaultLabel=e,console.log("defaultLabel property is deprecated since 16.6.0, use placeholder instead")}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder.set(e)}get placeholder(){return this._placeholder.asReadonly()}get options(){return this._options()}set options(e){Nt(this._options(),e)||this._options.set(e)}get filterValue(){return this._filterValue()}set filterValue(e){this._filterValue.set(e)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.log("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get selectAll(){return this._selectAll}set selectAll(e){this._selectAll=e}focusOnHover=!0;filterFields;selectOnFocus=!1;autoOptionFocus=!1;onChange=new A;onFilter=new A;onFocus=new A;onBlur=new A;onClick=new A;onClear=new A;onPanelShow=new A;onPanelHide=new A;onLazyLoad=new A;onRemove=new A;onSelectAllChange=new A;overlayViewChild;filterInputChild;focusInputViewChild;itemsViewChild;scroller;lastHiddenFocusableElementOnOverlay;firstHiddenFocusableElementOnOverlay;headerCheckboxViewChild;footerFacet;headerFacet;_componentStyle=V(Ii);searchValue;searchTimeout;_selectAll=null;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_defaultLabel;_placeholder=K(void 0);_itemSize;_selectionLimit;_disableTooltip=!1;value;_filteredOptions;onModelChange=()=>{};onModelTouched=()=>{};valuesAsString;focus;filtered;itemTemplate;groupTemplate;loaderTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;selectedItemsTemplate;checkIconTemplate;loadingIconTemplate;filterIconTemplate;removeTokenIconTemplate;chipIconTemplate;clearIconTemplate;dropdownIconTemplate;itemCheckboxIconTemplate;headerCheckboxIconTemplate;templates;_itemTemplate;_groupTemplate;_loaderTemplate;_headerTemplate;_filterTemplate;_footerTemplate;_emptyFilterTemplate;_emptyTemplate;_selectedItemsTemplate;_checkIconTemplate;_loadingIconTemplate;_filterIconTemplate;_removeTokenIconTemplate;_chipIconTemplate;_clearIconTemplate;_dropdownIconTemplate;_itemCheckboxIconTemplate;_headerCheckboxIconTemplate;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this._itemTemplate=e.template;break;case"group":this._groupTemplate=e.template;break;case"selectedItems":case"selecteditems":this._selectedItemsTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"filter":this._filterTemplate=e.template;break;case"emptyfilter":this._emptyFilterTemplate=e.template;break;case"empty":this._emptyTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"loader":this._loaderTemplate=e.template;break;case"checkicon":this._checkIconTemplate=e.template,console.warn("checkicon is deprecated and will removed in future. Use itemcheckboxicon or headercheckboxicon templates instead.");break;case"headercheckboxicon":this._headerCheckboxIconTemplate=e.template;break;case"loadingicon":this._loadingIconTemplate=e.template;break;case"filtericon":this._filterIconTemplate=e.template;break;case"removetokenicon":this._removeTokenIconTemplate=e.template;break;case"clearicon":this._clearIconTemplate=e.template;break;case"dropdownicon":this._dropdownIconTemplate=e.template;break;case"itemcheckboxicon":this._itemCheckboxIconTemplate=e.template;break;case"chipicon":this._chipIconTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}headerCheckboxFocus;filterOptions;preventModelTouched;preventDocumentDefault;focused=!1;itemsWrapper;_displaySelectedLabel=!0;_maxSelectedLabels=3;modelValue=K(null);_filterValue=K(null);_options=K(null);startRangeIndex=K(-1);focusedOptionIndex=K(-1);selectedOptions;clickInProgress=!1;get hostClasses(){let e=[];return typeof this.rootClass=="string"?e.push(this.rootClass):Array.isArray(this.rootClass)?e.push(...this.rootClass):typeof this.rootClass=="object"&&Object.keys(this.rootClass).filter(n=>this.rootClass[n]).forEach(n=>e.push(n)),this.styleClass&&e.push(this.styleClass),e.join(" ")}get rootClass(){return this._componentStyle.classes.root({instance:this})}get labelClass(){return this._componentStyle.classes.label({instance:this})}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Le.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Le.EMPTY_FILTER_MESSAGE)}get filled(){return typeof this.modelValue()=="string"?!!this.modelValue():X(this.modelValue())}get isVisibleClearIcon(){return this.modelValue()!=null&&this.modelValue()!==""&&X(this.modelValue())&&this.showClear&&!this.disabled&&this.filled}get toggleAllAriaLabel(){return this.config.translation.aria?this.config.translation.aria[this.allSelected()?"selectAll":"unselectAll"]:void 0}get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}get listLabel(){return this.config.getTranslation(Le.ARIA).listLabel}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}visibleOptions=B(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),n=Gt(e)&&di.isObject(e[0]);if(this._filterValue()){let i;if(n?i=this.filterService.filter(e,this.searchFields(),this._filterValue(),this.filterMatchMode,this.filterLocale):i=e.filter(r=>r.toString().toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase())),this.group){let r=this.options||[],p=[];return r.forEach(_=>{let Re=this.getOptionGroupChildren(_).filter(Ai=>i.includes(Ai));Re.length>0&&p.push(k(I({},_),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...Re]}))}),this.flatOptions(p)}return i}return e});label=B(()=>{let e,n=this.modelValue();if(n&&n.length&&this.displaySelectedLabel){if(X(this.maxSelectedLabels)&&n.length>this.maxSelectedLabels)return this.getSelectedItemsLabel();e="";for(let i=0;i<n.length;i++)i!==0&&(e+=", "),e+=this.getLabelByValue(n[i])}else e=this.placeholder()||this.defaultLabel||"";return e});chipSelectedItems=B(()=>X(this.maxSelectedLabels)&&this.modelValue()&&this.modelValue().length>this.maxSelectedLabels?this.modelValue().slice(0,this.maxSelectedLabels):this.modelValue());constructor(e,n,i){super(),this.zone=e,this.filterService=n,this.overlayService=i,Dt(()=>{let r=this.modelValue(),p=this.getAllVisibleAndNonVisibleOptions();p&&X(p)&&(this.optionValue&&this.optionLabel&&r?this.selectedOptions=p.filter(_=>r.includes(_[this.optionLabel])||r.includes(_[this.optionValue])):this.selectedOptions=r,this.cd.markForCheck())})}ngOnInit(){super.ngOnInit(),this.id=this.id||Ut("pn_id_"),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}maxSelectionLimitReached(){return this.selectionLimit&&this.modelValue()&&this.modelValue().length===this.selectionLimit}ngAfterViewInit(){super.ngAfterViewInit(),this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}flatOptions(e){return(e||[]).reduce((n,i,r)=>{n.push({optionGroup:i,group:!0,index:r});let p=this.getOptionGroupChildren(i);return p&&p.forEach(_=>n.push(_)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()){this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());let e=this.getOptionValue(this.visibleOptions()[this.focusedOptionIndex()]);this.onOptionSelect({originalEvent:null,option:[e]})}}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e)}onInputClick(e){e.stopPropagation(),e.preventDefault(),this.focusedOptionIndex.set(-1)}onOptionSelect(e,n=!1,i=-1){let{originalEvent:r,option:p}=e;if(this.disabled||this.isOptionDisabled(p))return;let _=this.isSelected(p),H=null;_?H=this.modelValue().filter(Re=>!Fe(Re,this.getOptionValue(p),this.equalityKey())):H=[...this.modelValue()||[],this.getOptionValue(p)],this.updateModel(H,r),i!==-1&&this.focusedOptionIndex.set(i),n&&le(this.focusInputViewChild?.nativeElement),this.onChange.emit({originalEvent:e,value:H,itemValue:p})}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}onOptionSelectRange(e,n=-1,i=-1){if(n===-1&&(n=this.findNearestSelectedOptionIndex(i,!0)),i===-1&&(i=this.findNearestSelectedOptionIndex(n)),n!==-1&&i!==-1){let r=Math.min(n,i),p=Math.max(n,i),_=this.visibleOptions().slice(r,p+1).filter(H=>this.isValidOption(H)).map(H=>this.getOptionValue(H));this.updateModel(_,e)}}searchFields(){return(this.filterBy||this.optionLabel||"label").split(",")}findNearestSelectedOptionIndex(e,n=!1){let i=-1;return this.hasSelectedOption()&&(n?(i=this.findPrevSelectedOptionIndex(e),i=i===-1?this.findNextSelectedOptionIndex(e):i):(i=this.findNextSelectedOptionIndex(e),i=i===-1?this.findPrevSelectedOptionIndex(e):i)),i>-1?i:e}findPrevSelectedOptionIndex(e){let n=this.hasSelectedOption()&&e>0?Ve(this.visibleOptions().slice(0,e),i=>this.isValidSelectedOption(i)):-1;return n>-1?n:-1}findFirstFocusedOptionIndex(){let e=this.findFirstSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextSelectedOptionIndex(e){let n=this.hasSelectedOption()&&e<this.visibleOptions().length-1?this.visibleOptions().slice(e+1).findIndex(i=>this.isValidSelectedOption(i)):-1;return n>-1?n+e+1:-1}equalityKey(){return this.optionValue?null:this.dataKey}hasSelectedOption(){return X(this.modelValue())}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}isOptionGroup(e){return(this.group||this.optionGroupLabel)&&e.optionGroup&&e.group}isValidOption(e){return e&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionDisabled(e){return this.maxSelectionLimitReached()&&!this.isSelected(e)?!0:this.optionDisabled?ne(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}isSelected(e){let n=this.getOptionValue(e);return(this.modelValue()||[]).some(i=>Fe(i,n,this.equalityKey()))}isOptionMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}getLabelByValue(e){let i=(this.group?this.flatOptions(this._options()):this._options()||[]).find(r=>!this.isOptionGroup(r)&&Fe(this.getOptionValue(r),e,this.equalityKey()));return i?this.getOptionLabel(i):null}getSelectedItemsLabel(){let e=/{(.*?)}/,n=this.selectedItemsLabel?this.selectedItemsLabel:this.config.getTranslation(Le.SELECTION_MESSAGE);return e.test(n)?n.replace(n.match(e)[0],this.modelValue().length+""):n}getOptionLabel(e){return this.optionLabel?ne(e,this.optionLabel):e&&e.label!=null?e.label:e}getOptionValue(e){return this.optionValue?ne(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?ne(e,this.optionGroupLabel):e&&e.label!=null?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?ne(e,this.optionGroupChildren):e.items}onKeyDown(e){if(this.disabled){e.preventDefault();return}let n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"Space":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(e.code==="KeyA"&&n){let i=this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(i,e),e.preventDefault();break}!n&&Ht(e.key)&&(!this.overlayVisible&&this.show(),this.searchOptions(e,e.key),e.preventDefault());break}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onArrowDownKey(e){let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,this.startRangeIndex(),n),this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault(),e.stopPropagation()}onArrowUpKey(e,n=!1){if(e.altKey&&!n)this.focusedOptionIndex()!==-1&&this.onOptionSelect(e,this.visibleOptions()[this.focusedOptionIndex()]),this.overlayVisible&&this.hide(),e.preventDefault();else{let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();e.shiftKey&&this.onOptionSelectRange(e,i,this.startRangeIndex()),this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show(),e.preventDefault()}e.stopPropagation()}onHomeKey(e,n=!1){let{currentTarget:i}=e;if(n){let r=i.value.length;i.setSelectionRange(0,e.shiftKey?r:0),this.focusedOptionIndex.set(-1)}else{let r=e.metaKey||e.ctrlKey,p=this.findFirstOptionIndex();e.shiftKey&&r&&this.onOptionSelectRange(e,p,this.startRangeIndex()),this.changeFocusedOptionIndex(e,p),!this.overlayVisible&&this.show()}e.preventDefault()}onEndKey(e,n=!1){let{currentTarget:i}=e;if(n){let r=i.value.length;i.setSelectionRange(e.shiftKey?0:r,r),this.focusedOptionIndex.set(-1)}else{let r=e.metaKey||e.ctrlKey,p=this.findLastFocusedOptionIndex();e.shiftKey&&r&&this.onOptionSelectRange(e,this.startRangeIndex(),p),this.changeFocusedOptionIndex(e,p),!this.overlayVisible&&this.show()}e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onEnterKey(e){this.overlayVisible?this.focusedOptionIndex()!==-1&&(e.shiftKey?this.onOptionSelectRange(e,this.focusedOptionIndex()):this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]})):this.onArrowDownKey(e),e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.stopPropagation(),e.preventDefault()}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onTabKey(e,n=!1){n||(this.overlayVisible&&this.hasFocusableElements()?(le(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault()):(this.focusedOptionIndex()!==-1&&this.onOptionSelect({originalEvent:e,option:this.visibleOptions()[this.focusedOptionIndex()]}),this.overlayVisible&&this.hide(this.filter)))}onShiftKey(){this.startRangeIndex.set(this.focusedOptionIndex())}onContainerClick(e){if(!(this.disabled||this.loading||this.readonly||e.target.isSameNode(this.focusInputViewChild?.nativeElement))){if(!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target)){if(this.clickInProgress)return;this.clickInProgress=!0,setTimeout(()=>{this.clickInProgress=!1},150),this.overlayVisible?this.hide(!0):this.show(!0)}this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),this.onClick.emit(e),this.cd.detectChanges()}}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?jt(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;le(n)}onInputFocus(e){this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focused=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onFilterInputChange(e){let n=e.target.value;this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()})}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?Zt(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;le(n)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}onHeaderCheckboxKeyDown(e){if(this.disabled){e.preventDefault();return}switch(e.code){case"Space":this.onToggleAll(e);break;case"Enter":this.onToggleAll(e);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}onToggleAll(e){if(!(this.disabled||this.readonly)){if(this.selectAll!=null)this.onSelectAllChange.emit({originalEvent:e,checked:!this.allSelected()});else{let n=this.getAllVisibleAndNonVisibleOptions().filter(_=>this.isSelected(_)&&(this.optionDisabled?ne(_,this.optionDisabled):_&&_.disabled!==void 0?_.disabled:!1)),i=this.allSelected()?this.visibleOptions().filter(_=>!this.isValidOption(_)&&this.isSelected(_)):this.visibleOptions().filter(_=>this.isSelected(_)||this.isValidOption(_)),r=[...n,...i].map(_=>this.getOptionValue(_)),p=[...new Set(r)];this.updateModel(p,e),(!p.length||p.length===this.getAllVisibleAndNonVisibleOptions().length)&&this.onSelectAllChange.emit({originalEvent:e,checked:!!p.length})}this.partialSelected()&&(this.selectedOptions=null,this.cd.markForCheck()),this.onChange.emit({originalEvent:e,value:this.value}),oi.focus(this.headerCheckboxViewChild?.inputViewChild?.nativeElement),this.headerCheckboxFocus=!0,e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()}}changeFocusedOptionIndex(e,n){this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView())}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let i=Ke(this.itemsViewChild.nativeElement,`li[id="${n}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}writeValue(e){this.value=e,this.modelValue.set(this.value),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}allSelected(){return this.selectAll!==null?this.selectAll:X(this.visibleOptions())&&this.visibleOptions().every(e=>this.isOptionGroup(e)||this.isOptionDisabled(e)||this.isSelected(e))}partialSelected(){return this.selectedOptions&&this.selectedOptions.length>0&&this.selectedOptions.length<this.options.length}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.findSelectedOptionIndex();this.focusedOptionIndex.set(n),e&&le(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.overlayOptions?.mode==="modal"&&Qt(),e&&le(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=Ke(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-multiselect-list-container"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=Ke(this.itemsWrapper,'[data-p-highlight="true"]');n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onPanelHide.emit(e))}resetFilter(){this.filterInputChild&&this.filterInputChild.nativeElement&&(this.filterInputChild.nativeElement.value=""),this._filterValue.set(null),this._filteredOptions=null}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateModel(null,e),this.selectedOptions=null,this.onClear.emit(),this._disableTooltip=!0,e.stopPropagation()}labelContainerMouseLeave(){this._disableTooltip&&(this._disableTooltip=!1)}removeOption(e,n){let i=this.modelValue().filter(r=>!Fe(r,e,this.equalityKey()));this.updateModel(i,n),this.onChange.emit({originalEvent:n,value:i,itemValue:e}),this.onRemove.emit({newValue:i,removed:e}),n&&n.stopPropagation()}findNextItem(e){let n=e.nextElementSibling;return n?Me(n.children[0],"p-disabled")||nt(n.children[0])||Me(n,"p-multiselect-item-group")?this.findNextItem(n):n.children[0]:null}findPrevItem(e){let n=e.previousElementSibling;return n?Me(n.children[0],"p-disabled")||nt(n.children[0])||Me(n,"p-multiselect-item-group")?this.findPrevItem(n):n.children[0]:null}findNextOptionIndex(e){let n=e<this.visibleOptions().length-1?this.visibleOptions().slice(e+1).findIndex(i=>this.isValidOption(i)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?Ve(this.visibleOptions().slice(0,e),i=>this.isValidOption(i)):-1;return n>-1?n:e}findLastSelectedOptionIndex(){return this.hasSelectedOption()?Ve(this.visibleOptions(),e=>this.isValidSelectedOption(e)):-1}findLastFocusedOptionIndex(){let e=this.findLastSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}findLastOptionIndex(){return Ve(this.visibleOptions(),e=>this.isValidOption(e))}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let i=-1,r=!1;return this.focusedOptionIndex()!==-1?(i=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(p=>this.isOptionMatched(p)),i=i===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(p=>this.isOptionMatched(p)):i+this.focusedOptionIndex()):i=this.visibleOptions().findIndex(p=>this.isOptionMatched(p)),i!==-1&&(r=!0),i===-1&&this.focusedOptionIndex()===-1&&(i=this.findFirstFocusedOptionIndex()),i!==-1&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),r}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=[];for(let n of this.options){let i=this.filterService.filter(this.getOptionGroupChildren(n),this.searchFields(),this.filterValue,this.filterMatchMode,this.filterLocale);i&&i.length&&e.push(k(I({},n),{[this.optionGroupChildren]:i}))}this._filteredOptions=e}else this._filteredOptions=this.filterService.filter(this.options,this.searchFields(),this.filterValue,this.filterMatchMode,this.filterLocale);else this._filteredOptions=null}hasFocusableElements(){return qt(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}static \u0275fac=function(n){return new(n||t)($e(vt),$e(Wt),$e(Jt))};static \u0275cmp=D({type:t,selectors:[["p-multiSelect"],["p-multiselect"],["p-multi-select"]],contentQueries:function(n,i,r){if(n&1&&(w(r,ei,5),w(r,Xt,5),w(r,Qi,4),w(r,qi,4),w(r,ji,4),w(r,Zi,4),w(r,Ui,4),w(r,Yi,4),w(r,Wi,4),w(r,Ji,4),w(r,Xi,4),w(r,en,4),w(r,tn,4),w(r,nn,4),w(r,ln,4),w(r,on,4),w(r,an,4),w(r,rn,4),w(r,sn,4),w(r,pn,4),w(r,ti,4)),n&2){let p;y(p=S())&&(i.footerFacet=p.first),y(p=S())&&(i.headerFacet=p.first),y(p=S())&&(i.itemTemplate=p.first),y(p=S())&&(i.groupTemplate=p.first),y(p=S())&&(i.loaderTemplate=p.first),y(p=S())&&(i.headerTemplate=p.first),y(p=S())&&(i.filterTemplate=p.first),y(p=S())&&(i.footerTemplate=p.first),y(p=S())&&(i.emptyFilterTemplate=p.first),y(p=S())&&(i.emptyTemplate=p.first),y(p=S())&&(i.selectedItemsTemplate=p.first),y(p=S())&&(i.checkIconTemplate=p.first),y(p=S())&&(i.loadingIconTemplate=p.first),y(p=S())&&(i.filterIconTemplate=p.first),y(p=S())&&(i.removeTokenIconTemplate=p.first),y(p=S())&&(i.chipIconTemplate=p.first),y(p=S())&&(i.clearIconTemplate=p.first),y(p=S())&&(i.dropdownIconTemplate=p.first),y(p=S())&&(i.itemCheckboxIconTemplate=p.first),y(p=S())&&(i.headerCheckboxIconTemplate=p.first),y(p=S())&&(i.templates=p)}},viewQuery:function(n,i){if(n&1&&(j(cn,5),j(mn,5),j(dn,5),j(un,5),j(_n,5),j(hn,5),j(fn,5),j(gn,5)),n&2){let r;y(r=S())&&(i.overlayViewChild=r.first),y(r=S())&&(i.filterInputChild=r.first),y(r=S())&&(i.focusInputViewChild=r.first),y(r=S())&&(i.itemsViewChild=r.first),y(r=S())&&(i.scroller=r.first),y(r=S())&&(i.lastHiddenFocusableElementOnOverlay=r.first),y(r=S())&&(i.firstHiddenFocusableElementOnOverlay=r.first),y(r=S())&&(i.headerCheckboxViewChild=r.first)}},hostVars:7,hostBindings:function(n,i){n&1&&T("click",function(p){return i.onContainerClick(p)}),n&2&&(L("id",i.id),ae(i.style),Be(i.hostClasses),Tt("p-variant-filled",i.variant==="filled"||i.config.inputVariant()==="filled"||i.config.inputStyle()==="filled"))},inputs:{id:"id",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:[2,"disabled","disabled",F],fluid:[2,"fluid","fluid",F],readonly:[2,"readonly","readonly",F],group:[2,"group","group",F],filter:[2,"filter","filter",F],filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:[2,"overlayVisible","overlayVisible",F],tabindex:[2,"tabindex","tabindex",Ee],variant:"variant",appendTo:"appendTo",dataKey:"dataKey",name:"name",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:[2,"selectionLimit","selectionLimit",Ee],selectedItemsLabel:"selectedItemsLabel",showToggleAll:[2,"showToggleAll","showToggleAll",F],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",F],dropdownIcon:"dropdownIcon",chipIcon:"chipIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:[2,"showHeader","showHeader",F],filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:[2,"lazy","lazy",F],virtualScroll:[2,"virtualScroll","virtualScroll",F],loading:[2,"loading","loading",F],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Ee],loadingIcon:"loadingIcon",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:[2,"autofocusFilter","autofocusFilter",F],display:"display",autocomplete:"autocomplete",size:"size",showClear:[2,"showClear","showClear",F],autofocus:[2,"autofocus","autofocus",F],autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue",itemSize:"itemSize",selectAll:"selectAll",focusOnHover:[2,"focusOnHover","focusOnHover",F],filterFields:"filterFields",selectOnFocus:[2,"selectOnFocus","selectOnFocus",F],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",F]},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide",onLazyLoad:"onLazyLoad",onRemove:"onRemove",onSelectAllChange:"onSelectAllChange"},features:[J([Hl,Ii]),Ye,Ue],ngContentSelectors:yn,decls:16,vars:35,consts:[["focusInput",""],["elseBlock",""],["overlay",""],["content",""],["token",""],["removeicon",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["headerCheckbox",""],["checkboxicon",""],["filterInput",""],["scroller",""],["loader",""],["items",""],[1,"p-hidden-accessible"],["role","combobox",3,"focus","blur","keydown","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[1,"p-multiselect-label-container",3,"mouseleave","pTooltip","tooltipDisabled","tooltipPosition","positionStyle","tooltipStyleClass"],[3,"ngClass"],[4,"ngIf"],[1,"p-multiselect-dropdown"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions"],["class","p-multiselect-chip-item",4,"ngFor","ngForOf"],[1,"p-multiselect-chip-item"],["styleClass","p-multiselect-chip",3,"onRemove","label","removable","removeIcon"],["class","p-multiselect-chip-icon",3,"click",4,"ngIf"],[1,"p-multiselect-chip-icon",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-multiselect-clear-icon",3,"click",4,"ngIf"],[1,"p-multiselect-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["aria-hidden","true",3,"ngClass",4,"ngIf"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true",3,"ngClass"],["aria-hidden","true"],["class","p-multiselect-dropdown-icon",4,"ngIf"],["class","p-multiselect-dropdown-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-multiselect-dropdown-icon",3,"ngClass"],[3,"styleClass"],[1,"p-multiselect-dropdown-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-list-container"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],[1,"p-multiselect-header"],[3,"ngModel","ariaLabel","binary","variant","disabled","onChange",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],[3,"onChange","ngModel","ariaLabel","binary","variant","disabled"],[1,"p-multiselect-filter-container"],["pInputText","","type","text","role","searchbox",1,"p-multiselect-filter",3,"input","keydown","click","blur","variant","value","disabled"],["class","p-multiselect-filter-icon",4,"ngIf"],[1,"p-multiselect-filter-icon"],[3,"onLazyLoad","items","itemSize","autoSize","tabindex","lazy","options"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-list",3,"ngClass"],["ngFor","",3,"ngForOf"],["class","p-multiselect-empty-message","role","option",3,"ngStyle",4,"ngIf"],["role","option",1,"p-multiselect-option-group",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","selected","label","disabled","template","checkIconTemplate","itemCheckboxIconTemplate","itemSize","focused","ariaPosInset","ariaSetSize","variant"],["role","option",1,"p-multiselect-empty-message",3,"ngStyle"]],template:function(n,i){if(n&1){let r=R();Et(xn),a(0,"div",16)(1,"input",17,0),T("focus",function(_){return b(r),v(i.onInputFocus(_))})("blur",function(_){return b(r),v(i.onInputBlur(_))})("keydown",function(_){return b(r),v(i.onKeyDown(_))}),o()(),a(3,"div",18),T("mouseleave",function(){return b(r),v(i.labelContainerMouseLeave())}),a(4,"div",19),u(5,Ln,3,2,"ng-container",20)(6,An,3,6,"ng-container",20),o()(),u(7,Kn,3,2,"ng-container",20),a(8,"div",21),u(9,jn,3,2,"ng-container",22)(10,el,2,2,"ng-template",null,1,h),o(),a(12,"p-overlay",23,2),Mt("visibleChange",function(_){return b(r),Vt(i.overlayVisible,_)||(i.overlayVisible=_),v(_)}),T("onAnimationStart",function(_){return b(r),v(i.onOverlayAnimationStart(_))})("onHide",function(){return b(r),v(i.hide())}),u(14,zl,13,18,"ng-template",null,3,h),o()}if(n&2){let r,p=we(11);L("data-p-hidden-accessible",!0),s(),m("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass)("pAutoFocus",i.autofocus),L("aria-disabled",i.disabled)("id",i.inputId)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",(r=i.overlayVisible)!==null&&r!==void 0?r:!1)("aria-controls",i.overlayVisible?i.id+"_list":null)("tabindex",i.disabled?-1:i.tabindex)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("value",i.label()||"empty"),s(2),m("pTooltip",i.tooltip)("tooltipDisabled",i._disableTooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass),s(),m("ngClass",i.labelClass),s(),m("ngIf",!i.selectedItemsTemplate&&!i._selectedItemsTemplate),s(),m("ngIf",i.selectedItemsTemplate||i._selectedItemsTemplate),s(),m("ngIf",i.isVisibleClearIcon),s(2),m("ngIf",i.loading)("ngIfElse",p),s(3),Ft("visible",i.overlayVisible),m("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("autoZIndex",i.autoZIndex)("baseZIndex",i.baseZIndex)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:[Z,Je,Rt,ie,et,Xe,Ql,_i,ke,fi,Ge,ai,ri,pi,ci,si,ii,ni,li,xi,ot,it,U,tt],encapsulation:2,changeDetection:0})}return t})(),Oe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=It({type:t});static \u0275inj=bt({imports:[ee,ke,ke]})}return t})();var te=(()=>{class t{constructor(){this.httpService=V(zt),this.authService=V(Kt)}fetchGeneralLedgerLoader(e={}){return this.httpService.post(void 0,"api/GeneralLedgerLoader/GetFilter",e)}fetchGeneralLedgerReport(e){return this.httpService.post(void 0,"api/GeneralLedger/Get",e)}getCustomerSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:n})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e){return this.httpService.get(void 0,"/api/BalanceSheet",{params:e})}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e){return this.httpService.post(void 0,"api/IncomeStatement/List",I({},e))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Pe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ql={metadata:{filter:{categoryID:"",from:new Date().toISOString(),to:new Date().toISOString(),iDs:[],outletIDs:[]},options:{accounts:[],outlets:[]},roles:{isInEmptyOutletRole:!1}},items:{data:[],pageTitle:""},filter:{listAccountID:[],categoryID:null,OutletID:[],ContactID:null,from:new Date().toISOString(),to:new Date().toISOString()}},pt=he(ye(ql),fe(t=>({hasData:B(()=>Array.isArray(t.items().data)&&t.items().data.length>0)})),xe(t=>{let l=V(te);return{updateFilter:e=>{z(t,n=>k(I({},n),{filter:e}))},loadList:Y(Q(q(e=>l.fetchGeneralLedgerReport(e).pipe(W({next:n=>{z(t,i=>k(I({},i),{items:n}))},error:n=>{console.error(n)}}))))),loadLoader:Y(Q(q(e=>l.fetchGeneralLedgerLoader(e).pipe(W({next:n=>{z(t,i=>k(I({},i),{metadata:n}))},error:n=>{console.error(n)}}))),gi("res")))}}),ge({onInit:()=>{}}));var Zl=(t,l)=>l.id,Ul=()=>({height:"calc(100vh - 108px)"}),Yl=()=>[];function Wl(t,l){if(t&1&&(a(0,"tr"),C(1,"td"),a(2,"td")(3,"a"),c(4),o()(),a(5,"td"),c(6),O(7,"date"),o(),C(8,"td")(9,"td"),a(10,"td",23),c(11),O(12,"number"),o(),a(13,"td",23),c(14),O(15,"number"),o(),a(16,"td",23),c(17),O(18,"number"),o()()),t&2){let e=l.$implicit;s(4),f(e.number),s(2),f(Lt(7,5,e.date,"dd MMM yyyy")),s(5),f(E(12,8,e.debitAmount)),s(3),f(E(15,10,e.creditAmount)),s(3),f(E(18,12,e.balance))}}function Jl(t,l){if(t&1&&(a(0,"table",19)(1,"thead")(2,"tr")(3,"th",20),c(4,"Outlet"),o(),a(5,"th",20),c(6,"No."),o(),a(7,"th",20),c(8,"Date"),o(),a(9,"th",20),c(10,"Name"),o(),a(11,"th",20),c(12,"Description"),o(),a(13,"th",21),c(14,"Debit"),o(),a(15,"th",21),c(16,"Credit"),o(),a(17,"th",21),c(18,"Balance"),o()()(),a(19,"tbody")(20,"tr")(21,"td",22),c(22,"Starting Balance"),o(),a(23,"td",23),c(24),O(25,"number"),o()(),Ot(26,Wl,19,14,"tr",null,Zl),a(28,"tr"),C(29,"td",24),a(30,"td",23),c(31,"Total"),o(),a(32,"td",23),c(33),O(34,"number"),o(),a(35,"td",23),c(36),O(37,"number"),o()()()()),t&2){let e=l.$implicit;s(24),f(E(25,3,e.startBalance)),s(2),wt(e.data),s(7),f(E(34,5,e.debitTotal)),s(3),f(E(37,7,e.creditTotal))}}function Xl(t,l){if(t&1&&(a(0,"p-virtual-scroller",7),u(1,Jl,38,9,"ng-template",null,0,h),o()),t&2){let e=d(2);m("items",e.store.items().data)("scrollHeight","calc(100vh - 150px)")}}function eo(t,l){t&1&&C(0,"img",8)}function to(t,l){if(t&1&&(a(0,"div",25)(1,"div"),c(2),o()()),t&2){let e=l.$implicit;s(2),f(e.value)}}function io(t,l){if(t&1){let e=R();a(0,"app-main-panel",2),T("filterEmitted",function(i){b(e);let r=d();return v(r.onFilterEvent(i))})("filterOKEmitted",function(){b(e);let i=d();return v(i.onFilterOKEvent())}),g(1,3),a(2,"button",4),c(3," Return to Accounts "),o(),a(4,"button",5),c(5,"Export"),o(),x(),g(6,6),a(7,"p-card"),u(8,Xl,3,2,"p-virtual-scroller",7)(9,eo,1,0,"img",8),o(),x(),g(10,9),a(11,"form",10)(12,"div",11)(13,"label",12),c(14,"From"),o(),C(15,"p-datepicker",13),o(),a(16,"div",11)(17,"label",12),c(18,"To"),o(),C(19,"p-datepicker",14),o(),a(20,"div",11)(21,"label",12),c(22,"Outlet"),o(),a(23,"p-multiselect",15),u(24,to,3,1,"ng-template",null,0,h),o()(),a(26,"div",11)(27,"label",12),c(28,"Accounts"),o(),C(29,"p-multiselect",16),o(),a(30,"div",11)(31,"label",12),c(32,"Category"),o(),C(33,"p-select",17),o(),a(34,"div",11)(35,"label",12),c(36,"Customer"),o(),a(37,"p-autocomplete",18),T("completeMethod",function(i){b(e);let r=d();return v(r.searchCustomer(i))}),o()()(),x(),o()}if(t&2){let e=d();m("pageTitle",e.store.items().pageTitle.length?e.store.items().pageTitle:"General Ledger")("isFilterable",!0)("isInitDialogFilterVisible",e.initDialogVisible()),s(7),ae($(21,Ul)),s(),re(e.store.items()&&e.store.items().data.length?8:9),s(3),m("formGroup",e.generalLedgerFilterForm),s(4),m("iconDisplay","input")("showIcon",!0),s(4),m("iconDisplay","input")("showIcon",!0),s(4),m("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets),s(6),m("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.accounts),s(4),m("virtualScroll",!0)("virtualScrollItemSize",50)("options",$(22,Yl)),s(4),m("suggestions",e.customerSuggestions())}}var Fi=(()=>{class t{constructor(){this.dialogFilterVisible=K(!0),this.reportService=V(te),this.store=V(pt),this.customerSuggestions=K([]),this.route=V(Bt),this.initDialogVisible=K(!0)}ngOnInit(){this.generateFilterForm(),this.route.queryParamMap.pipe(Ae(e=>e.has("id")),gt(e=>e.get("id")),je(e=>{this.initDialogVisible.update(n=>!n),this.generalLedgerFilterForm.patchValue({listAccountID:[e]}),this.store.updateFilter(k(I({},this.store.filter()),{listAccountID:[e]}))})).subscribe(),this.generalLedgerFilterForm.patchValue({from:new Date}),this.store.loadLoader({}),this.store.loadList(this.store.filter)}generateFilterForm(){this.generalLedgerFilterForm=new ze({listAccountID:new G([]),categoryID:new G(""),OutletID:new G([]),ContactID:new G(""),from:new G(new Date),to:new G(new Date)})}onFilterEvent(e){console.log(e),this.dialogFilterVisible.update(n=>!n)}onFilterOKEvent(){let p=this.generalLedgerFilterForm.value,{from:e,to:n}=p,i=ht(p,["from","to"]),r={categoryID:i.categoryID.length?i.categoryID:null,ContactID:i.ContactID.length?i.ContactID:null,OutletID:i.OutletID.length?i.OutletID:null,listAccountID:i.listAccountID,from:e.toISOString().split("T")[0]+"T00:00:00",to:n.toISOString().split("T")[0]+"T00:00:00"};this.dialogFilterVisible.update(_=>!_),this.store.updateFilter(r)}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(je(n=>this.customerSuggestions.set(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-report-general-ledger"]],features:[J([pt])],decls:1,vars:1,consts:[["item",""],[3,"pageTitle","isFilterable","isInitDialogFilterVisible"],[3,"filterEmitted","filterOKEmitted","pageTitle","isFilterable","isInitDialogFilterVisible"],["ngProjectAs","action-button",5,["action-button"]],[1,"btn","btn-outline-secondary","rounded"],[1,"btn","btn-primary","rounded"],["ngProjectAs","content",5,["content"]],[3,"items","scrollHeight"],["src","assets/images/empty-data.svg","alt","No data available",1,"w-100",2,"height","calc(100vh - 150px)"],["ngProjectAs","filter",5,["filter"]],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","OutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","categoryID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],[1,"table","table-bordered"],["scope","col"],["scope","col",1,"text-end"],["colspan","7",1,"text-end"],[1,"text-end"],["colspan","4"],[1,"flex","items-center","gap-2"]],template:function(n,i){n&1&&u(0,io,38,23,"app-main-panel",1),n&2&&re(i.store?0:-1)},dependencies:[Se,Z,pe,At,ve,be,Te,Ge,ui,Ne,Qe,He,Ce,Ie,vi,bi,_e,me,U,ce,de,ue,Oe,ee,yi,hi],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var no={data:{},filter:{EntityID:["62C3B7A9-D41C-4615-8F43-572D8FE4778B"],CashierID:null,Text:null,from:"2021-09-01T00:00:00",to:"2021-10-20T00:00:00"},loader:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},ct=he(ye(no),fe(t=>({totalCOGS:B(()=>t.data().data.cogs.reduce((l,e)=>l+e.Amount,0)),totalRevenue:B(()=>t.data().data.revenue.reduce((l,e)=>l+e.amount,0)),totalExpense:B(()=>t.data().data.expense.reduce((l,e)=>l+e.Amount,0))})),xe(t=>{let l=V(te);return{updateFilter(n){z(t,i=>k(I({},i),{filter:I(I({},i.filter),n)}))},getLoader:Y(Q(q(()=>l.getIncomeStatementLoader().pipe(W({next:n=>{z(t,i=>k(I({},i),{loader:n}))},error:n=>{console.error(n)}}))))),getIncomeStatement:Y(Q(xt(300),q(n=>l.getIncomeStatement(n).pipe(W({next:i=>{z(t,r=>k(I({},r),{data:i}))},error:i=>{console.error(i)}})))))}}),ge({onInit:t=>{t.getLoader(),t.getIncomeStatement(t.filter)}}));var mt=()=>({"min-width":"50rem"});function oo(t,l){t&1&&(a(0,"tr")(1,"th"),c(2,"Code"),o(),a(3,"th"),c(4,"Name"),o(),a(5,"th",17),c(6,"Total"),o()())}function ao(t,l){if(t&1&&(a(0,"tr")(1,"td",18),c(2),o(),a(3,"td",19),c(4),o(),a(5,"td",17),c(6),O(7,"number"),o()()),t&2){let e=l.$implicit;s(2),f(e.code),s(2),f(e.name),s(2),f(E(7,3,e.amount))}}function ro(t,l){if(t&1&&(a(0,"tr")(1,"td",20),c(2,"Total Asset"),o(),a(3,"td",21),c(4),O(5,"number"),o()()),t&2){let e=d(2);s(4),M(" ",E(5,1,e.store.totalRevenue())," ")}}function so(t,l){t&1&&(a(0,"tr")(1,"td",22),c(2),o()()),t&2&&(s(2),M(" ","No data available"," "))}function po(t,l){t&1&&(a(0,"tr")(1,"th",18),c(2,"Code"),o(),a(3,"th",19),c(4,"Name"),o(),a(5,"th",17),c(6,"Total"),o()())}function co(t,l){if(t&1&&(a(0,"tr")(1,"td"),c(2),o(),a(3,"td"),c(4),o(),a(5,"td",17),c(6),O(7,"number"),o()()),t&2){let e=l.$implicit;s(2),f(e.Code),s(2),f(e.Name),s(2),f(E(7,3,e.Amount))}}function mo(t,l){if(t&1&&(a(0,"tr")(1,"td",23),c(2,"Total Liability"),o(),a(3,"td",21),c(4),O(5,"number"),o()()),t&2){let e=d(2);s(4),M(" ",E(5,1,e.store.totalExpense())," ")}}function uo(t,l){t&1&&(a(0,"tr")(1,"td",22),c(2),o()()),t&2&&(s(2),M(" ","No data available"," "))}function _o(t,l){t&1&&(a(0,"tr")(1,"th"),c(2,"Code"),o(),a(3,"th"),c(4,"Name"),o(),a(5,"th",24),c(6,"Total"),o()())}function ho(t,l){if(t&1&&(a(0,"tr")(1,"td",18),c(2),o(),a(3,"td",19),c(4),o(),a(5,"td",17),c(6),O(7,"number"),o()()),t&2){let e=l.$implicit;s(2),f(e.Code),s(2),f(e.Name),s(2),M(" ",E(7,3,e.Amount)," ")}}function fo(t,l){if(t&1&&(a(0,"tr")(1,"td",23),c(2,"Total Equity"),o(),C(3,"td",21),o(),a(4,"tr")(5,"td",23),c(6," Total Liability + Equity "),o(),a(7,"td",21),c(8),O(9,"number"),o()()),t&2){let e=d(2);s(8),M(" ",E(9,1,e.store.totalCOGS())," ")}}function go(t,l){t&1&&(a(0,"tr")(1,"td",22),c(2),o()()),t&2&&(s(2),M(" ","No data available"," "))}function xo(t,l){if(t&1&&(g(0,14),a(1,"p-card")(2,"div",15)(3,"h4"),c(4,"Revenue"),o(),a(5,"p-table",16),u(6,oo,7,0,"ng-template",null,0,h)(8,ao,8,5,"ng-template",null,1,h),c(10," <"),u(11,ro,6,3,"ng-template",null,2,h)(13,so,3,1,"ng-template",null,3,h),o(),a(15,"h4"),c(16,"Expense"),o(),a(17,"p-table",16),u(18,po,7,0,"ng-template",null,0,h)(20,co,8,5,"ng-template",null,1,h),c(22," <"),u(23,mo,6,3,"ng-template",null,2,h)(25,uo,3,1,"ng-template",null,3,h),o(),a(27,"h4"),c(28,"COGS"),o(),a(29,"p-table",16),u(30,_o,7,0,"ng-template",null,0,h)(32,ho,8,5,"ng-template",null,1,h),c(34," <"),u(35,fo,10,3,"ng-template",null,2,h)(37,go,3,1,"ng-template",null,3,h),o()()(),x()),t&2){let e=d();s(5),m("value",e.store.data().data.revenue)("tableStyle",$(6,mt)),s(12),m("value",e.store.data().data.expense)("tableStyle",$(7,mt)),s(12),m("value",e.store.data().data.cogs)("tableStyle",$(8,mt))}}var Vi=(()=>{class t{constructor(){this.store=V(ct),this.fb=V($t)}ngOnInit(){this.generateForm()}onSearch(e){this.store.updateFilter(k(I({},this.store.filter()),{Text:e}))}generateForm(){this.formFilter=this.fb.group({EntityID:this.fb.control([]),CashierID:this.fb.control(""),Text:this.fb.control(""),from:this.fb.control(new Date),to:this.fb.control(new Date)})}onFilterOK(){let e=this.formFilter.getRawValue(),n=Object.entries(e).reduce((i,[r,p])=>(p instanceof Date?i[r]=p.toISOString():i[r]=p,i),{});this.store.updateFilter(I(I({},this.store.filter()),n)),console.log(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-report-income-statement"]],features:[J([ct])],decls:21,vars:9,consts:[["header",""],["body",""],["footer",""],["emptymessage",""],[3,"searchEmitted","filterOKEmitted","isFilterable","pageTitle","isSearchableInput"],["ngProjectAs","content",5,["content"],4,"ngIf"],["ngProjectAs","filter",5,["filter"]],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","EntityID","filterBy","value","appendTo","body","display","chip","optionLabel","value","optionValue","key","placeholder","Select an Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","CashierID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select a cashier",3,"options"],["formControlName","from","styleClass","w-100","appendTo","body"],["formControlName","to","styleClass","w-100","appendTo","body"],["ngProjectAs","content",5,["content"]],[1,"d-flex","flex-column",2,"gap","2rem"],[3,"value","tableStyle"],[1,"text-end"],[2,"width","10%"],[2,"min-width","10%"],["colspan","2 ",1,"fw-semibold"],[1,"text-end","fw-semibold"],["colspan","3",1,""],["colspan","2",1,"fw-semibold"],[1,"text-end",2,"min-width","10%"]],template:function(n,i){n&1&&(g(0),a(1,"app-main-panel",4),T("searchEmitted",function(p){return i.onSearch(p)})("filterOKEmitted",function(){return i.onFilterOK()}),u(2,xo,39,9,"ng-container",5),g(3,6),a(4,"form",7)(5,"div",8)(6,"label",9),c(7,"Outlet"),o(),C(8,"p-multiselect",10),o(),a(9,"div",8)(10,"label",9),c(11,"Cashier"),o(),C(12,"p-select",11),o(),a(13,"div",8)(14,"label",9),c(15,"From"),o(),C(16,"p-datepicker",12),o(),a(17,"div",8)(18,"label",9),c(19,"To"),o(),C(20,"p-datepicker",13),o()(),x(),o(),x()),n&2&&(s(),m("isFilterable",!0)("pageTitle",i.store.data().pageTitle)("isSearchableInput",!0),s(),m("ngIf",i.store.data()&&i.store.data().data),s(2),m("formGroup",i.formFilter),s(4),m("virtualScroll",!0)("virtualScrollItemSize",50)("options",i.store.loader().options.outlets),s(4),m("options",i.store.loader().options.outlets))},dependencies:[Se,Z,ie,pe,Qe,He,Ce,Ie,_e,me,U,ce,de,ue,Oe,ee,ve,be,Te,qe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var dt=ft(Si());var yo={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,dt.default)().format("YYYY-MM-DD"),listOutletParam:[]}},ut=he(ye(yo),fe(t=>({totalAsset:B(()=>t.data().asset.reduce((l,e)=>l+ +e.amount,0)),totalLiability:B(()=>t.data().liability.reduce((l,e)=>l+ +e.amount,0)),totalEquity:B(()=>t.data().equity.reduce((l,e)=>l+ +e.amount,0))})),xe(t=>{let l=V(te),e={updateFilter:n=>{z(t,i=>k(I({},i),{filter:n}))},fetchBalanceSheet:Y(Q(Ae(()=>{let n=t.filter();return Object.entries(n).every(([i,r])=>r!=null&&r!=="")}),q(n=>l.getBalanceSheet(n).pipe(W({next:i=>{z(t,r=>k(I({},r),{data:i}))},error:i=>{console.error(i)}}))),yt(1))),fetchLoader:Y(Q(q(()=>l.getBalanceSheetLoader().pipe(W({next:n=>{z(t,i=>k(I({},i),{metadata:n,filter:{date:(0,dt.default)(n.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:n=>{console.error(n)}})))))};return e}),ge(t=>({onInit:()=>{t.fetchLoader()}})));var Mi=ft(Si());var _t=()=>({"min-width":"50rem"});function So(t,l){t&1&&(a(0,"tr")(1,"th"),c(2,"Code"),o(),a(3,"th"),c(4,"Asset"),o(),a(5,"th",16),c(6,"Total"),o()())}function bo(t,l){if(t&1&&(a(0,"tr")(1,"td",17),c(2),o(),a(3,"td",18),c(4),o(),a(5,"td",16),c(6),O(7,"number"),o()()),t&2){let e=l.$implicit;s(2),f(e.code),s(2),f(e.categoryName),s(2),f(E(7,3,e.amount))}}function vo(t,l){if(t&1&&(a(0,"tr")(1,"td",19),c(2,"Total Asset"),o(),a(3,"td",20),c(4),O(5,"number"),o()()),t&2){let e=d(2);s(4),M(" ",E(5,1,e.store.totalAsset())," ")}}function Io(t,l){t&1&&(a(0,"tr")(1,"td",21),c(2),o()()),t&2&&(s(2),M(" ","No data available"," "))}function Co(t,l){t&1&&(a(0,"tr")(1,"th",17),c(2,"Code"),o(),a(3,"th",18),c(4,"Liability"),o(),a(5,"th",16),c(6,"Total"),o()())}function To(t,l){if(t&1&&(a(0,"tr")(1,"td"),c(2),o(),a(3,"td"),c(4),o(),a(5,"td",16),c(6),O(7,"number"),o()()),t&2){let e=l.$implicit;s(2),f(e.code),s(2),f(e.categoryName),s(2),f(E(7,3,e.amount))}}function Oo(t,l){if(t&1&&(a(0,"tr")(1,"td",22),c(2,"Total Liability"),o(),a(3,"td",20),c(4),O(5,"number"),o()()),t&2){let e=d(2);s(4),M(" ",E(5,1,e.store.totalLiability())," ")}}function wo(t,l){t&1&&(a(0,"tr")(1,"td",21),c(2),o()()),t&2&&(s(2),M(" ","No data available"," "))}function Eo(t,l){t&1&&(a(0,"tr")(1,"th"),c(2,"Code"),o(),a(3,"th"),c(4,"Equity"),o(),a(5,"th",23),c(6,"Total"),o()())}function Fo(t,l){if(t&1&&(a(0,"tr")(1,"td",17),c(2),o(),a(3,"td",18),c(4),o(),a(5,"td",16),c(6),O(7,"number"),o()()),t&2){let e=l.$implicit;s(2),f(e.code),s(2),f(e.name),s(2),M(" ",E(7,3,e.amount)," ")}}function Vo(t,l){if(t&1&&(a(0,"tr")(1,"td",22),c(2,"Total Equity"),o(),a(3,"td",20),c(4),O(5,"number"),o()(),a(6,"tr")(7,"td",22),c(8,"Total Liability + Equity"),o(),a(9,"td",20),c(10),O(11,"number"),o()()),t&2){let e=d(2);s(4),M(" ",E(5,2,e.store.totalEquity())," "),s(6),M(" ",E(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function Mo(t,l){t&1&&(a(0,"tr")(1,"td",21),c(2),o()()),t&2&&(s(2),M(" ","No data available"," "))}function ko(t,l){if(t&1&&(a(0,"div",24)(1,"div"),c(2),o()()),t&2){let e=l.$implicit;s(2),f(e.value)}}function Lo(t,l){if(t&1){let e=R();a(0,"app-main-panel",6),T("filterOKEmitted",function(){b(e);let i=d();return v(i.onFilterOKEvent())}),g(1,7),a(2,"p-card")(3,"div",8)(4,"p-table",9),u(5,So,7,0,"ng-template",null,0,h)(7,bo,8,5,"ng-template",null,1,h),c(9," <"),u(10,vo,6,3,"ng-template",null,2,h)(12,Io,3,1,"ng-template",null,3,h),o(),a(14,"p-table",9),u(15,Co,7,0,"ng-template",null,0,h)(17,To,8,5,"ng-template",null,1,h),c(19," <"),u(20,Oo,6,3,"ng-template",null,2,h)(22,wo,3,1,"ng-template",null,3,h),o(),a(24,"p-table",9),u(25,Eo,7,0,"ng-template",null,0,h)(27,Fo,8,5,"ng-template",null,1,h),c(29," <"),u(30,Vo,12,6,"ng-template",null,2,h)(32,Mo,3,1,"ng-template",null,3,h),o()()(),x(),g(34,10),a(35,"form",11)(36,"div",12)(37,"label",13),c(38,"Outlet"),o(),a(39,"p-multiselect",14),u(40,ko,3,1,"ng-template",null,4,h),o()(),a(42,"div",12)(43,"label",13),c(44,"From"),o(),C(45,"p-datepicker",15),o()(),x(),o()}if(t&2){let e=d();m("pageTitle",e.store.data().pageTitle)("isFilterable",!0),s(4),m("value",e.store.data().asset)("tableStyle",$(14,_t)),s(10),m("value",e.store.data().liability)("tableStyle",$(15,_t)),s(10),m("value",e.store.data().equity)("tableStyle",$(16,_t)),s(11),m("formGroup",e.filterForm),s(4),m("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets),s(6),m("iconDisplay","input")("showIcon",!0)}}var ki=(()=>{class t{constructor(){this.store=V(ut)}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new ze({date:new G(new Date),outletID:new G([])})}onFilterOKEvent(){let{date:e,outletID:n}=this.filterForm.value;this.store.updateFilter({date:(0,Mi.default)(e).format("YYYY-MM-DD"),listOutletParam:n})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-report-balance-sheet"]],features:[J([ut])],decls:1,vars:1,consts:[["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"pageTitle","isFilterable","filterOKEmitted",4,"ngIf"],[3,"filterOKEmitted","pageTitle","isFilterable"],["ngProjectAs","content",5,["content"]],[1,"d-flex","flex-column",2,"gap","2rem"],[3,"value","tableStyle"],["ngProjectAs","filter",5,["filter"]],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"text-end"],[2,"width","10%"],[2,"min-width","10%"],["colspan","2 ",1,"fw-semibold"],[1,"text-end","fw-semibold"],["colspan","3",1,""],["colspan","2",1,"fw-semibold"],[1,"text-end",2,"min-width","10%"],[1,"flex","items-center","gap-2"]],template:function(n,i){n&1&&u(0,Lo,46,17,"app-main-panel",5),n&2&&m("ngIf",i.store.data())},dependencies:[Se,Z,ie,pe,Te,qe,ve,be,Ne,_e,me,U,ce,de,ue,Oe,ee,Ce,Ie],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Li=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(n,i){n&1&&(a(0,"p"),c(1,"report-comparative-balance works!"),o(),c(2,`
|
|
230
|
+
,
|
|
231
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Di=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(n,i){n&1&&(a(0,"p"),c(1,"report-cash-flow works!"),o(),c(2,`
|
|
232
|
+
,
|
|
233
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ri=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(n,i){n&1&&(a(0,"p"),c(1,"report-trial-balance works!"),o(),c(2,`
|
|
234
|
+
,
|
|
235
|
+
`))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Yr=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Fi},{path:"income-statement",component:Vi},{path:"balance-sheet",component:ki},{path:"comparative-balance",component:Li},{path:"trial-balance",component:Ri},{path:"cash-flow",component:Di}]}];export{Yr as REPORTS_ROUTES};
|