dealposbooks 5.44.6 → 5.45.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 (117) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/chunk-27TIOMYM.js +1 -0
  3. package/{chunk-JUCJGYST.js → chunk-2AAVNIG7.js} +1 -1
  4. package/{chunk-UKBDY33R.js → chunk-2D2YD753.js} +1 -1
  5. package/{chunk-ZDTMCWOO.js → chunk-2MKKFLNJ.js} +1 -1
  6. package/{chunk-5JV52UYK.js → chunk-2XUSZCQL.js} +1 -1
  7. package/{chunk-TARMA6TN.js → chunk-35MXFTDN.js} +1 -1
  8. package/{chunk-2LQVI4EI.js → chunk-36OX4S7M.js} +1 -1
  9. package/{chunk-NHZLS6JU.js → chunk-3A4BFUGD.js} +1 -1
  10. package/{chunk-LV6YHYS7.js → chunk-3FDVZDYS.js} +1 -1
  11. package/{chunk-SPKOXGSS.js → chunk-3GGXPPQT.js} +1 -1
  12. package/chunk-3OMEVXSG.js +1 -0
  13. package/{chunk-BJV3MSHK.js → chunk-4ETCCLMI.js} +1 -1
  14. package/chunk-4MZNOMUN.js +1 -0
  15. package/{chunk-RJTHFDGC.js → chunk-4PUT2IIE.js} +1 -1
  16. package/{chunk-AF357XP4.js → chunk-5CZNOXPC.js} +1 -1
  17. package/{chunk-HK76OJ3U.js → chunk-5EJXAYSX.js} +1 -1
  18. package/{chunk-N4BTKSCQ.js → chunk-66D4GMNG.js} +1 -1
  19. package/{chunk-I7ILLTFH.js → chunk-6A2KUPOG.js} +1 -1
  20. package/{chunk-IGVRGJ3L.js → chunk-6D4IGQVY.js} +1 -1
  21. package/{chunk-ATJ55H5D.js → chunk-6GN3MGBY.js} +1 -1
  22. package/{chunk-MZGGLVOX.js → chunk-6HX55BLY.js} +1 -1
  23. package/{chunk-MZAFOBGT.js → chunk-6NX36ZC2.js} +1 -1
  24. package/{chunk-MAID3JDN.js → chunk-6PNHT5U7.js} +1 -1
  25. package/{chunk-CNXEJBY5.js → chunk-7DYACF4D.js} +1 -1
  26. package/{chunk-W3PCANAM.js → chunk-7FFVGWUP.js} +1 -1
  27. package/{chunk-WK4BTEU4.js → chunk-7XL26PM3.js} +1 -1
  28. package/{chunk-EFDD6Q3K.js → chunk-AOOG6YOT.js} +1 -1
  29. package/{chunk-ARXP327B.js → chunk-ARH3WEEF.js} +1 -1
  30. package/chunk-AUYM5P42.js +202 -0
  31. package/{chunk-IYO6P6XI.js → chunk-B54PFCWI.js} +1 -1
  32. package/{chunk-JDWPD3PQ.js → chunk-BJWQQABR.js} +2 -2
  33. package/{chunk-BUYRVZ5Z.js → chunk-BLR3HBYP.js} +1 -1
  34. package/{chunk-UDIFKJ7M.js → chunk-BXEGWIR3.js} +1 -1
  35. package/{chunk-AL647DUL.js → chunk-CNXYBR45.js} +1 -1
  36. package/{chunk-EJBBENFA.js → chunk-CSDQYXOM.js} +1 -1
  37. package/{chunk-SVHOGUGR.js → chunk-CVL3S2HY.js} +1 -1
  38. package/chunk-DLIPUA4K.js +1 -0
  39. package/{chunk-NBBH4QTN.js → chunk-DX2A6LIU.js} +1 -1
  40. package/{chunk-M5PA3FZY.js → chunk-EB6NEJHF.js} +1 -1
  41. package/chunk-EERQ53V7.js +1 -0
  42. package/{chunk-3LESCZJU.js → chunk-EG4A3G2F.js} +1 -1
  43. package/{chunk-VPQDUC77.js → chunk-EL5BUFMO.js} +1 -1
  44. package/{chunk-76LPTGLX.js → chunk-EQ4PLHI4.js} +1 -1
  45. package/{chunk-EHM2KHSR.js → chunk-FPI32FQH.js} +1 -1
  46. package/{chunk-UIO722AZ.js → chunk-G2DQX336.js} +1 -1
  47. package/{chunk-2BZH24YX.js → chunk-GIQOPGQF.js} +1 -1
  48. package/{chunk-RLUIUJY3.js → chunk-GX5CQNX3.js} +1 -1
  49. package/{chunk-O4APZZ3M.js → chunk-H3BFDSSJ.js} +3 -3
  50. package/{chunk-7FFMPB6T.js → chunk-H6HNANYB.js} +1 -1
  51. package/{chunk-CWHL7PNC.js → chunk-H7Q35Y7G.js} +1 -1
  52. package/{chunk-6XT4TD5A.js → chunk-HAQ36ZI6.js} +1 -1
  53. package/{chunk-MPHY6FVN.js → chunk-HG5MKVNR.js} +1 -1
  54. package/{chunk-NPVJGHTO.js → chunk-HPITHIZA.js} +1 -1
  55. package/{chunk-3GMNUULJ.js → chunk-IFQIZ5KJ.js} +1 -1
  56. package/{chunk-7COI2POD.js → chunk-IGWIRCAS.js} +1 -1
  57. package/{chunk-ODRV6XWO.js → chunk-IHZ55QSI.js} +1 -1
  58. package/chunk-ITBP232X.js +129 -0
  59. package/{chunk-7ZYLIEUZ.js → chunk-IYBQ7NLP.js} +1 -1
  60. package/{chunk-K4P3JOA6.js → chunk-JRVYSBUZ.js} +1 -1
  61. package/{chunk-Z6ETOFZG.js → chunk-K5U6AQ75.js} +1 -1
  62. package/{chunk-ZEWON3MW.js → chunk-KGQGMXW6.js} +1 -1
  63. package/{chunk-MS6WBVQX.js → chunk-KIBBRAL5.js} +1 -1
  64. package/{chunk-WXT6EZ2V.js → chunk-KJ2WX3FC.js} +1 -1
  65. package/{chunk-LHA7OCPB.js → chunk-KW4A377H.js} +1 -1
  66. package/{chunk-6O5EWYT7.js → chunk-LFZCMZAP.js} +1 -1
  67. package/{chunk-65IKFGTF.js → chunk-LSK6C72D.js} +1 -1
  68. package/{chunk-3KWAJ7F2.js → chunk-M6LSMNSQ.js} +1 -1
  69. package/{chunk-IJTQE2H4.js → chunk-MFK5RQPJ.js} +1 -1
  70. package/{chunk-PPKCZMH4.js → chunk-N4JIPI53.js} +1 -1
  71. package/{chunk-VKADRKJU.js → chunk-N75VYDTF.js} +1 -1
  72. package/{chunk-E3ZGQRZ3.js → chunk-NCDT6JPP.js} +1 -1
  73. package/{chunk-6K5LNQ4J.js → chunk-NMCKMUY4.js} +3 -3
  74. package/{chunk-NMSYINDE.js → chunk-NZN6QJR3.js} +1 -1
  75. package/chunk-O2QIO42B.js +7 -0
  76. package/chunk-OBZRC7DX.js +1 -0
  77. package/{chunk-72LNXEXV.js → chunk-OIBDX2CA.js} +1 -1
  78. package/{chunk-3HZX655H.js → chunk-OTMBGB3T.js} +1 -1
  79. package/{chunk-REF7WUSQ.js → chunk-OTO7ELZ2.js} +1 -1
  80. package/{chunk-XLPFLHKU.js → chunk-OVAQBQEJ.js} +1 -1
  81. package/{chunk-RHH3CU5D.js → chunk-PJDNYCLD.js} +1 -1
  82. package/{chunk-AGB5OXUF.js → chunk-PPJQN2WS.js} +1 -1
  83. package/{chunk-AJZ7YLT4.js → chunk-Q24GCSGD.js} +1 -1
  84. package/{chunk-3KYU6FI2.js → chunk-Q5CVMJZC.js} +1 -1
  85. package/chunk-QF4D5YPK.js +1 -0
  86. package/chunk-QVIFRW2H.js +160 -0
  87. package/{chunk-GX55DZY5.js → chunk-R6TARUG2.js} +1 -1
  88. package/{chunk-VRKBMD72.js → chunk-R7N6BWL5.js} +1 -1
  89. package/{chunk-MJ6ZJF3H.js → chunk-RZFXAB7W.js} +1 -1
  90. package/{chunk-JXEIGOVF.js → chunk-S5O44AS7.js} +1 -1
  91. package/{chunk-WT4Z2QBS.js → chunk-T6B4BOOB.js} +1 -1
  92. package/chunk-T7VJORKB.js +1 -0
  93. package/{chunk-MWFWXJG3.js → chunk-U5XXKH2H.js} +1 -1
  94. package/{chunk-A4X33OU3.js → chunk-U7BSQJHQ.js} +1 -1
  95. package/{chunk-6V36DOK2.js → chunk-UP67MADL.js} +1 -1
  96. package/{chunk-L3PZS6EL.js → chunk-VGNJD35F.js} +1 -1
  97. package/{chunk-E3QNEH3B.js → chunk-VJ3IBUVO.js} +1 -1
  98. package/{chunk-JYNY6F6D.js → chunk-VXTZNZMH.js} +1 -1
  99. package/{chunk-SB5MSLCX.js → chunk-VZ5CMS5O.js} +1 -1
  100. package/{chunk-T2JZ7FIJ.js → chunk-W5ER7276.js} +1 -1
  101. package/{chunk-OB46Z7ZH.js → chunk-XD7VHCRC.js} +1 -1
  102. package/{chunk-B6HWQE7D.js → chunk-Y6YUTTA4.js} +1 -1
  103. package/{chunk-FLYLFPA3.js → chunk-YOMVOFLB.js} +1 -1
  104. package/{chunk-ACTRMWEI.js → chunk-YV2QJ63P.js} +1 -1
  105. package/{chunk-2CF6W3MQ.js → chunk-ZRCCGUC4.js} +1 -1
  106. package/{chunk-OH3DUGUZ.js → chunk-ZZCT6WNV.js} +1 -1
  107. package/index.html +2 -2
  108. package/{main-SIOXXMKG.js → main-SLMY35VH.js} +1 -1
  109. package/package.json +1 -1
  110. package/chunk-56NDKVXE.js +0 -1
  111. package/chunk-BZBA3AI5.js +0 -160
  112. package/chunk-EKSLKPSH.js +0 -1
  113. package/chunk-GYLR4MM5.js +0 -7
  114. package/chunk-IKAVDQZY.js +0 -202
  115. package/chunk-KXE3J4PK.js +0 -1
  116. package/chunk-QBRO5YKE.js +0 -129
  117. package/chunk-XURZEJ5V.js +0 -1
