dealposbooks 5.37.0 → 5.39.0

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.
Files changed (121) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/chunk-2AMMZHXQ.js +1 -0
  3. package/{chunk-NA4MKIZU.js → chunk-2TOKALFG.js} +1 -1
  4. package/{chunk-PW4323VJ.js → chunk-4TW5N3R5.js} +1 -1
  5. package/{chunk-RFVPTZXE.js → chunk-4V6IW37R.js} +1 -1
  6. package/{chunk-HY2XAZAH.js → chunk-5AD3KAHO.js} +1 -1
  7. package/{chunk-DE2473W5.js → chunk-5B3BG43K.js} +1 -1
  8. package/{chunk-CIAGHK5E.js → chunk-5YZ63KSK.js} +1 -1
  9. package/{chunk-NU5466MQ.js → chunk-5ZZHL43J.js} +1 -1
  10. package/{chunk-MKHLXGRK.js → chunk-64BNX23H.js} +1 -1
  11. package/{chunk-3ZQVIJMU.js → chunk-64ODJHGP.js} +1 -1
  12. package/chunk-6OQBIS63.js +1 -0
  13. package/{chunk-QURNJXUA.js → chunk-6WODKZWN.js} +1 -1
  14. package/{chunk-5ZHMTEH2.js → chunk-76AI32N3.js} +1 -1
  15. package/{chunk-C2YOJOPY.js → chunk-76QGHXHT.js} +1 -1
  16. package/chunk-7CUSFSFC.js +1 -0
  17. package/chunk-7IC4BZ6J.js +7 -0
  18. package/chunk-7U7SHAIK.js +160 -0
  19. package/{chunk-XSOIDS3T.js → chunk-7UB4B7A7.js} +1 -1
  20. package/chunk-7VGK2GTV.js +1 -0
  21. package/{chunk-BPQN4YWQ.js → chunk-A256BFGM.js} +1 -1
  22. package/{chunk-4XCMTFFH.js → chunk-A7LRQMLA.js} +1 -1
  23. package/{chunk-5O73U6P7.js → chunk-AE7ZMPUT.js} +1 -1
  24. package/{chunk-52KGCI4Z.js → chunk-B5RBLDGE.js} +1 -1
  25. package/{chunk-6T64IBSG.js → chunk-BPNHJZKZ.js} +1 -1
  26. package/{chunk-SW4SZC2K.js → chunk-BRCJWPEZ.js} +1 -1
  27. package/{chunk-6WHZBKFW.js → chunk-BSFKUGYO.js} +1 -1
  28. package/{chunk-KOOYDMFN.js → chunk-C4C5DIN2.js} +1 -1
  29. package/{chunk-M3QTXO6B.js → chunk-CDXFHUDN.js} +1 -1
  30. package/{chunk-O74X6MMZ.js → chunk-CTKWFS7F.js} +1 -1
  31. package/{chunk-47CQRQIP.js → chunk-DKXXL4X2.js} +1 -1
  32. package/{chunk-GFOJNJA4.js → chunk-DOKG43W6.js} +1 -1
  33. package/{chunk-GC5XCOU5.js → chunk-DUEYD2IO.js} +1 -1
  34. package/{chunk-U63X7T6B.js → chunk-E34SEVZS.js} +1 -1
  35. package/{chunk-D36YVGIB.js → chunk-EALZUKSJ.js} +1 -1
  36. package/chunk-ECNRIDLC.js +1 -0
  37. package/{chunk-53IBQLYQ.js → chunk-ENOCDIVK.js} +2 -2
  38. package/chunk-ENZMSDHX.js +129 -0
  39. package/{chunk-WA6V7JTY.js → chunk-GLOECGB7.js} +1 -1
  40. package/{chunk-LINWFXJ3.js → chunk-H4KAOKJR.js} +1 -1
  41. package/chunk-HMSYKSI6.js +7 -0
  42. package/{chunk-BPEU23J5.js → chunk-I4WD74I3.js} +1 -1
  43. package/chunk-I5YQOGRZ.js +1 -0
  44. package/{chunk-UC564LFH.js → chunk-IGWW72HN.js} +1 -1
  45. package/chunk-IQRU2J36.js +1 -0
  46. package/chunk-ISQYSQRX.js +1 -0
  47. package/{chunk-E4CGQOU2.js → chunk-IXOM3GPT.js} +2 -2
  48. package/{chunk-ITHIPR7R.js → chunk-JYELXDHY.js} +1 -1
  49. package/{chunk-5PURHPFH.js → chunk-KEMY45CH.js} +1 -1
  50. package/{chunk-TXK2JSMZ.js → chunk-KIFK2NRF.js} +1 -1
  51. package/{chunk-4TQOJBQI.js → chunk-KKZF4RQM.js} +1 -1
  52. package/{chunk-LLPDH7S2.js → chunk-LNN3TWH2.js} +1 -1
  53. package/{chunk-ZHINPNBR.js → chunk-MASZROSE.js} +1 -1
  54. package/{chunk-DGTLYGTT.js → chunk-MDNCQKUT.js} +1 -1
  55. package/{chunk-LVCF2WZK.js → chunk-MS6ARTHK.js} +1 -1
  56. package/{chunk-WX27CT5F.js → chunk-MUFRLGLG.js} +1 -1
  57. package/{chunk-J7WAS2GN.js → chunk-MWMAH2KO.js} +1 -1
  58. package/{chunk-76YIDIBJ.js → chunk-N5W3C4LG.js} +1 -1
  59. package/{chunk-FTFZVOHA.js → chunk-NHXCR55X.js} +1 -1
  60. package/{chunk-FKPQJ7WA.js → chunk-NI4XE6XQ.js} +1 -1
  61. package/{chunk-J3DB5YKJ.js → chunk-NTCCFR6P.js} +1 -1
  62. package/{chunk-AIUDSJBN.js → chunk-NTTAMN4Q.js} +1 -1
  63. package/chunk-NU6SYZAJ.js +1 -0
  64. package/{chunk-R4A7YDIK.js → chunk-OPTFBHGE.js} +1 -1
  65. package/{chunk-HQVGMXBL.js → chunk-OXAHPW2L.js} +1 -1
  66. package/{chunk-NNNW5RBV.js → chunk-P6CXZZTO.js} +1 -1
  67. package/{chunk-PEETBOXD.js → chunk-PQSFZ3JI.js} +1 -1
  68. package/{chunk-UIVUT5SZ.js → chunk-PS4MFIBX.js} +1 -1
  69. package/{chunk-2N5X42BK.js → chunk-PTEBSIFB.js} +1 -1
  70. package/{chunk-YGTWGZKQ.js → chunk-PWPKBPEC.js} +1 -1
  71. package/{chunk-QLLOZ2EX.js → chunk-R3JWL2J6.js} +1 -1
  72. package/{chunk-7FYHB5GM.js → chunk-RNPNKSFR.js} +1 -1
  73. package/{chunk-WH54KYS2.js → chunk-RWTIBNIV.js} +2 -2
  74. package/{chunk-U2ZDSR5F.js → chunk-RZI2OI6V.js} +1 -1
  75. package/{chunk-UR7ARZNH.js → chunk-S2Q6V4IV.js} +1 -1
  76. package/{chunk-MH6BKDDC.js → chunk-SUBNNB3F.js} +1 -1
  77. package/{chunk-Q2WT6OSY.js → chunk-T4TFJFL4.js} +1 -1
  78. package/{chunk-IRBPX3RE.js → chunk-TAJINBQY.js} +1 -1
  79. package/{chunk-YK5QR3KS.js → chunk-TKBMWC2X.js} +1 -1
  80. package/{chunk-DKORHYIR.js → chunk-TWSGVX4G.js} +1 -1
  81. package/chunk-TYG6AINI.js +1 -0
  82. package/{chunk-3PRXAPAT.js → chunk-UA264VBG.js} +1 -1
  83. package/{chunk-HK6C7EEJ.js → chunk-UTG7WNU7.js} +1 -1
  84. package/{chunk-5JHWAF7R.js → chunk-UVIJU7TM.js} +1 -1
  85. package/{chunk-3CUYHDDG.js → chunk-V6VS3FMZ.js} +1 -1
  86. package/{chunk-Q4TUK2EO.js → chunk-VDXMHX3J.js} +1 -1
  87. package/{chunk-PBVHXSHH.js → chunk-VU532YE3.js} +2 -2
  88. package/{chunk-NIT7TJ5P.js → chunk-W6IKDXXT.js} +1 -1
  89. package/{chunk-J6SZIJEO.js → chunk-W7Q3NWBG.js} +1 -1
  90. package/{chunk-DYSMAYNT.js → chunk-WNA57NZF.js} +1 -1
  91. package/chunk-WPMY4QOF.js +1 -0
  92. package/{chunk-PGXO6FU3.js → chunk-WZXOEZ5J.js} +1 -1
  93. package/{chunk-AMMK4U54.js → chunk-X3JXYOSR.js} +1 -1
  94. package/{chunk-3OWUTEG2.js → chunk-XAGCP2AA.js} +1 -1
  95. package/{chunk-PAOPYGNU.js → chunk-Y52DQWVS.js} +1 -1
  96. package/{chunk-GRIGOPOO.js → chunk-YO2YHPV5.js} +1 -1
  97. package/{chunk-CEN7UP6Q.js → chunk-YS5U5SXP.js} +1 -1
  98. package/{chunk-LZSOBSQV.js → chunk-ZA6OJTWT.js} +1 -1
  99. package/{chunk-B5GNFDMG.js → chunk-ZBVMLQ5Q.js} +1 -1
  100. package/{chunk-4GUP7433.js → chunk-ZGVGNFVA.js} +1 -1
  101. package/{chunk-WAVSEPCG.js → chunk-ZUBQV3YF.js} +1 -1
  102. package/{chunk-65OCC4LR.js → chunk-ZVRETQOI.js} +1 -1
  103. package/index.html +3 -3
  104. package/{main-4IGHB4KX.js → main-KU6QKT2F.js} +1 -1
  105. package/package.json +1 -1
  106. package/{styles-ERZ5377A.css → styles-6G3XMEOP.css} +1 -1
  107. package/chunk-2EIZ76HE.js +0 -1
  108. package/chunk-3EH6PALU.js +0 -1
  109. package/chunk-7WAZPKOK.js +0 -1
  110. package/chunk-C7CIUOM5.js +0 -1
  111. package/chunk-D4VGEGUS.js +0 -7
  112. package/chunk-FWT56GXG.js +0 -1
  113. package/chunk-JPAZOYCQ.js +0 -129
  114. package/chunk-KEW6IMWJ.js +0 -7
  115. package/chunk-LEE5F54T.js +0 -1
  116. package/chunk-QJ76JVYM.js +0 -1
  117. package/chunk-RVJEKOIL.js +0 -1
  118. package/chunk-S74D2EJ3.js +0 -1
  119. package/chunk-SHTUKWGG.js +0 -160
  120. package/chunk-UTEKWFDP.js +0 -1
  121. package/chunk-WU3WCPYE.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as un}from"./chunk-GRIGOPOO.js";import{a as qn}from"./chunk-PAOPYGNU.js";import{a as Xn}from"./chunk-CEN7UP6Q.js";import"./chunk-4TQOJBQI.js";import{a as Fn}from"./chunk-6WHZBKFW.js";import{a as $n}from"./chunk-ZHINPNBR.js";import{b as Wn}from"./chunk-U2ZDSR5F.js";import"./chunk-4XCMTFFH.js";import{a as Vn}from"./chunk-J3DB5YKJ.js";import{a as Dn}from"./chunk-NIT7TJ5P.js";import"./chunk-5JHWAF7R.js";import"./chunk-D36YVGIB.js";import{b as jn}from"./chunk-UIVUT5SZ.js";import{b as Yn,c as Ti}from"./chunk-DYSMAYNT.js";import{b as Gn}from"./chunk-WX27CT5F.js";import{c as Mn}from"./chunk-C2YOJOPY.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Si,w as Nn,x as oi}from"./chunk-DGTLYGTT.js";import"./chunk-RFVPTZXE.js";import{Da as si,G as Sn,Ia as Ln,J as Tn,Ja as kn,K as Pn,Ka as zn,La as ri,Ma as ge,P as Ie,Q as _t,R as Nt,S as En,Ua as Je,b as mn,e as fn,f as gn,h as hn,ia as On,j as vn,k as wn,ma as In,p as bn,q as yn,r as _n,s as Cn,w as ni,x as xn}from"./chunk-FTFZVOHA.js";import{b as rn,d as an,e as on,f as ln,l as Ht}from"./chunk-GFOJNJA4.js";import{a as cn,c as Mi}from"./chunk-RVJEKOIL.js";import{a as pn}from"./chunk-QLLOZ2EX.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{G as sn,h as ct,j as ii,k as Ft,l as Bt,m as Rt,n as tn,r as we,s as Oe,y as nn}from"./chunk-PBVHXSHH.js";import{$c as en,Aa as Wi,Ab as Ke,Bc as Ze,Ca as qi,Cb as X,Cc as Ji,Da as xe,Dc as pe,Ea as wt,Ec as Be,Fc as ti,Ga as Ee,Jb as Z,Ka as Ui,Kb as $,Mb as Ki,Mc as Dt,Nb as Qt,Nc as $t,Ob as ye,Pb as Kt,Pc as dt,Qb as Zt,Sb as Jt,Tb as ei,Ub as G,V as Xi,Vb as N,Wb as te,Xb as at,Yb as ot,Yc as pt,Zb as Me,Zc as Vt,_b as ve,aa as Yi,ba as Ye,bb as bi,ca as je,cb as qe,dc as ie,ec as H,fc as bt,gb as R,gc as lt,ha as ae,jc as fe,kc as yt,lc as ne,mb as Ue,mc as se,oa as ji,pa as U,pc as Lt,qa as Q,qc as le,rb as Ut,rc as Fe,s as wi,sc as yi,t as Gi,ta as Ae,tc as Zi,vc as kt,wb as he,wc as zt,xb as Qe,xc as At,za as We,zb as Qi}from"./chunk-D4VGEGUS.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
1
+ import{a as un}from"./chunk-YO2YHPV5.js";import{a as qn}from"./chunk-Y52DQWVS.js";import{a as Xn}from"./chunk-YS5U5SXP.js";import"./chunk-KKZF4RQM.js";import{a as Fn}from"./chunk-BSFKUGYO.js";import{a as $n}from"./chunk-MASZROSE.js";import{b as Wn}from"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import{a as Vn}from"./chunk-NTCCFR6P.js";import{a as Dn}from"./chunk-W6IKDXXT.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{b as jn}from"./chunk-PS4MFIBX.js";import{b as Yn,c as Ti}from"./chunk-WNA57NZF.js";import{b as Gn}from"./chunk-MUFRLGLG.js";import{c as Mn}from"./chunk-76QGHXHT.js";import{a as et,c as An,f as ai,o as Bn,p as Rn,t as Hn,u as Si,w as Nn,x as oi}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{Da as si,G as Sn,Ia as Ln,J as Tn,Ja as kn,K as Pn,Ka as zn,La as ri,Ma as ge,P as Ie,Q as _t,R as Nt,S as En,Ua as Je,b as mn,e as fn,f as gn,h as hn,ia as On,j as vn,k as wn,ma as In,p as bn,q as yn,r as _n,s as Cn,w as ni,x as xn}from"./chunk-NHXCR55X.js";import{b as rn,d as an,e as on,f as ln,l as Ht}from"./chunk-DOKG43W6.js";import{a as cn,c as Mi}from"./chunk-I5YQOGRZ.js";import{a as pn}from"./chunk-R3JWL2J6.js";import{c as dn,d as _i,f as Ci,h as xi}from"./chunk-F2X3VGZZ.js";import{H as sn,h as ct,j as ii,k as Ft,l as Bt,m as Rt,n as tn,s as we,t as Oe,z as nn}from"./chunk-VU532YE3.js";import{Aa as Wi,Ab as Ke,Bc as Ze,Ca as qi,Cb as X,Cc as Ji,Da as xe,Dc as pe,Ea as wt,Ec as Be,Fc as ti,Ga as Ee,Jb as Z,Ka as Ui,Kb as $,Mb as Ki,Mc as Dt,Nb as Qt,Nc as $t,Ob as ye,Pb as Kt,Qb as Zt,Qc as dt,Sb as Jt,Tb as ei,Ub as G,V as Xi,Vb as N,Wb as te,Xb as at,Yb as ot,Zb as Me,Zc as pt,_b as ve,_c as Vt,aa as Yi,ad as en,ba as Ye,bb as bi,ca as je,cb as qe,dc as ie,ec as H,fc as bt,gb as R,gc as lt,ha as ae,jc as fe,kc as yt,lc as ne,mb as Ue,mc as se,oa as ji,pa as U,pc as Lt,qa as Q,qc as le,rb as Ut,rc as Fe,s as wi,sc as yi,t as Gi,ta as Ae,tc as Zi,vc as kt,wb as he,wc as zt,xb as Qe,xc as At,za as We,zb as Qi}from"./chunk-7IC4BZ6J.js";import{a as me,b as It}from"./chunk-YQFG5XE2.js";var sr=["*"],rr=({dt:i})=>`
2
2
  .p-inputgroup,
3
3
  .p-inputgroup .p-floatlabel,
4
4
  .p-inputgroup .p-iftalabel {
@@ -325,4 +325,4 @@ import{a as un}from"./chunk-GRIGOPOO.js";import{a as qn}from"./chunk-PAOPYGNU.js
325
325
  ${qs(this.passedParams)?`
326
326
  <div part="scrollbar" class="swiper-scrollbar"></div>
