dealposbooks 1.9.0 → 1.9.1

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 (73) hide show
  1. package/3rdpartylicenses.txt +40 -40
  2. package/assets/scss/layouts/_layout.scss +1 -1
  3. package/assets/scss/variables/_variables.scss +2 -2
  4. package/{chunk-3TRGIHUH.js → chunk-2ACAW72E.js} +1 -1
  5. package/chunk-66DZK3FQ.js +1 -0
  6. package/chunk-6VN6A5B5.js +520 -0
  7. package/chunk-7T6O4KFO.js +2 -0
  8. package/chunk-ABZUNDNB.js +1 -0
  9. package/chunk-AER6WLW5.js +1 -0
  10. package/{chunk-34EMCCL5.js → chunk-BLOB7I4P.js} +3 -3
  11. package/chunk-BPFNN32N.js +1 -0
  12. package/chunk-C375SLTS.js +246 -0
  13. package/{chunk-MQ5Y727W.js → chunk-C4HBNN2L.js} +1 -1
  14. package/{chunk-YILEWAVV.js → chunk-CEUNPX5D.js} +1 -1
  15. package/chunk-DO2YIWC5.js +1 -0
  16. package/{chunk-PKPPDJWT.js → chunk-EFOOUCV3.js} +5 -5
  17. package/{chunk-G63G4UQZ.js → chunk-EKJXB6MV.js} +2 -2
  18. package/{chunk-DYZT7UKM.js → chunk-FNOMC2TM.js} +1 -1
  19. package/{chunk-KO5IN2G2.js → chunk-GFHANKXL.js} +1 -1
  20. package/chunk-GLLO2YQR.js +1 -0
  21. package/{chunk-BTZS5NIZ.js → chunk-GLURPAU2.js} +1 -1
  22. package/chunk-HZ6QN5ZG.js +7 -0
  23. package/chunk-I2MAIV44.js +1 -0
  24. package/chunk-KHZ5L5UR.js +1 -0
  25. package/chunk-LAZCPZXL.js +1 -0
  26. package/chunk-NASSFXXN.js +1 -0
  27. package/chunk-NGKRNFZC.js +1 -0
  28. package/{chunk-UIM6GQ63.js → chunk-NNH4DORM.js} +1 -1
  29. package/chunk-NTJQFRIB.js +180 -0
  30. package/chunk-OCYR2RTP.js +1 -0
  31. package/chunk-P63Q5GYL.js +1 -0
  32. package/chunk-PGIXMWYT.js +1 -0
  33. package/chunk-PUEKZGWI.js +1 -0
  34. package/chunk-R6MI2SDH.js +1 -0
  35. package/chunk-RA2IZVJ4.js +1 -0
  36. package/chunk-S6CFVRO6.js +1 -0
  37. package/{chunk-RNU2O7NF.js → chunk-TBHL2OSG.js} +1 -1
  38. package/chunk-USCTAGKM.js +1 -0
  39. package/chunk-UZOBSLZX.js +1 -0
  40. package/chunk-XCWBG4PB.js +1 -0
  41. package/chunk-YT7EC5LI.js +1 -0
  42. package/chunk-ZBTGGL5M.js +5 -0
  43. package/index.html +3 -3
  44. package/main-TCYAGQCN.js +1 -0
  45. package/package.json +1 -1
  46. package/{styles-JMIKZHNX.css → styles-H3D5FBL2.css} +1 -1
  47. package/chunk-6TRUWOKK.js +0 -1
  48. package/chunk-7FE3ZTH3.js +0 -7
  49. package/chunk-7V4AFAU5.js +0 -1
  50. package/chunk-CAI423H5.js +0 -1
  51. package/chunk-DDBPJDR6.js +0 -1
  52. package/chunk-DXCBV3NP.js +0 -1
  53. package/chunk-E2VJWAI2.js +0 -1
  54. package/chunk-EBTC6B2W.js +0 -2
  55. package/chunk-ESKS6LNH.js +0 -246
  56. package/chunk-G4MYTCDD.js +0 -1
  57. package/chunk-G4XX7EU2.js +0 -1
  58. package/chunk-GGZEY27B.js +0 -1
  59. package/chunk-KFKLJQ2D.js +0 -1
  60. package/chunk-KLKIGY44.js +0 -1
  61. package/chunk-L2BS7BTV.js +0 -1
  62. package/chunk-LUH5EEUM.js +0 -1
  63. package/chunk-NWVWD4IE.js +0 -1
  64. package/chunk-NXCLB2JQ.js +0 -1
  65. package/chunk-PBI352JR.js +0 -1
  66. package/chunk-PKK7JSPR.js +0 -1
  67. package/chunk-PMLVFBAT.js +0 -1
  68. package/chunk-TDHD3ZTF.js +0 -1
  69. package/chunk-UFS2HLAY.js +0 -1
  70. package/chunk-UM7MB5JU.js +0 -1
  71. package/chunk-YF4S6CQO.js +0 -524
  72. package/chunk-YNI2HWIV.js +0 -180
  73. package/main-YPUVQR54.js +0 -1