@@ -1 +1 @@
1
- import{h as u}from"./chunk-7FFMPB6T.js";import{Da as f}from"./chunk-72LNXEXV.js";import{Bb as c,Kb as C,Lb as m,Pb as h,Vb as r,Wb as l,Xb as o,hb as a,sa as d,ua as s,xb as p}from"./chunk-6K5LNQ4J.js";var L=(()=>{class i extends u{pathId;ngOnInit(){this.pathId="url(#"+f()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=s(i)))(e||i)}})();static \u0275cmp=p({type:i,selectors:[["TimesCircleIcon"]],features:[c],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,e){n&1&&(d(),r(0,"svg",0)(1,"g"),o(2,"path",1),l(),r(3,"defs")(4,"clipPath",2),o(5,"rect",3),l()()()),n&2&&(h(e.getClassNames()),C("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role),a(),C("clip-path",e.pathId),a(3),m("id",e.pathId))},encapsulation:2})}return i})();export{L as a};
1
+ import{h as u}from"./chunk-H6HNANYB.js";import{Da as f}from"./chunk-OIBDX2CA.js";import{Bb as c,Kb as C,Lb as m,Pb as h,Vb as r,Wb as l,Xb as o,hb as a,sa as d,ua as s,xb as p}from"./chunk-NMCKMUY4.js";var L=(()=>{class i extends u{pathId;ngOnInit(){this.pathId="url(#"+f()+")"}static \u0275fac=(()=>{let t;return function(e){return(t||(t=s(i)))(e||i)}})();static \u0275cmp=p({type:i,selectors:[["TimesCircleIcon"]],features:[c],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,e){n&1&&(d(),r(0,"svg",0)(1,"g"),o(2,"path",1),l(),r(3,"defs")(4,"clipPath",2),o(5,"rect",3),l()()()),n&2&&(h(e.getClassNames()),C("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role),a(),C("clip-path",e.pathId),a(3),m("id",e.pathId))},encapsulation:2})}return i})();export{L as a};
@@ -0,0 +1,7 @@
1
+ import{a as st}from"./chunk-FQRRGJBE.js";import{a as we,b as De}from"./chunk-BLR3HBYP.js";import{a as Se}from"./chunk-T6B4BOOB.js";import{a as qt,b as le}from"./chunk-7FFVGWUP.js";import{b as lt}from"./chunk-HG5MKVNR.js";import{b as Ut,c as pt,d as mt}from"./chunk-B54PFCWI.js";import{a as se,b as ce}from"./chunk-N4JIPI53.js";import"./chunk-7DYACF4D.js";import"./chunk-NZN6QJR3.js";import{a as ie}from"./chunk-5CZNOXPC.js";import"./chunk-IGWIRCAS.js";import{a as Ee,b as Ie}from"./chunk-3A4BFUGD.js";import{a as ot,b as rt,d as pe,k as me}from"./chunk-EL5BUFMO.js";import{a as re,b as ae}from"./chunk-EQ4PLHI4.js";import"./chunk-H7Q35Y7G.js";import"./chunk-R7N6BWL5.js";import{a as at}from"./chunk-DX2A6LIU.js";import{a as ke}from"./chunk-QF4D5YPK.js";import{b as ye}from"./chunk-VJ3IBUVO.js";import"./chunk-2AAVNIG7.js";import{a as Ht,b as Te}from"./chunk-LFZCMZAP.js";import"./chunk-6A2KUPOG.js";import"./chunk-36OX4S7M.js";import{d as $e}from"./chunk-Q5CVMJZC.js";import"./chunk-3GGXPPQT.js";import"./chunk-MFK5RQPJ.js";import{b as oe}from"./chunk-KJ2WX3FC.js";import"./chunk-6GN3MGBY.js";import"./chunk-Q24GCSGD.js";import{e as it,f as nt,h as ne}from"./chunk-H3BFDSSJ.js";import{b as jt,c as zt}from"./chunk-VGNJD35F.js";import{a as Xe,b as te}from"./chunk-2XUSZCQL.js";import{a as O,b as Je,c as Qe,d as Ze,e as et,f as tt}from"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{n as Ke,o as Ye,w as Z,x as ee}from"./chunk-H6HNANYB.js";import{b as ve}from"./chunk-2D2YD753.js";import{b as We,c as Pt,e as K,f as Y,g as Ot,i as dt,k as $,l as X,o as J,u as Ce,x as Q}from"./chunk-OIBDX2CA.js";import{b as He,e as U,l as W}from"./chunk-AOOG6YOT.js";import{a as Gt,b as be}from"./chunk-M6LSMNSQ.js";import{a as Ue}from"./chunk-2MKKFLNJ.js";import{h as ze,k as z,p as qe,q,s as H,y as Bt,z as At}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as D,Ac as ct,Bc as de,Cc as Oe,D as Be,Db as x,Dc as F,Ec as V,Fc as Nt,Gc as je,Ha as E,Lb as s,Nc as C,Ob as Ae,Oc as y,Pc as Me,Qb as M,Rb as Re,Rc as _,Tb as Fe,Ub as Ve,Vb as o,W as Ft,Wb as r,X as Vt,Xb as T,Y as xe,Yb as Ge,Zb as Pe,_ as L,bd as R,c as ge,ca as Lt,cb as j,cd as ue,db as he,ec as I,fc as c,hb as p,ia as S,ic as Mt,qa as h,ra as b,rc as a,s as Ne,sc as f,tc as w,uc as Le,wc as A,xb as N,xc as B,yc as P,zc as kt}from"./chunk-NMCKMUY4.js";import{a as g,b as v,c as fe,e as Rt}from"./chunk-YQFG5XE2.js";var G=(()=>{class t{constructor(){this.httpService=S(Gt),this.authService=S(Se)}fetchGeneralLedgerLoader(e="single",n={}){return this.httpService.get(void 0,`api/GeneralLedgerLoader/${e==="single"?"GetFilterSingle":"GetFilter"}`,{params:n})}getGLCount(e){return this.httpService.post(void 0,"api/GeneralLedger/GetSingleCount",e)}fetchGeneralLedgerReport(e,n="single"){return this.httpService.post(void 0,`api/GeneralLedger/${n==="single"?"GetSingle":"Get"}`,e)}exportGeneralLedger(e,n={}){let i=g({responseType:"blob"},n);return this.httpService.post(void 0,"/api/GeneralLedgerExport/GetGeneralLedgerExport",e,i)}getCustomerSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:n})}getSupplierSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:n})}getCashierSuggestions(e){let n={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:n})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(e,n={}){let i=new At({fromObject:Object.fromEntries(Object.entries(e).map(([d,k])=>[d,String(k)]))}),l=new Bt({"X-Timeout":"50000","X-Retry":"3","X-Retry-Delay":"2000","X-Exponential-Backoff":"true","X-Retry-On-500":"true","X-Retry-On-500-Message":"timeout expired"}),u=g({params:i,headers:l},n);return this.httpService.get(void 0,"/api/BalanceSheet",u)}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(e,n={}){return this.httpService.post(void 0,"api/IncomeStatement/List",g({},e),n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Lt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ri=()=>({width:"30vw"}),ai=()=>({"1199px":"75vw","575px":"90vw"}),li=t=>({"ng-dirty ng-invalid":t}),pi=t=>["/pages/journal/journal-entry/",t],mi=t=>({"text-success":t}),si=t=>({"text-danger":t});function ci(t,m){if(t&1&&(o(0,"div",33)(1,"div",34)(2,"span",35),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",34)(8,"span",36),a(9),r()()()),t&2){let e=m.$implicit;p(3),w("(",e.code,")"),p(6),f(e.name)}}function di(t,m){if(t&1&&(o(0,"div",33)(1,"div",34)(2,"span",35),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",34)(8,"span",36),a(9),r()()()),t&2){let e=m.$implicit;p(3),w("(",e.code,")"),p(6),f(e.name)}}function ui(t,m){t&1&&(o(0,"div",37),a(1," Account is required. "),r())}function _i(t,m){if(t&1&&(o(0,"div",38)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;p(2),f(e.value)}}function fi(t,m){if(t&1&&(o(0,"div",26)(1,"div",27),T(2,"p-radiobutton",39),o(3,"label",40),a(4),r()()()),t&2){let e=m.$implicit;p(2),s("value",e.key)("inputId",e.key),p(),s("for",e.key),p(),f(e.value)}}function gi(t,m){if(t&1){let e=D();o(0,"div",16)(1,"label",17),a(2,"Customer"),r(),o(3,"p-autocomplete",41),I("completeMethod",function(i){h(e);let l=c(3);return b(l.searchCustomer(i))}),r()()}if(t&2){let e=c(3);p(3),s("suggestions",e.customerSuggestions())}}function xi(t,m){if(t&1){let e=D();o(0,"div",16)(1,"label",17),a(2,"Supplier"),r(),o(3,"p-autocomplete",42),I("completeMethod",function(i){h(e);let l=c(3);return b(l.searchSupplier(i))}),r()()}if(t&2){let e=c(3);p(3),s("suggestions",e.supplierSuggestions())}}function hi(t,m){if(t&1){let e=D();o(0,"div",16)(1,"label",17),a(2,"Customer"),r(),o(3,"p-autocomplete",41),I("completeMethod",function(i){h(e);let l=c(3);return b(l.searchCustomer(i))}),r()()}if(t&2){let e=c(3);p(3),s("suggestions",e.customerSuggestions())}}function bi(t,m){if(t&1&&(o(0,"form",15)(1,"div",16)(2,"label",17),a(3,"Accounts"),r(),o(4,"p-select",18),x(5,ci,10,2,"ng-template",null,5,_)(7,di,10,2,"ng-template",null,6,_),r(),x(9,ui,2,0,"div",19),r(),o(10,"div",16)(11,"label",17),a(12,"From"),r(),o(13,"div",20),T(14,"p-datepicker",21)(15,"p-datepicker",22),r()(),o(16,"div",16)(17,"label",17),a(18,"Outlets"),r(),o(19,"p-multiselect",23),x(20,_i,3,1,"ng-template",null,6,_),r()(),o(22,"div",16)(23,"label",24),a(24,"Contact Type"),r(),o(25,"div",25),Fe(26,fi,5,4,"div",26,Re),r()(),x(28,gi,4,1,"div",16)(29,xi,4,1,"div",16)(30,hi,4,1,"div",16),o(31,"div",16)(32,"label",24),a(33,"Sort order"),r(),o(34,"div",25)(35,"div",26)(36,"div",27),T(37,"p-radiobutton",28),o(38,"label",29),a(39,"Asc"),r()()(),o(40,"div",30)(41,"div",27),T(42,"p-radiobutton",31),o(43,"label",32),a(44,"Desc"),r()()()()()()),t&2){let e,n,i,l=c(2);s("formGroup",l.form),p(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",l.loaderMetadata().options.accounts)("ngClass",V(14,li,((e=l.form.get("accountID"))==null?null:e.invalid)&&(((e=l.form.get("accountID"))==null?null:e.touched)||((e=l.form.get("accountID"))==null?null:e.dirty)))),p(5),s("ngIf",((n=l.form.get("accountID"))==null?null:n.invalid)&&(((n=l.form.get("accountID"))==null?null:n.touched)||((n=l.form.get("accountID"))==null?null:n.dirty))),p(5),s("showIcon",!0),p(),s("showIcon",!0),p(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",l.loaderMetadata().options.outlets),p(7),Ve(l.loaderMetadata().options.contactTypeOptions),p(2),M((i=l.form.controls.contactType.value)===1?28:i===2?29:30),p(9),s("value",!0),p(5),s("value",!1)}}function Si(t,m){if(t&1&&x(0,bi,45,16,"form",14),t&2){let e=c();s("ngIf",e.loaderMetadata())}}function Ci(t,m){if(t&1){let e=D();o(0,"p-button",45),I("onClick",function(){h(e);let i=c(2);return b(i.onToggleExportDialog())}),r()}}function vi(t,m){if(t&1&&(o(0,"div",33)(1,"a",43),a(2,"Return to Accounts"),r(),x(3,Ci,1,0,"p-button",44),r()),t&2){let e=c();p(3),s("ngIf",e.roleService.global().export)}}function yi(t,m){t&1&&T(0,"div",52)}function Ei(t,m){t&1&&(o(0,"tr")(1,"th",53),a(2,"Outlet"),r(),o(3,"th",53),a(4,"No."),r(),o(5,"th",53),a(6,"Date"),r(),o(7,"th"),a(8,"Contact / Note"),r(),o(9,"th",54),a(10,"Debit"),r(),o(11,"th",54),a(12,"Credit"),r(),o(13,"th",55),a(14,"Balance"),r()())}function Ii(t,m){if(t&1&&(o(0,"div",16)(1,"a",59),a(2),r(),T(3,"div",63),o(4,"span",64),a(5),r()()),t&2){let e=c().$implicit,n=c(3);p(),s("href",n.authService.getTenantExternalURL()+n.buildReferenceUrl(e),he),p(),f(e.referenceText),p(),s("innerHTML",e.journalNote,j),p(2),w("",e.note," ")}}function Ti(t,m){if(t&1&&(o(0,"div",16),T(1,"span",63)(2,"div",63),o(3,"span",65),a(4),r()()),t&2){let e=c().$implicit;p(),s("innerHTML",e.referenceText,j),p(),s("innerHTML",e.journalNote,j),p(2),w("",e.note," ")}}function wi(t,m){if(t&1&&(Ge(0),a(1),C(2,"number"),Pe()),t&2){let e=c().$implicit;p(),w(" ",y(2,1,e.debitAmount)," ")}}function Di(t,m){if(t&1&&(Ge(0),a(1),C(2,"number"),Pe()),t&2){let e=c().$implicit;p(),w(" ",y(2,1,e.creditAmount)," ")}}function Ri(t,m){if(t&1&&(Ge(0),a(1),C(2,"number"),Pe()),t&2){let e=c().$implicit;p(),w(" ",y(2,1,e.balance)," ")}}function Fi(t,m){if(t&1&&(o(0,"tr")(1,"td",56),a(2),r(),o(3,"td",56)(4,"a",57),a(5),r()(),o(6,"td",56)(7,"span",58),C(8,"date"),a(9),C(10,"date"),r()(),o(11,"td",56)(12,"div",16)(13,"a",59),a(14),r(),x(15,Ii,6,4,"div",16)(16,Ti,5,3,"div",16),r()(),o(17,"td",60),x(18,wi,3,3,"ng-container",61),r(),o(19,"td",60),x(20,Di,3,3,"ng-container",61),r(),o(21,"td",62),x(22,Ri,3,3,"ng-container",61),r()()),t&2){let e=m.$implicit,n=c(3);p(2),f(e.outletName),p(2),s("routerLink",V(19,pi,e.id)),p(),f(e.number),p(2),s("pTooltip",Me(8,13,e.date,"dd MMM y")),p(2),w(" ",Me(10,16,e.date,"dd MMM y")," "),p(4),s("href",n.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,he),p(),f(e.contactName),p(),M(n.buildReferenceUrl(e)?15:16),p(2),s("ngClass",V(21,mi,e.debitAmount!==0)),p(),s("ngIf",e.debitAmount!==0),p(),s("ngClass",V(23,si,e.creditAmount!==0)),p(),s("ngIf",e.creditAmount!==0),p(2),s("ngIf",e.balance!==0)}}function Vi(t,m){if(t&1&&(o(0,"tr"),T(1,"td",66),o(2,"td",67),a(3,"Total"),r(),o(4,"td",68),a(5),C(6,"number"),r(),o(7,"td",69),a(8),C(9,"number"),r(),T(10,"td"),r()),t&2){let e=c(3);p(5),w(" ",y(6,2,e.debitSubTotal())," "),p(3),w(" ",y(9,4,e.creditSubTotal())," ")}}function Li(t,m){t&1&&(o(0,"tr")(1,"td",70)(2,"span"),a(3,"No records found."),r()()())}function Mi(t,m){if(t&1){let e=D();o(0,"button",71),I("click",function(){h(e);let i=c(3);return b(i.getGLCount())})("keyup.enter",function(){h(e);let i=c(3);return b(i.getGLCount())}),r()}}function ki(t,m){if(t&1&&a(0),t&2){let e=c(3);w(" ",e.count()," ")}}function Ni(t,m){if(t&1){let e=D();o(0,"p-button",72),I("onClick",function(){h(e);let i=c(3);return b(i.onNextPage())}),r()}}function Bi(t,m){if(t&1&&(o(0,"div",47)(1,"p-table",48),x(2,yi,1,0,"ng-template",null,7,_)(4,Ei,15,0,"ng-template",null,8,_)(6,Fi,23,25,"ng-template",null,9,_)(8,Vi,11,6,"ng-template",null,4,_)(10,Li,4,0,"ng-template",null,10,_),r(),o(12,"div",49)(13,"div"),a(14),x(15,Mi,1,0,"button",50)(16,ki,1,1),a(17," entries "),r(),o(18,"div",33),x(19,Ni,1,0,"p-button",51),r()()()),t&2){let e=c(2);p(),s("value",e.items().data.data),p(13),Le(" Showing ",e.pagination().first," to ",e.pagination().end," of "),p(),M(e.totalRecords()===-1?15:16),p(4),M(e.pagination().hasNext?19:-1)}}function Ai(t,m){if(t&1&&x(0,Bi,20,5,"div",46),t&2){let e=c();s("ngIf",e.items()&&e.items().data)}}function Gi(t,m){if(t&1&&(o(0,"div",73)(1,"div",74)(2,"div",75)(3,"div",25)(4,"div",76)(5,"label",24),a(6,"Page"),r()(),o(7,"div",76),T(8,"input",77),r()()()(),o(9,"div",78)(10,"div",27),T(11,"i",79),o(12,"span",80),a(13),C(14,"number"),C(15,"number"),r()()()()),t&2){let e=c();p(),s("formGroup",e.form),p(12),Le("Exporting data from ",y(14,3,e.filter().exportPageNumber)," - ",y(15,5,e.filter().exportPageSize),"")}}function Pi(t,m){if(t&1){let e=D();o(0,"p-button",81),I("onClick",function(){h(e);let i=c();return b(i.onToggleExportDialog())}),r()}t&2&&s("rounded",!0)("text",!0)}function Oi(t,m){if(t&1){let e=D();o(0,"p-button",82),I("click",function(){h(e);let i=c();return b(i.onToggleExportDialog())}),r(),o(1,"p-button",83),I("click",function(){h(e);let i=c();return b(i.onExport())}),r()}}var Kt=(()=>{class t{getGLCount(){this.reportService.getGLCount(this.filter()).pipe(L(({count:e})=>{this.totalRecords.set(e)})).subscribe()}onToggleExportDialog(){this.isDialogExportVisible.update(e=>!e)}get pageTitle(){return this.items()&&this.items().pageTitle?this.items().pageTitle:"General Ledger"}constructor(){this.reportService=S(G),this.route=S(He),this.roleService=S(ie),this.authService=S(Se),this.fb=S(Ce),this.coaService=S(at),this.toastr=S(Ue),this.dayjsService=S(le),this.metadata=E(null),this.items=E(null),this.totalRecords=E(-1),this.dialogFilterVisible=E(!0),this.initDialogVisible=E(!1),this.isDialogExportVisible=E(!1),this.customerSuggestions=E([]),this.supplierSuggestions=E([]),this.categoriesOptions=E([]),this.localFilter=E({}),this.count=R(()=>this.totalRecords()<0?1/0:this.totalRecords()),this.lastGetDataLength=E(0),this.pagination=R(()=>{let e=this.filter(),n=this.totalRecords()!=null&&this.totalRecords()>=0?this.totalRecords():1/0,i=this.items()?.data?.data?.length||0,l=i==n||this.lastGetDataLength()<e.pageSize;return{first:1,end:e.pageSize>0?i:0,total:n,page:e.pageNumber,pageSize:e.pageSize,hasPrev:e.pageNumber>1,hasNext:!l}}),this.queryFilter=ve(this.route.queryParamMap.pipe(Ne(e=>{let n=e.get("from")?this.dayjsService.format(new Date(e.get("from"))):null,i=e.get("to")?this.dayjsService.format(new Date(e.get("to"))):null,l={},u=e.get("id");return be.IsNotEmpty(u)&&(l=v(g({},l),{accountID:u})),be.IsNotEmpty(n)&&be.IsNotEmpty(i)&&(l=v(g({},l),{from:n,to:i})),l})),{initialValue:null}),this.loaderMetadata=ve(this.reportService.fetchGeneralLedgerLoader("single",this.queryFilter()),{initialValue:null}),this.baseFilter=R(()=>{let e=this.loaderMetadata();return e?e.filter:null}),this.exportFileTypes=E([{key:0,value:"CSV"},{key:1,value:"Excel"}]),this.filter=R(()=>{let e=this.baseFilter(),n=this.localFilter();return e?g(g({},e),n):null}),this.creditSubTotal=R(()=>(this.items()?.data?.data??[]).reduce((n,i)=>n+(Number(i.creditAmount)||0),0)),this.balanceSubTotal=R(()=>(this.items()?.data?.data??[]).reduce((n,i)=>n+(Number(i.balance)||0),0)),this.debitSubTotal=R(()=>(this.items()?.data?.data??[]).reduce((n,i)=>n+(Number(i.debitAmount)||0),0)),this.initializeForm(),ue(()=>{let e=this.filter();e&&(be.IsEmpty(this.form.value.accountID)||this.form.value.accountID!==e.accountID)&&this.form.patchValue(this.transformFilterToFormValue(e),{emitEvent:!1})}),ue(()=>{let e=this.filter(),n=this.form.value.accountID;!e||be.IsEmpty(n)||this.reportService.fetchGeneralLedgerReport(e).subscribe(i=>{this.lastGetDataLength.set(i.data?.data?.length),this.items.update(l=>e.pageNumber===1?i:v(g({},i),{data:v(g({},i.data),{data:[...l?.data.data??[],...i.data.data]})}))})})}buildReferenceUrl(e){return st(e)}ngOnInit(){this.route.queryParamMap.pipe(Be(e=>e.keys.length>0)).subscribe({next:()=>this.initDialogVisible.set(!0)})}initializeForm(){this.form=this.fb.group({accountID:this.fb.control(null,[Pt.required]),from:this.fb.control(null),to:this.fb.control(new Date),contactType:this.fb.control(null),contactID:this.fb.control(""),listOutletID:this.fb.control([]),pageNumber:this.fb.control(1),pageSize:this.fb.control(50),sortAscending:this.fb.control(!0),listAccountID:this.fb.control([]),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportPageSize:this.fb.control(0)})}findNodeByKey(e,n){for(let i of e){if(i.key===n)return i;if(i.children){let l=this.findNodeByKey(i.children,n);if(l)return l}}return null}transformFilterToFormValue(e){return Object.entries(e).reduce((n,[i,l])=>{switch(i){case"from":n[i]=l&&(typeof l=="string"||typeof l=="number"||l instanceof Date)?this.dayjsService.from(l)?.toDate():null;break;case"to":n[i]=l&&(typeof l=="string"||typeof l=="number"||l instanceof Date)?this.dayjsService.from(l)?.toDate():this.dayjsService.now.toDate();break;case"listCategoryID":Array.isArray(l)?n[i]=l.map(u=>this.findNodeByKey(this.categoriesOptions(),u)).filter(u=>!!u):n[i]=[];break;case"listOutletID":case"listAccountID":n[i]=Array.isArray(l)?l:[];break;case"pageNumber":case"pageSize":case"exportPageNumber":case"exportPageSize":n[i]=l!=null?Number(l):0;break;case"sortAscending":case"export":n[i]=!!l;break;case"contactType":n[i]=l!=null?Number(l):null;break;default:n[i]=l}return n},{})}clearContactValueOnContactTypeChange(){this.form.get("contactType")?.valueChanges.subscribe(()=>this.form.get("contactID")?.setValue(""))}isEmpty(e){return e==null||typeof e=="string"&&e.trim().length===0}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(L(e=>this.categoriesOptions.set(e))).subscribe()}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(L(n=>this.customerSuggestions.set(n))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(L(n=>this.supplierSuggestions.set(n))).subscribe()}onAccountChange(e){Array.isArray(e.value)&&e.value.length>=1&&this.toastr.warning("Please select at least 1 accounts for the general ledger report.","Warning")}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let e=this.buildFilterBody();this.dialogFilterVisible.set(!1),this.localFilter.set(e),this.totalRecords()!==-1&&this.getGLCount()}buildFilterBody(){let l=this.form.getRawValue(),{from:e,to:n}=l,i=fe(l,["from","to"]);return v(g({},this.filter()),{pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType})}onExport(){let e=this.buildExportBody();this.performExport(e)}performExport(e){this.reportService.exportGeneralLedger(e,{responseType:"blob",observe:"response"}).pipe(L(n=>this.handleExportResponse(n))).subscribe()}handleExportResponse(e){let n=e.headers,i=n.get("Content-Disposition")??n.get("content-disposition"),l="download.csv";if(i){let d=i.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);d?.[1]&&(l=decodeURIComponent(d[1].replace(/"/g,"")))}let u=e.body;mt(u,l,u.type)}buildExportBody(){let l=this.form.value,{from:e,to:n}=l,i=fe(l,["from","to"]);return v(g({},this.filter()),{exportPageNumber:+i.exportPageNumber,pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType,export:!0})}onNextPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(g({},e),{pageNumber:n+1,balance:this.items().data.data[this.items().data.data.length-1]?.balance??0,credit:this.items().data.data[this.items().data.data.length-1]?.creditAmount??0,debit:this.items().data.data[this.items().data.data.length-1]?.debitAmount??0})})}onPrevPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(g({},e),{pageNumber:Math.max(1,n-1)})})}goToPage(e){this.localFilter.update(n=>v(g({},n),{pageNumber:e}))}goToLastPage(){let e=this.filter();if(!e)return;let n=this.totalRecords();if(n===-1||!isFinite(n)){this.toastr.info("Please load total records before going to the last page","Info");return}let i=Math.ceil(n/e.pageSize);if(e.pageNumber>=i){this.toastr.warning("You are already on the last page","Warning");return}this.localFilter.update(l=>v(g({},l),{pageNumber:i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-general-ledger"]],decls:13,vars:13,consts:[["filters",""],["actionButton",""],["content",""],["closeIconTemplate",""],["footer",""],["selectedItem",""],["item",""],["caption",""],["header",""],["body",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],["header","Export Journal Entry",3,"visibleChange","modal","visible","breakpoints"],["class","d-flex flex-column gap-3",4,"ngIf"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","accountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"virtualScroll","virtualScrollItemSize","options","ngClass"],["class","text-danger",4,"ngIf"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","iconDisplay","input","inputId","icondisplay",3,"showIcon"],["showClear","","display","chip","formControlName","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["for",""],[1,"row"],[1,"col-4"],[1,"d-flex","align-items-center","gap-2"],["name","sortAscending","formControlName","sortAscending","inputId","asc",3,"value"],["for","asc",1,"m-0"],[1,"col-3"],["name","sortAscending","formControlName","sortAscending","inputId","desc",3,"value"],["for","desc",1,"m-0"],[1,"d-flex","gap-2"],[1,""],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"text-danger"],[1,"flex","items-center","gap-2"],["name","contactType","formControlName","contactType",3,"value","inputId"],[1,"m-0",3,"for"],["formControlName","contactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined","fs-3"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],["class","px-3 h-100 bg-white border-top",4,"ngIf"],[1,"px-3","h-100","bg-white","border-top"],[3,"value"],[1,"d-flex","justify-content-between","align-items-center","my-2"],["type","button","aria-label","Get journal entry count","tabindex","0",1,"fa-solid","fa-circle-question","cursor-pointer","p-0","border-0","bg-transparent"],["variant","outlined","severity","secondary","icon","fa-solid fa-angle-right","size","small","label","next"],[1,"d-flex","gap-1"],[2,"width","120px"],[1,"text-end",2,"width","120px"],[1,"text-end",2,"width","140px"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],["tooltipPosition","top",3,"pTooltip"],["target","_blank",1,"link","link-primary",3,"href"],[1,"text-end","text-break",3,"ngClass"],[4,"ngIf"],[1,"text-end","text-break"],[3,"innerHTML"],[2,"width","300px","white-space","normal","word-break","break-word"],[2,"white-space","normal","word-break","break-word"],["colspan","3"],[1,"text-end","fw-semibold"],[1,"text-end","fw-semibold","text-success"],[1,"text-end","fw-semibold","text-danger"],["colspan","8"],["type","button","aria-label","Get journal entry count","tabindex","0",1,"fa-solid","fa-circle-question","cursor-pointer","p-0","border-0","bg-transparent",3,"click","keyup.enter"],["variant","outlined","severity","secondary","icon","fa-solid fa-angle-right","size","small","label","next",3,"onClick"],[1,"d-flex","flex-column","gap-3"],[1,"row",3,"formGroup"],[1,"col-8"],[1,"col"],["type","text","formControlName","exportPageNumber","fluid","","pInputText","","pSize","small"],["role","alert",1,"alert","alert-primary","m-0","p-2"],[1,"fa-solid","fa-circle-info"],[1,"fs-2","text-dark","fw-semibold"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(n,i){if(n&1){let l=D();o(0,"app-main-panel",11),P("isDialogFilterVisibleChange",function(d){return h(l),B(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),b(d)})("isInitDialogFilterVisibleChange",function(d){return h(l),B(i.initDialogVisible,d)||(i.initDialogVisible=d),b(d)}),I("filterConfirmed",function(){return h(l),b(i.onFilterOKEvent())}),x(1,Si,1,1,"ng-template",null,0,_)(3,vi,4,1,"ng-template",null,1,_)(5,Ai,1,1,"ng-template",null,2,_),r(),o(7,"p-dialog",12),P("visibleChange",function(d){return h(l),B(i.isDialogExportVisible,d)||(i.isDialogExportVisible=d),b(d)}),x(8,Gi,16,7,"div",13)(9,Pi,1,2,"ng-template",null,3,_)(11,Oi,2,0,"ng-template",null,4,_),r()}n&2&&(s("pageTitle",i.pageTitle),A("isDialogFilterVisible",i.dialogFilterVisible),s("isFilterable",!0),A("isInitDialogFilterVisible",i.initDialogVisible),s("scrollable",!0),p(7),Ae(F(11,ri)),s("modal",!0),A("visible",i.isDialogExportVisible),s("breakpoints",F(12,ai)),p(),s("ngIf",i.form&&i.filter()))},dependencies:[ne,H,ze,z,q,qe,oe,me,pe,nt,it,ee,Z,Te,Ht,ae,re,De,we,Q,$,We,K,Y,X,J,ce,se,ye,$e,pt,lt,te,W,U,rt,ot,zt,jt,Ye,Ke],styles:["[_nghost-%COMP%] .p-datatable .p-datatable-header{padding:.75rem 1rem .75rem 0}"],changeDetection:0})}}return t})();var ji={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{from:"",to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},St=Je(tt(ji),Qe(t=>{let m={totalCOGS:R(()=>{let e=t.data()?.data?.cogs;return Array.isArray(e)?e.reduce((n,i)=>n+(i?.amount??0),0):0}),totalRevenue:R(()=>{let e=t.data()?.data?.revenue;return Array.isArray(e)?e.reduce((n,i)=>n+(i?.amount??0),0):0}),totalExpense:R(()=>{let e=t.data()?.data?.expense;return Array.isArray(e)?e.reduce((n,i)=>n+(i?.amount??0),0):0}),grossProfit:R(()=>Array.isArray(t.data()?.data?.cogs)&&Array.isArray(t.data()?.data?.revenue)?m.totalRevenue()-m.totalCOGS():0),profitOrLoss:R(()=>m.totalRevenue()-m.totalCOGS()-m.totalExpense()),isDataEmpty:R(()=>Object.keys(t.data()?.data??{}).length===0)};return m}),et(t=>{let m=S(G),e=S(le),n={updateFilter(i){O(t,l=>v(g({},l),{filter:g(g({},l.filter),i)}))},getLoader:Ee(ge(xe(()=>m.getIncomeStatementLoader().pipe(Ie({next:i=>{O(t,l=>v(g({},l),{loader:i,filter:v(g({},l.filter),{from:e.from(i.filter.from).format(),to:e.from(i.filter.to).format()})})),n.getIncomeStatement(t.filter)},error:i=>{console.error(i)}}))))),getIncomeStatement:Ee(ge(xe(i=>m.getIncomeStatement(i).pipe(Vt(()=>O(t,l=>v(g({},l),{isLoading:!0}))),Ie({next:l=>{O(t,u=>v(g({},u),{data:l,isLoading:!1}))},error:l=>{console.error(l)}})))))};return n}),Ze({onInit:t=>{t.getLoader()}}));var Ct=()=>({}),vt=t=>["/pages/chart-of-account/account/",t],yt=()=>["/pages/report/general-ledger"],Et=(t,m,e)=>({id:t,from:m,to:e});function qi(t,m){if(t&1){let e=D();o(0,"p-button",10),I("onClick",function(){h(e);let i=c(2);return b(i.onExport())}),r()}}function Hi(t,m){if(t&1&&(o(0,"div",8),x(1,qi,1,0,"p-button",9),r()),t&2){let e=c();p(),s("ngIf",e.roleService.global().export)}}function Ui(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",16),a(6,"Total"),r()())}function Wi(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),C(9,"number"),r()()()),t&2){let e=m.$implicit;c(2);let n=de(0),i=de(1);p(2),f(e.code),p(2),s("routerLink",V(8,vt,e.accountID)),p(),f(e.name),p(2),s("routerLink",F(10,yt))("queryParams",je(11,Et,e.accountID,n,i)),p(),f(y(9,6,e.amount))}}function Ki(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total Revenue :"),r(),o(5,"span",22),a(6),C(7,"number"),r()()()()),t&2){let e=c(3);p(6),f(y(7,1,e.store.totalRevenue()))}}function Yi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No revenue records available"),r()()())}function $i(t,m){if(t&1&&(o(0,"h6",12),a(1,"Revenue"),r(),o(2,"p-table",13),x(3,Ui,7,0,"ng-template",null,3,_)(5,Wi,10,15,"ng-template",null,4,_)(7,Ki,8,3,"ng-template",null,5,_)(9,Yi,4,0,"ng-template",null,6,_),r()),t&2){let e,n=c(2);p(2),s("value",(e=n.store.data())==null||e.data==null?null:e.data.revenue)}}function Xi(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",24),a(6,"Total"),r()())}function Ji(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),C(9,"number"),r()()()),t&2){let e=m.$implicit;c(2);let n=de(0),i=de(1);p(2),f(e.code),p(2),s("routerLink",V(8,vt,e.accountID)),p(),f(e.name),p(2),s("routerLink",F(10,yt))("queryParams",je(11,Et,e.accountID,n,i)),p(),f(y(9,6,e.amount))}}function Qi(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total COGS :"),r(),o(5,"span",22),a(6),C(7,"number"),r()()()(),o(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),a(12,"Gross Profit :"),r(),o(13,"span",22),a(14),C(15,"number"),r()()()()),t&2){let e=c(3);p(6),f(y(7,2,e.store.totalCOGS())),p(8),f(y(15,4,e.store.grossProfit()))}}function Zi(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No COGS records available"),r()()())}function en(t,m){if(t&1&&(o(0,"h4",12),a(1,"COGS"),r(),o(2,"p-table",13),x(3,Xi,7,0,"ng-template",null,3,_)(5,Ji,10,15,"ng-template",null,4,_)(7,Qi,16,6,"ng-template",null,5,_)(9,Zi,4,0,"ng-template",null,6,_),r()),t&2){let e,n=c(2);p(2),s("value",(e=n.store.data())==null||e.data==null?null:e.data.cogs)}}function tn(t,m){t&1&&(o(0,"tr")(1,"th",14),a(2,"Code"),r(),o(3,"th",15),a(4,"Name"),r(),o(5,"th",16),a(6,"Total"),r()())}function nn(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",17),a(5),r()(),o(6,"td",16)(7,"a",18),a(8),C(9,"number"),r()()()),t&2){let e=m.$implicit;c(2);let n=de(0),i=de(1);p(2),f(e.code),p(2),s("routerLink",V(8,vt,e.accountID)),p(),f(e.name),p(2),s("routerLink",F(10,yt))("queryParams",je(11,Et,e.accountID,n,i)),p(),f(y(9,6,e.amount))}}function on(t,m){if(t&1&&(o(0,"tr")(1,"td",19)(2,"div",20)(3,"span",21),a(4,"Total Expense :"),r(),o(5,"span",22),a(6),C(7,"number"),r()()()(),o(8,"tr")(9,"td",19)(10,"div",20)(11,"span",21),a(12,"Profit / Loss :"),r(),o(13,"span",22),a(14),C(15,"number"),r()()()()),t&2){let e=c(3);p(6),f(y(7,2,e.store.totalExpense())),p(8),f(y(15,4,e.store.profitOrLoss()))}}function rn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No expense records available"),r()()())}function an(t,m){if(t&1&&(o(0,"h4",12),a(1,"Expense"),r(),o(2,"p-table",13),x(3,tn,7,0,"ng-template",null,3,_)(5,nn,10,15,"ng-template",null,4,_)(7,on,16,6,"ng-template",null,5,_)(9,rn,4,0,"ng-template",null,6,_),r()),t&2){let e,n=c(2);p(2),s("value",(e=n.store.data())==null||e.data==null?null:e.data.expense)}}function ln(t,m){if(t&1&&(kt(0)(1),o(2,"p-panel")(3,"div",11),x(4,$i,11,1)(5,en,11,1)(6,an,11,1),r()()),t&2){let e,n,i,l,u,d=c();ct((e=d.store.filter())!=null&&e.from?d.store.filter().from:null),p(),ct((n=d.store.filter())!=null&&n.to?d.store.filter().to:null),p(3),M(d.Object.keys((i=d.store.data().data)!==null&&i!==void 0?i:F(5,Ct)).length>0?4:-1),p(),M(d.Object.keys((l=(l=d.store.data().data)==null?null:l.cogs)!==null&&l!==void 0?l:F(6,Ct)).length>0?5:-1),p(),M(d.Object.keys((u=(u=d.store.data().data)==null?null:u.expense)!==null&&u!==void 0?u:F(7,Ct)).length>0?6:-1)}}function pn(t,m){if(t&1){let e=D();o(0,"form",25)(1,"div",26)(2,"label",27),a(3,"Outlet"),r(),T(4,"p-multiselect",28),r(),o(5,"div",26)(6,"label",27),a(7,"Cashier"),r(),o(8,"p-autocomplete",29),I("completeMethod",function(i){h(e);let l=c();return b(l.onCashierSearch(i))})("onSelect",function(i){h(e);let l=c();return b(l.onCashierSelect(i))}),r()(),o(9,"div",26)(10,"label",30),a(11,"From - To"),r(),o(12,"div",31),T(13,"p-datepicker",32)(14,"p-datepicker",33),r()()()}if(t&2){let e=c();s("formGroup",e.formFilter),p(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.loader().options.outlets)("showClear",!0),p(4),s("showClear",!0)("suggestions",e.cashierSuggestions())("showClear",!0),p(5),s("iconDisplay","input")("showIcon",!0),p(),s("iconDisplay","input")("showIcon",!0)}}var Yt=(()=>{class t{constructor(){this.dayjsService=S(le),this.store=S(St),this.fb=S(Ce),this.reportService=S(G),this.roleService=S(ie),this.isInitDialogFilterVisible=E(!1),this.dialogFilterVisible=E(!1),this.cashierSuggestions=E([]),this.cashierHashMap=new Map,this.Object=Object,ue(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm(),console.log(this.cashierHashMap.entries())}onSearch(e){this.store.updateFilter(v(g({},this.store.filter()),{Text:e}))}onCashierSearch(e){this.reportService.getCashierSuggestions(e.query).pipe(ke("Cashier Suggestions"),L(n=>this.cashierSuggestions.set(n))).subscribe()}initForm(){let e=this.store.filter();console.log("initForm",this.cashierHashMap.get(e.CashierID)),this.formFilter=this.fb.group({EntityID:this.fb.control(e.EntityID??[]),CashierID:this.fb.control(this.cashierHashMap.get(e.CashierID)??""),Text:this.fb.control(e.Text??""),from:this.fb.control(e.from?this.dayjsService.from(e.from).toDate():null),to:this.fb.control(e.to?this.dayjsService.from(e.to).toDate():null)})}onFilterOK(){let e=this.formFilter.getRawValue(),n=Object.entries(e).reduce((i,[l,u])=>(l==="from"||l==="to"?u instanceof Date&&(i[l]=this.dayjsService.from(u).format()):i[l]=u||null,i),{});this.store.updateFilter(g(g({},this.store.filter()),n)),this.dialogFilterVisible.update(i=>!i),console.log("body",e)}onCashierSelect(e){console.log("Cashier selected:",e),!this.cashierHashMap.has(e.value.Key)&&(this.cashierHashMap.set(e.value.Key,e.value.Value),console.log("Cashier HashMap:",this.cashierHashMap))}onExport(){let e=v(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportPageSize:1e4});this.reportService.getIncomeStatement(e,{responseType:"blob"}).pipe(ke("Export Profit & Loss"),L(n=>{let i=n.type,l=[n],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(l,{type:i}));let d=`profit-and-loss.${i.split("/")[1]}`;u.setAttribute("download",d),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-income-statement"]],features:[Oe([St])],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","isFilterable","pageTitle","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold"],[3,"value"],[2,"width","20%"],[2,"width","30%"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","3",1,"text-end","fw-semibold"],[1,"row"],[1,"col"],[1,"col-1","col-lg-2"],["colspan","3",1,""],[1,"text-end",2,"min-width","10%"],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["formControlName","EntityID","filterBy","value","appendTo","body","display","chip","optionLabel","value","optionValue","key","placeholder","Select an Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["appendTo","body","formControlName","CashierID","optionLabel","Value","optionValue","Key","styleClass","w-100","inputStyleClass","w-100","field","Value","placeholder","Search a cashier",3,"completeMethod","onSelect","showClear","suggestions"],["for","outlet"],[1,"d-flex","flex-column","gap-2"],["formControlName","from","styleClass","w-100 mb-0","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"]],template:function(n,i){if(n&1){let l=D();o(0,"app-main-panel",7),P("isDialogFilterVisibleChange",function(d){return h(l),B(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),b(d)})("isInitDialogFilterVisibleChange",function(d){return h(l),B(i.isInitDialogFilterVisible,d)||(i.isInitDialogFilterVisible=d),b(d)}),I("filterConfirmed",function(){return h(l),b(i.onFilterOK())}),x(1,Hi,2,1,"ng-template",null,0,_)(3,ln,7,8,"ng-template",null,1,_)(5,pn,15,12,"ng-template",null,2,_),r()}n&2&&(s("isFilterable",!0)("pageTitle",i.store.data().pageTitle),A("isDialogFilterVisible",i.dialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ne,H,z,q,Te,ae,re,Q,$,K,Y,X,J,ce,se,oe,me,pe,te,Xe,W,U,De,we,ee,Z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=Rt(qt());var mn={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,It.default)().format("YYYY-MM-DD"),listOutletParam:[]}},Tt=Je(tt(mn),Qe(t=>({totalAsset:R(()=>t.data().asset.reduce((m,e)=>m+ +e.amount,0)),totalLiability:R(()=>t.data().liability.reduce((m,e)=>m+ +e.counterAmount,0)),totalEquity:R(()=>t.data().equity.reduce((m,e)=>m+ +e.counterAmount,0))})),et(t=>{let m=S(G),e={updateFilter:n=>{O(t,i=>v(g({},i),{filter:n}))},fetchBalanceSheet:Ee(ge(Be(()=>{let n=t.filter();return Object.entries(n).every(([i,l])=>l!=null&&l!=="")}),xe(n=>m.getBalanceSheet(n).pipe(Ie({next:i=>{O(t,l=>v(g({},l),{data:i}))},error:i=>{console.error(i)}}))),Ft(1))),fetchLoader:Ee(ge(xe(()=>m.getBalanceSheetLoader().pipe(Ie({next:n=>{O(t,i=>v(g({},i),{metadata:n,filter:{date:(0,It.default)(n.filter.to).format("YYYY-MM-DD")}})),e.fetchBalanceSheet(t.filter)},error:n=>{console.error(n)}})))))};return e}),Ze(t=>({onInit:()=>{t.fetchLoader()}})));var $t=Rt(qt());var wt=t=>["/pages/chart-of-account/account/",t],Dt=()=>["/pages/report/general-ledger"],sn=(t,m)=>({id:t,to:m}),Xt=t=>({id:t});function cn(t,m){if(t&1){let e=D();o(0,"p-button",11),I("onClick",function(){h(e);let i=c(2);return b(i.onExport())}),r()}}function dn(t,m){if(t&1&&(o(0,"div",9),x(1,cn,1,0,"p-button",10),r()),t&2){let e=c();p(),s("ngIf",e.roleService.global().export)}}function un(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Asset"),r(),o(5,"th",17),a(6,"Total"),r()())}function _n(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",18),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),C(9,"number"),r()()()),t&2){let e=m.$implicit,n=c(3);p(2),f(e.code),p(2),s("routerLink",V(8,wt,e.accountID)),p(),f(e.name),p(2),s("routerLink",F(10,Dt))("queryParams",Nt(11,sn,e.accountID,n.store.filter().date)),p(),f(y(9,6,e.amount))}}function fn(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2,"Total Asset"),r(),o(3,"td",22),a(4),C(5,"number"),r()()),t&2){let e=c(3);p(4),w(" ",y(5,1,e.store.totalAsset())," ")}}function gn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No asset records found."),r()()())}function xn(t,m){if(t&1&&(o(0,"h4",14),a(1,"Asset"),r(),o(2,"p-table",15),x(3,un,7,0,"ng-template",null,3,_)(5,_n,10,14,"ng-template",null,4,_)(7,fn,6,3,"ng-template",null,5,_)(9,gn,4,0,"ng-template",null,6,_),r()),t&2){let e=c(2);p(2),s("value",e.store.data().asset)}}function hn(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Liability"),r(),o(5,"th",17),a(6,"Total"),r()())}function bn(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",25),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),C(9,"number"),r()()()),t&2){let e=m.$implicit;p(2),f(e.code),p(2),s("routerLink",V(8,wt,e.accountID)),p(),f(e.name),p(2),s("routerLink",F(10,Dt))("queryParams",V(11,Xt,e.accountID)),p(),f(y(9,6,e.counterAmount))}}function Sn(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2," Total Liability "),r(),o(3,"td",22),a(4),C(5,"number"),r()()),t&2){let e=c(3);p(4),w(" ",y(5,1,e.store.totalLiability())," ")}}function Cn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No liability records found."),r()()())}function vn(t,m){if(t&1&&(o(0,"h4",24),a(1,"Liability"),r(),o(2,"p-table",15),x(3,hn,7,0,"ng-template",null,3,_)(5,bn,10,13,"ng-template",null,4,_)(7,Sn,6,3,"ng-template",null,5,_)(9,Cn,4,0,"ng-template",null,6,_),r()),t&2){let e=c(2);p(2),s("value",e.store.data().liability)}}function yn(t,m){t&1&&(o(0,"tr")(1,"th",16),a(2,"Code"),r(),o(3,"th"),a(4,"Equity"),r(),o(5,"th",17),a(6,"Total"),r()())}function En(t,m){if(t&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"a",18),a(5),r()(),o(6,"td",19)(7,"a",20),a(8),C(9,"number"),r()()()),t&2){let e=m.$implicit;p(2),f(e.code),p(2),s("routerLink",V(8,wt,e.accountID)),p(),f(e.name),p(2),s("routerLink",F(10,Dt))("queryParams",V(11,Xt,e.accountID)),p(),f(y(9,6,e.counterAmount))}}function In(t,m){if(t&1&&(o(0,"tr")(1,"td",21),a(2,"Total Equity"),r(),o(3,"td",22),a(4),C(5,"number"),r()(),o(6,"tr")(7,"td",21),a(8," Total Liability + Equity "),r(),o(9,"td",22),a(10),C(11,"number"),r()()),t&2){let e=c(3);p(4),w(" ",y(5,2,e.store.totalEquity())," "),p(6),w(" ",y(11,4,e.store.totalLiability()+e.store.totalEquity())," ")}}function Tn(t,m){t&1&&(o(0,"tr")(1,"td",23)(2,"span"),a(3,"No equity records found."),r()()())}function wn(t,m){if(t&1&&(o(0,"h4",24),a(1,"Equity"),r(),o(2,"p-table",15),x(3,yn,7,0,"ng-template",null,3,_)(5,En,10,13,"ng-template",null,4,_),a(7," <"),x(8,In,12,6,"ng-template",null,5,_)(10,Tn,4,0,"ng-template",null,6,_),r()),t&2){let e=c(2);p(2),s("value",e.store.data().equity)}}function Dn(t,m){if(t&1&&(o(0,"p-panel",12)(1,"div",13),x(2,xn,11,1)(3,vn,11,1)(4,wn,12,1),r()()),t&2){let e=c();s("showHeader",!1),p(2),M(e.Object.keys(e.store.data().asset).length>0?2:-1),p(),M(e.Object.keys(e.store.data().liability).length>0?3:-1),p(),M(e.Object.keys(e.store.data().equity).length>0?4:-1)}}function Rn(t,m){if(t&1&&(o(0,"div",31)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;p(2),f(e.value)}}function Fn(t,m){if(t&1&&(o(0,"form",26)(1,"div",27)(2,"label",28),a(3,"Outlet"),r(),o(4,"p-multiselect",29),x(5,Rn,3,1,"ng-template",null,7,_),r()(),o(7,"div",27)(8,"label",28),a(9,"From"),r(),T(10,"p-datepicker",30),r()()),t&2){let e=c();s("formGroup",e.filterForm),p(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.metadata().options.outlets)("showClear",!0),p(6),s("iconDisplay","input")("showIcon",!0)}}var Jt=(()=>{class t{constructor(){this.store=S(Tt),this.ReportServiceStore=S(G),this.dialogFilterVisible=E(!1),this.isInitDialogFilterVisible=E(!1),this.roleService=S(ie),this.Object=Object}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new Ot({date:new dt(new Date),outletID:new dt([])})}onFilterOKEvent(){let{date:e,outletID:n}=this.filterForm.value;this.store.updateFilter({date:(0,$t.default)(e).format("YYYY-MM-DD"),listOutletParam:n}),this.dialogFilterVisible.update(i=>!i)}onExport(){let e=v(g({},this.store.filter()),{export:!0,ExportPageNumber:1,ExportPageSize:1e4});this.ReportServiceStore.getBalanceSheet(e,{responseType:"blob"}).pipe(ke("Export Balance Sheet"),L(n=>{let i=n.type,l=[n],u=document.createElement("a");u.href=window.URL.createObjectURL(new Blob(l,{type:i}));let d=`balance-sheet.${i.split("/")[1]}`;u.setAttribute("download",d),document.body.appendChild(u),u.click(),document.body.removeChild(u)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-balance-sheet"]],features:[Oe([Tt])],decls:7,vars:5,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible","scrollable"],[1,"d-flex","gap-2"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],[3,"showHeader"],[1,"d-flex","flex-column","gap-3"],[1,"fs-5","fw-semibold","mt-3"],[3,"value"],[2,"width","20%"],[1,"text-end",2,"width","5%"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2",1,"fw-semibold","text-end"],[1,"text-end","fw-semibold"],["colspan","3",1,""],[1,"fs-5","fw-semibold"],["target","_blank",1,"link","link-primary","d-flex","align-items-center",3,"routerLink"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","display","chip","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options","showClear"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"flex","items-center","gap-2"]],template:function(n,i){if(n&1){let l=D();o(0,"app-main-panel",8),P("isDialogFilterVisibleChange",function(d){return h(l),B(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),b(d)})("isInitDialogFilterVisibleChange",function(d){return h(l),B(i.isInitDialogFilterVisible,d)||(i.isInitDialogFilterVisible=d),b(d)}),I("filterConfirmed",function(){return h(l),b(i.onFilterOKEvent())}),x(1,dn,2,1,"ng-template",null,0,_)(3,Dn,5,4,"ng-template",null,1,_)(5,Fn,11,7,"ng-template",null,2,_),r()}n&2&&(s("pageTitle",i.store.data().pageTitle)("isFilterable",!0),A("isDialogFilterVisible",i.dialogFilterVisible)("isInitDialogFilterVisible",i.isInitDialogFilterVisible),s("scrollable",!0))},dependencies:[ne,H,z,q,me,pe,oe,ee,Z,Q,$,K,Y,X,J,ce,se,ae,re,ye,te,Xe,W,U],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Qt=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(n,i){n&1&&(o(0,"p"),a(1,"report-comparative-balance works!"),r(),a(2,`
2
+ ,
3
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(n,i){n&1&&(o(0,"p"),a(1,"report-cash-flow works!"),r(),a(2,`
4
+ ,
5
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ei=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(n,i){n&1&&(o(0,"p"),a(1,"report-trial-balance works!"),r(),a(2,`
6
+ ,
7
+ `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Vn=()=>({width:"30vw"}),Ln=()=>({"1199px":"75vw","575px":"90vw"}),Mn=t=>["/pages/journal/journal-entry/",t],kn=t=>({"ng-dirty ng-invalid":t}),Nn=()=>({scrollHeight:"250px"});function Bn(t,m){if(t&1){let e=D();o(0,"p-button",27),I("onClick",function(){h(e);let i=c(2);return b(i.onToggleExportDialog())}),r()}}function An(t,m){if(t&1&&(o(0,"div",24)(1,"a",25),a(2,"Return to Accounts"),r(),x(3,Bn,1,0,"p-button",26),r()),t&2){let e=c();p(3),s("ngIf",e.roleService.global().export)}}function Gn(t,m){if(t&1&&(o(0,"div",24)(1,"span",31)(2,"h2",32),a(3),r()(),o(4,"span",31)(5,"h2",32),a(6),r()()()),t&2){let e=c().$implicit;p(3),f(e.name),p(3),w(" (",e.chartOfAccountCode,") ")}}function Pn(t,m){t&1&&(o(0,"tr")(1,"th",33),a(2,"Outlet"),r(),o(3,"th",33),a(4,"No."),r(),o(5,"th",33),a(6,"Date"),r(),o(7,"th"),a(8,"Contact / Note"),r(),o(9,"th",34),a(10,"Debit"),r(),o(11,"th",35),a(12,"Credit"),r(),o(13,"th",35),a(14,"Balance"),r()())}function On(t,m){if(t&1&&(o(0,"div",38)(1,"a",39),a(2),r(),T(3,"div",41),o(4,"span",42),a(5),r()()),t&2){let e=c().$implicit,n=c(4);p(),s("href",n.authService.getTenantExternalURL()+n.buildReferenceUrl(e),he),p(),f(e.referenceText),p(),s("innerHTML",e.journalNote,j),p(2),w("",e.note," ")}}function jn(t,m){if(t&1&&(o(0,"div",38),T(1,"span",41)(2,"div",41),o(3,"span",42),a(4),r()()),t&2){let e=c().$implicit;p(),s("innerHTML",e.referenceText,j),p(),s("innerHTML",e.journalNote,j),p(2),w("",e.note," ")}}function zn(t,m){if(t&1&&(o(0,"tr")(1,"td",36),a(2),r(),o(3,"td",36)(4,"a",37),a(5),r()(),o(6,"td",36),a(7),C(8,"date"),r(),o(9,"td",36)(10,"div",38)(11,"a",39),a(12),r(),x(13,On,6,4,"div",38)(14,jn,5,3,"div",38),r()(),o(15,"td",40),a(16),C(17,"number"),r(),o(18,"td",40),a(19),C(20,"number"),r(),o(21,"td",40),a(22),C(23,"number"),r()()),t&2){let e=m.$implicit,n=c(4);p(2),f(e.outletName),p(2),s("routerLink",V(19,Mn,e.id)),p(),f(e.number),p(2),f(Me(8,10,e.date,"dd MMM yyyy")),p(4),s("href",n.authService.getTenantExternalURL()+"/menu/Contacts/Contact/Customers/Info?ID="+e.contactID,he),p(),f(e.contactName),p(),M(n.buildReferenceUrl(e)?13:14),p(3),w(" ",y(17,13,e.debitAmount)," "),p(3),w(" ",y(20,15,e.creditAmount)," "),p(3),f(y(23,17,e.balance))}}function qn(t,m){if(t&1&&(o(0,"tr"),T(1,"td",43),o(2,"td",44),a(3,"Total"),r(),o(4,"td",44),a(5),C(6,"number"),r(),o(7,"td",44),a(8),C(9,"number"),r(),T(10,"td"),r()),t&2){let e=c().$index,n=c(3);p(5),w(" ",y(6,2,n.items().data[e].debitTotal)," "),p(3),w(" ",y(9,4,n.items().data[e].creditTotal)," ")}}function Hn(t,m){t&1&&(o(0,"tr")(1,"td",45)(2,"span"),a(3,"No records found."),r()()())}function Un(t,m){if(t&1&&(o(0,"p-table",30),x(1,Gn,7,2,"ng-template",null,5,_)(3,Pn,15,0,"ng-template",null,6,_)(5,zn,24,21,"ng-template",null,7,_)(7,qn,11,6,"ng-template",null,4,_)(9,Hn,4,0,"ng-template",null,8,_),r()),t&2){let e=m.$implicit;s("value",e.data)}}function Wn(t,m){if(t&1&&(o(0,"div",29),Fe(1,Un,11,1,"p-table",30,Re),r()),t&2){let e=c(2);p(),Ve(e.items().data)}}function Kn(t,m){if(t&1&&x(0,Wn,3,0,"div",28),t&2){let e=c();s("ngIf",e.items()&&e.items().data)}}function Yn(t,m){if(t&1&&(o(0,"div",24)(1,"div",31)(2,"span",61),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",31)(8,"span",62),a(9),r()()()),t&2){let e=m.$implicit;p(3),w("(",e.code,")"),p(6),f(e.name)}}function $n(t,m){if(t&1&&(o(0,"div",24)(1,"div",31)(2,"span",61),a(3),r()(),o(4,"div")(5,"span"),a(6,"-"),r()(),o(7,"div",31)(8,"span",62),a(9),r()()()),t&2){let e=m.$implicit;p(3),w("(",e.code,")"),p(6),f(e.name)}}function Xn(t,m){t&1&&(o(0,"div",63),a(1," Account is required. "),r())}function Jn(t,m){if(t&1&&(o(0,"div",64)(1,"div"),a(2),r()()),t&2){let e=m.$implicit;p(2),f(e.value)}}function Qn(t,m){if(t&1&&(o(0,"div",55)(1,"div",21),T(2,"p-radiobutton",65),o(3,"label",66),a(4),r()()()),t&2){let e=m.$implicit;p(2),s("value",e.key)("inputId",e.key),p(),Mt("for",e.key),p(),f(e.value)}}function Zn(t,m){if(t&1){let e=D();o(0,"div",38)(1,"label",47),a(2,"Customer"),r(),o(3,"p-autocomplete",67),I("completeMethod",function(i){h(e);let l=c(2);return b(l.searchCustomer(i))}),r()()}if(t&2){let e=c(2);p(3),s("suggestions",e.customerSuggestions())}}function eo(t,m){if(t&1){let e=D();o(0,"div",38)(1,"label",47),a(2,"Supplier"),r(),o(3,"p-autocomplete",68),I("completeMethod",function(i){h(e);let l=c(2);return b(l.searchSupplier(i))}),r()()}if(t&2){let e=c(2);p(3),s("suggestions",e.supplierSuggestions())}}function to(t,m){if(t&1){let e=D();o(0,"div",38)(1,"label",47),a(2,"Customer"),r(),o(3,"p-autocomplete",67),I("completeMethod",function(i){h(e);let l=c(2);return b(l.searchCustomer(i))}),r()()}if(t&2){let e=c(2);p(3),s("suggestions",e.customerSuggestions())}}function io(t,m){if(t&1){let e=D();o(0,"form",46)(1,"div",38)(2,"label",47),a(3,"Accounts"),r(),o(4,"p-multiselect",48),I("onChange",function(i){h(e);let l=c();return b(l.onAccountChange(i))}),x(5,Yn,10,2,"ng-template",null,9,_)(7,$n,10,2,"ng-template",null,10,_),r(),x(9,Xn,2,0,"div",49),r(),o(10,"div",38)(11,"label",47),a(12,"From"),r(),o(13,"div",50),T(14,"p-datepicker",51)(15,"p-datepicker",52),r()(),o(16,"div",38)(17,"label",47),a(18,"Outlets"),r(),o(19,"p-multiselect",53),x(20,Jn,3,1,"ng-template",null,10,_),r()(),o(22,"div",38)(23,"label",47),a(24,"Category"),r(),o(25,"p-treeselect",54),I("onFocus",function(){h(e);let i=c();return b(i.onCategoryFocus())}),r()(),o(26,"div",38)(27,"label",18),a(28,"Contact Type"),r(),o(29,"div",16),Fe(30,Qn,5,4,"div",55,Re),r()(),o(32,"div",38)(33,"label",18),a(34,"Sort order"),r(),o(35,"div",16)(36,"div",55)(37,"div",21),T(38,"p-radiobutton",56),o(39,"label",57),a(40,"Asc"),r()()(),o(41,"div",58)(42,"div",21),T(43,"p-radiobutton",59),o(44,"label",60),a(45,"Desc"),r()()()()(),x(46,Zn,4,1,"div",38)(47,eo,4,1,"div",38)(48,to,4,1,"div",38),r()}if(t&2){let e,n,i,l,u,d,k=c();s("formGroup",k.form),p(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",(e=k.loaderMetadata())==null||e.options==null?null:e.options.accounts)("selectionLimit",5)("ngClass",V(22,kn,((n=k.form.get("listAccountID"))==null?null:n.invalid)&&(((n=k.form.get("listAccountID"))==null?null:n.touched)||((n=k.form.get("listAccountID"))==null?null:n.dirty)))),p(5),s("ngIf",((i=k.form.get("listAccountID"))==null?null:i.invalid)&&(((i=k.form.get("listAccountID"))==null?null:i.touched)||((i=k.form.get("listAccountID"))==null?null:i.dirty))),p(5),s("iconDisplay","input")("showIcon",!0),p(),s("iconDisplay","input")("showIcon",!0),p(4),s("virtualScroll",!0)("virtualScrollItemSize",50)("options",(l=k.loaderMetadata())==null||l.options==null?null:l.options.outlets),p(6),s("metaKeySelection",!1)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",F(24,Nn))("options",k.categoriesOptions()),p(5),Ve((u=k.loaderMetadata())==null||u.options==null?null:u.options.contactTypeOptions),p(8),s("value",!0),p(5),s("value",!1),p(3),M((d=k.form.controls.contactType.value)===1?46:d===2?47:48)}}function no(t,m){if(t&1){let e=D();o(0,"p-button",69),I("onClick",function(){h(e);let i=c();return b(i.onToggleExportDialog())}),r()}t&2&&s("rounded",!0)("text",!0)}function oo(t,m){if(t&1){let e=D();o(0,"p-button",70),I("click",function(){h(e);let i=c();return b(i.onToggleExportDialog())}),r(),o(1,"p-button",71),I("click",function(){h(e);let i=c();return b(i.onExport())}),r()}}var ti=(()=>{class t{buildReferenceUrl(e){return st(e)}getGLCount(){this.reportService.getGLCount(this.filter()).pipe(L(({count:e})=>{this.totalRecords.set(e)})).subscribe()}onToggleExportDialog(){this.isDialogExportVisible.update(e=>!e)}get pageTitle(){return this.items()&&this.items().pageTitle?this.items().pageTitle:"General Ledger"}constructor(){this.reportService=S(G),this.route=S(He),this.roleService=S(ie),this.authService=S(Se),this.fb=S(Ce),this.coaService=S(at),this.toastr=S(Ue),this.dayjsService=S(le),this.infinity=1/0,this.metadata=E(null),this.items=E(null),this.totalRecords=E(-1),this.dialogFilterVisible=E(!0),this.initDialogVisible=E(!1),this.isDialogExportVisible=E(!1),this.customerSuggestions=E([]),this.supplierSuggestions=E([]),this.categoriesOptions=E([]),this.localFilter=E({}),this.count=R(()=>this.totalRecords()<0?1/0:this.totalRecords()),this.pagination=R(()=>{let e=this.filter(),n=this.totalRecords()!=null&&this.totalRecords()>=0?this.totalRecords():1/0,i=Math.min(e.pageNumber*e.pageSize,isFinite(n)?n:e.pageNumber*e.pageSize);return{first:1,end:e.pageSize>0?i:0,total:n,page:e.pageNumber,pageSize:e.pageSize,hasPrev:e.pageNumber>1,hasNext:isFinite(n)?e.pageNumber*e.pageSize<n:!0}}),this.loaderMetadata=ve(this.reportService.fetchGeneralLedgerLoader("multiple"),{initialValue:null}),this.baseFilter=R(()=>{let e=this.loaderMetadata();return e?e.filter:null}),this.exportFileTypes=E([{key:0,value:"CSV"},{key:1,value:"Excel"}]),this.queryFilter=ve(this.route.queryParamMap.pipe(Ne(e=>({accountID:e.get("id"),to:e.get("to")}))),{initialValue:null}),this.filter=R(()=>{let e=this.baseFilter(),n=this.queryFilter(),i=this.localFilter();return e?g(g(g({},e),n??{}),i):null}),this.creditSubTotal=R(()=>0),this.debitSubTotal=R(()=>0),this.initializeForm(),ue(()=>{let e=this.filter();e&&(e.listAccountID.length>0||e.listCategoryID.length>0)&&(this.form.patchValue(this.transformFilterToFormValue(e),{emitEvent:!1}),this.reportService.fetchGeneralLedgerReport(e,"multiple").pipe().subscribe(n=>{this.items.set(n)}))})}initializeForm(){this.form=this.fb.group({accountID:this.fb.control(null),from:this.fb.control(null),to:this.fb.control(null),contactType:this.fb.control(null),contactID:this.fb.control(""),listOutletID:this.fb.control([]),pageNumber:this.fb.control(1),pageSize:this.fb.control(50),sortAscending:this.fb.control(!0),listCategoryID:this.fb.control([]),listAccountID:this.fb.control([]),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportPageSize:this.fb.control(0)})}findNodeByKey(e,n){for(let i of e){if(i.key===n)return i;if(i.children){let l=this.findNodeByKey(i.children,n);if(l)return l}}return null}transformFilterToFormValue(e){return Object.entries(e).reduce((n,[i,l])=>{switch(i){case"from":break;case"to":n[i]=l&&(typeof l=="string"||typeof l=="number"||l instanceof Date)?this.dayjsService.from(l)?.toDate():this.dayjsService.now.toDate();break;case"listCategoryID":Array.isArray(l)?n[i]=l.map(u=>this.findNodeByKey(this.categoriesOptions(),u)).filter(u=>!!u):n[i]=[];break;case"listOutletID":case"listAccountID":n[i]=Array.isArray(l)?l:[];break;case"pageNumber":case"pageSize":case"exportPageNumber":case"exportPageSize":n[i]=l!=null?Number(l):0;break;case"sortAscending":case"export":n[i]=!!l;break;case"contactType":n[i]=l!=null?Number(l):null;break;default:n[i]=l}return n},{})}clearContactValueOnContactTypeChange(){this.form.get("contactType")?.valueChanges.subscribe(()=>this.form.get("contactID")?.setValue(""))}onFormValueChange(){let e=this.form.controls.listAccountID.value,n=this.form.controls.listCategoryID.value;e.length<=0&&n.length<=0?(this.form.controls.listAccountID.enable({emitEvent:!1}),this.form.controls.listCategoryID.enable({emitEvent:!1})):e.length>0?(this.form.controls.listAccountID.enable({emitEvent:!1}),this.form.controls.listCategoryID.disable({emitEvent:!1})):n.length>0&&(this.form.controls.listAccountID.disable({emitEvent:!1}),this.form.controls.listCategoryID.enable({emitEvent:!1}))}isEmpty(e){return e==null||typeof e=="string"&&e.trim().length===0}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(L(e=>this.categoriesOptions.set(e))).subscribe()}searchCustomer(e){this.reportService.getCustomerSuggestions(e.query).pipe(L(n=>this.customerSuggestions.set(n))).subscribe()}searchSupplier(e){this.reportService.getSupplierSuggestions(e.query).pipe(L(n=>this.supplierSuggestions.set(n))).subscribe()}onAccountChange(e){Array.isArray(e.value)&&e.value.length>5&&this.toastr.warning("Please select at most 5 accounts for the general ledger report.","Warning")}onFilterOKEvent(){if(this.form.invalid){this.form.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let e=this.buildFilterBody();this.dialogFilterVisible.set(!1),this.localFilter.set(e)}buildFilterBody(){let l=this.form.value,{from:e,to:n}=l,i=fe(l,["from","to"]);return v(g({},this.filter()),{pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,listCategoryID:i.listCategoryID?.map(u=>u.key)??[],contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType})}onExport(){let e=this.buildExportBody();this.performExport(e)}performExport(e){this.reportService.exportGeneralLedger(e,{responseType:"blob",observe:"response"}).pipe(L(n=>this.handleExportResponse(n))).subscribe()}handleExportResponse(e){let n=e.headers,i=n.get("Content-Disposition")??n.get("content-disposition"),l="download.csv";if(i){let d=i.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);d?.[1]&&(l=decodeURIComponent(d[1].replace(/"/g,"")))}let u=e.body;mt(u,l,u.type)}buildExportBody(){let l=this.form.value,{from:e,to:n}=l,i=fe(l,["from","to"]);return v(g({},this.filter()),{exportPageNumber:+i.exportPageNumber,pageNumber:i.pageNumber,pageSize:i.pageSize,sortAscending:i.sortAscending,accountID:i.accountID,listCategoryID:i.listCategoryID?.map(u=>u.key)??[],contactID:i.contactID?.length===0?null:i.contactID,listOutletID:i.listOutletID??[],listAccountID:i.listAccountID??[],from:this.dayjsService.from(e)?this.dayjsService.format(e):null,to:this.dayjsService.from(n)?this.dayjsService.format(n):null,contactType:i.contactType,export:!0})}onNextPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(g({},e),{pageNumber:n+1})})}onPrevPage(){this.localFilter.update(e=>{let n=e.pageNumber??this.baseFilter()?.pageNumber??1;return v(g({},e),{pageNumber:Math.max(1,n-1)})})}goToPage(e){this.localFilter.update(n=>v(g({},n),{pageNumber:e}))}goToLastPage(){let e=this.filter();if(!e)return;let n=this.totalRecords();if(n===-1||!isFinite(n)){this.toastr.info("Please load total records before going to the last page","Info");return}let i=Math.ceil(n/e.pageSize);if(e.pageNumber>=i){this.toastr.warning("You are already on the last page","Warning");return}this.localFilter.update(l=>v(g({},l),{pageNumber:i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-report-multiple-ledger"]],decls:28,vars:19,consts:[["actionButton",""],["content",""],["filters",""],["closeIconTemplate",""],["footer",""],["caption",""],["header",""],["body",""],["emptymessage",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible","scrollable"],["header","Export Journal Entry",3,"visibleChange","modal","visible","breakpoints"],[1,"d-flex","flex-column","gap-3"],[1,"row",3,"formGroup"],[1,"col-8"],[1,"row"],[1,"col"],["for",""],["type","text","formControlName","exportPageNumber","fluid","","pInputText","","pSize","small"],["role","alert",1,"alert","alert-primary","m-0","p-2"],[1,"d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-circle-info"],[1,"fs-2","text-dark","fw-semibold"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined","fs-3"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick",4,"ngIf"],["severity","secondary","variant","outlined","icon","fa-solid fa-upload","label","Export",3,"onClick"],["class","px-3 h-100 bg-white border-top",4,"ngIf"],[1,"px-3","h-100","bg-white","border-top"],[3,"value"],[1,""],[1,"fs-5","fw-semibold"],[2,"width","10%"],[1,"text-end",2,"width","10%"],[1,"text-end",2,"width","20%"],[1,"text-break"],["target","_blank",1,"link","link-primary",3,"routerLink"],[1,"d-flex","flex-column"],["target","_blank",1,"link","link-primary",3,"href"],[1,"text-end","text-break"],[3,"innerHTML"],[2,"width","300px","white-space","normal","word-break","break-word"],["colspan","3"],[1,"text-end","fw-semibold"],["colspan","8"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],["for","outlet"],["showClear","","filter","","filterBy","code,name","display","chip","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"onChange","virtualScroll","virtualScrollItemSize","options","selectionLimit","ngClass"],["class","text-danger",4,"ngIf"],[1,"d-flex","flex-column","gap-2"],["showClear","","formControlName","from","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],["showClear","","display","chip","formControlName","listOutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","display","chip","selectionMode","multiple","filter","","filterBy","label","formControlName","listCategoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","key","placeholder","Select Category",3,"onFocus","metaKeySelection","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],[1,"col-4"],["name","sortAscending","formControlName","sortAscending","inputId","asc",3,"value"],["for","asc",1,"m-0"],[1,"col-3"],["name","sortAscending","formControlName","sortAscending","inputId","desc",3,"value"],["for","desc",1,"m-0"],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"text-danger"],[1,"flex","items-center","gap-2"],["name","contactType","formControlName","contactType",3,"value","inputId"],[1,"m-0",3,"for"],["formControlName","contactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"],["severity","secondary","variant","outlined","icon","fa-solid fa-xmark",3,"onClick","rounded","text"],["label","Cancel","severity","secondary","variant","outlined",3,"click"],["label","OK (F2)",3,"click"]],template:function(n,i){if(n&1){let l=D();o(0,"app-main-panel",11),P("isDialogFilterVisibleChange",function(d){return h(l),B(i.dialogFilterVisible,d)||(i.dialogFilterVisible=d),b(d)})("isInitDialogFilterVisibleChange",function(d){return h(l),B(i.initDialogVisible,d)||(i.initDialogVisible=d),b(d)}),I("filterConfirmed",function(){return h(l),b(i.onFilterOKEvent())}),x(1,An,4,1,"ng-template",null,0,_)(3,Kn,1,1,"ng-template",null,1,_)(5,io,49,25,"ng-template",null,2,_),r(),o(7,"p-dialog",12),P("visibleChange",function(d){return h(l),B(i.isDialogExportVisible,d)||(i.isDialogExportVisible=d),b(d)}),o(8,"div",13)(9,"div",14)(10,"div",15)(11,"div",16)(12,"div",17)(13,"label",18),a(14,"Page"),r()(),o(15,"div",17),T(16,"input",19),r()()()(),o(17,"div",20)(18,"div",21),T(19,"i",22),o(20,"span",23),a(21),C(22,"number"),C(23,"number"),r()()()(),x(24,no,1,2,"ng-template",null,3,_)(26,oo,2,0,"ng-template",null,4,_),r()}if(n&2){let l;s("pageTitle",i.pageTitle),A("isDialogFilterVisible",i.dialogFilterVisible),s("isFilterable",!0),A("isInitDialogFilterVisible",i.initDialogVisible),s("scrollable",!0),p(7),Ae(F(17,Vn)),s("modal",!0),A("visible",i.isDialogExportVisible),s("breakpoints",F(18,Ln)),p(2),s("formGroup",i.form),p(12),Le("Exporting data from ",y(22,13,(l=i.filter())==null?null:l.exportPageNumber)," - ",y(23,15,(l=i.filter())==null?null:l.exportPageSize),"")}},dependencies:[ne,H,ze,z,q,qe,oe,me,pe,nt,it,ee,Z,Te,ae,re,De,we,Q,$,We,K,Y,X,J,ce,se,ye,$e,pt,Ut,lt,te,W,U,rt,ot,Ye,Ke],styles:["[_nghost-%COMP%]{display:block} .p-datatable .p-datatable-header{padding-left:0!important}"],changeDetection:0})}}return t})();var $a=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:Kt},{path:"multiple-general-ledger",component:ti},{path:"profit-loss",component:Yt},{path:"balance-sheet",component:Jt},{path:"comparative-balance",component:Qt},{path:"trial-balance",component:ei},{path:"cash-flow",component:Zt}]}];export{$a as REPORTS_ROUTES};
@@ -0,0 +1 @@
1
+ import"./chunk-YQFG5XE2.js";var t=[{path:"",redirectTo:"tax-account",pathMatch:"full"},{path:"tax-account",loadComponent:()=>import("./chunk-66D4GMNG.js").then(o=>o.TaxAccountComponent)},{path:"chart-of-account",loadComponent:()=>import("./chunk-35MXFTDN.js").then(o=>o.ChartOfAccountComponent)},{path:"manual-journal",loadComponent:()=>import("./chunk-PPJQN2WS.js").then(o=>o.ManualJournalComponent)},{path:"payment-account",loadComponent:()=>import("./chunk-S5O44AS7.js").then(o=>o.PaymentAccountComponent)},{path:"writeoff-outlet",loadComponent:()=>import("./chunk-FPI32FQH.js").then(o=>o.WriteOffOutletComponent)},{path:"expense-account",loadComponent:()=>import("./chunk-OTMBGB3T.js").then(o=>o.ExpenseAccountComponent)},{path:"coa-configuration",loadComponent:()=>import("./chunk-4ETCCLMI.js").then(o=>o.CoaConfigurationComponent)},{path:"coa-category",loadComponent:()=>import("./chunk-3FDVZDYS.js").then(o=>o.CoaCategoryComponent)},{path:"outlet-account",loadComponent:()=>import("./chunk-EG4A3G2F.js").then(o=>o.OutletAccountComponent)}];export{t as MIGRATE_ROUTES};
@@ -1,4 +1,4 @@
1
- import{a as Ge,b as _t,s as Xt}from"./chunk-SB5MSLCX.js";import{Aa as Y,Bb as E,Cc as x,Fa as me,Fb as Yt,Ha as w,Hb as Zt,Kb as Jt,La as qt,Nb as ht,Vc as Qt,_c as mt,aa as We,ad as P,ba as F,bd as ie,ca as S,cd as yt,da as X,ec as te,fa as W,g as $,gc as ft,hc as gt,ia as L,ja as Kt,jb as zt,l as Wt,mb as ye,nb as f,pa as ge,s as Gt,ua as j,xb as pt,y as jt,yb as ee,zb as y}from"./chunk-6K5LNQ4J.js";import{a as m,b as R}from"./chunk-YQFG5XE2.js";var ui=(()=>{class e{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||e)(f(ye),f(me))};static \u0275dir=y({type:e})}return e})(),St=(()=>{class e extends ui{static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,features:[E]})}return e})(),Ae=new W("");var Dn={provide:Ae,useExisting:F(()=>di),multi:!0};function wn(){let e=_t()?_t().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var On=new W(""),di=(()=>{class e extends ui{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!wn())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||e)(f(ye),f(me),f(On,8))};static \u0275dir=y({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&te("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},standalone:!1,features:[x([Dn]),E]})}return e})();function Et(e){return e==null||At(e)===0}function At(e){return e==null?null:Array.isArray(e)||typeof e=="string"?e.length:e instanceof Set?e.size:null}var J=new W(""),ae=new W(""),Tn=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ei=class{static min(i){return Vn(i)}static max(i){return In(i)}static required(i){return pi(i)}static requiredTrue(i){return Mn(i)}static email(i){return Nn(i)}static minLength(i){return Rn(i)}static maxLength(i){return Fn(i)}static pattern(i){return Ln(i)}static nullValidator(i){return Ke()}static compose(i){return _i(i)}static composeAsync(i){return vi(i)}};function Vn(e){return i=>{if(i.value==null||e==null)return null;let t=parseFloat(i.value);return!isNaN(t)&&t<e?{min:{min:e,actual:i.value}}:null}}function In(e){return i=>{if(i.value==null||e==null)return null;let t=parseFloat(i.value);return!isNaN(t)&&t>e?{max:{max:e,actual:i.value}}:null}}function pi(e){return Et(e.value)?{required:!0}:null}function Mn(e){return e.value===!0?null:{required:!0}}function Nn(e){return Et(e.value)||Tn.test(e.value)?null:{email:!0}}function Rn(e){return i=>{let t=i.value?.length??At(i.value);return t===null||t===0?null:t<e?{minlength:{requiredLength:e,actualLength:t}}:null}}function Fn(e){return i=>{let t=i.value?.length??At(i.value);return t!==null&&t>e?{maxlength:{requiredLength:e,actualLength:t}}:null}}function Ln(e){if(!e)return Ke;let i,t;return typeof e=="string"?(t="",e.charAt(0)!=="^"&&(t+="^"),t+=e,e.charAt(e.length-1)!=="$"&&(t+="$"),i=new RegExp(t)):(t=e.toString(),i=e),n=>{if(Et(n.value))return null;let r=n.value;return i.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function Ke(e){return null}function hi(e){return e!=null}function fi(e){return Yt(e)?Wt(e):e}function gi(e){let i={};return e.forEach(t=>{i=t!=null?m(m({},i),t):i}),Object.keys(i).length===0?null:i}function mi(e,i){return i.map(t=>t(e))}function xn(e){return!e.validate}function yi(e){return e.map(i=>xn(i)?i:t=>i.validate(t))}function _i(e){if(!e)return null;let i=e.filter(hi);return i.length==0?null:function(t){return gi(mi(t,i))}}function Dt(e){return e!=null?_i(yi(e)):null}function vi(e){if(!e)return null;let i=e.filter(hi);return i.length==0?null:function(t){let n=mi(t,i).map(fi);return jt(n).pipe(Gt(gi))}}function wt(e){return e!=null?vi(yi(e)):null}function ti(e,i){return e===null?[i]:Array.isArray(e)?[...e,i]:[e,i]}function Ci(e){return e._rawValidators}function bi(e){return e._rawAsyncValidators}function vt(e){return e?Array.isArray(e)?e:[e]:[]}function qe(e,i){return Array.isArray(e)?e.includes(i):e===i}function ii(e,i){let t=vt(i);return vt(e).forEach(r=>{qe(t,r)||t.push(r)}),t}function ni(e,i){return vt(i).filter(t=>!qe(e,t))}var ze=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=Dt(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=wt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,t){return this.control?this.control.hasError(i,t):!1}getError(i,t){return this.control?this.control.getError(i,t):null}},A=class extends ze{name;get formDirective(){return null}get path(){return null}},Z=class extends ze{_parent=null;name=null;valueAccessor=null},Ye=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Pn={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},os=R(m({},Pn),{"[class.ng-submitted]":"isSubmitted"}),as=(()=>{class e extends Ye{constructor(t){super(t)}static \u0275fac=function(n){return new(n||e)(f(Z,2))};static \u0275dir=y({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ht("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[E]})}return e})(),ls=(()=>{class e extends Ye{constructor(t){super(t)}static \u0275fac=function(n){return new(n||e)(f(A,10))};static \u0275dir=y({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&ht("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[E]})}return e})();var _e="VALID",je="INVALID",ne="PENDING",ve="DISABLED",K=class{},Ze=class extends K{value;source;constructor(i,t){super(),this.value=i,this.source=t}},be=class extends K{pristine;source;constructor(i,t){super(),this.pristine=i,this.source=t}},Se=class extends K{touched;source;constructor(i,t){super(),this.touched=i,this.source=t}},re=class extends K{status;source;constructor(i,t){super(),this.status=i,this.source=t}},Je=class extends K{source;constructor(i){super(),this.source=i}},Qe=class extends K{source;constructor(i){super(),this.source=i}};function Ot(e){return(nt(e)?e.validators:e)||null}function kn(e){return Array.isArray(e)?Dt(e):e||null}function Tt(e,i){return(nt(i)?i.asyncValidators:e)||null}function Hn(e){return Array.isArray(e)?wt(e):e||null}function nt(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Si(e,i,t){let n=e.controls;if(!(i?Object.keys(n):n).length)throw new We(1e3,"");if(!n[t])throw new We(1001,"")}function Ei(e,i,t){e._forEachChild((n,r)=>{if(t[r]===void 0)throw new We(1002,"")})}var se=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,t){this._assignValidators(i),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return P(this.statusReactive)}set status(i){P(()=>this.statusReactive.set(i))}_status=ie(()=>this.statusReactive());statusReactive=w(void 0);get valid(){return this.status===_e}get invalid(){return this.status===je}get pending(){return this.status==ne}get disabled(){return this.status===ve}get enabled(){return this.status!==ve}errors;get pristine(){return P(this.pristineReactive)}set pristine(i){P(()=>this.pristineReactive.set(i))}_pristine=ie(()=>this.pristineReactive());pristineReactive=w(!0);get dirty(){return!this.pristine}get touched(){return P(this.touchedReactive)}set touched(i){P(()=>this.touchedReactive.set(i))}_touched=ie(()=>this.touchedReactive());touchedReactive=w(!1);get untouched(){return!this.touched}_events=new $;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(ii(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(ii(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(ni(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(ni(i,this._rawAsyncValidators))}hasValidator(i){return qe(this._rawValidators,i)}hasAsyncValidator(i){return qe(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let t=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(R(m({},i),{sourceControl:n})),t&&i.emitEvent!==!1&&this._events.next(new Se(!0,n))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(i))}markAsUntouched(i={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),t&&i.emitEvent!==!1&&this._events.next(new Se(!1,n))}markAsDirty(i={}){let t=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(R(m({},i),{sourceControl:n})),t&&i.emitEvent!==!1&&this._events.next(new be(!1,n))}markAsPristine(i={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),t&&i.emitEvent!==!1&&this._events.next(new be(!0,n))}markAsPending(i={}){this.status=ne;let t=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new re(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(R(m({},i),{sourceControl:t}))}disable(i={}){let t=this._parentMarkedDirty(i.onlySelf);this.status=ve,this.errors=null,this._forEachChild(r=>{r.disable(R(m({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Ze(this.value,n)),this._events.next(new re(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(R(m({},i),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(i={}){let t=this._parentMarkedDirty(i.onlySelf);this.status=_e,this._forEachChild(n=>{n.enable(R(m({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(R(m({},i),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,t){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===_e||this.status===ne)&&this._runAsyncValidator(n,i.emitEvent)}let t=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Ze(this.value,t)),this._events.next(new re(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(R(m({},i),{sourceControl:t}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ve:_e}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,t){if(this.asyncValidator){this.status=ne,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=fi(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,t={}){this.errors=i,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(i){let t=i;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(i,t){let n=t?this.get(t):this;return n&&n.errors?n.errors[i]:null}hasError(i,t){return!!this.getError(i,t)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,t,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new re(this.status,t)),this._parent&&this._parent._updateControlsErrors(i,t,n)}_initObservables(){this.valueChanges=new Y,this.statusChanges=new Y}_calculateStatus(){return this._allControlsDisabled()?ve:this.errors?je:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ne)?ne:this._anyControlsHaveStatus(je)?je:_e}_anyControlsHaveStatus(i){return this._anyControls(t=>t.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,t),r&&this._events.next(new be(this.pristine,t))}_updateTouched(i={},t){this.touched=this._anyControlsTouched(),this._events.next(new Se(this.touched,t)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,t)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){nt(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let t=this._parent&&this._parent.dirty;return!i&&!!t&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=kn(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=Hn(this._rawAsyncValidators)}},oe=class extends se{constructor(i,t,n){super(Ot(t),Tt(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,t){return this.controls[i]?this.controls[i]:(this.controls[i]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(i,t,n={}){this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,t={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(i,t,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],t&&this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,t={}){Ei(this,!0,i),Object.keys(i).forEach(n=>{Si(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){i!=null&&(Object.keys(i).forEach(n=>{let r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i={},t={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(i,t,n)=>(i[n]=t.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&i(n,t)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(i,t){let n=i;return this._forEachChild((r,s)=>{n=t(n,r,s)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var Ct=class extends oe{};var De=new W("",{providedIn:"root",factory:()=>rt}),rt="always";function st(e,i){return[...i.path,e]}function Xe(e,i,t=rt){Vt(e,i),i.valueAccessor.writeValue(e.value),(e.disabled||t==="always")&&i.valueAccessor.setDisabledState?.(e.disabled),$n(e,i),Wn(e,i),Bn(e,i),Un(e,i)}function ri(e,i,t=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),tt(e,i),e&&(i._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function et(e,i){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(i)})}function Un(e,i){if(i.valueAccessor.setDisabledState){let t=n=>{i.valueAccessor.setDisabledState(n)};e.registerOnDisabledChange(t),i._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}function Vt(e,i){let t=Ci(e);i.validator!==null?e.setValidators(ti(t,i.validator)):typeof t=="function"&&e.setValidators([t]);let n=bi(e);i.asyncValidator!==null?e.setAsyncValidators(ti(n,i.asyncValidator)):typeof n=="function"&&e.setAsyncValidators([n]);let r=()=>e.updateValueAndValidity();et(i._rawValidators,r),et(i._rawAsyncValidators,r)}function tt(e,i){let t=!1;if(e!==null){if(i.validator!==null){let r=Ci(e);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==i.validator);s.length!==r.length&&(t=!0,e.setValidators(s))}}if(i.asyncValidator!==null){let r=bi(e);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==i.asyncValidator);s.length!==r.length&&(t=!0,e.setAsyncValidators(s))}}}let n=()=>{};return et(i._rawValidators,n),et(i._rawAsyncValidators,n),t}function $n(e,i){i.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&Ai(e,i)})}function Bn(e,i){i.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&Ai(e,i),e.updateOn!=="submit"&&e.markAsTouched()})}function Ai(e,i){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Wn(e,i){let t=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};e.registerOnChange(t),i._registerOnDestroy(()=>{e._unregisterOnChange(t)})}function Di(e,i){e==null,Vt(e,i)}function Gn(e,i){return tt(e,i)}function wi(e,i){if(!e.hasOwnProperty("model"))return!1;let t=e.model;return t.isFirstChange()?!0:!Object.is(i,t.currentValue)}function jn(e){return Object.getPrototypeOf(e.constructor)===St}function Oi(e,i){e._syncPendingControls(),i.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Ti(e,i){if(!i)return null;Array.isArray(i);let t,n,r;return i.forEach(s=>{s.constructor===di?t=s:jn(s)?n=s:r=s}),r||n||t||null}function Kn(e,i){let t=e.indexOf(i);t>-1&&e.splice(t,1)}var qn={provide:A,useExisting:F(()=>zn)},Ce=Promise.resolve(),zn=(()=>{class e extends A{callSetDisabledState;get submitted(){return P(this.submittedReactive)}_submitted=ie(()=>this.submittedReactive());submittedReactive=w(!1);_directives=new Set;form;ngSubmit=new Y;options;constructor(t,n,r){super(),this.callSetDisabledState=r,this.form=new oe({},Dt(t),wt(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Ce.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),Xe(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Ce.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Ce.then(()=>{let n=this._findContainer(t.path),r=new oe({});Di(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Ce.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){Ce.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),Oi(this.form,this._directives),this.ngSubmit.emit(t),this.form._events.next(new Je(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!1),this.form._events.next(new Qe(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static \u0275fac=function(n){return new(n||e)(f(J,10),f(ae,10),f(De,8))};static \u0275dir=y({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&te("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[x([qn]),E]})}return e})();function si(e,i){let t=e.indexOf(i);t>-1&&e.splice(t,1)}function oi(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Ee=class extends se{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,t,n){super(Ot(t),Tt(n,t)),this._applyFormState(i),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),nt(t)&&(t.nonNullable||t.initialValueIsDefault)&&(oi(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,t={}){this.value=this._pendingValue=i,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(i,t={}){this.setValue(i,t)}reset(i=this.defaultValue,t={}){this._applyFormState(i),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){si(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){si(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){oi(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}};var Yn=e=>e instanceof Ee,Zn=(()=>{class e extends A{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return st(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,standalone:!1,features:[E]})}return e})();var Jn={provide:Z,useExisting:F(()=>Qn)},ai=Promise.resolve(),Qn=(()=>{class e extends Z{_changeDetectorRef;callSetDisabledState;control=new Ee;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Y;constructor(t,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ti(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),wi(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Xe(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){ai.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&mt(n);ai.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?st(t,this._parent):[t]}static \u0275fac=function(n){return new(n||e)(f(A,9),f(J,10),f(ae,10),f(Ae,10),f(Qt,8),f(De,8))};static \u0275dir=y({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[x([Jn]),E,ge]})}return e})();var us=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275dir=y({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return e})();var Vi=new W("");var Xn={provide:A,useExisting:F(()=>Ii)},Ii=(()=>{class e extends A{callSetDisabledState;get submitted(){return P(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}_submitted=ie(()=>this._submittedReactive());_submittedReactive=w(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new Y;constructor(t,n,r){super(),this.callSetDisabledState=r,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(tt(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return Xe(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){ri(t.control||null,t,!1),Kn(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this._submittedReactive.set(!0),Oi(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new Je(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new Qe(this.form))}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,r=this.form.get(t.path);n!==r&&(ri(n||null,t),Yn(r)&&(Xe(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);Di(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&Gn(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Vt(this.form,this),this._oldForm&&tt(this._oldForm,this)}static \u0275fac=function(n){return new(n||e)(f(J,10),f(ae,10),f(De,8))};static \u0275dir=y({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&te("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[x([Xn]),E,ge]})}return e})(),er={provide:A,useExisting:F(()=>Mi)},Mi=(()=>{class e extends Zn{name=null;constructor(t,n,r){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){Ri(this._parent)}static \u0275fac=function(n){return new(n||e)(f(A,13),f(J,10),f(ae,10))};static \u0275dir=y({type:e,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[x([er]),E]})}return e})(),tr={provide:A,useExisting:F(()=>Ni)},Ni=(()=>{class e extends A{_parent;name=null;constructor(t,n,r){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){Ri(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return st(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||e)(f(A,13),f(J,10),f(ae,10))};static \u0275dir=y({type:e,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[x([tr]),E]})}return e})();function Ri(e){return!(e instanceof Mi)&&!(e instanceof Ii)&&!(e instanceof Ni)}var ir={provide:Z,useExisting:F(()=>nr)},nr=(()=>{class e extends Z{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(t){}model;update=new Y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=o,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ti(this,s)}ngOnChanges(t){this._added||this._setUpControl(),wi(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return st(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||e)(f(A,13),f(J,10),f(ae,10),f(Ae,10),f(Vi,8))};static \u0275dir=y({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[x([ir]),E,ge]})}return e})();var rr={provide:Ae,useExisting:F(()=>Li),multi:!0};function Fi(e,i){return e==null?`${i}`:(i&&typeof i=="object"&&(i="Object"),`${e}: ${i}`.slice(0,50))}function sr(e){return e.split(":")[0]}var Li=(()=>{class e extends St{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n=this._getOptionId(t),r=Fi(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=sr(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&te("change",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[x([rr]),E]})}return e})(),ds=(()=>{class e{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Fi(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||e)(f(me),f(ye),f(Li,9))};static \u0275dir=y({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),or={provide:Ae,useExisting:F(()=>xi),multi:!0};function li(e,i){return e==null?`${i}`:(typeof i=="string"&&(i=`'${i}'`),i&&typeof i=="object"&&(i="Object"),`${e}: ${i}`.slice(0,50))}function ar(e){return e.split(":")[0]}var xi=(()=>{class e extends St{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(s=>this._getOptionId(s));n=(s,o)=>{s._setSelected(r.indexOf(o.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let o=s;for(let a=0;a<o.length;a++){let c=o[a],l=this._getOptionValue(c.value);r.push(l)}}else{let o=n.options;for(let a=0;a<o.length;a++){let c=o[a];if(c.selected){let l=this._getOptionValue(c.value);r.push(l)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=ar(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&te("change",function(o){return r.onChange(o.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[x([or]),E]})}return e})(),ps=(()=>{class e{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(li(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(li(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||e)(f(me),f(ye),f(xi,9))};static \u0275dir=y({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();var lr=(()=>{class e{_validator=Ke;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):Ke,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||e)};static \u0275dir=y({type:e,features:[ge]})}return e})();var cr={provide:J,useExisting:F(()=>ur),multi:!0};var ur=(()=>{class e extends lr{required;inputName="required";normalizeInput=mt;createValidator=t=>pi;enabled(t){return t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){n&2&&Jt("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[x([cr]),E]})}return e})();var Pi=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=ee({type:e});static \u0275inj=X({})}return e})(),bt=class extends se{constructor(i,t,n){super(Ot(t),Tt(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,t={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(i,t,n={}){this.controls.splice(i,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,t={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(i,t,n={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,t={}){Ei(this,!1,i),i.forEach((n,r)=>{Si(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){i!=null&&(i.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i=[],t={}){this._forEachChild((n,r)=>{n.reset(i[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((t,n)=>n._syncPendingControls()?!0:t,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((t,n)=>{i(t,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(t=>t.enabled&&i(t))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function ci(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var dr=(()=>{class e{useNonNullable=!1;get nonNullable(){let t=new e;return t.useNonNullable=!0,t}group(t,n=null){let r=this._reduceControls(t),s={};return ci(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new oe(r,s)}record(t,n=null){let r=this._reduceControls(t);return new Ct(r,n)}control(t,n,r){let s={};return this.useNonNullable?(ci(n)?s=n:(s.validators=n,s.asyncValidators=r),new Ee(t,R(m({},s),{nonNullable:!0}))):new Ee(t,n,r)}array(t,n,r){let s=t.map(o=>this._createControl(o));return new bt(s,n,r)}_reduceControls(t){let n={};return Object.keys(t).forEach(r=>{n[r]=this._createControl(t[r])}),n}_createControl(t){if(t instanceof Ee)return t;if(t instanceof se)return t;if(Array.isArray(t)){let n=t[0],r=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(n,r,s)}else return this.control(t)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hs=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=S({token:e,factory:()=>L(dr).nonNullable,providedIn:"root"})}return e})();var fs=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:De,useValue:t.callSetDisabledState??rt}]}}static \u0275fac=function(n){return new(n||e)};static \u0275mod=ee({type:e});static \u0275inj=X({imports:[Pi]})}return e})(),gs=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:Vi,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:De,useValue:t.callSetDisabledState??rt}]}}static \u0275fac=function(n){return new(n||e)};static \u0275mod=ee({type:e});static \u0275inj=X({imports:[Pi]})}return e})();function pr(e,i){return e?e.classList?e.classList.contains(i):new RegExp("(^| )"+i+"( |$)","gi").test(e.className):!1}function hr(e,i){if(e&&i){let t=n=>{pr(e,n)||(e.classList?e.classList.add(n):e.className+=" "+n)};[i].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(t))}}function fr(){return window.innerWidth-document.documentElement.offsetWidth}function le(e){for(let i of document?.styleSheets)try{for(let t of i?.cssRules)for(let n of t?.style)if(e.test(n))return{name:n,value:t.style.getPropertyValue(n).trim()}}catch{}return null}function vs(e="p-overflow-hidden"){let i=le(/-scrollbar-width$/);i?.name&&document.body.style.setProperty(i.name,fr()+"px"),hr(document.body,e)}function gr(e,i){if(e&&i){let t=n=>{e.classList?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")};[i].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(t))}}function Cs(e="p-overflow-hidden"){let i=le(/-scrollbar-width$/);i?.name&&document.body.style.removeProperty(i.name),gr(document.body,e)}function ki(e){let i={width:0,height:0};return e&&(e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),i}function Hi(){let e=window,i=document,t=i.documentElement,n=i.getElementsByTagName("body")[0],r=e.innerWidth||t.clientWidth||n.clientWidth,s=e.innerHeight||t.clientHeight||n.clientHeight;return{width:r,height:s}}function mr(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}function yr(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function bs(e,i,t=!0){var n,r,s,o;if(e){let a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:ki(e),c=a.height,l=a.width,u=i.offsetHeight,p=i.offsetWidth,d=i.getBoundingClientRect(),h=yr(),_=mr(),C=Hi(),D,V,I="top";d.top+u+c>C.height?(D=d.top+h-c,I="bottom",D<0&&(D=h)):D=u+d.top+h,d.left+l>C.width?V=Math.max(0,d.left+_+p-l):V=d.left+_,e.style.top=D+"px",e.style.left=V+"px",e.style.transformOrigin=I,t&&(e.style.marginTop=I==="bottom"?`calc(${(r=(n=le(/-anchor-gutter$/))==null?void 0:n.value)!=null?r:"2px"} * -1)`:(o=(s=le(/-anchor-gutter$/))==null?void 0:s.value)!=null?o:"")}}function Ui(e,i){e&&(typeof i=="string"?e.style.cssText=i:Object.entries(i||{}).forEach(([t,n])=>e.style[t]=n))}function Ss(e,i){if(e instanceof HTMLElement){let t=e.offsetWidth;if(i){let n=getComputedStyle(e);t+=parseFloat(n.marginLeft)+parseFloat(n.marginRight)}return t}return 0}function Es(e,i,t=!0){var n,r,s,o;if(e){let a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:ki(e),c=i.offsetHeight,l=i.getBoundingClientRect(),u=Hi(),p,d,h="top";l.top+c+a.height>u.height?(p=-1*a.height,h="bottom",l.top+p<0&&(p=-1*l.top)):p=c,a.width>u.width?d=l.left*-1:l.left+a.width>u.width?d=(l.left+a.width-u.width)*-1:d=0,e.style.top=p+"px",e.style.left=d+"px",e.style.transformOrigin=h,t&&(e.style.marginTop=h==="bottom"?`calc(${(r=(n=le(/-anchor-gutter$/))==null?void 0:n.value)!=null?r:"2px"} * -1)`:(o=(s=le(/-anchor-gutter$/))==null?void 0:s.value)!=null?o:"")}}function ce(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}function Nt(e){let i=e;return e&&typeof e=="object"&&(e.hasOwnProperty("current")?i=e.current:e.hasOwnProperty("el")&&(e.el.hasOwnProperty("nativeElement")?i=e.el.nativeElement:i=e.el)),ce(i)?i:void 0}function As(e,i){let t=Nt(e);if(t)t.appendChild(i);else throw new Error("Cannot append "+i+" to "+e)}var It=void 0;function Ds(e){if(e){let i=getComputedStyle(e);return e.offsetHeight-e.clientHeight-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)}else{if(It!=null)return It;let i=document.createElement("div");Ui(i,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(i);let t=i.offsetHeight-i.clientHeight;return document.body.removeChild(i),It=t,t}}var Mt=void 0;function ws(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}else{if(Mt!=null)return Mt;let i=document.createElement("div");Ui(i,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(i);let t=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),Mt=t,t}}function ot(e,i={}){if(ce(e)){let t=(n,r)=>{var s,o;let a=(s=e?.$attrs)!=null&&s[n]?[(o=e?.$attrs)==null?void 0:o[n]]:[];return[r].flat().reduce((c,l)=>{if(l!=null){let u=typeof l;if(u==="string"||u==="number")c.push(l);else if(u==="object"){let p=Array.isArray(l)?t(n,l):Object.entries(l).map(([d,h])=>n==="style"&&(h||h===0)?`${d.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${h}`:h?d:void 0);c=p.length?c.concat(p.filter(d=>!!d)):c}}return c},a)};Object.entries(i).forEach(([n,r])=>{if(r!=null){let s=n.match(/^on(.+)/);s?e.addEventListener(s[1].toLowerCase(),r):n==="p-bind"||n==="pBind"?ot(e,r):(r=n==="class"?[...new Set(t("class",r))].join(" ").trim():n==="style"?t("style",r).join(";").trim():r,(e.$attrs=e.$attrs||{})&&(e.$attrs[n]=r),e.setAttribute(n,r))}})}}function Os(e,i={},...t){if(e){let n=document.createElement(e);return ot(n,i),n.append(...t),n}}function Ts(e,i){if(e){e.style.opacity="0";let t=+new Date,n="0",r=function(){n=`${+e.style.opacity+(new Date().getTime()-t)/i}`,e.style.opacity=n,t=+new Date,+n<1&&(window.requestAnimationFrame&&requestAnimationFrame(r)||setTimeout(r,16))};r()}}function _r(e,i){return ce(e)?Array.from(e.querySelectorAll(i)):[]}function Vs(e,i){return ce(e)?e.matches(i)?e:e.querySelector(i):null}function Is(e,i){e&&document.activeElement!==e&&e.focus(i)}function Ms(e,i){if(ce(e)){let t=e.getAttribute(i);return isNaN(t)?t==="true"||t==="false"?t==="true":t:+t}}function $i(e,i=""){let t=_r(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i},
1
+ import{a as Ge,b as _t,s as Xt}from"./chunk-VZ5CMS5O.js";import{Aa as Y,Bb as E,Cc as x,Fa as me,Fb as Yt,Ha as w,Hb as Zt,Kb as Jt,La as qt,Nb as ht,Vc as Qt,_c as mt,aa as We,ad as P,ba as F,bd as ie,ca as S,cd as yt,da as X,ec as te,fa as W,g as $,gc as ft,hc as gt,ia as L,ja as Kt,jb as zt,l as Wt,mb as ye,nb as f,pa as ge,s as Gt,ua as j,xb as pt,y as jt,yb as ee,zb as y}from"./chunk-NMCKMUY4.js";import{a as m,b as R}from"./chunk-YQFG5XE2.js";var ui=(()=>{class e{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||e)(f(ye),f(me))};static \u0275dir=y({type:e})}return e})(),St=(()=>{class e extends ui{static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,features:[E]})}return e})(),Ae=new W("");var Dn={provide:Ae,useExisting:F(()=>di),multi:!0};function wn(){let e=_t()?_t().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var On=new W(""),di=(()=>{class e extends ui{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!wn())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||e)(f(ye),f(me),f(On,8))};static \u0275dir=y({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&te("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},standalone:!1,features:[x([Dn]),E]})}return e})();function Et(e){return e==null||At(e)===0}function At(e){return e==null?null:Array.isArray(e)||typeof e=="string"?e.length:e instanceof Set?e.size:null}var J=new W(""),ae=new W(""),Tn=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ei=class{static min(i){return Vn(i)}static max(i){return In(i)}static required(i){return pi(i)}static requiredTrue(i){return Mn(i)}static email(i){return Nn(i)}static minLength(i){return Rn(i)}static maxLength(i){return Fn(i)}static pattern(i){return Ln(i)}static nullValidator(i){return Ke()}static compose(i){return _i(i)}static composeAsync(i){return vi(i)}};function Vn(e){return i=>{if(i.value==null||e==null)return null;let t=parseFloat(i.value);return!isNaN(t)&&t<e?{min:{min:e,actual:i.value}}:null}}function In(e){return i=>{if(i.value==null||e==null)return null;let t=parseFloat(i.value);return!isNaN(t)&&t>e?{max:{max:e,actual:i.value}}:null}}function pi(e){return Et(e.value)?{required:!0}:null}function Mn(e){return e.value===!0?null:{required:!0}}function Nn(e){return Et(e.value)||Tn.test(e.value)?null:{email:!0}}function Rn(e){return i=>{let t=i.value?.length??At(i.value);return t===null||t===0?null:t<e?{minlength:{requiredLength:e,actualLength:t}}:null}}function Fn(e){return i=>{let t=i.value?.length??At(i.value);return t!==null&&t>e?{maxlength:{requiredLength:e,actualLength:t}}:null}}function Ln(e){if(!e)return Ke;let i,t;return typeof e=="string"?(t="",e.charAt(0)!=="^"&&(t+="^"),t+=e,e.charAt(e.length-1)!=="$"&&(t+="$"),i=new RegExp(t)):(t=e.toString(),i=e),n=>{if(Et(n.value))return null;let r=n.value;return i.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function Ke(e){return null}function hi(e){return e!=null}function fi(e){return Yt(e)?Wt(e):e}function gi(e){let i={};return e.forEach(t=>{i=t!=null?m(m({},i),t):i}),Object.keys(i).length===0?null:i}function mi(e,i){return i.map(t=>t(e))}function xn(e){return!e.validate}function yi(e){return e.map(i=>xn(i)?i:t=>i.validate(t))}function _i(e){if(!e)return null;let i=e.filter(hi);return i.length==0?null:function(t){return gi(mi(t,i))}}function Dt(e){return e!=null?_i(yi(e)):null}function vi(e){if(!e)return null;let i=e.filter(hi);return i.length==0?null:function(t){let n=mi(t,i).map(fi);return jt(n).pipe(Gt(gi))}}function wt(e){return e!=null?vi(yi(e)):null}function ti(e,i){return e===null?[i]:Array.isArray(e)?[...e,i]:[e,i]}function Ci(e){return e._rawValidators}function bi(e){return e._rawAsyncValidators}function vt(e){return e?Array.isArray(e)?e:[e]:[]}function qe(e,i){return Array.isArray(e)?e.includes(i):e===i}function ii(e,i){let t=vt(i);return vt(e).forEach(r=>{qe(t,r)||t.push(r)}),t}function ni(e,i){return vt(i).filter(t=>!qe(e,t))}var ze=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=Dt(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=wt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,t){return this.control?this.control.hasError(i,t):!1}getError(i,t){return this.control?this.control.getError(i,t):null}},A=class extends ze{name;get formDirective(){return null}get path(){return null}},Z=class extends ze{_parent=null;name=null;valueAccessor=null},Ye=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Pn={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},os=R(m({},Pn),{"[class.ng-submitted]":"isSubmitted"}),as=(()=>{class e extends Ye{constructor(t){super(t)}static \u0275fac=function(n){return new(n||e)(f(Z,2))};static \u0275dir=y({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ht("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[E]})}return e})(),ls=(()=>{class e extends Ye{constructor(t){super(t)}static \u0275fac=function(n){return new(n||e)(f(A,10))};static \u0275dir=y({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){n&2&&ht("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[E]})}return e})();var _e="VALID",je="INVALID",ne="PENDING",ve="DISABLED",K=class{},Ze=class extends K{value;source;constructor(i,t){super(),this.value=i,this.source=t}},be=class extends K{pristine;source;constructor(i,t){super(),this.pristine=i,this.source=t}},Se=class extends K{touched;source;constructor(i,t){super(),this.touched=i,this.source=t}},re=class extends K{status;source;constructor(i,t){super(),this.status=i,this.source=t}},Je=class extends K{source;constructor(i){super(),this.source=i}},Qe=class extends K{source;constructor(i){super(),this.source=i}};function Ot(e){return(nt(e)?e.validators:e)||null}function kn(e){return Array.isArray(e)?Dt(e):e||null}function Tt(e,i){return(nt(i)?i.asyncValidators:e)||null}function Hn(e){return Array.isArray(e)?wt(e):e||null}function nt(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Si(e,i,t){let n=e.controls;if(!(i?Object.keys(n):n).length)throw new We(1e3,"");if(!n[t])throw new We(1001,"")}function Ei(e,i,t){e._forEachChild((n,r)=>{if(t[r]===void 0)throw new We(1002,"")})}var se=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,t){this._assignValidators(i),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return P(this.statusReactive)}set status(i){P(()=>this.statusReactive.set(i))}_status=ie(()=>this.statusReactive());statusReactive=w(void 0);get valid(){return this.status===_e}get invalid(){return this.status===je}get pending(){return this.status==ne}get disabled(){return this.status===ve}get enabled(){return this.status!==ve}errors;get pristine(){return P(this.pristineReactive)}set pristine(i){P(()=>this.pristineReactive.set(i))}_pristine=ie(()=>this.pristineReactive());pristineReactive=w(!0);get dirty(){return!this.pristine}get touched(){return P(this.touchedReactive)}set touched(i){P(()=>this.touchedReactive.set(i))}_touched=ie(()=>this.touchedReactive());touchedReactive=w(!1);get untouched(){return!this.touched}_events=new $;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(ii(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(ii(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(ni(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(ni(i,this._rawAsyncValidators))}hasValidator(i){return qe(this._rawValidators,i)}hasAsyncValidator(i){return qe(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let t=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(R(m({},i),{sourceControl:n})),t&&i.emitEvent!==!1&&this._events.next(new Se(!0,n))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(i))}markAsUntouched(i={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),t&&i.emitEvent!==!1&&this._events.next(new Se(!1,n))}markAsDirty(i={}){let t=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(R(m({},i),{sourceControl:n})),t&&i.emitEvent!==!1&&this._events.next(new be(!1,n))}markAsPristine(i={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),t&&i.emitEvent!==!1&&this._events.next(new be(!0,n))}markAsPending(i={}){this.status=ne;let t=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new re(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(R(m({},i),{sourceControl:t}))}disable(i={}){let t=this._parentMarkedDirty(i.onlySelf);this.status=ve,this.errors=null,this._forEachChild(r=>{r.disable(R(m({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Ze(this.value,n)),this._events.next(new re(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(R(m({},i),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(i={}){let t=this._parentMarkedDirty(i.onlySelf);this.status=_e,this._forEachChild(n=>{n.enable(R(m({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(R(m({},i),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,t){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===_e||this.status===ne)&&this._runAsyncValidator(n,i.emitEvent)}let t=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new Ze(this.value,t)),this._events.next(new re(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(R(m({},i),{sourceControl:t}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ve:_e}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,t){if(this.asyncValidator){this.status=ne,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=fi(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,t={}){this.errors=i,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(i){let t=i;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(i,t){let n=t?this.get(t):this;return n&&n.errors?n.errors[i]:null}hasError(i,t){return!!this.getError(i,t)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,t,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new re(this.status,t)),this._parent&&this._parent._updateControlsErrors(i,t,n)}_initObservables(){this.valueChanges=new Y,this.statusChanges=new Y}_calculateStatus(){return this._allControlsDisabled()?ve:this.errors?je:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ne)?ne:this._anyControlsHaveStatus(je)?je:_e}_anyControlsHaveStatus(i){return this._anyControls(t=>t.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,t),r&&this._events.next(new be(this.pristine,t))}_updateTouched(i={},t){this.touched=this._anyControlsTouched(),this._events.next(new Se(this.touched,t)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,t)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){nt(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let t=this._parent&&this._parent.dirty;return!i&&!!t&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=kn(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=Hn(this._rawAsyncValidators)}},oe=class extends se{constructor(i,t,n){super(Ot(t),Tt(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,t){return this.controls[i]?this.controls[i]:(this.controls[i]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(i,t,n={}){this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,t={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(i,t,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],t&&this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,t={}){Ei(this,!0,i),Object.keys(i).forEach(n=>{Si(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){i!=null&&(Object.keys(i).forEach(n=>{let r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i={},t={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(i,t,n)=>(i[n]=t.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&i(n,t)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(i,t){let n=i;return this._forEachChild((r,s)=>{n=t(n,r,s)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var Ct=class extends oe{};var De=new W("",{providedIn:"root",factory:()=>rt}),rt="always";function st(e,i){return[...i.path,e]}function Xe(e,i,t=rt){Vt(e,i),i.valueAccessor.writeValue(e.value),(e.disabled||t==="always")&&i.valueAccessor.setDisabledState?.(e.disabled),$n(e,i),Wn(e,i),Bn(e,i),Un(e,i)}function ri(e,i,t=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),tt(e,i),e&&(i._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function et(e,i){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(i)})}function Un(e,i){if(i.valueAccessor.setDisabledState){let t=n=>{i.valueAccessor.setDisabledState(n)};e.registerOnDisabledChange(t),i._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}function Vt(e,i){let t=Ci(e);i.validator!==null?e.setValidators(ti(t,i.validator)):typeof t=="function"&&e.setValidators([t]);let n=bi(e);i.asyncValidator!==null?e.setAsyncValidators(ti(n,i.asyncValidator)):typeof n=="function"&&e.setAsyncValidators([n]);let r=()=>e.updateValueAndValidity();et(i._rawValidators,r),et(i._rawAsyncValidators,r)}function tt(e,i){let t=!1;if(e!==null){if(i.validator!==null){let r=Ci(e);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==i.validator);s.length!==r.length&&(t=!0,e.setValidators(s))}}if(i.asyncValidator!==null){let r=bi(e);if(Array.isArray(r)&&r.length>0){let s=r.filter(o=>o!==i.asyncValidator);s.length!==r.length&&(t=!0,e.setAsyncValidators(s))}}}let n=()=>{};return et(i._rawValidators,n),et(i._rawAsyncValidators,n),t}function $n(e,i){i.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&Ai(e,i)})}function Bn(e,i){i.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&Ai(e,i),e.updateOn!=="submit"&&e.markAsTouched()})}function Ai(e,i){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Wn(e,i){let t=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};e.registerOnChange(t),i._registerOnDestroy(()=>{e._unregisterOnChange(t)})}function Di(e,i){e==null,Vt(e,i)}function Gn(e,i){return tt(e,i)}function wi(e,i){if(!e.hasOwnProperty("model"))return!1;let t=e.model;return t.isFirstChange()?!0:!Object.is(i,t.currentValue)}function jn(e){return Object.getPrototypeOf(e.constructor)===St}function Oi(e,i){e._syncPendingControls(),i.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Ti(e,i){if(!i)return null;Array.isArray(i);let t,n,r;return i.forEach(s=>{s.constructor===di?t=s:jn(s)?n=s:r=s}),r||n||t||null}function Kn(e,i){let t=e.indexOf(i);t>-1&&e.splice(t,1)}var qn={provide:A,useExisting:F(()=>zn)},Ce=Promise.resolve(),zn=(()=>{class e extends A{callSetDisabledState;get submitted(){return P(this.submittedReactive)}_submitted=ie(()=>this.submittedReactive());submittedReactive=w(!1);_directives=new Set;form;ngSubmit=new Y;options;constructor(t,n,r){super(),this.callSetDisabledState=r,this.form=new oe({},Dt(t),wt(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Ce.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),Xe(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Ce.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Ce.then(()=>{let n=this._findContainer(t.path),r=new oe({});Di(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Ce.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){Ce.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),Oi(this.form,this._directives),this.ngSubmit.emit(t),this.form._events.next(new Je(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!1),this.form._events.next(new Qe(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static \u0275fac=function(n){return new(n||e)(f(J,10),f(ae,10),f(De,8))};static \u0275dir=y({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&te("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[x([qn]),E]})}return e})();function si(e,i){let t=e.indexOf(i);t>-1&&e.splice(t,1)}function oi(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Ee=class extends se{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,t,n){super(Ot(t),Tt(n,t)),this._applyFormState(i),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),nt(t)&&(t.nonNullable||t.initialValueIsDefault)&&(oi(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,t={}){this.value=this._pendingValue=i,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(i,t={}){this.setValue(i,t)}reset(i=this.defaultValue,t={}){this._applyFormState(i),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){si(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){si(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){oi(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}};var Yn=e=>e instanceof Ee,Zn=(()=>{class e extends A{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return st(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,standalone:!1,features:[E]})}return e})();var Jn={provide:Z,useExisting:F(()=>Qn)},ai=Promise.resolve(),Qn=(()=>{class e extends Z{_changeDetectorRef;callSetDisabledState;control=new Ee;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Y;constructor(t,n,r,s,o,a){super(),this._changeDetectorRef=o,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ti(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),wi(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Xe(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){ai.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&mt(n);ai.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?st(t,this._parent):[t]}static \u0275fac=function(n){return new(n||e)(f(A,9),f(J,10),f(ae,10),f(Ae,10),f(Qt,8),f(De,8))};static \u0275dir=y({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[x([Jn]),E,ge]})}return e})();var us=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275dir=y({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return e})();var Vi=new W("");var Xn={provide:A,useExisting:F(()=>Ii)},Ii=(()=>{class e extends A{callSetDisabledState;get submitted(){return P(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}_submitted=ie(()=>this._submittedReactive());_submittedReactive=w(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new Y;constructor(t,n,r){super(),this.callSetDisabledState=r,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(tt(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return Xe(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){ri(t.control||null,t,!1),Kn(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this._submittedReactive.set(!0),Oi(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new Je(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new Qe(this.form))}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,r=this.form.get(t.path);n!==r&&(ri(n||null,t),Yn(r)&&(Xe(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);Di(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&Gn(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Vt(this.form,this),this._oldForm&&tt(this._oldForm,this)}static \u0275fac=function(n){return new(n||e)(f(J,10),f(ae,10),f(De,8))};static \u0275dir=y({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&te("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[x([Xn]),E,ge]})}return e})(),er={provide:A,useExisting:F(()=>Mi)},Mi=(()=>{class e extends Zn{name=null;constructor(t,n,r){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(r)}_checkParentType(){Ri(this._parent)}static \u0275fac=function(n){return new(n||e)(f(A,13),f(J,10),f(ae,10))};static \u0275dir=y({type:e,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[x([er]),E]})}return e})(),tr={provide:A,useExisting:F(()=>Ni)},Ni=(()=>{class e extends A{_parent;name=null;constructor(t,n,r){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(r)}ngOnInit(){Ri(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return st(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||e)(f(A,13),f(J,10),f(ae,10))};static \u0275dir=y({type:e,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[x([tr]),E]})}return e})();function Ri(e){return!(e instanceof Mi)&&!(e instanceof Ii)&&!(e instanceof Ni)}var ir={provide:Z,useExisting:F(()=>nr)},nr=(()=>{class e extends Z{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(t){}model;update=new Y;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=o,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Ti(this,s)}ngOnChanges(t){this._added||this._setUpControl(),wi(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return st(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||e)(f(A,13),f(J,10),f(ae,10),f(Ae,10),f(Vi,8))};static \u0275dir=y({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[x([ir]),E,ge]})}return e})();var rr={provide:Ae,useExisting:F(()=>Li),multi:!0};function Fi(e,i){return e==null?`${i}`:(i&&typeof i=="object"&&(i="Object"),`${e}: ${i}`.slice(0,50))}function sr(e){return e.split(":")[0]}var Li=(()=>{class e extends St{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n=this._getOptionId(t),r=Fi(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=sr(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&te("change",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[x([rr]),E]})}return e})(),ds=(()=>{class e{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Fi(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||e)(f(me),f(ye),f(Li,9))};static \u0275dir=y({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})(),or={provide:Ae,useExisting:F(()=>xi),multi:!0};function li(e,i){return e==null?`${i}`:(typeof i=="string"&&(i=`'${i}'`),i&&typeof i=="object"&&(i="Object"),`${e}: ${i}`.slice(0,50))}function ar(e){return e.split(":")[0]}var xi=(()=>{class e extends St{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(s=>this._getOptionId(s));n=(s,o)=>{s._setSelected(r.indexOf(o.toString())>-1)}}else n=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],s=n.selectedOptions;if(s!==void 0){let o=s;for(let a=0;a<o.length;a++){let c=o[a],l=this._getOptionValue(c.value);r.push(l)}}else{let o=n.options;for(let a=0;a<o.length;a++){let c=o[a];if(c.selected){let l=this._getOptionValue(c.value);r.push(l)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=ar(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&te("change",function(o){return r.onChange(o.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[x([or]),E]})}return e})(),ps=(()=>{class e{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(li(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(li(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||e)(f(me),f(ye),f(xi,9))};static \u0275dir=y({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return e})();var lr=(()=>{class e{_validator=Ke;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):Ke,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||e)};static \u0275dir=y({type:e,features:[ge]})}return e})();var cr={provide:J,useExisting:F(()=>ur),multi:!0};var ur=(()=>{class e extends lr{required;inputName="required";normalizeInput=mt;createValidator=t=>pi;enabled(t){return t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=j(e)))(r||e)}})();static \u0275dir=y({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){n&2&&Jt("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[x([cr]),E]})}return e})();var Pi=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275mod=ee({type:e});static \u0275inj=X({})}return e})(),bt=class extends se{constructor(i,t,n){super(Ot(t),Tt(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,t={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(i,t,n={}){this.controls.splice(i,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,t={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(i,t,n={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,t={}){Ei(this,!1,i),i.forEach((n,r)=>{Si(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){i!=null&&(i.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i=[],t={}){this._forEachChild((n,r)=>{n.reset(i[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((t,n)=>n._syncPendingControls()?!0:t,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((t,n)=>{i(t,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(t=>t.enabled&&i(t))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function ci(e){return!!e&&(e.asyncValidators!==void 0||e.validators!==void 0||e.updateOn!==void 0)}var dr=(()=>{class e{useNonNullable=!1;get nonNullable(){let t=new e;return t.useNonNullable=!0,t}group(t,n=null){let r=this._reduceControls(t),s={};return ci(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new oe(r,s)}record(t,n=null){let r=this._reduceControls(t);return new Ct(r,n)}control(t,n,r){let s={};return this.useNonNullable?(ci(n)?s=n:(s.validators=n,s.asyncValidators=r),new Ee(t,R(m({},s),{nonNullable:!0}))):new Ee(t,n,r)}array(t,n,r){let s=t.map(o=>this._createControl(o));return new bt(s,n,r)}_reduceControls(t){let n={};return Object.keys(t).forEach(r=>{n[r]=this._createControl(t[r])}),n}_createControl(t){if(t instanceof Ee)return t;if(t instanceof se)return t;if(Array.isArray(t)){let n=t[0],r=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(n,r,s)}else return this.control(t)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hs=(()=>{class e{static \u0275fac=function(n){return new(n||e)};static \u0275prov=S({token:e,factory:()=>L(dr).nonNullable,providedIn:"root"})}return e})();var fs=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:De,useValue:t.callSetDisabledState??rt}]}}static \u0275fac=function(n){return new(n||e)};static \u0275mod=ee({type:e});static \u0275inj=X({imports:[Pi]})}return e})(),gs=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:Vi,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:De,useValue:t.callSetDisabledState??rt}]}}static \u0275fac=function(n){return new(n||e)};static \u0275mod=ee({type:e});static \u0275inj=X({imports:[Pi]})}return e})();function pr(e,i){return e?e.classList?e.classList.contains(i):new RegExp("(^| )"+i+"( |$)","gi").test(e.className):!1}function hr(e,i){if(e&&i){let t=n=>{pr(e,n)||(e.classList?e.classList.add(n):e.className+=" "+n)};[i].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(t))}}function fr(){return window.innerWidth-document.documentElement.offsetWidth}function le(e){for(let i of document?.styleSheets)try{for(let t of i?.cssRules)for(let n of t?.style)if(e.test(n))return{name:n,value:t.style.getPropertyValue(n).trim()}}catch{}return null}function vs(e="p-overflow-hidden"){let i=le(/-scrollbar-width$/);i?.name&&document.body.style.setProperty(i.name,fr()+"px"),hr(document.body,e)}function gr(e,i){if(e&&i){let t=n=>{e.classList?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," ")};[i].flat().filter(Boolean).forEach(n=>n.split(" ").forEach(t))}}function Cs(e="p-overflow-hidden"){let i=le(/-scrollbar-width$/);i?.name&&document.body.style.removeProperty(i.name),gr(document.body,e)}function ki(e){let i={width:0,height:0};return e&&(e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),i}function Hi(){let e=window,i=document,t=i.documentElement,n=i.getElementsByTagName("body")[0],r=e.innerWidth||t.clientWidth||n.clientWidth,s=e.innerHeight||t.clientHeight||n.clientHeight;return{width:r,height:s}}function mr(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}function yr(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function bs(e,i,t=!0){var n,r,s,o;if(e){let a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:ki(e),c=a.height,l=a.width,u=i.offsetHeight,p=i.offsetWidth,d=i.getBoundingClientRect(),h=yr(),_=mr(),C=Hi(),D,V,I="top";d.top+u+c>C.height?(D=d.top+h-c,I="bottom",D<0&&(D=h)):D=u+d.top+h,d.left+l>C.width?V=Math.max(0,d.left+_+p-l):V=d.left+_,e.style.top=D+"px",e.style.left=V+"px",e.style.transformOrigin=I,t&&(e.style.marginTop=I==="bottom"?`calc(${(r=(n=le(/-anchor-gutter$/))==null?void 0:n.value)!=null?r:"2px"} * -1)`:(o=(s=le(/-anchor-gutter$/))==null?void 0:s.value)!=null?o:"")}}function Ui(e,i){e&&(typeof i=="string"?e.style.cssText=i:Object.entries(i||{}).forEach(([t,n])=>e.style[t]=n))}function Ss(e,i){if(e instanceof HTMLElement){let t=e.offsetWidth;if(i){let n=getComputedStyle(e);t+=parseFloat(n.marginLeft)+parseFloat(n.marginRight)}return t}return 0}function Es(e,i,t=!0){var n,r,s,o;if(e){let a=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:ki(e),c=i.offsetHeight,l=i.getBoundingClientRect(),u=Hi(),p,d,h="top";l.top+c+a.height>u.height?(p=-1*a.height,h="bottom",l.top+p<0&&(p=-1*l.top)):p=c,a.width>u.width?d=l.left*-1:l.left+a.width>u.width?d=(l.left+a.width-u.width)*-1:d=0,e.style.top=p+"px",e.style.left=d+"px",e.style.transformOrigin=h,t&&(e.style.marginTop=h==="bottom"?`calc(${(r=(n=le(/-anchor-gutter$/))==null?void 0:n.value)!=null?r:"2px"} * -1)`:(o=(s=le(/-anchor-gutter$/))==null?void 0:s.value)!=null?o:"")}}function ce(e){return typeof HTMLElement=="object"?e instanceof HTMLElement:e&&typeof e=="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"}function Nt(e){let i=e;return e&&typeof e=="object"&&(e.hasOwnProperty("current")?i=e.current:e.hasOwnProperty("el")&&(e.el.hasOwnProperty("nativeElement")?i=e.el.nativeElement:i=e.el)),ce(i)?i:void 0}function As(e,i){let t=Nt(e);if(t)t.appendChild(i);else throw new Error("Cannot append "+i+" to "+e)}var It=void 0;function Ds(e){if(e){let i=getComputedStyle(e);return e.offsetHeight-e.clientHeight-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)}else{if(It!=null)return It;let i=document.createElement("div");Ui(i,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(i);let t=i.offsetHeight-i.clientHeight;return document.body.removeChild(i),It=t,t}}var Mt=void 0;function ws(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}else{if(Mt!=null)return Mt;let i=document.createElement("div");Ui(i,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(i);let t=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),Mt=t,t}}function ot(e,i={}){if(ce(e)){let t=(n,r)=>{var s,o;let a=(s=e?.$attrs)!=null&&s[n]?[(o=e?.$attrs)==null?void 0:o[n]]:[];return[r].flat().reduce((c,l)=>{if(l!=null){let u=typeof l;if(u==="string"||u==="number")c.push(l);else if(u==="object"){let p=Array.isArray(l)?t(n,l):Object.entries(l).map(([d,h])=>n==="style"&&(h||h===0)?`${d.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${h}`:h?d:void 0);c=p.length?c.concat(p.filter(d=>!!d)):c}}return c},a)};Object.entries(i).forEach(([n,r])=>{if(r!=null){let s=n.match(/^on(.+)/);s?e.addEventListener(s[1].toLowerCase(),r):n==="p-bind"||n==="pBind"?ot(e,r):(r=n==="class"?[...new Set(t("class",r))].join(" ").trim():n==="style"?t("style",r).join(";").trim():r,(e.$attrs=e.$attrs||{})&&(e.$attrs[n]=r),e.setAttribute(n,r))}})}}function Os(e,i={},...t){if(e){let n=document.createElement(e);return ot(n,i),n.append(...t),n}}function Ts(e,i){if(e){e.style.opacity="0";let t=+new Date,n="0",r=function(){n=`${+e.style.opacity+(new Date().getTime()-t)/i}`,e.style.opacity=n,t=+new Date,+n<1&&(window.requestAnimationFrame&&requestAnimationFrame(r)||setTimeout(r,16))};r()}}function _r(e,i){return ce(e)?Array.from(e.querySelectorAll(i)):[]}function Vs(e,i){return ce(e)?e.matches(i)?e:e.querySelector(i):null}function Is(e,i){e&&document.activeElement!==e&&e.focus(i)}function Ms(e,i){if(ce(e)){let t=e.getAttribute(i);return isNaN(t)?t==="true"||t==="false"?t==="true":t:+t}}function $i(e,i=""){let t=_r(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i},
2
2
  [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i},
3
3
  input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i},
4
4
  select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i},
@@ -1 +1 @@
1
- import{a as v,b as H}from"./chunk-3GMNUULJ.js";import"./chunk-W3PCANAM.js";import{a as F,b as I}from"./chunk-E3QNEH3B.js";import"./chunk-WXT6EZ2V.js";import{h as G}from"./chunk-O4APZZ3M.js";import{b as D,c as N}from"./chunk-L3PZS6EL.js";import{a as O,b as R}from"./chunk-5JV52UYK.js";import"./chunk-ACTRMWEI.js";import"./chunk-ARXP327B.js";import{w as V,x as j}from"./chunk-7FFMPB6T.js";import"./chunk-UKBDY33R.js";import"./chunk-72LNXEXV.js";import"./chunk-3KWAJ7F2.js";import{a as $}from"./chunk-ZDTMCWOO.js";import"./chunk-F2X3VGZZ.js";import{n as A,s as P}from"./chunk-SB5MSLCX.js";import{$b as w,Cc as B,Db as E,Dc as _,Lb as p,Nc as c,Ob as x,Oc as m,Rc as C,Vb as n,W as y,Wb as o,Xb as l,Y as b,ec as h,fc as s,h as T,hb as a,ia as f,qa as g,ra as d,s as u,sa as M,ta as S,xb as k}from"./chunk-6K5LNQ4J.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};
1
+ import{a as v,b as H}from"./chunk-IFQIZ5KJ.js";import"./chunk-7FFVGWUP.js";import{a as F,b as I}from"./chunk-VJ3IBUVO.js";import"./chunk-KJ2WX3FC.js";import{h as G}from"./chunk-H3BFDSSJ.js";import{b as D,c as N}from"./chunk-VGNJD35F.js";import{a as O,b as R}from"./chunk-2XUSZCQL.js";import"./chunk-YV2QJ63P.js";import"./chunk-ARH3WEEF.js";import{w as V,x as j}from"./chunk-H6HNANYB.js";import"./chunk-2D2YD753.js";import"./chunk-OIBDX2CA.js";import"./chunk-M6LSMNSQ.js";import{a as $}from"./chunk-2MKKFLNJ.js";import{n as A,s as P}from"./chunk-VZ5CMS5O.js";import"./chunk-F2X3VGZZ.js";import{$b as w,Cc as B,Db as E,Dc as _,Lb as p,Nc as c,Ob as x,Oc as m,Rc as C,Vb as n,W as y,Wb as o,Xb as l,Y as b,ec as h,fc as s,h as T,hb as a,ia as f,qa as g,ra as d,s as u,sa as M,ta as S,xb as k}from"./chunk-NMCKMUY4.js";import"./chunk-YQFG5XE2.js";var L=()=>({height:"calc(100vh - 100px)"});function z(i,q){if(i&1){let e=w();n(0,"div",3)(1,"p-button",4),h("onClick",function(){g(e);let r=s();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),h("onClick",function(){g(e);let r=s();return d(r.onMigrate())}),o()()}if(i&2){let e=s();a(2),p("disabled",m(3,2,e.countInBooks$)!==0)("pTooltip",m(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function J(i,q){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),M(),n(5,"svg",8),l(6,"path",9),o(),S(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=s();x(_(12,L)),a(),x(_(13,L)),a(2),p("migrationCount",m(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",m(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var le=(()=>{class i{constructor(){this.migrateService=f(v),this.toastr=f($),this.refresh$=new T(void 0),this.pageTitle="Expense Account"}ngOnInit(){let e=this.refresh$.pipe(b(()=>this.migrateService.getExpenseAccountCount()),y(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){window.confirm("Are you sure you want to format this data? This action cannot be undone.")&&this.migrateService.formatExpenseAccount().subscribe(t=>{this.refresh$.next(),this.toastr.success(t.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-expense-account"]],features:[B([v])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),E(1,z,5,6,"ng-template",null,0,C)(3,J,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[G,P,A,I,F,R,O,N,D,H,j,V],encapsulation:2})}}return i})();export{le as ExpenseAccountComponent};