327
327
  `:""}
328
- `),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;let{params:t,passedParams:n}=Bi(this);this.swiperParams=t,this.passedParams=n,delete this.swiperParams.init,this.render(),this.swiper=new st(this.shadowRoot.querySelector(".swiper"),It(me(me({},t.virtual?{}:{observer:!0}),t),{touchEventsTarget:"container",onAny:function(s){s==="observerUpdate"&&e.calcSlideSlots();let r=t.eventsPrefix?`${t.eventsPrefix}${s.toLowerCase()}`:s.toLowerCase();for(var a=arguments.length,d=new Array(a>1?a-1:0),u=1;u<a;u++)d[u-1]=arguments[u];let c=new CustomEvent(r,{detail:d,bubbles:s!=="hashChange",cancelable:!0});e.dispatchEvent(c)}}))}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){let{params:n,passedParams:s}=Bi(this,e,t);this.passedParams=s,this.swiperParams=n,!(this.swiper&&this.swiper.params[e]===t)&&Us(me(me(me({swiper:this.swiper,passedParams:this.passedParams,changedParams:[Tt(e)]},e==="navigation"&&s[e]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{}),e==="pagination"&&s[e]?{paginationEl:".swiper-pagination"}:{}),e==="scrollbar"&&s[e]?{scrollbarEl:".swiper-scrollbar"}:{}))}attributeChangedCallback(e,t,n){this.swiper&&this.swiper.initialized&&(t==="true"&&n===null&&(n=!1),this.updateSwiperOnPropChange(e,n))}static get observedAttributes(){return St.filter(t=>t.includes("_")).map(t=>t.replace(/[A-Z]/g,n=>`-${n}`).replace("_","").toLowerCase())}};St.forEach(i=>{i!=="init"&&(i=i.replace("_",""),Object.defineProperty(ui.prototype,i,{configurable:!0,get(){return(this.passedParams||{})[i]},set(e){this.passedParams||(this.passedParams={}),this.passedParams[i]=e,this.swiper&&this.swiper.initialized&&this.updateSwiperOnPropChange(i,e)}}))});var Hi=class extends Js{constructor(){super(),this.attachShadow({mode:"open"})}render(){let e=this.lazy||this.getAttribute("lazy")===""||this.getAttribute("lazy")==="true";if(er(this.shadowRoot,bl),this.shadowRoot.appendChild(document.createElement("slot")),e){let t=document.createElement("div");t.classList.add("swiper-lazy-preloader"),t.part.add("preloader"),this.shadowRoot.appendChild(t)}}initialize(){this.render()}connectedCallback(){this.swiperLoopMoveDOM||this.initialize()}},tr=()=>{typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",ui),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",Hi))};typeof window<"u"&&(window.SwiperElementRegisterParams=i=>{St.push(...i)});function yl(i,e){if(i&1&&(G(0,"swiper-slide")(1,"div")(2,"a",1),te(3,"img",2),N()(),G(4,"a",3),le(5),N(),G(6,"p",4),le(7),N()()),i&2){let t=e.$implicit;R(2),$("href",t.href,qe),R(),$("src",t.imgSrc,qe),R(),$("href",t.href,qe),R(),Fe(t.title),R(2),Fe(t.description)}}tr();var ir=(()=>{class i{constructor(){this.elementRef=ae(wt),this.newsList=xe([]),this.colorTheme=xe()}ngOnInit(){this.applyThemeColors()}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--swiper-primary-color",this.colorTheme())}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-news-swiper"]],inputs:{newsList:[1,"newsList"],colorTheme:[1,"colorTheme"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false"],["target","_blank",3,"href"],[1,"border-0","rounded-1","swiper-image",3,"src"],["target","_blank",1,"h5","swiper-text",3,"href"],[1,"mb-0"]],template:function(n,s){n&1&&(G(0,"swiper-container",0),Jt(1,yl,8,5,"swiper-slide",null,Zt),N()),n&2&&(R(),ei(s.newsList()))},dependencies:[we],styles:["[_nghost-%COMP%]{--swiper-primary-color: #89b03e}[_nghost-%COMP%] swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: var(--swiper-primary-color);--swiper-pagination-color: var(--swiper-primary-color);--swiper-pagination-bottom: 0px;margin-top:30px;height:265px}[_nghost-%COMP%] img.swiper-image[_ngcontent-%COMP%]{width:252px;height:152px;margin-bottom:16px}[_nghost-%COMP%] .swiper-text[_ngcontent-%COMP%]{color:var(--swiper-primary-color);font-weight:700}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem!important}"]})}}return i})();var _l=(i,e)=>({"fa-eye":i,"fa-eye-slash":e});function Cl(i,e){if(i&1&&(G(0,"option",25),le(1),N()),i&2){let t=e.$implicit;$("value",t),R(),Fe(t)}}function xl(i,e){if(i&1){let t=ve();G(0,"div",15)(1,"h2",16),le(2),N(),G(3,"small",17),le(4),N()(),G(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",22),N()(),G(11,"input",23,0),At("ngModelChange",function(s){U(t);let r=H();return zt(r.subdomain,s)||(r.subdomain=s),Q(s)}),N(),G(13,"div")(14,"select",24),At("ngModelChange",function(s){U(t);let r=H();return zt(r.domain,s)||(r.domain=s),Q(s)}),Jt(15,Cl,2,2,"option",25,Zt),N()()(),G(17,"div",26)(18,"button",27),ie("click",function(){U(t);let s=H();return Q(s.onNextState())}),le(19," Next "),N()()()()}if(i&2){let t=H();R(2),Fe(t.title()),R(2),yi(" ",t.subtitle()," "),R(7),kt("ngModel",t.subdomain),R(3),kt("ngModel",t.domain),R(),ei(t.domains())}}function Ml(i,e){i&1&&(G(0,"span",30),le(1,"to"),N())}function Sl(i,e){if(i&1){let t=ve();G(0,"h6",31)(1,"div",42),le(2),N(),G(3,"i",43),ie("click",function(){U(t);let s=H(2);return Q(s.onEditDomain())}),N()()}if(i&2){let t=H(2);R(2),Zi("(",t.subdomain(),"",t.domain(),")")}}function Tl(i,e){if(i&1){let t=ve();G(0,"div",28)(1,"h3",29)(2,"span"),le(3,"Sign in"),N(),X(4,Ml,2,0,"span",30),N(),X(5,Sl,4,2,"h6",31),N(),G(6,"form",32)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",33),N()(),G(11,"input",34,1),At("ngModelChange",function(s){U(t);let r=H();return zt(r.username,s)||(r.username=s),Q(s)}),N()(),G(13,"div",35)(14,"div",21)(15,"span"),te(16,"i",36),N()(),G(17,"input",37,2),At("ngModelChange",function(s){U(t);let r=H();return zt(r.password,s)||(r.password=s),Q(s)}),N(),G(19,"span",38)(20,"i",39),ie("click",function(){U(t);let s=H();return Q(s.onHidePassowrd())}),N()()(),G(21,"div",40)(22,"button",41),ie("click",function(){U(t);let s=H();return Q(s.onLogin())}),le(23," Log in "),N()()()}if(i&2){let t=H();R(4),Kt(t.hasSubdomainInput()?4:-1),R(),Kt(t.hasSubdomainInput()?5:-1),R(6),kt("ngModel",t.username),R(6),$("type",t.passwordVisible()?"text":"password"),kt("ngModel",t.password),R(3),$("ngClass",Be(6,_l,t.passwordVisible()===!1,t.passwordVisible()))}}var nr=(()=>{class i{constructor(){this.elementRef=ae(wt),this.toastr=ae(pn),this.changelogUrl=xe(),this.version=xe(),this.domains=xe([".dealpos.co.id",".dealpos.net",".dealpos.com",".dealpos.app"]),this.news=xe([]),this.colorTheme=xe("#1a73e8"),this.subtitle=xe("Your Subtitle Here"),this.title=xe("Your title here"),this.loginChange=qi({alias:"onLoginChange"}),this.hasSubdomainInput=xe(!0),this.loginState=Ee("FORM_DOMAIN"),this.subdomain=Ut(null),this.domain=Ut(".dealpos.app"),this.username=Ut(null),this.password=Ee(null),this.passwordVisible=Ee(!1)}ngOnInit(){document.body.classList.add("login-body"),this.applyThemeColors(),this.initLoginState()}initLoginState(){this.hasSubdomainInput()?this.loginState.set("FORM_DOMAIN"):this.loginState.set("FORM_LOGIN")}onNextState(){if(!this.subdomain()){this.toastr.error("Subdomain is required","Warning");return}this.loginState.set("FORM_LOGIN")}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onHidePassowrd(){this.passwordVisible.set(!this.passwordVisible())}onLogin(){let t=this.subdomain()?.trim(),n={username:this.username(),password:this.password()};this.hasSubdomainInput()&&(n=me({domain:this.domain(),subdomain:t},n)),this.loginChange.emit(n)}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--login-primary-color",this.colorTheme())}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login-ui"]],inputs:{changelogUrl:[1,"changelogUrl"],version:[1,"version"],domains:[1,"domains"],news:[1,"news"],colorTheme:[1,"colorTheme"],subtitle:[1,"subtitle"],title:[1,"title"],hasSubdomainInput:[1,"hasSubdomainInput"],subdomain:[1,"subdomain"],domain:[1,"domain"],username:[1,"username"]},outputs:{loginChange:"onLoginChange",subdomain:"subdomainChange",domain:"domainChange",username:"usernameChange"},decls:17,vars:5,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"text-center"],[3,"colorTheme","newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"me-2","mb-0"],[1,"text-secondary-emphasis","fst-italic","opacity-75",2,"font-size","11px"],[2,"margin-top","50px"],[1,"form-block"],[1,"input-group","input-group-lg"],[1,"input-group-text","border-end-0","bg-white",2,"width","52px","border-bottom-left-radius","8px","border-top-left-radius","8px"],[1,"fa-solid","fa-cloud","text-dark","input-icon"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1","fs-4","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","rounded-start-0","domain-option",2,"height","58px","border-bottom-right-radius","8px","border-top-right-radius","8px",3,"ngModelChange","ngModel"],[3,"value"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-theme","btn-block","w-100",2,"height","44.6px","border-radius","7px",3,"click"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"fw-normal","mb-0","me-2"],[1,"ms-2"],[1,"fw-normal","mb-0","d-flex","align-items-center"],[2,"margin-top","46px"],[1,"fas","fa-user","fa-lg","text-dark","input-icon"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],[1,"input-group","input-group-lg",2,"margin-top","16px"],[1,"fas","fa-key","fa-lg","input-icon","text-dark"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","autofocus","","name","password","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","border-end-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end","bg-white"],[1,"input-icon","fa",3,"click","ngClass"],[1,"w-100",2,"margin-top","16px"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-theme","btn-block","w-100",3,"click"],[1,"text-theme","me-2"],["title","Edit Store Address",1,"fa-solid","fa-edit","text-theme","pointer",2,"font-size","0.875rem",3,"click"]],template:function(n,s){n&1&&(G(0,"div",3)(1,"div",4)(2,"div",5)(3,"h2",6),le(4,"New Features"),N(),te(5,"app-news-swiper",7),N(),G(6,"div",8),X(7,xl,20,4)(8,Tl,24,9),N()(),G(9,"div",9)(10,"span",10),le(11,"powered by :"),N(),te(12,"a",11),N(),G(13,"div",12)(14,"a",13),le(15),te(16,"i",14),N()()()),n&2&&(R(5),$("colorTheme",s.colorTheme())("newsList",s.news()),R(2),Kt(s.loginState()=="FORM_DOMAIN"?7:8),R(7),$("href",s.changelogUrl(),qe),R(),yi("version ",s.version(),""))},dependencies:[we,ct,ni,wn,yn,_n,mn,bn,fn,gn,Cn,vn,hn,ir],styles:["[_nghost-%COMP%]{--login-primary-color: red}[_nghost-%COMP%] .mt-0[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%] .mb-0[_ngcontent-%COMP%]{margin-bottom:0!important}[_nghost-%COMP%] .ms-0[_ngcontent-%COMP%]{margin-left:0!important}[_nghost-%COMP%] .me-0[_ngcontent-%COMP%]{margin-right:0!important}[_nghost-%COMP%] .mx-0[_ngcontent-%COMP%]{margin-left:0!important;margin-right:0!important}[_nghost-%COMP%] .my-0[_ngcontent-%COMP%]{margin-top:0!important;margin-bottom:0!important}[_nghost-%COMP%] .m-0[_ngcontent-%COMP%]{margin:0!important}[_nghost-%COMP%] .pt-0[_ngcontent-%COMP%]{padding-top:0!important}[_nghost-%COMP%] .pb-0[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] .ps-0[_ngcontent-%COMP%]{padding-left:0!important}[_nghost-%COMP%] .pe-0[_ngcontent-%COMP%]{padding-right:0!important}[_nghost-%COMP%] .px-0[_ngcontent-%COMP%]{padding-left:0!important;padding-right:0!important}[_nghost-%COMP%] .py-0[_ngcontent-%COMP%]{padding-top:0!important;padding-bottom:0!important}[_nghost-%COMP%] .p-0[_ngcontent-%COMP%]{padding:0!important}[_nghost-%COMP%] .gap-0[_ngcontent-%COMP%]{gap:0!important}[_nghost-%COMP%] .mt-1[_ngcontent-%COMP%]{margin-top:.125rem!important}[_nghost-%COMP%] .mb-1[_ngcontent-%COMP%]{margin-bottom:.125rem!important}[_nghost-%COMP%] .ms-1[_ngcontent-%COMP%]{margin-left:.125rem!important}[_nghost-%COMP%] .me-1[_ngcontent-%COMP%]{margin-right:.125rem!important}[_nghost-%COMP%] .mx-1[_ngcontent-%COMP%]{margin-left:.125rem!important;margin-right:.125rem!important}[_nghost-%COMP%] .my-1[_ngcontent-%COMP%]{margin-top:.125rem!important;margin-bottom:.125rem!important}[_nghost-%COMP%] .m-1[_ngcontent-%COMP%]{margin:.125rem!important}[_nghost-%COMP%] .pt-1[_ngcontent-%COMP%]{padding-top:.125rem!important}[_nghost-%COMP%] .pb-1[_ngcontent-%COMP%]{padding-bottom:.125rem!important}[_nghost-%COMP%] .ps-1[_ngcontent-%COMP%]{padding-left:.125rem!important}[_nghost-%COMP%] .pe-1[_ngcontent-%COMP%]{padding-right:.125rem!important}[_nghost-%COMP%] .px-1[_ngcontent-%COMP%]{padding-left:.125rem!important;padding-right:.125rem!important}[_nghost-%COMP%] .py-1[_ngcontent-%COMP%]{padding-top:.125rem!important;padding-bottom:.125rem!important}[_nghost-%COMP%] .p-1[_ngcontent-%COMP%]{padding:.125rem!important}[_nghost-%COMP%] .gap-1[_ngcontent-%COMP%]{gap:.125rem!important}[_nghost-%COMP%] .mt-2[_ngcontent-%COMP%]{margin-top:.25rem!important}[_nghost-%COMP%] .mb-2[_ngcontent-%COMP%]{margin-bottom:.25rem!important}[_nghost-%COMP%] .ms-2[_ngcontent-%COMP%]{margin-left:.25rem!important}[_nghost-%COMP%] .me-2[_ngcontent-%COMP%]{margin-right:.25rem!important}[_nghost-%COMP%] .mx-2[_ngcontent-%COMP%]{margin-left:.25rem!important;margin-right:.25rem!important}[_nghost-%COMP%] .my-2[_ngcontent-%COMP%]{margin-top:.25rem!important;margin-bottom:.25rem!important}[_nghost-%COMP%] .m-2[_ngcontent-%COMP%]{margin:.25rem!important}[_nghost-%COMP%] .pt-2[_ngcontent-%COMP%]{padding-top:.25rem!important}[_nghost-%COMP%] .pb-2[_ngcontent-%COMP%]{padding-bottom:.25rem!important}[_nghost-%COMP%] .ps-2[_ngcontent-%COMP%]{padding-left:.25rem!important}[_nghost-%COMP%] .pe-2[_ngcontent-%COMP%]{padding-right:.25rem!important}[_nghost-%COMP%] .px-2[_ngcontent-%COMP%]{padding-left:.25rem!important;padding-right:.25rem!important}[_nghost-%COMP%] .py-2[_ngcontent-%COMP%]{padding-top:.25rem!important;padding-bottom:.25rem!important}[_nghost-%COMP%] .p-2[_ngcontent-%COMP%]{padding:.25rem!important}[_nghost-%COMP%] .gap-2[_ngcontent-%COMP%]{gap:.25rem!important}[_nghost-%COMP%] .mt-3[_ngcontent-%COMP%]{margin-top:.375rem!important}[_nghost-%COMP%] .mb-3[_ngcontent-%COMP%]{margin-bottom:.375rem!important}[_nghost-%COMP%] .ms-3[_ngcontent-%COMP%]{margin-left:.375rem!important}[_nghost-%COMP%] .me-3[_ngcontent-%COMP%]{margin-right:.375rem!important}[_nghost-%COMP%] .mx-3[_ngcontent-%COMP%]{margin-left:.375rem!important;margin-right:.375rem!important}[_nghost-%COMP%] .my-3[_ngcontent-%COMP%]{margin-top:.375rem!important;margin-bottom:.375rem!important}[_nghost-%COMP%] .m-3[_ngcontent-%COMP%]{margin:.375rem!important}[_nghost-%COMP%] .pt-3[_ngcontent-%COMP%]{padding-top:.375rem!important}[_nghost-%COMP%] .pb-3[_ngcontent-%COMP%]{padding-bottom:.375rem!important}[_nghost-%COMP%] .ps-3[_ngcontent-%COMP%]{padding-left:.375rem!important}[_nghost-%COMP%] .pe-3[_ngcontent-%COMP%]{padding-right:.375rem!important}[_nghost-%COMP%] .px-3[_ngcontent-%COMP%]{padding-left:.375rem!important;padding-right:.375rem!important}[_nghost-%COMP%] .py-3[_ngcontent-%COMP%]{padding-top:.375rem!important;padding-bottom:.375rem!important}[_nghost-%COMP%] .p-3[_ngcontent-%COMP%]{padding:.375rem!important}[_nghost-%COMP%] .gap-3[_ngcontent-%COMP%]{gap:.375rem!important}[_nghost-%COMP%] .mt-4[_ngcontent-%COMP%]{margin-top:.5rem!important}[_nghost-%COMP%] .mb-4[_ngcontent-%COMP%]{margin-bottom:.5rem!important}[_nghost-%COMP%] .ms-4[_ngcontent-%COMP%]{margin-left:.5rem!important}[_nghost-%COMP%] .me-4[_ngcontent-%COMP%]{margin-right:.5rem!important}[_nghost-%COMP%] .mx-4[_ngcontent-%COMP%]{margin-left:.5rem!important;margin-right:.5rem!important}[_nghost-%COMP%] .my-4[_ngcontent-%COMP%]{margin-top:.5rem!important;margin-bottom:.5rem!important}[_nghost-%COMP%] .m-4[_ngcontent-%COMP%]{margin:.5rem!important}[_nghost-%COMP%] .pt-4[_ngcontent-%COMP%]{padding-top:.5rem!important}[_nghost-%COMP%] .pb-4[_ngcontent-%COMP%]{padding-bottom:.5rem!important}[_nghost-%COMP%] .ps-4[_ngcontent-%COMP%]{padding-left:.5rem!important}[_nghost-%COMP%] .pe-4[_ngcontent-%COMP%]{padding-right:.5rem!important}[_nghost-%COMP%] .px-4[_ngcontent-%COMP%]{padding-left:.5rem!important;padding-right:.5rem!important}[_nghost-%COMP%] .py-4[_ngcontent-%COMP%]{padding-top:.5rem!important;padding-bottom:.5rem!important}[_nghost-%COMP%] .p-4[_ngcontent-%COMP%]{padding:.5rem!important}[_nghost-%COMP%] .gap-4[_ngcontent-%COMP%]{gap:.5rem!important}[_nghost-%COMP%] .mt-5[_ngcontent-%COMP%]{margin-top:.625rem!important}[_nghost-%COMP%] .mb-5[_ngcontent-%COMP%]{margin-bottom:.625rem!important}[_nghost-%COMP%] .ms-5[_ngcontent-%COMP%]{margin-left:.625rem!important}[_nghost-%COMP%] .me-5[_ngcontent-%COMP%]{margin-right:.625rem!important}[_nghost-%COMP%] .mx-5[_ngcontent-%COMP%]{margin-left:.625rem!important;margin-right:.625rem!important}[_nghost-%COMP%] .my-5[_ngcontent-%COMP%]{margin-top:.625rem!important;margin-bottom:.625rem!important}[_nghost-%COMP%] .m-5[_ngcontent-%COMP%]{margin:.625rem!important}[_nghost-%COMP%] .pt-5[_ngcontent-%COMP%]{padding-top:.625rem!important}[_nghost-%COMP%] .pb-5[_ngcontent-%COMP%]{padding-bottom:.625rem!important}[_nghost-%COMP%] .ps-5[_ngcontent-%COMP%]{padding-left:.625rem!important}[_nghost-%COMP%] .pe-5[_ngcontent-%COMP%]{padding-right:.625rem!important}[_nghost-%COMP%] .px-5[_ngcontent-%COMP%]{padding-left:.625rem!important;padding-right:.625rem!important}[_nghost-%COMP%] .py-5[_ngcontent-%COMP%]{padding-top:.625rem!important;padding-bottom:.625rem!important}[_nghost-%COMP%] .p-5[_ngcontent-%COMP%]{padding:.625rem!important}[_nghost-%COMP%] .gap-5[_ngcontent-%COMP%]{gap:.625rem!important}[_nghost-%COMP%] .mt-6[_ngcontent-%COMP%]{margin-top:.75rem!important}[_nghost-%COMP%] .mb-6[_ngcontent-%COMP%]{margin-bottom:.75rem!important}[_nghost-%COMP%] .ms-6[_ngcontent-%COMP%]{margin-left:.75rem!important}[_nghost-%COMP%] .me-6[_ngcontent-%COMP%]{margin-right:.75rem!important}[_nghost-%COMP%] .mx-6[_ngcontent-%COMP%]{margin-left:.75rem!important;margin-right:.75rem!important}[_nghost-%COMP%] .my-6[_ngcontent-%COMP%]{margin-top:.75rem!important;margin-bottom:.75rem!important}[_nghost-%COMP%] .m-6[_ngcontent-%COMP%]{margin:.75rem!important}[_nghost-%COMP%] .pt-6[_ngcontent-%COMP%]{padding-top:.75rem!important}[_nghost-%COMP%] .pb-6[_ngcontent-%COMP%]{padding-bottom:.75rem!important}[_nghost-%COMP%] .ps-6[_ngcontent-%COMP%]{padding-left:.75rem!important}[_nghost-%COMP%] .pe-6[_ngcontent-%COMP%]{padding-right:.75rem!important}[_nghost-%COMP%] .px-6[_ngcontent-%COMP%]{padding-left:.75rem!important;padding-right:.75rem!important}[_nghost-%COMP%] .py-6[_ngcontent-%COMP%]{padding-top:.75rem!important;padding-bottom:.75rem!important}[_nghost-%COMP%] .p-6[_ngcontent-%COMP%]{padding:.75rem!important}[_nghost-%COMP%] .gap-6[_ngcontent-%COMP%]{gap:.75rem!important}[_nghost-%COMP%] .mt-7[_ngcontent-%COMP%]{margin-top:.875rem!important}[_nghost-%COMP%] .mb-7[_ngcontent-%COMP%]{margin-bottom:.875rem!important}[_nghost-%COMP%] .ms-7[_ngcontent-%COMP%]{margin-left:.875rem!important}[_nghost-%COMP%] .me-7[_ngcontent-%COMP%]{margin-right:.875rem!important}[_nghost-%COMP%] .mx-7[_ngcontent-%COMP%]{margin-left:.875rem!important;margin-right:.875rem!important}[_nghost-%COMP%] .my-7[_ngcontent-%COMP%]{margin-top:.875rem!important;margin-bottom:.875rem!important}[_nghost-%COMP%] .m-7[_ngcontent-%COMP%]{margin:.875rem!important}[_nghost-%COMP%] .pt-7[_ngcontent-%COMP%]{padding-top:.875rem!important}[_nghost-%COMP%] .pb-7[_ngcontent-%COMP%]{padding-bottom:.875rem!important}[_nghost-%COMP%] .ps-7[_ngcontent-%COMP%]{padding-left:.875rem!important}[_nghost-%COMP%] .pe-7[_ngcontent-%COMP%]{padding-right:.875rem!important}[_nghost-%COMP%] .px-7[_ngcontent-%COMP%]{padding-left:.875rem!important;padding-right:.875rem!important}[_nghost-%COMP%] .py-7[_ngcontent-%COMP%]{padding-top:.875rem!important;padding-bottom:.875rem!important}[_nghost-%COMP%] .p-7[_ngcontent-%COMP%]{padding:.875rem!important}[_nghost-%COMP%] .gap-7[_ngcontent-%COMP%]{gap:.875rem!important}[_nghost-%COMP%] .mt-8[_ngcontent-%COMP%]{margin-top:1rem!important}[_nghost-%COMP%] .mb-8[_ngcontent-%COMP%]{margin-bottom:1rem!important}[_nghost-%COMP%] .ms-8[_ngcontent-%COMP%]{margin-left:1rem!important}[_nghost-%COMP%] .me-8[_ngcontent-%COMP%]{margin-right:1rem!important}[_nghost-%COMP%] .mx-8[_ngcontent-%COMP%]{margin-left:1rem!important;margin-right:1rem!important}[_nghost-%COMP%] .my-8[_ngcontent-%COMP%]{margin-top:1rem!important;margin-bottom:1rem!important}[_nghost-%COMP%] .m-8[_ngcontent-%COMP%]{margin:1rem!important}[_nghost-%COMP%] .pt-8[_ngcontent-%COMP%]{padding-top:1rem!important}[_nghost-%COMP%] .pb-8[_ngcontent-%COMP%]{padding-bottom:1rem!important}[_nghost-%COMP%] .ps-8[_ngcontent-%COMP%]{padding-left:1rem!important}[_nghost-%COMP%] .pe-8[_ngcontent-%COMP%]{padding-right:1rem!important}[_nghost-%COMP%] .px-8[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}[_nghost-%COMP%] .py-8[_ngcontent-%COMP%]{padding-top:1rem!important;padding-bottom:1rem!important}[_nghost-%COMP%] .p-8[_ngcontent-%COMP%]{padding:1rem!important}[_nghost-%COMP%] .gap-8[_ngcontent-%COMP%]{gap:1rem!important}[_nghost-%COMP%] .mt-9[_ngcontent-%COMP%]{margin-top:1.125rem!important}[_nghost-%COMP%] .mb-9[_ngcontent-%COMP%]{margin-bottom:1.125rem!important}[_nghost-%COMP%] .ms-9[_ngcontent-%COMP%]{margin-left:1.125rem!important}[_nghost-%COMP%] .me-9[_ngcontent-%COMP%]{margin-right:1.125rem!important}[_nghost-%COMP%] .mx-9[_ngcontent-%COMP%]{margin-left:1.125rem!important;margin-right:1.125rem!important}[_nghost-%COMP%] .my-9[_ngcontent-%COMP%]{margin-top:1.125rem!important;margin-bottom:1.125rem!important}[_nghost-%COMP%] .m-9[_ngcontent-%COMP%]{margin:1.125rem!important}[_nghost-%COMP%] .pt-9[_ngcontent-%COMP%]{padding-top:1.125rem!important}[_nghost-%COMP%] .pb-9[_ngcontent-%COMP%]{padding-bottom:1.125rem!important}[_nghost-%COMP%] .ps-9[_ngcontent-%COMP%]{padding-left:1.125rem!important}[_nghost-%COMP%] .pe-9[_ngcontent-%COMP%]{padding-right:1.125rem!important}[_nghost-%COMP%] .px-9[_ngcontent-%COMP%]{padding-left:1.125rem!important;padding-right:1.125rem!important}[_nghost-%COMP%] .py-9[_ngcontent-%COMP%]{padding-top:1.125rem!important;padding-bottom:1.125rem!important}[_nghost-%COMP%] .p-9[_ngcontent-%COMP%]{padding:1.125rem!important}[_nghost-%COMP%] .gap-9[_ngcontent-%COMP%]{gap:1.125rem!important}[_nghost-%COMP%] .mt-10[_ngcontent-%COMP%]{margin-top:1.25rem!important}[_nghost-%COMP%] .mb-10[_ngcontent-%COMP%]{margin-bottom:1.25rem!important}[_nghost-%COMP%] .ms-10[_ngcontent-%COMP%]{margin-left:1.25rem!important}[_nghost-%COMP%] .me-10[_ngcontent-%COMP%]{margin-right:1.25rem!important}[_nghost-%COMP%] .mx-10[_ngcontent-%COMP%]{margin-left:1.25rem!important;margin-right:1.25rem!important}[_nghost-%COMP%] .my-10[_ngcontent-%COMP%]{margin-top:1.25rem!important;margin-bottom:1.25rem!important}[_nghost-%COMP%] .m-10[_ngcontent-%COMP%]{margin:1.25rem!important}[_nghost-%COMP%] .pt-10[_ngcontent-%COMP%]{padding-top:1.25rem!important}[_nghost-%COMP%] .pb-10[_ngcontent-%COMP%]{padding-bottom:1.25rem!important}[_nghost-%COMP%] .ps-10[_ngcontent-%COMP%]{padding-left:1.25rem!important}[_nghost-%COMP%] .pe-10[_ngcontent-%COMP%]{padding-right:1.25rem!important}[_nghost-%COMP%] .px-10[_ngcontent-%COMP%]{padding-left:1.25rem!important;padding-right:1.25rem!important}[_nghost-%COMP%] .py-10[_ngcontent-%COMP%]{padding-top:1.25rem!important;padding-bottom:1.25rem!important}[_nghost-%COMP%] .p-10[_ngcontent-%COMP%]{padding:1.25rem!important}[_nghost-%COMP%] .gap-10[_ngcontent-%COMP%]{gap:1.25rem!important}[_nghost-%COMP%] .mt-11[_ngcontent-%COMP%]{margin-top:1.375rem!important}[_nghost-%COMP%] .mb-11[_ngcontent-%COMP%]{margin-bottom:1.375rem!important}[_nghost-%COMP%] .ms-11[_ngcontent-%COMP%]{margin-left:1.375rem!important}[_nghost-%COMP%] .me-11[_ngcontent-%COMP%]{margin-right:1.375rem!important}[_nghost-%COMP%] .mx-11[_ngcontent-%COMP%]{margin-left:1.375rem!important;margin-right:1.375rem!important}[_nghost-%COMP%] .my-11[_ngcontent-%COMP%]{margin-top:1.375rem!important;margin-bottom:1.375rem!important}[_nghost-%COMP%] .m-11[_ngcontent-%COMP%]{margin:1.375rem!important}[_nghost-%COMP%] .pt-11[_ngcontent-%COMP%]{padding-top:1.375rem!important}[_nghost-%COMP%] .pb-11[_ngcontent-%COMP%]{padding-bottom:1.375rem!important}[_nghost-%COMP%] .ps-11[_ngcontent-%COMP%]{padding-left:1.375rem!important}[_nghost-%COMP%] .pe-11[_ngcontent-%COMP%]{padding-right:1.375rem!important}[_nghost-%COMP%] .px-11[_ngcontent-%COMP%]{padding-left:1.375rem!important;padding-right:1.375rem!important}[_nghost-%COMP%] .py-11[_ngcontent-%COMP%]{padding-top:1.375rem!important;padding-bottom:1.375rem!important}[_nghost-%COMP%] .p-11[_ngcontent-%COMP%]{padding:1.375rem!important}[_nghost-%COMP%] .gap-11[_ngcontent-%COMP%]{gap:1.375rem!important}[_nghost-%COMP%] .mt-12[_ngcontent-%COMP%]{margin-top:1.5rem!important}[_nghost-%COMP%] .mb-12[_ngcontent-%COMP%]{margin-bottom:1.5rem!important}[_nghost-%COMP%] .ms-12[_ngcontent-%COMP%]{margin-left:1.5rem!important}[_nghost-%COMP%] .me-12[_ngcontent-%COMP%]{margin-right:1.5rem!important}[_nghost-%COMP%] .mx-12[_ngcontent-%COMP%]{margin-left:1.5rem!important;margin-right:1.5rem!important}[_nghost-%COMP%] .my-12[_ngcontent-%COMP%]{margin-top:1.5rem!important;margin-bottom:1.5rem!important}[_nghost-%COMP%] .m-12[_ngcontent-%COMP%]{margin:1.5rem!important}[_nghost-%COMP%] .pt-12[_ngcontent-%COMP%]{padding-top:1.5rem!important}[_nghost-%COMP%] .pb-12[_ngcontent-%COMP%]{padding-bottom:1.5rem!important}[_nghost-%COMP%] .ps-12[_ngcontent-%COMP%]{padding-left:1.5rem!important}[_nghost-%COMP%] .pe-12[_ngcontent-%COMP%]{padding-right:1.5rem!important}[_nghost-%COMP%] .px-12[_ngcontent-%COMP%]{padding-left:1.5rem!important;padding-right:1.5rem!important}[_nghost-%COMP%] .py-12[_ngcontent-%COMP%]{padding-top:1.5rem!important;padding-bottom:1.5rem!important}[_nghost-%COMP%] .p-12[_ngcontent-%COMP%]{padding:1.5rem!important}[_nghost-%COMP%] .gap-12[_ngcontent-%COMP%]{gap:1.5rem!important}[_nghost-%COMP%] h1[_ngcontent-%COMP%], [_nghost-%COMP%] .h1[_ngcontent-%COMP%]{font-size:1.375rem;font-weight:500!important}[_nghost-%COMP%] h2[_ngcontent-%COMP%], [_nghost-%COMP%] .h2[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500!important}[_nghost-%COMP%] h3[_ngcontent-%COMP%], [_nghost-%COMP%] .h3[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:500!important}[_nghost-%COMP%] h4[_ngcontent-%COMP%], [_nghost-%COMP%] .h4[_ngcontent-%COMP%]{font-size:1rem;font-weight:500!important}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500!important}[_nghost-%COMP%] h6[_ngcontent-%COMP%], [_nghost-%COMP%] .h6[_ngcontent-%COMP%]{font-size:.75rem;font-weight:500!important}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px;min-height:370px}@media (max-width: 768px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:30px}}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{box-shadow:none;border-color:#dfe5ef!important}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid var(--login-primary-color);border-right:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:0 10px 10px 0}}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:15px!important}@media (max-width: 768px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-left:1px solid var(--login-primary-color);border-bottom:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:10px 0 0 10px}}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:fixed;bottom:1.25rem;left:1.25rem;margin-left:20px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}[_nghost-%COMP%] .version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:fixed;margin-right:18px}@media (max-width: 768px){[_nghost-%COMP%] .copyright[_ngcontent-%COMP%], [_nghost-%COMP%] .version[_ngcontent-%COMP%]{position:static;margin-top:10px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{justify-content:center}}[_nghost-%COMP%] div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}[_nghost-%COMP%] button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}[_nghost-%COMP%] .domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}[_nghost-%COMP%] .btn-theme[_ngcontent-%COMP%]{background-color:var(--login-primary-color)!important;color:#fff!important;font-size:14px;height:36.6px;border-radius:7px}[_nghost-%COMP%] .text-theme[_ngcontent-%COMP%]{color:var(--login-primary-color)!important}[_nghost-%COMP%] .input-icon[_ngcontent-%COMP%]{font-size:15px}"]})}}return i})();var em=(()=>{class i{constructor(){this.authService=ae(un),this.router=ae(an),this.httpService=ae(cn),this.appVersion=Mi.version,this.changelogUrl=Mi.changelogUrl,this.route=ae(rn),this.roleService=ae(Xn),this.subdomain=Ee(""),this.domain=Ee(""),this.username=Ee("")}ngOnInit(){this.initNews()}ngAfterViewInit(){this.subdomain.set(localStorage.getItem("AUTH_SUB_DOMAIN")||""),this.username.set(localStorage.getItem("AUTH_USERNAME")||""),this.domain.set(localStorage.getItem("AUTH_DOMAIN")||".dealpos.co.id")}initNews(){let t=new nn().set("fetch","children:books").set("sort","sortOrder:asc");this.news$=this.httpService.get("https://changelog.dealpos.app/","umbraco/delivery/api/v2/content",{params:t}).pipe(wi(n=>n.items.map(r=>r.properties)),Xi(1))}onLogin(t){let n={SubDomain:t.subdomain+t.domain,Username:t.username,Password:t.password};Gi([this.authService.login(n),this.route.queryParams.pipe(wi(s=>s.returnUrl||"/"))]).subscribe(s=>{let r=s[1];if(r=="/"){if(this.roleService.report.view){if(!this.roleService.coa.view){this.router.navigate(["/pages/journal/journal-entry"]);return}}else{this.router.navigate(["/pages/chart-of-account/account"]);return}this.router.navigate(["/pages/dashboard"])}else this.router.navigate([r])})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login"]],decls:2,vars:8,consts:[["colorTheme","#0a8754","title","DealPOS Accounting","subtitle","Streamline Your Accounting with Ease",3,"onLoginChange","news","subdomain","domain","username","version","changelogUrl"]],template:function(n,s){n&1&&(G(0,"app-login-ui",0),Dt(1,"async"),ie("onLoginChange",function(a){return s.onLogin(a)}),N()),n&2&&$("news",$t(1,6,s.news$))("subdomain",s.subdomain())("domain",s.domain())("username",s.username())("version",s.appVersion)("changelogUrl",s.changelogUrl)},dependencies:[we,tn,Ht,Mn,qn,xn,ni,Bn,Qn,Zn,oi,ss,Wn,jn,Gn,os,nr],encapsulation:2})}}return i})();export{em as LoginComponent};
328
+ `),this.shadowRoot.appendChild(t),this.rendered=!0}initialize(){var e=this;if(this.swiper&&this.swiper.initialized)return;let{params:t,passedParams:n}=Bi(this);this.swiperParams=t,this.passedParams=n,delete this.swiperParams.init,this.render(),this.swiper=new st(this.shadowRoot.querySelector(".swiper"),It(me(me({},t.virtual?{}:{observer:!0}),t),{touchEventsTarget:"container",onAny:function(s){s==="observerUpdate"&&e.calcSlideSlots();let r=t.eventsPrefix?`${t.eventsPrefix}${s.toLowerCase()}`:s.toLowerCase();for(var a=arguments.length,d=new Array(a>1?a-1:0),u=1;u<a;u++)d[u-1]=arguments[u];let c=new CustomEvent(r,{detail:d,bubbles:s!=="hashChange",cancelable:!0});e.dispatchEvent(c)}}))}connectedCallback(){this.swiper&&this.swiper.initialized&&this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.init===!1||this.getAttribute("init")==="false"||this.initialize()}disconnectedCallback(){this.nested&&this.closest("swiper-slide")&&this.closest("swiper-slide").swiperLoopMoveDOM||this.swiper&&this.swiper.destroy&&this.swiper.destroy()}updateSwiperOnPropChange(e,t){let{params:n,passedParams:s}=Bi(this,e,t);this.passedParams=s,this.swiperParams=n,!(this.swiper&&this.swiper.params[e]===t)&&Us(me(me(me({swiper:this.swiper,passedParams:this.passedParams,changedParams:[Tt(e)]},e==="navigation"&&s[e]?{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"}:{}),e==="pagination"&&s[e]?{paginationEl:".swiper-pagination"}:{}),e==="scrollbar"&&s[e]?{scrollbarEl:".swiper-scrollbar"}:{}))}attributeChangedCallback(e,t,n){this.swiper&&this.swiper.initialized&&(t==="true"&&n===null&&(n=!1),this.updateSwiperOnPropChange(e,n))}static get observedAttributes(){return St.filter(t=>t.includes("_")).map(t=>t.replace(/[A-Z]/g,n=>`-${n}`).replace("_","").toLowerCase())}};St.forEach(i=>{i!=="init"&&(i=i.replace("_",""),Object.defineProperty(ui.prototype,i,{configurable:!0,get(){return(this.passedParams||{})[i]},set(e){this.passedParams||(this.passedParams={}),this.passedParams[i]=e,this.swiper&&this.swiper.initialized&&this.updateSwiperOnPropChange(i,e)}}))});var Hi=class extends Js{constructor(){super(),this.attachShadow({mode:"open"})}render(){let e=this.lazy||this.getAttribute("lazy")===""||this.getAttribute("lazy")==="true";if(er(this.shadowRoot,bl),this.shadowRoot.appendChild(document.createElement("slot")),e){let t=document.createElement("div");t.classList.add("swiper-lazy-preloader"),t.part.add("preloader"),this.shadowRoot.appendChild(t)}}initialize(){this.render()}connectedCallback(){this.swiperLoopMoveDOM||this.initialize()}},tr=()=>{typeof window>"u"||(window.customElements.get("swiper-container")||window.customElements.define("swiper-container",ui),window.customElements.get("swiper-slide")||window.customElements.define("swiper-slide",Hi))};typeof window<"u"&&(window.SwiperElementRegisterParams=i=>{St.push(...i)});function yl(i,e){if(i&1&&(G(0,"swiper-slide")(1,"div")(2,"a",1),te(3,"img",2),N()(),G(4,"a",3),le(5),N(),G(6,"p",4),le(7),N()()),i&2){let t=e.$implicit;R(2),$("href",t.href,qe),R(),$("src",t.imgSrc,qe),R(),$("href",t.href,qe),R(),Fe(t.title),R(2),Fe(t.description)}}tr();var ir=(()=>{class i{constructor(){this.elementRef=ae(wt),this.newsList=xe([]),this.colorTheme=xe()}ngOnInit(){this.applyThemeColors()}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--swiper-primary-color",this.colorTheme())}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-news-swiper"]],inputs:{newsList:[1,"newsList"],colorTheme:[1,"colorTheme"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false"],["target","_blank",3,"href"],[1,"border-0","rounded-1","swiper-image",3,"src"],["target","_blank",1,"h5","swiper-text",3,"href"],[1,"mb-0"]],template:function(n,s){n&1&&(G(0,"swiper-container",0),Jt(1,yl,8,5,"swiper-slide",null,Zt),N()),n&2&&(R(),ei(s.newsList()))},dependencies:[we],styles:["[_nghost-%COMP%]{--swiper-primary-color: #89b03e}[_nghost-%COMP%] swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: var(--swiper-primary-color);--swiper-pagination-color: var(--swiper-primary-color);--swiper-pagination-bottom: 0px;margin-top:30px;height:265px}[_nghost-%COMP%] img.swiper-image[_ngcontent-%COMP%]{width:252px;height:152px;margin-bottom:16px}[_nghost-%COMP%] .swiper-text[_ngcontent-%COMP%]{color:var(--swiper-primary-color);font-weight:700}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem!important}"]})}}return i})();var _l=(i,e)=>({"fa-eye":i,"fa-eye-slash":e});function Cl(i,e){if(i&1&&(G(0,"option",25),le(1),N()),i&2){let t=e.$implicit;$("value",t),R(),Fe(t)}}function xl(i,e){if(i&1){let t=ve();G(0,"div",15)(1,"h2",16),le(2),N(),G(3,"small",17),le(4),N()(),G(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",22),N()(),G(11,"input",23,0),At("ngModelChange",function(s){U(t);let r=H();return zt(r.subdomain,s)||(r.subdomain=s),Q(s)}),N(),G(13,"div")(14,"select",24),At("ngModelChange",function(s){U(t);let r=H();return zt(r.domain,s)||(r.domain=s),Q(s)}),Jt(15,Cl,2,2,"option",25,Zt),N()()(),G(17,"div",26)(18,"button",27),ie("click",function(){U(t);let s=H();return Q(s.onNextState())}),le(19," Next "),N()()()()}if(i&2){let t=H();R(2),Fe(t.title()),R(2),yi(" ",t.subtitle()," "),R(7),kt("ngModel",t.subdomain),R(3),kt("ngModel",t.domain),R(),ei(t.domains())}}function Ml(i,e){i&1&&(G(0,"span",30),le(1,"to"),N())}function Sl(i,e){if(i&1){let t=ve();G(0,"h6",31)(1,"div",42),le(2),N(),G(3,"i",43),ie("click",function(){U(t);let s=H(2);return Q(s.onEditDomain())}),N()()}if(i&2){let t=H(2);R(2),Zi("(",t.subdomain(),"",t.domain(),")")}}function Tl(i,e){if(i&1){let t=ve();G(0,"div",28)(1,"h3",29)(2,"span"),le(3,"Sign in"),N(),X(4,Ml,2,0,"span",30),N(),X(5,Sl,4,2,"h6",31),N(),G(6,"form",32)(7,"div",20)(8,"div",21)(9,"span"),te(10,"i",33),N()(),G(11,"input",34,1),At("ngModelChange",function(s){U(t);let r=H();return zt(r.username,s)||(r.username=s),Q(s)}),N()(),G(13,"div",35)(14,"div",21)(15,"span"),te(16,"i",36),N()(),G(17,"input",37,2),At("ngModelChange",function(s){U(t);let r=H();return zt(r.password,s)||(r.password=s),Q(s)}),N(),G(19,"span",38)(20,"i",39),ie("click",function(){U(t);let s=H();return Q(s.onHidePassowrd())}),N()()(),G(21,"div",40)(22,"button",41),ie("click",function(){U(t);let s=H();return Q(s.onLogin())}),le(23," Log in "),N()()()}if(i&2){let t=H();R(4),Kt(t.hasSubdomainInput()?4:-1),R(),Kt(t.hasSubdomainInput()?5:-1),R(6),kt("ngModel",t.username),R(6),$("type",t.passwordVisible()?"text":"password"),kt("ngModel",t.password),R(3),$("ngClass",Be(6,_l,t.passwordVisible()===!1,t.passwordVisible()))}}var nr=(()=>{class i{constructor(){this.elementRef=ae(wt),this.toastr=ae(pn),this.changelogUrl=xe(),this.version=xe(),this.domains=xe([".dealpos.co.id",".dealpos.net",".dealpos.com",".dealpos.app"]),this.news=xe([]),this.colorTheme=xe("#1a73e8"),this.subtitle=xe("Your Subtitle Here"),this.title=xe("Your title here"),this.loginChange=qi({alias:"onLoginChange"}),this.hasSubdomainInput=xe(!0),this.loginState=Ee("FORM_DOMAIN"),this.subdomain=Ut(null),this.domain=Ut(".dealpos.app"),this.username=Ut(null),this.password=Ee(null),this.passwordVisible=Ee(!1)}ngOnInit(){document.body.classList.add("login-body"),this.applyThemeColors(),this.initLoginState()}initLoginState(){this.hasSubdomainInput()?this.loginState.set("FORM_DOMAIN"):this.loginState.set("FORM_LOGIN")}onNextState(){if(!this.subdomain()){this.toastr.error("Subdomain is required","Warning");return}this.loginState.set("FORM_LOGIN")}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onHidePassowrd(){this.passwordVisible.set(!this.passwordVisible())}onLogin(){let t=this.subdomain()?.trim(),n={username:this.username(),password:this.password()};this.hasSubdomainInput()&&(n=me({domain:this.domain(),subdomain:t},n)),this.loginChange.emit(n)}applyThemeColors(){this.elementRef.nativeElement.style.setProperty("--login-primary-color",this.colorTheme())}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login-ui"]],inputs:{changelogUrl:[1,"changelogUrl"],version:[1,"version"],domains:[1,"domains"],news:[1,"news"],colorTheme:[1,"colorTheme"],subtitle:[1,"subtitle"],title:[1,"title"],hasSubdomainInput:[1,"hasSubdomainInput"],subdomain:[1,"subdomain"],domain:[1,"domain"],username:[1,"username"]},outputs:{loginChange:"onLoginChange",subdomain:"subdomainChange",domain:"domainChange",username:"usernameChange"},decls:17,vars:5,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"text-center"],[3,"colorTheme","newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"me-2","mb-0"],[1,"text-secondary-emphasis","fst-italic","opacity-75",2,"font-size","11px"],[2,"margin-top","50px"],[1,"form-block"],[1,"input-group","input-group-lg"],[1,"input-group-text","border-end-0","bg-white",2,"width","52px","border-bottom-left-radius","8px","border-top-left-radius","8px"],[1,"fa-solid","fa-cloud","text-dark","input-icon"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1","fs-4","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","rounded-start-0","domain-option",2,"height","58px","border-bottom-right-radius","8px","border-top-right-radius","8px",3,"ngModelChange","ngModel"],[3,"value"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-theme","btn-block","w-100",2,"height","44.6px","border-radius","7px",3,"click"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"fw-normal","mb-0","me-2"],[1,"ms-2"],[1,"fw-normal","mb-0","d-flex","align-items-center"],[2,"margin-top","46px"],[1,"fas","fa-user","fa-lg","text-dark","input-icon"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","ngModel"],[1,"input-group","input-group-lg",2,"margin-top","16px"],[1,"fas","fa-key","fa-lg","input-icon","text-dark"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","autofocus","","name","password","autocomplete","off",1,"form-control","form-control-lg","rounded-end","border-start-0","border-end-0","ps-1","text-dark",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end","bg-white"],[1,"input-icon","fa",3,"click","ngClass"],[1,"w-100",2,"margin-top","16px"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-theme","btn-block","w-100",3,"click"],[1,"text-theme","me-2"],["title","Edit Store Address",1,"fa-solid","fa-edit","text-theme","pointer",2,"font-size","0.875rem",3,"click"]],template:function(n,s){n&1&&(G(0,"div",3)(1,"div",4)(2,"div",5)(3,"h2",6),le(4,"New Features"),N(),te(5,"app-news-swiper",7),N(),G(6,"div",8),X(7,xl,20,4)(8,Tl,24,9),N()(),G(9,"div",9)(10,"span",10),le(11,"powered by :"),N(),te(12,"a",11),N(),G(13,"div",12)(14,"a",13),le(15),te(16,"i",14),N()()()),n&2&&(R(5),$("colorTheme",s.colorTheme())("newsList",s.news()),R(2),Kt(s.loginState()=="FORM_DOMAIN"?7:8),R(7),$("href",s.changelogUrl(),qe),R(),yi("version ",s.version(),""))},dependencies:[we,ct,ni,wn,yn,_n,mn,bn,fn,gn,Cn,vn,hn,ir],styles:["[_nghost-%COMP%]{--login-primary-color: red}[_nghost-%COMP%] .mt-0[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%] .mb-0[_ngcontent-%COMP%]{margin-bottom:0!important}[_nghost-%COMP%] .ms-0[_ngcontent-%COMP%]{margin-left:0!important}[_nghost-%COMP%] .me-0[_ngcontent-%COMP%]{margin-right:0!important}[_nghost-%COMP%] .mx-0[_ngcontent-%COMP%]{margin-left:0!important;margin-right:0!important}[_nghost-%COMP%] .my-0[_ngcontent-%COMP%]{margin-top:0!important;margin-bottom:0!important}[_nghost-%COMP%] .m-0[_ngcontent-%COMP%]{margin:0!important}[_nghost-%COMP%] .pt-0[_ngcontent-%COMP%]{padding-top:0!important}[_nghost-%COMP%] .pb-0[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] .ps-0[_ngcontent-%COMP%]{padding-left:0!important}[_nghost-%COMP%] .pe-0[_ngcontent-%COMP%]{padding-right:0!important}[_nghost-%COMP%] .px-0[_ngcontent-%COMP%]{padding-left:0!important;padding-right:0!important}[_nghost-%COMP%] .py-0[_ngcontent-%COMP%]{padding-top:0!important;padding-bottom:0!important}[_nghost-%COMP%] .p-0[_ngcontent-%COMP%]{padding:0!important}[_nghost-%COMP%] .gap-0[_ngcontent-%COMP%]{gap:0!important}[_nghost-%COMP%] .mt-1[_ngcontent-%COMP%]{margin-top:.125rem!important}[_nghost-%COMP%] .mb-1[_ngcontent-%COMP%]{margin-bottom:.125rem!important}[_nghost-%COMP%] .ms-1[_ngcontent-%COMP%]{margin-left:.125rem!important}[_nghost-%COMP%] .me-1[_ngcontent-%COMP%]{margin-right:.125rem!important}[_nghost-%COMP%] .mx-1[_ngcontent-%COMP%]{margin-left:.125rem!important;margin-right:.125rem!important}[_nghost-%COMP%] .my-1[_ngcontent-%COMP%]{margin-top:.125rem!important;margin-bottom:.125rem!important}[_nghost-%COMP%] .m-1[_ngcontent-%COMP%]{margin:.125rem!important}[_nghost-%COMP%] .pt-1[_ngcontent-%COMP%]{padding-top:.125rem!important}[_nghost-%COMP%] .pb-1[_ngcontent-%COMP%]{padding-bottom:.125rem!important}[_nghost-%COMP%] .ps-1[_ngcontent-%COMP%]{padding-left:.125rem!important}[_nghost-%COMP%] .pe-1[_ngcontent-%COMP%]{padding-right:.125rem!important}[_nghost-%COMP%] .px-1[_ngcontent-%COMP%]{padding-left:.125rem!important;padding-right:.125rem!important}[_nghost-%COMP%] .py-1[_ngcontent-%COMP%]{padding-top:.125rem!important;padding-bottom:.125rem!important}[_nghost-%COMP%] .p-1[_ngcontent-%COMP%]{padding:.125rem!important}[_nghost-%COMP%] .gap-1[_ngcontent-%COMP%]{gap:.125rem!important}[_nghost-%COMP%] .mt-2[_ngcontent-%COMP%]{margin-top:.25rem!important}[_nghost-%COMP%] .mb-2[_ngcontent-%COMP%]{margin-bottom:.25rem!important}[_nghost-%COMP%] .ms-2[_ngcontent-%COMP%]{margin-left:.25rem!important}[_nghost-%COMP%] .me-2[_ngcontent-%COMP%]{margin-right:.25rem!important}[_nghost-%COMP%] .mx-2[_ngcontent-%COMP%]{margin-left:.25rem!important;margin-right:.25rem!important}[_nghost-%COMP%] .my-2[_ngcontent-%COMP%]{margin-top:.25rem!important;margin-bottom:.25rem!important}[_nghost-%COMP%] .m-2[_ngcontent-%COMP%]{margin:.25rem!important}[_nghost-%COMP%] .pt-2[_ngcontent-%COMP%]{padding-top:.25rem!important}[_nghost-%COMP%] .pb-2[_ngcontent-%COMP%]{padding-bottom:.25rem!important}[_nghost-%COMP%] .ps-2[_ngcontent-%COMP%]{padding-left:.25rem!important}[_nghost-%COMP%] .pe-2[_ngcontent-%COMP%]{padding-right:.25rem!important}[_nghost-%COMP%] .px-2[_ngcontent-%COMP%]{padding-left:.25rem!important;padding-right:.25rem!important}[_nghost-%COMP%] .py-2[_ngcontent-%COMP%]{padding-top:.25rem!important;padding-bottom:.25rem!important}[_nghost-%COMP%] .p-2[_ngcontent-%COMP%]{padding:.25rem!important}[_nghost-%COMP%] .gap-2[_ngcontent-%COMP%]{gap:.25rem!important}[_nghost-%COMP%] .mt-3[_ngcontent-%COMP%]{margin-top:.375rem!important}[_nghost-%COMP%] .mb-3[_ngcontent-%COMP%]{margin-bottom:.375rem!important}[_nghost-%COMP%] .ms-3[_ngcontent-%COMP%]{margin-left:.375rem!important}[_nghost-%COMP%] .me-3[_ngcontent-%COMP%]{margin-right:.375rem!important}[_nghost-%COMP%] .mx-3[_ngcontent-%COMP%]{margin-left:.375rem!important;margin-right:.375rem!important}[_nghost-%COMP%] .my-3[_ngcontent-%COMP%]{margin-top:.375rem!important;margin-bottom:.375rem!important}[_nghost-%COMP%] .m-3[_ngcontent-%COMP%]{margin:.375rem!important}[_nghost-%COMP%] .pt-3[_ngcontent-%COMP%]{padding-top:.375rem!important}[_nghost-%COMP%] .pb-3[_ngcontent-%COMP%]{padding-bottom:.375rem!important}[_nghost-%COMP%] .ps-3[_ngcontent-%COMP%]{padding-left:.375rem!important}[_nghost-%COMP%] .pe-3[_ngcontent-%COMP%]{padding-right:.375rem!important}[_nghost-%COMP%] .px-3[_ngcontent-%COMP%]{padding-left:.375rem!important;padding-right:.375rem!important}[_nghost-%COMP%] .py-3[_ngcontent-%COMP%]{padding-top:.375rem!important;padding-bottom:.375rem!important}[_nghost-%COMP%] .p-3[_ngcontent-%COMP%]{padding:.375rem!important}[_nghost-%COMP%] .gap-3[_ngcontent-%COMP%]{gap:.375rem!important}[_nghost-%COMP%] .mt-4[_ngcontent-%COMP%]{margin-top:.5rem!important}[_nghost-%COMP%] .mb-4[_ngcontent-%COMP%]{margin-bottom:.5rem!important}[_nghost-%COMP%] .ms-4[_ngcontent-%COMP%]{margin-left:.5rem!important}[_nghost-%COMP%] .me-4[_ngcontent-%COMP%]{margin-right:.5rem!important}[_nghost-%COMP%] .mx-4[_ngcontent-%COMP%]{margin-left:.5rem!important;margin-right:.5rem!important}[_nghost-%COMP%] .my-4[_ngcontent-%COMP%]{margin-top:.5rem!important;margin-bottom:.5rem!important}[_nghost-%COMP%] .m-4[_ngcontent-%COMP%]{margin:.5rem!important}[_nghost-%COMP%] .pt-4[_ngcontent-%COMP%]{padding-top:.5rem!important}[_nghost-%COMP%] .pb-4[_ngcontent-%COMP%]{padding-bottom:.5rem!important}[_nghost-%COMP%] .ps-4[_ngcontent-%COMP%]{padding-left:.5rem!important}[_nghost-%COMP%] .pe-4[_ngcontent-%COMP%]{padding-right:.5rem!important}[_nghost-%COMP%] .px-4[_ngcontent-%COMP%]{padding-left:.5rem!important;padding-right:.5rem!important}[_nghost-%COMP%] .py-4[_ngcontent-%COMP%]{padding-top:.5rem!important;padding-bottom:.5rem!important}[_nghost-%COMP%] .p-4[_ngcontent-%COMP%]{padding:.5rem!important}[_nghost-%COMP%] .gap-4[_ngcontent-%COMP%]{gap:.5rem!important}[_nghost-%COMP%] .mt-5[_ngcontent-%COMP%]{margin-top:.625rem!important}[_nghost-%COMP%] .mb-5[_ngcontent-%COMP%]{margin-bottom:.625rem!important}[_nghost-%COMP%] .ms-5[_ngcontent-%COMP%]{margin-left:.625rem!important}[_nghost-%COMP%] .me-5[_ngcontent-%COMP%]{margin-right:.625rem!important}[_nghost-%COMP%] .mx-5[_ngcontent-%COMP%]{margin-left:.625rem!important;margin-right:.625rem!important}[_nghost-%COMP%] .my-5[_ngcontent-%COMP%]{margin-top:.625rem!important;margin-bottom:.625rem!important}[_nghost-%COMP%] .m-5[_ngcontent-%COMP%]{margin:.625rem!important}[_nghost-%COMP%] .pt-5[_ngcontent-%COMP%]{padding-top:.625rem!important}[_nghost-%COMP%] .pb-5[_ngcontent-%COMP%]{padding-bottom:.625rem!important}[_nghost-%COMP%] .ps-5[_ngcontent-%COMP%]{padding-left:.625rem!important}[_nghost-%COMP%] .pe-5[_ngcontent-%COMP%]{padding-right:.625rem!important}[_nghost-%COMP%] .px-5[_ngcontent-%COMP%]{padding-left:.625rem!important;padding-right:.625rem!important}[_nghost-%COMP%] .py-5[_ngcontent-%COMP%]{padding-top:.625rem!important;padding-bottom:.625rem!important}[_nghost-%COMP%] .p-5[_ngcontent-%COMP%]{padding:.625rem!important}[_nghost-%COMP%] .gap-5[_ngcontent-%COMP%]{gap:.625rem!important}[_nghost-%COMP%] .mt-6[_ngcontent-%COMP%]{margin-top:.75rem!important}[_nghost-%COMP%] .mb-6[_ngcontent-%COMP%]{margin-bottom:.75rem!important}[_nghost-%COMP%] .ms-6[_ngcontent-%COMP%]{margin-left:.75rem!important}[_nghost-%COMP%] .me-6[_ngcontent-%COMP%]{margin-right:.75rem!important}[_nghost-%COMP%] .mx-6[_ngcontent-%COMP%]{margin-left:.75rem!important;margin-right:.75rem!important}[_nghost-%COMP%] .my-6[_ngcontent-%COMP%]{margin-top:.75rem!important;margin-bottom:.75rem!important}[_nghost-%COMP%] .m-6[_ngcontent-%COMP%]{margin:.75rem!important}[_nghost-%COMP%] .pt-6[_ngcontent-%COMP%]{padding-top:.75rem!important}[_nghost-%COMP%] .pb-6[_ngcontent-%COMP%]{padding-bottom:.75rem!important}[_nghost-%COMP%] .ps-6[_ngcontent-%COMP%]{padding-left:.75rem!important}[_nghost-%COMP%] .pe-6[_ngcontent-%COMP%]{padding-right:.75rem!important}[_nghost-%COMP%] .px-6[_ngcontent-%COMP%]{padding-left:.75rem!important;padding-right:.75rem!important}[_nghost-%COMP%] .py-6[_ngcontent-%COMP%]{padding-top:.75rem!important;padding-bottom:.75rem!important}[_nghost-%COMP%] .p-6[_ngcontent-%COMP%]{padding:.75rem!important}[_nghost-%COMP%] .gap-6[_ngcontent-%COMP%]{gap:.75rem!important}[_nghost-%COMP%] .mt-7[_ngcontent-%COMP%]{margin-top:.875rem!important}[_nghost-%COMP%] .mb-7[_ngcontent-%COMP%]{margin-bottom:.875rem!important}[_nghost-%COMP%] .ms-7[_ngcontent-%COMP%]{margin-left:.875rem!important}[_nghost-%COMP%] .me-7[_ngcontent-%COMP%]{margin-right:.875rem!important}[_nghost-%COMP%] .mx-7[_ngcontent-%COMP%]{margin-left:.875rem!important;margin-right:.875rem!important}[_nghost-%COMP%] .my-7[_ngcontent-%COMP%]{margin-top:.875rem!important;margin-bottom:.875rem!important}[_nghost-%COMP%] .m-7[_ngcontent-%COMP%]{margin:.875rem!important}[_nghost-%COMP%] .pt-7[_ngcontent-%COMP%]{padding-top:.875rem!important}[_nghost-%COMP%] .pb-7[_ngcontent-%COMP%]{padding-bottom:.875rem!important}[_nghost-%COMP%] .ps-7[_ngcontent-%COMP%]{padding-left:.875rem!important}[_nghost-%COMP%] .pe-7[_ngcontent-%COMP%]{padding-right:.875rem!important}[_nghost-%COMP%] .px-7[_ngcontent-%COMP%]{padding-left:.875rem!important;padding-right:.875rem!important}[_nghost-%COMP%] .py-7[_ngcontent-%COMP%]{padding-top:.875rem!important;padding-bottom:.875rem!important}[_nghost-%COMP%] .p-7[_ngcontent-%COMP%]{padding:.875rem!important}[_nghost-%COMP%] .gap-7[_ngcontent-%COMP%]{gap:.875rem!important}[_nghost-%COMP%] .mt-8[_ngcontent-%COMP%]{margin-top:1rem!important}[_nghost-%COMP%] .mb-8[_ngcontent-%COMP%]{margin-bottom:1rem!important}[_nghost-%COMP%] .ms-8[_ngcontent-%COMP%]{margin-left:1rem!important}[_nghost-%COMP%] .me-8[_ngcontent-%COMP%]{margin-right:1rem!important}[_nghost-%COMP%] .mx-8[_ngcontent-%COMP%]{margin-left:1rem!important;margin-right:1rem!important}[_nghost-%COMP%] .my-8[_ngcontent-%COMP%]{margin-top:1rem!important;margin-bottom:1rem!important}[_nghost-%COMP%] .m-8[_ngcontent-%COMP%]{margin:1rem!important}[_nghost-%COMP%] .pt-8[_ngcontent-%COMP%]{padding-top:1rem!important}[_nghost-%COMP%] .pb-8[_ngcontent-%COMP%]{padding-bottom:1rem!important}[_nghost-%COMP%] .ps-8[_ngcontent-%COMP%]{padding-left:1rem!important}[_nghost-%COMP%] .pe-8[_ngcontent-%COMP%]{padding-right:1rem!important}[_nghost-%COMP%] .px-8[_ngcontent-%COMP%]{padding-left:1rem!important;padding-right:1rem!important}[_nghost-%COMP%] .py-8[_ngcontent-%COMP%]{padding-top:1rem!important;padding-bottom:1rem!important}[_nghost-%COMP%] .p-8[_ngcontent-%COMP%]{padding:1rem!important}[_nghost-%COMP%] .gap-8[_ngcontent-%COMP%]{gap:1rem!important}[_nghost-%COMP%] .mt-9[_ngcontent-%COMP%]{margin-top:1.125rem!important}[_nghost-%COMP%] .mb-9[_ngcontent-%COMP%]{margin-bottom:1.125rem!important}[_nghost-%COMP%] .ms-9[_ngcontent-%COMP%]{margin-left:1.125rem!important}[_nghost-%COMP%] .me-9[_ngcontent-%COMP%]{margin-right:1.125rem!important}[_nghost-%COMP%] .mx-9[_ngcontent-%COMP%]{margin-left:1.125rem!important;margin-right:1.125rem!important}[_nghost-%COMP%] .my-9[_ngcontent-%COMP%]{margin-top:1.125rem!important;margin-bottom:1.125rem!important}[_nghost-%COMP%] .m-9[_ngcontent-%COMP%]{margin:1.125rem!important}[_nghost-%COMP%] .pt-9[_ngcontent-%COMP%]{padding-top:1.125rem!important}[_nghost-%COMP%] .pb-9[_ngcontent-%COMP%]{padding-bottom:1.125rem!important}[_nghost-%COMP%] .ps-9[_ngcontent-%COMP%]{padding-left:1.125rem!important}[_nghost-%COMP%] .pe-9[_ngcontent-%COMP%]{padding-right:1.125rem!important}[_nghost-%COMP%] .px-9[_ngcontent-%COMP%]{padding-left:1.125rem!important;padding-right:1.125rem!important}[_nghost-%COMP%] .py-9[_ngcontent-%COMP%]{padding-top:1.125rem!important;padding-bottom:1.125rem!important}[_nghost-%COMP%] .p-9[_ngcontent-%COMP%]{padding:1.125rem!important}[_nghost-%COMP%] .gap-9[_ngcontent-%COMP%]{gap:1.125rem!important}[_nghost-%COMP%] .mt-10[_ngcontent-%COMP%]{margin-top:1.25rem!important}[_nghost-%COMP%] .mb-10[_ngcontent-%COMP%]{margin-bottom:1.25rem!important}[_nghost-%COMP%] .ms-10[_ngcontent-%COMP%]{margin-left:1.25rem!important}[_nghost-%COMP%] .me-10[_ngcontent-%COMP%]{margin-right:1.25rem!important}[_nghost-%COMP%] .mx-10[_ngcontent-%COMP%]{margin-left:1.25rem!important;margin-right:1.25rem!important}[_nghost-%COMP%] .my-10[_ngcontent-%COMP%]{margin-top:1.25rem!important;margin-bottom:1.25rem!important}[_nghost-%COMP%] .m-10[_ngcontent-%COMP%]{margin:1.25rem!important}[_nghost-%COMP%] .pt-10[_ngcontent-%COMP%]{padding-top:1.25rem!important}[_nghost-%COMP%] .pb-10[_ngcontent-%COMP%]{padding-bottom:1.25rem!important}[_nghost-%COMP%] .ps-10[_ngcontent-%COMP%]{padding-left:1.25rem!important}[_nghost-%COMP%] .pe-10[_ngcontent-%COMP%]{padding-right:1.25rem!important}[_nghost-%COMP%] .px-10[_ngcontent-%COMP%]{padding-left:1.25rem!important;padding-right:1.25rem!important}[_nghost-%COMP%] .py-10[_ngcontent-%COMP%]{padding-top:1.25rem!important;padding-bottom:1.25rem!important}[_nghost-%COMP%] .p-10[_ngcontent-%COMP%]{padding:1.25rem!important}[_nghost-%COMP%] .gap-10[_ngcontent-%COMP%]{gap:1.25rem!important}[_nghost-%COMP%] .mt-11[_ngcontent-%COMP%]{margin-top:1.375rem!important}[_nghost-%COMP%] .mb-11[_ngcontent-%COMP%]{margin-bottom:1.375rem!important}[_nghost-%COMP%] .ms-11[_ngcontent-%COMP%]{margin-left:1.375rem!important}[_nghost-%COMP%] .me-11[_ngcontent-%COMP%]{margin-right:1.375rem!important}[_nghost-%COMP%] .mx-11[_ngcontent-%COMP%]{margin-left:1.375rem!important;margin-right:1.375rem!important}[_nghost-%COMP%] .my-11[_ngcontent-%COMP%]{margin-top:1.375rem!important;margin-bottom:1.375rem!important}[_nghost-%COMP%] .m-11[_ngcontent-%COMP%]{margin:1.375rem!important}[_nghost-%COMP%] .pt-11[_ngcontent-%COMP%]{padding-top:1.375rem!important}[_nghost-%COMP%] .pb-11[_ngcontent-%COMP%]{padding-bottom:1.375rem!important}[_nghost-%COMP%] .ps-11[_ngcontent-%COMP%]{padding-left:1.375rem!important}[_nghost-%COMP%] .pe-11[_ngcontent-%COMP%]{padding-right:1.375rem!important}[_nghost-%COMP%] .px-11[_ngcontent-%COMP%]{padding-left:1.375rem!important;padding-right:1.375rem!important}[_nghost-%COMP%] .py-11[_ngcontent-%COMP%]{padding-top:1.375rem!important;padding-bottom:1.375rem!important}[_nghost-%COMP%] .p-11[_ngcontent-%COMP%]{padding:1.375rem!important}[_nghost-%COMP%] .gap-11[_ngcontent-%COMP%]{gap:1.375rem!important}[_nghost-%COMP%] .mt-12[_ngcontent-%COMP%]{margin-top:1.5rem!important}[_nghost-%COMP%] .mb-12[_ngcontent-%COMP%]{margin-bottom:1.5rem!important}[_nghost-%COMP%] .ms-12[_ngcontent-%COMP%]{margin-left:1.5rem!important}[_nghost-%COMP%] .me-12[_ngcontent-%COMP%]{margin-right:1.5rem!important}[_nghost-%COMP%] .mx-12[_ngcontent-%COMP%]{margin-left:1.5rem!important;margin-right:1.5rem!important}[_nghost-%COMP%] .my-12[_ngcontent-%COMP%]{margin-top:1.5rem!important;margin-bottom:1.5rem!important}[_nghost-%COMP%] .m-12[_ngcontent-%COMP%]{margin:1.5rem!important}[_nghost-%COMP%] .pt-12[_ngcontent-%COMP%]{padding-top:1.5rem!important}[_nghost-%COMP%] .pb-12[_ngcontent-%COMP%]{padding-bottom:1.5rem!important}[_nghost-%COMP%] .ps-12[_ngcontent-%COMP%]{padding-left:1.5rem!important}[_nghost-%COMP%] .pe-12[_ngcontent-%COMP%]{padding-right:1.5rem!important}[_nghost-%COMP%] .px-12[_ngcontent-%COMP%]{padding-left:1.5rem!important;padding-right:1.5rem!important}[_nghost-%COMP%] .py-12[_ngcontent-%COMP%]{padding-top:1.5rem!important;padding-bottom:1.5rem!important}[_nghost-%COMP%] .p-12[_ngcontent-%COMP%]{padding:1.5rem!important}[_nghost-%COMP%] .gap-12[_ngcontent-%COMP%]{gap:1.5rem!important}[_nghost-%COMP%] h1[_ngcontent-%COMP%], [_nghost-%COMP%] .h1[_ngcontent-%COMP%]{font-size:1.375rem;font-weight:500!important}[_nghost-%COMP%] h2[_ngcontent-%COMP%], [_nghost-%COMP%] .h2[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:500!important}[_nghost-%COMP%] h3[_ngcontent-%COMP%], [_nghost-%COMP%] .h3[_ngcontent-%COMP%]{font-size:1.125rem;font-weight:500!important}[_nghost-%COMP%] h4[_ngcontent-%COMP%], [_nghost-%COMP%] .h4[_ngcontent-%COMP%]{font-size:1rem;font-weight:500!important}[_nghost-%COMP%] h5[_ngcontent-%COMP%], [_nghost-%COMP%] .h5[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500!important}[_nghost-%COMP%] h6[_ngcontent-%COMP%], [_nghost-%COMP%] .h6[_ngcontent-%COMP%]{font-size:.75rem;font-weight:500!important}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px;min-height:370px}@media (max-width: 768px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%]{margin-top:30px}}[_nghost-%COMP%] .login-pane[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{box-shadow:none;border-color:#dfe5ef!important}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid var(--login-primary-color);border-right:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:0 10px 10px 0}}[_nghost-%COMP%] .sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:15px!important}@media (max-width: 768px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){[_nghost-%COMP%] .features-pane[_ngcontent-%COMP%]{border-left:1px solid var(--login-primary-color);border-bottom:1px solid var(--login-primary-color);border-top:1px solid var(--login-primary-color);border-radius:10px 0 0 10px}}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:fixed;bottom:1.25rem;left:1.25rem;margin-left:20px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}[_nghost-%COMP%] .version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:fixed;margin-right:18px}@media (max-width: 768px){[_nghost-%COMP%] .copyright[_ngcontent-%COMP%], [_nghost-%COMP%] .version[_ngcontent-%COMP%]{position:static;margin-top:10px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{justify-content:center}}[_nghost-%COMP%] div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}[_nghost-%COMP%] button.btn-social-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}[_nghost-%COMP%] .fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}[_nghost-%COMP%] .version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}[_nghost-%COMP%] .domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}[_nghost-%COMP%] .btn-theme[_ngcontent-%COMP%]{background-color:var(--login-primary-color)!important;color:#fff!important;font-size:14px;height:36.6px;border-radius:7px}[_nghost-%COMP%] .text-theme[_ngcontent-%COMP%]{color:var(--login-primary-color)!important}[_nghost-%COMP%] .input-icon[_ngcontent-%COMP%]{font-size:15px}"]})}}return i})();var em=(()=>{class i{constructor(){this.authService=ae(un),this.router=ae(an),this.httpService=ae(cn),this.appVersion=Mi.version,this.changelogUrl=Mi.changelogUrl,this.route=ae(rn),this.roleService=ae(Xn),this.subdomain=Ee(""),this.domain=Ee(""),this.username=Ee("")}ngOnInit(){this.initNews()}ngAfterViewInit(){this.subdomain.set(localStorage.getItem("AUTH_SUB_DOMAIN")||""),this.username.set(localStorage.getItem("AUTH_USERNAME")||""),this.domain.set(localStorage.getItem("AUTH_DOMAIN")||".dealpos.co.id")}initNews(){let t=new nn().set("fetch","children:books").set("sort","sortOrder:asc");this.news$=this.httpService.get("https://changelog.dealpos.app/","umbraco/delivery/api/v2/content",{params:t}).pipe(wi(n=>n.items.map(r=>r.properties)),Xi(1))}onLogin(t){let n={SubDomain:t.subdomain+t.domain,Username:t.username,Password:t.password};Gi([this.authService.login(n),this.route.queryParams.pipe(wi(s=>s.returnUrl||"/"))]).subscribe(s=>{let r=s[1];if(r=="/"){if(this.roleService.report.finance){if(!this.roleService.coa.view){this.router.navigate(["/pages/journal/journal-entry"]);return}}else{this.router.navigate(["/pages/chart-of-account/account"]);return}this.router.navigate(["/pages/dashboard"])}else this.router.navigate([r])})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=he({type:i,selectors:[["app-login"]],decls:2,vars:8,consts:[["colorTheme","#0a8754","title","DealPOS Accounting","subtitle","Streamline Your Accounting with Ease",3,"onLoginChange","news","subdomain","domain","username","version","changelogUrl"]],template:function(n,s){n&1&&(G(0,"app-login-ui",0),Dt(1,"async"),ie("onLoginChange",function(a){return s.onLogin(a)}),N()),n&2&&$("news",$t(1,6,s.news$))("subdomain",s.subdomain())("domain",s.domain())("username",s.username())("version",s.appVersion)("changelogUrl",s.changelogUrl)},dependencies:[we,tn,Ht,Mn,qn,xn,ni,Bn,Qn,Zn,oi,ss,Wn,jn,Gn,os,nr],encapsulation:2})}}return i})();export{em as LoginComponent};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-U63X7T6B.js";import{a as He}from"./chunk-G4XX7EU2.js";import{a as Oe,b as Be}from"./chunk-UR7ARZNH.js";import{a as je}from"./chunk-Q2WT6OSY.js";import{b as A}from"./chunk-J6SZIJEO.js";import{a as re}from"./chunk-GRIGOPOO.js";import"./chunk-3ZQVIJMU.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-WA6V7JTY.js";import"./chunk-4TQOJBQI.js";import{a as z,b as j}from"./chunk-7FYHB5GM.js";import{d as Ne,i as ke,j as Me,k as Pe}from"./chunk-SW4SZC2K.js";import{a as Ae,b as De}from"./chunk-76YIDIBJ.js";import"./chunk-6WHZBKFW.js";import"./chunk-ZHINPNBR.js";import"./chunk-FKPQJ7WA.js";import{a as Fe,b as Je}from"./chunk-U2ZDSR5F.js";import"./chunk-4XCMTFFH.js";import"./chunk-PW4323VJ.js";import"./chunk-J3DB5YKJ.js";import"./chunk-NIT7TJ5P.js";import"./chunk-DE2473W5.js";import"./chunk-5JHWAF7R.js";import"./chunk-D36YVGIB.js";import{g as Ee,h as Ve}from"./chunk-LVCF2WZK.js";import{b as Ie,c as Te}from"./chunk-DYSMAYNT.js";import{a as Ce,b as be}from"./chunk-WX27CT5F.js";import{a as y,b as Se,c as ve,d as ye,e as we,f as Re}from"./chunk-52KGCI4Z.js";import"./chunk-C2YOJOPY.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-DGTLYGTT.js";import"./chunk-RFVPTZXE.js";import{b as ae,c as le,e as me,f as pe,k as se,l as ce,o as de,u as ue,x as fe}from"./chunk-FTFZVOHA.js";import"./chunk-GFOJNJA4.js";import"./chunk-RVJEKOIL.js";import"./chunk-QLLOZ2EX.js";import"./chunk-F2X3VGZZ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,r as oe}from"./chunk-PBVHXSHH.js";import{$c as T,Ab as K,Bc as Q,Cb as g,Cc as X,Dc as E,Ga as k,Kb as c,Mc as I,Nc as Y,Oc as V,Pc as v,Ub as r,Vb as o,Wb as b,X as N,Z as H,_b as w,bb as U,c as F,cb as L,dc as R,ec as _,gb as m,ha as C,pa as h,qa as x,qc as s,rc as S,s as J,sc as M,uc as W,vc as $,wb as G,wc as P,xc as q}from"./chunk-D4VGEGUS.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var $e={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},O=Se(Re($e),ve(t=>({first:T(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:T(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:T(()=>t.data().data.some(a=>a.checked)),checkedARCollection:T(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),we(t=>{let a=C(D),e=C(A);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!0}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!1}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(p=>f(d({},p),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(F(N(()=>a.getARJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(F(J(n=>Object.entries(n).reduce((i,[u,p])=>(p!=null&&(i[u]=p),i),{})),N(n=>a.getARJournal(n).pipe(J(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var B=t=>({"ng-invalid ng-dirty":t}),qe=()=>({});function Qe(t,a){if(t&1){let e=w();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function Xe(t,a){if(t&1&&g(0,Qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Ye(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Customer"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),b(17,"th",18),o())}function Ze(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),I(12,"date"),o(),r(13,"td"),s(14),I(15,"date"),o(),r(16,"td"),b(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),b(21,"p-button",22),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,L),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(V(12,12,e.date,"d MMM y")),m(3),S(e.due?V(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,U),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function et(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function tt(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function it(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,Ye,18,0,"ng-template",null,3,v)(4,Ze,22,18,"ng-template",null,4,v)(6,et,1,3,"ng-template",null,5,v)(8,tt,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();m(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function nt(t,a){if(t&1&&(r(0,"span",34),s(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",V(2,2,e.name,30)," ")}}function ot(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function rt(t,a){if(t&1&&(r(0,"div"),g(1,ot,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function at(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function lt(t,a){if(t&1&&(r(0,"div"),g(1,at,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function mt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function pt(t,a){if(t&1&&(r(0,"div"),g(1,mt,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function st(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),g(5,nt,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),b(11,"p-datepicker",29),g(12,rt,2,1,"div",30),b(13,"p-datepicker",31),g(14,lt,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Customer"),o(),r(18,"p-autocomplete",32),I(19,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),b(23,"input",33),g(24,pt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(7),c("iconDisplay","input")("showIcon",!0)("ngClass",E(17,B,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(),c("iconDisplay","input")("showIcon",!0)("ngClass",E(19,B,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",Y(19,15,e.customerSuggestions$)),m(5),c("autoNumeric",X(21,qe))("ngClass",E(22,B,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var ei=(()=>{class t extends ze{constructor(){super(),this.store=C(O),this.generateJournalService=C(D),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(ue),this.dayjsService=C(A)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,pageSize:u,export:p,exportPageNumber:Ue,exportPageSize:Le,outletName:Ge,customerID:Ke,paymentState:We}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),pageSize:this.fb.control(u,[le.required]),export:this.fb.control(p),exportPageNumber:this.fb.control(Ue),exportPageSize:this.fb.control(Le),outletName:this.fb.control(Ge),customerID:this.fb.control(Ke),paymentState:this.fb.control(We)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=He);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(H(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ar-journal"]],features:[Q([O]),K],decls:8,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AR Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(p){return h(i),P(n.isDialogFilterVisible,p)||(n.isDialogFilterVisible=p),x(p)})("isInitDialogFilterVisibleChange",function(p){return h(i),P(n.isInitDialogFilterVisible,p)||(n.isInitDialogFilterVisible=p),x(p)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(p){return h(i),x(n.onSearch(p))}),g(1,Xe,1,1,"ng-template",null,0,v)(3,it,10,5,"ng-template",null,1,v),s(5," <"),g(6,st,25,24,"ng-template",null,2,v),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ve,oe,Z,ee,te,ie,ne,Pe,Ne,ke,Me,xe,he,be,Ce,fe,se,ae,me,pe,ce,de,Je,Fe,De,Ae,Be,Oe,ge,_e,Ee,Te,Ie,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ei as ARJournalComponent};
1
+ import{a as D}from"./chunk-E34SEVZS.js";import{a as He}from"./chunk-G4XX7EU2.js";import{a as Oe,b as Be}from"./chunk-S2Q6V4IV.js";import{a as je}from"./chunk-T4TFJFL4.js";import{a as re}from"./chunk-YO2YHPV5.js";import{b as A}from"./chunk-W7Q3NWBG.js";import"./chunk-64ODJHGP.js";import{a as ze}from"./chunk-XKI7WLHE.js";import"./chunk-GLOECGB7.js";import"./chunk-KKZF4RQM.js";import{a as z,b as j}from"./chunk-RNPNKSFR.js";import{d as Ne,i as ke,j as Me,k as Pe}from"./chunk-BRCJWPEZ.js";import{a as Ae,b as De}from"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import"./chunk-NI4XE6XQ.js";import{a as Fe,b as Je}from"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{g as Ee,h as Ve}from"./chunk-MS6ARTHK.js";import{b as Ie,c as Te}from"./chunk-WNA57NZF.js";import{a as Ce,b as be}from"./chunk-MUFRLGLG.js";import{a as y,b as Se,c as ve,d as ye,e as we,f as Re}from"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{n as _e,o as ge,w as he,x as xe}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{b as ae,c as le,e as me,f as pe,k as se,l as ce,o as de,u as ue,x as fe}from"./chunk-NHXCR55X.js";import"./chunk-DOKG43W6.js";import"./chunk-I5YQOGRZ.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as Z,j as ee,k as te,n as ie,p as ne,s as oe}from"./chunk-VU532YE3.js";import{Ab as K,Bc as Q,Cb as g,Cc as X,Dc as E,Ga as k,Kb as c,Mc as I,Nc as Y,Oc as V,Qc as v,Ub as r,Vb as o,Wb as b,X as N,Z as H,_b as w,ad as T,bb as U,c as F,cb as L,dc as R,ec as _,gb as m,ha as C,pa as h,qa as x,qc as s,rc as S,s as J,sc as M,uc as W,vc as $,wb as G,wc as P,xc as q}from"./chunk-7IC4BZ6J.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var $e={data:{data:[],totalCount:0},meta:{options:{outlets:[]},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},filter:{number:null,outletName:null,from:null,to:null,customerID:null,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4,paymentState:0}},O=Se(Re($e),ve(t=>({first:T(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:T(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().totalCount)),hasCheckedRows:T(()=>t.data().data.some(a=>a.checked)),checkedARCollection:T(()=>t.data().data.filter(a=>a.checked).map(a=>a.id))})),we(t=>{let a=C(D),e=C(A);return{updateFilter(n){y(t,i=>f(d({},i),{filter:d(d({},i.filter),n)}))},onRowSelect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!0}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onRowUnselect(n){y(t,i=>{let u=i.data.data.map(p=>p.id===n.id?f(d({},p),{checked:!1}):p);return f(d({},i),{data:f(d({},i.data),{data:u})})})},onHeaderCheckboxToggle(n){y(t,i=>{let u=i.data.data.map(p=>f(d({},p),{checked:n}));return f(d({},i),{data:f(d({},i.data),{data:u})})})},getARLoader:z(F(N(()=>a.getARJournalLoader().pipe(j({next:n=>{y(t,i=>f(d({},i),{meta:n}))},error:n=>{console.error("Error fetching AR collection loader:",n)}}))))),getARCollection:z(F(J(n=>Object.entries(n).reduce((i,[u,p])=>(p!=null&&(i[u]=p),i),{})),N(n=>a.getARJournal(n).pipe(J(i=>f(d({},i),{data:i.data.map(u=>f(d({},u),{due:e.from(u.due)?e.from(u.due).format():null,checked:!1}))})),j({next:i=>{y(t,u=>f(d({},u),{data:i}))},error:i=>{console.error("Error fetching customer invoice:",i)}})))))}}),ye(t=>({onInit:()=>{t.getARLoader(),t.getARCollection(t.filter)}})));var B=t=>({"ng-invalid ng-dirty":t}),qe=()=>({});function Qe(t,a){if(t&1){let e=w();r(0,"p-button",10),R("onClick",function(){h(e);let n=_(2);return x(n.onCreateJournal())}),o()}}function Xe(t,a){if(t&1&&g(0,Qe,1,0,"p-button",9),t&2){let e=_();c("ngIf",e.store.hasCheckedRows())}}function Ye(t,a){t&1&&(r(0,"tr")(1,"th",12),b(2,"p-tableHeaderCheckbox"),o(),r(3,"th",13),s(4,"Outlet"),o(),r(5,"th",14),s(6,"Number"),o(),r(7,"th",15),s(8,"Customer"),o(),r(9,"th",16),s(10,"Date"),o(),r(11,"th",16),s(12,"Due"),o(),r(13,"th",15),s(14,"Note"),o(),r(15,"th",17),s(16,"Payment"),o(),b(17,"th",18),o())}function Ze(t,a){if(t&1&&(r(0,"tr")(1,"td"),b(2,"p-tableCheckbox",19),o(),r(3,"td"),s(4),o(),r(5,"td")(6,"a",20),s(7),o()(),r(8,"td"),s(9),o(),r(10,"td"),s(11),I(12,"date"),o(),r(13,"td"),s(14),I(15,"date"),o(),r(16,"td"),b(17,"div",21),o(),r(18,"td"),s(19),o(),r(20,"td"),b(21,"p-button",22),o()()),t&2){let e=a.$implicit,l=_(2);m(2),c("value",e),m(2),S(e.outlet),m(2),c("href",l.authService.getTenantExternalURL()+"/menu/Debt/Debt/Join_Invoice/New_Join_Invoice/Info?ID="+e.id,L),m(),M(" ",e.number," "),m(2),S(e.customer),m(2),S(V(12,12,e.date,"d MMM y")),m(3),S(e.due?V(15,15,e.due,"d MMM y hh:mm"):"-"),m(3),c("innerHTML",e.note,U),m(2),S(e.payment),m(2),c("icon",e.integrated?"fa-solid fa-circle-check":"fa-solid fa-circle-xmark")("severity",e.integrated?"success":"danger")("text",!0)}}function et(t,a){if(t&1&&s(0),t&2){let e=_(2);W(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function tt(t,a){t&1&&(r(0,"tr")(1,"td",23)(2,"span"),s(3,"No records found."),o()()())}function it(t,a){if(t&1){let e=w();r(0,"p-panel")(1,"p-table",11),R("onPage",function(n){h(e);let i=_();return x(i.onPageChange(n))})("onHeaderCheckboxToggle",function(n){h(e);let i=_();return x(i.onHeaderCheckboxToggle(n))})("onRowSelect",function(n){h(e);let i=_();return x(i.onRowSelect(n))})("onRowUnselect",function(n){h(e);let i=_();return x(i.onRowUnselect(n))}),g(2,Ye,18,0,"ng-template",null,3,v)(4,Ze,22,18,"ng-template",null,4,v)(6,et,1,3,"ng-template",null,5,v)(8,tt,4,0,"ng-template",null,6,v),o()()}if(t&2){let e=_();m(),c("value",e.store.data().data)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.data().totalCount)("lazy",!0)}}function nt(t,a){if(t&1&&(r(0,"span",34),s(1),I(2,"truncate"),o()),t&2){let e=a.$implicit;c("pTooltip",e.name),m(),M(" ",V(2,2,e.name,30)," ")}}function ot(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function rt(t,a){if(t&1&&(r(0,"div"),g(1,ot,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("from"))}}function at(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function lt(t,a){if(t&1&&(r(0,"div"),g(1,at,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("to"))}}function mt(t,a){if(t&1&&(r(0,"div")(1,"span",36),s(2),o()()),t&2){let e=a.$implicit;m(2),S(e)}}function pt(t,a){if(t&1&&(r(0,"div"),g(1,mt,3,1,"div",35),o()),t&2){let e=_(2);m(),c("ngForOf",e.getErrors("pageSize"))}}function st(t,a){if(t&1){let e=w();r(0,"form",24)(1,"div",25)(2,"label",26),s(3,"Outlet"),o(),r(4,"p-select",27),g(5,nt,3,5,"ng-template",null,7,v),o()(),r(7,"div",25)(8,"label",26),s(9,"From - To"),o(),r(10,"div",28),b(11,"p-datepicker",29),g(12,rt,2,1,"div",30),b(13,"p-datepicker",31),g(14,lt,2,1,"div",30),o()(),r(15,"div",25)(16,"label",26),s(17,"Customer"),o(),r(18,"p-autocomplete",32),I(19,"async"),R("completeMethod",function(n){h(e);let i=_();return x(i.onSearchContact(n))}),o()(),r(20,"div",25)(21,"label",26),s(22,"Page Size"),o(),b(23,"input",33),g(24,pt,2,1,"div",30),o()()}if(t&2){let e=_();c("formGroup",e.form),m(4),c("virtualScrollItemSize",50)("options",e.store.meta().options.outlets),m(7),c("iconDisplay","input")("showIcon",!0)("ngClass",E(17,B,e.isInvalid("from"))),m(),c("ngIf",e.isInvalid("from")),m(),c("iconDisplay","input")("showIcon",!0)("ngClass",E(19,B,e.isInvalid("to"))),m(),c("ngIf",e.isInvalid("to")),m(4),c("suggestions",Y(19,15,e.customerSuggestions$)),m(5),c("autoNumeric",X(21,qe))("ngClass",E(22,B,e.isInvalid("pageSize"))),m(),c("ngIf",e.isInvalid("pageSize"))}}var ei=(()=>{class t extends ze{constructor(){super(),this.store=C(O),this.generateJournalService=C(D),this.authService=C(re),this.isDialogFilterVisible=k(!1),this.isInitDialogFilterVisible=k(!1),this.fb=C(ue),this.dayjsService=C(A)}ngOnInit(){this.initForm()}initForm(){let{number:e,from:l,to:n,pageNumber:i,pageSize:u,export:p,exportPageNumber:Ue,exportPageSize:Le,outletName:Ge,customerID:Ke,paymentState:We}=this.store.filter();this.form=this.fb.group({number:this.fb.control(e),from:this.fb.control(this.dayjsService.from(l)?this.dayjsService.from(l).toDate():null),to:this.fb.control(this.dayjsService.from(n)?this.dayjsService.from(n).toDate():null),pageNumber:this.fb.control(i),pageSize:this.fb.control(u,[le.required]),export:this.fb.control(p),exportPageNumber:this.fb.control(Ue),exportPageSize:this.fb.control(Le),outletName:this.fb.control(Ge),customerID:this.fb.control(Ke),paymentState:this.fb.control(We)})}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((l,[n,i])=>{switch(n){case"customerID":i||(l[n]=He);break;case"from":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;case"to":typeof i=="object"?l[n]=this.dayjsService.from(i)?this.dayjsService.format(i):null:l[n]=i!=null?String(i):null;break;default:l[n]=i===null?"":i;break}return l},{});console.log("Filter Body:",e),this.store.updateFilter(e),this.isDialogFilterVisible.set(!1)}onSearchContact(e){this.customerSuggestions$=this.generateJournalService.getCustomerSuggestions(e.query)}onSearch(e){this.store.updateFilter(f(d({},this.store.filter()),{number:e,pageNumber:1})),this.store.getARCollection(this.store.filter())}onPageChange(e){let l=e.first/e.rows;this.store.updateFilter(f(d({},this.store.filter()),{pageNumber:l+1}))}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(l=>{this.store.onRowUnselect(l)});return}else this.store.onRowUnselect(e.data)}onCreateJournal(){this.generateJournalService.createARJournal(this.store.checkedARCollection()).pipe(H(()=>this.store.getARCollection(this.store.filter))).subscribe()}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=G({type:t,selectors:[["app-ar-journal"]],features:[Q([O]),K],decls:8,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["item",""],["pageTitle","AR Collection",3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","search","isSearchableInput","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],["label","Generate Journal",3,"onClick",4,"ngIf"],["label","Generate Journal",3,"onClick"],["dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","value","paginator","rows","totalRecords","lazy"],[2,"width","1rem"],[2,"width","10rem"],[2,"width","12rem"],[2,"width","14rem"],[2,"width","11rem"],[2,"width","9rem"],[2,"width","4rem"],[3,"value"],["target","_blank",1,"link","link-primary",3,"href"],[3,"innerHTML"],[3,"icon","severity","text"],["colspan","9"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["virtualScroll","","showClear","","filter","","filterBy","name","formControlName","outletName","appendTo","body","optionLabel","name","optionValue","name","placeholder","Select an Outlet",3,"virtualScrollItemSize","options"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],[4,"ngIf"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon","ngClass"],["showClear","","formControlName","customerID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["type","text","pInputText","","formControlName","pageSize",3,"autoNumeric","ngClass"],[3,"pTooltip"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(l,n){if(l&1){let i=w();r(0,"app-main-panel",8),q("isDialogFilterVisibleChange",function(p){return h(i),P(n.isDialogFilterVisible,p)||(n.isDialogFilterVisible=p),x(p)})("isInitDialogFilterVisibleChange",function(p){return h(i),P(n.isInitDialogFilterVisible,p)||(n.isInitDialogFilterVisible=p),x(p)}),R("filterConfirmed",function(){return h(i),x(n.onFilterOKEvent())})("search",function(p){return h(i),x(n.onSearch(p))}),g(1,Xe,1,1,"ng-template",null,0,v)(3,it,10,5,"ng-template",null,1,v),s(5," <"),g(6,st,25,24,"ng-template",null,2,v),o()}l&2&&(c("isSearchableInput",!0)("isFilterable",!0),$("isDialogFilterVisible",n.isDialogFilterVisible)("isInitDialogFilterVisible",n.isInitDialogFilterVisible),c("scrollable",!0))},dependencies:[Ve,oe,Z,ee,te,ie,ne,Pe,Ne,ke,Me,xe,he,be,Ce,fe,se,ae,me,pe,ce,de,Je,Fe,De,Ae,Be,Oe,ge,_e,Ee,Te,Ie,je],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{ei as ARJournalComponent};
@@ -1 +1 @@
1
- import{a as re}from"./chunk-G4XX7EU2.js";import{a as dt,b as gt}from"./chunk-UR7ARZNH.js";import{a as ut}from"./chunk-Q2WT6OSY.js";import{a as Rt,b as mt}from"./chunk-J6SZIJEO.js";import{a as Ke}from"./chunk-GRIGOPOO.js";import"./chunk-3ZQVIJMU.js";import{a as pt,b as st}from"./chunk-3CUYHDDG.js";import{a as ct}from"./chunk-XKI7WLHE.js";import"./chunk-WA6V7JTY.js";import{a as et}from"./chunk-CEN7UP6Q.js";import"./chunk-4TQOJBQI.js";import{a as ne,b as ie}from"./chunk-7FYHB5GM.js";import{b as ot,d as Me,i as at,j as lt,k as ke}from"./chunk-SW4SZC2K.js";import{a as it,b as rt}from"./chunk-76YIDIBJ.js";import"./chunk-6WHZBKFW.js";import"./chunk-ZHINPNBR.js";import{a as Ne}from"./chunk-2EIZ76HE.js";import{a as ye,b as Re}from"./chunk-M3QTXO6B.js";import"./chunk-FKPQJ7WA.js";import{a as Pe,b as De}from"./chunk-U2ZDSR5F.js";import"./chunk-4XCMTFFH.js";import"./chunk-PW4323VJ.js";import"./chunk-J3DB5YKJ.js";import"./chunk-NIT7TJ5P.js";import"./chunk-DE2473W5.js";import"./chunk-5JHWAF7R.js";import"./chunk-D36YVGIB.js";import{b as Q}from"./chunk-UIVUT5SZ.js";import{f as nt,h as L}from"./chunk-LVCF2WZK.js";import"./chunk-DYSMAYNT.js";import{a as N,b as A}from"./chunk-WX27CT5F.js";import{a as T,b as Ie,c as tt,d as Te,e as we,f as Fe}from"./chunk-52KGCI4Z.js";import"./chunk-C2YOJOPY.js";import{n as Se,o as Ce,w as Y,x as J}from"./chunk-DGTLYGTT.js";import"./chunk-RFVPTZXE.js";import{b as xe,c as K,e as X,f as _e,i as Xe,j as Ye,k as he,l as Ee,o as ve,u as Je,v as Qe,w as Ze,x as be}from"./chunk-FTFZVOHA.js";import{b as de,d as ge,e as k,l as V}from"./chunk-GFOJNJA4.js";import{a as fe}from"./chunk-RVJEKOIL.js";import"./chunk-QLLOZ2EX.js";import"./chunk-F2X3VGZZ.js";import{h as We,k as D,p as ue,q as W,r as M}from"./chunk-PBVHXSHH.js";import{$c as te,Ab as Ge,Bc as me,Cb as h,Cc as Ve,Dc as C,Ga as q,J as qe,Kb as m,Mc as S,Nc as F,Oc as U,Pb as He,Pc as x,Qb as G,Sb as H,Tb as $,Ub as r,Vb as n,Wb as d,X as O,Z as w,_b as y,ba as le,c as ee,dc as R,ec as g,gb as l,ha as u,pa as v,qa as b,qc as a,rc as E,s as z,sc as I,ta as Ue,uc as $e,vc as pe,wa as ze,wb as P,wc as se,xc as ce}from"./chunk-D4VGEGUS.js";import{a as f,b as _,e as yt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=u(fe);#t=u(Ke);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var It={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ae=Ie(Fe(It),tt(t=>({first:te(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:te(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:te(()=>t.data().data.some(c=>c.checked)),checkedInvoice:te(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),we(t=>{let c=u(B);return{updateFilter(o){T(t,i=>_(f({},i),{filter:f(f({},i.filter),o)}))},onRowSelect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!0}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onRowUnselect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!1}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onHeaderCheckboxToggle(o){T(t,i=>{let s=i.data.data.map(p=>_(f({},p),{checked:o}));return _(f({},i),{data:_(f({},i.data),{data:s})})})},getRecurringExpenseLoader:ne(ee(O(()=>c.getRecurringExpenseLoader().pipe(ie({next:o=>{T(t,i=>_(f({},i),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ne(ee(z(o=>Object.entries(o).reduce((i,[s,p])=>(p!=null&&(i[s]=p),i),{})),O(o=>c.getRecurringExpenses(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching Recurring Expenses:",i)}})))))}}),Te(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var Ft=["class","page"],Pt=t=>["details/",t];function Dt(t,c){if(t&1){let e=y();r(0,"p-button",12),R("onClick",function(){v(e);let i=g(2);return b(i.onDeleteSelected())}),n()}}function Mt(t,c){if(t&1&&(r(0,"div",8),h(1,Dt,1,0,"p-button",9),r(2,"a",10),d(3,"i",11),r(4,"span"),a(5,"Add"),n()()()),t&2){let e=g();l(),m("ngIf",e.store.hasCheckedRows())}}function kt(t,c){t&1&&(r(0,"tr")(1,"th"),d(2,"p-tableHeaderCheckbox"),n(),r(3,"th"),a(4,"Outlet"),n(),r(5,"th"),a(6,"Name"),n(),r(7,"th"),a(8,"Expense Account"),n(),r(9,"th"),a(10,"Start Date"),n(),r(11,"th"),a(12,"End Date"),n(),r(13,"th"),a(14,"Last Expense"),n(),r(15,"th"),a(16,"Amount"),n(),r(17,"th"),a(18,"Frequency"),n()())}function Vt(t,c){if(t&1&&(r(0,"tr")(1,"td"),d(2,"p-tableCheckbox",14),n(),r(3,"td"),a(4),n(),r(5,"td")(6,"a",15),a(7),n()(),r(8,"td"),a(9),n(),r(10,"td"),a(11),S(12,"date"),n(),r(13,"td"),a(14),S(15,"date"),n(),r(16,"td"),a(17),S(18,"date"),n(),r(19,"td"),a(20),S(21,"number"),n(),r(22,"td"),a(23),n()()),t&2){let e=c.$implicit;l(2),m("value",e),l(2),E(e.outletName),l(2),m("routerLink",C(21,Pt,e.id)),l(),E(e.name),l(2),E(e.expenseName),l(2),E(U(12,10,e.startDate,"d MMM y")),l(3),E(U(15,13,e.endDate,"d MMM y")),l(3),E(U(18,16,e.lastExpenseDate,"d MMM y")),l(3),E(F(21,19,e.amount)),l(3),E(e.repeatTypeLabel)}}function Nt(t,c){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=g(2);l(),$e(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function At(t,c){t&1&&(r(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function Lt(t,c){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",13),R("onPage",function(i){v(e);let s=g();return b(s.onPageChange(i))})("onHeaderCheckboxToggle",function(i){v(e);let s=g();return b(s.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){v(e);let s=g();return b(s.onRowSelect(i))})("onRowUnselect",function(i){v(e);let s=g();return b(s.onRowUnselect(i))}),h(2,kt,19,0,"ng-template",null,3,x)(4,Vt,24,23,"ng-template",null,4,x)(6,Nt,2,3,"ng-template",null,5,x)(8,At,4,0,"ng-template",null,6,x),n()()}if(t&2){let e=g();l(),m("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function Bt(t,c){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),d(4,"p-select",20),n()()),t&2){let e=g();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var _t=(()=>{class t extends ct{constructor(){super(...arguments),this.store=u(Ae),this.recurringExpenseService=u(B),this.fb=u(Je),this.isDialogFilterVisible=q(!1)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(w(()=>{this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(_(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:i,pageSize:s,export:p,exportPageNumber:j,exportPageSize:Ct}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(i),pageSize:this.fb.control(s),export:this.fb.control(p),exportPageNumber:this.fb.control(j),exportPageSize:this.fb.control(Ct)})}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(t)))(i||t)}})()}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[me([Ae]),Ge],attrs:Ft,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,i){if(o&1){let s=y();r(0,"app-main-panel",7),R("search",function(j){return v(s),b(i.onSearchEvent(j))}),ce("isDialogFilterVisibleChange",function(j){return v(s),se(i.isDialogFilterVisible,j)||(i.isDialogFilterVisible=j),b(j)}),R("filterConfirmed",function(){return v(s),b(i.onFilterEvent())}),h(1,Mt,6,1,"ng-template",null,0,x)(3,Lt,10,5,"ng-template",null,1,x)(5,Bt,5,2,"ng-template",null,2,x),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),pe("isDialogFilterVisible",i.isDialogFilterVisible),m("scrollable",!0))},dependencies:[L,k,Q,ke,Me,at,lt,M,D,W,ue,V,nt,De,Pe,J,Y,be,he,X,_e,Ee,ve,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var Z=yt(Rt());var qt=["class","page"],Ut=()=>["/pages/recurring/recurring-expense"],ae=t=>({"ng-dirty ng-invalid":t}),zt=()=>({});function Gt(t,c){if(t&1){let e=y();r(0,"div",5)(1,"a",6),a(2," Cancel "),n(),r(3,"p-button",7),R("click",function(){v(e);let i=g();return b(i.onSubmit())}),n()()}t&2&&(l(),m("routerLink",Ve(1,Ut)))}function Ht(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function $t(t,c){if(t&1&&(r(0,"div",32)(1,"div",33),a(2),n()()),t&2){let e=c.$implicit;l(2),I(" ",e.name," ")}}function Wt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Kt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Xt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Yt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Jt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Qt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Zt(t,c){if(t&1){let e=y();r(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",13)(9,"div",16)(10,"label",17),a(11,"Name"),n(),d(12,"input",18),r(13,"div"),H(14,Ht,2,1,"small",19,G),n()()(),r(16,"div",20,2)(18,"div",16)(19,"label",17),a(20,"Outlet"),n(),r(21,"p-select",21),h(22,$t,3,1,"ng-template",null,3,x),n()()(),r(24,"div",20)(25,"div",16)(26,"div")(27,"label",17),a(28,"Supplier"),n(),r(29,"p-autocomplete",22),R("completeMethod",function(i){v(e);let s=g(2);return b(s.searchContact(i))}),n()(),r(30,"div"),H(31,Wt,2,1,"small",19,G),n()()(),r(33,"div",20)(34,"div",16)(35,"label",17),a(36,"From"),n(),d(37,"p-datepicker",23),n()(),r(38,"div",20)(39,"div",16)(40,"label",17),a(41,"To"),n(),d(42,"p-datepicker",24),n()(),d(43,"div",25),n(),d(44,"hr"),r(45,"div",15)(46,"div",20)(47,"div",16)(48,"label",17),a(49,"Amount"),n(),d(50,"input",26),r(51,"div"),H(52,Kt,2,1,"small",19,G),n()()(),r(54,"div",20)(55,"div",16)(56,"label",17),a(57,"Frequency"),n(),d(58,"p-select",27),n()(),r(59,"div",20)(60,"div",16)(61,"label",17),a(62,"Expense (Debit)"),n(),r(63,"p-select",28),h(64,Xt,6,2,"ng-template",null,3,x),n()(),r(66,"div"),H(67,Yt,2,1,"small",19,G),n()(),r(69,"div",20)(70,"div",16)(71,"label",17),a(72,"Payment (Credit)"),n(),r(73,"p-select",29),h(74,Jt,6,2,"ng-template",null,3,x),n()(),r(76,"div"),H(77,Qt,2,1,"small",19,G),n()(),r(79,"div",30)(80,"div",16)(81,"label",17),a(82,"Description"),n(),d(83,"textarea",31),n()()()()()()()()()()}if(t&2){let e,o,i,s,p=g(2);l(6),m("formGroup",p.recurringExpenseForm),l(6),m("ngClass",C(17,ae,p.isInvalid("name"))),l(2),$(p.getErrors("name")),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(8),m("showClear",!0)("ngClass",C(19,ae,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),$(p.getErrors("contact")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(8),m("ngClass",C(21,ae,p.isInvalid("amount")))("autoNumeric",Ve(23,zt)),l(2),$(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(i=p.recurringExpenseData())==null||i.options==null?null:i.options.expenses)("ngClass",C(24,ae,p.isInvalid("expenseAccountID"))),l(4),$(p.getErrors("expenseAccountID")),l(6),m("ngClass",C(26,ae,p.isInvalid("paymentAccountID")))("options",(s=p.recurringExpenseData())==null||s.options==null?null:s.options.assets),l(4),$(p.getErrors("paymentAccountID"))}}function en(t,c){if(t&1&&h(0,Zt,84,28,"div",8),t&2){let e=g();m("ngIf",e.recurringExpenseData())}}var je=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.fb=u(Qe),this.destroyRef=u(ze),this.route=u(de),this.recurringExpenseData=q(null),this.customerSupplierSuggestions=q([]),this.router=u(ge),this.contactType=new Xe(0),this.dayjsService=u(mt)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[K.required]),repeatTypeID:this.fb.control(1,[K.required]),startDate:this.fb.control((0,Z.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[K.required]),paymentAccountID:this.fb.control(null,[K.required]),expenseAccountID:this.fb.control(null,[K.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(z(e=>e.get("id")),O(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),w(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"startDate":i[s]=(0,Z.default)(p).isSame((0,Z.default)("0001-01-01T00:00:00"))?(0,Z.default)().toDate():(0,Z.default)(p).toDate();break;case"repeatTypeID":i[s]=1;break;case"contactID":i.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":i[s]=p===re?null:p;break;case"expenseAccountID":i[s]=p===re?null:p;break;default:i[s]=p}return i},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(w(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"amount":i[s]=+p;break;case"startDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"endDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?i.contactID=p:typeof p=="object"&&p!==null?i.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:i.contactID=re;break;default:i[s]=p;break}return i},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let i=[];for(let[s,p]of Object.entries(o.errors))switch(s){case"required":i.push("This field is required.");break;case"minlength":i.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":i.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":i.push("Please enter a valid email address.");break;case"pattern":i.push("The format is invalid.");break;case"min":i.push(`Minimum value is ${p.min}.`);break;case"max":i.push(`Maximum value is ${p.max}.`);break;default:i.push("Invalid value.")}return i}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:qt,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"row","row-gap-2"],[1,"d-flex","flex-column"],["for",""],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],[1,"col","col-lg-6"],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"col"],["formControlName","amount","type","text","pInputText","",3,"ngClass","autoNumeric"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,Gt,4,2,"ng-template",null,0,x)(3,en,1,1,"ng-template",null,1,x),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Q,Ce,Se,De,Pe,rt,it,gt,dt,st,pt,Re,ye,M,We,D,be,he,xe,X,_e,Ee,ve,V,k,J,Y,ut,A,N,ot],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var tn=["class","page"],nn=t=>["/pages/recurring/recurring-expense/edit",t];function rn(t,c){if(t&1&&(r(0,"a",7),d(1,"i",8),r(2,"span"),a(3,"Edit"),n()()),t&2){let e=g(4);m("routerLink",C(1,nn,e.currentRecurringExpense().id))}}function on(t,c){if(t&1){let e=y();r(0,"p-button",9),R("onClick",function(){v(e);let i=g(4);return b(i.onDeleteRecurringExpense(i.currentRecurringExpense().id))}),n()}}function an(t,c){if(t&1&&(r(0,"div",4),h(1,rn,4,3,"a",5)(2,on,1,0,"p-button",6),n()),t&2){let e=g(3);l(),m("ngIf",e.roleService.setup.recurring),l(),m("ngIf",e.roleService.setup.recurring)}}function ln(t,c){if(t&1&&h(0,an,3,2,"div",3),t&2){let e=g(2);m("ngIf",e.currentRecurringExpense())}}function pn(t,c){if(t&1){let e=y();r(0,"p-panel",13)(1,"p-scroll-panel")(2,"div",10)(3,"div",14)(4,"div",15)(5,"div",14)(6,"div",16)(7,"div",17)(8,"div",18)(9,"label",19),a(10,"Outlet"),n(),r(11,"input",20),ce("ngModelChange",function(i){v(e);let s=g(3);return se(s.currentRecurringExpense().outletName,i)||(s.currentRecurringExpense().outletName=i),b(i)}),n()()(),r(12,"div",17)(13,"div",18)(14,"label",19),a(15,"Supplier"),n(),d(16,"input",21),n()(),r(17,"div",17)(18,"div",18)(19,"label",19),a(20,"From"),n(),d(21,"input",22),S(22,"date"),n()(),r(23,"div",17)(24,"div",18)(25,"label",19),a(26,"To"),n(),d(27,"input",22),S(28,"date"),n()()(),d(29,"hr"),r(30,"div",16)(31,"div",17)(32,"div",18)(33,"label",19),a(34,"Amount"),n(),d(35,"input",22),S(36,"number"),n()(),r(37,"div",17)(38,"div",18)(39,"label",19),a(40,"Frequency"),n(),d(41,"input",22),n()(),r(42,"div",17)(43,"div",18)(44,"label",19),a(45,"Expense (Debit)"),n(),d(46,"input",22),n()(),r(47,"div",17)(48,"div",18)(49,"label",19),a(50,"Payment (Credit)"),n(),d(51,"input",22),n()(),r(52,"div",23)(53,"div",18)(54,"label",19),a(55,"Description"),n(),d(56,"textarea",24),n()()()()()()()()()}if(t&2){let e=g(3);l(11),pe("ngModel",e.currentRecurringExpense().outletName),l(5),m("value",e.currentRecurringExpense().contactName),l(5),m("value",U(22,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",U(28,12,e.currentRecurringExpense().endDate,"d MMM y")),l(8),m("value",F(36,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function sn(t,c){if(t&1&&(r(0,"div",10)(1,"div",11),h(2,pn,57,17,"p-panel",12),n()()),t&2){let e=g(2);l(2),m("ngIf",e.currentRecurringExpense())}}function cn(t,c){if(t&1&&(r(0,"app-main-panel",2),h(1,ln,1,1,"ng-template",null,0,x)(3,sn,3,1,"ng-template",null,1,x),n()),t&2){let e=g();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Et=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.route=u(de),this.router=u(ge),this.currentRecurringExpense=q(null),this.roleService=u(et)}ngOnInit(){this.route.paramMap.pipe(z(e=>e.get("id")),Ne("params"),qe(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),w(e=>this.currentRecurringExpense.set(e)),Ne("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:tn,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["class","p-button p-button-outlined p-button-secondary d-flex gap-2 align-items-center",3,"routerLink",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["type","text","readonly","","pInputText","",3,"value"],["readonly","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,i){o&1&&h(0,cn,5,3,"app-main-panel",2),o&2&&He(i.currentRecurringExpense()?0:-1)},dependencies:[L,Q,M,D,W,ue,Ce,Se,Ze,xe,X,Ye,J,Y,V,k,A,N,Re,ye],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var vt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:_t},{path:"create",component:je},{path:"details/:id",component:Et},{path:"edit/:id",component:je}]}];var bt=(()=>{class t{constructor(){this.httpService=u(fe)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mn={filter:{Text:"",Frequency:0,PageNumber:1,PageSize:10},data:null},Oe=Ie(Fe(mn),we(t=>{let c=u(bt);return{getAssetValue:ne(ee(O(o=>c.getAssetValue(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching asset value:",i)}}))))),updateFilter:o=>{T(t,i=>_(f({},i),{filter:o}))}}}),Te({onInit:t=>{t.getAssetValue(t.filter())}}));var un=t=>["/pages/recurring/recurring-expense/details/",t];function dn(t,c){t&1&&d(0,"div",5)}function gn(t,c){t&1&&(r(0,"tr")(1,"th"),a(2,"Outlet"),n(),r(3,"th"),a(4,"Name"),n(),r(5,"th"),a(6,"Account Code"),n(),r(7,"th",8),a(8,"Price on Purchase"),n(),r(9,"th",8),a(10,"Accomulated Depreciation"),n(),r(11,"th",8),a(12,"Book Value"),n(),r(13,"th",8),a(14,"Frequency"),n()())}function fn(t,c){if(t&1&&(r(0,"tr")(1,"td"),a(2),n(),r(3,"td")(4,"a",9),a(5),n()(),r(6,"td"),a(7),n(),r(8,"td",8),a(9),S(10,"number"),n(),r(11,"td",8),a(12),S(13,"number"),n(),r(14,"td",8),a(15),S(16,"number"),n(),r(17,"td",8),a(18),S(19,"number"),n()()),t&2){let e=c.$implicit;l(2),E(e.entityName),l(2),m("routerLink",C(16,un,e.id)),l(),E(e.name),l(2),E(e.accountCode),l(2),E(F(10,8,e.priceOnPurchase)),l(3),I(" ",F(13,10,e.accumulatedDepreciation)," "),l(3),I(" ",F(16,12,e.bookValue)," "),l(3),I(" ",F(19,14,e.depreciationPerYear)," ")}}function xn(t,c){if(t&1&&(r(0,"p-panel")(1,"p-table",7),h(2,gn,15,0,"ng-template",null,2,x)(4,fn,20,18,"ng-template",null,3,x),n()()),t&2){let e=g(2);l(),m("value",e.store.data().data)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().count)}}function _n(t,c){if(t&1&&h(0,xn,6,3,"p-panel",6),t&2){let e=g();m("ngIf",e.store.data())}}var St=(()=>{class t{constructor(){this.store=u(Oe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-asset-value"]],features:[me([Oe])],decls:5,vars:2,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput","scrollable"],[1,"d-flex","gap-2"],[4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,dn,1,0,"ng-template",null,0,x)(3,_n,1,1,"ng-template",null,1,x),n()),o&2&&m("isSearchableInput",!0)("scrollable",!0)},dependencies:[L,M,D,W,A,N,ke,Me,V,k],encapsulation:2})}}return t})();var ur=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:vt},{path:"asset-value",component:St},{path:"post-to-journal",loadComponent:()=>import("./chunk-AIUDSJBN.js").then(t=>t.PostRecurringExpenseComponent)}];export{ur as RECURRING_ROUTES};
1
+ import{a as re}from"./chunk-G4XX7EU2.js";import{a as dt,b as gt}from"./chunk-S2Q6V4IV.js";import{a as ut}from"./chunk-T4TFJFL4.js";import{a as Ke}from"./chunk-YO2YHPV5.js";import{a as Rt,b as pt}from"./chunk-W7Q3NWBG.js";import"./chunk-64ODJHGP.js";import{a as st,b as ct}from"./chunk-V6VS3FMZ.js";import{a as mt}from"./chunk-XKI7WLHE.js";import"./chunk-GLOECGB7.js";import{a as et}from"./chunk-YS5U5SXP.js";import"./chunk-KKZF4RQM.js";import{a as ne,b as ie}from"./chunk-RNPNKSFR.js";import{b as ot,d as Me,i as at,j as lt,k as ke}from"./chunk-BRCJWPEZ.js";import{a as it,b as rt}from"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import{a as Ne}from"./chunk-7CUSFSFC.js";import{a as ye,b as Re}from"./chunk-CDXFHUDN.js";import"./chunk-NI4XE6XQ.js";import{a as Pe,b as De}from"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{b as Q}from"./chunk-PS4MFIBX.js";import{f as nt,h as L}from"./chunk-MS6ARTHK.js";import"./chunk-WNA57NZF.js";import{a as N,b as A}from"./chunk-MUFRLGLG.js";import{a as T,b as Ie,c as tt,d as Te,e as we,f as Fe}from"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{n as Se,o as Ce,w as Y,x as J}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{b as xe,c as K,e as X,f as _e,i as Xe,j as Ye,k as he,l as Ee,o as ve,u as Je,v as Qe,w as Ze,x as be}from"./chunk-NHXCR55X.js";import{b as de,d as ge,e as k,l as V}from"./chunk-DOKG43W6.js";import{a as fe}from"./chunk-I5YQOGRZ.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as We,k as D,p as ue,q as W,s as M}from"./chunk-VU532YE3.js";import{Ab as Ge,Bc as me,Cb as h,Cc as Ve,Dc as C,Ga as q,J as qe,Kb as m,Mc as S,Nc as F,Oc as U,Pb as He,Qb as G,Qc as x,Sb as H,Tb as $,Ub as r,Vb as n,Wb as d,X as O,Z as w,_b as y,ad as te,ba as le,c as ee,dc as R,ec as g,gb as l,ha as u,pa as v,qa as b,qc as a,rc as E,s as z,sc as I,ta as Ue,uc as $e,vc as pe,wa as ze,wb as P,wc as se,xc as ce}from"./chunk-7IC4BZ6J.js";import{a as f,b as _,e as yt}from"./chunk-YQFG5XE2.js";var B=(()=>{class t{#e=u(fe);#t=u(Ke);getRecurringExpenseLoader(){return this.#e.get(void 0,"api/RecurringExpenseLoader/GetList")}getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",o)}fetchCustomerSuggestion(e){let o={count:100,prefix:e};return this.#e.post(this.#t.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",o)}submitRecurringExpense(e,o={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,o)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let o={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",o)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var It={data:{data:[],count:0},meta:{Options:{Frequencies:[]},Filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},filter:{text:null,Frequency:0,pageNumber:1,pageSize:20,export:!1,exportPageNumber:1,exportPageSize:1e4}},Ae=Ie(Fe(It),tt(t=>({first:te(()=>(t.filter().pageNumber-1)*t.filter().pageSize+1),end:te(()=>Math.min(t.filter().pageNumber*t.filter().pageSize,t.data().count)),hasCheckedRows:te(()=>t.data().data.some(c=>c.checked)),checkedInvoice:te(()=>t.data().data.filter(c=>c.checked).map(c=>c.id))})),we(t=>{let c=u(B);return{updateFilter(o){T(t,i=>_(f({},i),{filter:f(f({},i.filter),o)}))},onRowSelect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!0}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onRowUnselect(o){T(t,i=>{let s=i.data.data.map(p=>p.id===o.id?_(f({},p),{checked:!1}):p);return _(f({},i),{data:_(f({},i.data),{data:s})})})},onHeaderCheckboxToggle(o){T(t,i=>{let s=i.data.data.map(p=>_(f({},p),{checked:o}));return _(f({},i),{data:_(f({},i.data),{data:s})})})},getRecurringExpenseLoader:ne(ee(O(()=>c.getRecurringExpenseLoader().pipe(ie({next:o=>{T(t,i=>_(f({},i),{meta:o}))},error:o=>{console.error("Error fetching Recurring Expense Loader:",o)}}))))),getRecurringExpenses:ne(ee(z(o=>Object.entries(o).reduce((i,[s,p])=>(p!=null&&(i[s]=p),i),{})),O(o=>c.getRecurringExpenses(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching Recurring Expenses:",i)}})))))}}),Te(t=>({onInit:()=>{t.getRecurringExpenseLoader(),t.getRecurringExpenses(t.filter)}})));var Ft=["class","page"],Pt=t=>["details/",t];function Dt(t,c){if(t&1){let e=y();r(0,"p-button",12),R("onClick",function(){v(e);let i=g(2);return b(i.onDeleteSelected())}),n()}}function Mt(t,c){if(t&1&&(r(0,"div",8),h(1,Dt,1,0,"p-button",9),r(2,"a",10),d(3,"i",11),r(4,"span"),a(5,"Add"),n()()()),t&2){let e=g();l(),m("ngIf",e.store.hasCheckedRows())}}function kt(t,c){t&1&&(r(0,"tr")(1,"th"),d(2,"p-tableHeaderCheckbox"),n(),r(3,"th"),a(4,"Outlet"),n(),r(5,"th"),a(6,"Name"),n(),r(7,"th"),a(8,"Expense Account"),n(),r(9,"th"),a(10,"Start Date"),n(),r(11,"th"),a(12,"End Date"),n(),r(13,"th"),a(14,"Last Expense"),n(),r(15,"th"),a(16,"Amount"),n(),r(17,"th"),a(18,"Frequency"),n()())}function Vt(t,c){if(t&1&&(r(0,"tr")(1,"td"),d(2,"p-tableCheckbox",14),n(),r(3,"td"),a(4),n(),r(5,"td")(6,"a",15),a(7),n()(),r(8,"td"),a(9),n(),r(10,"td"),a(11),S(12,"date"),n(),r(13,"td"),a(14),S(15,"date"),n(),r(16,"td"),a(17),S(18,"date"),n(),r(19,"td"),a(20),S(21,"number"),n(),r(22,"td"),a(23),n()()),t&2){let e=c.$implicit;l(2),m("value",e),l(2),E(e.outletName),l(2),m("routerLink",C(21,Pt,e.id)),l(),E(e.name),l(2),E(e.expenseName),l(2),E(U(12,10,e.startDate,"d MMM y")),l(3),E(U(15,13,e.endDate,"d MMM y")),l(3),E(U(18,16,e.lastExpenseDate,"d MMM y")),l(3),E(F(21,19,e.amount)),l(3),E(e.repeatTypeLabel)}}function Nt(t,c){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=g(2);l(),$e(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().count," entries ")}}function At(t,c){t&1&&(r(0,"tr")(1,"td",16)(2,"span"),a(3,"No recurring expenses found."),n()()())}function Lt(t,c){if(t&1){let e=y();r(0,"p-panel")(1,"p-table",13),R("onPage",function(i){v(e);let s=g();return b(s.onPageChange(i))})("onHeaderCheckboxToggle",function(i){v(e);let s=g();return b(s.onHeaderCheckboxToggle(i))})("onRowSelect",function(i){v(e);let s=g();return b(s.onRowSelect(i))})("onRowUnselect",function(i){v(e);let s=g();return b(s.onRowUnselect(i))}),h(2,kt,19,0,"ng-template",null,3,x)(4,Vt,24,23,"ng-template",null,4,x)(6,Nt,2,3,"ng-template",null,5,x)(8,At,4,0,"ng-template",null,6,x),n()()}if(t&2){let e=g();l(),m("lazy",!0)("totalRecords",e.store.data().count)("rows",e.store.filter().pageSize)("paginator",!0)("value",e.store.data().data)}}function Bt(t,c){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Type"),n(),d(4,"p-select",20),n()()),t&2){let e=g();m("formGroup",e.form),l(4),m("options",e.store.meta().Options.Frequencies)}}var _t=(()=>{class t extends mt{constructor(){super(...arguments),this.store=u(Ae),this.recurringExpenseService=u(B),this.fb=u(Je),this.isDialogFilterVisible=q(!1)}ngOnInit(){this.initForm()}onPageChange(e){let o=e.first/e.rows;this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:o+1}))}onDeleteSelected(){this.recurringExpenseService.removeRecurringExpenses(this.store.checkedInvoice()).pipe(w(()=>{this.store.updateFilter(_(f({},this.store.filter()),{pageNumber:1}))})).subscribe()}onSearchEvent(e){this.store.updateFilter(_(f({},this.store.filter()),{text:e}))}onFilterEvent(){this.onSubmitFilterDialog()}onSubmitFilterDialog(){if(this.form.invalid){this.form.markAllAsTouched();return}let e=Object.entries(this.form.getRawValue()).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{});this.store.updateFilter(e),this.isDialogFilterVisible.update(o=>!o)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}initForm(){let{text:e,Frequency:o,pageNumber:i,pageSize:s,export:p,exportPageNumber:j,exportPageSize:Ct}=this.store.filter();this.form=this.fb.group({text:this.fb.control(e),Frequency:this.fb.control(o),pageNumber:this.fb.control(i),pageSize:this.fb.control(s),export:this.fb.control(p),exportPageNumber:this.fb.control(j),exportPageSize:this.fb.control(Ct)})}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=Ue(t)))(i||t)}})()}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense",8,"page"]],features:[me([Ae]),Ge],attrs:Ft,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Recurring Expenses",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],["colspan","9"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Type",3,"options"]],template:function(o,i){if(o&1){let s=y();r(0,"app-main-panel",7),R("search",function(j){return v(s),b(i.onSearchEvent(j))}),ce("isDialogFilterVisibleChange",function(j){return v(s),se(i.isDialogFilterVisible,j)||(i.isDialogFilterVisible=j),b(j)}),R("filterConfirmed",function(){return v(s),b(i.onFilterEvent())}),h(1,Mt,6,1,"ng-template",null,0,x)(3,Lt,10,5,"ng-template",null,1,x)(5,Bt,5,2,"ng-template",null,2,x),n()}o&2&&(m("isSearchableInput",!0)("isFilterable",!0),pe("isDialogFilterVisible",i.isDialogFilterVisible),m("scrollable",!0))},dependencies:[L,k,Q,ke,Me,at,lt,M,D,W,ue,V,nt,De,Pe,J,Y,be,he,X,_e,Ee,ve,A,N],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var Z=yt(Rt());var qt=["class","page"],Ut=()=>["/pages/recurring/recurring-expense"],ae=t=>({"ng-dirty ng-invalid":t}),zt=()=>({});function Gt(t,c){if(t&1){let e=y();r(0,"div",5)(1,"a",6),a(2," Cancel "),n(),r(3,"p-button",7),R("click",function(){v(e);let i=g();return b(i.onSubmit())}),n()()}t&2&&(l(),m("routerLink",Ve(1,Ut)))}function Ht(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function $t(t,c){if(t&1&&(r(0,"div",32)(1,"div",33),a(2),n()()),t&2){let e=c.$implicit;l(2),I(" ",e.name," ")}}function Wt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Kt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Xt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Yt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Jt(t,c){if(t&1&&(r(0,"div",5)(1,"div")(2,"span"),a(3),n()(),r(4,"div",33),a(5),n()()),t&2){let e=c.$implicit;l(3),I("(",e.code,")"),l(2),I(" ",e.value," ")}}function Qt(t,c){if(t&1&&(r(0,"small",19),a(1),n()),t&2){let e=c.$implicit;l(),E(e)}}function Zt(t,c){if(t&1){let e=y();r(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-scroll-panel")(4,"div",12)(5,"div",13)(6,"form",14)(7,"div",15)(8,"div",13)(9,"div",16)(10,"label",17),a(11,"Name"),n(),d(12,"input",18),r(13,"div"),H(14,Ht,2,1,"small",19,G),n()()(),r(16,"div",20,2)(18,"div",16)(19,"label",17),a(20,"Outlet"),n(),r(21,"p-select",21),h(22,$t,3,1,"ng-template",null,3,x),n()()(),r(24,"div",20)(25,"div",16)(26,"div")(27,"label",17),a(28,"Supplier"),n(),r(29,"p-autocomplete",22),R("completeMethod",function(i){v(e);let s=g(2);return b(s.searchContact(i))}),n()(),r(30,"div"),H(31,Wt,2,1,"small",19,G),n()()(),r(33,"div",20)(34,"div",16)(35,"label",17),a(36,"From"),n(),d(37,"p-datepicker",23),n()(),r(38,"div",20)(39,"div",16)(40,"label",17),a(41,"To"),n(),d(42,"p-datepicker",24),n()(),d(43,"div",25),n(),d(44,"hr"),r(45,"div",15)(46,"div",20)(47,"div",16)(48,"label",17),a(49,"Amount"),n(),d(50,"input",26),r(51,"div"),H(52,Kt,2,1,"small",19,G),n()()(),r(54,"div",20)(55,"div",16)(56,"label",17),a(57,"Frequency"),n(),d(58,"p-select",27),n()(),r(59,"div",20)(60,"div",16)(61,"label",17),a(62,"Expense (Debit)"),n(),r(63,"p-select",28),h(64,Xt,6,2,"ng-template",null,3,x),n()(),r(66,"div"),H(67,Yt,2,1,"small",19,G),n()(),r(69,"div",20)(70,"div",16)(71,"label",17),a(72,"Payment (Credit)"),n(),r(73,"p-select",29),h(74,Jt,6,2,"ng-template",null,3,x),n()(),r(76,"div"),H(77,Qt,2,1,"small",19,G),n()(),r(79,"div",30)(80,"div",16)(81,"label",17),a(82,"Description"),n(),d(83,"textarea",31),n()()()()()()()()()()}if(t&2){let e,o,i,s,p=g(2);l(6),m("formGroup",p.recurringExpenseForm),l(6),m("ngClass",C(17,ae,p.isInvalid("name"))),l(2),$(p.getErrors("name")),l(7),m("options",(e=p.recurringExpenseData())==null||e.options==null?null:e.options.entities),l(8),m("showClear",!0)("ngClass",C(19,ae,p.isInvalid("contact")))("suggestions",p.customerSupplierSuggestions()),l(2),$(p.getErrors("contact")),l(6),m("iconDisplay","input")("showIcon",!0),l(5),m("iconDisplay","input")("showIcon",!0),l(8),m("ngClass",C(21,ae,p.isInvalid("amount")))("autoNumeric",Ve(23,zt)),l(2),$(p.getErrors("amount")),l(6),m("options",(o=p.recurringExpenseData())==null||o.options==null?null:o.options.frequency),l(5),m("options",(i=p.recurringExpenseData())==null||i.options==null?null:i.options.expenses)("ngClass",C(24,ae,p.isInvalid("expenseAccountID"))),l(4),$(p.getErrors("expenseAccountID")),l(6),m("ngClass",C(26,ae,p.isInvalid("paymentAccountID")))("options",(s=p.recurringExpenseData())==null||s.options==null?null:s.options.assets),l(4),$(p.getErrors("paymentAccountID"))}}function en(t,c){if(t&1&&h(0,Zt,84,28,"div",8),t&2){let e=g();m("ngIf",e.recurringExpenseData())}}var je=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.fb=u(Qe),this.destroyRef=u(ze),this.route=u(de),this.recurringExpenseData=q(null),this.customerSupplierSuggestions=q([]),this.router=u(ge),this.contactType=new Xe(0),this.dayjsService=u(pt)}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[K.required]),repeatTypeID:this.fb.control(1,[K.required]),startDate:this.fb.control((0,Z.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[K.required]),paymentAccountID:this.fb.control(null,[K.required]),expenseAccountID:this.fb.control(null,[K.required]),contact:this.fb.control("",[]),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(z(e=>e.get("id")),O(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),w(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"startDate":i[s]=(0,Z.default)(p).isSame((0,Z.default)("0001-01-01T00:00:00"))?(0,Z.default)().toDate():(0,Z.default)(p).toDate();break;case"repeatTypeID":i[s]=1;break;case"contactID":i.contact=e.contactID?{Key:e.contactID,Value:e.contactName}:null;break;case"paymentAccountID":i[s]=p===re?null:p;break;case"expenseAccountID":i[s]=p===re?null:p;break;default:i[s]=p}return i},{});this.recurringExpenseForm.patchValue(o)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(w(this.customerSupplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let o=Object.entries(e).reduce((i,[s,p])=>{switch(s){case"amount":i[s]=+p;break;case"startDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"endDate":i[s]=p?this.dayjsService.from(p).format():null;break;case"contact":typeof p=="string"?i.contactID=p:typeof p=="object"&&p!==null?i.contactID=p&&Object.prototype.hasOwnProperty.call(p,"Key")?p.Key:p:i.contactID=re;break;default:i[s]=p;break}return i},{});this.recurringExpenseService.submitRecurringExpense(o).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}isInvalid(e){let o=this.recurringExpenseForm.controls[e];return o.invalid&&(o.dirty||o.touched)}getErrors(e){if(!this.isInvalid(e))return null;let o=this.recurringExpenseForm.controls[e];if(!o.errors)return null;let i=[];for(let[s,p]of Object.entries(o.errors))switch(s){case"required":i.push("This field is required.");break;case"minlength":i.push(`Minimum length is ${p.requiredLength} characters.`);break;case"maxlength":i.push(`Maximum length is ${p.requiredLength} characters.`);break;case"email":i.push("Please enter a valid email address.");break;case"pattern":i.push("The format is invalid.");break;case"min":i.push(`Minimum value is ${p.min}.`);break;case"max":i.push(`Maximum value is ${p.max}.`);break;default:i.push("Invalid value.")}return i}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:qt,decls:5,vars:2,consts:[["actionButton",""],["content",""],["outlet",""],["item",""],["pageTitle","Recurring Expense Form",3,"hasMainWrapperPadding","overflowScroll"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],[1,"h-100","d-flex"],[1,"row","justify-content-center","h-100"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"row","row-gap-2"],[1,"d-flex","flex-column"],["for",""],["formControlName","name","type","text","pInputText","",3,"ngClass"],[1,"text-danger"],[1,"col","col-lg-6"],["filter","","filterBy","name","appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","contact","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","showClear","ngClass","suggestions"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["appendTo","body","formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"col"],["formControlName","amount","type","text","pInputText","",3,"ngClass","autoNumeric"],["appendTo","body","formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["appendTo","body","formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Expense","filter","","filterBy","code,value",3,"options","ngClass"],["appendTo","body","formControlName","paymentAccountID","optionLabel","value","optionValue","key","filter","","filterBy","code,value","placeholder","Select Payment",3,"ngClass","options"],[1,"col","col-lg-12"],["formControlName","description","rows","3","cols","30","pTextarea",""],[1,"flex","items-center","gap-2"],[1,"text-truncate","d-inline-block",2,"max-width","250px"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,Gt,4,2,"ng-template",null,0,x)(3,en,1,1,"ng-template",null,1,x),n()),o&2&&m("hasMainWrapperPadding",!0)("overflowScroll",!0)},dependencies:[L,Q,Ce,Se,De,Pe,rt,it,gt,dt,ct,st,Re,ye,M,We,D,be,he,xe,X,_e,Ee,ve,V,k,J,Y,ut,A,N,ot],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var tn=["class","page"],nn=t=>["/pages/recurring/recurring-expense/edit",t];function rn(t,c){if(t&1&&(r(0,"a",7),d(1,"i",8),r(2,"span"),a(3,"Edit"),n()()),t&2){let e=g(4);m("routerLink",C(1,nn,e.currentRecurringExpense().id))}}function on(t,c){if(t&1){let e=y();r(0,"p-button",9),R("onClick",function(){v(e);let i=g(4);return b(i.onDeleteRecurringExpense(i.currentRecurringExpense().id))}),n()}}function an(t,c){if(t&1&&(r(0,"div",4),h(1,rn,4,3,"a",5)(2,on,1,0,"p-button",6),n()),t&2){let e=g(3);l(),m("ngIf",e.roleService.setup.recurring),l(),m("ngIf",e.roleService.setup.recurring)}}function ln(t,c){if(t&1&&h(0,an,3,2,"div",3),t&2){let e=g(2);m("ngIf",e.currentRecurringExpense())}}function pn(t,c){if(t&1){let e=y();r(0,"p-panel",13)(1,"p-scroll-panel")(2,"div",10)(3,"div",14)(4,"div",15)(5,"div",14)(6,"div",16)(7,"div",17)(8,"div",18)(9,"label",19),a(10,"Outlet"),n(),r(11,"input",20),ce("ngModelChange",function(i){v(e);let s=g(3);return se(s.currentRecurringExpense().outletName,i)||(s.currentRecurringExpense().outletName=i),b(i)}),n()()(),r(12,"div",17)(13,"div",18)(14,"label",19),a(15,"Supplier"),n(),d(16,"input",21),n()(),r(17,"div",17)(18,"div",18)(19,"label",19),a(20,"From"),n(),d(21,"input",22),S(22,"date"),n()(),r(23,"div",17)(24,"div",18)(25,"label",19),a(26,"To"),n(),d(27,"input",22),S(28,"date"),n()()(),d(29,"hr"),r(30,"div",16)(31,"div",17)(32,"div",18)(33,"label",19),a(34,"Amount"),n(),d(35,"input",22),S(36,"number"),n()(),r(37,"div",17)(38,"div",18)(39,"label",19),a(40,"Frequency"),n(),d(41,"input",22),n()(),r(42,"div",17)(43,"div",18)(44,"label",19),a(45,"Expense (Debit)"),n(),d(46,"input",22),n()(),r(47,"div",17)(48,"div",18)(49,"label",19),a(50,"Payment (Credit)"),n(),d(51,"input",22),n()(),r(52,"div",23)(53,"div",18)(54,"label",19),a(55,"Description"),n(),d(56,"textarea",24),n()()()()()()()()()}if(t&2){let e=g(3);l(11),pe("ngModel",e.currentRecurringExpense().outletName),l(5),m("value",e.currentRecurringExpense().contactName),l(5),m("value",U(22,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),m("value",U(28,12,e.currentRecurringExpense().endDate,"d MMM y")),l(8),m("value",F(36,15,e.currentRecurringExpense().amount)),l(6),m("value",e.currentRecurringExpense().repeatTypeLabel),l(5),m("value",e.currentRecurringExpense().expenseName),l(5),m("value",e.currentRecurringExpense().paymentName),l(5),m("value",e.currentRecurringExpense().description)}}function sn(t,c){if(t&1&&(r(0,"div",10)(1,"div",11),h(2,pn,57,17,"p-panel",12),n()()),t&2){let e=g(2);l(2),m("ngIf",e.currentRecurringExpense())}}function cn(t,c){if(t&1&&(r(0,"app-main-panel",2),h(1,ln,1,1,"ng-template",null,0,x)(3,sn,3,1,"ng-template",null,1,x),n()),t&2){let e=g();m("pageTitle",e.currentRecurringExpense().name+" Info")("hasMainWrapperPadding",!0)("overflowScroll",!0)}}var Et=(()=>{class t{constructor(){this.recurringExpenseService=u(B),this.route=u(de),this.router=u(ge),this.currentRecurringExpense=q(null),this.roleService=u(et)}ngOnInit(){this.route.paramMap.pipe(z(e=>e.get("id")),Ne("params"),qe(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),w(e=>this.currentRecurringExpense.set(e)),Ne("recurringExpense")).subscribe()}onDeleteRecurringExpense(e){this.recurringExpenseService.removeRecurringExpense(e).pipe(w(()=>{this.router.navigate(["/pages/recurring/recurring-expense"])})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:tn,decls:1,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle","hasMainWrapperPadding","overflowScroll"],["class","d-flex gap-2",4,"ngIf"],[1,"d-flex","gap-2"],["class","p-button p-button-outlined p-button-secondary d-flex gap-2 align-items-center",3,"routerLink",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],[1,"p-button","p-button-outlined","p-button-secondary","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],[1,"row","justify-content-center"],[1,"col-6"],["class","h-100 d-flex",4,"ngIf"],[1,"h-100","d-flex"],[1,"col"],[1,"row"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["readonly","","type","text","pInputText","",3,"ngModelChange","ngModel"],["type","text","readonly","","pInputText","",3,"value"],["readonly","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["readonly","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(o,i){o&1&&h(0,cn,5,3,"app-main-panel",2),o&2&&He(i.currentRecurringExpense()?0:-1)},dependencies:[L,Q,M,D,W,ue,Ce,Se,Ze,xe,X,Ye,J,Y,V,k,A,N,Re,ye],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var vt=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:_t},{path:"create",component:je},{path:"details/:id",component:Et},{path:"edit/:id",component:je}]}];var bt=(()=>{class t{constructor(){this.httpService=u(fe)}getAssetValue(e){return this.httpService.post(void 0,"/api/AssetValue/GetList",e)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mn={filter:{Text:"",Frequency:0,PageNumber:1,PageSize:10},data:null},Oe=Ie(Fe(mn),we(t=>{let c=u(bt);return{getAssetValue:ne(ee(O(o=>c.getAssetValue(o).pipe(ie({next:i=>{T(t,s=>_(f({},s),{data:i}))},error:i=>{console.error("Error fetching asset value:",i)}}))))),updateFilter:o=>{T(t,i=>_(f({},i),{filter:o}))}}}),Te({onInit:t=>{t.getAssetValue(t.filter())}}));var un=t=>["/pages/recurring/recurring-expense/details/",t];function dn(t,c){t&1&&d(0,"div",5)}function gn(t,c){t&1&&(r(0,"tr")(1,"th"),a(2,"Outlet"),n(),r(3,"th"),a(4,"Name"),n(),r(5,"th"),a(6,"Account Code"),n(),r(7,"th",8),a(8,"Price on Purchase"),n(),r(9,"th",8),a(10,"Accomulated Depreciation"),n(),r(11,"th",8),a(12,"Book Value"),n(),r(13,"th",8),a(14,"Frequency"),n()())}function fn(t,c){if(t&1&&(r(0,"tr")(1,"td"),a(2),n(),r(3,"td")(4,"a",9),a(5),n()(),r(6,"td"),a(7),n(),r(8,"td",8),a(9),S(10,"number"),n(),r(11,"td",8),a(12),S(13,"number"),n(),r(14,"td",8),a(15),S(16,"number"),n(),r(17,"td",8),a(18),S(19,"number"),n()()),t&2){let e=c.$implicit;l(2),E(e.entityName),l(2),m("routerLink",C(16,un,e.id)),l(),E(e.name),l(2),E(e.accountCode),l(2),E(F(10,8,e.priceOnPurchase)),l(3),I(" ",F(13,10,e.accumulatedDepreciation)," "),l(3),I(" ",F(16,12,e.bookValue)," "),l(3),I(" ",F(19,14,e.depreciationPerYear)," ")}}function xn(t,c){if(t&1&&(r(0,"p-panel")(1,"p-table",7),h(2,gn,15,0,"ng-template",null,2,x)(4,fn,20,18,"ng-template",null,3,x),n()()),t&2){let e=g(2);l(),m("value",e.store.data().data)("rows",e.store.filter().PageSize)("totalRecords",e.store.data().count)}}function _n(t,c){if(t&1&&h(0,xn,6,3,"p-panel",6),t&2){let e=g();m("ngIf",e.store.data())}}var St=(()=>{class t{constructor(){this.store=u(Oe)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-asset-value"]],features:[me([Oe])],decls:5,vars:2,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Asset Value",3,"isSearchableInput","scrollable"],[1,"d-flex","gap-2"],[4,"ngIf"],["styleClass","h-100","dataKey","id",1,"",3,"value","rows","totalRecords"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"]],template:function(o,i){o&1&&(r(0,"app-main-panel",4),h(1,dn,1,0,"ng-template",null,0,x)(3,_n,1,1,"ng-template",null,1,x),n()),o&2&&m("isSearchableInput",!0)("scrollable",!0)},dependencies:[L,M,D,W,A,N,ke,Me,V,k],encapsulation:2})}}return t})();var ur=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:vt},{path:"asset-value",component:St},{path:"post-to-journal",loadComponent:()=>import("./chunk-NTTAMN4Q.js").then(t=>t.PostRecurringExpenseComponent)}];export{ur as RECURRING_ROUTES};
@@ -1 +1 @@
1
- import{i as N,k as E,l as L,n as j}from"./chunk-PBVHXSHH.js";import{A as y,Ab as g,C as x,Cb as M,Da as c,Dc as H,E as D,K as h,Kb as s,Lb as r,Mb as k,Mc as $,Nc as U,O as I,Q as S,Ub as b,Vb as f,Wb as a,X as _,Z as w,Zb as T,ba as v,ec as u,ga as F,gb as i,ha as B,i as m,mb as P,rb as R,ta as p,wb as l,yb as q}from"./chunk-D4VGEGUS.js";var V=t=>({"background-color":t});function Y(t,d){t&1&&T(0)}function G(t,d){if(t&1&&a(0,"sk-cube-grid",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function z(t,d){if(t&1&&a(0,"sk-chasing-dots",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function X(t,d){if(t&1&&a(0,"sk-double-bounce",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function A(t,d){if(t&1&&a(0,"sk-rotating-plane",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function K(t,d){if(t&1&&a(0,"sk-spinner-pulse",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function Z(t,d){if(t&1&&a(0,"sk-three-bounce",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function J(t,d){if(t&1&&a(0,"sk-wandering-cubes",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function Q(t,d){if(t&1&&a(0,"sk-wave",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function ee(t,d){if(t&1&&(b(0,"div",1),M(1,Y,1,0,"ng-container",2)(2,G,1,1,"sk-cube-grid",3)(3,z,1,1,"sk-chasing-dots",3)(4,X,1,1,"sk-double-bounce",3)(5,A,1,1,"sk-rotating-plane",3)(6,K,1,1,"sk-spinner-pulse",3)(7,Z,1,1,"sk-three-bounce",3)(8,J,1,1,"sk-wandering-cubes",3)(9,Q,1,1,"sk-wave",3),f()),t&2){let e=u();r("opacity",e.opacity()),k("backdrop",e.backdrop()),s("ngStyle",H(14,V,e.backdrop()?e.backdropBackgroundColor():"transparent")),i(),s("ngComponentOutlet",e.entryComponent()),i(),s("ngIf",e.spinner()===e.spinkit.skCubeGrid),i(),s("ngIf",e.spinner()===e.spinkit.skChasingDots),i(),s("ngIf",e.spinner()===e.spinkit.skDoubleBounce),i(),s("ngIf",e.spinner()===e.spinkit.skRotatingPlane),i(),s("ngIf",e.spinner()===e.spinkit.skSpinnerPulse),i(),s("ngIf",e.spinner()===e.spinkit.skThreeBounce),i(),s("ngIf",e.spinner()===e.spinkit.skWanderingCubes),i(),s("ngIf",e.spinner()===e.spinkit.skWave)}}var C=(()=>{class t{backgroundColor=c();static \u0275fac=function(o){return new(o||t)};static \u0275dir=q({type:t,inputs:{backgroundColor:[1,"backgroundColor"]}})}return t})(),te=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-chasing-dots"]],features:[g],decls:3,vars:6,consts:[[1,"sk-chasing-dots"],[1,"sk-child","sk-dot1"],[1,"sk-child","sk-dot2"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-chasing-dots[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative;text-align:center;animation:_ngcontent-%COMP%_sk-chasingDotsRotate 2s infinite linear}.sk-chasing-dots[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:60%;height:60%;display:inline-block;position:absolute;top:0;border-radius:100%;animation:_ngcontent-%COMP%_sk-chasingDotsBounce 2s infinite ease-in-out}.sk-chasing-dots[_ngcontent-%COMP%] .sk-dot2[_ngcontent-%COMP%]{top:auto;bottom:0;animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-chasingDotsRotate{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_sk-chasingDotsBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]})}return t})(),ne=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-cube-grid"]],features:[g],decls:10,vars:20,consts:[[1,"sk-cube-grid"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"],[1,"sk-cube","sk-cube3"],[1,"sk-cube","sk-cube4"],[1,"sk-cube","sk-cube5"],[1,"sk-cube","sk-cube6"],[1,"sk-cube","sk-cube7"],[1,"sk-cube","sk-cube8"],[1,"sk-cube","sk-cube9"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-cube-grid[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:33.33%;height:33.33%;float:left;animation:_ngcontent-%COMP%_sk-cubeGridScaleDelay 1.3s infinite ease-in-out}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube1[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube3[_ngcontent-%COMP%]{animation-delay:.4s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube4[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube5[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube6[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube7[_ngcontent-%COMP%]{animation-delay:0s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube8[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube9[_ngcontent-%COMP%]{animation-delay:.2s}@keyframes _ngcontent-%COMP%_sk-cubeGridScaleDelay{0%,70%,to{transform:scaleZ(1)}35%{transform:scale3D(0,0,1)}}"]})}return t})(),oe=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-double-bounce"]],features:[g],decls:3,vars:6,consts:[[1,"sk-double-bounce"],[1,"sk-child","sk-double-bounce1"],[1,"sk-child","sk-double-bounce2"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-double-bounce[_ngcontent-%COMP%]{top:50%;width:40px;height:40px;position:relative;margin:auto}.sk-double-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;background-color:#333;opacity:.6;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-doubleBounce 2s infinite ease-in-out}.sk-double-bounce[_ngcontent-%COMP%] .sk-double-bounce2[_ngcontent-%COMP%]{animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-doubleBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]})}return t})(),ie=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-rotating-plane"]],features:[g],decls:1,vars:2,consts:[[1,"sk-rotating-plane","colored-parent"]],template:function(o,n){o&1&&a(0,"div",0),o&2&&r("background-color",n.backgroundColor())},styles:[".sk-rotating-plane[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;animation:_ngcontent-%COMP%_sk-rotatePlane 1.2s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-rotatePlane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}"]})}return t})(),re=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-spinner-pulse"]],features:[g],decls:1,vars:2,consts:[[1,"sk-spinner","sk-spinner-pulse","colored-parent"]],template:function(o,n){o&1&&a(0,"div",0),o&2&&r("background-color",n.backgroundColor())},styles:[".sk-spinner-pulse[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;border-radius:100%;animation:_ngcontent-%COMP%_sk-pulseScaleOut 1s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-pulseScaleOut{0%{transform:scale(0)}to{transform:scale(1);opacity:0}}"]})}return t})(),se=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-three-bounce"]],features:[g],decls:4,vars:8,consts:[[1,"sk-three-bounce"],[1,"sk-child","sk-bounce1"],[1,"sk-child","sk-bounce2"],[1,"sk-child","sk-bounce3"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2)(3,"div",3),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-three-bounce[_ngcontent-%COMP%]{top:50%;position:relative;margin:auto;width:80px;text-align:center}.sk-three-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:100%;display:inline-block;animation:_ngcontent-%COMP%_sk-three-bounce 1.4s ease-in-out 0s infinite both}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce1[_ngcontent-%COMP%]{animation-delay:-.32s}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce2[_ngcontent-%COMP%]{animation-delay:-.16s}@keyframes _ngcontent-%COMP%_sk-three-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}"]})}return t})(),ae=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-wandering-cubes"]],features:[g],decls:3,vars:6,consts:[[1,"sk-wandering-cubes"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-wandering-cubes[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:10px;height:10px;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-wanderingCube 1.8s ease-in-out -1.8s infinite both}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:-.9s}@keyframes _ngcontent-%COMP%_sk-wanderingCube{0%{transform:rotate(0)}25%{transform:translate(30px) rotate(-90deg) scale(.5)}50%{transform:translate(30px) translateY(30px) rotate(-179deg)}50.1%{transform:translate(30px) translateY(30px) rotate(-180deg)}75%{transform:translate(0) translateY(30px) rotate(-270deg) scale(.5)}to{transform:rotate(-360deg)}}"]})}return t})(),ce=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-wave"]],features:[g],decls:6,vars:12,consts:[[1,"sk-wave"],[1,"sk-rect","sk-rect1"],[1,"sk-rect","sk-rect2"],[1,"sk-rect","sk-rect3"],[1,"sk-rect","sk-rect4"],[1,"sk-rect","sk-rect5"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-wave[_ngcontent-%COMP%]{position:relative;top:50%;margin:auto;width:50px;height:40px;text-align:center;font-size:10px}.sk-wave[_ngcontent-%COMP%] .sk-rect[_ngcontent-%COMP%]{float:left;margin-right:1px;height:100%;width:6px;display:inline-block;animation:_ngcontent-%COMP%_sk-waveStretchDelay 1.2s infinite ease-in-out}.sk-wave[_ngcontent-%COMP%] .sk-rect1[_ngcontent-%COMP%]{animation-delay:-1.2s}.sk-wave[_ngcontent-%COMP%] .sk-rect2[_ngcontent-%COMP%]{animation-delay:-1.1s}.sk-wave[_ngcontent-%COMP%] .sk-rect3[_ngcontent-%COMP%]{animation-delay:-1s}.sk-wave[_ngcontent-%COMP%] .sk-rect4[_ngcontent-%COMP%]{animation-delay:-.9s}.sk-wave[_ngcontent-%COMP%] .sk-rect5[_ngcontent-%COMP%]{animation-delay:-.8s}@keyframes _ngcontent-%COMP%_sk-waveStretchDelay{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}"]})}return t})(),W={skChasingDots:"sk-chasing-dots",skCubeGrid:"sk-cube-grid",skDoubleBounce:"sk-double-bounce",skRotatingPlane:"sk-rotationg-plane",skSpinnerPulse:"sk-spinner-pulse",skThreeBounce:"sk-three-bounce",skWanderingCubes:"sk-wandering-cubes",skWave:"sk-wave"};var O=(()=>{class t{_pendingRequests=0;_pendingRequestsStatus$=new m(1);_filteredUrlPatterns=[];_filteredMethods=[];_filteredHeaders=[];_forceByPass=!1;get pendingRequestsStatus$(){return this._pendingRequestsStatus$.asObservable()}get pendingRequestsStatusSubject$(){return this._pendingRequestsStatus$}get pendingRequests(){return this._pendingRequests}set pendingRequests(e){this._pendingRequests=e}get filteredUrlPatterns(){return this._filteredUrlPatterns}set filteredMethods(e){this._filteredMethods=e}set filteredHeaders(e){this._filteredHeaders=e}set forceByPass(e){this._forceByPass=e}shouldBypassUrl(e){return this._filteredUrlPatterns.some(o=>o.test(e))}shouldBypassMethod(e){return this._filteredMethods.some(o=>o.toUpperCase()===e.method.toUpperCase())}shouldBypassHeader(e){return this._filteredHeaders.some(o=>e.headers.has(o))}shouldBypass(e){return this._forceByPass||this.shouldBypassUrl(e.urlWithParams)||this.shouldBypassMethod(e)||this.shouldBypassHeader(e)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),de=(()=>{class t{pendingRequestsInterceptorConfigurer;_visibility$=new m(1);constructor(e){this.pendingRequestsInterceptorConfigurer=e}get visibility$(){return this._visibility$.asObservable()}show(){this.pendingRequestsInterceptorConfigurer.forceByPass=!0,this._visibility$.next(!0)}hide(){this._visibility$.next(!1),this.pendingRequestsInterceptorConfigurer.forceByPass=!1}static \u0275fac=function(o){return new(o||t)(F(O))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),me=(()=>{class t{pendingRequestsInterceptorConfigurer;spinnerVisibility;spinkit=W;isVisible$;visibleUntil=Date.now();backdrop=c(!0);backgroundColor=c();debounceDelay=c(0);entryComponent=c(null);extraDuration=c(0);filteredHeaders=c([]);filteredMethods=c([]);filteredUrlPatterns=c([]);minDuration=c(0);opacity=c(".7");backdropBackgroundColor=c("#f1f1f1");spinner=R(W.skWave);constructor(e,o){this.pendingRequestsInterceptorConfigurer=e,this.spinnerVisibility=o}ngOnInit(){this.initIsvisibleObservable(),this.nullifySpinnerIfEntryComponentIsDefined(),this.initFilters()}initIsvisibleObservable(){let[e,o]=D(this.pendingRequestsInterceptorConfigurer.pendingRequestsStatus$,n=>n);this.isVisible$=x(this.pendingRequestsInterceptorConfigurer.pendingRequestsStatus$.pipe(_(()=>e.pipe(h(()=>y(this.debounceDelay()))))),e.pipe(_(()=>o.pipe(h(()=>this.getVisibilityTimer$())))),this.spinnerVisibility.visibility$).pipe(I(),w(n=>this.updateExpirationDelay(n)))}nullifySpinnerIfEntryComponentIsDefined(){this.entryComponent()&&this.spinner.update(()=>null)}initFilters(){this.initFilteredUrlPatterns(),this.initFilteredMethods(),this.initFilteredHeaders()}initFilteredUrlPatterns(){this.filteredUrlPatterns().length&&this.filteredUrlPatterns().forEach(e=>this.pendingRequestsInterceptorConfigurer.filteredUrlPatterns.push(new RegExp(e)))}initFilteredMethods(){this.pendingRequestsInterceptorConfigurer.filteredMethods=this.filteredMethods()}initFilteredHeaders(){this.pendingRequestsInterceptorConfigurer.filteredHeaders=this.filteredHeaders()}updateExpirationDelay(e){e&&(this.visibleUntil=Date.now()+this.minDuration())}getVisibilityTimer$(){return y(Math.max(this.extraDuration(),this.visibleUntil-Date.now()))}static \u0275fac=function(o){return new(o||t)(P(O),P(de))};static \u0275cmp=l({type:t,selectors:[["ng-http-loader"]],inputs:{backdrop:[1,"backdrop"],backgroundColor:[1,"backgroundColor"],debounceDelay:[1,"debounceDelay"],entryComponent:[1,"entryComponent"],extraDuration:[1,"extraDuration"],filteredHeaders:[1,"filteredHeaders"],filteredMethods:[1,"filteredMethods"],filteredUrlPatterns:[1,"filteredUrlPatterns"],minDuration:[1,"minDuration"],opacity:[1,"opacity"],backdropBackgroundColor:[1,"backdropBackgroundColor"],spinner:[1,"spinner"]},outputs:{spinner:"spinnerChange"},decls:2,vars:3,consts:[["id","spinner",3,"backdrop","opacity","ngStyle",4,"ngIf"],["id","spinner",3,"ngStyle"],[4,"ngComponentOutlet"],[3,"backgroundColor",4,"ngIf"],[3,"backgroundColor"]],template:function(o,n){o&1&&(M(0,ee,10,16,"div",0),$(1,"async")),o&2&&s("ngIf",U(1,1,n.isVisible$))},dependencies:[ne,te,oe,ie,re,se,ae,ce,L,N,E,j],styles:["#spinner[_ngcontent-%COMP%]{top:50%;left:50%;transform:translate(-50%,-50%);position:fixed;z-index:9999}#spinner.backdrop[_ngcontent-%COMP%]{top:0;left:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;transform:none} .colored-parent, .colored>div{background-color:#333}"]})}return t})();function ye(t,d){let e=B(O),o=e.shouldBypass(t);return o||(e.pendingRequests++,e.pendingRequests===1&&e.pendingRequestsStatusSubject$.next(!0)),d(t).pipe(S(()=>{o||(e.pendingRequests--,e.pendingRequests===0&&e.pendingRequestsStatusSubject$.next(!1))}))}export{de as a,me as b,ye as c};
1
+ import{i as N,k as E,l as L,n as j}from"./chunk-VU532YE3.js";import{A as y,Ab as g,C as x,Cb as M,Da as c,Dc as H,E as D,K as h,Kb as s,Lb as r,Mb as k,Mc as $,Nc as U,O as I,Q as S,Ub as b,Vb as f,Wb as a,X as _,Z as w,Zb as T,ba as v,ec as u,ga as F,gb as i,ha as B,i as m,mb as P,rb as R,ta as p,wb as l,yb as q}from"./chunk-7IC4BZ6J.js";var V=t=>({"background-color":t});function Y(t,d){t&1&&T(0)}function G(t,d){if(t&1&&a(0,"sk-cube-grid",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function z(t,d){if(t&1&&a(0,"sk-chasing-dots",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function X(t,d){if(t&1&&a(0,"sk-double-bounce",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function A(t,d){if(t&1&&a(0,"sk-rotating-plane",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function K(t,d){if(t&1&&a(0,"sk-spinner-pulse",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function Z(t,d){if(t&1&&a(0,"sk-three-bounce",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function J(t,d){if(t&1&&a(0,"sk-wandering-cubes",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function Q(t,d){if(t&1&&a(0,"sk-wave",4),t&2){let e=u(2);s("backgroundColor",e.backgroundColor())}}function ee(t,d){if(t&1&&(b(0,"div",1),M(1,Y,1,0,"ng-container",2)(2,G,1,1,"sk-cube-grid",3)(3,z,1,1,"sk-chasing-dots",3)(4,X,1,1,"sk-double-bounce",3)(5,A,1,1,"sk-rotating-plane",3)(6,K,1,1,"sk-spinner-pulse",3)(7,Z,1,1,"sk-three-bounce",3)(8,J,1,1,"sk-wandering-cubes",3)(9,Q,1,1,"sk-wave",3),f()),t&2){let e=u();r("opacity",e.opacity()),k("backdrop",e.backdrop()),s("ngStyle",H(14,V,e.backdrop()?e.backdropBackgroundColor():"transparent")),i(),s("ngComponentOutlet",e.entryComponent()),i(),s("ngIf",e.spinner()===e.spinkit.skCubeGrid),i(),s("ngIf",e.spinner()===e.spinkit.skChasingDots),i(),s("ngIf",e.spinner()===e.spinkit.skDoubleBounce),i(),s("ngIf",e.spinner()===e.spinkit.skRotatingPlane),i(),s("ngIf",e.spinner()===e.spinkit.skSpinnerPulse),i(),s("ngIf",e.spinner()===e.spinkit.skThreeBounce),i(),s("ngIf",e.spinner()===e.spinkit.skWanderingCubes),i(),s("ngIf",e.spinner()===e.spinkit.skWave)}}var C=(()=>{class t{backgroundColor=c();static \u0275fac=function(o){return new(o||t)};static \u0275dir=q({type:t,inputs:{backgroundColor:[1,"backgroundColor"]}})}return t})(),te=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-chasing-dots"]],features:[g],decls:3,vars:6,consts:[[1,"sk-chasing-dots"],[1,"sk-child","sk-dot1"],[1,"sk-child","sk-dot2"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-chasing-dots[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative;text-align:center;animation:_ngcontent-%COMP%_sk-chasingDotsRotate 2s infinite linear}.sk-chasing-dots[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:60%;height:60%;display:inline-block;position:absolute;top:0;border-radius:100%;animation:_ngcontent-%COMP%_sk-chasingDotsBounce 2s infinite ease-in-out}.sk-chasing-dots[_ngcontent-%COMP%] .sk-dot2[_ngcontent-%COMP%]{top:auto;bottom:0;animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-chasingDotsRotate{to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_sk-chasingDotsBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]})}return t})(),ne=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-cube-grid"]],features:[g],decls:10,vars:20,consts:[[1,"sk-cube-grid"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"],[1,"sk-cube","sk-cube3"],[1,"sk-cube","sk-cube4"],[1,"sk-cube","sk-cube5"],[1,"sk-cube","sk-cube6"],[1,"sk-cube","sk-cube7"],[1,"sk-cube","sk-cube8"],[1,"sk-cube","sk-cube9"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"div",7)(8,"div",8)(9,"div",9),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-cube-grid[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:33.33%;height:33.33%;float:left;animation:_ngcontent-%COMP%_sk-cubeGridScaleDelay 1.3s infinite ease-in-out}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube1[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube3[_ngcontent-%COMP%]{animation-delay:.4s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube4[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube5[_ngcontent-%COMP%]{animation-delay:.2s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube6[_ngcontent-%COMP%]{animation-delay:.3s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube7[_ngcontent-%COMP%]{animation-delay:0s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube8[_ngcontent-%COMP%]{animation-delay:.1s}.sk-cube-grid[_ngcontent-%COMP%] .sk-cube9[_ngcontent-%COMP%]{animation-delay:.2s}@keyframes _ngcontent-%COMP%_sk-cubeGridScaleDelay{0%,70%,to{transform:scaleZ(1)}35%{transform:scale3D(0,0,1)}}"]})}return t})(),oe=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-double-bounce"]],features:[g],decls:3,vars:6,consts:[[1,"sk-double-bounce"],[1,"sk-child","sk-double-bounce1"],[1,"sk-child","sk-double-bounce2"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-double-bounce[_ngcontent-%COMP%]{top:50%;width:40px;height:40px;position:relative;margin:auto}.sk-double-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;background-color:#333;opacity:.6;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-doubleBounce 2s infinite ease-in-out}.sk-double-bounce[_ngcontent-%COMP%] .sk-double-bounce2[_ngcontent-%COMP%]{animation-delay:-1s}@keyframes _ngcontent-%COMP%_sk-doubleBounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}"]})}return t})(),ie=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-rotating-plane"]],features:[g],decls:1,vars:2,consts:[[1,"sk-rotating-plane","colored-parent"]],template:function(o,n){o&1&&a(0,"div",0),o&2&&r("background-color",n.backgroundColor())},styles:[".sk-rotating-plane[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;animation:_ngcontent-%COMP%_sk-rotatePlane 1.2s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-rotatePlane{0%{transform:perspective(120px) rotateX(0) rotateY(0)}50%{transform:perspective(120px) rotateX(-180.1deg) rotateY(0)}to{transform:perspective(120px) rotateX(-180deg) rotateY(-179.9deg)}}"]})}return t})(),re=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-spinner-pulse"]],features:[g],decls:1,vars:2,consts:[[1,"sk-spinner","sk-spinner-pulse","colored-parent"]],template:function(o,n){o&1&&a(0,"div",0),o&2&&r("background-color",n.backgroundColor())},styles:[".sk-spinner-pulse[_ngcontent-%COMP%]{position:relative;top:50%;width:40px;height:40px;margin:auto;border-radius:100%;animation:_ngcontent-%COMP%_sk-pulseScaleOut 1s infinite ease-in-out}@keyframes _ngcontent-%COMP%_sk-pulseScaleOut{0%{transform:scale(0)}to{transform:scale(1);opacity:0}}"]})}return t})(),se=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-three-bounce"]],features:[g],decls:4,vars:8,consts:[[1,"sk-three-bounce"],[1,"sk-child","sk-bounce1"],[1,"sk-child","sk-bounce2"],[1,"sk-child","sk-bounce3"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2)(3,"div",3),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-three-bounce[_ngcontent-%COMP%]{top:50%;position:relative;margin:auto;width:80px;text-align:center}.sk-three-bounce[_ngcontent-%COMP%] .sk-child[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:100%;display:inline-block;animation:_ngcontent-%COMP%_sk-three-bounce 1.4s ease-in-out 0s infinite both}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce1[_ngcontent-%COMP%]{animation-delay:-.32s}.sk-three-bounce[_ngcontent-%COMP%] .sk-bounce2[_ngcontent-%COMP%]{animation-delay:-.16s}@keyframes _ngcontent-%COMP%_sk-three-bounce{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}"]})}return t})(),ae=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-wandering-cubes"]],features:[g],decls:3,vars:6,consts:[[1,"sk-wandering-cubes"],[1,"sk-cube","sk-cube1"],[1,"sk-cube","sk-cube2"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-wandering-cubes[_ngcontent-%COMP%]{top:50%;margin:auto;width:40px;height:40px;position:relative}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube[_ngcontent-%COMP%]{width:10px;height:10px;position:absolute;top:0;left:0;animation:_ngcontent-%COMP%_sk-wanderingCube 1.8s ease-in-out -1.8s infinite both}.sk-wandering-cubes[_ngcontent-%COMP%] .sk-cube2[_ngcontent-%COMP%]{animation-delay:-.9s}@keyframes _ngcontent-%COMP%_sk-wanderingCube{0%{transform:rotate(0)}25%{transform:translate(30px) rotate(-90deg) scale(.5)}50%{transform:translate(30px) translateY(30px) rotate(-179deg)}50.1%{transform:translate(30px) translateY(30px) rotate(-180deg)}75%{transform:translate(0) translateY(30px) rotate(-270deg) scale(.5)}to{transform:rotate(-360deg)}}"]})}return t})(),ce=(()=>{class t extends C{static \u0275fac=(()=>{let e;return function(n){return(e||(e=p(t)))(n||t)}})();static \u0275cmp=l({type:t,selectors:[["sk-wave"]],features:[g],decls:6,vars:12,consts:[[1,"sk-wave"],[1,"sk-rect","sk-rect1"],[1,"sk-rect","sk-rect2"],[1,"sk-rect","sk-rect3"],[1,"sk-rect","sk-rect4"],[1,"sk-rect","sk-rect5"]],template:function(o,n){o&1&&(b(0,"div",0),a(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),f()),o&2&&(k("colored",!n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()),i(),r("background-color",n.backgroundColor()))},styles:[".sk-wave[_ngcontent-%COMP%]{position:relative;top:50%;margin:auto;width:50px;height:40px;text-align:center;font-size:10px}.sk-wave[_ngcontent-%COMP%] .sk-rect[_ngcontent-%COMP%]{float:left;margin-right:1px;height:100%;width:6px;display:inline-block;animation:_ngcontent-%COMP%_sk-waveStretchDelay 1.2s infinite ease-in-out}.sk-wave[_ngcontent-%COMP%] .sk-rect1[_ngcontent-%COMP%]{animation-delay:-1.2s}.sk-wave[_ngcontent-%COMP%] .sk-rect2[_ngcontent-%COMP%]{animation-delay:-1.1s}.sk-wave[_ngcontent-%COMP%] .sk-rect3[_ngcontent-%COMP%]{animation-delay:-1s}.sk-wave[_ngcontent-%COMP%] .sk-rect4[_ngcontent-%COMP%]{animation-delay:-.9s}.sk-wave[_ngcontent-%COMP%] .sk-rect5[_ngcontent-%COMP%]{animation-delay:-.8s}@keyframes _ngcontent-%COMP%_sk-waveStretchDelay{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}"]})}return t})(),W={skChasingDots:"sk-chasing-dots",skCubeGrid:"sk-cube-grid",skDoubleBounce:"sk-double-bounce",skRotatingPlane:"sk-rotationg-plane",skSpinnerPulse:"sk-spinner-pulse",skThreeBounce:"sk-three-bounce",skWanderingCubes:"sk-wandering-cubes",skWave:"sk-wave"};var O=(()=>{class t{_pendingRequests=0;_pendingRequestsStatus$=new m(1);_filteredUrlPatterns=[];_filteredMethods=[];_filteredHeaders=[];_forceByPass=!1;get pendingRequestsStatus$(){return this._pendingRequestsStatus$.asObservable()}get pendingRequestsStatusSubject$(){return this._pendingRequestsStatus$}get pendingRequests(){return this._pendingRequests}set pendingRequests(e){this._pendingRequests=e}get filteredUrlPatterns(){return this._filteredUrlPatterns}set filteredMethods(e){this._filteredMethods=e}set filteredHeaders(e){this._filteredHeaders=e}set forceByPass(e){this._forceByPass=e}shouldBypassUrl(e){return this._filteredUrlPatterns.some(o=>o.test(e))}shouldBypassMethod(e){return this._filteredMethods.some(o=>o.toUpperCase()===e.method.toUpperCase())}shouldBypassHeader(e){return this._filteredHeaders.some(o=>e.headers.has(o))}shouldBypass(e){return this._forceByPass||this.shouldBypassUrl(e.urlWithParams)||this.shouldBypassMethod(e)||this.shouldBypassHeader(e)}static \u0275fac=function(o){return new(o||t)};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),de=(()=>{class t{pendingRequestsInterceptorConfigurer;_visibility$=new m(1);constructor(e){this.pendingRequestsInterceptorConfigurer=e}get visibility$(){return this._visibility$.asObservable()}show(){this.pendingRequestsInterceptorConfigurer.forceByPass=!0,this._visibility$.next(!0)}hide(){this._visibility$.next(!1),this.pendingRequestsInterceptorConfigurer.forceByPass=!1}static \u0275fac=function(o){return new(o||t)(F(O))};static \u0275prov=v({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),me=(()=>{class t{pendingRequestsInterceptorConfigurer;spinnerVisibility;spinkit=W;isVisible$;visibleUntil=Date.now();backdrop=c(!0);backgroundColor=c();debounceDelay=c(0);entryComponent=c(null);extraDuration=c(0);filteredHeaders=c([]);filteredMethods=c([]);filteredUrlPatterns=c([]);minDuration=c(0);opacity=c(".7");backdropBackgroundColor=c("#f1f1f1");spinner=R(W.skWave);constructor(e,o){this.pendingRequestsInterceptorConfigurer=e,this.spinnerVisibility=o}ngOnInit(){this.initIsvisibleObservable(),this.nullifySpinnerIfEntryComponentIsDefined(),this.initFilters()}initIsvisibleObservable(){let[e,o]=D(this.pendingRequestsInterceptorConfigurer.pendingRequestsStatus$,n=>n);this.isVisible$=x(this.pendingRequestsInterceptorConfigurer.pendingRequestsStatus$.pipe(_(()=>e.pipe(h(()=>y(this.debounceDelay()))))),e.pipe(_(()=>o.pipe(h(()=>this.getVisibilityTimer$())))),this.spinnerVisibility.visibility$).pipe(I(),w(n=>this.updateExpirationDelay(n)))}nullifySpinnerIfEntryComponentIsDefined(){this.entryComponent()&&this.spinner.update(()=>null)}initFilters(){this.initFilteredUrlPatterns(),this.initFilteredMethods(),this.initFilteredHeaders()}initFilteredUrlPatterns(){this.filteredUrlPatterns().length&&this.filteredUrlPatterns().forEach(e=>this.pendingRequestsInterceptorConfigurer.filteredUrlPatterns.push(new RegExp(e)))}initFilteredMethods(){this.pendingRequestsInterceptorConfigurer.filteredMethods=this.filteredMethods()}initFilteredHeaders(){this.pendingRequestsInterceptorConfigurer.filteredHeaders=this.filteredHeaders()}updateExpirationDelay(e){e&&(this.visibleUntil=Date.now()+this.minDuration())}getVisibilityTimer$(){return y(Math.max(this.extraDuration(),this.visibleUntil-Date.now()))}static \u0275fac=function(o){return new(o||t)(P(O),P(de))};static \u0275cmp=l({type:t,selectors:[["ng-http-loader"]],inputs:{backdrop:[1,"backdrop"],backgroundColor:[1,"backgroundColor"],debounceDelay:[1,"debounceDelay"],entryComponent:[1,"entryComponent"],extraDuration:[1,"extraDuration"],filteredHeaders:[1,"filteredHeaders"],filteredMethods:[1,"filteredMethods"],filteredUrlPatterns:[1,"filteredUrlPatterns"],minDuration:[1,"minDuration"],opacity:[1,"opacity"],backdropBackgroundColor:[1,"backdropBackgroundColor"],spinner:[1,"spinner"]},outputs:{spinner:"spinnerChange"},decls:2,vars:3,consts:[["id","spinner",3,"backdrop","opacity","ngStyle",4,"ngIf"],["id","spinner",3,"ngStyle"],[4,"ngComponentOutlet"],[3,"backgroundColor",4,"ngIf"],[3,"backgroundColor"]],template:function(o,n){o&1&&(M(0,ee,10,16,"div",0),$(1,"async")),o&2&&s("ngIf",U(1,1,n.isVisible$))},dependencies:[ne,te,oe,ie,re,se,ae,ce,L,N,E,j],styles:["#spinner[_ngcontent-%COMP%]{top:50%;left:50%;transform:translate(-50%,-50%);position:fixed;z-index:9999}#spinner.backdrop[_ngcontent-%COMP%]{top:0;left:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;transform:none} .colored-parent, .colored>div{background-color:#333}"]})}return t})();function ye(t,d){let e=B(O),o=e.shouldBypass(t);return o||(e.pendingRequests++,e.pendingRequests===1&&e.pendingRequestsStatusSubject$.next(!0)),d(t).pipe(S(()=>{o||(e.pendingRequests--,e.pendingRequests===0&&e.pendingRequestsStatusSubject$.next(!1))}))}export{de as a,me as b,ye as c};
@@ -1 +1 @@
1
- import{Ga as s,ba as i}from"./chunk-D4VGEGUS.js";var n=class extends Error{};n.prototype.name="InvalidTokenError";function l(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,t)=>{let o=t.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function d(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return l(r)}catch{return atob(r)}}function p(e,r){if(typeof e!="string")throw new n("Invalid token specified: must be a string");r||(r={});let t=r.header===!0?0:1,o=e.split(".")[t];if(typeof o!="string")throw new n(`Invalid token specified: missing part #${t+1}`);let c;try{c=d(o)}catch(a){throw new n(`Invalid token specified: invalid base64 for part #${t+1} (${a.message})`)}try{return JSON.parse(c)}catch(a){throw new n(`Invalid token specified: invalid json for part #${t+1} (${a.message})`)}}var m=(()=>{class e{constructor(){this._token=s(localStorage.getItem("AUTH_TOKEN")),this.tokenSignal=this._token}setToken(t){this._token.set(t),localStorage.setItem("AUTH_TOKEN",t)}clearToken(){this._token.set(null),localStorage.removeItem("AUTH_TOKEN")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{p as a,m as b};
1
+ import{Ga as s,ba as i}from"./chunk-7IC4BZ6J.js";var n=class extends Error{};n.prototype.name="InvalidTokenError";function l(e){return decodeURIComponent(atob(e).replace(/(.)/g,(r,t)=>{let o=t.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function d(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return l(r)}catch{return atob(r)}}function p(e,r){if(typeof e!="string")throw new n("Invalid token specified: must be a string");r||(r={});let t=r.header===!0?0:1,o=e.split(".")[t];if(typeof o!="string")throw new n(`Invalid token specified: missing part #${t+1}`);let c;try{c=d(o)}catch(a){throw new n(`Invalid token specified: invalid base64 for part #${t+1} (${a.message})`)}try{return JSON.parse(c)}catch(a){throw new n(`Invalid token specified: invalid json for part #${t+1} (${a.message})`)}}var m=(()=>{class e{constructor(){this._token=s(localStorage.getItem("AUTH_TOKEN")),this.tokenSignal=this._token}setToken(t){this._token.set(t),localStorage.setItem("AUTH_TOKEN",t)}clearToken(){this._token.set(null),localStorage.removeItem("AUTH_TOKEN")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{p as a,m as b};
@@ -1,4 +1,4 @@
1
- import{a as h}from"./chunk-DGTLYGTT.js";import{Ua as m}from"./chunk-FTFZVOHA.js";import{r as g}from"./chunk-PBVHXSHH.js";import{Ab as a,Bc as y,Ub as d,Vb as f,ba as u,ca as r,fc as c,gc as l,ha as s,ta as p,wb as i,xb as b}from"./chunk-D4VGEGUS.js";var D=["*"],F=({dt:t})=>`
1
+ import{a as h}from"./chunk-MDNCQKUT.js";import{Ua as m}from"./chunk-NHXCR55X.js";import{s as g}from"./chunk-VU532YE3.js";import{Ab as a,Bc as y,Ub as d,Vb as f,ba as u,ca as r,fc as c,gc as l,ha as s,ta as p,wb as i,xb as b}from"./chunk-7IC4BZ6J.js";var D=["*"],F=({dt:t})=>`
2
2
  .p-buttongroup .p-button {
3
3
  margin: 0;
4
4
  }