package/chunk-6TRUWOKK.js DELETED
@@ -1 +0,0 @@
1
- import{a as v,b as A}from"./chunk-UNNEEFI2.js";import{h as $,l as z}from"./chunk-MS3UTNX6.js";import"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as U,b as q}from"./chunk-G7MS6UI4.js";import{g as K}from"./chunk-YNI2HWIV.js";import"./chunk-USO7UKRV.js";import{a as S,b as F,c as O,d as j,e as G,f as H,g as N}from"./chunk-CMHZLZ4E.js";import"./chunk-OVJSBJBH.js";import{t as w}from"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import{d as I,k as L}from"./chunk-LUH5EEUM.js";import{d as R}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{r as D,s as T}from"./chunk-SJTXIIX5.js";import{Fc as k,Gc as B,Ic as m,Jb as s,Tb as n,Ub as a,Uc as M,X as u,ba as E,c as f,dc as _,fb as c,ha as l,mc as r,nc as p,tb as b,uc as P,vc as g,wc as x,zb as C}from"./chunk-2VF35PRV.js";import{a as d,b as h}from"./chunk-EQDQRRRY.js";var J=(()=>{class t{constructor(){this.httpService=l(R)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=E({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var X={data:[],filter:[],options:{hasGeneralLedger:!1}},y=F(N("cash-bank-store"),H(X),O(t=>({totalBalance:M(()=>t.data().reduce((o,e)=>o+e.balance,0))})),G(t=>{let o=l(J);return{loadCashAndBankLoader:v(f(u(()=>o.fetchCashAndBankLoader().pipe(A({next:e=>{console.log("response",e),S(t,i=>h(d({},i),{options:e.options}))},error:e=>{console.log("error",e)}}))))),loadCashAndBankData:v(f(u(()=>o.fetchCashAndBankData().pipe(A({next:e=>{console.log("response",e),S(t,i=>h(d({},i),{data:e}))},error:e=>{console.log("error",e)}})))))}}),j({onInit(t){t.loadCashAndBankLoader(),t.loadCashAndBankData()}}));var Y=["class","page"],Z=()=>({"min-width":"50rem"}),tt=t=>[t],et=()=>["/report/general-ledger"],nt=t=>({id:t});function at(t,o){t&1&&(n(0,"tr")(1,"th"),r(2,"Code"),a(),n(3,"th"),r(4,"Name"),a(),n(5,"th"),r(6,"Balance"),a()())}function ot(t,o){if(t&1&&(n(0,"tr")(1,"td"),r(2),a(),n(3,"td")(4,"a",6),r(5),a()(),n(6,"td")(7,"a",7),r(8),k(9,"number"),a()()()),t&2){let e=o.$implicit;c(2),p(e.code),c(2),s("routerLink",x(8,tt,"/chart-of-account/account/"+e.accountID)),c(),p(e.name),c(2),s("routerLink",g(10,et))("queryParams",x(11,nt,e.accountID)),c(),p(B(9,6,e.balance))}}function it(t,o){if(t&1&&(n(0,"tr")(1,"td",8),r(2,"Total"),a(),n(3,"td"),r(4),k(5,"number"),a()()),t&2){let e=_(2);c(4),p(B(5,1,e.store.totalBalance()))}}function rt(t,o){if(t&1&&(n(0,"p-card")(1,"p-table",5),C(2,at,7,0,"ng-template",null,1,m)(4,ot,10,13,"ng-template",null,2,m)(6,it,6,3,"ng-template",null,3,m),a()()),t&2){let e=_();c(),s("value",e.store.data())("tableStyle",g(2,Z))}}var Q=(()=>{class t{constructor(){this.store=l(y),this.routeInfo=V}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=b({type:t,selectors:[["app-cash-bank",8,"page"]],features:[P([y])],attrs:Y,decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["footer",""],["pageTitle","Cash and Bank"],[3,"value","tableStyle"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2",1,"text-end"]],template:function(i,ct){i&1&&(n(0,"app-main-panel",4),C(1,rt,8,3,"ng-template",null,0,m),a())},dependencies:[T,D,K,w,z,$,q,U,L,I],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return t})();var jt=[{path:"",component:Q,children:[]}],V={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{jt as CASH_BANK_ROUTES,V as CASH_BANK_ROUTE_PAGE};
package/chunk-7FE3ZTH3.js DELETED
@@ -1,7 +0,0 @@
1
- import{a as ge}from"./chunk-S64TQVWK.js";import{a as mt,b as De,c as Fe}from"./chunk-ROX6NFMK.js";import{a as st,b as ct}from"./chunk-VYTUB2DV.js";import{a as et}from"./chunk-KO5IN2G2.js";import{a as lt}from"./chunk-UIM6GQ63.js";import{a as de,b as ue,d as at,e as pt}from"./chunk-QBJKUIXK.js";import"./chunk-ON4N4CPO.js";import{a as _e,b as fe}from"./chunk-I7T4W6G2.js";import"./chunk-GHZLR44M.js";import{a as ae}from"./chunk-MEKP6D5H.js";import{c as it,d as be}from"./chunk-F6SXKAYF.js";import{a as A,b as k}from"./chunk-UNNEEFI2.js";import{b as pe,c as me,h as se,l as ce}from"./chunk-MS3UTNX6.js";import{h as Ie}from"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import{f as tt}from"./chunk-AVL6C3VX.js";import{b as le}from"./chunk-G7MS6UI4.js";import{f as rt,g as re}from"./chunk-YNI2HWIV.js";import{f as ot,g as Ee}from"./chunk-USO7UKRV.js";import{a as w,b as ee,c as te,d as ie,e as ne,f as oe,g as nt}from"./chunk-CMHZLZ4E.js";import"./chunk-OVJSBJBH.js";import{c as Qe,e as U,f as J,g as Xe,h as L,j as Q,l as X,o as Z,r as Ce,u as $}from"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import{a as Ze,d as ve,k as ye}from"./chunk-LUH5EEUM.js";import{d as $e}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import{c as Je}from"./chunk-EBTC6B2W.js";import{j as He,m as xe,q as Ue,r as K,s as H}from"./chunk-SJTXIIX5.js";import{D as Se,Fa as D,Fc as C,Gb as ke,Gc as v,Hb as Ne,Hc as Ye,Ic as s,Jb as c,Mb as j,Ob as je,Pb as qe,Rb as We,Sb as ze,Tb as n,Ub as i,Uc as T,V as Oe,Vb as I,Vc as Ke,W as Ge,X as G,Z as N,Zb as V,ba as Pe,bb as Ae,c as O,cc as M,dc as g,fb as p,ha as h,mc as o,nc as d,oc as x,pa as b,qa as E,rc as q,s as Be,sc as P,tb as R,tc as W,uc as z,vc as F,wc as Y,zb as f}from"./chunk-2VF35PRV.js";import{a as _,b as y,c as Me,e as Le}from"./chunk-EQDQRRRY.js";var B=(()=>{class e{constructor(){this.httpService=h($e),this.authService=h(et)}fetchGeneralLedgerLoader(t={}){return this.httpService.post(void 0,"api/GeneralLedgerLoader/GetFilter",t)}fetchGeneralLedgerReport(t){return this.httpService.post(void 0,"api/GeneralLedger/Get",t)}getCustomerSuggestions(t){let r={Prefix:t,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:r})}getSupplierSuggestions(t){let r={Prefix:t,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:r})}getCashierSuggestions(t){let r={Prefix:t,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/api/ac/GetUserSuggestion",{params:r})}getBalanceSheetLoader(){return this.httpService.get(void 0,"/api/BalanceSheetLoader/GetBalanceSheet")}getBalanceSheet(t){let r=_({},t),m=new Je;return Object.keys(r).forEach(S=>{m=m.set(S,String(r[S]))}),this.httpService.get(void 0,"/api/BalanceSheet",{params:m})}getIncomeStatementLoader(){return this.httpService.get(void 0,"api/IncomeStatementLoader/Filter")}getIncomeStatement(t){return this.httpService.post(void 0,"api/IncomeStatement/List",_({},t))}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var wt={metadata:{filter:{categoryID:"",from:new Date().toISOString(),to:new Date().toISOString(),iDs:[],outletIDs:[]},options:{accounts:[],outlets:[]},roles:{isInEmptyOutletRole:!1}},items:{data:[],pageTitle:""},filter:{listAccountID:[],categoryID:null,OutletID:[],ContactID:null,from:null,to:null}},we=ee(oe(wt),nt("General Ledger Store"),te(e=>({hasData:T(()=>Array.isArray(e.items().data)&&e.items().data.length>0)})),ne(e=>{let a=h(B),t={updateFilter:r=>{w(e,l=>y(_({},l),{filter:r}))},loadList:A(O(Se(r=>Array.isArray(r.listAccountID)&&r.listAccountID.length>0),G(r=>a.fetchGeneralLedgerReport(r).pipe(k({next:l=>{w(e,m=>y(_({},m),{items:l}))},error:l=>{console.error(l)}}))))),loadLoader:A(O(G(r=>a.fetchGeneralLedgerLoader(r).pipe(k({next:l=>{w(e,m=>y(_({},m),{metadata:l,filter:y(_({},m.filter),{categoryID:l.filter.categoryID})})),t.loadList(e.filter)},error:l=>{console.error(l)}}))),ae("res")))};return t}),ie({onInit:e=>{e.loadLoader({})}}));var Vt=()=>({height:"calc(100vh - 100px)"}),Mt=e=>["/journal/journal-entry/",e],Lt=e=>({"ng-invalid ng-dirty":e}),Bt=()=>({scrollHeight:"250px"});function Ot(e,a){e&1&&(n(0,"div",9)(1,"a",10),o(2,"Return to Accounts"),i(),I(3,"p-button",11),i())}function Gt(e,a){e&1&&(n(0,"tr")(1,"th"),o(2,"Outlet"),i(),n(3,"th"),o(4,"No."),i(),n(5,"th"),o(6,"Date"),i(),n(7,"th"),o(8,"Name"),i(),n(9,"th"),o(10,"Description"),i(),n(11,"th"),o(12,"Debit"),i(),n(13,"th"),o(14,"Credit"),i(),n(15,"th"),o(16,"Balance"),i()())}function Pt(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td")(4,"a",16),o(5),i()(),n(6,"td"),o(7),C(8,"date"),i(),n(9,"td")(10,"a",17),o(11),i()(),I(12,"td"),n(13,"td",15),o(14),C(15,"number"),i(),n(16,"td",15),o(17),C(18,"number"),i(),n(19,"td",15),o(20),C(21,"number"),i()()),e&2){let t=a.$implicit;p(2),d(t.outletName),p(2),c("routerLink",Y(18,Mt,t.id)),p(),d(t.number),p(2),d(Ye(8,9,t.date,"dd MMM yyyy")),p(3),c("href","https://rizastoretest.dealpos.net/menu/Contacts/Contact/Customers/Info?ID="+t.contactID,Ae),p(),d(t.contactName),p(3),d(v(15,12,t.debitAmount)),p(3),d(v(18,14,t.creditAmount)),p(3),d(v(21,16,t.balance))}}function At(e,a){if(e&1&&(n(0,"tr")(1,"td",14),o(2,"Starting Balance"),i(),n(3,"td",15),o(4),C(5,"number"),i()(),We(6,Pt,22,20,"tr",null,qe)),e&2){let t=a.$implicit;p(4),x(" ",v(5,1,t.startBalance)," "),p(2),ze(t.data)}}function kt(e,a){if(e&1&&(n(0,"tr"),I(1,"td",18),n(2,"td",19),o(3,"Total"),i(),n(4,"td",19),o(5),C(6,"number"),i(),n(7,"td",19),o(8),C(9,"number"),i(),I(10,"td"),i()),e&2){let t=g(3);p(5),x(" ",v(6,2,t.store.items().data[0].debitTotal)," "),p(3),x(" ",v(9,4,t.store.items().data[0].creditTotal)," ")}}function Nt(e,a){if(e&1&&(n(0,"p-panel")(1,"p-table",13),f(2,Gt,17,0,"ng-template",null,3,s)(4,At,8,3,"ng-template",null,4,s)(6,kt,11,6,"ng-template",null,5,s),i()()),e&2){let t=g(2);j(F(4,Vt)),p(),c("value",t.store.items().data)("scrollable",!0)}}function jt(e,a){if(e&1&&f(0,Nt,8,5,"p-panel",12),e&2){let t=g();c("ngIf",t.store.items()&&t.store.items().data.length)}}function qt(e,a){if(e&1&&(n(0,"div",9)(1,"div",30)(2,"span",31),o(3),i()(),n(4,"div")(5,"span"),o(6,"-"),i()(),n(7,"div",30)(8,"span",32),o(9),i()()()),e&2){let t=a.$implicit;p(3),x("(",t.code,")"),p(6),d(t.name)}}function Wt(e,a){if(e&1&&(n(0,"div",9)(1,"div",30)(2,"span",31),o(3),i()(),n(4,"div")(5,"span"),o(6,"-"),i()(),n(7,"div",30)(8,"span",32),o(9),i()()()),e&2){let t=a.$implicit;p(3),x("(",t.code,")"),p(6),d(t.name)}}function zt(e,a){if(e&1&&(n(0,"div",33)(1,"div"),o(2),i()()),e&2){let t=a.$implicit;p(2),d(t.value)}}function Yt(e,a){if(e&1){let t=V();n(0,"div",21)(1,"label",22),o(2,"Customer"),i(),n(3,"p-autocomplete",34),M("completeMethod",function(l){b(t);let m=g(2);return E(m.searchCustomer(l))}),i()()}if(e&2){let t=g(2);p(3),c("suggestions",t.customerSuggestions())}}function Kt(e,a){if(e&1){let t=V();n(0,"div",21)(1,"label",22),o(2,"Supplier"),i(),n(3,"p-autocomplete",34),M("completeMethod",function(l){b(t);let m=g(2);return E(m.searchSupplier(l))}),i()()}if(e&2){let t=g(2);p(3),c("suggestions",t.supplierSuggestions())}}function Ht(e,a){if(e&1){let t=V();n(0,"form",20)(1,"div",21)(2,"label",22),o(3,"Accounts"),i(),n(4,"p-multiselect",23),f(5,qt,10,2,"ng-template",null,6,s)(7,Wt,10,2,"ng-template",null,7,s),i()(),n(9,"div",21)(10,"label",22),o(11,"From"),i(),I(12,"p-datepicker",24),i(),n(13,"div",21)(14,"label",22),o(15,"To"),i(),I(16,"p-datepicker",25),i(),n(17,"div",21)(18,"label",22),o(19,"Outlets"),i(),n(20,"p-multiselect",26),f(21,zt,3,1,"ng-template",null,7,s),i()(),n(23,"div",21)(24,"label",22),o(25,"Category"),i(),n(26,"p-treeselect",27),M("onFocus",function(){b(t);let l=g();return E(l.onCategoryFocus())}),i()(),n(27,"div",21)(28,"label",28),o(29,"Contact Type"),i(),I(30,"p-toggleswitch",29),i(),f(31,Yt,4,1,"div",21)(32,Kt,4,1,"div",21),i()}if(e&2){let t=g();c("formGroup",t.generalLedgerFilterForm),p(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",t.store.metadata().options.accounts)("ngClass",Y(17,Lt,t.generalLedgerFilterForm.get("listAccountID").invalid&&t.generalLedgerFilterForm.get("listAccountID").touched||t.generalLedgerFilterForm.get("listAccountID").dirty)),p(8),c("iconDisplay","input")("showIcon",!0),p(4),c("iconDisplay","input")("showIcon",!0),p(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",t.store.metadata().options.outlets),p(6),c("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",F(19,Bt))("options",t.categoriesOptions()),p(5),je(t.generalLedgerFilterForm.get("contactType").value?31:32)}}var St=(()=>{class e{constructor(){this.dialogFilterVisible=D(!1),this.reportService=h(B),this.coaService=h(lt),this.store=h(we),this.categoriesOptions=D([]),this.customerSuggestions=D([]),this.supplierSuggestions=D([]),this.route=h(Ze),this.dayjsService=h(ge),this.initDialogVisible=D(!0),this.fb=h(Ce)}ngOnInit(){this.generateFilterForm(),this.route.queryParamMap.pipe(Be(t=>t.get("id")),N(t=>{t&&(this.initDialogVisible.update(r=>!r),this.generalLedgerFilterForm.patchValue({listAccountID:[t]}),this.store.updateFilter(y(_({},this.store.filter()),{listAccountID:[t]})))})).subscribe(),this.generalLedgerFilterForm.patchValue({from:new Date})}onCategoryFocus(){this.coaService.getCachedCategoriesOptions().pipe(ae("getCachedCategoriesOptions"),N(t=>this.categoriesOptions.set(t))).subscribe()}generateFilterForm(){this.generalLedgerFilterForm=this.fb.group({listAccountID:new L([],[Qe.required]),categoryID:new L(null),OutletID:new L([]),ContactID:new L(""),from:new L(new Date),to:new L(new Date),contactType:[!0]})}onFilterEvent(t){console.log(t),this.dialogFilterVisible.update(r=>!r)}onFilterOKEvent(){let S=this.generalLedgerFilterForm.value,{from:t,to:r}=S,l=Me(S,["from","to"]);if(this.generalLedgerFilterForm.invalid){this.generalLedgerFilterForm.markAllAsTouched(),this.dialogFilterVisible.set(!0);return}let m={categoryID:l.categoryID?.key??null,ContactID:l.ContactID.length?l.ContactID:null,OutletID:l.OutletID.length?l.OutletID:null,listAccountID:l.listAccountID,from:this.dayjsService.from(t)?this.dayjsService.from(t).format():null,to:this.dayjsService.from(r)?this.dayjsService.from(r).format():null};this.dialogFilterVisible.update(u=>!u),this.store.updateFilter(m),this.dialogFilterVisible.set(!1)}searchCustomer(t){this.reportService.getCustomerSuggestions(t.query).pipe(N(r=>this.customerSuggestions.set(r))).subscribe()}searchSupplier(t){this.reportService.getSupplierSuggestions(t.query).pipe(N(r=>this.supplierSuggestions.set(r))).subscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-report-general-ledger"]],features:[z([we])],decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["footer",""],["selectedItem",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isDialogFilterVisible","isFilterable","isInitDialogFilterVisible"],[1,"d-flex","gap-2"],["routerLink","/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined"],["severity","secondary","variant","outlined","icon","fa-solid fa-download","label","Export"],[3,"style",4,"ngIf"],["scrollHeight","calc(100vh - 150px)",3,"value","scrollable"],["colspan","7",1,"text-end"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"href"],["colspan","4"],[1,"text-end","fw-semibold"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["showClear","","formControlName","listAccountID","appendTo","body","optionLabel","name","optionValue","id","placeholder","Select Accounts",3,"virtualScroll","virtualScrollItemSize","options","ngClass"],["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","","formControlName","OutletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlets",3,"virtualScroll","virtualScrollItemSize","options"],["showClear","","filter","","filterBy","label","formControlName","categoryID","appendTo","body","containerStyleClass","w-100","optionLabel","label","optionValue","id","placeholder","Select Category",3,"onFocus","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],["for",""],["formControlName","contactType"],[1,""],[1,"h-full","align-middle"],[1,"text-truncate","d-inline-block","h-full","align-middle"],[1,"flex","items-center","gap-2"],["formControlName","ContactID","appendTo","body","styleClass","w-100","optionLabel","Value","optionValue","Key","inputStyleClass","w-100",3,"completeMethod","suggestions"]],template:function(r,l){if(r&1){let m=V();n(0,"app-main-panel",8),W("isDialogFilterVisibleChange",function(u){return b(m),P(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),E(u)})("isInitDialogFilterVisibleChange",function(u){return b(m),P(l.initDialogVisible,u)||(l.initDialogVisible=u),E(u)}),M("filterConfirmed",function(){return b(m),E(l.onFilterOKEvent())}),f(1,Ot,4,0,"ng-template",null,0,s)(3,jt,1,1,"ng-template",null,1,s)(5,Ht,33,20,"ng-template",null,2,s),i()}r&2&&(c("pageTitle",l.store.items().pageTitle.length?l.store.items().pageTitle:"General Ledger"),q("isDialogFilterVisible",l.dialogFilterVisible),c("isFilterable",!0),q("isInitDialogFilterVisible",l.initDialogVisible))},dependencies:[re,H,He,xe,K,Ue,le,ce,se,rt,Ee,ot,Ie,me,pe,Fe,De,$,Q,U,J,X,Z,ue,de,be,tt,pt,at,ct,st,fe,_e,ye,ve],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Ut={data:{},filter:{EntityID:[],CashierID:null,Text:null,from:null,to:null},isLoading:!0,loader:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}}},Re=ee(oe(Ut),te(e=>({totalCOGS:T(()=>{let a=e.data()?.data?.cogs;return Array.isArray(a)?a.reduce((t,r)=>t+(r?.Amount??0),0):0}),totalRevenue:T(()=>{let a=e.data()?.data?.revenue;return Array.isArray(a)?a.reduce((t,r)=>t+(r?.amount??0),0):0}),totalExpense:T(()=>{let a=e.data()?.data?.expense;return Array.isArray(a)?a.reduce((t,r)=>t+(r?.Amount??0),0):0}),isDataEmpty:T(()=>Object.keys(e.data()?.data??{}).length===0)})),ne(e=>{let a=h(B),t=h(ge);return{updateFilter(l){w(e,m=>y(_({},m),{filter:_(_({},m.filter),l)}))},getLoader:A(O(G(()=>a.getIncomeStatementLoader().pipe(k({next:l=>{w(e,m=>y(_({},m),{loader:l,filter:y(_({},m.filter),{from:t.now.format(),to:t.from(l.filter.to).format()})}))},error:l=>{console.error(l)}}))))),getIncomeStatement:A(O(G(l=>a.getIncomeStatement(l).pipe(Ge(()=>w(e,m=>y(_({},m),{isLoading:!0}))),k({next:m=>{w(e,S=>y(_({},S),{data:m,isLoading:!1}))},error:m=>{console.error(m)}})))))}}),ie({onInit:e=>{e.getLoader(),e.getIncomeStatement(e.filter)}}));var Jt=()=>[xe,K,se,_e,import("./chunk-JXI4NDYT.js").then(e=>e.ScrollPanel),ve],xt=()=>({height:"calc(100vh - 100px)"}),Ct=()=>({"min-width":"50rem"}),Qt=e=>["/chart-of-account/account/",e],Xt=()=>["/report/general-ledger"],Zt=e=>({id:e});function $t(e,a){e&1&&(n(0,"tr")(1,"th",11),o(2,"Code"),i(),n(3,"th",12),o(4,"Name"),i(),n(5,"th",13),o(6,"Total"),i()())}function ei(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td")(4,"a",14),o(5),i()(),n(6,"td",13)(7,"a",15),o(8),C(9,"number"),i()()()),e&2){let t=a.$implicit;p(2),d(t.code),p(2),c("routerLink",Y(8,Qt,t.accountID)),p(),d(t.name),p(2),c("routerLink",F(10,Xt))("queryParams",Y(11,Zt,t.accountID)),p(),d(v(9,6,t.amount))}}function ti(e,a){if(e&1&&(n(0,"tr")(1,"td",16),o(2,"Total Asset"),i(),n(3,"td",17),o(4),C(5,"number"),i()()),e&2){let t=g(4);p(4),x(" ",v(5,1,t.store.totalRevenue())," ")}}function ii(e,a){e&1&&(n(0,"tr")(1,"td",18),o(2),i()()),e&2&&(p(2),x(" ","No data available"," "))}function ni(e,a){e&1&&(n(0,"tr")(1,"th",11),o(2,"Code"),i(),n(3,"th",12),o(4,"Name"),i(),n(5,"th",13),o(6,"Total"),i()())}function oi(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td"),o(4),i(),n(5,"td",13),o(6),C(7,"number"),i()()),e&2){let t=a.$implicit;p(2),d(t.Code),p(2),d(t.Name),p(2),d(v(7,3,t.Amount))}}function ri(e,a){if(e&1&&(n(0,"tr")(1,"td",19),o(2,"Total Liability"),i(),n(3,"td",17),o(4),C(5,"number"),i()()),e&2){let t=g(4);p(4),x(" ",v(5,1,t.store.totalExpense())," ")}}function li(e,a){e&1&&(n(0,"tr")(1,"td",18),o(2),i()()),e&2&&(p(2),x(" ","No data available"," "))}function ai(e,a){e&1&&(n(0,"tr")(1,"th",11),o(2,"Code"),i(),n(3,"th",12),o(4,"Name"),i(),n(5,"th",20),o(6,"Total"),i()())}function pi(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td"),o(4),i(),n(5,"td",13),o(6),C(7,"number"),i()()),e&2){let t=a.$implicit;p(2),d(t.Code),p(2),d(t.Name),p(2),x(" ",v(7,3,t.Amount)," ")}}function mi(e,a){if(e&1&&(n(0,"tr")(1,"td",19),o(2,"Total Equity"),i(),I(3,"td",17),i(),n(4,"tr")(5,"td",19),o(6," Total Liability + Equity "),i(),n(7,"td",17),o(8),C(9,"number"),i()()),e&2){let t=g(4);p(8),x(" ",v(9,1,t.store.totalCOGS())," ")}}function si(e,a){e&1&&(n(0,"tr")(1,"td",18),o(2),i()()),e&2&&(p(2),x(" ","No data available"," "))}function ci(e,a){if(e&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",8)(3,"h4"),o(4,"Revenue"),i(),n(5,"p-table",9),f(6,$t,7,0,"ng-template",null,2,s)(8,ei,10,13,"ng-template",null,3,s),o(10," <"),f(11,ti,6,3,"ng-template",null,4,s)(13,ii,3,1,"ng-template",null,5,s),i(),n(15,"h4"),o(16,"Expense"),i(),n(17,"p-table",10),f(18,ni,7,0,"ng-template",null,2,s)(20,oi,8,5,"ng-template",null,3,s),o(22," <"),f(23,ri,6,3,"ng-template",null,4,s)(25,li,3,1,"ng-template",null,5,s),i(),n(27,"h4"),o(28,"COGS"),i(),n(29,"p-table",10),f(30,ai,7,0,"ng-template",null,2,s)(32,pi,8,5,"ng-template",null,3,s),o(34," <"),f(35,mi,10,3,"ng-template",null,4,s)(37,si,3,1,"ng-template",null,5,s),i()()()()),e&2){let t,r,l,m=g(3);j(F(9,xt)),p(),j(F(10,xt)),p(4),c("value",(t=m.store.data())==null||t.data==null?null:t.data.revenue),p(12),c("value",(r=m.store.data())==null||r.data==null?null:r.data.expense)("tableStyle",F(11,Ct)),p(12),c("value",(l=m.store.data())==null||l.data==null?null:l.data.cogs)("tableStyle",F(12,Ct))}}function di(e,a){if(e&1&&f(0,ci,39,13,"p-scroll-panel",7),e&2){let t=g(2);c("ngIf",t.store.data())}}function ui(e,a){if(e&1&&(f(0,di,1,1),ke(1,0,Jt)),e&2){let t=g();p(),Ne(!t.store.isDataEmpty())}}function _i(e,a){if(e&1){let t=V();n(0,"form",21)(1,"div",22)(2,"label",23),o(3,"Outlet"),i(),I(4,"p-multiselect",24),i(),n(5,"div",22)(6,"label",23),o(7,"Cashier"),i(),n(8,"p-autocomplete",25),M("completeMethod",function(l){b(t);let m=g();return E(m.onCashierSearch(l))}),i()(),n(9,"div",22)(10,"label",23),o(11,"From"),i(),I(12,"p-datepicker",26),i(),n(13,"div",22)(14,"label",23),o(15,"To"),i(),I(16,"p-datepicker",27),i()()}if(e&2){let t=g();c("formGroup",t.formFilter),p(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",t.store.loader().options.outlets),p(4),c("showClear",!0)("suggestions",t.cashierSuggestions())}}var vt=(()=>{class e{constructor(){this.dayjsService=h(ge),this.store=h(Re),this.fb=h(Ce),this.reportService=h(B),this.isInitDialogFilterVisible=D(!1),this.dialogFilterVisible=D(!1),this.cashierSuggestions=D([]),Ke(()=>{this.store.filter()&&this.initForm()})}ngOnInit(){this.initForm()}onSearch(t){this.store.updateFilter(y(_({},this.store.filter()),{Text:t}))}onCashierSearch(t){this.reportService.getCashierSuggestions(t.query).pipe(ae("Cashier Suggestions"),N(r=>this.cashierSuggestions.set(r))).subscribe()}initForm(){let t=this.store.filter();this.formFilter=this.fb.group({EntityID:this.fb.control(t.EntityID??[]),CashierID:this.fb.control(t.CashierID??null),Text:this.fb.control(t.Text??""),from:this.fb.control(t.from?this.dayjsService.from(t.from).toDate():null),to:this.fb.control(t.to?this.dayjsService.from(t.to).toDate():null)})}onFilterOK(){let t=this.formFilter.getRawValue(),r=Object.entries(t).reduce((l,[m,S])=>(m==="from"||m==="to"?S instanceof Date&&(l[m]=this.dayjsService.from(S).format()):m==="CashierID"?l[m]=Object.prototype.hasOwnProperty.call("Key",S)?S.Key:null:l[m]=S||null,l),{});this.store.updateFilter(_(_({},this.store.filter()),r)),this.dialogFilterVisible.update(l=>!l),console.log("body",t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-report-income-statement"]],features:[z([Re])],decls:5,vars:5,consts:[["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","search","filterConfirmed","isFilterable","pageTitle","isDialogFilterVisible","isInitDialogFilterVisible","isSearchableInput"],[3,"style",4,"ngIf"],[1,"d-flex","flex-column",2,"gap","2rem"],[3,"value"],[3,"value","tableStyle"],[2,"width","20%"],[2,"width","10%"],[1,"text-end"],["target","_blank",1,"link","link-primary",3,"routerLink"],["target","_blank",1,"link","link-primary",3,"routerLink","queryParams"],["colspan","2 ",1,"fw-semibold"],[1,"text-end","fw-semibold"],["colspan","3",1,""],["colspan","2",1,"fw-semibold"],[1,"text-end",2,"min-width","10%"],[1,"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"],["appendTo","body","formControlName","CashierID","styleClass","w-100","inputStyleClass","w-100","field","Value","placeholder","Search a cashier",3,"completeMethod","showClear","suggestions"],["formControlName","from","styleClass","w-100","appendTo","body"],["formControlName","to","styleClass","w-100","appendTo","body"]],template:function(r,l){if(r&1){let m=V();n(0,"app-main-panel",6),W("isDialogFilterVisibleChange",function(u){return b(m),P(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),E(u)})("isInitDialogFilterVisibleChange",function(u){return b(m),P(l.isInitDialogFilterVisible,u)||(l.isInitDialogFilterVisible=u),E(u)}),M("search",function(u){return b(m),E(l.onSearch(u))})("filterConfirmed",function(){return b(m),E(l.onFilterOK())}),f(1,ui,3,1,"ng-template",null,0,s)(3,_i,17,6,"ng-template",null,1,s),i()}r&2&&(c("isFilterable",!0)("pageTitle",l.store.data().pageTitle),q("isDialogFilterVisible",l.dialogFilterVisible)("isInitDialogFilterVisible",l.isInitDialogFilterVisible),c("isSearchableInput",!0))},dependencies:[re,H,Ie,me,pe,$,Q,U,J,X,Z,ue,de,le,ce,fe,ye,Fe,De],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Te=Le(mt());var fi={metadata:{options:{outlets:[]},filter:{to:"",outletID:[]},roles:{isInRoleEmptyOutlet:!1}},data:{asset:[],liability:[],equity:[],pageTitle:""},filter:{date:(0,Te.default)().format("YYYY-MM-DD"),listOutletParam:[]}},Ve=ee(oe(fi),te(e=>({totalAsset:T(()=>e.data().asset.reduce((a,t)=>a+ +t.amount,0)),totalLiability:T(()=>e.data().liability.reduce((a,t)=>a+ +t.amount,0)),totalEquity:T(()=>e.data().equity.reduce((a,t)=>a+ +t.amount,0))})),ne(e=>{let a=h(B),t={updateFilter:r=>{w(e,l=>y(_({},l),{filter:r}))},fetchBalanceSheet:A(O(Se(()=>{let r=e.filter();return Object.entries(r).every(([l,m])=>m!=null&&m!=="")}),G(r=>a.getBalanceSheet(r).pipe(k({next:l=>{w(e,m=>y(_({},m),{data:l}))},error:l=>{console.error(l)}}))),Oe(1))),fetchLoader:A(O(G(()=>a.getBalanceSheetLoader().pipe(k({next:r=>{w(e,l=>y(_({},l),{metadata:r,filter:{date:(0,Te.default)(r.filter.to).format("YYYY-MM-DD")}})),t.fetchBalanceSheet(e.filter)},error:r=>{console.error(r)}})))))};return t}),ie(e=>({onInit:()=>{e.fetchLoader()}})));var bt=Le(mt());var gi=()=>({height:"calc(100vh - 100px)"}),yt=()=>({"min-width":"50rem"});function hi(e,a){e&1&&(n(0,"tr")(1,"th",11),o(2,"Code"),i(),n(3,"th",12),o(4,"Asset"),i(),n(5,"th",13),o(6,"Total"),i()())}function Si(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td"),o(4),i(),n(5,"td",13),o(6),C(7,"number"),i()()),e&2){let t=a.$implicit;p(2),d(t.code),p(2),d(t.categoryName),p(2),d(v(7,3,t.amount))}}function xi(e,a){if(e&1&&(n(0,"tr")(1,"td",14),o(2,"Total Asset"),i(),n(3,"td",15),o(4),C(5,"number"),i()()),e&2){let t=g(2);p(4),x(" ",v(5,1,t.store.totalAsset())," ")}}function Ci(e,a){e&1&&(n(0,"tr")(1,"td",16),o(2),i()()),e&2&&(p(2),x(" ","No data available"," "))}function vi(e,a){e&1&&(n(0,"tr")(1,"th",11),o(2,"Code"),i(),n(3,"th",12),o(4,"Liability"),i(),n(5,"th",13),o(6,"Total"),i()())}function yi(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td"),o(4),i(),n(5,"td",13),o(6),C(7,"number"),i()()),e&2){let t=a.$implicit;p(2),d(t.code),p(2),d(t.categoryName),p(2),d(v(7,3,t.amount))}}function bi(e,a){if(e&1&&(n(0,"tr")(1,"td",17),o(2,"Total Liability"),i(),n(3,"td",15),o(4),C(5,"number"),i()()),e&2){let t=g(2);p(4),x(" ",v(5,1,t.store.totalLiability())," ")}}function Ei(e,a){e&1&&(n(0,"tr")(1,"td",16),o(2),i()()),e&2&&(p(2),x(" ","No data available"," "))}function Ii(e,a){e&1&&(n(0,"tr")(1,"th",11),o(2,"Code"),i(),n(3,"th",12),o(4,"Equity"),i(),n(5,"th",18),o(6,"Total"),i()())}function Di(e,a){if(e&1&&(n(0,"tr")(1,"td"),o(2),i(),n(3,"td"),o(4),i(),n(5,"td",13),o(6),C(7,"number"),i()()),e&2){let t=a.$implicit;p(2),d(t.code),p(2),d(t.name),p(2),x(" ",v(7,3,t.amount)," ")}}function Fi(e,a){if(e&1&&(n(0,"tr")(1,"td",17),o(2,"Total Equity"),i(),n(3,"td",15),o(4),C(5,"number"),i()(),n(6,"tr")(7,"td",17),o(8," Total Liability + Equity "),i(),n(9,"td",15),o(10),C(11,"number"),i()()),e&2){let t=g(2);p(4),x(" ",v(5,2,t.store.totalEquity())," "),p(6),x(" ",v(11,4,t.store.totalLiability()+t.store.totalEquity())," ")}}function wi(e,a){e&1&&(n(0,"tr")(1,"td",16),o(2),i()()),e&2&&(p(2),x(" ","No data available"," "))}function Ri(e,a){if(e&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",8)(3,"p-table",9),f(4,hi,7,0,"ng-template",null,2,s)(6,Si,8,5,"ng-template",null,3,s),o(8," <"),f(9,xi,6,3,"ng-template",null,4,s)(11,Ci,3,1,"ng-template",null,5,s),i(),I(13,"hr"),n(14,"p-table",10),f(15,vi,7,0,"ng-template",null,2,s)(17,yi,8,5,"ng-template",null,3,s),o(19," <"),f(20,bi,6,3,"ng-template",null,4,s)(22,Ei,3,1,"ng-template",null,5,s),i(),I(24,"hr"),n(25,"p-table",10),f(26,Ii,7,0,"ng-template",null,2,s)(28,Di,8,5,"ng-template",null,3,s),o(30," <"),f(31,Fi,12,6,"ng-template",null,4,s)(33,wi,3,1,"ng-template",null,5,s),i()()()()),e&2){let t=g();j(F(7,gi)),p(3),c("value",t.store.data().asset),p(11),c("value",t.store.data().liability)("tableStyle",F(8,yt)),p(11),c("value",t.store.data().equity)("tableStyle",F(9,yt))}}function Ti(e,a){if(e&1&&(n(0,"div",24)(1,"div"),o(2),i()()),e&2){let t=a.$implicit;p(2),d(t.value)}}function Vi(e,a){if(e&1&&(n(0,"form",19)(1,"div",20)(2,"label",21),o(3,"Outlet"),i(),n(4,"p-multiselect",22),f(5,Ti,3,1,"ng-template",null,6,s),i()(),n(7,"div",20)(8,"label",21),o(9,"From"),i(),I(10,"p-datepicker",23),i()()),e&2){let t=g();c("formGroup",t.filterForm),p(4),c("virtualScroll",!0)("virtualScrollItemSize",50)("options",t.store.metadata().options.outlets),p(6),c("iconDisplay","input")("showIcon",!0)}}var Et=(()=>{class e{constructor(){this.store=h(Ve),this.dialogFilterVisible=D(!1),this.isInitDialogFilterVisible=D(!1)}ngOnInit(){this.generateFilterForm()}generateFilterForm(){this.filterForm=new Xe({date:new L(new Date),outletID:new L([])})}onFilterOKEvent(){let{date:t,outletID:r}=this.filterForm.value;this.store.updateFilter({date:(0,bt.default)(t).format("YYYY-MM-DD"),listOutletParam:r}),this.dialogFilterVisible.update(l=>!l)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-report-balance-sheet"]],features:[z([Ve])],decls:5,vars:4,consts:[["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],["item",""],[3,"isDialogFilterVisibleChange","isInitDialogFilterVisibleChange","filterConfirmed","pageTitle","isFilterable","isDialogFilterVisible","isInitDialogFilterVisible"],[1,"d-flex","flex-column","gap-3"],["showGridlines","",3,"value"],[3,"value","tableStyle"],[2,"width","20%"],[2,"width","10%"],[1,"text-end"],["colspan","2 ",1,"fw-semibold"],[1,"text-end","fw-semibold"],["colspan","3",1,""],["colspan","2",1,"fw-semibold"],[1,"text-end",2,"min-width","10%"],[1,"d-flex","flex-column","row-gap-2",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","outletID","appendTo","body","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"virtualScroll","virtualScrollItemSize","options"],["formControlName","date","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"],[1,"flex","items-center","gap-2"]],template:function(r,l){if(r&1){let m=V();n(0,"app-main-panel",7),W("isDialogFilterVisibleChange",function(u){return b(m),P(l.dialogFilterVisible,u)||(l.dialogFilterVisible=u),E(u)})("isInitDialogFilterVisibleChange",function(u){return b(m),P(l.isInitDialogFilterVisible,u)||(l.isInitDialogFilterVisible=u),E(u)}),M("filterConfirmed",function(){return b(m),E(l.onFilterOKEvent())}),f(1,Ri,35,10,"ng-template",null,0,s)(3,Vi,11,6,"ng-template",null,1,s),i()}r&2&&(c("pageTitle",l.store.data().pageTitle)("isFilterable",!0),q("isDialogFilterVisible",l.dialogFilterVisible)("isInitDialogFilterVisible",l.isInitDialogFilterVisible))},dependencies:[re,H,K,ce,se,le,Ee,$,Q,U,J,X,Z,ue,de,me,pe,be,it,fe,_e],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var It=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-report-comparative-balance"]],decls:3,vars:0,template:function(r,l){r&1&&(n(0,"p"),o(1,"report-comparative-balance works!"),i(),o(2,`
2
- ,
3
- `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Dt=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-report-cash-flow"]],decls:3,vars:0,template:function(r,l){r&1&&(n(0,"p"),o(1,"report-cash-flow works!"),i(),o(2,`
4
- ,
5
- `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Ft=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-report-trial-balance"]],decls:3,vars:0,template:function(r,l){r&1&&(n(0,"p"),o(1,"report-trial-balance works!"),i(),o(2,`
6
- ,
7
- `))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return e})();var Po=[{path:"",redirectTo:"general-ledger",pathMatch:"full"},{path:"",children:[{path:"general-ledger",component:St},{path:"income-statement",component:vt},{path:"balance-sheet",component:Et},{path:"comparative-balance",component:It},{path:"trial-balance",component:Ft},{path:"cash-flow",component:Dt}]}];export{Po as REPORTS_ROUTES};
package/chunk-7V4AFAU5.js DELETED
@@ -1 +0,0 @@
1
- import{a as c}from"./chunk-KLKIGY44.js";import{g as E}from"./chunk-YNI2HWIV.js";import"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import"./chunk-OVJSBJBH.js";import"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import{a as C}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{s as v}from"./chunk-SJTXIIX5.js";import{Ic as _,Tb as o,Ub as r,Zb as u,cc as f,dc as g,ha as i,mc as x,pa as a,qa as m,tb as p,uc as d,zb as l}from"./chunk-2VF35PRV.js";import"./chunk-EQDQRRRY.js";function M(e,S){if(e&1){let t=u();o(0,"div",2)(1,"button",3),f("click",function(){a(t);let s=g();return m(s.onMigrate())}),x(2,"Migrate"),r()()}}var V=(()=>{class e{constructor(){this.migrateService=i(c),this.toastr=i(C)}onMigrate(){this.migrateService.migrateExpenseAccount().subscribe(t=>{this.toastr.success(t.message,"Migration Successful")})}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-expense-account"]],features:[d([c])],decls:3,vars:0,consts:[["content",""],["pageTitle","Expense Account"],[1,"container","my-2"],[1,"btn","btn-primary",3,"click"]],template:function(n,s){n&1&&(o(0,"app-main-panel",1),l(1,M,3,0,"ng-template",null,0,_),r())},dependencies:[E,v],encapsulation:2})}}return e})();export{V as ExpenseAccountComponent};
package/chunk-CAI423H5.js DELETED
@@ -1 +0,0 @@
1
- import{a as p}from"./chunk-KLKIGY44.js";import{g as C}from"./chunk-YNI2HWIV.js";import"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import"./chunk-OVJSBJBH.js";import"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import{a as x}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{s as b}from"./chunk-SJTXIIX5.js";import{Ic as d,Tb as r,Ub as o,Zb as g,cc as c,dc as m,ha as a,mc as u,pa as l,qa as s,tb as _,uc as M,zb as f}from"./chunk-2VF35PRV.js";import"./chunk-EQDQRRRY.js";function v(t,S){if(t&1){let e=g();r(0,"div",2)(1,"button",3),c("click",function(){l(e);let i=m();return s(i.onMigrate())}),u(2," Migrate "),o(),r(3,"button",4),c("click",function(){l(e);let i=m();return s(i.onFormat())}),u(4,"Format"),o()()}}var V=(()=>{class t{constructor(){this.migrateService=a(p),this.toastr=a(x)}onMigrate(){this.migrateService.migrateManualJournal().subscribe(e=>{this.toastr.success(e.message,"Migration Successful")})}onFormat(){this.migrateService.formatManualJournal().subscribe(e=>{this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=_({type:t,selectors:[["app-manual-journal"]],features:[M([p])],decls:3,vars:0,consts:[["content",""],["pageTitle","Manual Journal"],[1,"container","my-2"],[1,"btn","btn-primary","me-2",3,"click"],[1,"btn","btn-danger",3,"click"]],template:function(n,i){n&1&&(r(0,"app-main-panel",1),f(1,v,5,0,"ng-template",null,0,d),o())},dependencies:[C,b],encapsulation:2})}}return t})();export{V as ManualJournalComponent};
package/chunk-DDBPJDR6.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-EQDQRRRY.js";var o=[{path:"",redirectTo:"tax-account",pathMatch:"full"},{path:"tax-account",loadComponent:()=>import("./chunk-PMLVFBAT.js").then(t=>t.TaxAccountComponent)},{path:"chart-of-account",loadComponent:()=>import("./chunk-UFS2HLAY.js").then(t=>t.ChartOfAccountComponent)},{path:"manual-journal",loadComponent:()=>import("./chunk-CAI423H5.js").then(t=>t.ManualJournalComponent)},{path:"payment-account",loadComponent:()=>import("./chunk-NWVWD4IE.js").then(t=>t.PaymentAccountComponent)},{path:"expense-account",loadComponent:()=>import("./chunk-7V4AFAU5.js").then(t=>t.ExpenseAccountComponent)}];export{o as MIGRATE_ROUTES};
package/chunk-DXCBV3NP.js DELETED
@@ -1 +0,0 @@
1
- import{a as Ve,b as Ge,c as je}from"./chunk-DWTUKOMR.js";import{a as Ue,b as qe,c as We,d as ze,e as He,f as Ke}from"./chunk-CEMQLY34.js";import{a as $e,b as Le}from"./chunk-VYTUB2DV.js";import{a as Q,b as X}from"./chunk-I7T4W6G2.js";import"./chunk-GHZLR44M.js";import{a as Ae}from"./chunk-MEKP6D5H.js";import{c as Ie,d as Fe}from"./chunk-F6SXKAYF.js";import{b as Me,c as we,d as Be,e as Ne,f as Pe,g as Oe,h as ke,l as Re}from"./chunk-MS3UTNX6.js";import{g as De,h as Je}from"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as H,b as K}from"./chunk-G7MS6UI4.js";import{g as J}from"./chunk-YNI2HWIV.js";import{f as W,g as z}from"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import{t as q,u as D}from"./chunk-OVJSBJBH.js";import{b as O,c as ie,e as N,f as ve,i as G,k as xe,l as he,m as Ce,o as j,r as $,t as L,u as U}from"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import{ga as oe,ka as Te}from"./chunk-35EULUGT.js";import{d as be,k as Se}from"./chunk-LUH5EEUM.js";import{a as ye,d as Ee}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{j as ge,m as fe,r as _e,s as B}from"./chunk-SJTXIIX5.js";import{Fa as S,Fc as te,Gc as ne,Ic as d,Jb as p,Mb as pe,Ob as Z,Pb as y,Rb as E,Sb as T,Tb as i,Ub as n,Uc as R,Vb as m,Z as V,Zb as M,ba as le,cc as w,dc as u,fb as a,ha as _,lb as me,mc as o,nc as v,pa as C,qa as b,rc as ce,sc as ue,tb as A,tc as se,uc as de,vc as ee,wc as k,zb as f}from"./chunk-2VF35PRV.js";import{a as I,b as F}from"./chunk-EQDQRRRY.js";var P=(()=>{class t{#e=_(Ee);fetchLoaderConfiguration(){return this.#e.get("","api/SetupLoader/Load")}updateAccountingIntegrationConfiguration(e){return this.#e.post(void 0,"/api/setup/SubmitConfig",e)}fetchOpeningBalanceFormConfiguration(){return this.#e.get("","/api/setup/OpeningBalance/Form")}fetchAPICredential(){let e=localStorage.getItem("AUTH_SUB_DOMAIN");if(!e)throw new Error("Domain not found in local storage");return this.#e.get("","/API/AccountConfig",{POSDomain:e})}formatJournal(e){return this.#e.post("","/api/setup/formatdata/clearjournal",{domain:e})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=le({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Qe=t=>({"active-state":t}),Xe=t=>({"text-white":t});function at(t,l){if(t&1){let e=M();i(0,"div",4)(1,"a",5),o(2,"Cancel"),n(),i(3,"p-button",6),w("click",function(){C(e);let c=u();return b(c.updateAccountingIntegration())}),n()()}}function lt(t,l){if(t&1&&(i(0,"p-tab",9),o(1),n()),t&2){let e=l.$implicit,r=l.$index;p("value",r),a(),v(e)}}function mt(t,l){if(t&1&&(i(0,"div",39)(1,"h3",40),o(2," End Of Shift "),n()()),t&2){let e=u(4);p("ngClass",k(2,Qe,e.form.controls.posIntegration.value.createJournalTriggers===0)),a(),p("ngClass",k(4,Xe,e.form.controls.posIntegration.value.createJournalTriggers===0))}}function pt(t,l){if(t&1&&(i(0,"div",39)(1,"h3",40),o(2," Every "),n()()),t&2){let e=u(4);p("ngClass",k(2,Qe,e.form.controls.posIntegration.value.createJournalTriggers===1)),a(),p("ngClass",k(4,Xe,e.form.controls.posIntegration.value.createJournalTriggers===1))}}function ct(t,l){if(t&1&&f(0,mt,3,6,"div",39)(1,pt,3,6,"div",39),t&2){let e,r=u().$implicit;Z((e=r.key)===0?0:e===1?1:-1)}}function ut(t,l){t&1&&(i(0,"h4"),o(1,"Suitable for Cash Sales (Retail & FnB)"),n(),i(2,"p"),o(3," One Journal is generated for all transaction happening within a register open - close period "),n())}function st(t,l){t&1&&(i(0,"h4"),o(1,"Every"),n(),i(2,"p"),o(3," Suitable for Credit Sales (Wholesale) Journal is generated for each transaction "),n())}function dt(t,l){if(t&1){let e=M();i(0,"div",13),m(1,"p-radiobutton",37),i(2,"p-card",38),w("click",function(){C(e);let c=u(2);return b(c.changeJournalType())}),f(3,ct,2,1,"ng-template",null,2,d)(5,ut,4,0)(6,st,4,0),n()()}if(t&2){let e,r=l.$implicit;a(),p("inputId",r.value)("value",r.key),a(4),Z((e=r.key)===0?5:e===1?6:-1)}}function gt(t,l){if(t&1&&(i(0,"div",31),m(1,"p-radiobutton",41),i(2,"label",42),o(3),n()()),t&2){let e=l.$implicit;a(),p("value",e.key)("inputId",e.value),a(),p("for",e.value),a(),v(e.value)}}function ft(t,l){if(t&1&&(i(0,"div",31),m(1,"p-radiobutton",43),i(2,"label",42),o(3),n()()),t&2){let e=l.$implicit;a(),p("value",e.key)("inputId",e.value),a(),p("for",e.value),a(),v(e.value)}}function _t(t,l){if(t&1&&(i(0,"div",31),m(1,"p-radiobutton",44),i(2,"label",42),o(3),n()()),t&2){let e=l.$implicit;a(),p("value",e.key)("inputId",e.value),a(),p("for",e.value),a(),v(e.value)}}function vt(t,l){if(t&1&&(i(0,"div",31),m(1,"p-radiobutton",45),i(2,"label",42),o(3),n()()),t&2){let e=l.$implicit;a(),p("value",e.key)("inputId",e.value),a(),p("for",e.value),a(),v(e.value)}}function xt(t,l){if(t&1&&(i(0,"div",7)(1,"p-tabs",8)(2,"p-tablist"),E(3,lt,2,2,"p-tab",9,y),n(),i(5,"p-tabpanels")(6,"p-tabpanel",9)(7,"h4"),o(8,"Integration with POS"),n(),i(9,"p"),o(10,"Generate Journal"),n(),i(11,"div",10)(12,"div",11)(13,"div",12),E(14,dt,7,3,"div",13,y),n()()(),m(16,"hr"),i(17,"div",14)(18,"h3"),o(19,"Journal Generate"),n(),i(20,"p"),o(21,"Configure generate transaction"),n(),i(22,"div",12)(23,"div",15)(24,"div",16)(25,"div",15)(26,"div",17)(27,"label",18),o(28,"Generate EOD Expense Journal"),n(),m(29,"p-toggleswitch",19),n()(),m(30,"div",15),i(31,"div",15)(32,"div",17)(33,"label",18),o(34,"Generate Outlet Delivery Journal"),n(),m(35,"p-toggleswitch",20),n()(),m(36,"div",15),i(37,"div",15)(38,"div",17)(39,"label",18),o(40,"Generate Payment Discount Journal On Payment"),n(),m(41,"p-toggleswitch",21),n()()()()()()(),i(42,"p-tabpanel",22)(43,"div",23)(44,"h3"),o(45,"Accounting Numbering"),n(),i(46,"p"),o(47,"Configure numbering format and rule for your accounting"),n(),i(48,"div",12)(49,"div",15)(50,"div",16)(51,"div",15)(52,"div",17)(53,"label",24),o(54,"Digit"),n(),m(55,"p-inputnumber",25),n()(),m(56,"div",15),i(57,"div",15)(58,"div",17)(59,"label",26),o(60,"Seed"),n(),m(61,"p-inputnumber",27),n()(),i(62,"div",15)(63,"div",17)(64,"label",28),o(65,"Last Number"),n(),m(66,"p-inputnumber",29),n()(),i(67,"div",15)(68,"div",17)(69,"label",18),o(70,"Reset Every"),n(),i(71,"div",30),E(72,gt,4,4,"div",31,y),n()()(),i(74,"div",15)(75,"div",17)(76,"label",18),o(77,"Format"),n(),m(78,"p-select",32),n()()()()()()(),i(79,"p-tabpanel",33)(80,"div",23)(81,"h3"),o(82,"Report"),n(),i(83,"p"),o(84,"Configure report behavior"),n(),i(85,"div",12)(86,"div",15)(87,"div",16)(88,"div",15)(89,"div",17)(90,"label",18),o(91,"Audit Journal Transaction"),n(),i(92,"div",30),E(93,ft,4,4,"div",31,y),n()()(),m(95,"div",15),i(96,"div",15)(97,"div",17)(98,"label",18),o(99,"Accounting For Treatment"),n(),i(100,"div",30),E(101,_t,4,4,"div",31,y),n()()(),m(103,"div",15),i(104,"div",15)(105,"div",17)(106,"label",18),o(107,"Configure Report Access Control in COA"),n(),i(108,"div",30),E(109,vt,4,4,"div",31,y),n()()()()()()()(),i(111,"p-tabpanel",34)(112,"div",23)(113,"h3"),o(114,"Note"),n(),i(115,"p"),o(116,"Configure show note"),n(),i(117,"div",12)(118,"div",15)(119,"div",16)(120,"div",15)(121,"div",17)(122,"label",18),o(123,"Note Required On Journal"),n(),m(124,"p-toggleswitch",35),n()(),m(125,"div",15),i(126,"div",15)(127,"div",17)(128,"label",18),o(129,"Trial Balance Footer Visible"),n(),m(130,"p-toggleswitch",36),n()(),m(131,"div",15),n()()()()()()()()),t&2){let e,r,c,s,h,g,x=u();a(),p("value",0)("formGroup",x.form),a(2),T(x.tabs()),a(3),p("value",0),a(8),T((e=x.accountingIntegration())==null||e.options==null?null:e.options.journalType),a(28),p("value",1),a(30),T((r=x.accountingIntegration())==null||r.options==null?null:r.options.resetPeriods),a(6),p("options",(c=x.accountingIntegration())==null||c.options==null?null:c.options.monthlyResetPeriodFormat),a(),p("value",2),a(14),T((s=x.accountingIntegration())==null||s.options==null?null:s.options.auditType),a(8),T((h=x.accountingIntegration())==null||h.options==null?null:h.options.generatePrepaidJournal),a(8),T((g=x.accountingIntegration())==null||g.options==null?null:g.options.entityAccess),a(2),p("value",3)}}var Ye=(()=>{class t{constructor(){this.accountingSetupService=_(P),this.fb=_($).nonNullable,this.tabs=S(["Pos","Numbering","Report","Note"]),this.journalType=S(0),this.accountingIntegration=S(null)}ngOnInit(){this.initializeForm(),this.loadAccountingConfiguration()}initializeForm(){this.form=this.fb.group({posIntegration:this.createPosIntegrationGroup(),number:this.createNumberGroup(),report:this.createReportGroup(),journalGenerate:this.createJournalGenerateGroup(),note:this.createNoteGroup()})}createPosIntegrationGroup(){return this.fb.group({createJournalTriggers:this.fb.control(0)})}createNumberGroup(){return this.fb.group({seed:this.fb.control(""),digit:this.fb.control(""),resetEvery:this.fb.control(""),monthlyFormat:this.fb.control(""),lastNumber:this.fb.control(""),lastModified:this.fb.control("")})}createReportGroup(){return this.fb.group({accountingAuditType:this.fb.control(""),accountingEntityAccess:this.fb.control(""),generatePrepaidJournal:this.fb.control("")})}createJournalGenerateGroup(){return this.fb.group({eodExpenseJournal:this.fb.control(""),transferOrder:this.fb.control(""),paymentDiscount:this.fb.control("")})}createNoteGroup(){return this.fb.group({noteMandatory:this.fb.control(""),trialBalanceFooterVisible:this.fb.control("")})}changeJournalType(){let e=this.journalType()===0?1:0;this.journalType.set(e),this.accountingIntegration.update(r=>F(I({},r),{form:F(I({},r.form),{posIntegration:F(I({},r.form.posIntegration),{createJournalTriggers:e})})})),this.form.controls.posIntegration.patchValue({createJournalTriggers:e})}loadAccountingConfiguration(){this.accountingSetupService.fetchLoaderConfiguration().pipe(V(e=>{this.accountingIntegration.set(e);let r=e.form.posIntegration.createJournalTriggers;this.journalType.set(r),this.form.get("posIntegration.createJournalTriggers")?.setValue(r),this.form.patchValue(e.form)})).subscribe()}updateAccountingIntegration(){let e={form:this.form.getRawValue()};this.accountingSetupService.updateAccountingIntegrationConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-accounting-integration"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Accounting Integration"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"click"],[1,"overflow-y-auto"],[3,"value","formGroup"],[3,"value"],["formGroupName","posIntegration",1,"row"],[1,"col-8"],[1,"row"],[1,"col"],["formGroupName","journalGenerate",1,"px-3"],[1,"col-6"],[1,"row","row-gap-3"],[1,"d-flex","flex-column"],["for",""],["formControlName","eodExpenseJournal"],["formControlName","transferOrder"],["formControlName","paymentDiscount"],["formGroupName","number",3,"value"],[1,"px-3"],["for","digit"],["inputId","digit","formControlName","digit"],["for","seed"],["inputId","seed","formControlName","seed"],["for","lastNumber"],["inputId","lastNumber","formControlName","lastNumber"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","align-items-center","gap-2"],["formControlName","monthlyFormat","optionValue","key","optionLabel","value",3,"options"],["formGroupName","report",3,"value"],["formGroupName","note",3,"value"],["formControlName","noteMandatory"],["formControlName","trialBalanceFooterVisible"],["styleClass","d-none","name","createJournalTriggers","formControlName","createJournalTriggers",3,"inputId","value"],["styleClass","h-100",3,"click"],[1,"d-flex","justify-content-center","inactive-state","text-white","py-2",3,"ngClass"],[1,"m-0",3,"ngClass"],["name","resetEvery","formControlName","resetEvery",3,"value","inputId"],[1,"ml-2","m-0",3,"for"],["name","accountingAuditType","formControlName","accountingAuditType",3,"value","inputId"],["name","generatePrepaidJournal","formControlName","generatePrepaidJournal",3,"value","inputId"],["name","accountingEntityAccess","formControlName","accountingEntityAccess",3,"value","inputId"]],template:function(r,c){r&1&&(i(0,"app-main-panel",3),f(1,at,4,0,"ng-template",null,0,d)(3,xt,132,7,"ng-template",null,1,d),n())},dependencies:[B,ge,Ke,He,ze,We,Ue,qe,J,K,H,Oe,Pe,U,N,ve,he,j,Ce,D,Je,De,Le,$e,Se,be,z,W,Ne,Be],styles:["[_nghost-%COMP%]{display:block}.inactive-state[_ngcontent-%COMP%]{background-color:#e5e5e5}.active-state[_ngcontent-%COMP%]{background-color:#5680e9}"],changeDetection:0})}}return t})();var ht=()=>({width:"100%",height:"calc(100vh - 300px)"}),Ct=()=>[];function bt(t,l){t&1&&(i(0,"div"),m(1,"p-button",5),n())}function St(t,l){t&1&&(i(0,"tr")(1,"th"),o(2,"Account Name"),n(),i(3,"th",17),o(4,"Debit"),n(),i(5,"th",17),o(6,"Credit"),n()())}function yt(t,l){if(t&1){let e=M();i(0,"tr")(1,"td"),o(2),n(),i(3,"td")(4,"input",18),w("ngModelChange",function(c){let s=C(e).rowIndex,h=u(2).$index,g=u(2);return b(g.dfsfsd(c,h,s,"debitAmount"))}),n()(),i(5,"td")(6,"input",18),w("ngModelChange",function(c){let s=C(e).rowIndex,h=u(2).$index,g=u(2);return b(g.dfsfsd(c,h,s,"creditAmount"))}),n()()()}if(t&2){let e=l.$implicit;a(2),v(e.accountName),a(2),p("ngModel",e.debitAmount),a(2),p("ngModel",e.creditAmount)}}function Et(t,l){if(t&1&&(i(0,"p-table",14),f(1,St,7,0,"ng-template",15)(2,yt,7,3,"ng-template",16),n()),t&2){let e=u().$implicit;p("value",e.items)}}function Tt(t,l){if(t&1&&(i(0,"div",7)(1,"div",8)(2,"div",12)(3,"h4"),o(4),n()(),i(5,"div"),f(6,Et,3,1,"p-table",13),n()()()),t&2){let e=l.$implicit;a(4),v(e.name),a(2),p("ngIf",e.items.length)}}function It(t,l){if(t&1&&(i(0,"tr")(1,"td")(2,"p",19),o(3,"Total"),n()(),i(4,"td",17)(5,"p",19),o(6),te(7,"number"),n()(),i(8,"td",17)(9,"p",19),o(10),te(11,"number"),n()()()),t&2){let e=u(2);a(6),v(ne(7,2,e.subTotalDebit())),a(4),v(ne(11,4,e.subTotalCredit()))}}function Ft(t,l){if(t&1&&(i(0,"p-card",6)(1,"div",7)(2,"div",8),m(3,"p-datepicker",9),n()()(),m(4,"br"),i(5,"p-card")(6,"p-scroll-panel")(7,"div",10),E(8,Tt,7,2,"div",7,y),n()(),i(10,"p-table",11),f(11,It,12,6,"ng-template",null,2,d),n()()),t&2){let e=u();a(3),p("ngModel",e.date()),a(3),pe(ee(4,ht)),a(2),T(e.nonEmptyForms()),a(2),p("value",ee(5,Ct))}}var Ze=(()=>{class t{constructor(){this.accSetupService=_(P),this.openingBalanceForm=S(null),this.date=S(new Date),this.messageService=_(oe),this.subTotalDebit=R(()=>this.openingBalanceForm()?this.openingBalanceForm().form.reduce((e,r)=>e+r.items.reduce((c,s)=>c+s.debitAmount,0),0):0),this.subTotalCredit=R(()=>this.openingBalanceForm()?this.openingBalanceForm().form.reduce((e,r)=>e+r.items.reduce((c,s)=>c+s.creditAmount,0),0):0),this.totalItemsCount=R(()=>this.openingBalanceForm()?this.openingBalanceForm().form.reduce((e,r)=>e+r.items.length,0):0),this.nonEmptyForms=R(()=>{let e=["Asset","Liability","Equity","Revenue","Expense"];return this.openingBalanceForm()?this.openingBalanceForm().form.filter(r=>r.items.length>0||e.includes(r.name)):[]})}ngOnInit(){this.loadFormData(),setInterval(()=>{this.subTotalCredit()!==this.subTotalDebit()&&this.messageService.add({severity:"warn",summary:"Mismatch Detected",detail:`The total Debit and Credit amounts are not balanced. Difference: ${this.subTotalCredit()-this.subTotalDebit()}`})},1e3)}loadFormData(){this.accSetupService.fetchOpeningBalanceFormConfiguration().pipe(Ae("response"),V(e=>{this.openingBalanceForm.set(e)})).subscribe()}dfsfsd(e,r,c,s){let h=this.openingBalanceForm().form.map((g,x)=>x===r?F(I({},g),{items:g.items.map((ae,nt)=>nt===c?F(I({},ae),{[s]:e}):ae)}):g).filter(g=>g!==null);this.openingBalanceForm.update(g=>F(I({},g),{form:h})),console.log(this.openingBalanceForm())}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-acc-opening-balance-form"]],features:[de([oe])],decls:6,vars:0,consts:[["actionButton",""],["content",""],["footer",""],["pageTitle","Opening Balance Form"],["preventOpenDuplicates",""],["label","Submit"],["header","Opening Balance Date"],[1,"row"],[1,"col"],[3,"ngModel"],[1,"d-flex","flex-column","gap-4"],[3,"value"],[1,"mb-2"],["dataKey","id","stripedRows","",3,"value",4,"ngIf"],["dataKey","id","stripedRows","",3,"value"],["pTemplate","header"],["pTemplate","body"],[2,"width","200px"],["type","number",1,"form-control",3,"ngModelChange","ngModel"],[1,"fw-semibold","fs-5"]],template:function(r,c){r&1&&(i(0,"app-main-panel",3),f(1,bt,2,0,"ng-template",null,0,d)(3,Ft,13,6,"ng-template",null,1,d),n(),m(5,"p-toast",4))},dependencies:[J,K,H,Te,B,fe,_e,we,Me,Re,ke,Fe,Ie,L,O,xe,N,G,D,je,z,W],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function wt(t,l){t&1&&(i(0,"button",4),o(1,"Save"),n())}function Bt(t,l){t&1&&(i(0,"div",8)(1,"h3",12),o(2,"Account"),n(),i(3,"small",13),o(4,"Configure Client ID and Client Secret"),n()())}function Nt(t,l){t&1&&(i(0,"div",5)(1,"p-panel"),f(2,Bt,5,0,"ng-template",null,2,d),i(4,"div",6)(5,"div",7)(6,"div",8)(7,"label",9),o(8,"Client ID"),n(),m(9,"input",10),n()(),i(10,"div",7)(11,"div",8)(12,"label",9),o(13,"Client Secret"),n(),m(14,"input",11),n()()()()())}var et=(()=>{class t{constructor(e){this.fb=e,this.setupService=_(P)}ngOnInit(){this.initForm()}initForm(){this.setupService.fetchAPICredential().subscribe(e=>{this.credentialForm=this.fb.group({clientId:[e.clientID,ie.required],clientSecret:[e.clientSecret,ie.required]})})}get clientIdControl(){return this.credentialForm.get("clientId")}get clientSecretControl(){return this.credentialForm.get("clientSecret")}saveCredentials(){if(this.credentialForm.invalid){this.credentialForm.markAllAsTouched();return}let e=this.credentialForm.value;console.log("Saving credentials:",e)}static{this.\u0275fac=function(r){return new(r||t)(me($))}}static{this.\u0275cmp=A({type:t,selectors:[["app-api-credential"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","API Credential"],[1,"btn","btn-primary","rounded"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col-6"],[1,"d-flex","flex-column"],["for","outlet"],["type","text","pInputText","","formControlName","clientIdControl"],["type","text","pInputText",""],[1,"mb-0","fw-bold"],[1,"fst-italic","text-muted"]],template:function(r,c){r&1&&(i(0,"app-main-panel",3),f(1,wt,2,0,"ng-template",null,0,d)(3,Nt,15,0,"ng-template",null,1,d),n())},dependencies:[B,U,O,N,j,D,q,X,Q,J],encapsulation:2})}}return t})();function Dt(t,l){if(t&1){let e=M();i(0,"button",4),w("click",function(){C(e);let c=u();return b(c.onFormatJournal())}),o(1," Format "),n()}}function Jt(t,l){t&1&&(i(0,"div",12)(1,"h3",13),o(2,"Journal Configuration"),n(),i(3,"small",14),o(4," Enter your account information to format journal entries "),n()())}function Pt(t,l){if(t&1){let e=M();i(0,"div",5)(1,"p-panel"),f(2,Jt,5,0,"ng-template",null,2,d),i(4,"div",6)(5,"div",7)(6,"p-floatlabel",8)(7,"input",9),se("ngModelChange",function(c){C(e);let s=u();return ue(s.subdomain,c)||(s.subdomain=c),b(c)}),n(),i(8,"label",10),o(9,"Subdomain"),n()(),i(10,"small",11),o(11,"Enter your account subdomain (e.g., mycompany.dealpos.net)"),n()()()()()}if(t&2){let e=u();a(7),ce("ngModel",e.subdomain)}}var tt=(()=>{class t{constructor(){this.setupService=_(P),this.subdomain=S(""),this.toastrService=_(ye)}onFormatJournal(){if(!this.subdomain()){this.toastrService.error("Please enter a subdomain","Error");return}this.setupService.formatJournal(this.subdomain()).subscribe({next:e=>{this.toastrService.success(e.message,"Success")}})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-format-jurnal"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["pageTitle","Format Journal"],[1,"btn","btn-primary","rounded",3,"click"],[1,"d-flex","flex-column","row-gap-4"],[1,"row","mt-6"],[1,"col-12"],["variant","on"],["pInputText","","id","subdomain","autocomplete","off",1,"w-100",3,"ngModelChange","ngModel"],["for","subdomain"],[1,"text-muted","fst-italic",2,"font-size","12px"],[1,"d-flex","flex-column"],[1,"mb-0","fw-bold"],[1,"fst-italic","text-muted"]],template:function(r,c){r&1&&(i(0,"app-main-panel",3),f(1,Dt,2,0,"ng-template",null,0,d)(3,Pt,12,1,"ng-template",null,1,d),n())},dependencies:[B,L,O,N,G,D,q,J,X,Q,Ge,Ve],encapsulation:2})}}return t})();var ai=[{path:"",redirectTo:"accounting-integration",pathMatch:"full"},{path:"",children:[{path:"accounting-integration",component:Ye},{path:"opening-balance-form",component:Ze},{path:"api-crendetial",component:et},{path:"format-journal",component:tt}]}];export{ai as ACCOUNTING_SETUP_ROUTES};
package/chunk-E2VJWAI2.js DELETED
@@ -1 +0,0 @@
1
- import{a as H}from"./chunk-DYZT7UKM.js";import{a as L}from"./chunk-MEKP6D5H.js";import{h as M,j as V,k as N,l as U}from"./chunk-MS3UTNX6.js";import"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{g as P}from"./chunk-YNI2HWIV.js";import"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import"./chunk-OVJSBJBH.js";import"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{m as k,q as I,r as z,s as D}from"./chunk-SJTXIIX5.js";import{Fa as b,Fc as J,Gc as E,Hc as A,Ic as h,Jb as f,Tb as o,Ub as i,Uc as v,Vb as C,Vc as T,Z as y,Zb as S,cc as w,dc as d,fb as s,ha as j,mc as r,nc as p,pa as _,qa as g,tb as R,zb as x}from"./chunk-2VF35PRV.js";import{a as m,b as c}from"./chunk-EQDQRRRY.js";function O(a,u){if(a&1){let e=S();o(0,"button",6),w("click",function(){_(e);let t=d(2);return g(t.onCreateJournal())}),r(1," Generate Journal "),i()}}function G(a,u){if(a&1&&x(0,O,2,0,"button",5),a&2){let e=d();f("ngIf",e.selectedItems()&&e.selectedItems().length>0)}}function K(a,u){a&1&&(o(0,"tr")(1,"th",9),C(2,"p-tableHeaderCheckbox"),i(),o(3,"th"),r(4,"Outlet"),i(),o(5,"th"),r(6,"Number"),i(),o(7,"th"),r(8,"Date"),i(),o(9,"th"),r(10,"Adjustment Qty"),i(),o(11,"th"),r(12,"Type"),i(),o(13,"th"),r(14,"State"),i(),o(15,"th"),r(16,"Note"),i()())}function q(a,u){if(a&1&&(o(0,"tr")(1,"td"),C(2,"p-tableCheckbox",10),i(),o(3,"td"),r(4),i(),o(5,"td"),r(6),i(),o(7,"td"),r(8),J(9,"date"),i(),o(10,"td"),r(11),J(12,"number"),i(),o(13,"td"),r(14),i(),o(15,"td"),r(16),i(),o(17,"td"),r(18),i()()),a&2){let e=u.$implicit;s(2),f("value",e),s(2),p(e.outlet),s(2),p(e.number),s(2),p(A(9,8,e.date,"d MMM y")),s(3),p(E(12,11,e.quantitySUM)),s(3),p(e.type),s(2),p(e.state),s(2),p(e.note)}}function F(a,u){if(a&1){let e=S();o(0,"p-table",8),w("onLazyLoad",function(t){_(e);let n=d(2);return g(n.onLazyLoad(t))})("onRowSelect",function(t){_(e);let n=d(2);return g(n.onRowSelect(t))})("onRowUnselect",function(t){_(e);let n=d(2);return g(n.onRowUnselect(t))}),x(1,K,17,0,"ng-template",null,2,h)(3,q,19,13,"ng-template",null,3,h),i()}if(a&2){let e=d(2);f("value",e.adjustmentJournal().data)("scrollable",!0)("scrollHeight","calc(100vh - 200px)")("paginator",!0)("rows",e.pageData().PageSize)("totalRecords",e.adjustmentJournal().totalCount)("lazy",!0)}}function Q(a,u){if(a&1&&x(0,F,5,7,"p-table",7),a&2){let e=d();f("ngIf",e.adjustmentJournal())}}var re=(()=>{class a{constructor(){this.generateJournalService=j(H),this.adjustmentJournal=b(null),this.pageData=b({PageNumber:1,PageSize:10}),this.selectedItems=v(()=>this.adjustmentJournal()?.data.filter(e=>e.checked)||[]),T(()=>{this.pageData()&&this.fetchAdjustmentJournal()})}fetchAdjustmentJournal(){let e={PageSize:this.pageData().PageSize,PageNumber:this.pageData().PageNumber};this.generateJournalService.getAdjustmentJournal(e).pipe(y(l=>{this.adjustmentJournal.update(t=>c(m({},t),{data:l.data.map(n=>c(m({},n),{checked:!1})),totalCount:+l.totalCount}))}),L("AR Collection")).subscribe()}onLazyLoad(e){this.pageData.set({PageNumber:e.first/e.rows+1,PageSize:e.rows})}onRowSelect(e){let l=e.data;this.adjustmentJournal.update(t=>c(m({},t),{data:t.data.map(n=>n.id===l.id?c(m({},n),{checked:!0}):n)}))}onRowUnselect(e){let l=e.data;Array.isArray(l)?this.adjustmentJournal.update(t=>c(m({},t),{data:t.data.map((n,B)=>n.id===l[B].id?c(m({},n),{checked:!n.checked}):n)})):this.adjustmentJournal.update(t=>c(m({},t),{data:t.data.map(n=>n.id===l.id?c(m({},n),{checked:!n.checked}):n)}))}onCreateJournal(){let l=this.selectedItems().map(t=>t.id);this.generateJournalService.createAdjustmentJournal(l).subscribe(t=>{console.log("Journal created successfully:",t)})}static{this.\u0275fac=function(l){return new(l||a)}}static{this.\u0275cmp=R({type:a,selectors:[["app-adjustment-journal"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Adjustment"],["class","btn btn-primary rounded",3,"click",4,"ngIf"],[1,"btn","btn-primary","rounded",3,"click"],["dataKey","id",3,"value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy","onLazyLoad","onRowSelect","onRowUnselect",4,"ngIf"],["dataKey","id",3,"onLazyLoad","onRowSelect","onRowUnselect","value","scrollable","scrollHeight","paginator","rows","totalRecords","lazy"],[2,"width","4rem"],[3,"value"]],template:function(l,t){l&1&&(o(0,"app-main-panel",4),x(1,G,1,1,"ng-template",null,0,h)(3,Q,1,1,"ng-template",null,1,h),i())},dependencies:[P,U,M,V,N,D,k,z,I],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return a})();export{re as AdjustmentJournalComponent};
package/chunk-EBTC6B2W.js DELETED
@@ -1,2 +0,0 @@
1
- import{a as R,b as V,c as ot,d as it,t as Q,u as at,w as pe,x as ee}from"./chunk-SJTXIIX5.js";import{$ as E,$a as S,Aa as de,D as ke,Eb as nt,Fb as fe,Ga as He,Ha as ue,Ia as $e,J as Le,Ja as F,La as he,Ma as Xe,Na as Ge,Oa as Je,Pc as rt,Q as xe,Qc as st,Ra as B,Sa as P,Ta as N,Ua as Ye,Va as qe,Wa as Ze,X as je,Xa as We,Ya as Ke,Z as Ue,Za as Qe,_a as et,ba as v,d as Ne,ea as T,ga as d,gb as z,ha as w,ia as K,jb as tt,ka as Fe,l as Ce,la as Be,m as j,ma as ze,s as U,xa as Ve,za as I}from"./chunk-2VF35PRV.js";import{a as D,b as Ie,c as Pe}from"./chunk-EQDQRRRY.js";var re=new T(""),ve=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,s,o){return this._findPluginFor(r).addEventListener(e,r,s,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new E(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||n)(d(re),d(I))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})(),H=class{_doc;constructor(t){this._doc=t}manager},te="ng-app-id";function ct(n){for(let t of n)t.remove()}function lt(n,t){let e=t.createElement("style");return e.textContent=n,e}function Lt(n,t,e,r){let s=n.head?.querySelectorAll(`style[${te}="${t}"],link[${te}="${t}"]`);if(s)for(let o of s)o.removeAttribute(te),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function ye(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var Te=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,r,s,o={}){this.doc=e,this.appId=r,this.nonce=s,this.isServer=pe(o),Lt(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let s of e)this.addUsage(s,this.inline,lt);r?.forEach(s=>this.addUsage(s,this.external,ye))}removeStyles(e,r){for(let s of e)this.removeUsage(s,this.inline);r?.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,r,s){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,r){let s=r.get(e);s&&(s.usage--,s.usage<=0&&(ct(s.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ct(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:s}]of this.inline)s.push(this.addElement(e,lt(r,this.doc)));for(let[r,{elements:s}]of this.external)s.push(this.addElement(e,ye(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),this.isServer&&r.setAttribute(te,this.appId),e.appendChild(r)}static \u0275fac=function(r){return new(r||n)(d(R),d(ue),d(he,8),d(F))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})(),me={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},we=/%COMP%/g;var ut="%COMP%",xt=`_nghost-${ut}`,jt=`_ngcontent-${ut}`,Ut=!0,Ft=new T("",{providedIn:"root",factory:()=>Ut});function Bt(n){return jt.replace(we,n)}function zt(n){return xt.replace(we,n)}function ht(n,t){return t.map(e=>e.replace(we,n))}var Re=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,r,s,o,i,c,a,l=null,u=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=l,this.tracingService=u,this.platformIsServer=pe(c),this.defaultRenderer=new $(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===B.ShadowDom&&(r=Ie(D({},r),{encapsulation:B.Emulated}));let s=this.getOrCreateRenderer(e,r);return s instanceof ne?s.applyToHost(e):s instanceof X&&s.applyStyles(),s}getOrCreateRenderer(e,r){let s=this.rendererByCompId,o=s.get(r.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,l=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,m=this.platformIsServer,y=this.tracingService;switch(r.encapsulation){case B.Emulated:o=new ne(a,l,r,this.appId,u,i,c,m,y);break;case B.ShadowDom:return new ge(a,l,e,r,i,c,this.nonce,m,y);default:o=new X(a,l,r,u,i,c,m,y);break}s.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||n)(d(ve),d(Te),d(ue),d(Ft),d(R),d(F),d(I),d(he),d(Ge,8))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})(),$=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,r,s,o){this.eventManager=t,this.doc=e,this.ngZone=r,this.platformIsServer=s,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(me[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(dt(t)?t.content:t).appendChild(e)}insertBefore(t,e,r){t&&(dt(t)?t.content:t).insertBefore(e,r)}removeChild(t,e){e.remove()}selectRootElement(t,e){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new E(-5104,!1);return e||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,r,s){if(s){e=s+":"+e;let o=me[s];o?t.setAttributeNS(o,e,r):t.setAttribute(e,r)}else t.setAttribute(e,r)}removeAttribute(t,e,r){if(r){let s=me[r];s?t.removeAttributeNS(s,e):t.removeAttribute(`${r}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,r,s){s&(z.DashCase|z.Important)?t.style.setProperty(e,r,s&z.Important?"important":""):t.style[e]=r}removeStyle(t,e,r){r&z.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,r){t!=null&&(t[e]=r)}setValue(t,e){t.nodeValue=e}listen(t,e,r,s){if(typeof t=="string"&&(t=V().getGlobalEventTarget(this.doc,t),!t))throw new E(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,s)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function dt(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var ge=class extends ${sharedStylesHost;hostEl;shadowRoot;constructor(t,e,r,s,o,i,c,a,l){super(t,o,i,a,l),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=s.styles;u=ht(s.id,u);for(let y of u){let p=document.createElement("style");c&&p.setAttribute("nonce",c),p.textContent=y,this.shadowRoot.appendChild(p)}let m=s.getExternalStyles?.();if(m)for(let y of m){let p=ye(y,o);c&&p.setAttribute("nonce",c),this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,r){return super.insertBefore(this.nodeOrShadowRoot(t),e,r)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},X=class extends ${sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,r,s,o,i,c,a,l){super(t,o,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s;let u=r.styles;this.styles=l?ht(l,u):u,this.styleUrls=r.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ne=class extends X{contentAttr;hostAttr;constructor(t,e,r,s,o,i,c,a,l){let u=s+"-"+r.id;super(t,e,r,o,i,c,a,l,u),this.contentAttr=Bt(u),this.hostAttr=zt(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let r=super.createElement(t,e);return super.setAttribute(r,this.contentAttr,""),r}};var se=class n extends it{supportsDOMEvents=!0;static makeCurrent(){ot(new n)}onAndCancel(t,e,r,s){return t.addEventListener(e,r,s),()=>{t.removeEventListener(e,r,s)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=Ht();return e==null?null:$t(e)}resetBaseElement(){G=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Q(document.cookie,t)}},G=null;function Ht(){return G=G||document.head.querySelector("base"),G?G.getAttribute("href"):null}function $t(n){return new URL(n,document.baseURI).pathname}var Xt=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||n)};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})(),yt=(()=>{class n extends H{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,s,o){return e.addEventListener(r,s,o),()=>this.removeEventListener(e,r,s,o)}removeEventListener(e,r,s,o){return e.removeEventListener(r,s,o)}static \u0275fac=function(r){return new(r||n)(d(R))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})(),ft=["alt","control","meta","shift"],Gt={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Jt={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},gt=(()=>{class n extends H{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,r,s,o){let i=n.parseEventName(r),c=n.eventCallback(i.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>V().onAndCancel(e,i.domEventName,c,o))}static parseEventName(e){let r=e.toLowerCase().split("."),s=r.shift();if(r.length===0||!(s==="keydown"||s==="keyup"))return null;let o=n._normalizeKey(r.pop()),i="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),i="code."),ft.forEach(l=>{let u=r.indexOf(l);u>-1&&(r.splice(u,1),i+=l+".")}),i+=o,r.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,r){let s=Gt[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),ft.forEach(i=>{if(i!==s){let c=Jt[i];c(e)&&(o+=i+".")}}),o+=s,o===r)}static eventCallback(e,r,s){return o=>{n.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||n)(d(R))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})();function Yt(n,t){return rt(D({rootComponent:n},qt(t)))}function qt(n){return{appProviders:[...en,...n?.providers??[]],platformProviders:Qt}}function Zt(){se.makeCurrent()}function Wt(){return new de}function Kt(){return He(document),document}var Qt=[{provide:F,useValue:at},{provide:$e,useValue:Zt,multi:!0},{provide:R,useFactory:Kt}];var en=[{provide:Fe,useValue:"root"},{provide:de,useFactory:Wt},{provide:re,useClass:yt,multi:!0,deps:[R]},{provide:re,useClass:gt,multi:!0,deps:[R]},Re,Te,ve,{provide:tt,useExisting:Re},{provide:ee,useClass:Xt},[]];var k=class{},J=class{},b=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
2
- `).forEach(e=>{let r=e.indexOf(":");if(r>0){let s=e.slice(0,r),o=e.slice(r+1).trim();this.addHeaderEntry(s,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,r)=>{this.addHeaderEntry(r,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,r])=>{this.setHeaderEntries(e,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,e);let s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...r),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(e):this.headers.set(r,[e])}setHeaderEntries(t,e){let r=(Array.isArray(e)?e:[e]).map(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,r),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var ie=class{encodeKey(t){return Et(t)}encodeValue(t){return Et(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function tn(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var nn=/%(\d[a-f0-9])/gi,rn={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Et(n){return encodeURIComponent(n).replace(nn,(t,e)=>rn[e]??t)}function oe(n){return`${n}`}var M=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new ie,t.fromString){if(t.fromObject)throw new E(2805,!1);this.map=tn(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let r=t.fromObject[e],s=Array.isArray(r)?r.map(oe):[oe(r)];this.map.set(e,s)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(r=>{let s=t[r];Array.isArray(s)?s.forEach(o=>{e.push({param:r,value:o,op:"a"})}):e.push({param:r,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(r=>e+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(oe(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],s=r.indexOf(oe(t.value));s!==-1&&r.splice(s,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var ae=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function sn(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function vt(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function Tt(n){return typeof Blob<"u"&&n instanceof Blob}function wt(n){return typeof FormData<"u"&&n instanceof FormData}function on(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Rt="Content-Type",Mt="Accept",bt="X-Request-URL",_t="text/plain",Dt="application/json",an=`${Dt}, ${_t}, */*`,C=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,r,s){this.url=e,this.method=t.toUpperCase();let o;if(sn(this.method)||s?(this.body=r!==void 0?r:null,o=s):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new b,this.context??=new ae,!this.params)this.params=new M,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||vt(this.body)||Tt(this.body)||wt(this.body)||on(this.body)?this.body:this.body instanceof M?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||wt(this.body)?null:Tt(this.body)?this.body.type||null:vt(this.body)?null:typeof this.body=="string"?_t:this.body instanceof M?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Dt:null}clone(t={}){let e=t.method||this.method,r=t.url||this.url,s=t.responseType||this.responseType,o=t.transferCache??this.transferCache,i=t.body!==void 0?t.body:this.body,c=t.withCredentials??this.withCredentials,a=t.reportProgress??this.reportProgress,l=t.headers||this.headers,u=t.params||this.params,m=t.context??this.context;return t.setHeaders!==void 0&&(l=Object.keys(t.setHeaders).reduce((y,p)=>y.set(p,t.setHeaders[p]),l)),t.setParams&&(u=Object.keys(t.setParams).reduce((y,p)=>y.set(p,t.setParams[p]),u)),new n(e,r,i,{params:u,headers:l,context:m,reportProgress:a,responseType:s,withCredentials:c,transferCache:o})}},A=function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n}(A||{}),L=class{headers;status;statusText;url;ok;type;constructor(t,e=200,r="OK"){this.headers=t.headers||new b,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},ce=class n extends L{constructor(t={}){super(t)}type=A.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},O=class n extends L{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=A.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Y=class extends L{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},cn=200,ln=204;function Me(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,transferCache:n.transferCache}}var St=(()=>{class n{handler;constructor(e){this.handler=e}request(e,r,s={}){let o;if(e instanceof C)o=e;else{let a;s.headers instanceof b?a=s.headers:a=new b(s.headers);let l;s.params&&(s.params instanceof M?l=s.params:l=new M({fromObject:s.params})),o=new C(e,r,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:l,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache})}let i=j(o).pipe(Le(a=>this.handler.handle(a)));if(e instanceof C||s.observe==="events")return i;let c=i.pipe(ke(a=>a instanceof O));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(U(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new E(2806,!1);return a.body}));case"blob":return c.pipe(U(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new E(2807,!1);return a.body}));case"text":return c.pipe(U(a=>{if(a.body!==null&&typeof a.body!="string")throw new E(2808,!1);return a.body}));case"json":default:return c.pipe(U(a=>a.body))}case"response":return c;default:throw new E(2809,!1)}}delete(e,r={}){return this.request("DELETE",e,r)}get(e,r={}){return this.request("GET",e,r)}head(e,r={}){return this.request("HEAD",e,r)}jsonp(e,r){return this.request("JSONP",e,{params:new M().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,r={}){return this.request("OPTIONS",e,r)}patch(e,r,s={}){return this.request("PATCH",e,Me(s,r))}post(e,r,s={}){return this.request("POST",e,Me(s,r))}put(e,r,s={}){return this.request("PUT",e,Me(s,r))}static \u0275fac=function(r){return new(r||n)(d(k))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})();var dn=new T("");function un(n,t){return t(n)}function hn(n,t,e){return(r,s)=>ze(e,()=>t(r,o=>n(o,s)))}var _e=new T(""),De=new T(""),At=new T("",{providedIn:"root",factory:()=>!0});var le=(()=>{class n extends k{backend;injector;chain=null;pendingTasks=w(Ve);contributeToStability=w(At);constructor(e,r){super(),this.backend=e,this.injector=r}handle(e){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(_e),...this.injector.get(De,[])]));this.chain=r.reduceRight((s,o)=>hn(s,o,this.injector),un)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(xe(()=>this.pendingTasks.remove(r)))}else return this.chain(e,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||n)(d(J),d(Be))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})();var fn=/^\)\]\}',?\n/,pn=RegExp(`^${bt}:`,"m");function mn(n){return"responseURL"in n&&n.responseURL?n.responseURL:pn.test(n.getAllResponseHeaders())?n.getResponseHeader(bt):null}var be=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new E(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Ce(r.\u0275loadImpl()):j(null)).pipe(je(()=>new Ne(o=>{let i=r.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((h,f)=>i.setRequestHeader(h,f.join(","))),e.headers.has(Mt)||i.setRequestHeader(Mt,an),!e.headers.has(Rt)){let h=e.detectContentTypeHeader();h!==null&&i.setRequestHeader(Rt,h)}if(e.responseType){let h=e.responseType.toLowerCase();i.responseType=h!=="json"?h:"text"}let c=e.serializeBody(),a=null,l=()=>{if(a!==null)return a;let h=i.statusText||"OK",f=new b(i.getAllResponseHeaders()),_=mn(i)||e.url;return a=new ce({headers:f,status:i.status,statusText:h,url:_}),a},u=()=>{let{headers:h,status:f,statusText:_,url:W}=l(),g=null;f!==ln&&(g=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=g?cn:0);let x=f>=200&&f<300;if(e.responseType==="json"&&typeof g=="string"){let Ct=g;g=g.replace(fn,"");try{g=g!==""?JSON.parse(g):null}catch(kt){g=Ct,x&&(x=!1,g={error:kt,text:g})}}x?(o.next(new O({body:g,headers:h,status:f,statusText:_,url:W||void 0})),o.complete()):o.error(new Y({error:g,headers:h,status:f,statusText:_,url:W||void 0}))},m=h=>{let{url:f}=l(),_=new Y({error:h,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});o.error(_)},y=!1,p=h=>{y||(o.next(l()),y=!0);let f={type:A.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(f.total=h.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),o.next(f)},Z=h=>{let f={type:A.UploadProgress,loaded:h.loaded};h.lengthComputable&&(f.total=h.total),o.next(f)};return i.addEventListener("load",u),i.addEventListener("error",m),i.addEventListener("timeout",m),i.addEventListener("abort",m),e.reportProgress&&(i.addEventListener("progress",p),c!==null&&i.upload&&i.upload.addEventListener("progress",Z)),i.send(c),o.next({type:A.Sent}),()=>{i.removeEventListener("error",m),i.removeEventListener("abort",m),i.removeEventListener("load",u),i.removeEventListener("timeout",m),e.reportProgress&&(i.removeEventListener("progress",p),c!==null&&i.upload&&i.upload.removeEventListener("progress",Z)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||n)(d(ee))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})(),Ot=new T(""),yn="XSRF-TOKEN",gn=new T("",{providedIn:"root",factory:()=>yn}),En="X-XSRF-TOKEN",vn=new T("",{providedIn:"root",factory:()=>En}),q=class{},Tn=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,r){this.doc=e,this.cookieName=r}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Q(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(r){return new(r||n)(d(R),d(gn))};static \u0275prov=v({token:n,factory:n.\u0275fac})}return n})();function wn(n,t){let e=n.url.toLowerCase();if(!w(Ot)||n.method==="GET"||n.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(n);let r=w(q).getToken(),s=w(vn);return r!=null&&!n.headers.has(s)&&(n=n.clone({headers:n.headers.set(s,r)})),t(n)}var Se=function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n}(Se||{});function Rn(n,t){return{\u0275kind:n,\u0275providers:t}}function Mn(...n){let t=[St,be,le,{provide:k,useExisting:le},{provide:J,useFactory:()=>w(dn,{optional:!0})??w(be)},{provide:_e,useValue:wn,multi:!0},{provide:Ot,useValue:!0},{provide:q,useClass:Tn}];for(let e of n)t.push(...e.\u0275providers);return K(t)}function bn(n){return Rn(Se.Interceptors,n.map(t=>({provide:_e,useValue:t,multi:!0})))}var Dn=new T(""),Sn="b",An="h",On="s",In="st",Pn="u",Nn="rt",Ae=new T(""),Cn=["GET","HEAD"];function kn(n,t){let y=w(Ae),{isCacheActive:e}=y,r=Pe(y,["isCacheActive"]),{transferCache:s,method:o}=n;if(!e||s===!1||o==="POST"&&!r.includePostRequests&&!s||o!=="POST"&&!Cn.includes(o)||!r.includeRequestsWithAuthHeaders&&Ln(n)||r.filter?.(n)===!1)return t(n);let i=w(Xe);if(w(Dn,{optional:!0}))throw new E(2803,!1);let a=n.url,l=xn(n,a),u=i.get(l,null),m=r.includeHeaders;if(typeof s=="object"&&s.includeHeaders&&(m=s.includeHeaders),u){let{[Sn]:p,[Nn]:Z,[An]:h,[On]:f,[In]:_,[Pn]:W}=u,g=p;switch(Z){case"arraybuffer":g=new TextEncoder().encode(p).buffer;break;case"blob":g=new Blob([p]);break}let x=new b(h);return j(new O({body:g,headers:x,status:f,statusText:_,url:W}))}return t(n).pipe(Ue(p=>{p instanceof O}))}function Ln(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function It(n){return[...n.keys()].sort().map(t=>`${t}=${n.getAll(t)}`).join("&")}function xn(n,t){let{params:e,method:r,responseType:s}=n,o=It(e),i=n.serializeBody();i instanceof URLSearchParams?i=It(i):typeof i!="string"&&(i="");let c=[r,s,t,i,o].join("|"),a=jn(c);return a}function jn(n){let t=0;for(let e of n)t=Math.imul(31,t)+e.charCodeAt(0)<<0;return t+=2147483648,t.toString()}function Nt(n){return[{provide:Ae,useFactory:()=>(Je("NgHttpTransferCache"),D({isCacheActive:!0},n))},{provide:De,useValue:kn,multi:!0},{provide:nt,multi:!0,useFactory:()=>{let t=w(fe),e=w(Ae);return()=>{t.whenStable().then(()=>{e.isCacheActive=!1})}}}]}var Ms=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||n)(d(R))};static \u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Un=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=v({token:n,factory:function(r){let s=null;return r?s=new(r||n):s=d(Fn),s},providedIn:"root"})}return n})(),Fn=(()=>{class n extends Un{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case S.NONE:return r;case S.HTML:return N(r,"HTML")?P(r):et(this._doc,String(r)).toString();case S.STYLE:return N(r,"Style")?P(r):r;case S.SCRIPT:if(N(r,"Script"))return P(r);throw new E(5200,!1);case S.URL:return N(r,"URL")?P(r):Qe(String(r));case S.RESOURCE_URL:if(N(r,"ResourceURL"))return P(r);throw new E(5201,!1);default:throw new E(5202,!1)}}bypassSecurityTrustHtml(e){return Ye(e)}bypassSecurityTrustStyle(e){return qe(e)}bypassSecurityTrustScript(e){return Ze(e)}bypassSecurityTrustUrl(e){return We(e)}bypassSecurityTrustResourceUrl(e){return Ke(e)}static \u0275fac=function(r){return new(r||n)(d(R))};static \u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Oe=function(n){return n[n.NoHttpTransferCache=0]="NoHttpTransferCache",n[n.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",n[n.I18nSupport=2]="I18nSupport",n[n.EventReplay=3]="EventReplay",n[n.IncrementalHydration=4]="IncrementalHydration",n}(Oe||{});function bs(...n){let t=[],e=new Set;for(let{\u0275providers:s,\u0275kind:o}of n)e.add(o),s.length&&t.push(s);let r=e.has(Oe.HttpTransferCacheOptions);return K([[],st(),e.has(Oe.NoHttpTransferCache)||r?[]:Nt({}),t])}export{Re as a,Yt as b,M as c,A as d,O as e,Y as f,St as g,Mn as h,bn as i,Ms as j,Un as k,bs as l};