From fc3d70d4a47d6839cf6424af730dc40523cd6f21 Mon Sep 17 00:00:00 2001 From: IOhacker <46640258+IOhacker@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:55:03 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20openMF/w?= =?UTF-8?q?eb-app@58adc0a7d8a9e076b68062ad7b398be08de7bc4d=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...K.js => account-transfers.module-O4CHVKRL.js} | 2 +- browser/assets/translations/cs-CS.json | 1 + browser/assets/translations/de-DE.json | 1 + browser/assets/translations/en-US.json | 1 + browser/assets/translations/es-CL.json | 1 + browser/assets/translations/es-MX.json | 1 + browser/assets/translations/fr-FR.json | 1 + browser/assets/translations/it-IT.json | 1 + browser/assets/translations/ko-KO.json | 1 + browser/assets/translations/lt-LT.json | 1 + browser/assets/translations/lv-LV.json | 1 + browser/assets/translations/ne-NE.json | 1 + browser/assets/translations/pt-PT.json | 1 + browser/assets/translations/sw-SW.json | 1 + browser/{chunk-HZWIHY3V.js => chunk-2XE77LT4.js} | 2 +- browser/{chunk-NJEDRF32.js => chunk-74HZWEDD.js} | 2 +- browser/{chunk-PZ5W5NMJ.js => chunk-FMTK7B7D.js} | 2 +- browser/{chunk-Z3NF3G2N.js => chunk-GZ4W472E.js} | 2 +- browser/{chunk-55OSB4IK.js => chunk-HV33S2D3.js} | 2 +- browser/{chunk-T44Z3XQ3.js => chunk-M5465R2R.js} | 2 +- browser/{chunk-6SG2PADU.js => chunk-NCNV2LOX.js} | 2 +- ...J6C627E.js => collaterals.module-YC4RGJJR.js} | 2 +- ...MBSS.js => fixed-deposits.module-74SYSHH3.js} | 4 ++-- browser/index.html | 2 +- ...dule-ONPRIXEC.js => loans.module-EJII47NQ.js} | 4 ++-- browser/main.js | 16 ++++++++-------- ....js => recurring-deposits.module-SIHIJNI3.js} | 2 +- ...le-BKOADGUQ.js => savings.module-JCL32GKG.js} | 4 ++-- ...ule-W6US6HOD.js => shares.module-5VLPLCNX.js} | 2 +- 29 files changed, 39 insertions(+), 26 deletions(-) rename browser/{account-transfers.module-HM5KQJMK.js => account-transfers.module-O4CHVKRL.js} (99%) rename browser/{chunk-HZWIHY3V.js => chunk-2XE77LT4.js} (99%) rename browser/{chunk-NJEDRF32.js => chunk-74HZWEDD.js} (99%) rename browser/{chunk-PZ5W5NMJ.js => chunk-FMTK7B7D.js} (97%) rename browser/{chunk-Z3NF3G2N.js => chunk-GZ4W472E.js} (97%) rename browser/{chunk-55OSB4IK.js => chunk-HV33S2D3.js} (89%) rename browser/{chunk-T44Z3XQ3.js => chunk-M5465R2R.js} (81%) rename browser/{chunk-6SG2PADU.js => chunk-NCNV2LOX.js} (91%) rename browser/{collaterals.module-2J6C627E.js => collaterals.module-YC4RGJJR.js} (99%) rename browser/{fixed-deposits.module-HW4KMBSS.js => fixed-deposits.module-74SYSHH3.js} (99%) rename browser/{loans.module-ONPRIXEC.js => loans.module-EJII47NQ.js} (99%) rename browser/{recurring-deposits.module-ZWVFOUEY.js => recurring-deposits.module-SIHIJNI3.js} (99%) rename browser/{savings.module-BKOADGUQ.js => savings.module-JCL32GKG.js} (99%) rename browser/{shares.module-W6US6HOD.js => shares.module-5VLPLCNX.js} (99%) diff --git a/browser/account-transfers.module-HM5KQJMK.js b/browser/account-transfers.module-O4CHVKRL.js similarity index 99% rename from browser/account-transfers.module-HM5KQJMK.js rename to browser/account-transfers.module-O4CHVKRL.js index af5ae2e1f..6a3739ad5 100644 --- a/browser/account-transfers.module-HM5KQJMK.js +++ b/browser/account-transfers.module-O4CHVKRL.js @@ -1 +1 @@ -import{a as B}from"./chunk-Z3NF3G2N.js";import{$a as he,$c as it,$d as vt,Ae as yt,Af as Kt,Cc as Ae,Da as N,Dd as Z,Df as Ot,Ea as q,Eb as V,Ed as ct,Fd as Pe,G as j,Ga as F,H as Rt,Hd as pt,Ia as h,Id as tt,Ja as x,Jd as Ht,Je as Ve,K as T,Kd as et,Ke as Re,L as b,Lc as R,Ld as mt,M as S,Na as Mt,Nc as Me,Nd as dt,Oa as kt,Pa as Bt,Pd as Ne,Qa as M,Qd as ut,Rd as ft,Rg as Ge,Sc as ht,Sd as _t,Tc as J,Ua as r,Ud as Ct,Va as c,Wa as u,We as Et,Xa as g,Xd as W,Ya as Te,Yc as K,Zc as I,_ as ce,_a as xe,_c as X,ab as be,bb as O,ca as e,cd as Ft,dd as ke,de as qe,eb as G,ed as at,eg as Le,fb as nt,fd as bt,gc as $,gd as Be,gg as He,hb as o,hd as rt,hg as $e,ib as l,ig as Ue,ja as P,jb as wt,jc as xt,ka as Lt,kc as Y,kd as ot,mc as pe,md as we,na as y,nd as lt,nf as $t,of as Ut,pa as At,pb as Se,pd as Fe,pf as zt,qb as ye,qc as Q,ra as C,rd as St,rf as Gt,sa as v,sb as Ee,sd as Oe,sf as jt,ta as E,td as L,ua as D,ud as U,uf as Qt,va as A,vf as Wt,vg as ze,wa as d,xa as a,xd as z,xf as Yt,ya as n,yf as Jt,za as _,zb as De,zd as st}from"./chunk-HZWIHY3V.js";import{a as qt,b as Vt}from"./chunk-PHUH23IY.js";var Ye=()=>["../","edit"],Je=()=>["../","list-account-transactions"];function Ke(t,p){t&1&&(a(0,"button",1),r(1),o(2,"translate"),n()),t&2&&(d("routerLink",G(4,Je)),e(),u(" ",l(2,2,"labels.buttons.View Transactions History")," "))}function Xe(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Within Bank")," "))}function Ze(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Own Account")," "))}var Zt=(()=>{class t{constructor(){this.route=T($),this.allowclientedit=!1,this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsData,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1)})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-standing-instructions"]],decls:125,vars:90,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"mat-h2","flex-fill"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"]],template:function(m,s){m&1&&(a(0,"div",0)(1,"button",1),_(2,"fa-icon",2),r(3),o(4,"translate"),n(),y(5,Ke,3,5,"button",3),n(),a(6,"div",4)(7,"mat-card")(8,"mat-card-content")(9,"div",5)(10,"h2",6),r(11),n(),_(12,"mat-divider",7),a(13,"div",8)(14,"span",9),r(15),o(16,"translate"),n(),a(17,"span",10),r(18),n()(),a(19,"div",8)(20,"span",9),r(21),o(22,"translate"),n(),a(23,"span",10),r(24),n()(),a(25,"div",8)(26,"span",9),r(27),o(28,"translate"),n(),a(29,"span",10),r(30),n()(),a(31,"div",8)(32,"span",9),r(33),o(34,"translate"),n(),a(35,"span",10),r(36),n()(),a(37,"div",8)(38,"span",9),r(39),o(40,"translate"),n(),a(41,"span",10),r(42),n()(),a(43,"div",8)(44,"span",9),r(45),o(46,"translate"),n(),a(47,"span",10),r(48),n()(),a(49,"div",8)(50,"span",9),r(51),o(52,"translate"),n(),a(53,"span",10),C(54,Xe,3,3,"span"),C(55,Ze,3,3,"span"),n()(),a(56,"div",8)(57,"span",9),r(58),o(59,"translate"),n(),a(60,"span",10),r(61),n()(),a(62,"div",8)(63,"span",9),r(64),o(65,"translate"),n(),a(66,"span",10),r(67),n()(),a(68,"div",8)(69,"span",9),r(70),o(71,"translate"),n(),a(72,"span",10),r(73),n()(),a(74,"div",8)(75,"span",9),r(76),o(77,"translate"),n(),a(78,"span",10),r(79),n()(),a(80,"div",8)(81,"span",9),r(82),o(83,"translate"),n(),a(84,"span",10),r(85),n()(),a(86,"div",8)(87,"span",9),r(88),o(89,"translate"),n(),a(90,"span",10),r(91),n()(),a(92,"div",8)(93,"span",9),r(94),o(95,"translate"),n(),a(96,"span",10),r(97),o(98,"dateFormat"),o(99,"dateFormat"),n()(),a(100,"div",8)(101,"span",9),r(102),o(103,"translate"),n(),a(104,"span",10),r(105),n()(),a(106,"div",8)(107,"span",9),r(108),o(109,"translate"),n(),a(110,"span",10),r(111),n()(),a(112,"div",8)(113,"span",9),r(114),o(115,"translate"),n(),a(116,"span",10),r(117),n()(),a(118,"div",8)(119,"span",9),r(120),o(121,"translate"),n(),a(122,"span",10),r(123),o(124,"dateFormat"),n()()()()()()),m&2&&(e(),d("routerLink",G(89,Ye)),e(2),u(" ",l(4,45,"labels.buttons.Edit")," "),e(2),d("mifosxHasPermission","READ_ACCOUNTTRANSFER"),e(6),c(s.standingInstructionsData.name),e(),d("inset",!0),e(3),u("",l(16,47,"labels.inputs.Applicant"),":"),e(3),c(s.standingInstructionsData.fromClient.displayName),e(3),u("",l(22,49,"labels.inputs.Type"),":"),e(3),c(s.standingInstructionsData.transferType.value),e(3),u("",l(28,51,"labels.inputs.Priority"),":"),e(3),c(s.standingInstructionsData.priority.value),e(3),u("",l(34,53,"labels.inputs.Status"),":"),e(3),c(s.standingInstructionsData.status.value),e(3),u("",l(40,55,"labels.inputs.From Account Type"),":"),e(3),c(s.standingInstructionsData.fromAccountType.value),e(3),u("",l(46,57,"labels.inputs.From Account"),":"),e(3),g("",s.standingInstructionsData.fromAccount.productName," - ",s.standingInstructionsData.fromAccount.accountNo),e(3),u("",l(52,59,"labels.inputs.Destination"),":"),e(3),v(s.allowclientedit?54:-1),e(),v(s.allowclientedit?-1:55),e(3),u("",l(59,61,"labels.inputs.To Office"),":"),e(3),c(s.standingInstructionsData.toOffice.name),e(3),u("",l(65,63,"labels.inputs.Beneficiary"),":"),e(3),c(s.standingInstructionsData.toClient.displayName),e(3),u("",l(71,65,"labels.inputs.To Account Type"),":"),e(3),c(s.standingInstructionsData.toAccountType.value),e(3),u("",l(77,67,"labels.inputs.To Account"),":"),e(3),g("",s.standingInstructionsData.toAccount.productName," - ",s.standingInstructionsData.toAccount.accountNo),e(3),u("",l(83,69,"labels.inputs.Standing Instruction Type"),":"),e(3),c(s.standingInstructionsData.instructionType.value),e(3),u("",l(89,71,"labels.inputs.Amount"),":"),e(3),c(s.standingInstructionsData.amount),e(3),u("",l(95,73,"labels.inputs.Validity"),":"),e(3),g("",l(98,75,s.standingInstructionsData.validFrom)," - ",l(99,77,s.standingInstructionsData.validTill)),e(5),u("",l(103,79,"labels.inputs.Recurrence Type"),":"),e(3),c(s.standingInstructionsData.recurrenceType.value),e(3),u("",l(109,81,"labels.inputs.Interval"),":"),e(3),c(s.standingInstructionsData.recurrenceInterval),e(3),u("",l(115,83,"labels.inputs.Recurrence Frequency"),":"),e(3),c(s.standingInstructionsData.recurrenceFrequency.value),e(3),u("",l(121,85,"labels.inputs.On Month Day"),":"),e(3),c(l(124,87,s.standingInstructionsData.recurrenceOnMonthDay)))},dependencies:[V,L,Y,U,z,Q,W,vt,yt,Ct,R],styles:[".mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 1em}"]})}}return t})();var tn=()=>["../view"];function en(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function an(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function on(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ln(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function cn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function pn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function mn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function dn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.editStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ne=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.allowclientedit=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsDataAndTemplate,this.standingInstructionsId=i.standingInstructionsDataAndTemplate.id,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1),this.setOptions()})}ngOnInit(){this.createEditStandingInstructionsForm();let m=new Date().getFullYear();this.standingInstructionsData.recurrenceOnMonthDay&&this.standingInstructionsData.recurrenceOnMonthDay.push(m),this.editStandingInstructionsForm.patchValue({name:this.standingInstructionsData.name,applicant:this.standingInstructionsData.fromClient.displayName,type:this.standingInstructionsData.transferType.value,priority:this.standingInstructionsData.priority.id,status:this.standingInstructionsData.status.id,fromAccountType:this.standingInstructionsData.fromAccountType.value,fromAccount:this.standingInstructionsData.fromAccount.productName,destination:this.allowclientedit?"Within Bank":"Own Account",toOffice:this.standingInstructionsData.toOffice.name,toClientId:this.standingInstructionsData.toClient.displayName,toAccountType:this.standingInstructionsData.toAccountType.value,toAccount:this.standingInstructionsData.toAccount.productName,instructionType:this.standingInstructionsData.instructionType.id,amount:this.standingInstructionsData.amount,validFrom:this.standingInstructionsData.validFrom&&new Date(this.standingInstructionsData.validFrom),validTill:this.standingInstructionsData.validTill&&new Date(this.standingInstructionsData.validTill),recurrenceType:this.standingInstructionsData.recurrenceType.id,recurrenceInterval:this.standingInstructionsData.recurrenceInterval,recurrenceFrequency:this.standingInstructionsData.recurrenceFrequency.id,recurrenceOnMonthDay:this.standingInstructionsData.recurrenceOnMonthDay&&new Date(this.standingInstructionsData.recurrenceOnMonthDay)})}createEditStandingInstructionsForm(){this.editStandingInstructionsForm=this.formBuilder.group({name:[{value:"",disabled:!0}],applicant:[{value:"",disabled:!0}],type:[{value:"",disabled:!0}],priority:["",I.required],status:["",I.required],fromAccountType:[{value:"",disabled:!0}],fromAccount:[{value:"",disabled:!0}],destination:[{value:"",disabled:!0}],toOffice:[{value:"",disabled:!0}],toClientId:[{value:"",disabled:!0}],toAccountType:[{value:"",disabled:!0}],toAccount:[{value:"",disabled:!0}],instructionType:"",amount:"",validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:"",recurrenceFrequency:"",recurrenceOnMonthDay:""})}setOptions(){this.priorityTypeData=this.standingInstructionsData.priorityOptions,this.statusTypeData=this.standingInstructionsData.statusOptions,this.instructionTypeData=this.standingInstructionsData.instructionTypeOptions,this.recurrenceTypeData=this.standingInstructionsData.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingInstructionsData.recurrenceFrequencyOptions}submit(){let i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={amount:this.editStandingInstructionsForm.value.amount,dateFormat:i,instructionType:this.editStandingInstructionsForm.value.instructionType,locale:m,monthDayFormat:"dd MMMM",priority:this.editStandingInstructionsForm.value.priority,recurrenceFrequency:this.editStandingInstructionsForm.value.recurrenceFrequency,recurrenceInterval:this.editStandingInstructionsForm.value.recurrenceInterval,recurrenceOnMonthDay:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.recurrenceOnMonthDay,"dd MMMM"),recurrenceType:this.editStandingInstructionsForm.value.recurrenceType,status:this.editStandingInstructionsForm.value.status,validFrom:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validFrom,i),validTill:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validTill,i)};this.accountTransfersService.updateStandingInstructionsData(this.standingInstructionsId,s).subscribe(f=>{this.router.navigate(["../view"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-edit-standing-instructions"]],decls:134,vars:84,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","formControlName","name"],["matInput","","formControlName","applicant"],["matInput","","formControlName","type"],["matInput","","formControlName","fromAccountType"],["required","","formControlName","priority"],[3,"value"],["required","","formControlName","status"],["matInput","","formControlName","fromAccount"],["matInput","","formControlName","destination"],["matInput","","formControlName","toOffice"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccount"],["formControlName","instructionType"],["matInput","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["matInput","","formControlName","recurrenceInterval"],["formControlName","recurrenceFrequency"],["matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(m,s){if(m&1){let f=F();a(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",7),n(),a(10,"mat-form-field",6)(11,"mat-label"),r(12),o(13,"translate"),n(),_(14,"input",8),n(),a(15,"mat-form-field",6)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",9),n(),a(20,"mat-form-field",6)(21,"mat-label"),r(22),o(23,"translate"),n(),_(24,"input",10),n(),a(25,"mat-form-field",6)(26,"mat-label"),r(27),o(28,"translate"),n(),a(29,"mat-select",11),D(30,en,2,2,"mat-option",12,E),n(),C(32,nn,7,9,"mat-error"),n(),a(33,"mat-form-field",6)(34,"mat-label"),r(35),o(36,"translate"),n(),a(37,"mat-select",13),D(38,an,2,2,"mat-option",12,E),n(),C(40,rn,7,9,"mat-error"),n(),a(41,"mat-form-field",6)(42,"mat-label"),r(43),o(44,"translate"),n(),_(45,"input",14),n(),a(46,"mat-form-field",6)(47,"mat-label"),r(48),o(49,"translate"),n(),_(50,"input",15),n(),a(51,"mat-form-field",6)(52,"mat-label"),r(53),o(54,"translate"),n(),_(55,"input",16),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),_(60,"input",17),n(),a(61,"mat-form-field",6)(62,"mat-label"),r(63),o(64,"translate"),n(),_(65,"input",18),n(),a(66,"mat-form-field",6)(67,"mat-label"),r(68),o(69,"translate"),n(),_(70,"input",19),n(),a(71,"mat-form-field",6)(72,"mat-label"),r(73),o(74,"translate"),n(),a(75,"mat-select",20),D(76,on,2,2,"mat-option",12,E),n()(),a(78,"mat-form-field",6)(79,"mat-label"),r(80),o(81,"translate"),n(),_(82,"input",21),n(),a(83,"mat-form-field",22),h("click",function(){b(f);let w=M(90);return S(w.open())}),a(84,"mat-label"),r(85),o(86,"translate"),n(),_(87,"input",23)(88,"mat-datepicker-toggle",24)(89,"mat-datepicker",null,0),C(91,ln,7,9,"mat-error"),n(),a(92,"mat-form-field",22),h("click",function(){b(f);let w=M(99);return S(w.open())}),a(93,"mat-label"),r(94),o(95,"translate"),n(),_(96,"input",25)(97,"mat-datepicker-toggle",24)(98,"mat-datepicker",null,1),C(100,sn,7,9,"mat-error"),n(),a(101,"mat-form-field",6)(102,"mat-label"),r(103),o(104,"translate"),n(),a(105,"mat-select",26),D(106,cn,2,2,"mat-option",12,E),n(),C(108,pn,7,9,"mat-error"),n(),a(109,"mat-form-field",6)(110,"mat-label"),r(111),o(112,"translate"),n(),_(113,"input",27),n(),a(114,"mat-form-field",6)(115,"mat-label"),r(116),o(117,"translate"),n(),a(118,"mat-select",28),D(119,mn,2,2,"mat-option",12,E),n()(),a(121,"mat-form-field",22),h("click",function(){b(f);let w=M(128);return S(w.open())}),a(122,"mat-label"),r(123),o(124,"translate"),n(),_(125,"input",29)(126,"mat-datepicker-toggle",24)(127,"mat-datepicker",null,2),n()()(),a(129,"mat-card-actions",30)(130,"button",31),r(131),o(132,"translate"),n(),y(133,dn,3,4,"button",32),n()()()()}if(m&2){let f=M(90),k=M(99),w=M(128);e(2),d("formGroup",s.editStandingInstructionsForm),e(5),c(l(8,41,"labels.inputs.name")),e(5),c(l(13,43,"labels.inputs.Applicant")),e(5),c(l(18,45,"labels.inputs.Type")),e(5),c(l(23,47,"labels.inputs.From Account Type")),e(5),c(l(28,49,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.editStandingInstructionsForm.controls.priority.hasError("required")?32:-1),e(3),c(l(36,51,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.editStandingInstructionsForm.controls.status.hasError("required")?40:-1),e(3),c(l(44,53,"labels.inputs.From Account")),e(5),c(l(49,55,"labels.inputs.Destination")),e(5),c(l(54,57,"labels.inputs.To Office")),e(5),c(l(59,59,"labels.inputs.Beneficiary")),e(5),c(l(64,61,"labels.inputs.To Account Type")),e(5),c(l(69,63,"labels.inputs.To Account")),e(5),c(l(74,65,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(4),c(l(81,67,"labels.inputs.Amount")),e(5),c(l(86,69,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.editStandingInstructionsForm.controls.validFrom.hasError("required")?91:-1),e(3),c(l(95,71,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.editStandingInstructionsForm.controls.validTill.hasError("required")?100:-1),e(3),c(l(104,73,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.editStandingInstructionsForm.controls.recurrenceType.hasError("required")?108:-1),e(3),c(l(112,75,"labels.inputs.Interval")),e(5),c(l(117,77,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(4),c(l(124,79,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",w),e(),d("for",w),e(4),d("routerLink",G(83,tn)),e(),u(" ",l(132,81,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var un=()=>["../"];function fn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.name")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function _n(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Cn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function vn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function In(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Tn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function xn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function Sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function yn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function En(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Destination")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Dn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function An(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Mn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.displayName," ")}}function kn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Beneficiary")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function wn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Fn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function On(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Pn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Standing Instruction Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function qn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Vn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ln(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function $n(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Interval")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Un(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Frequency")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.On Month Day")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function jn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.createStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ie=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.allowclientedit=!0,this.route.data.subscribe(i=>{this.standingIntructionsTemplate=i.standingIntructionsTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.officeId=this.route.snapshot.queryParams.officeId,this.accountType=this.route.snapshot.queryParams.accountType,this.clientId=this.route.parent.snapshot.params.clientId,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}}ngOnInit(){this.createCreateStandingInstructionsForm(),this.buildDependencies(),this.createStandingInstructionsForm.patchValue({applicant:this.standingIntructionsTemplate.fromClient.displayName})}createCreateStandingInstructionsForm(){this.createStandingInstructionsForm=this.formBuilder.group({name:["",I.required],applicant:[{value:"",disabled:!0}],transferType:["",I.required],priority:["",I.required],status:["",I.required],fromAccountType:["",I.required],fromAccountId:["",I.required],destination:["",I.required],toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],instructionType:["",I.required],amount:["",I.required],validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:["",I.required],recurrenceFrequency:["",I.required],recurrenceOnMonthDay:["",I.required]})}setOptions(){this.transferTypeData=this.standingIntructionsTemplate.transferTypeOptions,this.priorityTypeData=this.standingIntructionsTemplate.priorityOptions,this.statusTypeData=this.standingIntructionsTemplate.statusOptions,this.fromAccountTypeData=this.standingIntructionsTemplate.fromAccountTypeOptions,this.fromAccountData=this.standingIntructionsTemplate.fromAccountOptions,this.destinationTypeData=[{id:1,value:"own account"},{id:2,value:"with in bank"}],this.toOfficeTypeData=this.standingIntructionsTemplate.toOfficeOptions,this.toClientTypeData=this.standingIntructionsTemplate.toClientOptions,this.toAccountTypeData=this.standingIntructionsTemplate.toAccountTypeOptions,this.toAccountData=this.standingIntructionsTemplate.toAccountOptions,this.instructionTypeData=this.standingIntructionsTemplate.instructionTypeOptions,this.recurrenceTypeData=this.standingIntructionsTemplate.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingIntructionsTemplate.recurrenceFrequencyOptions}buildDependencies(){this.createStandingInstructionsForm.get("destination").valueChanges.subscribe(i=>{i===1?(this.allowclientedit=!1,this.createStandingInstructionsForm.patchValue({toOfficeId:this.officeId,toClientId:this.clientId}),this.ToOfficeId=!0,this.ToClientId=!0,this.changeEvent()):(this.allowclientedit=!0,this.createStandingInstructionsForm.patchValue({toOfficeId:"",toClientId:""}),this.createStandingInstructionsForm.controls.toOfficeId.enable(),this.createStandingInstructionsForm.controls.toClientId.enable())})}changeEvent(){let i=this.refineObject(this.createStandingInstructionsForm.value);this.accountTransfersService.getStandingInstructionsTemplate(this.clientId,this.officeId,this.accountTypeId,i).subscribe(m=>{this.standingIntructionsTemplate=m,this.setOptions()})}refineObject(i){let m=Object.getOwnPropertyNames(i);for(let s=0;s{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-create-standing-instructions"]],decls:164,vars:100,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["matInput","","formControlName","applicant"],["required","","formControlName","transferType",3,"selectionChange"],[3,"value"],["required","","formControlName","priority"],["required","","formControlName","status"],["required","","formControlName","fromAccountType",3,"selectionChange"],["required","","formControlName","fromAccountId",3,"selectionChange"],["required","","formControlName","destination"],["required","","formControlName","toOfficeId",3,"selectionChange","disabled"],["required","","formControlName","toClientId",3,"selectionChange","disabled"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["formControlName","instructionType"],["type","number","matInput","","required","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["type","number","matInput","","required","","formControlName","recurrenceInterval"],["required","","formControlName","recurrenceFrequency"],["required","","matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(m,s){if(m&1){let f=F();a(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",7),C(10,fn,7,9,"mat-error"),n(),a(11,"mat-form-field",6)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",6)(17,"mat-label"),r(18),o(19,"translate"),n(),a(20,"mat-select",9),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(21,_n,2,2,"mat-option",10,E),n(),C(23,Cn,7,9,"mat-error"),n(),a(24,"mat-form-field",6)(25,"mat-label"),r(26),o(27,"translate"),n(),a(28,"mat-select",11),D(29,vn,2,2,"mat-option",10,E),n(),C(31,gn,7,9,"mat-error"),n(),a(32,"mat-form-field",6)(33,"mat-label"),r(34),o(35,"translate"),n(),a(36,"mat-select",12),D(37,In,2,2,"mat-option",10,E),n(),C(39,Tn,7,9,"mat-error"),n(),a(40,"mat-form-field",6)(41,"mat-label"),r(42),o(43,"translate"),n(),a(44,"mat-select",13),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(45,xn,2,2,"mat-option",10,E),n(),C(47,hn,7,9,"mat-error"),n(),a(48,"mat-form-field",6)(49,"mat-label"),r(50),o(51,"translate"),n(),a(52,"mat-select",14),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(53,bn,2,3,"mat-option",10,E),n(),C(55,Sn,7,9,"mat-error"),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),a(60,"mat-select",15),D(61,yn,2,2,"mat-option",10,E),n(),C(63,En,7,9,"mat-error"),n(),a(64,"mat-form-field",6)(65,"mat-label"),r(66),o(67,"translate"),n(),a(68,"mat-select",16),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(69,Dn,2,2,"mat-option",10,E),n(),C(71,An,7,9,"mat-error"),n(),a(72,"mat-form-field",6)(73,"mat-label"),r(74),o(75,"translate"),n(),a(76,"mat-select",17),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(77,Mn,2,2,"mat-option",10,E),n(),C(79,kn,7,9,"mat-error"),n(),a(80,"mat-form-field",6)(81,"mat-label"),r(82),o(83,"translate"),n(),a(84,"mat-select",18),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(85,Bn,2,2,"mat-option",10,E),n(),C(87,wn,7,9,"mat-error"),n(),a(88,"mat-form-field",6)(89,"mat-label"),r(90),o(91,"translate"),n(),a(92,"mat-select",19),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(93,Fn,2,3,"mat-option",10,E),n(),C(95,On,7,9,"mat-error"),n(),a(96,"mat-form-field",6)(97,"mat-label"),r(98),o(99,"translate"),n(),a(100,"mat-select",20),D(101,Pn,2,2,"mat-option",10,E),n(),C(103,Nn,7,9,"mat-error"),n(),a(104,"mat-form-field",6)(105,"mat-label"),r(106),o(107,"translate"),n(),_(108,"input",21),C(109,qn,7,9,"mat-error"),n(),a(110,"mat-form-field",22),h("click",function(){b(f);let w=M(117);return S(w.open())}),a(111,"mat-label"),r(112),o(113,"translate"),n(),_(114,"input",23)(115,"mat-datepicker-toggle",24)(116,"mat-datepicker",null,0),C(118,Vn,7,9,"mat-error"),n(),a(119,"mat-form-field",22),h("click",function(){b(f);let w=M(126);return S(w.open())}),a(120,"mat-label"),r(121),o(122,"translate"),n(),_(123,"input",25)(124,"mat-datepicker-toggle",24)(125,"mat-datepicker",null,1),C(127,Rn,7,9,"mat-error"),n(),a(128,"mat-form-field",6)(129,"mat-label"),r(130),o(131,"translate"),n(),a(132,"mat-select",26),D(133,Ln,2,2,"mat-option",10,E),n(),C(135,Hn,7,9,"mat-error"),n(),a(136,"mat-form-field",6)(137,"mat-label"),r(138),o(139,"translate"),n(),_(140,"input",27),C(141,$n,7,9,"mat-error"),n(),a(142,"mat-form-field",6)(143,"mat-label"),r(144),o(145,"translate"),n(),a(146,"mat-select",28),D(147,Un,2,2,"mat-option",10,E),n(),C(149,zn,7,9,"mat-error"),n(),a(150,"mat-form-field",22),h("click",function(){b(f);let w=M(157);return S(w.open())}),a(151,"mat-label"),r(152),o(153,"translate"),n(),_(154,"input",29)(155,"mat-datepicker-toggle",24)(156,"mat-datepicker",null,2),C(158,Gn,7,9,"mat-error"),n()()(),a(159,"mat-card-actions",30)(160,"button",31),r(161),o(162,"translate"),n(),y(163,jn,3,4,"button",32),n()()()()}if(m&2){let f=M(117),k=M(126),w=M(157);e(2),d("formGroup",s.createStandingInstructionsForm),e(5),c(l(8,57,"labels.inputs.name")),e(3),v(s.createStandingInstructionsForm.controls.name.hasError("required")?10:-1),e(3),c(l(14,59,"labels.inputs.Applicant")),e(5),c(l(19,61,"labels.inputs.Type")),e(3),A(s.transferTypeData),e(2),v(s.createStandingInstructionsForm.controls.transferType.hasError("required")?23:-1),e(3),c(l(27,63,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.createStandingInstructionsForm.controls.priority.hasError("required")?31:-1),e(3),c(l(35,65,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.createStandingInstructionsForm.controls.status.hasError("required")?39:-1),e(3),c(l(43,67,"labels.inputs.From Account Type")),e(3),A(s.fromAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountType.hasError("required")?47:-1),e(3),c(l(51,69,"labels.inputs.From Account")),e(3),A(s.fromAccountData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountId.hasError("required")?55:-1),e(3),c(l(59,71,"labels.inputs.Destination")),e(3),A(s.destinationTypeData),e(2),v(s.createStandingInstructionsForm.controls.destination.hasError("required")?63:-1),e(3),c(l(67,73,"labels.inputs.To Office")),e(2),d("disabled",s.ToOfficeId),e(),A(s.toOfficeTypeData),e(2),v(s.createStandingInstructionsForm.controls.toOfficeId.hasError("required")?71:-1),e(3),c(l(75,75,"labels.inputs.Beneficiary")),e(2),d("disabled",s.ToClientId),e(),A(s.toClientTypeData),e(2),v(s.createStandingInstructionsForm.controls.toClientId.hasError("required")?79:-1),e(3),c(l(83,77,"labels.inputs.To Account Type")),e(3),A(s.toAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.toAccountType.hasError("required")?87:-1),e(3),c(l(91,79,"labels.inputs.To Account")),e(3),A(s.toAccountData),e(2),v(s.createStandingInstructionsForm.controls.toAccountId.hasError("required")?95:-1),e(3),c(l(99,81,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(2),v(s.createStandingInstructionsForm.controls.instructionType.hasError("required")?103:-1),e(3),c(l(107,83,"labels.inputs.Amount")),e(3),v(s.createStandingInstructionsForm.controls.amount.hasError("required")?109:-1),e(3),c(l(113,85,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.createStandingInstructionsForm.controls.validFrom.hasError("required")?118:-1),e(3),c(l(122,87,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.createStandingInstructionsForm.controls.validTill.hasError("required")?127:-1),e(3),c(l(131,89,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceType.hasError("required")?135:-1),e(3),c(l(139,91,"labels.inputs.Interval")),e(3),v(s.createStandingInstructionsForm.controls.recurrenceInterval.hasError("required")?141:-1),e(3),c(l(145,93,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceFrequency.hasError("required")?149:-1),e(3),c(l(153,95,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",w),e(),d("for",w),e(3),v(s.createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError("required")?158:-1),e(2),d("routerLink",G(99,un)),e(),u(" ",l(162,97,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,bt,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var je=t=>({balance:t}),Qn=()=>["../.."];function Wn(t,p){t&1&&(a(0,"div",4),_(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),n())}function Yn(t,p){if(t&1){let i=F();N(0),a(1,"button",23),h("click",function(){b(i);let s=x(4);return S(s.searchAccountByNumber())}),r(2),o(3,"translate"),n(),q()}if(t&2){let i=x(4);e(),d("disabled",i.phoneAccount.length!==10),e(),u(" ",l(3,2,"labels.buttons.Search")," ")}}function Jn(t,p){t&1&&(a(0,"mat-card-actions",17),y(1,Yn,4,4,"ng-container",22),n()),t&2&&(e(),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Kn(t,p){if(t&1){let i=F();a(0,"div",10)(1,"div",18)(2,"h3",11),r(3),o(4,"translate"),n(),a(5,"mat-form-field",19)(6,"mat-label"),r(7),o(8,"translate"),n(),a(9,"input",20,0),o(11,"translate"),be("ngModelChange",function(s){b(i);let f=x(2);return he(f.phoneAccount,s)||(f.phoneAccount=s),S(s)}),n(),a(12,"mat-hint",21),r(13),n()()(),C(14,Jn,2,1,"mat-card-actions",17),n()}if(t&2){let i=x(2);e(3),c(l(4,8,"labels.heading.Transferred To")),e(4),c(l(8,10,"labels.inputs.Phone Number")),e(2),d("placeholder",O(l(11,12,"labels.text.EnterPhoneNumber")))("readonly",i.interbankTransferForm),xe("ngModel",i.phoneAccount),e(4),u("",i.phoneAccount.length||0,"/10"),e(),v(i.interbankTransferForm?-1:14)}}function Xn(t,p){t&1&&_(0,"mat-divider")}function Zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ti(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function ei(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ni(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Client")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ii(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i),e(),g(" ",i.id," - ",i.displayName," ")}}function ai(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ri(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function oi(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function li(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function si(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ci(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function pi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function mi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,Zn,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),a(19,"mat-select",29),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(20,ti,2,2,"mat-option",30,E),n(),C(22,ei,7,9,"mat-error"),n(),a(23,"mat-form-field",28)(24,"mat-label"),r(25),o(26,"translate"),n(),_(27,"input",31),o(28,"translate"),C(29,ni,7,9,"mat-error"),n(),a(30,"mat-autocomplete",32,2),D(32,ii,2,3,"mat-option",30,E),n(),a(34,"mat-form-field",28)(35,"mat-label"),r(36),o(37,"translate"),n(),a(38,"mat-select",33),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(39,ai,2,2,"mat-option",30,E),n(),C(41,ri,7,9,"mat-error"),n(),a(42,"mat-form-field",28)(43,"mat-label"),r(44),o(45,"translate"),n(),a(46,"mat-select",34),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(47,oi,2,3,"mat-option",30,E),n(),C(49,li,7,9,"mat-error"),n(),a(50,"mat-form-field",28)(51,"mat-label"),r(52),o(53,"translate"),n(),_(54,"input",35),o(55,"translate"),C(56,si,7,9,"mat-error"),C(57,ci,4,6,"mat-error"),n(),a(58,"mat-form-field",36)(59,"mat-label"),r(60),o(61,"translate"),n(),_(62,"textarea",37),o(63,"translate"),C(64,pi,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=M(31),f=x(2);d("formGroup",f.makeAccountTransferForm),e(2),c(l(3,31,"labels.heading.Transfer Details")),e(5),c(l(8,33,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,35,"labels.text.SelectDate")))("min",f.minDate)("max",f.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(f.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,37,"labels.inputs.Office")),e(3),A(f.toOfficeTypeData),e(2),v(f.makeAccountTransferForm.controls.toOfficeId.hasError("required")?22:-1),e(3),c(l(26,39,"labels.inputs.Client")),e(2),d("placeholder",O(l(28,41,"labels.text.SelectOrTypeClientName")))("matAutocomplete",s),e(2),v(f.makeAccountTransferForm.controls.toClientId.hasError("required")?29:-1),e(),d("displayWith",f.displayClient),e(2),A(f.clientsData),e(4),c(l(37,43,"labels.inputs.Account Type")),e(3),A(f.toAccountTypeData),e(2),v(f.makeAccountTransferForm.controls.toAccountType.hasError("required")?41:-1),e(3),c(l(45,45,"labels.inputs.Account")),e(3),A(f.toAccountData),e(2),v(f.makeAccountTransferForm.controls.toAccountId.hasError("required")?49:-1),e(3),c(l(53,47,"labels.inputs.Amount")),e(2),d("placeholder",O(l(55,49,"labels.text.EnterAmount"))),e(2),v(f.makeAccountTransferForm.controls.transferAmount.hasError("required")?56:-1),e(),v((i=f.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?57:-1),e(3),c(l(61,51,"labels.inputs.Description")),e(2),d("placeholder",O(l(63,53,"labels.text.EnterTransferDescription"))),e(2),v(f.makeAccountTransferForm.controls.transferDescription.hasError("required")?64:-1)}}function di(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ui(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function fi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n()),t&2&&(e(),g(" ",l(2,2,"labels.inputs.Amount")," ",l(3,4,"labels.commons.mustBeAtLeast")," 0.01 "))}function _i(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function Ci(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function vi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,di,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",39),o(20,"translate"),n(),a(21,"mat-form-field",28)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",40),o(26,"translate"),n(),a(27,"mat-form-field",28)(28,"mat-label"),r(29),o(30,"translate"),n(),_(31,"input",41),o(32,"translate"),n(),a(33,"mat-form-field",28)(34,"mat-label"),r(35),o(36,"translate"),n(),_(37,"input",42),o(38,"translate"),n(),a(39,"mat-form-field",28)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"input",35),o(44,"translate"),C(45,ui,7,9,"mat-error"),C(46,fi,4,6,"mat-error"),C(47,_i,4,6,"mat-error"),n(),a(48,"mat-form-field",36)(49,"mat-label"),r(50),o(51,"translate"),n(),_(52,"textarea",37),o(53,"translate"),C(54,Ci,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=x(2);d("formGroup",s.makeAccountTransferForm),e(2),c(l(3,36,"labels.heading.Transfer Details")),e(5),c(l(8,38,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,40,"labels.text.SelectDate")))("min",s.minDate)("max",s.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,42,"labels.inputs.Bank")),e(2),d("placeholder",O(l(20,44,"labels.inputs.Bank")))("readonly",!0),e(4),c(l(24,46,"labels.inputs.Client")),e(2),d("placeholder",O(l(26,48,"labels.inputs.Client")))("readonly",!0),e(4),c(l(30,50,"labels.inputs.Account Type")),e(2),d("placeholder",O(l(32,52,"labels.inputs.Account Type")))("readonly",!0),e(4),c(l(36,54,"labels.inputs.Account")),e(2),d("placeholder",O(l(38,56,"labels.inputs.Account")))("readonly",!0),e(4),c(l(42,58,"labels.inputs.Amount")),e(2),d("placeholder",O(l(44,60,"labels.text.EnterAmount"))),e(2),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?45:-1),e(),v(s.makeAccountTransferForm.controls.transferAmount.hasError("min")?46:-1),e(),v((i=s.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?47:-1),e(3),c(l(51,62,"labels.inputs.Description")),e(2),d("placeholder",O(l(53,64,"labels.text.EnterTransferDescription"))),e(2),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?54:-1)}}function gi(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ii(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ti(t,p){if(t&1&&(N(0),C(1,gi,3,4,"button",44),C(2,Ii,3,4,"button",44),q()),t&2){let i=x(3);e(),v(i.interbank&&i.interbankTransferForm?1:-1),e(),v(i.interbank?-1:2)}}function xi(t,p){t&1&&(a(0,"mat-card-actions",17)(1,"button",43),r(2),o(3,"translate"),n(),y(4,Ti,3,2,"ng-container",22),n()),t&2&&(e(),d("routerLink",G(5,Qn)),e(),u(" ",l(3,3,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function hi(t,p){if(t&1&&(a(0,"mat-card",5)(1,"mat-card-content")(2,"div",10)(3,"h3",11),r(4),o(5,"translate"),n(),_(6,"mat-divider"),a(7,"div",12)(8,"div",13)(9,"div",14),r(10),o(11,"translate"),n(),a(12,"div",15),r(13),n()(),a(14,"div",13)(15,"div",14),r(16),o(17,"translate"),n(),a(18,"div",15),r(19),n()(),a(20,"div",13)(21,"div",14),r(22),o(23,"translate"),n(),a(24,"div",15),r(25),n()(),a(26,"div",13)(27,"div",14),r(28),o(29,"translate"),n(),a(30,"div",15),r(31),n()(),a(32,"div",13)(33,"div",14),r(34),o(35,"translate"),n(),a(36,"div",15),r(37),n()()()(),C(38,Kn,15,14,"div",10),C(39,Xn,1,0,"mat-divider"),C(40,mi,65,55,"form",16),C(41,vi,55,66,"form",16),n(),C(42,xi,5,6,"mat-card-actions",17),n()),t&2){let i=x();e(4),c(l(5,17,"labels.heading.Transferring From Details")),e(6),c(l(11,19,"labels.inputs.Applicant")),e(3),c(i.accountTransferTemplateData.fromClient.displayName),e(3),c(l(17,21,"labels.inputs.Office")),e(3),c(i.accountTransferTemplateData.fromOffice.name),e(3),c(l(23,23,"labels.inputs.From Account")),e(3),g(" ",i.accountTransferTemplateData.fromAccount.productName,"\xA0-\xA0#",i.accountTransferTemplateData.fromAccount.accountNo," "),e(3),c(l(29,25,"labels.inputs.From Account Type")),e(3),c(i.accountTransferTemplateData.fromAccountType.value),e(3),c(l(35,27,"labels.inputs.Currency")),e(3),c(i.accountTransferTemplateData.currency.name),e(),v(i.interbank?38:-1),e(),v(i.interbank?-1:39),e(),v(!i.interbank&&i.makeAccountTransferForm?40:-1),e(),v(i.interbank&&i.interbankTransferForm&&i.makeAccountTransferForm?41:-1),e(),v(!i.isLoading&&i.makeAccountTransferForm?42:-1)}}var ae=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.dateUtils=T(ht),this.settingsService=T(J),this.clientsService=T(Ue),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.interbank=!1,this.phoneAccount="",this.interbankTransferForm=!1,this.balance=0,this.isLoading=!1,this.route.data.subscribe(i=>{this.accountTransferTemplateData=i.accountTransferTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1",this.id=this.route.snapshot.queryParams.loanId;break;case"fromsavings":case"interbank":this.accountTypeId="2",this.id=this.route.snapshot.queryParams.savingsId,this.interbank=this.route.snapshot.queryParams.interbank==="true";let i=this.router.currentNavigation()?.extras?.state?.balance,m=this.accountTransferTemplateData?.fromAccount?.availableBalance??this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance??this.accountTransferTemplateData?.fromAccount?.balance??0;this.balance=typeof i=="number"?i:m;break;default:this.accountTypeId="0"}}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.interbank?this.createEmptyInterbankForm():this.createMakeAccountTransferForm()}createEmptyInterbankForm(){this.makeAccountTransferForm=this.formBuilder.group({toBank:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[0,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountTransferForm(){this.makeAccountTransferForm=this.formBuilder.group({toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[this.accountTransferTemplateData.transferAmount,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountInterbankTransferForm(i){if(!i){console.error("Account data is undefined"),this.isLoading=!1;return}let m=this.accountTransferTemplateData?.transferAmount>0?this.accountTransferTemplateData.transferAmount:1;this.makeAccountTransferForm=this.formBuilder.group({toBank:[i.destinationFspId||"",I.required],toClientId:[(i.firstName||i.firsName||"")+" "+(i.lastName||""),I.required],toAccountType:["Saving Account",I.required],toAccountId:[i.partyId||"",I.required],transferAmount:[m,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["Transferencia interbancaria",I.required]}),this.isLoading=!1}amountExceedsBalanceValidator(i){return i.value>this.balance?{amountExceedsBalance:!0}:null}setOptions(){this.toOfficeTypeData=this.accountTransferTemplateData.toOfficeOptions,this.toAccountTypeData=this.accountTransferTemplateData.toAccountTypeOptions,this.toAccountData=this.accountTransferTemplateData.toAccountOptions}changeEvent(){let i=this.refineObject(this.makeAccountTransferForm.value);this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId,i).subscribe(m=>{this.accountTransferTemplateData=m,this.toClientTypeData=m.toClientOptions,this.setOptions()})}refineObject(i){delete i.transferAmount,delete i.transferDate,delete i.transferDescription,i.toClientId&&typeof i.toClientId=="object"&&(i.toClientId=i.toClientId.id);let m=Object.getOwnPropertyNames(i);for(let s=0;s{typeof i=="string"&&i.length>=2&&(this.clientsService.getFilteredClients("displayName","ASC",!0,i).subscribe(m=>{this.clientsData=m.pageItems}),this.changeEvent())})}displayClient(i){return i?i.displayName:void 0}submit(){this.interbank?this.makeInterbankTransfer():this.makeTransfer()}makeTransfer(){this.isLoading=!0;let i=this.settingsService.dateFormat,m=this.settingsService.language.code,s;typeof this.makeAccountTransferForm.controls.toClientId.value=="object"?s=this.makeAccountTransferForm.controls.toClientId.value.id:s=this.makeAccountTransferForm.controls.toClientId.value;let f=Vt(qt({},this.makeAccountTransferForm.value),{transferDate:this.dateUtils.formatDate(this.makeAccountTransferForm.value.transferDate,i),dateFormat:i,locale:m,toClientId:s,fromAccountId:this.id,fromAccountType:this.accountTypeId,fromClientId:this.accountTransferTemplateData.fromClient.id,fromOfficeId:this.accountTransferTemplateData.fromClient.officeId});this.accountTransfersService.createAccountTransfer(f).subscribe(()=>{this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route})})}makeInterbankTransfer(){if(this.isLoading=!0,!this.makeAccountTransferForm.valid){console.error("Interbank form is not valid"),this.isLoading=!1;return}let i={homeTransactionId:crypto.randomUUID(),from:{fspId:Me.fineractPlatformTenantId,idType:"MSISDN",idValue:this.accountTransferTemplateData.fromAccount.externalId?.trim()||""},to:{fspId:this.makeAccountTransferForm.controls.toBank.value,idType:"MSISDN",idValue:this.makeAccountTransferForm.controls.toAccountId.value},amountType:"SEND",amount:{currencyCode:this.accountTransferTemplateData.currency.code,amount:this.makeAccountTransferForm.controls.transferAmount.value},transactionType:{scenario:"TRANSFER",subScenario:"DOMESTIC",initiator:"PAYER",initiatorType:"CUSTOMER"},note:this.makeAccountTransferForm.controls.transferDescription.value};this.accountTransfersService.sendInterbankTransfer(JSON.stringify(i)).subscribe(m=>{m.systemMessage&&(this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route}))},m=>{console.error("Interbank transfer error:",m),this.isLoading=!1})}searchAccountByNumber(){!this.phoneAccount||this.phoneAccount.length!==10||(this.isLoading=!0,this.accountTransfersService.getAccountByNumber(this.phoneAccount,this.accountTransferTemplateData.currency.code).subscribe(i=>{this.interbankTransferForm=!0,this.createMakeAccountInterbankTransferForm(i)},i=>{console.error("searching account error:",i),this.isLoading=!1}))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-make-account-transfers"]],decls:3,vars:2,consts:[["input",""],["transferDatePicker",""],["clientsAutocomplete","matAutocomplete"],[1,"container"],[1,"loader-wrapper"],[1,"transfer-card"],[1,"bottom","triangle"],[1,"top","triangle"],[1,"left","triangle"],[1,"right","triangle"],[1,"section-container"],[1,"section-title","transfer-heading"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"transfer-form",3,"formGroup"],[1,"action-buttons"],[1,"interbank-section"],[1,"full-width"],["matInput","","type","tel","maxlength","10","required","","title","Phone number",3,"ngModelChange","readonly","ngModel","placeholder"],["align","end"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary","id","search-button",1,"primary-button",3,"click","disabled"],[1,"form-grid"],[1,"form-field",3,"click"],["matInput","","required","","formControlName","transferDate","title","Transaction Date",3,"min","max","matDatepicker","placeholder"],["matSuffix","",3,"for"],[1,"form-field"],["required","","formControlName","toOfficeId",3,"selectionChange"],[3,"value"],["matInput","","formControlName","toClientId","title","Client name",3,"matAutocomplete","placeholder"],["autoActiveFirstOption","",3,"displayWith"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["type","number","matInput","","required","","formControlName","transferAmount","title","Transfer amount","min","0.01","step","0.01",3,"placeholder"],[1,"form-field","description-field"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2","title","Transfer description",3,"placeholder"],["icon","exclamation-triangle","size","md"],["matInput","","formControlName","toBank","title","Bank",3,"readonly","placeholder"],["matInput","","formControlName","toClientId","title","Client",3,"readonly","placeholder"],["matInput","","formControlName","toAccountType","title","Account Type",3,"readonly","placeholder"],["matInput","","formControlName","toAccountId","title","Account",3,"readonly","placeholder"],["type","button","mat-raised-button","",1,"cancel-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"primary-button",3,"disabled"],["mat-raised-button","","color","primary",1,"primary-button",3,"click","disabled"]],template:function(m,s){m&1&&(a(0,"div",3),C(1,Wn,5,0,"div",4),C(2,hi,43,29,"mat-card",5),n()),m&2&&(e(),v(s.isLoading?1:-1),e(),v(s.isLoading?-1:2))},dependencies:[V,L,at,K,bt,X,it,lt,Fe,we,rt,ot,Y,U,z,st,tt,Z,ct,pt,Pe,et,dt,mt,ft,_t,ut,Q,W,yt,Oe,ke,Re,Ve,vt,Ht,R],styles:[".container[_ngcontent-%COMP%]{max-width:42rem;margin:0 auto;padding:1rem}.transfer-card[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 2px 10px #00000014;margin-bottom:1.5rem;overflow:hidden}.section-container[_ngcontent-%COMP%]{margin-bottom:2rem}.section-title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;color:#333;margin:0 0 1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(0,0,0,.12)}.section-title.transfer-heading[_ngcontent-%COMP%]{font-weight:700}.info-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:.75rem}@media (width >= 768px){.info-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,50%)}}.info-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem;background-color:#00000005;border-radius:4px}.info-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.info-label[_ngcontent-%COMP%]{flex:0 0 40%;color:#000000b3;font-weight:500}.info-value[_ngcontent-%COMP%]{flex:1;color:#000000de}mat-divider[_ngcontent-%COMP%]{margin:1rem 0}.interbank-section[_ngcontent-%COMP%]{margin-bottom:1rem}.transfer-form[_ngcontent-%COMP%]{margin-top:1rem}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:1rem}@media (width >= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:1.5rem}}.form-row[_ngcontent-%COMP%]{display:contents}.form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(odd){margin-right:.5rem}}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(2n){margin-left:.5rem}}.form-field.description-field[_ngcontent-%COMP%]{grid-column:1/-1}.form-field.description-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{min-height:80px;resize:vertical} .mat-form-field{width:100%}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;padding:1rem 1.5rem;margin-top:1rem}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%]{flex-direction:column}}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;box-shadow:0 1px 3px #0000001f}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;font-weight:400;border:none;box-shadow:none}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.loader-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:300px;position:relative}@keyframes _ngcontent-%COMP%_rotate-triangle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.triangle[_ngcontent-%COMP%]{position:absolute;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:34px solid rgba(0,0,0,.05);animation:_ngcontent-%COMP%_rotate-triangle 1.5s infinite linear}.triangle[_ngcontent-%COMP%]:hover{border-bottom-color:#00000014}.dark-theme[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#ffffffb3}.dark-theme[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff;border-bottom-color:#ffffff1f}.dark-theme[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-ripple{background-color:#000000de!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-error{color:#0009!important} .mat-form-field-flex{align-items:center}.transfer-form[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%]{margin-bottom:1rem}.readonly-field[_ngcontent-%COMP%]{background-color:#00000005;cursor:not-allowed} .mat-input-element{font-size:14px}"]})}}return t})();var bi=["instructionsTable"],Si=()=>[10,25,50,100],yi=t=>["../",t,"edit"],Ei=t=>["../",t,"view"];function Di(t,p){if(t&1){let i=F();a(0,"button",24),h("click",function(){b(i);let s=x();return S(s.filterStandingInstructions())}),r(1),o(2,"translate"),o(3,"titlecase"),n()}t&2&&(e(),u(" ",l(3,3,l(2,1,"labels.buttons.Filter"))," "))}function Ai(t,p){if(t&1&&(a(0,"div",5)(1,"div")(2,"h3",25),r(3),o(4,"translate"),n()(),a(5,"div")(6,"h3",25),r(7),n()()()),t&2){let i=x();e(3),c(l(4,2,"labels.heading.Client Type")),e(4),c(i.clientName)}}function Mi(t,p){if(t&1&&(a(0,"mat-form-field",6)(1,"mat-label"),r(2),o(3,"translate"),n(),_(4,"input",9),n(),a(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",9),n()),t&2){let i=x();e(2),c(l(3,4,"labels.text.ClientName")),e(2),d("formControl",i.clientNameControl),e(3),c(l(8,6,"labels.text.FromClientId")),e(2),d("formControl",i.fromClientId)}}function ki(t,p){if(t&1&&(a(0,"mat-option",8),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Bi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Client")))}function wi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromClient.displayName,"-",i.fromClient.id," ")}}function Fi(t,p){if(t&1&&(a(0,"td",27),C(1,wi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromClient?1:-1)}}function Oi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.From Account")))}function Pi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromAccount.accountNo," (",i.fromAccountType.value,") ")}}function Ni(t,p){if(t&1&&(a(0,"td",27),C(1,Pi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromAccount&&(i!=null&&i.fromAccountType)?1:-1)}}function qi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Beneficiary")))}function Vi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;u(" ",i.toClient.displayName," ")}}function Ri(t,p){if(t&1&&(a(0,"td",27),C(1,Vi,1,1),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toClient?1:-1)}}function Li(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.To Account")))}function Hi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.toAccount.accountNo," (",i.toAccountType.value,") ")}}function $i(t,p){if(t&1&&(a(0,"td",27),C(1,Hi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toAccount&&(i!=null&&i.toAccountType)?1:-1)}}function Ui(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function zi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.instructionType.value,"/",i.amount," ")}}function Gi(t,p){if(t&1&&(a(0,"td",27),C(1,zi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.instructionType&&(i==null?null:i.amount)!==void 0?1:-1)}}function ji(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Validity")))}function Qi(t,p){if(t&1&&(r(0),o(1,"dateFormat"),o(2,"dateFormat")),t&2){let i=x().$implicit;g(" ",l(1,2,i.validFrom)," to ",l(2,4,i.validTill)," ")}}function Wi(t,p){if(t&1&&(a(0,"td",27),C(1,Qi,3,6),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.validFrom&&(i!=null&&i.validTill)?1:-1)}}function Yi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Actions")))}function Ji(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",30),n()),t&2){let i=x(2).$implicit;d("matTooltip",O(l(1,4,"tooltips.Edit Standing Instruction")))("routerLink",nt(8,yi,i.id)),At("aria-label",l(2,6,"tooltips.Edit Standing Instruction"))}}function Ki(t,p){t&1&&(a(0,"span"),y(1,Ji,4,10,"button",28),n()),t&2&&(e(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Xi(t,p){if(t&1){let i=F();a(0,"button",32),o(1,"translate"),o(2,"translate"),h("click",function(){b(i);let s=x(2).$implicit,f=x();return S(f.deleteStandingInstruction(s.id))}),_(3,"i",33),n()}t&2&&(d("matTooltip",O(l(1,3,"tooltips.Delete Standing Instruction"))),At("aria-label",l(2,5,"tooltips.Delete Standing Instruction")))}function Zi(t,p){t&1&&(a(0,"span"),y(1,Xi,4,7,"button",31),n()),t&2&&(e(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ta(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",34),n()),t&2){let i=x().$implicit;d("matTooltip",O(l(1,4,"tooltips.View Standing Instruction")))("routerLink",nt(8,Ei,i.id)),At("aria-label",l(2,6,"tooltips.View Standing Instruction"))}}function ea(t,p){if(t&1&&(a(0,"td",27),C(1,Ki,2,1,"span"),C(2,Zi,2,1,"span"),y(3,ta,4,10,"button",28),n()),t&2){let i=p.$implicit;e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?1:-1),e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?2:-1),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function na(t,p){t&1&&_(0,"tr",35)}function ia(t,p){t&1&&_(0,"tr",36)}var re=(()=>{class t{constructor(){this.route=T($),this.accountTransfersService=T(B),this.settingsService=T(J),this.dialog=T(Ae),this.transferType=new Ft,this.fromAccountId=new Ft,this.clientNameControl=new Ft,this.fromClientId=new Ft,this.dataSource=new Ot,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.data.subscribe(i=>{this.standingIntructionsTemplateData=i.standingIntructionsTemplate,i.standingIntructionsTemplate.fromClient&&(this.clientName=this.standingIntructionsTemplateData.fromClient.displayName,this.getStandingInstructions()),this.setParams(),this.transferTypeDatas=this.standingIntructionsTemplateData.transferTypeOptions})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}this.isFromClient=!!this.route.parent.parent.snapshot.params.clientId}filterStandingInstructions(){this.getStandingInstructions()}getStandingInstructions(){let i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={clientId:this.standingIntructionsTemplateData.fromClient.id||this.fromClientId.value,clientName:this.standingIntructionsTemplateData.fromClient.displayName||this.clientNameControl.value,locale:m,dateFormat:i,limit:14,offset:0,fromAccountType:this.accountTypeId,fromAccountId:this.fromAccountId.value,fromTransferType:this.transferType.value};this.accountTransfersService.getStandingInstructions(s).subscribe(f=>{this.instructionsData=f.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(i){this.dialog.open(qe,{data:{deleteContext:`standing instruction id: ${i}`}}).afterClosed().subscribe(s=>{s.delete&&this.accountTransfersService.deleteStandingInstrucions(i).subscribe(()=>{})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-standing-instructions"]],viewQuery:function(m,s){if(m&1&&(Mt(bi,7),Mt(Et,7)),m&2){let f;kt(f=Bt())&&(s.instructionTableRef=f.first),kt(f=Bt())&&(s.paginator=f.first)}},decls:47,vars:20,consts:[["instructionsTable",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","gap-20px","responsive-column"],[1,"flex-100","layout-row","align-items-center","gap-20px"],[1,"flex-48"],[3,"formControl"],[3,"value"],["matInput","",3,"formControl"],[1,"table-container"],["mat-table","",1,"bordered-table",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],["mat-raised-button","","color","primary",3,"click"],[1,"mat-h3","no-m-b"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip","routerLink"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(m,s){m&1&&(a(0,"div",1),y(1,Di,4,5,"button",2),n(),a(2,"mat-card",3)(3,"mat-card-content")(4,"div",4),C(5,Ai,8,4,"div",5),C(6,Mi,10,8),a(7,"mat-form-field",6)(8,"mat-label"),r(9),o(10,"translate"),n(),a(11,"mat-select",7),D(12,ki,2,2,"mat-option",8,E),n()(),a(14,"mat-form-field",6)(15,"mat-label"),r(16),o(17,"translate"),n(),_(18,"input",9),n()()(),a(19,"div",10)(20,"table",11,0),o(22,"translate"),N(23,12),y(24,Bi,3,3,"th",13)(25,Fi,2,1,"td",14),q(),N(26,15),y(27,Oi,3,3,"th",13)(28,Ni,2,1,"td",14),q(),N(29,16),y(30,qi,3,3,"th",13)(31,Ri,2,1,"td",14),q(),N(32,17),y(33,Li,3,3,"th",13)(34,$i,2,1,"td",14),q(),N(35,18),y(36,Ui,3,3,"th",13)(37,Gi,2,1,"td",14),q(),N(38,19),y(39,ji,3,3,"th",13)(40,Wi,2,1,"td",14),q(),N(41,20),y(42,Yi,3,3,"th",13)(43,ea,4,3,"td",14),q(),y(44,na,1,0,"tr",21)(45,ia,1,0,"tr",22),n(),_(46,"mat-paginator",23),n()()),m&2&&(e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION"),e(4),v(s.isFromClient?5:-1),e(),v(s.isFromClient?-1:6),e(3),c(l(10,13,"labels.inputs.Type")),e(2),d("formControl",s.transferType),e(),A(s.transferTypeDatas),e(4),c(l(17,15,"labels.text.FromAccountId")),e(2),d("formControl",s.fromAccountId),e(2),d("dataSource",s.dataSource),At("aria-label",l(22,17,"labels.heading.List Standing Instructions")),e(24),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSize",10)("pageSizeOptions",G(19,Si)))},dependencies:[V,L,K,X,Be,Y,U,z,tt,Z,et,dt,mt,Q,W,$t,Gt,zt,jt,Ut,Qt,Ne,Wt,Jt,Yt,Kt,Et,De,Ct,R],styles:[".container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{margin-top:1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:1.625rem;padding:0 .375rem;margin:.25rem;line-height:1.5625rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.75rem 1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0}"]})}}return t})();var aa=()=>[5,10,25,50,100];function ra(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Transaction Date")))}function oa(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"dateFormat"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.transferDate))}}function la(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function sa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferAmount)}}function ca(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Notes")))}function pa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferDescription)}}function ma(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Reversed")))}function da(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"yesNo"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.reversed))}}function ua(t,p){t&1&&_(0,"tr",18)}function fa(t,p){t&1&&_(0,"tr",19)}var oe=(()=>{class t{constructor(){this.route=T($),this.dataSource=new Ot,this.displayedColumns=["transactionDate","amount","notes","reversed"],this.route.data.subscribe(i=>{this.listTransactionData=i.listTransactionData,this.dataSource=new Ot(this.listTransactionData.transactions.pageItems),this.dataSource.paginator=this.paginator})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-transactions"]],viewQuery:function(m,s){if(m&1&&Mt(Et,7),m&2){let f;kt(f=Bt())&&(s.paginator=f.first)}},decls:36,vars:19,consts:[[1,"container","m-b-20"],[1,"mat-elevation-z8"],[1,"layout-row-wrap"],[1,"flex-25","header"],[1,"flex-25"],[1,"mat-elevation-z8","container"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","notes"],["matColumnDef","reversed"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,s){m&1&&(a(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"div",3),r(5),o(6,"translate"),n(),a(7,"div",4),r(8),n(),a(9,"div",3),r(10),o(11,"translate"),n(),a(12,"div",4),r(13),n(),a(14,"div",3),r(15),o(16,"translate"),n(),a(17,"div",4),r(18),n()()()()(),a(19,"div",5)(20,"table",6),N(21,7),y(22,ra,3,3,"th",8)(23,oa,3,3,"td",9),q(),N(24,10),y(25,la,3,3,"th",8)(26,sa,2,1,"td",9),q(),N(27,11),y(28,ca,3,3,"th",8)(29,pa,2,1,"td",9),q(),N(30,12),y(31,ma,3,3,"th",8)(32,da,3,3,"td",9),q(),y(33,ua,1,0,"tr",13)(34,fa,1,0,"tr",14),n(),_(35,"mat-paginator",15),n()),m&2&&(e(5),u(" ",l(6,12,"labels.inputs.From Account")," "),e(3),g(" ",s.listTransactionData.fromAccount.accountNo,"(",s.listTransactionData.fromAccountType.value,") "),e(2),u(" ",l(11,14,"labels.inputs.To Account")," "),e(3),g(" ",s.listTransactionData.toAccount.accountNo,"(",s.listTransactionData.toAccountType.value,") "),e(2),u(" ",l(16,16,"labels.inputs.Destination")," "),e(3),u(" ",s.listTransactionData.toClient.displayName," "),e(2),d("dataSource",s.dataSource),e(13),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSizeOptions",G(18,aa)))},dependencies:[V,L,U,z,$t,Gt,zt,jt,Ut,Qt,Wt,Jt,Yt,Kt,Et,Ct,R,He],styles:[".content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:3rem}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();function _a(t,p){t&1&&(a(0,"button",15),_(1,"fa-icon",16),r(2),o(3,"translate"),n()),t&2&&(e(2),u("",l(3,1,"labels.buttons.Undo")," "))}function Ca(t,p){t&1&&(a(0,"span"),y(1,_a,4,3,"button",14),n()),t&2&&(e(),d("mifosxHasPermission","ADJUST_ACCOUNTTRANSFER"))}function va(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.fromAccountType.value)," ")}}function ga(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.toAccountType.value)," ")}}var le=(()=>{class t{constructor(){this.route=T($),this.location=T(Se),this.route.data.subscribe(i=>{this.viewAccountTransferData=i.viewAccountTransferData})}transferToClient(i){return`/#/clients/${i.id}`}transferToAccount(i,m){return`/#/clients/${i.id}/savings-accounts/${m.id}`}goBack(){this.location.back()}transactionColor(){return this.viewAccountTransferData.reversed?"undo":"active"}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-account-transfer"]],decls:97,vars:66,consts:[[1,"container"],[1,"container","m-b-20","align-end","gap-2px"],[1,"transfer-container"],[1,"status-indicator",3,"ngClass"],[1,"transfer-section"],[1,"section-title"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],["class","info-value",4,"ngIf"],[3,"href"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","warn",4,"mifosxHasPermission"],["mat-raised-button","","color","warn"],["icon","undo",1,"m-r-10"]],template:function(m,s){m&1&&(a(0,"div",0)(1,"div",1),C(2,Ca,2,1,"span"),n(),a(3,"mat-card")(4,"mat-card-content")(5,"div",2),_(6,"div",3),a(7,"section",4)(8,"h3",5),r(9),o(10,"translate"),n(),_(11,"mat-divider"),a(12,"div",6)(13,"div",7)(14,"span",8),r(15),o(16,"translate"),n(),a(17,"span",9),r(18),o(19,"formatNumber"),n()(),a(20,"div",7)(21,"span",8),r(22),o(23,"translate"),n(),a(24,"span",9),r(25),o(26,"dateFormat"),n()(),a(27,"div",7)(28,"span",8),r(29),o(30,"translate"),n(),a(31,"span",9),r(32),n()()()(),a(33,"section",4)(34,"h3",5),r(35),o(36,"translate"),n(),_(37,"mat-divider"),a(38,"div",6)(39,"div",7)(40,"span",8),r(41),o(42,"translate"),n(),a(43,"span",9),r(44),n()(),a(45,"div",7)(46,"span",8),r(47),o(48,"translate"),n(),a(49,"span",9),r(50),n()(),a(51,"div",7)(52,"span",8),r(53),o(54,"translate"),n(),y(55,va,3,3,"span",10),n(),a(56,"div",7)(57,"span",8),r(58),o(59,"translate"),n(),a(60,"span",9),r(61),n()()()(),a(62,"section",4)(63,"h3",5),r(64),o(65,"translate"),n(),_(66,"mat-divider"),a(67,"div",6)(68,"div",7)(69,"span",8),r(70),o(71,"translate"),n(),a(72,"span",9),r(73),n()(),a(74,"div",7)(75,"span",8),r(76),o(77,"translate"),n(),a(78,"span",9)(79,"a",11),r(80),n()()(),a(81,"div",7)(82,"span",8),r(83),o(84,"translate"),n(),y(85,ga,3,3,"span",10),n(),a(86,"div",7)(87,"span",8),r(88),o(89,"translate"),n(),a(90,"span",9)(91,"a",11),r(92),n()()()()()()(),a(93,"mat-card-actions",12)(94,"button",13),h("click",function(){return s.goBack()}),r(95),o(96,"translate"),n()()()()),m&2&&(e(2),v(s.viewAccountTransferData.reversed?-1:2),e(4),d("ngClass",s.transactionColor()),e(3),c(l(10,32,"labels.heading.Transaction Details")),e(6),u("",l(16,34,"labels.inputs.Transaction Amount"),":"),e(3),Te(" ",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.displaySymbol," ",l(19,36,s.viewAccountTransferData.transferAmount)," (",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.code,") "),e(4),u("",l(23,38,"labels.inputs.Transaction Date"),":"),e(3),c(l(26,40,s.viewAccountTransferData.transferDate)),e(4),u("",l(30,42,"labels.inputs.Destination"),":"),e(3),c(s.viewAccountTransferData.transferDescription),e(3),c(l(36,44,"labels.heading.Transferred From")),e(6),u("",l(42,46,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.fromOffice==null?null:s.viewAccountTransferData.fromOffice.name),e(3),u("",l(48,48,"labels.inputs.Client"),":"),e(3),c(s.viewAccountTransferData.fromClient==null?null:s.viewAccountTransferData.fromClient.displayName),e(3),u("",l(54,50,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.fromAccountType==null?null:s.viewAccountTransferData.fromAccountType.value),e(3),u("",l(59,52,"labels.inputs.Account No"),":"),e(3),c(s.viewAccountTransferData.fromAccount==null?null:s.viewAccountTransferData.fromAccount.accountNo),e(3),c(l(65,54,"labels.heading.Transferred To")),e(6),u("",l(71,56,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.toOffice==null?null:s.viewAccountTransferData.toOffice.name),e(3),u("",l(77,58,"labels.inputs.Client"),":"),e(3),d("href",s.transferToClient(s.viewAccountTransferData.toClient),ce),e(),u(" ",s.viewAccountTransferData.toClient==null?null:s.viewAccountTransferData.toClient.displayName," "),e(3),u("",l(84,60,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.toAccountType==null?null:s.viewAccountTransferData.toAccountType.value),e(3),u("",l(89,62,"labels.inputs.Account No"),":"),e(3),d("href",s.transferToAccount(s.viewAccountTransferData.toClient,s.viewAccountTransferData.toAccount),ce),e(),u(" ",s.viewAccountTransferData.toAccount==null?null:s.viewAccountTransferData.toAccount.accountNo," "),e(3),u(" ",l(96,64,"labels.buttons.Back")," "))},dependencies:[V,ye,Ee,L,U,z,st,Q,W,vt,yt,Ct,R,Le],styles:[".transfer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;position:relative;padding-left:20px}.status-indicator[_ngcontent-%COMP%]{position:absolute;top:0;left:-16px;width:4px;height:100%;border-radius:2px}.transfer-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-title[_ngcontent-%COMP%]{margin:0;font-size:1.125rem;font-weight:500}mat-divider[_ngcontent-%COMP%]{margin-bottom:.5rem}.info-grid[_ngcontent-%COMP%]{display:grid;gap:.75rem}.info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(150px,200px) auto;gap:1rem;align-items:start}@media (width <= 768px){.info-row[_ngcontent-%COMP%]{grid-template-columns:100%;gap:.25rem}}.info-label[_ngcontent-%COMP%]{font-weight:500}@media (width <= 768px){.info-label[_ngcontent-%COMP%]{font-size:.875rem}}.info-value[_ngcontent-%COMP%]{word-break:break-word}.info-value[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}"]})}}return t})();var _e=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsData(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ce=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsDataAndTemplate(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var se=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.queryParamMap.get("officeId"),s=i.queryParamMap.get("accountType"),f=i.parent.paramMap.get("clientId");switch(s){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}return this.accountTransfersService.getStandingInstructionsTemplate(f,m,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ve=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){switch(i.queryParamMap.get("accountType")){case"fromloans":this.accountTypeId="1",this.id=i.queryParamMap.get("loanId");break;case"fromsavings":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;case"interbank":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;default:this.accountTypeId="0"}return this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ge=(()=>{class t{constructor(){this.accountTransfersService=T(B),this.settingsService=T(J)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId"),s=this.settingsService.dateFormat,f=this.settingsService.language.code;return this.accountTransfersService.getStandingInstructionsTransactions(m,s,f)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ie=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.paramMap.get("transferid");return this.accountTransfersService.getViewAccountTransferDetails(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ia=[{path:"",children:[{path:"create-standing-instructions",data:{title:"Create Standing Instructions",breadcrumb:"Create Standing Instructions",routeParamBreadcrumb:"Create Standing Instructions"},component:ie,resolve:{standingIntructionsTemplate:se}},{path:"make-account-transfer",data:{title:"Account Transfer",breadcrumb:"Account Transfer",routeParamBreadcrumb:"Account Transfer"},component:ae,resolve:{accountTransferTemplate:ve}},{path:"list-standing-instructions",data:{title:"List Standing Instructions",breadcrumb:"List Standing Instructions",routeParamBreadcrumb:"List Standing Instructions"},component:re,resolve:{standingIntructionsTemplate:se}},{path:"account-transfers",data:{title:"View Account Transfer",breadcrumb:"Account Transfers",routeParamBreadcrumb:!1},children:[{path:":transferid",data:{routeParamBreadcrumb:"transferid"},component:le,resolve:{viewAccountTransferData:Ie}}]},{path:":standingInstructionsId",data:{title:"Standing Instructions",routeParamBreadcrumb:"standingInstructionsId"},children:[{path:"view",data:{title:"View Standing Instructions",breadcrumb:"view",routeParamBreadcrumb:!1},component:Zt,resolve:{standingInstructionsData:_e}},{path:"edit",data:{title:"Edit Standing Instructions",breadcrumb:"edit",routeParamBreadcrumb:!1},component:ne,resolve:{standingInstructionsDataAndTemplate:Ce}},{path:"list-account-transactions",data:{title:"List Account Transactions",breadcrumb:"List Account Transactions",routeParamBreadcrumb:"List Account Transactions"},component:oe,resolve:{listTransactionData:ge}}]}]}],Qe=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({providers:[_e,Ce,se,ve,ge,Ie],imports:[pe.forChild(Ia),pe]})}}return t})();var Ta=t=>({balance:t});function xa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ha(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ba(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",15),r(2),o(3,"translate"),n()),t&2){let i=x();e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,Ta,i.balance))," ")}}function Sa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}var We=(()=>{class t{constructor(){this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-make-account-interbank-transfers"]],inputs:{makeAccountTransferForm:"makeAccountTransferForm",balance:"balance"},decls:45,vars:30,consts:[["transferDatePicker",""],["amntInput",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-98",3,"click"],["matInput","","required","","formControlName","transferDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-98"],["matInput","","formControlName","toBank"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccountId"],[1,"flex-98","error-warn"],["type","number","matInput","","required","","formControlName","transferAmount"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["icon","exclamation-triangle","size","md"]],template:function(m,s){if(m&1){let f=F();a(0,"form",2)(1,"div",3)(2,"mat-form-field",4),h("click",function(){b(f);let w=M(9);return S(w.open())}),a(3,"mat-label"),r(4),o(5,"translate"),n(),_(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),C(10,xa,7,9,"mat-error"),n(),a(11,"mat-form-field",7)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",7)(17,"mat-label"),r(18),o(19,"translate"),n(),_(20,"input",9),n(),a(21,"mat-form-field",7)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",10),n(),a(26,"mat-form-field",7)(27,"mat-label"),r(28),o(29,"translate"),n(),_(30,"input",11),n(),a(31,"mat-form-field",12)(32,"mat-label"),r(33),o(34,"translate"),n(),_(35,"input",13,1),C(37,ha,7,9,"mat-error"),C(38,ba,4,6,"mat-error"),n(),a(39,"mat-form-field",7)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"textarea",14),C(44,Sa,7,9,"mat-error"),n()()()}if(m&2){let f,k=M(9);d("formGroup",s.makeAccountTransferForm),e(4),c(l(5,16,"labels.inputs.Transaction Date")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?10:-1),e(3),c(l(14,18,"labels.inputs.Bank")),e(5),c(l(19,20,"labels.inputs.Client")),e(5),c(l(24,22,"labels.inputs.Account Type")),e(5),c(l(29,24,"labels.inputs.Account")),e(5),c(l(34,26,"labels.inputs.Amount")),e(4),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?37:-1),e(),v((f=s.makeAccountTransferForm.get("transferAmount"))!=null&&f.hasError("amountExceedsBalance")?38:-1),e(3),c(l(42,28,"labels.inputs.Description")),e(3),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?44:-1)}},dependencies:[V,L,at,K,bt,X,it,lt,rt,ot,tt,Z,ct,pt,et,ft,_t,ut,vt,Ht,R],styles:["h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ml=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({imports:[Ge,$e,ze,Qe,Zt,ne,ie,ae,re,oe,le,We]})}}return t})();export{ml as AccountTransfersModule}; +import{a as B}from"./chunk-GZ4W472E.js";import{$a as he,$c as it,$d as vt,Ae as yt,Af as Kt,Cc as Ae,Da as N,Dd as Z,Df as Ot,Ea as q,Eb as V,Ed as ct,Fd as Pe,G as j,Ga as F,H as Rt,Hd as pt,Ia as h,Id as tt,Ja as x,Jd as Ht,Je as Ve,K as T,Kd as et,Ke as Re,L as b,Lc as R,Ld as mt,M as S,Na as Mt,Nc as Me,Nd as dt,Oa as kt,Pa as Bt,Pd as Ne,Qa as M,Qd as ut,Rd as ft,Rg as Ge,Sc as ht,Sd as _t,Tc as J,Ua as r,Ud as Ct,Va as c,Wa as u,We as Et,Xa as g,Xd as W,Ya as Te,Yc as K,Zc as I,_ as ce,_a as xe,_c as X,ab as be,bb as O,ca as e,cd as Ft,dd as ke,de as qe,eb as G,ed as at,eg as Le,fb as nt,fd as bt,gc as $,gd as Be,gg as He,hb as o,hd as rt,hg as $e,ib as l,ig as Ue,ja as P,jb as wt,jc as xt,ka as Lt,kc as Y,kd as ot,mc as pe,md as we,na as y,nd as lt,nf as $t,of as Ut,pa as At,pb as Se,pd as Fe,pf as zt,qb as ye,qc as Q,ra as C,rd as St,rf as Gt,sa as v,sb as Ee,sd as Oe,sf as jt,ta as E,td as L,ua as D,ud as U,uf as Qt,va as A,vf as Wt,vg as ze,wa as d,xa as a,xd as z,xf as Yt,ya as n,yf as Jt,za as _,zb as De,zd as st}from"./chunk-2XE77LT4.js";import{a as qt,b as Vt}from"./chunk-PHUH23IY.js";var Ye=()=>["../","edit"],Je=()=>["../","list-account-transactions"];function Ke(t,p){t&1&&(a(0,"button",1),r(1),o(2,"translate"),n()),t&2&&(d("routerLink",G(4,Je)),e(),u(" ",l(2,2,"labels.buttons.View Transactions History")," "))}function Xe(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Within Bank")," "))}function Ze(t,p){t&1&&(a(0,"span"),r(1),o(2,"translate"),n()),t&2&&(e(),u(" ",l(2,1,"labels.inputs.Own Account")," "))}var Zt=(()=>{class t{constructor(){this.route=T($),this.allowclientedit=!1,this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsData,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1)})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-standing-instructions"]],decls:125,vars:90,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"mat-h2","flex-fill"],[3,"inset"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"]],template:function(m,s){m&1&&(a(0,"div",0)(1,"button",1),_(2,"fa-icon",2),r(3),o(4,"translate"),n(),y(5,Ke,3,5,"button",3),n(),a(6,"div",4)(7,"mat-card")(8,"mat-card-content")(9,"div",5)(10,"h2",6),r(11),n(),_(12,"mat-divider",7),a(13,"div",8)(14,"span",9),r(15),o(16,"translate"),n(),a(17,"span",10),r(18),n()(),a(19,"div",8)(20,"span",9),r(21),o(22,"translate"),n(),a(23,"span",10),r(24),n()(),a(25,"div",8)(26,"span",9),r(27),o(28,"translate"),n(),a(29,"span",10),r(30),n()(),a(31,"div",8)(32,"span",9),r(33),o(34,"translate"),n(),a(35,"span",10),r(36),n()(),a(37,"div",8)(38,"span",9),r(39),o(40,"translate"),n(),a(41,"span",10),r(42),n()(),a(43,"div",8)(44,"span",9),r(45),o(46,"translate"),n(),a(47,"span",10),r(48),n()(),a(49,"div",8)(50,"span",9),r(51),o(52,"translate"),n(),a(53,"span",10),C(54,Xe,3,3,"span"),C(55,Ze,3,3,"span"),n()(),a(56,"div",8)(57,"span",9),r(58),o(59,"translate"),n(),a(60,"span",10),r(61),n()(),a(62,"div",8)(63,"span",9),r(64),o(65,"translate"),n(),a(66,"span",10),r(67),n()(),a(68,"div",8)(69,"span",9),r(70),o(71,"translate"),n(),a(72,"span",10),r(73),n()(),a(74,"div",8)(75,"span",9),r(76),o(77,"translate"),n(),a(78,"span",10),r(79),n()(),a(80,"div",8)(81,"span",9),r(82),o(83,"translate"),n(),a(84,"span",10),r(85),n()(),a(86,"div",8)(87,"span",9),r(88),o(89,"translate"),n(),a(90,"span",10),r(91),n()(),a(92,"div",8)(93,"span",9),r(94),o(95,"translate"),n(),a(96,"span",10),r(97),o(98,"dateFormat"),o(99,"dateFormat"),n()(),a(100,"div",8)(101,"span",9),r(102),o(103,"translate"),n(),a(104,"span",10),r(105),n()(),a(106,"div",8)(107,"span",9),r(108),o(109,"translate"),n(),a(110,"span",10),r(111),n()(),a(112,"div",8)(113,"span",9),r(114),o(115,"translate"),n(),a(116,"span",10),r(117),n()(),a(118,"div",8)(119,"span",9),r(120),o(121,"translate"),n(),a(122,"span",10),r(123),o(124,"dateFormat"),n()()()()()()),m&2&&(e(),d("routerLink",G(89,Ye)),e(2),u(" ",l(4,45,"labels.buttons.Edit")," "),e(2),d("mifosxHasPermission","READ_ACCOUNTTRANSFER"),e(6),c(s.standingInstructionsData.name),e(),d("inset",!0),e(3),u("",l(16,47,"labels.inputs.Applicant"),":"),e(3),c(s.standingInstructionsData.fromClient.displayName),e(3),u("",l(22,49,"labels.inputs.Type"),":"),e(3),c(s.standingInstructionsData.transferType.value),e(3),u("",l(28,51,"labels.inputs.Priority"),":"),e(3),c(s.standingInstructionsData.priority.value),e(3),u("",l(34,53,"labels.inputs.Status"),":"),e(3),c(s.standingInstructionsData.status.value),e(3),u("",l(40,55,"labels.inputs.From Account Type"),":"),e(3),c(s.standingInstructionsData.fromAccountType.value),e(3),u("",l(46,57,"labels.inputs.From Account"),":"),e(3),g("",s.standingInstructionsData.fromAccount.productName," - ",s.standingInstructionsData.fromAccount.accountNo),e(3),u("",l(52,59,"labels.inputs.Destination"),":"),e(3),v(s.allowclientedit?54:-1),e(),v(s.allowclientedit?-1:55),e(3),u("",l(59,61,"labels.inputs.To Office"),":"),e(3),c(s.standingInstructionsData.toOffice.name),e(3),u("",l(65,63,"labels.inputs.Beneficiary"),":"),e(3),c(s.standingInstructionsData.toClient.displayName),e(3),u("",l(71,65,"labels.inputs.To Account Type"),":"),e(3),c(s.standingInstructionsData.toAccountType.value),e(3),u("",l(77,67,"labels.inputs.To Account"),":"),e(3),g("",s.standingInstructionsData.toAccount.productName," - ",s.standingInstructionsData.toAccount.accountNo),e(3),u("",l(83,69,"labels.inputs.Standing Instruction Type"),":"),e(3),c(s.standingInstructionsData.instructionType.value),e(3),u("",l(89,71,"labels.inputs.Amount"),":"),e(3),c(s.standingInstructionsData.amount),e(3),u("",l(95,73,"labels.inputs.Validity"),":"),e(3),g("",l(98,75,s.standingInstructionsData.validFrom)," - ",l(99,77,s.standingInstructionsData.validTill)),e(5),u("",l(103,79,"labels.inputs.Recurrence Type"),":"),e(3),c(s.standingInstructionsData.recurrenceType.value),e(3),u("",l(109,81,"labels.inputs.Interval"),":"),e(3),c(s.standingInstructionsData.recurrenceInterval),e(3),u("",l(115,83,"labels.inputs.Recurrence Frequency"),":"),e(3),c(s.standingInstructionsData.recurrenceFrequency.value),e(3),u("",l(121,85,"labels.inputs.On Month Day"),":"),e(3),c(l(124,87,s.standingInstructionsData.recurrenceOnMonthDay)))},dependencies:[V,L,Y,U,z,Q,W,vt,yt,Ct,R],styles:[".mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 1em}"]})}}return t})();var tn=()=>["../view"];function en(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function an(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function on(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ln(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function cn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function pn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function mn(t,p){if(t&1&&(a(0,"mat-option",12),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function dn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.editStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ne=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.allowclientedit=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.route.data.subscribe(i=>{this.standingInstructionsData=i.standingInstructionsDataAndTemplate,this.standingInstructionsId=i.standingInstructionsDataAndTemplate.id,this.standingInstructionsData.fromClient.id===this.standingInstructionsData.toClient.id&&(this.allowclientedit=!1),this.setOptions()})}ngOnInit(){this.createEditStandingInstructionsForm();let m=new Date().getFullYear();this.standingInstructionsData.recurrenceOnMonthDay&&this.standingInstructionsData.recurrenceOnMonthDay.push(m),this.editStandingInstructionsForm.patchValue({name:this.standingInstructionsData.name,applicant:this.standingInstructionsData.fromClient.displayName,type:this.standingInstructionsData.transferType.value,priority:this.standingInstructionsData.priority.id,status:this.standingInstructionsData.status.id,fromAccountType:this.standingInstructionsData.fromAccountType.value,fromAccount:this.standingInstructionsData.fromAccount.productName,destination:this.allowclientedit?"Within Bank":"Own Account",toOffice:this.standingInstructionsData.toOffice.name,toClientId:this.standingInstructionsData.toClient.displayName,toAccountType:this.standingInstructionsData.toAccountType.value,toAccount:this.standingInstructionsData.toAccount.productName,instructionType:this.standingInstructionsData.instructionType.id,amount:this.standingInstructionsData.amount,validFrom:this.standingInstructionsData.validFrom&&new Date(this.standingInstructionsData.validFrom),validTill:this.standingInstructionsData.validTill&&new Date(this.standingInstructionsData.validTill),recurrenceType:this.standingInstructionsData.recurrenceType.id,recurrenceInterval:this.standingInstructionsData.recurrenceInterval,recurrenceFrequency:this.standingInstructionsData.recurrenceFrequency.id,recurrenceOnMonthDay:this.standingInstructionsData.recurrenceOnMonthDay&&new Date(this.standingInstructionsData.recurrenceOnMonthDay)})}createEditStandingInstructionsForm(){this.editStandingInstructionsForm=this.formBuilder.group({name:[{value:"",disabled:!0}],applicant:[{value:"",disabled:!0}],type:[{value:"",disabled:!0}],priority:["",I.required],status:["",I.required],fromAccountType:[{value:"",disabled:!0}],fromAccount:[{value:"",disabled:!0}],destination:[{value:"",disabled:!0}],toOffice:[{value:"",disabled:!0}],toClientId:[{value:"",disabled:!0}],toAccountType:[{value:"",disabled:!0}],toAccount:[{value:"",disabled:!0}],instructionType:"",amount:"",validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:"",recurrenceFrequency:"",recurrenceOnMonthDay:""})}setOptions(){this.priorityTypeData=this.standingInstructionsData.priorityOptions,this.statusTypeData=this.standingInstructionsData.statusOptions,this.instructionTypeData=this.standingInstructionsData.instructionTypeOptions,this.recurrenceTypeData=this.standingInstructionsData.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingInstructionsData.recurrenceFrequencyOptions}submit(){let i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={amount:this.editStandingInstructionsForm.value.amount,dateFormat:i,instructionType:this.editStandingInstructionsForm.value.instructionType,locale:m,monthDayFormat:"dd MMMM",priority:this.editStandingInstructionsForm.value.priority,recurrenceFrequency:this.editStandingInstructionsForm.value.recurrenceFrequency,recurrenceInterval:this.editStandingInstructionsForm.value.recurrenceInterval,recurrenceOnMonthDay:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.recurrenceOnMonthDay,"dd MMMM"),recurrenceType:this.editStandingInstructionsForm.value.recurrenceType,status:this.editStandingInstructionsForm.value.status,validFrom:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validFrom,i),validTill:this.dateUtils.formatDate(this.editStandingInstructionsForm.value.validTill,i)};this.accountTransfersService.updateStandingInstructionsData(this.standingInstructionsId,s).subscribe(f=>{this.router.navigate(["../view"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-edit-standing-instructions"]],decls:134,vars:84,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","formControlName","name"],["matInput","","formControlName","applicant"],["matInput","","formControlName","type"],["matInput","","formControlName","fromAccountType"],["required","","formControlName","priority"],[3,"value"],["required","","formControlName","status"],["matInput","","formControlName","fromAccount"],["matInput","","formControlName","destination"],["matInput","","formControlName","toOffice"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccount"],["formControlName","instructionType"],["matInput","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["matInput","","formControlName","recurrenceInterval"],["formControlName","recurrenceFrequency"],["matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(m,s){if(m&1){let f=F();a(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",7),n(),a(10,"mat-form-field",6)(11,"mat-label"),r(12),o(13,"translate"),n(),_(14,"input",8),n(),a(15,"mat-form-field",6)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",9),n(),a(20,"mat-form-field",6)(21,"mat-label"),r(22),o(23,"translate"),n(),_(24,"input",10),n(),a(25,"mat-form-field",6)(26,"mat-label"),r(27),o(28,"translate"),n(),a(29,"mat-select",11),D(30,en,2,2,"mat-option",12,E),n(),C(32,nn,7,9,"mat-error"),n(),a(33,"mat-form-field",6)(34,"mat-label"),r(35),o(36,"translate"),n(),a(37,"mat-select",13),D(38,an,2,2,"mat-option",12,E),n(),C(40,rn,7,9,"mat-error"),n(),a(41,"mat-form-field",6)(42,"mat-label"),r(43),o(44,"translate"),n(),_(45,"input",14),n(),a(46,"mat-form-field",6)(47,"mat-label"),r(48),o(49,"translate"),n(),_(50,"input",15),n(),a(51,"mat-form-field",6)(52,"mat-label"),r(53),o(54,"translate"),n(),_(55,"input",16),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),_(60,"input",17),n(),a(61,"mat-form-field",6)(62,"mat-label"),r(63),o(64,"translate"),n(),_(65,"input",18),n(),a(66,"mat-form-field",6)(67,"mat-label"),r(68),o(69,"translate"),n(),_(70,"input",19),n(),a(71,"mat-form-field",6)(72,"mat-label"),r(73),o(74,"translate"),n(),a(75,"mat-select",20),D(76,on,2,2,"mat-option",12,E),n()(),a(78,"mat-form-field",6)(79,"mat-label"),r(80),o(81,"translate"),n(),_(82,"input",21),n(),a(83,"mat-form-field",22),h("click",function(){b(f);let w=M(90);return S(w.open())}),a(84,"mat-label"),r(85),o(86,"translate"),n(),_(87,"input",23)(88,"mat-datepicker-toggle",24)(89,"mat-datepicker",null,0),C(91,ln,7,9,"mat-error"),n(),a(92,"mat-form-field",22),h("click",function(){b(f);let w=M(99);return S(w.open())}),a(93,"mat-label"),r(94),o(95,"translate"),n(),_(96,"input",25)(97,"mat-datepicker-toggle",24)(98,"mat-datepicker",null,1),C(100,sn,7,9,"mat-error"),n(),a(101,"mat-form-field",6)(102,"mat-label"),r(103),o(104,"translate"),n(),a(105,"mat-select",26),D(106,cn,2,2,"mat-option",12,E),n(),C(108,pn,7,9,"mat-error"),n(),a(109,"mat-form-field",6)(110,"mat-label"),r(111),o(112,"translate"),n(),_(113,"input",27),n(),a(114,"mat-form-field",6)(115,"mat-label"),r(116),o(117,"translate"),n(),a(118,"mat-select",28),D(119,mn,2,2,"mat-option",12,E),n()(),a(121,"mat-form-field",22),h("click",function(){b(f);let w=M(128);return S(w.open())}),a(122,"mat-label"),r(123),o(124,"translate"),n(),_(125,"input",29)(126,"mat-datepicker-toggle",24)(127,"mat-datepicker",null,2),n()()(),a(129,"mat-card-actions",30)(130,"button",31),r(131),o(132,"translate"),n(),y(133,dn,3,4,"button",32),n()()()()}if(m&2){let f=M(90),k=M(99),w=M(128);e(2),d("formGroup",s.editStandingInstructionsForm),e(5),c(l(8,41,"labels.inputs.name")),e(5),c(l(13,43,"labels.inputs.Applicant")),e(5),c(l(18,45,"labels.inputs.Type")),e(5),c(l(23,47,"labels.inputs.From Account Type")),e(5),c(l(28,49,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.editStandingInstructionsForm.controls.priority.hasError("required")?32:-1),e(3),c(l(36,51,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.editStandingInstructionsForm.controls.status.hasError("required")?40:-1),e(3),c(l(44,53,"labels.inputs.From Account")),e(5),c(l(49,55,"labels.inputs.Destination")),e(5),c(l(54,57,"labels.inputs.To Office")),e(5),c(l(59,59,"labels.inputs.Beneficiary")),e(5),c(l(64,61,"labels.inputs.To Account Type")),e(5),c(l(69,63,"labels.inputs.To Account")),e(5),c(l(74,65,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(4),c(l(81,67,"labels.inputs.Amount")),e(5),c(l(86,69,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.editStandingInstructionsForm.controls.validFrom.hasError("required")?91:-1),e(3),c(l(95,71,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.editStandingInstructionsForm.controls.validTill.hasError("required")?100:-1),e(3),c(l(104,73,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.editStandingInstructionsForm.controls.recurrenceType.hasError("required")?108:-1),e(3),c(l(112,75,"labels.inputs.Interval")),e(5),c(l(117,77,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(4),c(l(124,79,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",w),e(),d("for",w),e(4),d("routerLink",G(83,tn)),e(),u(" ",l(132,81,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var un=()=>["../"];function fn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.name")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function _n(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Cn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.inputs.required")))}function vn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Priority")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function In(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Tn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Status")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function xn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function Sn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.From Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function yn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function En(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Destination")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Dn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function An(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Mn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.displayName," ")}}function kn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Beneficiary")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Bn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function wn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Fn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function On(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.To Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Pn(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Nn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Standing Instruction Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function qn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Vn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid From Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Rn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Valid Till Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Ln(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Hn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function $n(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Interval")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Un(t,p){if(t&1&&(a(0,"mat-option",10),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Recurrence Frequency")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function Gn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.On Month Day")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function jn(t,p){if(t&1){let i=F();a(0,"button",33),h("click",function(){b(i);let s=x();return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x();d("disabled",!i.createStandingInstructionsForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}var ie=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.settingsService=T(J),this.dateUtils=T(ht),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.allowclientedit=!0,this.route.data.subscribe(i=>{this.standingIntructionsTemplate=i.standingIntructionsTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.officeId=this.route.snapshot.queryParams.officeId,this.accountType=this.route.snapshot.queryParams.accountType,this.clientId=this.route.parent.snapshot.params.clientId,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}}ngOnInit(){this.createCreateStandingInstructionsForm(),this.buildDependencies(),this.createStandingInstructionsForm.patchValue({applicant:this.standingIntructionsTemplate.fromClient.displayName})}createCreateStandingInstructionsForm(){this.createStandingInstructionsForm=this.formBuilder.group({name:["",I.required],applicant:[{value:"",disabled:!0}],transferType:["",I.required],priority:["",I.required],status:["",I.required],fromAccountType:["",I.required],fromAccountId:["",I.required],destination:["",I.required],toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],instructionType:["",I.required],amount:["",I.required],validFrom:["",I.required],validTill:["",I.required],recurrenceType:["",I.required],recurrenceInterval:["",I.required],recurrenceFrequency:["",I.required],recurrenceOnMonthDay:["",I.required]})}setOptions(){this.transferTypeData=this.standingIntructionsTemplate.transferTypeOptions,this.priorityTypeData=this.standingIntructionsTemplate.priorityOptions,this.statusTypeData=this.standingIntructionsTemplate.statusOptions,this.fromAccountTypeData=this.standingIntructionsTemplate.fromAccountTypeOptions,this.fromAccountData=this.standingIntructionsTemplate.fromAccountOptions,this.destinationTypeData=[{id:1,value:"own account"},{id:2,value:"with in bank"}],this.toOfficeTypeData=this.standingIntructionsTemplate.toOfficeOptions,this.toClientTypeData=this.standingIntructionsTemplate.toClientOptions,this.toAccountTypeData=this.standingIntructionsTemplate.toAccountTypeOptions,this.toAccountData=this.standingIntructionsTemplate.toAccountOptions,this.instructionTypeData=this.standingIntructionsTemplate.instructionTypeOptions,this.recurrenceTypeData=this.standingIntructionsTemplate.recurrenceTypeOptions,this.recurrenceFrequencyTypeData=this.standingIntructionsTemplate.recurrenceFrequencyOptions}buildDependencies(){this.createStandingInstructionsForm.get("destination").valueChanges.subscribe(i=>{i===1?(this.allowclientedit=!1,this.createStandingInstructionsForm.patchValue({toOfficeId:this.officeId,toClientId:this.clientId}),this.ToOfficeId=!0,this.ToClientId=!0,this.changeEvent()):(this.allowclientedit=!0,this.createStandingInstructionsForm.patchValue({toOfficeId:"",toClientId:""}),this.createStandingInstructionsForm.controls.toOfficeId.enable(),this.createStandingInstructionsForm.controls.toClientId.enable())})}changeEvent(){let i=this.refineObject(this.createStandingInstructionsForm.value);this.accountTransfersService.getStandingInstructionsTemplate(this.clientId,this.officeId,this.accountTypeId,i).subscribe(m=>{this.standingIntructionsTemplate=m,this.setOptions()})}refineObject(i){let m=Object.getOwnPropertyNames(i);for(let s=0;s{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-create-standing-instructions"]],decls:164,vars:100,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["recurrenceOnMonthDayDatePicker",""],[1,"container"],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["matInput","","required","","formControlName","name"],["matInput","","formControlName","applicant"],["required","","formControlName","transferType",3,"selectionChange"],[3,"value"],["required","","formControlName","priority"],["required","","formControlName","status"],["required","","formControlName","fromAccountType",3,"selectionChange"],["required","","formControlName","fromAccountId",3,"selectionChange"],["required","","formControlName","destination"],["required","","formControlName","toOfficeId",3,"selectionChange","disabled"],["required","","formControlName","toClientId",3,"selectionChange","disabled"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["formControlName","instructionType"],["type","number","matInput","","required","","formControlName","amount"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","validFrom",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","validTill",3,"min","max","matDatepicker"],["required","","formControlName","recurrenceType"],["type","number","matInput","","required","","formControlName","recurrenceInterval"],["required","","formControlName","recurrenceFrequency"],["required","","matInput","","formControlName","recurrenceOnMonthDay",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(m,s){if(m&1){let f=F();a(0,"div",3)(1,"mat-card")(2,"form",4)(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",7),C(10,fn,7,9,"mat-error"),n(),a(11,"mat-form-field",6)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",6)(17,"mat-label"),r(18),o(19,"translate"),n(),a(20,"mat-select",9),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(21,_n,2,2,"mat-option",10,E),n(),C(23,Cn,7,9,"mat-error"),n(),a(24,"mat-form-field",6)(25,"mat-label"),r(26),o(27,"translate"),n(),a(28,"mat-select",11),D(29,vn,2,2,"mat-option",10,E),n(),C(31,gn,7,9,"mat-error"),n(),a(32,"mat-form-field",6)(33,"mat-label"),r(34),o(35,"translate"),n(),a(36,"mat-select",12),D(37,In,2,2,"mat-option",10,E),n(),C(39,Tn,7,9,"mat-error"),n(),a(40,"mat-form-field",6)(41,"mat-label"),r(42),o(43,"translate"),n(),a(44,"mat-select",13),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(45,xn,2,2,"mat-option",10,E),n(),C(47,hn,7,9,"mat-error"),n(),a(48,"mat-form-field",6)(49,"mat-label"),r(50),o(51,"translate"),n(),a(52,"mat-select",14),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(53,bn,2,3,"mat-option",10,E),n(),C(55,Sn,7,9,"mat-error"),n(),a(56,"mat-form-field",6)(57,"mat-label"),r(58),o(59,"translate"),n(),a(60,"mat-select",15),D(61,yn,2,2,"mat-option",10,E),n(),C(63,En,7,9,"mat-error"),n(),a(64,"mat-form-field",6)(65,"mat-label"),r(66),o(67,"translate"),n(),a(68,"mat-select",16),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(69,Dn,2,2,"mat-option",10,E),n(),C(71,An,7,9,"mat-error"),n(),a(72,"mat-form-field",6)(73,"mat-label"),r(74),o(75,"translate"),n(),a(76,"mat-select",17),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(77,Mn,2,2,"mat-option",10,E),n(),C(79,kn,7,9,"mat-error"),n(),a(80,"mat-form-field",6)(81,"mat-label"),r(82),o(83,"translate"),n(),a(84,"mat-select",18),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(85,Bn,2,2,"mat-option",10,E),n(),C(87,wn,7,9,"mat-error"),n(),a(88,"mat-form-field",6)(89,"mat-label"),r(90),o(91,"translate"),n(),a(92,"mat-select",19),h("selectionChange",function(){return b(f),S(s.changeEvent())}),D(93,Fn,2,3,"mat-option",10,E),n(),C(95,On,7,9,"mat-error"),n(),a(96,"mat-form-field",6)(97,"mat-label"),r(98),o(99,"translate"),n(),a(100,"mat-select",20),D(101,Pn,2,2,"mat-option",10,E),n(),C(103,Nn,7,9,"mat-error"),n(),a(104,"mat-form-field",6)(105,"mat-label"),r(106),o(107,"translate"),n(),_(108,"input",21),C(109,qn,7,9,"mat-error"),n(),a(110,"mat-form-field",22),h("click",function(){b(f);let w=M(117);return S(w.open())}),a(111,"mat-label"),r(112),o(113,"translate"),n(),_(114,"input",23)(115,"mat-datepicker-toggle",24)(116,"mat-datepicker",null,0),C(118,Vn,7,9,"mat-error"),n(),a(119,"mat-form-field",22),h("click",function(){b(f);let w=M(126);return S(w.open())}),a(120,"mat-label"),r(121),o(122,"translate"),n(),_(123,"input",25)(124,"mat-datepicker-toggle",24)(125,"mat-datepicker",null,1),C(127,Rn,7,9,"mat-error"),n(),a(128,"mat-form-field",6)(129,"mat-label"),r(130),o(131,"translate"),n(),a(132,"mat-select",26),D(133,Ln,2,2,"mat-option",10,E),n(),C(135,Hn,7,9,"mat-error"),n(),a(136,"mat-form-field",6)(137,"mat-label"),r(138),o(139,"translate"),n(),_(140,"input",27),C(141,$n,7,9,"mat-error"),n(),a(142,"mat-form-field",6)(143,"mat-label"),r(144),o(145,"translate"),n(),a(146,"mat-select",28),D(147,Un,2,2,"mat-option",10,E),n(),C(149,zn,7,9,"mat-error"),n(),a(150,"mat-form-field",22),h("click",function(){b(f);let w=M(157);return S(w.open())}),a(151,"mat-label"),r(152),o(153,"translate"),n(),_(154,"input",29)(155,"mat-datepicker-toggle",24)(156,"mat-datepicker",null,2),C(158,Gn,7,9,"mat-error"),n()()(),a(159,"mat-card-actions",30)(160,"button",31),r(161),o(162,"translate"),n(),y(163,jn,3,4,"button",32),n()()()()}if(m&2){let f=M(117),k=M(126),w=M(157);e(2),d("formGroup",s.createStandingInstructionsForm),e(5),c(l(8,57,"labels.inputs.name")),e(3),v(s.createStandingInstructionsForm.controls.name.hasError("required")?10:-1),e(3),c(l(14,59,"labels.inputs.Applicant")),e(5),c(l(19,61,"labels.inputs.Type")),e(3),A(s.transferTypeData),e(2),v(s.createStandingInstructionsForm.controls.transferType.hasError("required")?23:-1),e(3),c(l(27,63,"labels.inputs.Priority")),e(3),A(s.priorityTypeData),e(2),v(s.createStandingInstructionsForm.controls.priority.hasError("required")?31:-1),e(3),c(l(35,65,"labels.inputs.Status")),e(3),A(s.statusTypeData),e(2),v(s.createStandingInstructionsForm.controls.status.hasError("required")?39:-1),e(3),c(l(43,67,"labels.inputs.From Account Type")),e(3),A(s.fromAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountType.hasError("required")?47:-1),e(3),c(l(51,69,"labels.inputs.From Account")),e(3),A(s.fromAccountData),e(2),v(s.createStandingInstructionsForm.controls.fromAccountId.hasError("required")?55:-1),e(3),c(l(59,71,"labels.inputs.Destination")),e(3),A(s.destinationTypeData),e(2),v(s.createStandingInstructionsForm.controls.destination.hasError("required")?63:-1),e(3),c(l(67,73,"labels.inputs.To Office")),e(2),d("disabled",s.ToOfficeId),e(),A(s.toOfficeTypeData),e(2),v(s.createStandingInstructionsForm.controls.toOfficeId.hasError("required")?71:-1),e(3),c(l(75,75,"labels.inputs.Beneficiary")),e(2),d("disabled",s.ToClientId),e(),A(s.toClientTypeData),e(2),v(s.createStandingInstructionsForm.controls.toClientId.hasError("required")?79:-1),e(3),c(l(83,77,"labels.inputs.To Account Type")),e(3),A(s.toAccountTypeData),e(2),v(s.createStandingInstructionsForm.controls.toAccountType.hasError("required")?87:-1),e(3),c(l(91,79,"labels.inputs.To Account")),e(3),A(s.toAccountData),e(2),v(s.createStandingInstructionsForm.controls.toAccountId.hasError("required")?95:-1),e(3),c(l(99,81,"labels.inputs.Standing Instruction Type")),e(3),A(s.instructionTypeData),e(2),v(s.createStandingInstructionsForm.controls.instructionType.hasError("required")?103:-1),e(3),c(l(107,83,"labels.inputs.Amount")),e(3),v(s.createStandingInstructionsForm.controls.amount.hasError("required")?109:-1),e(3),c(l(113,85,"labels.inputs.Validity from")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",f),e(),d("for",f),e(3),v(s.createStandingInstructionsForm.controls.validFrom.hasError("required")?118:-1),e(3),c(l(122,87,"labels.inputs.Validity To")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.createStandingInstructionsForm.controls.validTill.hasError("required")?127:-1),e(3),c(l(131,89,"labels.inputs.Recurrence Type")),e(3),A(s.recurrenceTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceType.hasError("required")?135:-1),e(3),c(l(139,91,"labels.inputs.Interval")),e(3),v(s.createStandingInstructionsForm.controls.recurrenceInterval.hasError("required")?141:-1),e(3),c(l(145,93,"labels.inputs.Recurrence Frequency")),e(3),A(s.recurrenceFrequencyTypeData),e(2),v(s.createStandingInstructionsForm.controls.recurrenceFrequency.hasError("required")?149:-1),e(3),c(l(153,95,"labels.inputs.On Month Day")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",w),e(),d("for",w),e(3),v(s.createStandingInstructionsForm.controls.recurrenceOnMonthDay.hasError("required")?158:-1),e(2),d("routerLink",G(99,un)),e(),u(" ",l(162,97,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_STANDINGINSTRUCTION")}},dependencies:[V,L,at,K,bt,X,it,lt,rt,ot,Y,U,z,st,tt,Z,ct,pt,et,dt,mt,ft,_t,ut,Q,W,R],encapsulation:2})}}return t})();var je=t=>({balance:t}),Qn=()=>["../.."];function Wn(t,p){t&1&&(a(0,"div",4),_(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9),n())}function Yn(t,p){if(t&1){let i=F();N(0),a(1,"button",23),h("click",function(){b(i);let s=x(4);return S(s.searchAccountByNumber())}),r(2),o(3,"translate"),n(),q()}if(t&2){let i=x(4);e(),d("disabled",i.phoneAccount.length!==10),e(),u(" ",l(3,2,"labels.buttons.Search")," ")}}function Jn(t,p){t&1&&(a(0,"mat-card-actions",17),y(1,Yn,4,4,"ng-container",22),n()),t&2&&(e(),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function Kn(t,p){if(t&1){let i=F();a(0,"div",10)(1,"div",18)(2,"h3",11),r(3),o(4,"translate"),n(),a(5,"mat-form-field",19)(6,"mat-label"),r(7),o(8,"translate"),n(),a(9,"input",20,0),o(11,"translate"),be("ngModelChange",function(s){b(i);let f=x(2);return he(f.phoneAccount,s)||(f.phoneAccount=s),S(s)}),n(),a(12,"mat-hint",21),r(13),n()()(),C(14,Jn,2,1,"mat-card-actions",17),n()}if(t&2){let i=x(2);e(3),c(l(4,8,"labels.heading.Transferred To")),e(4),c(l(8,10,"labels.inputs.Phone Number")),e(2),d("placeholder",O(l(11,12,"labels.text.EnterPhoneNumber")))("readonly",i.interbankTransferForm),xe("ngModel",i.phoneAccount),e(4),u("",i.phoneAccount.length||0,"/10"),e(),v(i.interbankTransferForm?-1:14)}}function Xn(t,p){t&1&&_(0,"mat-divider")}function Zn(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ti(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.name," ")}}function ei(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Office")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ni(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Client")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ii(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i),e(),g(" ",i.id," - ",i.displayName," ")}}function ai(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function ri(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account Type")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function oi(t,p){if(t&1&&(a(0,"mat-option",30),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),g(" ",i.productName," - ",i.accountNo," ")}}function li(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Account")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function si(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ci(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function pi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function mi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,Zn,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),a(19,"mat-select",29),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(20,ti,2,2,"mat-option",30,E),n(),C(22,ei,7,9,"mat-error"),n(),a(23,"mat-form-field",28)(24,"mat-label"),r(25),o(26,"translate"),n(),_(27,"input",31),o(28,"translate"),C(29,ni,7,9,"mat-error"),n(),a(30,"mat-autocomplete",32,2),D(32,ii,2,3,"mat-option",30,E),n(),a(34,"mat-form-field",28)(35,"mat-label"),r(36),o(37,"translate"),n(),a(38,"mat-select",33),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(39,ai,2,2,"mat-option",30,E),n(),C(41,ri,7,9,"mat-error"),n(),a(42,"mat-form-field",28)(43,"mat-label"),r(44),o(45,"translate"),n(),a(46,"mat-select",34),h("selectionChange",function(){b(i);let s=x(2);return S(s.changeEvent())}),D(47,oi,2,3,"mat-option",30,E),n(),C(49,li,7,9,"mat-error"),n(),a(50,"mat-form-field",28)(51,"mat-label"),r(52),o(53,"translate"),n(),_(54,"input",35),o(55,"translate"),C(56,si,7,9,"mat-error"),C(57,ci,4,6,"mat-error"),n(),a(58,"mat-form-field",36)(59,"mat-label"),r(60),o(61,"translate"),n(),_(62,"textarea",37),o(63,"translate"),C(64,pi,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=M(31),f=x(2);d("formGroup",f.makeAccountTransferForm),e(2),c(l(3,31,"labels.heading.Transfer Details")),e(5),c(l(8,33,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,35,"labels.text.SelectDate")))("min",f.minDate)("max",f.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(f.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,37,"labels.inputs.Office")),e(3),A(f.toOfficeTypeData),e(2),v(f.makeAccountTransferForm.controls.toOfficeId.hasError("required")?22:-1),e(3),c(l(26,39,"labels.inputs.Client")),e(2),d("placeholder",O(l(28,41,"labels.text.SelectOrTypeClientName")))("matAutocomplete",s),e(2),v(f.makeAccountTransferForm.controls.toClientId.hasError("required")?29:-1),e(),d("displayWith",f.displayClient),e(2),A(f.clientsData),e(4),c(l(37,43,"labels.inputs.Account Type")),e(3),A(f.toAccountTypeData),e(2),v(f.makeAccountTransferForm.controls.toAccountType.hasError("required")?41:-1),e(3),c(l(45,45,"labels.inputs.Account")),e(3),A(f.toAccountData),e(2),v(f.makeAccountTransferForm.controls.toAccountId.hasError("required")?49:-1),e(3),c(l(53,47,"labels.inputs.Amount")),e(2),d("placeholder",O(l(55,49,"labels.text.EnterAmount"))),e(2),v(f.makeAccountTransferForm.controls.transferAmount.hasError("required")?56:-1),e(),v((i=f.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?57:-1),e(3),c(l(61,51,"labels.inputs.Description")),e(2),d("placeholder",O(l(63,53,"labels.text.EnterTransferDescription"))),e(2),v(f.makeAccountTransferForm.controls.transferDescription.hasError("required")?64:-1)}}function di(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ui(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function fi(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),n()),t&2&&(e(),g(" ",l(2,2,"labels.inputs.Amount")," ",l(3,4,"labels.commons.mustBeAtLeast")," 0.01 "))}function _i(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",38),r(2),o(3,"translate"),n()),t&2){let i=x(3);e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,je,i.balance))," ")}}function Ci(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function vi(t,p){if(t&1){let i=F();a(0,"form",16)(1,"h3",11),r(2),o(3,"translate"),n(),a(4,"div",24)(5,"mat-form-field",25),h("click",function(){b(i);let s=M(13);return S(s.open())}),a(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",26),o(10,"translate"),_(11,"mat-datepicker-toggle",27)(12,"mat-datepicker",null,1),C(14,di,7,9,"mat-error"),n(),a(15,"mat-form-field",28)(16,"mat-label"),r(17),o(18,"translate"),n(),_(19,"input",39),o(20,"translate"),n(),a(21,"mat-form-field",28)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",40),o(26,"translate"),n(),a(27,"mat-form-field",28)(28,"mat-label"),r(29),o(30,"translate"),n(),_(31,"input",41),o(32,"translate"),n(),a(33,"mat-form-field",28)(34,"mat-label"),r(35),o(36,"translate"),n(),_(37,"input",42),o(38,"translate"),n(),a(39,"mat-form-field",28)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"input",35),o(44,"translate"),C(45,ui,7,9,"mat-error"),C(46,fi,4,6,"mat-error"),C(47,_i,4,6,"mat-error"),n(),a(48,"mat-form-field",36)(49,"mat-label"),r(50),o(51,"translate"),n(),_(52,"textarea",37),o(53,"translate"),C(54,Ci,7,9,"mat-error"),n()()()}if(t&2){let i,m=M(13),s=x(2);d("formGroup",s.makeAccountTransferForm),e(2),c(l(3,36,"labels.heading.Transfer Details")),e(5),c(l(8,38,"labels.inputs.Transaction Date")),e(2),d("placeholder",O(l(10,40,"labels.text.SelectDate")))("min",s.minDate)("max",s.maxDate)("matDatepicker",m),e(2),d("for",m),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?14:-1),e(3),c(l(18,42,"labels.inputs.Bank")),e(2),d("placeholder",O(l(20,44,"labels.inputs.Bank")))("readonly",!0),e(4),c(l(24,46,"labels.inputs.Client")),e(2),d("placeholder",O(l(26,48,"labels.inputs.Client")))("readonly",!0),e(4),c(l(30,50,"labels.inputs.Account Type")),e(2),d("placeholder",O(l(32,52,"labels.inputs.Account Type")))("readonly",!0),e(4),c(l(36,54,"labels.inputs.Account")),e(2),d("placeholder",O(l(38,56,"labels.inputs.Account")))("readonly",!0),e(4),c(l(42,58,"labels.inputs.Amount")),e(2),d("placeholder",O(l(44,60,"labels.text.EnterAmount"))),e(2),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?45:-1),e(),v(s.makeAccountTransferForm.controls.transferAmount.hasError("min")?46:-1),e(),v((i=s.makeAccountTransferForm.get("transferAmount"))!=null&&i.hasError("amountExceedsBalance")?47:-1),e(3),c(l(51,62,"labels.inputs.Description")),e(2),d("placeholder",O(l(53,64,"labels.text.EnterTransferDescription"))),e(2),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?54:-1)}}function gi(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ii(t,p){if(t&1){let i=F();a(0,"button",45),h("click",function(){b(i);let s=x(4);return S(s.submit())}),r(1),o(2,"translate"),n()}if(t&2){let i=x(4);d("disabled",!i.makeAccountTransferForm.valid),e(),u(" ",l(2,2,"labels.buttons.Submit")," ")}}function Ti(t,p){if(t&1&&(N(0),C(1,gi,3,4,"button",44),C(2,Ii,3,4,"button",44),q()),t&2){let i=x(3);e(),v(i.interbank&&i.interbankTransferForm?1:-1),e(),v(i.interbank?-1:2)}}function xi(t,p){t&1&&(a(0,"mat-card-actions",17)(1,"button",43),r(2),o(3,"translate"),n(),y(4,Ti,3,2,"ng-container",22),n()),t&2&&(e(),d("routerLink",G(5,Qn)),e(),u(" ",l(3,3,"labels.buttons.Cancel")," "),e(2),d("mifosxHasPermission","CREATE_ACCOUNTTRANSFER"))}function hi(t,p){if(t&1&&(a(0,"mat-card",5)(1,"mat-card-content")(2,"div",10)(3,"h3",11),r(4),o(5,"translate"),n(),_(6,"mat-divider"),a(7,"div",12)(8,"div",13)(9,"div",14),r(10),o(11,"translate"),n(),a(12,"div",15),r(13),n()(),a(14,"div",13)(15,"div",14),r(16),o(17,"translate"),n(),a(18,"div",15),r(19),n()(),a(20,"div",13)(21,"div",14),r(22),o(23,"translate"),n(),a(24,"div",15),r(25),n()(),a(26,"div",13)(27,"div",14),r(28),o(29,"translate"),n(),a(30,"div",15),r(31),n()(),a(32,"div",13)(33,"div",14),r(34),o(35,"translate"),n(),a(36,"div",15),r(37),n()()()(),C(38,Kn,15,14,"div",10),C(39,Xn,1,0,"mat-divider"),C(40,mi,65,55,"form",16),C(41,vi,55,66,"form",16),n(),C(42,xi,5,6,"mat-card-actions",17),n()),t&2){let i=x();e(4),c(l(5,17,"labels.heading.Transferring From Details")),e(6),c(l(11,19,"labels.inputs.Applicant")),e(3),c(i.accountTransferTemplateData.fromClient.displayName),e(3),c(l(17,21,"labels.inputs.Office")),e(3),c(i.accountTransferTemplateData.fromOffice.name),e(3),c(l(23,23,"labels.inputs.From Account")),e(3),g(" ",i.accountTransferTemplateData.fromAccount.productName,"\xA0-\xA0#",i.accountTransferTemplateData.fromAccount.accountNo," "),e(3),c(l(29,25,"labels.inputs.From Account Type")),e(3),c(i.accountTransferTemplateData.fromAccountType.value),e(3),c(l(35,27,"labels.inputs.Currency")),e(3),c(i.accountTransferTemplateData.currency.name),e(),v(i.interbank?38:-1),e(),v(i.interbank?-1:39),e(),v(!i.interbank&&i.makeAccountTransferForm?40:-1),e(),v(i.interbank&&i.interbankTransferForm&&i.makeAccountTransferForm?41:-1),e(),v(!i.isLoading&&i.makeAccountTransferForm?42:-1)}}var ae=(()=>{class t{constructor(){this.formBuilder=T(St),this.route=T($),this.router=T(xt),this.accountTransfersService=T(B),this.dateUtils=T(ht),this.settingsService=T(J),this.clientsService=T(Ue),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.interbank=!1,this.phoneAccount="",this.interbankTransferForm=!1,this.balance=0,this.isLoading=!1,this.route.data.subscribe(i=>{this.accountTransferTemplateData=i.accountTransferTemplate,this.setParams(),this.setOptions()})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1",this.id=this.route.snapshot.queryParams.loanId;break;case"fromsavings":case"interbank":this.accountTypeId="2",this.id=this.route.snapshot.queryParams.savingsId,this.interbank=this.route.snapshot.queryParams.interbank==="true";let i=this.router.currentNavigation()?.extras?.state?.balance,m=this.accountTransferTemplateData?.fromAccount?.availableBalance??this.accountTransferTemplateData?.fromAccount?.summary?.accountBalance??this.accountTransferTemplateData?.fromAccount?.balance??0;this.balance=typeof i=="number"?i:m;break;default:this.accountTypeId="0"}}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.interbank?this.createEmptyInterbankForm():this.createMakeAccountTransferForm()}createEmptyInterbankForm(){this.makeAccountTransferForm=this.formBuilder.group({toBank:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[0,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountTransferForm(){this.makeAccountTransferForm=this.formBuilder.group({toOfficeId:["",I.required],toClientId:["",I.required],toAccountType:["",I.required],toAccountId:["",I.required],transferAmount:[this.accountTransferTemplateData.transferAmount,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["",I.required]})}createMakeAccountInterbankTransferForm(i){if(!i){console.error("Account data is undefined"),this.isLoading=!1;return}let m=this.accountTransferTemplateData?.transferAmount>0?this.accountTransferTemplateData.transferAmount:1;this.makeAccountTransferForm=this.formBuilder.group({toBank:[i.destinationFspId||"",I.required],toClientId:[(i.firstName||i.firsName||"")+" "+(i.lastName||""),I.required],toAccountType:["Saving Account",I.required],toAccountId:[i.partyId||"",I.required],transferAmount:[m,[I.required,I.min(.01),this.amountExceedsBalanceValidator.bind(this)]],transferDate:[this.settingsService.businessDate,I.required],transferDescription:["Transferencia interbancaria",I.required]}),this.isLoading=!1}amountExceedsBalanceValidator(i){return i.value>this.balance?{amountExceedsBalance:!0}:null}setOptions(){this.toOfficeTypeData=this.accountTransferTemplateData.toOfficeOptions,this.toAccountTypeData=this.accountTransferTemplateData.toAccountTypeOptions,this.toAccountData=this.accountTransferTemplateData.toAccountOptions}changeEvent(){let i=this.refineObject(this.makeAccountTransferForm.value);this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId,i).subscribe(m=>{this.accountTransferTemplateData=m,this.toClientTypeData=m.toClientOptions,this.setOptions()})}refineObject(i){delete i.transferAmount,delete i.transferDate,delete i.transferDescription,i.toClientId&&typeof i.toClientId=="object"&&(i.toClientId=i.toClientId.id);let m=Object.getOwnPropertyNames(i);for(let s=0;s{typeof i=="string"&&i.length>=2&&(this.clientsService.getFilteredClients("displayName","ASC",!0,i).subscribe(m=>{this.clientsData=m.pageItems}),this.changeEvent())})}displayClient(i){return i?i.displayName:void 0}submit(){this.interbank?this.makeInterbankTransfer():this.makeTransfer()}makeTransfer(){this.isLoading=!0;let i=this.settingsService.dateFormat,m=this.settingsService.language.code,s;typeof this.makeAccountTransferForm.controls.toClientId.value=="object"?s=this.makeAccountTransferForm.controls.toClientId.value.id:s=this.makeAccountTransferForm.controls.toClientId.value;let f=Vt(qt({},this.makeAccountTransferForm.value),{transferDate:this.dateUtils.formatDate(this.makeAccountTransferForm.value.transferDate,i),dateFormat:i,locale:m,toClientId:s,fromAccountId:this.id,fromAccountType:this.accountTypeId,fromClientId:this.accountTransferTemplateData.fromClient.id,fromOfficeId:this.accountTransferTemplateData.fromClient.officeId});this.accountTransfersService.createAccountTransfer(f).subscribe(()=>{this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route})})}makeInterbankTransfer(){if(this.isLoading=!0,!this.makeAccountTransferForm.valid){console.error("Interbank form is not valid"),this.isLoading=!1;return}let i={homeTransactionId:crypto.randomUUID(),from:{fspId:Me.fineractPlatformTenantId,idType:"MSISDN",idValue:this.accountTransferTemplateData.fromAccount.externalId?.trim()||""},to:{fspId:this.makeAccountTransferForm.controls.toBank.value,idType:"MSISDN",idValue:this.makeAccountTransferForm.controls.toAccountId.value},amountType:"SEND",amount:{currencyCode:this.accountTransferTemplateData.currency.code,amount:this.makeAccountTransferForm.controls.transferAmount.value},transactionType:{scenario:"TRANSFER",subScenario:"DOMESTIC",initiator:"PAYER",initiatorType:"CUSTOMER"},note:this.makeAccountTransferForm.controls.transferDescription.value};this.accountTransfersService.sendInterbankTransfer(JSON.stringify(i)).subscribe(m=>{m.systemMessage&&(this.isLoading=!1,this.router.navigate(["../../transactions"],{relativeTo:this.route}))},m=>{console.error("Interbank transfer error:",m),this.isLoading=!1})}searchAccountByNumber(){!this.phoneAccount||this.phoneAccount.length!==10||(this.isLoading=!0,this.accountTransfersService.getAccountByNumber(this.phoneAccount,this.accountTransferTemplateData.currency.code).subscribe(i=>{this.interbankTransferForm=!0,this.createMakeAccountInterbankTransferForm(i)},i=>{console.error("searching account error:",i),this.isLoading=!1}))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-make-account-transfers"]],decls:3,vars:2,consts:[["input",""],["transferDatePicker",""],["clientsAutocomplete","matAutocomplete"],[1,"container"],[1,"loader-wrapper"],[1,"transfer-card"],[1,"bottom","triangle"],[1,"top","triangle"],[1,"left","triangle"],[1,"right","triangle"],[1,"section-container"],[1,"section-title","transfer-heading"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],[1,"transfer-form",3,"formGroup"],[1,"action-buttons"],[1,"interbank-section"],[1,"full-width"],["matInput","","type","tel","maxlength","10","required","","title","Phone number",3,"ngModelChange","readonly","ngModel","placeholder"],["align","end"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary","id","search-button",1,"primary-button",3,"click","disabled"],[1,"form-grid"],[1,"form-field",3,"click"],["matInput","","required","","formControlName","transferDate","title","Transaction Date",3,"min","max","matDatepicker","placeholder"],["matSuffix","",3,"for"],[1,"form-field"],["required","","formControlName","toOfficeId",3,"selectionChange"],[3,"value"],["matInput","","formControlName","toClientId","title","Client name",3,"matAutocomplete","placeholder"],["autoActiveFirstOption","",3,"displayWith"],["required","","formControlName","toAccountType",3,"selectionChange"],["required","","formControlName","toAccountId",3,"selectionChange"],["type","number","matInput","","required","","formControlName","transferAmount","title","Transfer amount","min","0.01","step","0.01",3,"placeholder"],[1,"form-field","description-field"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2","title","Transfer description",3,"placeholder"],["icon","exclamation-triangle","size","md"],["matInput","","formControlName","toBank","title","Bank",3,"readonly","placeholder"],["matInput","","formControlName","toClientId","title","Client",3,"readonly","placeholder"],["matInput","","formControlName","toAccountType","title","Account Type",3,"readonly","placeholder"],["matInput","","formControlName","toAccountId","title","Account",3,"readonly","placeholder"],["type","button","mat-raised-button","",1,"cancel-button",3,"routerLink"],["mat-raised-button","","color","primary",1,"primary-button",3,"disabled"],["mat-raised-button","","color","primary",1,"primary-button",3,"click","disabled"]],template:function(m,s){m&1&&(a(0,"div",3),C(1,Wn,5,0,"div",4),C(2,hi,43,29,"mat-card",5),n()),m&2&&(e(),v(s.isLoading?1:-1),e(),v(s.isLoading?-1:2))},dependencies:[V,L,at,K,bt,X,it,lt,Fe,we,rt,ot,Y,U,z,st,tt,Z,ct,pt,Pe,et,dt,mt,ft,_t,ut,Q,W,yt,Oe,ke,Re,Ve,vt,Ht,R],styles:[".container[_ngcontent-%COMP%]{max-width:42rem;margin:0 auto;padding:1rem}.transfer-card[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 2px 10px #00000014;margin-bottom:1.5rem;overflow:hidden}.section-container[_ngcontent-%COMP%]{margin-bottom:2rem}.section-title[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600;color:#333;margin:0 0 1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(0,0,0,.12)}.section-title.transfer-heading[_ngcontent-%COMP%]{font-weight:700}.info-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:.75rem}@media (width >= 768px){.info-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,50%)}}.info-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.5rem;background-color:#00000005;border-radius:4px}.info-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.info-label[_ngcontent-%COMP%]{flex:0 0 40%;color:#000000b3;font-weight:500}.info-value[_ngcontent-%COMP%]{flex:1;color:#000000de}mat-divider[_ngcontent-%COMP%]{margin:1rem 0}.interbank-section[_ngcontent-%COMP%]{margin-bottom:1rem}.transfer-form[_ngcontent-%COMP%]{margin-top:1rem}.form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:100%;gap:1rem}@media (width >= 768px){.form-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr);gap:1.5rem}}.form-row[_ngcontent-%COMP%]{display:contents}.form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(odd){margin-right:.5rem}}@media (width >= 768px){.form-field[_ngcontent-%COMP%]:nth-child(2n){margin-left:.5rem}}.form-field.description-field[_ngcontent-%COMP%]{grid-column:1/-1}.form-field.description-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{min-height:80px;resize:vertical} .mat-form-field{width:100%}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;padding:1rem 1.5rem;margin-top:1rem}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%]{flex-direction:column}}.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}@media (width <= 576px){.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%;margin-bottom:.5rem}}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;box-shadow:0 1px 3px #0000001f}.action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#000000de;font-weight:400;border:none;box-shadow:none}.action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;box-shadow:0 2px 5px #0000002e}.loader-wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:300px;position:relative}@keyframes _ngcontent-%COMP%_rotate-triangle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.triangle[_ngcontent-%COMP%]{position:absolute;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:34px solid rgba(0,0,0,.05);animation:_ngcontent-%COMP%_rotate-triangle 1.5s infinite linear}.triangle[_ngcontent-%COMP%]:hover{border-bottom-color:#00000014}.dark-theme[_ngcontent-%COMP%] .info-label[_ngcontent-%COMP%]{color:#ffffffb3}.dark-theme[_ngcontent-%COMP%] .info-value[_ngcontent-%COMP%]{color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff;border-bottom-color:#ffffff1f}.dark-theme[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}.dark-theme[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]:hover{background-color:#505050}.dark-theme[_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}.dark-theme[_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#fff}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .transfer-heading[_ngcontent-%COMP%]{color:#fff;font-weight:700}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .cancel-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde}body.dark-theme[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] .primary-button[_ngcontent-%COMP%]{background-color:#424242;color:#ffffffde;font-weight:400;border:none;box-shadow:none} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-ripple{background-color:#000000de!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-form-field-label .mat-form-field-required-marker{color:#0009!important} mat-form-field.error-warn.mat-form-field-invalid .mat-error{color:#0009!important} .mat-form-field-flex{align-items:center}.transfer-form[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%]{margin-bottom:1rem}.readonly-field[_ngcontent-%COMP%]{background-color:#00000005;cursor:not-allowed} .mat-input-element{font-size:14px}"]})}}return t})();var bi=["instructionsTable"],Si=()=>[10,25,50,100],yi=t=>["../",t,"edit"],Ei=t=>["../",t,"view"];function Di(t,p){if(t&1){let i=F();a(0,"button",24),h("click",function(){b(i);let s=x();return S(s.filterStandingInstructions())}),r(1),o(2,"translate"),o(3,"titlecase"),n()}t&2&&(e(),u(" ",l(3,3,l(2,1,"labels.buttons.Filter"))," "))}function Ai(t,p){if(t&1&&(a(0,"div",5)(1,"div")(2,"h3",25),r(3),o(4,"translate"),n()(),a(5,"div")(6,"h3",25),r(7),n()()()),t&2){let i=x();e(3),c(l(4,2,"labels.heading.Client Type")),e(4),c(i.clientName)}}function Mi(t,p){if(t&1&&(a(0,"mat-form-field",6)(1,"mat-label"),r(2),o(3,"translate"),n(),_(4,"input",9),n(),a(5,"mat-form-field",6)(6,"mat-label"),r(7),o(8,"translate"),n(),_(9,"input",9),n()),t&2){let i=x();e(2),c(l(3,4,"labels.text.ClientName")),e(2),d("formControl",i.clientNameControl),e(3),c(l(8,6,"labels.text.FromClientId")),e(2),d("formControl",i.fromClientId)}}function ki(t,p){if(t&1&&(a(0,"mat-option",8),r(1),n()),t&2){let i=p.$implicit;d("value",i.id),e(),u(" ",i.value," ")}}function Bi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Client")))}function wi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromClient.displayName,"-",i.fromClient.id," ")}}function Fi(t,p){if(t&1&&(a(0,"td",27),C(1,wi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromClient?1:-1)}}function Oi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.From Account")))}function Pi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.fromAccount.accountNo," (",i.fromAccountType.value,") ")}}function Ni(t,p){if(t&1&&(a(0,"td",27),C(1,Pi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.fromAccount&&(i!=null&&i.fromAccountType)?1:-1)}}function qi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Beneficiary")))}function Vi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;u(" ",i.toClient.displayName," ")}}function Ri(t,p){if(t&1&&(a(0,"td",27),C(1,Vi,1,1),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toClient?1:-1)}}function Li(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.To Account")))}function Hi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.toAccount.accountNo," (",i.toAccountType.value,") ")}}function $i(t,p){if(t&1&&(a(0,"td",27),C(1,Hi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.toAccount&&(i!=null&&i.toAccountType)?1:-1)}}function Ui(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function zi(t,p){if(t&1&&r(0),t&2){let i=x().$implicit;g(" ",i.instructionType.value,"/",i.amount," ")}}function Gi(t,p){if(t&1&&(a(0,"td",27),C(1,zi,1,2),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.instructionType&&(i==null?null:i.amount)!==void 0?1:-1)}}function ji(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Validity")))}function Qi(t,p){if(t&1&&(r(0),o(1,"dateFormat"),o(2,"dateFormat")),t&2){let i=x().$implicit;g(" ",l(1,2,i.validFrom)," to ",l(2,4,i.validTill)," ")}}function Wi(t,p){if(t&1&&(a(0,"td",27),C(1,Qi,3,6),n()),t&2){let i=p.$implicit;e(),v(i!=null&&i.validFrom&&(i!=null&&i.validTill)?1:-1)}}function Yi(t,p){t&1&&(a(0,"th",26),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Actions")))}function Ji(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",30),n()),t&2){let i=x(2).$implicit;d("matTooltip",O(l(1,4,"tooltips.Edit Standing Instruction")))("routerLink",nt(8,yi,i.id)),At("aria-label",l(2,6,"tooltips.Edit Standing Instruction"))}}function Ki(t,p){t&1&&(a(0,"span"),y(1,Ji,4,10,"button",28),n()),t&2&&(e(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Xi(t,p){if(t&1){let i=F();a(0,"button",32),o(1,"translate"),o(2,"translate"),h("click",function(){b(i);let s=x(2).$implicit,f=x();return S(f.deleteStandingInstruction(s.id))}),_(3,"i",33),n()}t&2&&(d("matTooltip",O(l(1,3,"tooltips.Delete Standing Instruction"))),At("aria-label",l(2,5,"tooltips.Delete Standing Instruction")))}function Zi(t,p){t&1&&(a(0,"span"),y(1,Xi,4,7,"button",31),n()),t&2&&(e(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ta(t,p){if(t&1&&(a(0,"button",29),o(1,"translate"),o(2,"translate"),_(3,"i",34),n()),t&2){let i=x().$implicit;d("matTooltip",O(l(1,4,"tooltips.View Standing Instruction")))("routerLink",nt(8,Ei,i.id)),At("aria-label",l(2,6,"tooltips.View Standing Instruction"))}}function ea(t,p){if(t&1&&(a(0,"td",27),C(1,Ki,2,1,"span"),C(2,Zi,2,1,"span"),y(3,ta,4,10,"button",28),n()),t&2){let i=p.$implicit;e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?1:-1),e(),v((i==null||i.status==null?null:i.status.value)!=="Deleted"?2:-1),e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function na(t,p){t&1&&_(0,"tr",35)}function ia(t,p){t&1&&_(0,"tr",36)}var re=(()=>{class t{constructor(){this.route=T($),this.accountTransfersService=T(B),this.settingsService=T(J),this.dialog=T(Ae),this.transferType=new Ft,this.fromAccountId=new Ft,this.clientNameControl=new Ft,this.fromClientId=new Ft,this.dataSource=new Ot,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.data.subscribe(i=>{this.standingIntructionsTemplateData=i.standingIntructionsTemplate,i.standingIntructionsTemplate.fromClient&&(this.clientName=this.standingIntructionsTemplateData.fromClient.displayName,this.getStandingInstructions()),this.setParams(),this.transferTypeDatas=this.standingIntructionsTemplateData.transferTypeOptions})}setParams(){switch(this.accountType=this.route.snapshot.queryParams.accountType,this.accountType){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}this.isFromClient=!!this.route.parent.parent.snapshot.params.clientId}filterStandingInstructions(){this.getStandingInstructions()}getStandingInstructions(){let i=this.settingsService.dateFormat,m=this.settingsService.language.code,s={clientId:this.standingIntructionsTemplateData.fromClient.id||this.fromClientId.value,clientName:this.standingIntructionsTemplateData.fromClient.displayName||this.clientNameControl.value,locale:m,dateFormat:i,limit:14,offset:0,fromAccountType:this.accountTypeId,fromAccountId:this.fromAccountId.value,fromTransferType:this.transferType.value};this.accountTransfersService.getStandingInstructions(s).subscribe(f=>{this.instructionsData=f.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(i){this.dialog.open(qe,{data:{deleteContext:`standing instruction id: ${i}`}}).afterClosed().subscribe(s=>{s.delete&&this.accountTransfersService.deleteStandingInstrucions(i).subscribe(()=>{})})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-standing-instructions"]],viewQuery:function(m,s){if(m&1&&(Mt(bi,7),Mt(Et,7)),m&2){let f;kt(f=Bt())&&(s.instructionTableRef=f.first),kt(f=Bt())&&(s.paginator=f.first)}},decls:47,vars:20,consts:[["instructionsTable",""],[1,"container","m-b-20","layout-row","align-end"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],[1,"container"],[1,"layout-row-wrap","gap-20px","responsive-column"],[1,"flex-100","layout-row","align-items-center","gap-20px"],[1,"flex-48"],[3,"formControl"],[3,"value"],["matInput","",3,"formControl"],[1,"table-container"],["mat-table","",1,"bordered-table",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],["mat-raised-button","","color","primary",3,"click"],[1,"mat-h3","no-m-b"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip","routerLink"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(m,s){m&1&&(a(0,"div",1),y(1,Di,4,5,"button",2),n(),a(2,"mat-card",3)(3,"mat-card-content")(4,"div",4),C(5,Ai,8,4,"div",5),C(6,Mi,10,8),a(7,"mat-form-field",6)(8,"mat-label"),r(9),o(10,"translate"),n(),a(11,"mat-select",7),D(12,ki,2,2,"mat-option",8,E),n()(),a(14,"mat-form-field",6)(15,"mat-label"),r(16),o(17,"translate"),n(),_(18,"input",9),n()()(),a(19,"div",10)(20,"table",11,0),o(22,"translate"),N(23,12),y(24,Bi,3,3,"th",13)(25,Fi,2,1,"td",14),q(),N(26,15),y(27,Oi,3,3,"th",13)(28,Ni,2,1,"td",14),q(),N(29,16),y(30,qi,3,3,"th",13)(31,Ri,2,1,"td",14),q(),N(32,17),y(33,Li,3,3,"th",13)(34,$i,2,1,"td",14),q(),N(35,18),y(36,Ui,3,3,"th",13)(37,Gi,2,1,"td",14),q(),N(38,19),y(39,ji,3,3,"th",13)(40,Wi,2,1,"td",14),q(),N(41,20),y(42,Yi,3,3,"th",13)(43,ea,4,3,"td",14),q(),y(44,na,1,0,"tr",21)(45,ia,1,0,"tr",22),n(),_(46,"mat-paginator",23),n()()),m&2&&(e(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION"),e(4),v(s.isFromClient?5:-1),e(),v(s.isFromClient?-1:6),e(3),c(l(10,13,"labels.inputs.Type")),e(2),d("formControl",s.transferType),e(),A(s.transferTypeDatas),e(4),c(l(17,15,"labels.text.FromAccountId")),e(2),d("formControl",s.fromAccountId),e(2),d("dataSource",s.dataSource),At("aria-label",l(22,17,"labels.heading.List Standing Instructions")),e(24),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSize",10)("pageSizeOptions",G(19,Si)))},dependencies:[V,L,K,X,Be,Y,U,z,tt,Z,et,dt,mt,Q,W,$t,Gt,zt,jt,Ut,Qt,Ne,Wt,Jt,Yt,Kt,Et,De,Ct,R],styles:[".container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{margin-top:1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:1.625rem;padding:0 .375rem;margin:.25rem;line-height:1.5625rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.75rem 1rem}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0}"]})}}return t})();var aa=()=>[5,10,25,50,100];function ra(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Transaction Date")))}function oa(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"dateFormat"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.transferDate))}}function la(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Amount")))}function sa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferAmount)}}function ca(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Notes")))}function pa(t,p){if(t&1&&(a(0,"td",17),r(1),n()),t&2){let i=p.$implicit;e(),c(i.transferDescription)}}function ma(t,p){t&1&&(a(0,"th",16),r(1),o(2,"translate"),n()),t&2&&(e(),c(l(2,1,"labels.inputs.Reversed")))}function da(t,p){if(t&1&&(a(0,"td",17),r(1),o(2,"yesNo"),n()),t&2){let i=p.$implicit;e(),c(l(2,1,i.reversed))}}function ua(t,p){t&1&&_(0,"tr",18)}function fa(t,p){t&1&&_(0,"tr",19)}var oe=(()=>{class t{constructor(){this.route=T($),this.dataSource=new Ot,this.displayedColumns=["transactionDate","amount","notes","reversed"],this.route.data.subscribe(i=>{this.listTransactionData=i.listTransactionData,this.dataSource=new Ot(this.listTransactionData.transactions.pageItems),this.dataSource.paginator=this.paginator})}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-list-transactions"]],viewQuery:function(m,s){if(m&1&&Mt(Et,7),m&2){let f;kt(f=Bt())&&(s.paginator=f.first)}},decls:36,vars:19,consts:[[1,"container","m-b-20"],[1,"mat-elevation-z8"],[1,"layout-row-wrap"],[1,"flex-25","header"],[1,"flex-25"],[1,"mat-elevation-z8","container"],["mat-table","",3,"dataSource"],["matColumnDef","transactionDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["matColumnDef","notes"],["matColumnDef","reversed"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(m,s){m&1&&(a(0,"div",0)(1,"mat-card",1)(2,"mat-card-content")(3,"div",2)(4,"div",3),r(5),o(6,"translate"),n(),a(7,"div",4),r(8),n(),a(9,"div",3),r(10),o(11,"translate"),n(),a(12,"div",4),r(13),n(),a(14,"div",3),r(15),o(16,"translate"),n(),a(17,"div",4),r(18),n()()()()(),a(19,"div",5)(20,"table",6),N(21,7),y(22,ra,3,3,"th",8)(23,oa,3,3,"td",9),q(),N(24,10),y(25,la,3,3,"th",8)(26,sa,2,1,"td",9),q(),N(27,11),y(28,ca,3,3,"th",8)(29,pa,2,1,"td",9),q(),N(30,12),y(31,ma,3,3,"th",8)(32,da,3,3,"td",9),q(),y(33,ua,1,0,"tr",13)(34,fa,1,0,"tr",14),n(),_(35,"mat-paginator",15),n()),m&2&&(e(5),u(" ",l(6,12,"labels.inputs.From Account")," "),e(3),g(" ",s.listTransactionData.fromAccount.accountNo,"(",s.listTransactionData.fromAccountType.value,") "),e(2),u(" ",l(11,14,"labels.inputs.To Account")," "),e(3),g(" ",s.listTransactionData.toAccount.accountNo,"(",s.listTransactionData.toAccountType.value,") "),e(2),u(" ",l(16,16,"labels.inputs.Destination")," "),e(3),u(" ",s.listTransactionData.toClient.displayName," "),e(2),d("dataSource",s.dataSource),e(13),d("matHeaderRowDef",s.displayedColumns),e(),d("matRowDefColumns",s.displayedColumns),e(),d("pageSizeOptions",G(18,aa)))},dependencies:[V,L,U,z,$t,Gt,zt,jt,Ut,Qt,Wt,Jt,Yt,Kt,Et,Ct,R,He],styles:[".content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:3rem}.content[_ngcontent-%COMP%] div.header[_ngcontent-%COMP%]{font-weight:500}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();function _a(t,p){t&1&&(a(0,"button",15),_(1,"fa-icon",16),r(2),o(3,"translate"),n()),t&2&&(e(2),u("",l(3,1,"labels.buttons.Undo")," "))}function Ca(t,p){t&1&&(a(0,"span"),y(1,_a,4,3,"button",14),n()),t&2&&(e(),d("mifosxHasPermission","ADJUST_ACCOUNTTRANSFER"))}function va(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.fromAccountType.value)," ")}}function ga(t,p){if(t&1&&(a(0,"span",9),r(1),o(2,"translate"),n()),t&2){let i=x();e(),u(" ",l(2,1,"labels.catalogs."+i.viewAccountTransferData.toAccountType.value)," ")}}var le=(()=>{class t{constructor(){this.route=T($),this.location=T(Se),this.route.data.subscribe(i=>{this.viewAccountTransferData=i.viewAccountTransferData})}transferToClient(i){return`/#/clients/${i.id}`}transferToAccount(i,m){return`/#/clients/${i.id}/savings-accounts/${m.id}`}goBack(){this.location.back()}transactionColor(){return this.viewAccountTransferData.reversed?"undo":"active"}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-view-account-transfer"]],decls:97,vars:66,consts:[[1,"container"],[1,"container","m-b-20","align-end","gap-2px"],[1,"transfer-container"],[1,"status-indicator",3,"ngClass"],[1,"transfer-section"],[1,"section-title"],[1,"info-grid"],[1,"info-row"],[1,"info-label"],[1,"info-value"],["class","info-value",4,"ngIf"],[3,"href"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","color","primary","mat-raised-button","",3,"click"],["mat-raised-button","","color","warn",4,"mifosxHasPermission"],["mat-raised-button","","color","warn"],["icon","undo",1,"m-r-10"]],template:function(m,s){m&1&&(a(0,"div",0)(1,"div",1),C(2,Ca,2,1,"span"),n(),a(3,"mat-card")(4,"mat-card-content")(5,"div",2),_(6,"div",3),a(7,"section",4)(8,"h3",5),r(9),o(10,"translate"),n(),_(11,"mat-divider"),a(12,"div",6)(13,"div",7)(14,"span",8),r(15),o(16,"translate"),n(),a(17,"span",9),r(18),o(19,"formatNumber"),n()(),a(20,"div",7)(21,"span",8),r(22),o(23,"translate"),n(),a(24,"span",9),r(25),o(26,"dateFormat"),n()(),a(27,"div",7)(28,"span",8),r(29),o(30,"translate"),n(),a(31,"span",9),r(32),n()()()(),a(33,"section",4)(34,"h3",5),r(35),o(36,"translate"),n(),_(37,"mat-divider"),a(38,"div",6)(39,"div",7)(40,"span",8),r(41),o(42,"translate"),n(),a(43,"span",9),r(44),n()(),a(45,"div",7)(46,"span",8),r(47),o(48,"translate"),n(),a(49,"span",9),r(50),n()(),a(51,"div",7)(52,"span",8),r(53),o(54,"translate"),n(),y(55,va,3,3,"span",10),n(),a(56,"div",7)(57,"span",8),r(58),o(59,"translate"),n(),a(60,"span",9),r(61),n()()()(),a(62,"section",4)(63,"h3",5),r(64),o(65,"translate"),n(),_(66,"mat-divider"),a(67,"div",6)(68,"div",7)(69,"span",8),r(70),o(71,"translate"),n(),a(72,"span",9),r(73),n()(),a(74,"div",7)(75,"span",8),r(76),o(77,"translate"),n(),a(78,"span",9)(79,"a",11),r(80),n()()(),a(81,"div",7)(82,"span",8),r(83),o(84,"translate"),n(),y(85,ga,3,3,"span",10),n(),a(86,"div",7)(87,"span",8),r(88),o(89,"translate"),n(),a(90,"span",9)(91,"a",11),r(92),n()()()()()()(),a(93,"mat-card-actions",12)(94,"button",13),h("click",function(){return s.goBack()}),r(95),o(96,"translate"),n()()()()),m&2&&(e(2),v(s.viewAccountTransferData.reversed?-1:2),e(4),d("ngClass",s.transactionColor()),e(3),c(l(10,32,"labels.heading.Transaction Details")),e(6),u("",l(16,34,"labels.inputs.Transaction Amount"),":"),e(3),Te(" ",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.displaySymbol," ",l(19,36,s.viewAccountTransferData.transferAmount)," (",s.viewAccountTransferData.currency==null?null:s.viewAccountTransferData.currency.code,") "),e(4),u("",l(23,38,"labels.inputs.Transaction Date"),":"),e(3),c(l(26,40,s.viewAccountTransferData.transferDate)),e(4),u("",l(30,42,"labels.inputs.Destination"),":"),e(3),c(s.viewAccountTransferData.transferDescription),e(3),c(l(36,44,"labels.heading.Transferred From")),e(6),u("",l(42,46,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.fromOffice==null?null:s.viewAccountTransferData.fromOffice.name),e(3),u("",l(48,48,"labels.inputs.Client"),":"),e(3),c(s.viewAccountTransferData.fromClient==null?null:s.viewAccountTransferData.fromClient.displayName),e(3),u("",l(54,50,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.fromAccountType==null?null:s.viewAccountTransferData.fromAccountType.value),e(3),u("",l(59,52,"labels.inputs.Account No"),":"),e(3),c(s.viewAccountTransferData.fromAccount==null?null:s.viewAccountTransferData.fromAccount.accountNo),e(3),c(l(65,54,"labels.heading.Transferred To")),e(6),u("",l(71,56,"labels.inputs.Office"),":"),e(3),c(s.viewAccountTransferData.toOffice==null?null:s.viewAccountTransferData.toOffice.name),e(3),u("",l(77,58,"labels.inputs.Client"),":"),e(3),d("href",s.transferToClient(s.viewAccountTransferData.toClient),ce),e(),u(" ",s.viewAccountTransferData.toClient==null?null:s.viewAccountTransferData.toClient.displayName," "),e(3),u("",l(84,60,"labels.inputs.Account Type"),":"),e(2),d("ngIf",s.viewAccountTransferData.toAccountType==null?null:s.viewAccountTransferData.toAccountType.value),e(3),u("",l(89,62,"labels.inputs.Account No"),":"),e(3),d("href",s.transferToAccount(s.viewAccountTransferData.toClient,s.viewAccountTransferData.toAccount),ce),e(),u(" ",s.viewAccountTransferData.toAccount==null?null:s.viewAccountTransferData.toAccount.accountNo," "),e(3),u(" ",l(96,64,"labels.buttons.Back")," "))},dependencies:[V,ye,Ee,L,U,z,st,Q,W,vt,yt,Ct,R,Le],styles:[".transfer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;position:relative;padding-left:20px}.status-indicator[_ngcontent-%COMP%]{position:absolute;top:0;left:-16px;width:4px;height:100%;border-radius:2px}.transfer-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-title[_ngcontent-%COMP%]{margin:0;font-size:1.125rem;font-weight:500}mat-divider[_ngcontent-%COMP%]{margin-bottom:.5rem}.info-grid[_ngcontent-%COMP%]{display:grid;gap:.75rem}.info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(150px,200px) auto;gap:1rem;align-items:start}@media (width <= 768px){.info-row[_ngcontent-%COMP%]{grid-template-columns:100%;gap:.25rem}}.info-label[_ngcontent-%COMP%]{font-weight:500}@media (width <= 768px){.info-label[_ngcontent-%COMP%]{font-size:.875rem}}.info-value[_ngcontent-%COMP%]{word-break:break-word}.info-value[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}"]})}}return t})();var _e=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsData(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ce=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId");return this.accountTransfersService.getStandingInstructionsDataAndTemplate(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var se=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.queryParamMap.get("officeId"),s=i.queryParamMap.get("accountType"),f=i.parent.paramMap.get("clientId");switch(s){case"fromloans":this.accountTypeId="1";break;case"fromsavings":this.accountTypeId="2";break;default:this.accountTypeId="0"}return this.accountTransfersService.getStandingInstructionsTemplate(f,m,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ve=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){switch(i.queryParamMap.get("accountType")){case"fromloans":this.accountTypeId="1",this.id=i.queryParamMap.get("loanId");break;case"fromsavings":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;case"interbank":this.accountTypeId="2",this.id=i.queryParamMap.get("savingsId");break;default:this.accountTypeId="0"}return this.accountTransfersService.newAccountTranferResource(this.id,this.accountTypeId)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var ge=(()=>{class t{constructor(){this.accountTransfersService=T(B),this.settingsService=T(J)}resolve(i){let m=i.parent.paramMap.get("standingInstructionsId"),s=this.settingsService.dateFormat,f=this.settingsService.language.code;return this.accountTransfersService.getStandingInstructionsTransactions(m,s,f)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ie=(()=>{class t{constructor(){this.accountTransfersService=T(B)}resolve(i){let m=i.paramMap.get("transferid");return this.accountTransfersService.getViewAccountTransferDetails(m)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac})}}return t})();var Ia=[{path:"",children:[{path:"create-standing-instructions",data:{title:"Create Standing Instructions",breadcrumb:"Create Standing Instructions",routeParamBreadcrumb:"Create Standing Instructions"},component:ie,resolve:{standingIntructionsTemplate:se}},{path:"make-account-transfer",data:{title:"Account Transfer",breadcrumb:"Account Transfer",routeParamBreadcrumb:"Account Transfer"},component:ae,resolve:{accountTransferTemplate:ve}},{path:"list-standing-instructions",data:{title:"List Standing Instructions",breadcrumb:"List Standing Instructions",routeParamBreadcrumb:"List Standing Instructions"},component:re,resolve:{standingIntructionsTemplate:se}},{path:"account-transfers",data:{title:"View Account Transfer",breadcrumb:"Account Transfers",routeParamBreadcrumb:!1},children:[{path:":transferid",data:{routeParamBreadcrumb:"transferid"},component:le,resolve:{viewAccountTransferData:Ie}}]},{path:":standingInstructionsId",data:{title:"Standing Instructions",routeParamBreadcrumb:"standingInstructionsId"},children:[{path:"view",data:{title:"View Standing Instructions",breadcrumb:"view",routeParamBreadcrumb:!1},component:Zt,resolve:{standingInstructionsData:_e}},{path:"edit",data:{title:"Edit Standing Instructions",breadcrumb:"edit",routeParamBreadcrumb:!1},component:ne,resolve:{standingInstructionsDataAndTemplate:Ce}},{path:"list-account-transactions",data:{title:"List Account Transactions",breadcrumb:"List Account Transactions",routeParamBreadcrumb:"List Account Transactions"},component:oe,resolve:{listTransactionData:ge}}]}]}],Qe=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({providers:[_e,Ce,se,ve,ge,Ie],imports:[pe.forChild(Ia),pe]})}}return t})();var Ta=t=>({balance:t});function xa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transaction Date")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ha(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Amount")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}function ba(t,p){if(t&1&&(a(0,"mat-error"),_(1,"fa-icon",15),r(2),o(3,"translate"),n()),t&2){let i=x();e(2),u(" ",wt(3,1,"errors.validation.msg.savingsproduct.insufficient.balance",nt(4,Ta,i.balance))," ")}}function Sa(t,p){t&1&&(a(0,"mat-error"),r(1),o(2,"translate"),o(3,"translate"),a(4,"strong"),r(5),o(6,"translate"),n()()),t&2&&(e(),g(" ",l(2,3,"labels.inputs.Transfer Description")," ",l(3,5,"labels.commons.is")," "),e(4),c(l(6,7,"labels.commons.required")))}var We=(()=>{class t{constructor(){this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1)}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=P({type:t,selectors:[["mifosx-make-account-interbank-transfers"]],inputs:{makeAccountTransferForm:"makeAccountTransferForm",balance:"balance"},decls:45,vars:30,consts:[["transferDatePicker",""],["amntInput",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-98",3,"click"],["matInput","","required","","formControlName","transferDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-98"],["matInput","","formControlName","toBank"],["matInput","","formControlName","toClientId"],["matInput","","formControlName","toAccountType"],["matInput","","formControlName","toAccountId"],[1,"flex-98","error-warn"],["type","number","matInput","","required","","formControlName","transferAmount"],["matInput","","formControlName","transferDescription","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["icon","exclamation-triangle","size","md"]],template:function(m,s){if(m&1){let f=F();a(0,"form",2)(1,"div",3)(2,"mat-form-field",4),h("click",function(){b(f);let w=M(9);return S(w.open())}),a(3,"mat-label"),r(4),o(5,"translate"),n(),_(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),C(10,xa,7,9,"mat-error"),n(),a(11,"mat-form-field",7)(12,"mat-label"),r(13),o(14,"translate"),n(),_(15,"input",8),n(),a(16,"mat-form-field",7)(17,"mat-label"),r(18),o(19,"translate"),n(),_(20,"input",9),n(),a(21,"mat-form-field",7)(22,"mat-label"),r(23),o(24,"translate"),n(),_(25,"input",10),n(),a(26,"mat-form-field",7)(27,"mat-label"),r(28),o(29,"translate"),n(),_(30,"input",11),n(),a(31,"mat-form-field",12)(32,"mat-label"),r(33),o(34,"translate"),n(),_(35,"input",13,1),C(37,ha,7,9,"mat-error"),C(38,ba,4,6,"mat-error"),n(),a(39,"mat-form-field",7)(40,"mat-label"),r(41),o(42,"translate"),n(),_(43,"textarea",14),C(44,Sa,7,9,"mat-error"),n()()()}if(m&2){let f,k=M(9);d("formGroup",s.makeAccountTransferForm),e(4),c(l(5,16,"labels.inputs.Transaction Date")),e(2),d("min",s.minDate)("max",s.maxDate)("matDatepicker",k),e(),d("for",k),e(3),v(s.makeAccountTransferForm.controls.transferDate.hasError("required")?10:-1),e(3),c(l(14,18,"labels.inputs.Bank")),e(5),c(l(19,20,"labels.inputs.Client")),e(5),c(l(24,22,"labels.inputs.Account Type")),e(5),c(l(29,24,"labels.inputs.Account")),e(5),c(l(34,26,"labels.inputs.Amount")),e(4),v(s.makeAccountTransferForm.controls.transferAmount.hasError("required")?37:-1),e(),v((f=s.makeAccountTransferForm.get("transferAmount"))!=null&&f.hasError("amountExceedsBalance")?38:-1),e(3),c(l(42,28,"labels.inputs.Description")),e(3),v(s.makeAccountTransferForm.controls.transferDescription.hasError("required")?44:-1)}},dependencies:[V,L,at,K,bt,X,it,lt,rt,ot,tt,Z,ct,pt,et,ft,_t,ut,vt,Ht,R],styles:["h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}.margin-t[_ngcontent-%COMP%]{margin-top:1em}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ml=(()=>{class t{static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275mod=Lt({type:t})}static{this.\u0275inj=Rt({imports:[Ge,$e,ze,Qe,Zt,ne,ie,ae,re,oe,le,We]})}}return t})();export{ml as AccountTransfersModule}; diff --git a/browser/assets/translations/cs-CS.json b/browser/assets/translations/cs-CS.json index 147fc49b4..54936ef61 100644 --- a/browser/assets/translations/cs-CS.json +++ b/browser/assets/translations/cs-CS.json @@ -1578,6 +1578,7 @@ "Currency Multiple": "Násobek měn", "Currency Name": "Název měny", "Currency in multiples of": "Měna v násobcích", + "Set the multiples of the loan and its installment": "Nastavit násobky půjčky a její splátky", "Current Balance": "Aktuální zůstatek", "Current Balances": "Aktuální zůstatky", "Current Business Date": "Aktuální obchodní datum", diff --git a/browser/assets/translations/de-DE.json b/browser/assets/translations/de-DE.json index faad02c33..a3505b7e7 100644 --- a/browser/assets/translations/de-DE.json +++ b/browser/assets/translations/de-DE.json @@ -1580,6 +1580,7 @@ "Currency Multiple": "Währungsmultiplikator", "Currency Name": "Währungsname", "Currency in multiples of": "Währung in Vielfachen von", + "Set the multiples of the loan and its installment": "Die Vielfachen des Darlehens und seiner Rate festlegen", "Current Balance": "Aktueller Kontostand", "Current Balances": "Aktuelle Guthaben", "Current Business Date": "Aktuelles Geschäftsdatum", diff --git a/browser/assets/translations/en-US.json b/browser/assets/translations/en-US.json index 62f6a5624..b993d69d0 100644 --- a/browser/assets/translations/en-US.json +++ b/browser/assets/translations/en-US.json @@ -1584,6 +1584,7 @@ "Currency Multiple": "Currency Multiple", "Currency Name": "Currency Name", "Currency in multiples of": "Currency in multiples of", + "Set the multiples of the loan and its installment": "Set the multiples of the loan and its installment", "Current Balance": "Current Balance", "Current Balances": "Current Balances", "Current Business Date": "Current Business Date", diff --git a/browser/assets/translations/es-CL.json b/browser/assets/translations/es-CL.json index 62bf983e5..6eb3bd932 100644 --- a/browser/assets/translations/es-CL.json +++ b/browser/assets/translations/es-CL.json @@ -1580,6 +1580,7 @@ "Currency Multiple": "Moneda múltiple", "Currency Name": "Nombre de la moneda", "Currency in multiples of": "Moneda en múltiplos de", + "Set the multiples of the loan and its installment": "Establecer los múltiplos del préstamo y su cuota", "Current Balance": "Saldo actual", "Current Balances": "Saldos actuales", "Current Business Date": "Fecha del sistema actual", diff --git a/browser/assets/translations/es-MX.json b/browser/assets/translations/es-MX.json index d382b579b..f13cace8f 100644 --- a/browser/assets/translations/es-MX.json +++ b/browser/assets/translations/es-MX.json @@ -1579,6 +1579,7 @@ "Currency Multiple": "Moneda múltiple", "Currency Name": "Nombre de la moneda", "Currency in multiples of": "Moneda en múltiplos de", + "Set the multiples of the loan and its installment": "Establecer los múltiplos del crédito y su cuota", "Current Balance": "Saldo actual", "Current Balances": "Saldos actuales", "Current Business Date": "Fecha del sistema actual", diff --git a/browser/assets/translations/fr-FR.json b/browser/assets/translations/fr-FR.json index 619b61e78..e71e790cb 100644 --- a/browser/assets/translations/fr-FR.json +++ b/browser/assets/translations/fr-FR.json @@ -1580,6 +1580,7 @@ "Currency Multiple": "Devise multiple", "Currency Name": "Nom de la devise", "Currency in multiples of": "Monnaie en multiples de", + "Set the multiples of the loan and its installment": "Définir les multiples du prêt et de son versement", "Current Balance": "Solde actuel", "Current Balances": "Soldes courants", "Current Business Date": "Date d'ouverture actuelle", diff --git a/browser/assets/translations/it-IT.json b/browser/assets/translations/it-IT.json index 12b7e38f9..e688402d8 100644 --- a/browser/assets/translations/it-IT.json +++ b/browser/assets/translations/it-IT.json @@ -1579,6 +1579,7 @@ "Currency Multiple": "Valuta multipla", "Currency Name": "Nome della valuta", "Currency in multiples of": "Valuta in multipli di", + "Set the multiples of the loan and its installment": "Imposta i multipli del prestito e della sua rata", "Current Balance": "Bilancio corrente", "Current Balances": "Saldi correnti", "Current Business Date": "Data lavorativa corrente", diff --git a/browser/assets/translations/ko-KO.json b/browser/assets/translations/ko-KO.json index 2c5c0f8af..633fe14d0 100644 --- a/browser/assets/translations/ko-KO.json +++ b/browser/assets/translations/ko-KO.json @@ -1581,6 +1581,7 @@ "Currency Multiple": "통화 배수", "Currency Name": "통화 이름", "Currency in multiples of": "통화의 배수", + "Set the multiples of the loan and its installment": "대출 및 할부금의 배수 설정", "Current Balance": "현재의 균형", "Current Balances": "현재 잔액", "Current Business Date": "현재 영업일", diff --git a/browser/assets/translations/lt-LT.json b/browser/assets/translations/lt-LT.json index 2e7007e06..32d7cda86 100644 --- a/browser/assets/translations/lt-LT.json +++ b/browser/assets/translations/lt-LT.json @@ -1578,6 +1578,7 @@ "Currency Multiple": "Keli valiuta", "Currency Name": "Valiutos pavadinimas", "Currency in multiples of": "Valiuta kartotiniais", + "Set the multiples of the loan and its installment": "Nustatyti paskolos ir jos įmokos kartotinius", "Current Balance": "Dabartinis balansas", "Current Balances": "Dabartiniai likučiai", "Current Business Date": "Dabartinė verslo data", diff --git a/browser/assets/translations/lv-LV.json b/browser/assets/translations/lv-LV.json index a9011eb1e..074e2cf35 100644 --- a/browser/assets/translations/lv-LV.json +++ b/browser/assets/translations/lv-LV.json @@ -1580,6 +1580,7 @@ "Currency Multiple": "Valūta vairākas", "Currency Name": "Valūtas nosaukums", "Currency in multiples of": "Valūta daudzkārtnēs", + "Set the multiples of the loan and its installment": "Iestatīt aizdevuma un tā maksājuma daudzkārtņus", "Current Balance": "Pašreizējā bilance", "Current Balances": "Pašreizējie atlikumi", "Current Business Date": "Pašreizējais darba datums", diff --git a/browser/assets/translations/ne-NE.json b/browser/assets/translations/ne-NE.json index 961ff2667..5f8fe93f7 100644 --- a/browser/assets/translations/ne-NE.json +++ b/browser/assets/translations/ne-NE.json @@ -1578,6 +1578,7 @@ "Currency Multiple": "मुद्रा बहु", "Currency Name": "मुद्रा नाम", "Currency in multiples of": "को गुणनमा मुद्रा", + "Set the multiples of the loan and its installment": "ऋण र यसको किस्ताको गुणन सेट गर्नुहोस्", "Current Balance": "हालको मौज्दात", "Current Balances": "हालको ब्यालेन्स", "Current Business Date": "हालको व्यापार मिति", diff --git a/browser/assets/translations/pt-PT.json b/browser/assets/translations/pt-PT.json index d6dc9b11d..a646678c2 100644 --- a/browser/assets/translations/pt-PT.json +++ b/browser/assets/translations/pt-PT.json @@ -1579,6 +1579,7 @@ "Currency Multiple": "Múltipla Moeda", "Currency Name": "Nome da moeda", "Currency in multiples of": "Moeda em múltiplos de", + "Set the multiples of the loan and its installment": "Definir os múltiplos do empréstimo e sua prestação", "Current Balance": "Saldo Atual", "Current Balances": "Saldos Atuais", "Current Business Date": "Data comercial atual", diff --git a/browser/assets/translations/sw-SW.json b/browser/assets/translations/sw-SW.json index 87aa69291..37baf6faa 100644 --- a/browser/assets/translations/sw-SW.json +++ b/browser/assets/translations/sw-SW.json @@ -1576,6 +1576,7 @@ "Currency Multiple": "Sarafu Nyingi", "Currency Name": "Jina la Sarafu", "Currency in multiples of": "Sarafu katika mafungu ya", + "Set the multiples of the loan and its installment": "Weka mafungu ya mkopo na awamu yake", "Current Balance": "Salio la Sasa", "Current Balances": "Mizani ya Sasa", "Current Business Date": "Tarehe ya Biashara ya Sasa", diff --git a/browser/chunk-HZWIHY3V.js b/browser/chunk-2XE77LT4.js similarity index 99% rename from browser/chunk-HZWIHY3V.js rename to browser/chunk-2XE77LT4.js index cfac85db8..9863bf559 100644 --- a/browser/chunk-HZWIHY3V.js +++ b/browser/chunk-2XE77LT4.js @@ -10,7 +10,7 @@ Arguments: `+Array.prototype.slice.call(v).join("")+` ${e.map((n,o)=>`${o+1}) ${n.toString()}`).join(` `)}`:"",this.name="UnsubscriptionError",this.errors=e});function Uc(t,i){if(t){let e=t.indexOf(i);0<=e&&t.splice(e,1)}}var Ee=class t{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let r of e)r.remove(this);else e.remove(this);let{initialTeardown:n}=this;if(Je(n))try{n()}catch(r){i=r instanceof i3?r.errors:[r]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let r of o)try{sx(r)}catch(a){i=i??[],a instanceof i3?i=[...i,...a.errors]:i.push(a)}}if(i)throw new i3(i)}}add(i){var e;if(i&&i!==this)if(this.closed)sx(i);else{if(i instanceof t){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(i)}}_hasParent(i){let{_parentage:e}=this;return e===i||Array.isArray(e)&&e.includes(i)}_addParent(i){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(i),e):e?[e,i]:i}_removeParent(i){let{_parentage:e}=this;e===i?this._parentage=null:Array.isArray(e)&&Uc(e,i)}remove(i){let{_finalizers:e}=this;e&&Uc(e,i),i instanceof t&&i._removeParent(this)}};Ee.EMPTY=(()=>{let t=new Ee;return t.closed=!0,t})();var Bg=Ee.EMPTY;function o3(t){return t instanceof Ee||t&&"closed"in t&&Je(t.remove)&&Je(t.add)&&Je(t.unsubscribe)}function sx(t){Je(t)?t():t.unsubscribe()}var Pr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var d1={setTimeout(t,i,...e){let{delegate:n}=d1;return n?.setTimeout?n.setTimeout(t,i,...e):setTimeout(t,i,...e)},clearTimeout(t){let{delegate:i}=d1;return(i?.clearTimeout||clearTimeout)(t)},delegate:void 0};function r3(t){d1.setTimeout(()=>{let{onUnhandledError:i}=Pr;if(i)i(t);else throw t})}function $c(){}var cx=jg("C",void 0,void 0);function lx(t){return jg("E",void 0,t)}function dx(t){return jg("N",t,void 0)}function jg(t,i,e){return{kind:t,value:i,error:e}}var Gc=null;function u1(t){if(Pr.useDeprecatedSynchronousErrorHandling){let i=!Gc;if(i&&(Gc={errorThrown:!1,error:null}),t(),i){let{errorThrown:e,error:n}=Gc;if(Gc=null,e)throw n}}else t()}function ux(t){Pr.useDeprecatedSynchronousErrorHandling&&Gc&&(Gc.errorThrown=!0,Gc.error=t)}var Wc=class extends Ee{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,o3(i)&&i.add(this)):this.destination=V$}static create(i,e,n){return new Lr(i,e,n)}next(i){this.isStopped?Ug(dx(i),this):this._next(i)}error(i){this.isStopped?Ug(lx(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?Ug(cx,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},N$=Function.prototype.bind;function Hg(t,i){return N$.call(t,i)}var $g=class{constructor(i){this.partialObserver=i}next(i){let{partialObserver:e}=this;if(e.next)try{e.next(i)}catch(n){a3(n)}}error(i){let{partialObserver:e}=this;if(e.error)try{e.error(i)}catch(n){a3(n)}else a3(i)}complete(){let{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(e){a3(e)}}},Lr=class extends Wc{constructor(i,e,n){super();let o;if(Je(i)||!i)o={next:i??void 0,error:e??void 0,complete:n??void 0};else{let r;this&&Pr.useDeprecatedNextContext?(r=Object.create(i),r.unsubscribe=()=>this.unsubscribe(),o={next:i.next&&Hg(i.next,r),error:i.error&&Hg(i.error,r),complete:i.complete&&Hg(i.complete,r)}):o=i}this.destination=new $g(o)}};function a3(t){Pr.useDeprecatedSynchronousErrorHandling?ux(t):r3(t)}function F$(t){throw t}function Ug(t,i){let{onStoppedNotification:e}=Pr;e&&d1.setTimeout(()=>e(t,i))}var V$={closed:!0,next:$c,error:F$,complete:$c};var m1=typeof Symbol=="function"&&Symbol.observable||"@@observable";function mo(t){return t}function Gg(...t){return Wg(t)}function Wg(t){return t.length===0?mo:t.length===1?t[0]:function(e){return t.reduce((n,o)=>o(n),e)}}var Fe=(()=>{class t{constructor(e){e&&(this._subscribe=e)}lift(e){let n=new t;return n.source=this,n.operator=e,n}subscribe(e,n,o){let r=j$(e)?e:new Lr(e,n,o);return u1(()=>{let{operator:a,source:s}=this;r.add(a?a.call(r,s):s?this._subscribe(r):this._trySubscribe(r))}),r}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return n=mx(n),new n((o,r)=>{let a=new Lr({next:s=>{try{e(s)}catch(c){r(c),a.unsubscribe()}},error:r,complete:o});this.subscribe(a)})}_subscribe(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)}[m1](){return this}pipe(...e){return Wg(e)(this)}toPromise(e){return e=mx(e),new e((n,o)=>{let r;this.subscribe(a=>r=a,a=>o(a),()=>n(r))})}}return t.create=i=>new t(i),t})();function mx(t){var i;return(i=t??Pr.Promise)!==null&&i!==void 0?i:Promise}function B$(t){return t&&Je(t.next)&&Je(t.error)&&Je(t.complete)}function j$(t){return t&&t instanceof Wc||B$(t)&&o3(t)}function Yg(t){return Je(t?.lift)}function Xe(t){return i=>{if(Yg(i))return i.lift(function(e){try{return t(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Qe(t,i,e,n,o){return new qg(t,i,e,n,o)}var qg=class extends Wc{constructor(i,e,n,o,r,a){super(i),this.onFinalize=r,this.shouldUnsubscribe=a,this._next=e?function(s){try{e(s)}catch(c){i.error(c)}}:super._next,this._error=o?function(s){try{o(s)}catch(c){i.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(s){i.error(s)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((i=this.onFinalize)===null||i===void 0||i.call(this))}}};function p1(){return Xe((t,i)=>{let e=null;t._refCount++;let n=Qe(i,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){e=null;return}let o=t._connection,r=e;e=null,o&&(!r||o===r)&&o.unsubscribe(),i.unsubscribe()});t.subscribe(n),n.closed||(e=t.connect())})}var Bs=class extends Fe{constructor(i,e){super(),this.source=i,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,Yg(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){let i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new Ee;let e=this.getSubject();i.add(this.source.subscribe(Qe(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Ee.EMPTY)}return i}refCount(){return p1()(this)}};var f1={schedule(t){let i=requestAnimationFrame,e=cancelAnimationFrame,{delegate:n}=f1;n&&(i=n.requestAnimationFrame,e=n.cancelAnimationFrame);let o=i(r=>{e=void 0,t(r)});return new Ee(()=>e?.(o))},requestAnimationFrame(...t){let{delegate:i}=f1;return(i?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:i}=f1;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var px=Vs(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var B=(()=>{class t extends Fe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let n=new s3(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new px}next(e){u1(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(e)}})}error(e){u1(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){u1(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:n,isStopped:o,observers:r}=this;return n||o?Bg:(this.currentObservers=null,r.push(e),new Ee(()=>{this.currentObservers=null,Uc(r,e)}))}_checkFinalizedStatuses(e){let{hasError:n,thrownError:o,isStopped:r}=this;n?e.error(o):r&&e.complete()}asObservable(){let e=new Fe;return e.source=this,e}}return t.create=(i,e)=>new s3(i,e),t})(),s3=class extends B{constructor(i,e){super(),this.destination=i,this.source=e}next(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,i)}error(i){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,i)}complete(){var i,e;(e=(i=this.destination)===null||i===void 0?void 0:i.complete)===null||e===void 0||e.call(i)}_subscribe(i){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(i))!==null&&n!==void 0?n:Bg}};var ut=class extends B{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){let e=super._subscribe(i);return!e.closed&&i.next(this._value),e}getValue(){let{hasError:i,thrownError:e,_value:n}=this;if(i)throw e;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}};var R2={now(){return(R2.delegate||Date).now()},delegate:void 0};var Ar=class extends B{constructor(i=1/0,e=1/0,n=R2){super(),this._bufferSize=i,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,e)}next(i){let{isStopped:e,_buffer:n,_infiniteTimeWindow:o,_timestampProvider:r,_windowTime:a}=this;e||(n.push(i),!o&&n.push(r.now()+a)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:o}=this,r=o.slice();for(let a=0;a0?super.requestAsyncId(i,e,n):(i.actions.push(this),i._scheduled||(i._scheduled=f1.requestAnimationFrame(()=>i.flush(void 0))))}recycleAsyncId(i,e,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(i,e,n);let{actions:r}=i;e!=null&&e===i._scheduled&&((o=r[r.length-1])===null||o===void 0?void 0:o.id)!==e&&(f1.cancelAnimationFrame(e),i._scheduled=void 0)}};var d3=class extends _1{flush(i){this._active=!0;let e;i?e=i.id:(e=this._scheduled,this._scheduled=void 0);let{actions:n}=this,o;i=i||n.shift();do if(o=i.execute(i.state,i.delay))break;while((i=n[0])&&i.id===e&&n.shift());if(this._active=!1,o){for(;(i=n[0])&&i.id===e&&n.shift();)i.unsubscribe();throw o}}};var u3=new d3(l3);var Pn=new Fe(t=>t.complete());function m3(t){return t&&Je(t.schedule)}function Qg(t){return t[t.length-1]}function p3(t){return Je(Qg(t))?t.pop():void 0}function ma(t){return m3(Qg(t))?t.pop():void 0}function hx(t,i){return typeof Qg(t)=="number"?t.pop():i}function At(t,i,e,n){var o=arguments.length,r=o<3?i:n===null?n=Object.getOwnPropertyDescriptor(i,e):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,i,e,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(o<3?a(r):o>3?a(i,e,r):a(i,e))||r);return o>3&&r&&Object.defineProperty(i,e,r),r}function _x(t,i,e,n){function o(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function s(f){try{u(n.next(f))}catch(h){a(h)}}function c(f){try{u(n.throw(f))}catch(h){a(h)}}function u(f){f.done?r(f.value):o(f.value).then(s,c)}u((n=n.apply(t,i||[])).next())})}function gx(t){var i=typeof Symbol=="function"&&Symbol.iterator,e=i&&t[i],n=0;if(e)return e.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yc(t){return this instanceof Yc?(this.v=t,this):new Yc(t)}function bx(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(t,i||[]),o,r=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",a),o[Symbol.asyncIterator]=function(){return this},o;function a(x){return function(S){return Promise.resolve(S).then(x,h)}}function s(x,S){n[x]&&(o[x]=function(Y){return new Promise(function(Q,X){r.push([x,Y,Q,X])>1||c(x,Y)})},S&&(o[x]=S(o[x])))}function c(x,S){try{u(n[x](S))}catch(Y){y(r[0][3],Y)}}function u(x){x.value instanceof Yc?Promise.resolve(x.value.v).then(f,h):y(r[0][2],x)}function f(x){c("next",x)}function h(x){c("throw",x)}function y(x,S){x(S),r.shift(),r.length&&c(r[0][0],r[0][1])}}function vx(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t[Symbol.asyncIterator],e;return i?i.call(t):(t=typeof gx=="function"?gx(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(a){return new Promise(function(s,c){a=t[r](a),o(s,c,a.done,a.value)})}}function o(r,a,s,c){Promise.resolve(c).then(function(u){r({value:u,done:s})},a)}}var b1=t=>t&&typeof t.length=="number"&&typeof t!="function";function f3(t){return Je(t?.then)}function h3(t){return Je(t[m1])}function g3(t){return Symbol.asyncIterator&&Je(t?.[Symbol.asyncIterator])}function _3(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function H$(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var b3=H$();function v3(t){return Je(t?.[b3])}function y3(t){return bx(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:n,done:o}=yield Yc(e.read());if(o)return yield Yc(void 0);yield yield Yc(n)}}finally{e.releaseLock()}})}function C3(t){return Je(t?.getReader)}function Rt(t){if(t instanceof Fe)return t;if(t!=null){if(h3(t))return U$(t);if(b1(t))return $$(t);if(f3(t))return G$(t);if(g3(t))return yx(t);if(v3(t))return W$(t);if(C3(t))return Y$(t)}throw _3(t)}function U$(t){return new Fe(i=>{let e=t[m1]();if(Je(e.subscribe))return e.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $$(t){return new Fe(i=>{for(let e=0;e{t.then(e=>{i.closed||(i.next(e),i.complete())},e=>i.error(e)).then(null,r3)})}function W$(t){return new Fe(i=>{for(let e of t)if(i.next(e),i.closed)return;i.complete()})}function yx(t){return new Fe(i=>{q$(t,i).catch(e=>i.error(e))})}function Y$(t){return yx(y3(t))}function q$(t,i){var e,n,o,r;return _x(this,void 0,void 0,function*(){try{for(e=vx(t);n=yield e.next(),!n.done;){let a=n.value;if(i.next(a),i.closed)return}}catch(a){o={error:a}}finally{try{n&&!n.done&&(r=e.return)&&(yield r.call(e))}finally{if(o)throw o.error}}i.complete()})}function Wi(t,i,e,n=0,o=!1){let r=i.schedule(function(){e(),o?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(r),!o)return r}function x3(t,i=0){return Xe((e,n)=>{e.subscribe(Qe(n,o=>Wi(n,t,()=>n.next(o),i),()=>Wi(n,t,()=>n.complete(),i),o=>Wi(n,t,()=>n.error(o),i)))})}function M3(t,i=0){return Xe((e,n)=>{n.add(t.schedule(()=>e.subscribe(n),i))})}function Cx(t,i){return Rt(t).pipe(M3(i),x3(i))}function xx(t,i){return Rt(t).pipe(M3(i),x3(i))}function Mx(t,i){return new Fe(e=>{let n=0;return i.schedule(function(){n===t.length?e.complete():(e.next(t[n++]),e.closed||this.schedule())})})}function wx(t,i){return new Fe(e=>{let n;return Wi(e,i,()=>{n=t[b3](),Wi(e,i,()=>{let o,r;try{({value:o,done:r}=n.next())}catch(a){e.error(a);return}r?e.complete():e.next(o)},0,!0)}),()=>Je(n?.return)&&n.return()})}function w3(t,i){if(!t)throw new Error("Iterable cannot be null");return new Fe(e=>{Wi(e,i,()=>{let n=t[Symbol.asyncIterator]();Wi(e,i,()=>{n.next().then(o=>{o.done?e.complete():e.next(o.value)})},0,!0)})})}function Dx(t,i){return w3(y3(t),i)}function Sx(t,i){if(t!=null){if(h3(t))return Cx(t,i);if(b1(t))return Mx(t,i);if(f3(t))return xx(t,i);if(g3(t))return w3(t,i);if(v3(t))return wx(t,i);if(C3(t))return Dx(t,i)}throw _3(t)}function Zt(t,i){return i?Sx(t,i):Rt(t)}function ne(...t){let i=ma(t);return Zt(t,i)}function Lo(t,i){let e=Je(t)?t:()=>t,n=o=>o.error(e());return new Fe(i?o=>i.schedule(n,0,o):n)}function hi(t){return!!t&&(t instanceof Fe||Je(t.lift)&&Je(t.subscribe))}var zr=Vs(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Kg(t,i){let e=typeof i=="object";return new Promise((n,o)=>{let r=new Lr({next:a=>{n(a),r.unsubscribe()},error:o,complete:()=>{e?n(i.defaultValue):o(new zr)}});t.subscribe(r)})}function D3(t){return t instanceof Date&&!isNaN(t)}var Q$=Vs(t=>function(e=null){t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e});function Xg(t,i){let{first:e,each:n,with:o=K$,scheduler:r=i??Rr,meta:a=null}=D3(t)?{first:t}:typeof t=="number"?{each:t}:t;if(e==null&&n==null)throw new TypeError("No timeout provided.");return Xe((s,c)=>{let u,f,h=null,y=0,x=S=>{f=Wi(c,r,()=>{try{u.unsubscribe(),Rt(o({meta:a,lastValue:h,seen:y})).subscribe(c)}catch(Y){c.error(Y)}},S)};u=s.subscribe(Qe(c,S=>{f?.unsubscribe(),y++,c.next(h=S),n>0&&x(n)},void 0,void 0,()=>{f?.closed||f?.unsubscribe(),h=null})),!y&&x(e!=null?typeof e=="number"?e:+e-r.now():n)})}function K$(t){throw new Q$(t)}function le(t,i){return Xe((e,n)=>{let o=0;e.subscribe(Qe(n,r=>{n.next(t.call(i,r,o++))}))})}var{isArray:X$}=Array;function Z$(t,i){return X$(i)?t(...i):t(i)}function v1(t){return le(i=>Z$(t,i))}var{isArray:J$}=Array,{getPrototypeOf:eG,prototype:tG,keys:nG}=Object;function S3(t){if(t.length===1){let i=t[0];if(J$(i))return{args:i,keys:null};if(iG(i)){let e=nG(i);return{args:e.map(n=>i[n]),keys:e}}}return{args:t,keys:null}}function iG(t){return t&&typeof t=="object"&&eG(t)===tG}function k3(t,i){return t.reduce((e,n,o)=>(e[n]=i[o],e),{})}function ii(...t){let i=ma(t),e=p3(t),{args:n,keys:o}=S3(t);if(n.length===0)return Zt([],i);let r=new Fe(oG(n,i,o?a=>k3(o,a):mo));return e?r.pipe(v1(e)):r}function oG(t,i,e=mo){return n=>{kx(i,()=>{let{length:o}=t,r=new Array(o),a=o,s=o;for(let c=0;c{let u=Zt(t[c],i),f=!1;u.subscribe(Qe(n,h=>{r[c]=h,f||(f=!0,s--),s||n.next(e(r.slice()))},()=>{--a||n.complete()}))},n)},n)}}function kx(t,i,e){t?Wi(e,t,i):i()}function Ex(t,i,e,n,o,r,a,s){let c=[],u=0,f=0,h=!1,y=()=>{h&&!c.length&&!u&&i.complete()},x=Y=>u{r&&i.next(Y),u++;let Q=!1;Rt(e(Y,f++)).subscribe(Qe(i,X=>{o?.(X),r?x(X):i.next(X)},()=>{Q=!0},void 0,()=>{if(Q)try{for(u--;c.length&&uS(X)):S(X)}y()}catch(X){i.error(X)}}))};return t.subscribe(Qe(i,x,()=>{h=!0,y()})),()=>{s?.()}}function cn(t,i,e=1/0){return Je(i)?cn((n,o)=>le((r,a)=>i(n,r,o,a))(Rt(t(n,o))),e):(typeof i=="number"&&(e=i),Xe((n,o)=>Ex(n,o,t,e)))}function pa(t=1/0){return cn(mo,t)}function Ix(){return pa(1)}function Yi(...t){return Ix()(Zt(t,ma(t)))}function qi(t){return new Fe(i=>{Rt(t()).subscribe(i)})}function Ja(...t){let i=p3(t),{args:e,keys:n}=S3(t),o=new Fe(r=>{let{length:a}=e;if(!a){r.complete();return}let s=new Array(a),c=a,u=a;for(let f=0;f{h||(h=!0,u--),s[f]=y},()=>c--,void 0,()=>{(!c||!h)&&(u||r.next(n?k3(n,s):s),r.complete())}))}});return i?o.pipe(v1(i)):o}var rG=["addListener","removeListener"],aG=["addEventListener","removeEventListener"],sG=["on","off"];function N2(t,i,e,n){if(Je(e)&&(n=e,e=void 0),n)return N2(t,i,e).pipe(v1(n));let[o,r]=dG(t)?aG.map(a=>s=>t[a](i,s,e)):cG(t)?rG.map(Ox(t,i)):lG(t)?sG.map(Ox(t,i)):[];if(!o&&b1(t))return cn(a=>N2(a,i,e))(Rt(t));if(!o)throw new TypeError("Invalid event target");return new Fe(a=>{let s=(...c)=>a.next(1r(s)})}function Ox(t,i){return e=>n=>t[e](i,n)}function cG(t){return Je(t.addListener)&&Je(t.removeListener)}function lG(t){return Je(t.on)&&Je(t.off)}function dG(t){return Je(t.addEventListener)&&Je(t.removeEventListener)}function es(t=0,i,e=fx){let n=-1;return i!=null&&(m3(i)?e=i:n=i),new Fe(o=>{let r=D3(t)?+t-e.now():t;r<0&&(r=0);let a=0;return e.schedule(function(){o.closed||(o.next(a++),0<=n?this.schedule(void 0,n):o.complete())},r)})}function Zg(t=0,i=Rr){return t<0&&(t=0),es(t,t,i)}function pt(...t){let i=ma(t),e=hx(t,1/0),n=t;return n.length?n.length===1?Rt(n[0]):pa(e)(Zt(n,i)):Pn}var{isArray:uG}=Array;function Tx(t){return t.length===1&&uG(t[0])?t[0]:t}function Oe(t,i){return Xe((e,n)=>{let o=0;e.subscribe(Qe(n,r=>t.call(i,r,o++)&&n.next(r)))})}function Jg(...t){return t=Tx(t),t.length===1?Rt(t[0]):new Fe(mG(t))}function mG(t){return i=>{let e=[];for(let n=0;e&&!i.closed&&n{if(e){for(let r=0;r{let n=!1,o=null,r=null,a=!1,s=()=>{if(r?.unsubscribe(),r=null,n){n=!1;let u=o;o=null,e.next(u)}a&&e.complete()},c=()=>{r=null,a&&e.complete()};i.subscribe(Qe(e,u=>{n=!0,o=u,r||Rt(t(u)).subscribe(r=Qe(e,s,c))},()=>{a=!0,(!n||!r||r.closed)&&e.complete()}))})}function y1(t,i=Rr){return Px(()=>es(t,i))}function hn(t){return Xe((i,e)=>{let n=null,o=!1,r;n=i.subscribe(Qe(e,void 0,void 0,a=>{r=Rt(t(a,hn(t)(i))),n?(n.unsubscribe(),n=null,r.subscribe(e)):o=!0})),o&&(n.unsubscribe(),n=null,r.subscribe(e))})}function E3(t,i,e,n,o){return(r,a)=>{let s=e,c=i,u=0;r.subscribe(Qe(a,f=>{let h=u++;c=s?t(c,f,h):(s=!0,f),n&&a.next(c)},o&&(()=>{s&&a.next(c),a.complete()})))}}function I3(t,i){return Xe(E3(t,i,arguments.length>=2,!1,!0))}function po(t,i){return Je(i)?cn(t,i,1):cn(t,1)}function $o(t,i=Rr){return Xe((e,n)=>{let o=null,r=null,a=null,s=()=>{if(o){o.unsubscribe(),o=null;let u=r;r=null,n.next(u)}};function c(){let u=a+t,f=i.now();if(f{r=u,a=i.now(),o||(o=i.schedule(c,t),n.add(o))},()=>{s(),n.complete()},void 0,()=>{r=o=null}))})}function js(t){return Xe((i,e)=>{let n=!1;i.subscribe(Qe(e,o=>{n=!0,e.next(o)},()=>{n||e.next(t),e.complete()}))})}function Ve(t){return t<=0?()=>Pn:Xe((i,e)=>{let n=0;i.subscribe(Qe(e,o=>{++n<=t&&(e.next(o),t<=n&&e.complete())}))})}function Lx(){return Xe((t,i)=>{t.subscribe(Qe(i,$c))})}function C1(t){return le(()=>t)}function e8(t,i){return i?e=>Yi(i.pipe(Ve(1),Lx()),e.pipe(e8(t))):cn((e,n)=>Rt(t(e,n)).pipe(Ve(1),C1(e)))}function ts(t,i=Rr){let e=es(t,i);return e8(()=>e)}function x1(t,i=mo){return t=t??pG,Xe((e,n)=>{let o,r=!0;e.subscribe(Qe(n,a=>{let s=i(a);(r||!t(o,s))&&(r=!1,o=s,n.next(a))}))})}function pG(t,i){return t===i}function O3(t=fG){return Xe((i,e)=>{let n=!1;i.subscribe(Qe(e,o=>{n=!0,e.next(o)},()=>n?e.complete():e.error(t())))})}function fG(){return new zr}function Nr(t){return Xe((i,e)=>{try{i.subscribe(e)}finally{e.add(t)}})}function Ao(t,i){let e=arguments.length>=2;return n=>n.pipe(t?Oe((o,r)=>t(o,r,n)):mo,Ve(1),e?js(i):O3(()=>new zr))}function M1(t){return t<=0?()=>Pn:Xe((i,e)=>{let n=[];i.subscribe(Qe(e,o=>{n.push(o),t{for(let o of n)e.next(o);e.complete()},void 0,()=>{n=null}))})}function t8(t,i){let e=arguments.length>=2;return n=>n.pipe(t?Oe((o,r)=>t(o,r,n)):mo,M1(1),e?js(i):O3(()=>new zr))}function T3(){return Xe((t,i)=>{let e,n=!1;t.subscribe(Qe(i,o=>{let r=e;e=o,n&&i.next([r,o]),n=!0}))})}function n8(t,i){return Xe(E3(t,i,arguments.length>=2,!0))}function F2(t={}){let{connector:i=()=>new B,resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:o=!0}=t;return r=>{let a,s,c,u=0,f=!1,h=!1,y=()=>{s?.unsubscribe(),s=void 0},x=()=>{y(),a=c=void 0,f=h=!1},S=()=>{let Y=a;x(),Y?.unsubscribe()};return Xe((Y,Q)=>{u++,!h&&!f&&y();let X=c=c??i();Q.add(()=>{u--,u===0&&!h&&!f&&(s=i8(S,o))}),X.subscribe(Q),!a&&u>0&&(a=new Lr({next:pe=>X.next(pe),error:pe=>{h=!0,y(),s=i8(x,e,pe),X.error(pe)},complete:()=>{f=!0,y(),s=i8(x,n),X.complete()}}),Rt(Y).subscribe(a))})(r)}}function i8(t,i,...e){if(i===!0){t();return}if(i===!1)return;let n=new Lr({next:()=>{n.unsubscribe(),t()}});return Rt(i(...e)).subscribe(n)}function Hs(t,i,e){let n,o=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:i=1/0,refCount:o=!1,scheduler:e}=t:n=t??1/0,F2({connector:()=>new Ar(n,i,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function qc(t){return Oe((i,e)=>t<=e)}function Ze(...t){let i=ma(t);return Xe((e,n)=>{(i?Yi(t,e,i):Yi(t,e)).subscribe(n)})}function at(t,i){return Xe((e,n)=>{let o=null,r=0,a=!1,s=()=>a&&!o&&n.complete();e.subscribe(Qe(n,c=>{o?.unsubscribe();let u=0,f=r++;Rt(t(c,f)).subscribe(o=Qe(n,h=>n.next(i?i(c,h,f,u++):h),()=>{o=null,s()}))},()=>{a=!0,s()}))})}function xe(t){return Xe((i,e)=>{Rt(t).subscribe(Qe(e,()=>e.complete(),$c)),!e.closed&&i.subscribe(e)})}function o8(t,i=!1){return Xe((e,n)=>{let o=0;e.subscribe(Qe(n,r=>{let a=t(r,o++);(a||i)&&n.next(r),!a&&n.complete()}))})}function It(t,i,e){let n=Je(t)||i||e?{next:t,error:i,complete:e}:t;return n?Xe((o,r)=>{var a;(a=n.subscribe)===null||a===void 0||a.call(n);let s=!0;o.subscribe(Qe(r,c=>{var u;(u=n.next)===null||u===void 0||u.call(n,c),r.next(c)},()=>{var c;s=!1,(c=n.complete)===null||c===void 0||c.call(n),r.complete()},c=>{var u;s=!1,(u=n.error)===null||u===void 0||u.call(n,c),r.error(c)},()=>{var c,u;s&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(u=n.finalize)===null||u===void 0||u.call(n)}))}):mo}function Ax(t){let i=ot(null);try{return t()}finally{ot(i)}}var Rx=Re(q({},Vc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function zx(t){if(t.dirty=!1,t.version>0&&!jc(t))return;t.version++;let i=Ns(t);try{t.cleanup(),t.fn()}finally{Bc(t,i)}}var R3="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",he=class extends Error{code;constructor(i,e){super(dr(i,e)),this.code=i}};function hG(t){return`NG0${Math.abs(t)}`}function dr(t,i){return`${hG(t)}${i?": "+i:""}`}var oi=globalThis;function Kt(t){for(let i in t)if(t[i]===Kt)return i;throw Error("")}function Vx(t,i){for(let e in i)i.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=i[e])}function is(t){if(typeof t=="string")return t;if(Array.isArray(t))return`[${t.map(is).join(", ")}]`;if(t==null)return""+t;let i=t.overriddenName||t.name;if(i)return`${i}`;let e=t.toString();if(e==null)return""+e;let n=e.indexOf(` `);return n>=0?e.slice(0,n):e}function z3(t,i){return t?i?`${t} ${i}`:t:i||""}var gG=Kt({__forward_ref__:Kt});function Pt(t){return t.__forward_ref__=Pt,t.toString=function(){return is(this())},t}function gi(t){return g8(t)?t():t}function g8(t){return typeof t=="function"&&t.hasOwnProperty(gG)&&t.__forward_ref__===Pt}function z(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function J(t){return{providers:t.providers||[],imports:t.imports||[]}}function U2(t){return _G(t,N3)}function _8(t){return U2(t)!==null}function _G(t,i){return t.hasOwnProperty(i)&&t[i]||null}function bG(t){let i=t?.[N3]??null;return i||null}function a8(t){return t&&t.hasOwnProperty(L3)?t[L3]:null}var N3=Kt({\u0275prov:Kt}),L3=Kt({\u0275inj:Kt}),L=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(i,e){this._desc=i,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=z({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function b8(t){return t&&!!t.\u0275providers}var v8=Kt({\u0275cmp:Kt}),y8=Kt({\u0275dir:Kt}),C8=Kt({\u0275pipe:Kt}),x8=Kt({\u0275mod:Kt}),B2=Kt({\u0275fac:Kt}),Jc=Kt({__NG_ELEMENT_ID__:Kt}),Nx=Kt({__NG_ENV_ID__:Kt});function Ki(t){return typeof t=="string"?t:t==null?"":String(t)}function Bx(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Ki(t)}var jx=Kt({ngErrorCode:Kt}),vG=Kt({ngErrorMessage:Kt}),yG=Kt({ngTokenPath:Kt});function M8(t,i){return Hx("",-200,i)}function F3(t,i){throw new he(-201,!1)}function Hx(t,i,e){let n=new he(i,t);return n[jx]=i,n[vG]=t,e&&(n[yG]=e),n}function CG(t){return t[jx]}var s8;function Ux(){return s8}function fo(t){let i=s8;return s8=t,i}function w8(t,i,e){let n=U2(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(e&8)return null;if(i!==void 0)return i;F3(t,"Injector")}var xG={},Qc=xG,c8="__NG_DI_FLAG__",l8=class{injector;constructor(i){this.injector=i}retrieve(i,e){let n=Kc(e)||0;try{return this.injector.get(i,n&8?null:Qc,n)}catch(o){if(c1(o))return o;throw o}}};function MG(t,i=0){let e=qm();if(e===void 0)throw new he(-203,!1);if(e===null)return w8(t,void 0,i);{let n=wG(i),o=e.retrieve(t,n);if(c1(o)){if(n.optional)return null;throw o}return o}}function be(t,i=0){return(Ux()||MG)(gi(t),i)}function d(t,i){return be(t,Kc(i))}function Kc(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function wG(t){return{optional:!!(t&8),host:!!(t&1),self:!!(t&2),skipSelf:!!(t&4)}}function d8(t){let i=[];for(let e=0;eArray.isArray(e)?V3(e,i):i(e))}function S8(t,i,e){i>=t.length?t.push(e):t.splice(i,0,e)}function $2(t,i){return i>=t.length-1?t.pop():t.splice(i,1)[0]}function Wx(t,i){let e=[];for(let n=0;ni;){let r=o-2;t[o]=t[r],o--}t[i]=e,t[i+1]=n}}function B3(t,i,e){let n=D1(t,i);return n>=0?t[n|1]=e:(n=~n,Yx(t,n,i,e)),n}function j3(t,i){let e=D1(t,i);if(e>=0)return t[e|1]}function D1(t,i){return SG(t,i,1)}function SG(t,i,e){let n=0,o=t.length>>e;for(;o!==n;){let r=n+(o-n>>1),a=t[r<i?o=r:n=r+1}return~(o<{e.push(a)};return V3(i,a=>{let s=a;A3(s,r,[],n)&&(o||=[],o.push(s))}),o!==void 0&&Kx(o,r),e}function Kx(t,i){for(let e=0;e{i(r,n)})}}function A3(t,i,e,n){if(t=gi(t),!t)return!1;let o=null,r=a8(t),a=!r&&fa(t);if(!r&&!a){let c=t.ngModule;if(r=a8(c),r)o=c;else return!1}else{if(a&&!a.standalone)return!1;o=t}let s=n.has(o);if(a){if(s)return!1;if(n.add(o),a.dependencies){let c=typeof a.dependencies=="function"?a.dependencies():a.dependencies;for(let u of c)A3(u,i,e,n)}}else if(r){if(r.imports!=null&&!s){n.add(o);let u;try{V3(r.imports,f=>{A3(f,i,e,n)&&(u||=[],u.push(f))})}finally{}u!==void 0&&Kx(u,i)}if(!s){let u=Us(o)||(()=>new o);i({provide:o,useFactory:u,deps:Qi},o),i({provide:E8,useValue:o,multi:!0},o),i({provide:os,useValue:()=>be(o),multi:!0},o)}let c=r.providers;if(c!=null&&!s){let u=t;T8(c,f=>{i(f,u)})}}else return!1;return o!==t&&t.providers!==void 0}function T8(t,i){for(let e of t)b8(e)&&(e=e.\u0275providers),Array.isArray(e)?T8(e,i):i(e)}var kG=Kt({provide:String,useValue:Kt});function Xx(t){return t!==null&&typeof t=="object"&&kG in t}function EG(t){return!!(t&&t.useExisting)}function IG(t){return!!(t&&t.useFactory)}function Xc(t){return typeof t=="function"}function Zx(t){return!!t.useClass}var G2=new L(""),P3={},Fx={},r8;function S1(){return r8===void 0&&(r8=new j2),r8}var Jt=class{},Zc=class extends Jt{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(i,e,n,o){super(),this.parent=e,this.source=n,this.scopes=o,m8(i,a=>this.processProvider(a)),this.records.set(k8,w1(void 0,this)),o.has("environment")&&this.records.set(Jt,w1(void 0,this));let r=this.records.get(G2);r!=null&&typeof r.value=="string"&&this.scopes.add(r.value),this.injectorDefTypes=new Set(this.get(E8,Qi,{self:!0}))}retrieve(i,e){let n=Kc(e)||0;try{return this.get(i,Qc,n)}catch(o){if(c1(o))return o;throw o}}destroy(){V2(this),this._destroyed=!0;let i=ot(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ot(i)}}onDestroy(i){return V2(this),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){V2(this);let e=ua(this),n=fo(void 0),o;try{return i()}finally{ua(e),fo(n)}}get(i,e=Qc,n){if(V2(this),i.hasOwnProperty(Nx))return i[Nx](this);let o=Kc(n),r,a=ua(this),s=fo(void 0);try{if(!(o&4)){let u=this.records.get(i);if(u===void 0){let f=AG(i)&&U2(i);f&&this.injectableDefInScope(f)?u=w1(u8(i),P3):u=null,this.records.set(i,u)}if(u!=null)return this.hydrate(i,u,o)}let c=o&2?S1():this.parent;return e=o&8&&e===Qc?null:e,c.get(i,e)}catch(c){let u=CG(c);throw u===-200||u===-201?new he(u,null):c}finally{fo(s),ua(a)}}resolveInjectorInitializers(){let i=ot(null),e=ua(this),n=fo(void 0),o;try{let r=this.get(os,Qi,{self:!0});for(let a of r)a()}finally{ua(e),fo(n),ot(i)}}toString(){let i=[],e=this.records;for(let n of e.keys())i.push(is(n));return`R3Injector[${i.join(", ")}]`}processProvider(i){i=gi(i);let e=Xc(i)?i:gi(i&&i.provide),n=TG(i);if(!Xc(i)&&i.multi===!0){let o=this.records.get(e);o||(o=w1(void 0,P3,!0),o.factory=()=>d8(o.multi),this.records.set(e,o)),e=i,o.multi.push(i)}this.records.set(e,n)}hydrate(i,e,n){let o=ot(null);try{if(e.value===Fx)throw M8(is(i));return e.value===P3&&(e.value=Fx,e.value=e.factory(void 0,n)),typeof e.value=="object"&&e.value&&LG(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{ot(o)}}injectableDefInScope(i){if(!i.providedIn)return!1;let e=gi(i.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(i){let e=this._onDestroyHooks.indexOf(i);e!==-1&&this._onDestroyHooks.splice(e,1)}};function u8(t){let i=U2(t),e=i!==null?i.factory:Us(t);if(e!==null)return e;if(t instanceof L)throw new he(204,!1);if(t instanceof Function)return OG(t);throw new he(204,!1)}function OG(t){if(t.length>0)throw new he(204,!1);let e=bG(t);return e!==null?()=>e.factory(t):()=>new t}function TG(t){if(Xx(t))return w1(void 0,t.useValue);{let i=P8(t);return w1(i,P3)}}function P8(t,i,e){let n;if(Xc(t)){let o=gi(t);return Us(o)||u8(o)}else if(Xx(t))n=()=>gi(t.useValue);else if(IG(t))n=()=>t.useFactory(...d8(t.deps||[]));else if(EG(t))n=(o,r)=>be(gi(t.useExisting),r!==void 0&&r&8?8:void 0);else{let o=gi(t&&(t.useClass||t.provide));if(PG(t))n=()=>new o(...d8(t.deps));else return Us(o)||u8(o)}return n}function V2(t){if(t.destroyed)throw new he(205,!1)}function w1(t,i,e=!1){return{factory:t,value:i,multi:e?[]:void 0}}function PG(t){return!!t.deps}function LG(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function AG(t){return typeof t=="function"||typeof t=="object"&&t.ngMetadataName==="InjectionToken"}function m8(t,i){for(let e of t)Array.isArray(e)?m8(e,i):e&&b8(e)?m8(e.\u0275providers,i):i(e)}function Si(t,i){let e;t instanceof Zc?(V2(t),e=t):e=new l8(t);let n,o=ua(e),r=fo(void 0);try{return i()}finally{ua(o),fo(r)}}function L8(){return Ux()!==void 0||qm()!=null}var Vr=0,Ke=1,st=2,_i=3,ur=4,ho=5,el=6,k1=7,$n=8,rs=9,ga=10,en=11,E1=12,A8=13,tl=14,Xi=15,Gs=16,nl=17,_a=18,W2=19,R8=20,ns=21,U3=22,as=23,Go=24,il=25,ol=26,ln=27,Jx=1,z8=6,Ws=7,Y2=8,rl=9,Gn=10;function ba(t){return Array.isArray(t)&&typeof t[Jx]=="object"}function Br(t){return Array.isArray(t)&&t[Jx]===!0}function N8(t){return(t.flags&4)!==0}function ss(t){return t.componentOffset>-1}function I1(t){return(t.flags&1)===1}function jr(t){return!!t.template}function O1(t){return(t[st]&512)!==0}function al(t){return(t[st]&256)===256}var F8="svg",eM="math";function mr(t){for(;Array.isArray(t);)t=t[Vr];return t}function V8(t,i){return mr(i[t])}function pr(t,i){return mr(i[t.index])}function q2(t,i){return t.data[i]}function T1(t,i){return t[i]}function B8(t,i,e,n){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),i[e]=n}function fr(t,i){let e=i[t];return ba(e)?e:e[Vr]}function tM(t){return(t[st]&4)===4}function $3(t){return(t[st]&128)===128}function nM(t){return Br(t[_i])}function Wo(t,i){return i==null?null:t[i]}function j8(t){t[nl]=0}function H8(t){t[st]&1024||(t[st]|=1024,$3(t)&&Ys(t))}function iM(t,i){for(;t>0;)i=i[tl],t--;return i}function Q2(t){return!!(t[st]&9216||t[Go]?.dirty)}function G3(t){t[ga].changeDetectionScheduler?.notify(8),t[st]&64&&(t[st]|=1024),Q2(t)&&Ys(t)}function Ys(t){t[ga].changeDetectionScheduler?.notify(0);let i=$s(t);for(;i!==null&&!(i[st]&8192||(i[st]|=8192,!$3(i)));)i=$s(i)}function U8(t,i){if(al(t))throw new he(911,!1);t[ns]===null&&(t[ns]=[]),t[ns].push(i)}function oM(t,i){if(t[ns]===null)return;let e=t[ns].indexOf(i);e!==-1&&t[ns].splice(e,1)}function $s(t){let i=t[_i];return Br(i)?i[_i]:i}function $8(t){return t[k1]??=[]}function G8(t){return t.cleanup??=[]}function rM(t,i,e,n){let o=$8(i);o.push(e),t.firstCreatePass&&G8(t).push(n,o.length-1)}var xt={lFrame:gM(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var p8=!1;function aM(){return xt.lFrame.elementDepthCount}function sM(){xt.lFrame.elementDepthCount++}function W8(){xt.lFrame.elementDepthCount--}function W3(){return xt.bindingsEnabled}function Y8(){return xt.skipHydrationRootTNode!==null}function q8(t){return xt.skipHydrationRootTNode===t}function Q8(){xt.skipHydrationRootTNode=null}function ze(){return xt.lFrame.lView}function dn(){return xt.lFrame.tView}function j(t){return xt.lFrame.contextLView=t,t[$n]}function H(t){return xt.lFrame.contextLView=null,t}function ri(){let t=K8();for(;t!==null&&t.type===64;)t=t.parent;return t}function K8(){return xt.lFrame.currentTNode}function cM(){let t=xt.lFrame,i=t.currentTNode;return t.isParent?i:i.parent}function P1(t,i){let e=xt.lFrame;e.currentTNode=t,e.isParent=i}function X8(){return xt.lFrame.isParent}function Z8(){xt.lFrame.isParent=!1}function lM(){return xt.lFrame.contextLView}function J8(){return p8}function L1(t){let i=p8;return p8=t,i}function cs(){let t=xt.lFrame,i=t.bindingRootIndex;return i===-1&&(i=t.bindingRootIndex=t.tView.bindingStartIndex),i}function Y3(){return xt.lFrame.bindingIndex}function dM(t){return xt.lFrame.bindingIndex=t}function va(){return xt.lFrame.bindingIndex++}function A1(t){let i=xt.lFrame,e=i.bindingIndex;return i.bindingIndex=i.bindingIndex+t,e}function uM(){return xt.lFrame.inI18n}function mM(t,i){let e=xt.lFrame;e.bindingIndex=e.bindingRootIndex=t,q3(i)}function pM(){return xt.lFrame.currentDirectiveIndex}function q3(t){xt.lFrame.currentDirectiveIndex=t}function fM(t){let i=xt.lFrame.currentDirectiveIndex;return i===-1?null:t[i]}function Q3(){return xt.lFrame.currentQueryIndex}function K2(t){xt.lFrame.currentQueryIndex=t}function RG(t){let i=t[Ke];return i.type===2?i.declTNode:i.type===1?t[ho]:null}function e5(t,i,e){if(e&4){let o=i,r=t;for(;o=o.parent,o===null&&!(e&1);)if(o=RG(r),o===null||(r=r[tl],o.type&10))break;if(o===null)return!1;i=o,t=r}let n=xt.lFrame=hM();return n.currentTNode=i,n.lView=t,!0}function K3(t){let i=hM(),e=t[Ke];xt.lFrame=i,i.currentTNode=e.firstChild,i.lView=t,i.tView=e,i.contextLView=t,i.bindingIndex=e.bindingStartIndex,i.inI18n=!1}function hM(){let t=xt.lFrame,i=t===null?null:t.child;return i===null?gM(t):i}function gM(t){let i={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=i),i}function _M(){let t=xt.lFrame;return xt.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var t5=_M;function X3(){let t=_M();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function bM(t){return(xt.lFrame.contextLView=iM(t,xt.lFrame.contextLView))[$n]}function hr(){return xt.lFrame.selectedIndex}function qs(t){xt.lFrame.selectedIndex=t}function R1(){let t=xt.lFrame;return q2(t.tView,t.selectedIndex)}function qt(){xt.lFrame.currentNamespace=F8}function gr(){zG()}function zG(){xt.lFrame.currentNamespace=null}function vM(){return xt.lFrame.currentNamespace}var yM=!0;function Z3(){return yM}function X2(t){yM=t}function f8(t,i=null,e=null,n){let o=n5(t,i,e,n);return o.resolveInjectorInitializers(),o}function n5(t,i=null,e=null,n,o=new Set){let r=[e||Qi,Qx(t)];return n=n||(typeof t=="object"?void 0:is(t)),new Zc(r,i||S1(),n||null,o)}var Ce=class t{static THROW_IF_NOT_FOUND=Qc;static NULL=new j2;static create(i,e){if(Array.isArray(i))return f8({name:""},e,i,"");{let n=i.name??"";return f8({name:n},i.parent,i.providers,n)}}static \u0275prov=z({token:t,providedIn:"any",factory:()=>be(k8)});static __NG_ELEMENT_ID__=-1},De=new L(""),Zi=(()=>{class t{static __NG_ELEMENT_ID__=NG;static __NG_ENV_ID__=e=>e}return t})(),H2=class extends Zi{_lView;constructor(i){super(),this._lView=i}get destroyed(){return al(this._lView)}onDestroy(i){let e=this._lView;return U8(e,i),()=>oM(e,i)}};function NG(){return new H2(ze())}var Di=class{_console=console;handleError(i){this._console.error("ERROR",i)}},go=new L("",{providedIn:"root",factory:()=>{let t=d(Jt),i;return e=>{t.destroyed&&!i?setTimeout(()=>{throw e}):(i??=t.get(Di),i.handleError(e))}}}),CM={provide:os,useValue:()=>void d(Di),multi:!0};function ya(t){return typeof t=="function"&&t[ni]!==void 0}function ke(t,i){let[e,n,o]=Fg(t,i?.equal),r=e,a=r[ni];return r.set=n,r.update=o,r.asReadonly=J3.bind(r),r}function J3(){let t=this[ni];if(t.readonlyFn===void 0){let i=()=>this();i[ni]=t,t.readonlyFn=i}return t.readonlyFn}function i5(t){return ya(t)&&typeof t.set=="function"}var sl=(()=>{class t{view;node;constructor(e,n){this.view=e,this.node=n}static __NG_ELEMENT_ID__=FG}return t})();function FG(){return new sl(ze(),ri())}var lr=class{},Z2=new L("",{providedIn:"root",factory:()=>!1});var o5=new L(""),r5=new L(""),Ca=(()=>{class t{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ut(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Fe(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=z({token:t,providedIn:"root",factory:()=>new t})}return t})(),z1=(()=>{class t{internalPendingTasks=d(Ca);scheduler=d(lr);errorHandler=d(go);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let n=this.add();e().catch(this.errorHandler).finally(n)}static \u0275prov=z({token:t,providedIn:"root",factory:()=>new t})}return t})();function cl(...t){}var J2=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:()=>new h8})}return t})(),h8=class{dirtyEffectCount=0;queues=new Map;add(i){this.enqueue(i),this.schedule(i)}schedule(i){i.dirty&&this.dirtyEffectCount++}remove(i){let e=i.zone,n=this.queues.get(e);n.has(i)&&(n.delete(i),i.dirty&&this.dirtyEffectCount--)}enqueue(i){let e=i.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(i)||n.add(i)}flush(){for(;this.dirtyEffectCount>0;){let i=!1;for(let[e,n]of this.queues)e===null?i||=this.flushQueue(n):i||=e.run(()=>this.flushQueue(n));i||(this.dirtyEffectCount=0)}}flushQueue(i){let e=!1;for(let n of i)n.dirty&&(this.dirtyEffectCount--,e=!0,n.run());return e}};function $1(t){return{toString:t}.toString()}var e4="__parameters__";function $G(t){return function(...e){if(t){let n=t(...e);for(let o in n)this[o]=n[o]}}}function rw(t,i,e){return $1(()=>{let n=$G(i);function o(...r){if(this instanceof o)return n.apply(this,r),this;let a=new o(...r);return s.annotation=a,s;function s(c,u,f){let h=c.hasOwnProperty(e4)?c[e4]:Object.defineProperty(c,e4,{value:[]})[e4];for(;h.length<=f;)h.push(null);return(h[f]=h[f]||[]).push(a),c}}return o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var _r=D8(rw("Optional"),8);var wa=D8(rw("SkipSelf"),4);function aw(t){let i=oi.ng;if(i&&i.\u0275compilerFacade)return i.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function GG(t){return typeof t=="function"}var m4=class{previousValue;currentValue;firstChange;constructor(i,e,n){this.previousValue=i,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function sw(t,i,e,n){i!==null?i.applyValueToInputSignal(i,n):t[e]=n}var Ne=(()=>{let t=()=>cw;return t.ngInherit=!0,t})();function cw(t){return t.type.prototype.ngOnChanges&&(t.setInput=YG),WG}function WG(){let t=dw(this),i=t?.current;if(i){let e=t.previous;if(e===Fr)t.previous=i;else for(let n in i)e[n]=i[n];t.current=null,this.ngOnChanges(i)}}function YG(t,i,e,n,o){let r=this.declaredInputs[n],a=dw(t)||qG(t,{previous:Fr,current:null}),s=a.current||(a.current={}),c=a.previous,u=c[r];s[r]=new m4(u&&u.currentValue,e,c===Fr),sw(t,i,o,e)}var lw="__ngSimpleChanges__";function dw(t){return t[lw]||null}function qG(t,i){return t[lw]=i}var xM=[];var un=function(t,i=null,e){for(let n=0;n=n)break}else i[c]<0&&(t[nl]+=65536),(s>14>16&&(t[st]&3)===i&&(t[st]+=16384,MM(s,r)):MM(s,r)}var F1=-1,dl=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(i,e,n,o){this.factory=i,this.name=o,this.canSeeViewProviders=e,this.injectImpl=n}};function XG(t){return(t.flags&8)!==0}function ZG(t){return(t.flags&16)!==0}function JG(t,i,e){let n=0;for(;ni){a=r-1;break}}}for(;r>16}function f4(t,i){let e=tW(t),n=i;for(;e>0;)n=n[tl],e--;return n}var g5=!0;function h4(t){let i=g5;return g5=t,i}var nW=256,hw=nW-1,gw=5,iW=0,xa={};function oW(t,i,e){let n;typeof e=="string"?n=e.charCodeAt(0)||0:e.hasOwnProperty(Jc)&&(n=e[Jc]),n==null&&(n=e[Jc]=iW++);let o=n&hw,r=1<>gw)]|=r}function g4(t,i){let e=_w(t,i);if(e!==-1)return e;let n=i[Ke];n.firstCreatePass&&(t.injectorIndex=i.length,s5(n.data,t),s5(i,null),s5(n.blueprint,null));let o=t7(t,i),r=t.injectorIndex;if(fw(o)){let a=p4(o),s=f4(o,i),c=s[Ke].data;for(let u=0;u<8;u++)i[r+u]=s[a+u]|c[a+u]}return i[r+8]=o,r}function s5(t,i){t.push(0,0,0,0,0,0,0,0,i)}function _w(t,i){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||i[t.injectorIndex+8]===null?-1:t.injectorIndex}function t7(t,i){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let e=0,n=null,o=i;for(;o!==null;){if(n=xw(o),n===null)return F1;if(e++,o=o[tl],n.injectorIndex!==-1)return n.injectorIndex|e<<16}return F1}function _5(t,i,e){oW(t,i,e)}function rW(t,i){if(i==="class")return t.classes;if(i==="style")return t.styles;let e=t.attrs;if(e){let n=e.length,o=0;for(;o>20,h=n?s:s+f,y=o?s+f:u;for(let x=h;x=c&&S.type===e)return x}if(o){let x=a[c];if(x&&jr(x)&&x.type===e)return c}return null}function i0(t,i,e,n,o){let r=t[e],a=i.data;if(r instanceof dl){let s=r;if(s.resolving){let x=Bx(a[e]);throw M8(x)}let c=h4(s.canSeeViewProviders);s.resolving=!0;let u=a[e].type||a[e],f,h=s.injectImpl?fo(s.injectImpl):null,y=e5(t,n,0);try{r=t[e]=s.factory(void 0,o,a,t,n),i.firstCreatePass&&e>=n.directiveStart&&QG(e,a[e],i)}finally{h!==null&&fo(h),h4(c),s.resolving=!1,t5()}}return r}function sW(t){if(typeof t=="string")return t.charCodeAt(0)||0;let i=t.hasOwnProperty(Jc)?t[Jc]:void 0;return typeof i=="number"?i>=0?i&hw:cW:i}function DM(t,i,e){let n=1<>gw)]&n)}function SM(t,i){return!(t&2)&&!(t&1&&i)}var ll=class{_tNode;_lView;constructor(i,e){this._tNode=i,this._lView=e}get(i,e,n){return yw(this._tNode,this._lView,i,Kc(n),e)}};function cW(){return new ll(ri(),ze())}function Te(t){return $1(()=>{let i=t.prototype.constructor,e=i[B2]||b5(i),n=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==n;){let r=o[B2]||b5(o);if(r&&r!==e)return r;o=Object.getPrototypeOf(o)}return r=>new r})}function b5(t){return g8(t)?()=>{let i=b5(gi(t));return i&&i()}:Us(t)}function lW(t,i,e,n,o){let r=t,a=i;for(;r!==null&&a!==null&&a[st]&2048&&!O1(a);){let s=Cw(r,a,e,n|2,xa);if(s!==xa)return s;let c=r.parent;if(!c){let u=a[R8];if(u){let f=u.get(e,xa,n);if(f!==xa)return f}c=xw(a),a=a[tl]}r=c}return o}function xw(t){let i=t[Ke],e=i.type;return e===2?i.declTNode:e===1?t[ho]:null}function m0(t){return rW(ri(),t)}function dW(){return G1(ri(),ze())}function G1(t,i){return new Z(pr(t,i))}var Z=(()=>{class t{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=dW}return t})();function Mw(t){return t instanceof Z?t.nativeElement:t}function uW(){return this._results[Symbol.iterator]()}var zn=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new B}constructor(i=!1){this._emitDistinctChangesOnly=i}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,e){return this._results.reduce(i,e)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,e){this.dirty=!1;let n=Gx(i);(this._changesDetected=!$x(this._results,n,e))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(i){this._onDirty=i}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=uW};function ww(t){return(t.flags&128)===128}var n7=(function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t})(n7||{}),Dw=new Map,mW=0;function pW(){return mW++}function fW(t){Dw.set(t[W2],t)}function v5(t){Dw.delete(t[W2])}var kM="__ngContext__";function B1(t,i){ba(i)?(t[kM]=i[W2],fW(i)):t[kM]=i}function Sw(t){return Ew(t[E1])}function kw(t){return Ew(t[ur])}function Ew(t){for(;t!==null&&!Br(t);)t=t[ur];return t}var y5;function i7(t){y5=t}function o7(){if(y5!==void 0)return y5;if(typeof document<"u")return document;throw new he(210,!1)}var Xs=new L("",{providedIn:"root",factory:()=>hW}),hW="ng",O4=new L(""),pl=new L("",{providedIn:"platform",factory:()=>"unknown"});var p0=new L(""),W1=new L("",{providedIn:"root",factory:()=>o7().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var gW="h",_W="b";var Iw="r";var Ow="di";var Tw=!1,Pw=new L("",{providedIn:"root",factory:()=>Tw});var T4=new L("");var bW=(t,i,e,n)=>{};function vW(t,i,e,n){bW(t,i,e,n)}function P4(t){return(t.flags&32)===32}var yW=()=>null;function Lw(t,i,e=!1){return yW(t,i,e)}function Aw(t,i){let e=t.contentQueries;if(e!==null){let n=ot(null);try{for(let o=0;ot,createScript:t=>t,createScriptURL:t=>t})}catch{}return t4}function L4(t){return CW()?.createHTML(t)||t}var n4;function Rw(){if(n4===void 0&&(n4=null,oi.trustedTypes))try{n4=oi.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return n4}function EM(t){return Rw()?.createHTML(t)||t}function IM(t){return Rw()?.createScriptURL(t)||t}var ds=class{changingThisBreaksApplicationSecurity;constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${R3})`}},x5=class extends ds{getTypeName(){return"HTML"}},M5=class extends ds{getTypeName(){return"Style"}},w5=class extends ds{getTypeName(){return"Script"}},D5=class extends ds{getTypeName(){return"URL"}},S5=class extends ds{getTypeName(){return"ResourceURL"}};function Yo(t){return t instanceof ds?t.changingThisBreaksApplicationSecurity:t}function Da(t,i){let e=zw(t);if(e!=null&&e!==i){if(e==="ResourceURL"&&i==="URL")return!0;throw new Error(`Required a safe ${i}, got a ${e} (see ${R3})`)}return e===i}function zw(t){return t instanceof ds&&t.getTypeName()||null}function a7(t){return new x5(t)}function s7(t){return new M5(t)}function c7(t){return new w5(t)}function l7(t){return new D5(t)}function d7(t){return new S5(t)}function xW(t){let i=new E5(t);return MW()?new k5(i):i}var k5=class{inertDocumentHelper;constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{let e=new window.DOMParser().parseFromString(L4(i),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(i):(e.firstChild?.remove(),e)}catch{return null}}},E5=class{defaultDoc;inertDocument;constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){let e=this.inertDocument.createElement("template");return e.innerHTML=L4(i),e}};function MW(){try{return!!new window.DOMParser().parseFromString(L4(""),"text/html")}catch{return!1}}var wW=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function f0(t){return t=String(t),t.match(wW)?t:"unsafe:"+t}function us(t){let i={};for(let e of t.split(","))i[e]=!0;return i}function h0(...t){let i={};for(let e of t)for(let n in e)e.hasOwnProperty(n)&&(i[n]=!0);return i}var Nw=us("area,br,col,hr,img,wbr"),Fw=us("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Vw=us("rp,rt"),DW=h0(Vw,Fw),SW=h0(Fw,us("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),kW=h0(Vw,us("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),OM=h0(Nw,SW,kW,DW),Bw=us("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),EW=us("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),IW=us("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),OW=h0(Bw,EW,IW),TW=us("script,style,template"),I5=class{sanitizedSomething=!1;buf=[];sanitizeChildren(i){let e=i.firstChild,n=!0,o=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){o.push(e),e=AW(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=LW(e);if(r){e=r;break}e=o.pop()}}return this.buf.join("")}startElement(i){let e=TM(i).toLowerCase();if(!OM.hasOwnProperty(e))return this.sanitizedSomething=!0,!TW.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=i.attributes;for(let o=0;o"),!0}endElement(i){let e=TM(i).toLowerCase();OM.hasOwnProperty(e)&&!Nw.hasOwnProperty(e)&&(this.buf.push(""))}chars(i){this.buf.push(PM(i))}};function PW(t,i){return(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function LW(t){let i=t.nextSibling;if(i&&t!==i.previousSibling)throw jw(i);return i}function AW(t){let i=t.firstChild;if(i&&PW(t,i))throw jw(i);return i}function TM(t){let i=t.nodeName;return typeof i=="string"?i:"FORM"}function jw(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var RW=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,zW=/([^\#-~ |!])/g;function PM(t){return t.replace(/&/g,"&").replace(RW,function(i){let e=i.charCodeAt(0),n=i.charCodeAt(1);return"&#"+((e-55296)*1024+(n-56320)+65536)+";"}).replace(zW,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}var i4;function A4(t,i){let e=null;try{i4=i4||xW(t);let n=i?String(i):"";e=i4.getInertBodyElement(n);let o=5,r=n;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,n=r,r=e.innerHTML,e=i4.getInertBodyElement(n)}while(n!==r);let s=new I5().sanitizeChildren(LM(e)||e);return L4(s)}finally{if(e){let n=LM(e)||e;for(;n.firstChild;)n.firstChild.remove()}}}function LM(t){return"content"in t&&NW(t)?t.content:null}function NW(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var FW=/^>|^->||--!>|)/g,BW="\u200B$1\u200B";function jW(t){return t.replace(FW,i=>i.replace(VW,BW))}function HW(t,i){return t.createText(i)}function UW(t,i,e){t.setValue(i,e)}function $W(t,i){return t.createComment(jW(i))}function Hw(t,i,e){return t.createElement(i,e)}function _4(t,i,e,n,o){t.insertBefore(i,e,n,o)}function Uw(t,i,e){t.appendChild(i,e)}function AM(t,i,e,n,o){n!==null?_4(t,i,e,n,o):Uw(t,i,e)}function $w(t,i,e,n){t.removeChild(null,i,e,n)}function GW(t,i,e){t.setAttribute(i,"style",e)}function WW(t,i,e){e===""?t.removeAttribute(i,"class"):t.setAttribute(i,"class",e)}function Gw(t,i,e){let{mergedAttrs:n,classes:o,styles:r}=e;n!==null&&JG(t,i,n),o!==null&&WW(t,i,o),r!==null&&GW(t,i,r)}var Wn=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t})(Wn||{});function fl(t){let i=m7();return i?EM(i.sanitize(Wn.HTML,t)||""):Da(t,"HTML")?EM(Yo(t)):A4(o7(),Ki(t))}function Y1(t){let i=m7();return i?i.sanitize(Wn.URL,t)||"":Da(t,"URL")?Yo(t):f0(Ki(t))}function Ww(t){let i=m7();if(i)return IM(i.sanitize(Wn.RESOURCE_URL,t)||"");if(Da(t,"ResourceURL"))return IM(Yo(t));throw new he(904,!1)}var YW=new Set(["embed","frame","iframe","media","script"]),qW=new Set(["base","link","script"]);function QW(t,i){return i==="src"&&YW.has(t)||i==="href"&&qW.has(t)||i==="xlink:href"&&t==="script"?Ww:Y1}function u7(t,i,e){return QW(i,e)(t)}function m7(){let t=ze();return t&&t[ga].sanitizer}function KW(t){return t.ownerDocument.defaultView}function XW(t){return t.ownerDocument}function Yw(t){return t instanceof Function?t():t}function ZW(t,i,e){let n=t.length;for(;;){let o=t.indexOf(i,e);if(o===-1)return o;if(o===0||t.charCodeAt(o-1)<=32){let r=i.length;if(o+r===n||t.charCodeAt(o+r)<=32)return o}e=o+1}}var qw="ng-template";function JW(t,i,e,n){let o=0;if(n){for(;o-1){let r;for(;++or?h="":h=o[f+1].toLowerCase(),n&2&&u!==h){if(Hr(n))return!1;a=!0}}}}return Hr(n)||a}function Hr(t){return(t&1)===0}function nY(t,i,e,n){if(i===null)return-1;let o=0;if(n||!e){let r=!1;for(;o-1)for(e++;e0?'="'+s+'"':"")+"]"}else n&8?o+="."+a:n&4&&(o+=" "+a);else o!==""&&!Hr(a)&&(i+=RM(r,o),o=""),n=a,r=r||!Hr(n);e++}return o!==""&&(i+=RM(r,o)),i}function cY(t){return t.map(sY).join(",")}function lY(t){let i=[],e=[],n=1,o=2;for(;nnull),a=n;if(i&&typeof i=="object"){let c=i;o=c.next?.bind(c),r=c.error?.bind(c),a=c.complete?.bind(c)}this.__isAsync&&(r=this.wrapInTimeout(r),o&&(o=this.wrapInTimeout(o)),a&&(a=this.wrapInTimeout(a)));let s=super.subscribe({next:o,error:r,complete:a});return i instanceof Ee&&i.add(s),s}wrapInTimeout(i){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{i(e)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},U=T5;function eD(t){let i,e;function n(){t=cl;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),i!==void 0&&clearTimeout(i)}catch{}}return i=setTimeout(()=>{t(),n()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{t(),n()})),()=>n()}function NM(t){return queueMicrotask(()=>t()),()=>{t=cl}}var b7="isAngularZone",b4=b7+"_ID",fY=0,ce=class t{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new U(!1);onMicrotaskEmpty=new U(!1);onStable=new U(!1);onError=new U(!1);constructor(i){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:o=!1,scheduleInRootZone:r=Jw}=i;if(typeof Zone>"u")throw new he(908,!1);Zone.assertZonePatched();let a=this;a._nesting=0,a._outer=a._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(a._inner=a._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(a._inner=a._inner.fork(Zone.longStackTraceZoneSpec)),a.shouldCoalesceEventChangeDetection=!o&&n,a.shouldCoalesceRunChangeDetection=o,a.callbackScheduled=!1,a.scheduleInRootZone=r,_Y(a)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(b7)===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new he(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new he(909,!1)}run(i,e,n){return this._inner.run(i,e,n)}runTask(i,e,n,o){let r=this._inner,a=r.scheduleEventTask("NgZoneEvent: "+o,i,hY,cl,cl);try{return r.runTask(a,e,n)}finally{r.cancelTask(a)}}runGuarded(i,e,n){return this._inner.runGuarded(i,e,n)}runOutsideAngular(i){return this._outer.run(i)}},hY={};function v7(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function gY(t){if(t.isCheckStableRunning||t.callbackScheduled)return;t.callbackScheduled=!0;function i(){eD(()=>{t.callbackScheduled=!1,P5(t),t.isCheckStableRunning=!0,v7(t),t.isCheckStableRunning=!1})}t.scheduleInRootZone?Zone.root.run(()=>{i()}):t._outer.run(()=>{i()}),P5(t)}function _Y(t){let i=()=>{gY(t)},e=fY++;t._inner=t._inner.fork({name:"angular",properties:{[b7]:!0,[b4]:e,[b4+e]:!0},onInvokeTask:(n,o,r,a,s,c)=>{if(bY(c))return n.invokeTask(r,a,s,c);try{return FM(t),n.invokeTask(r,a,s,c)}finally{(t.shouldCoalesceEventChangeDetection&&a.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&i(),VM(t)}},onInvoke:(n,o,r,a,s,c,u)=>{try{return FM(t),n.invoke(r,a,s,c,u)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!vY(c)&&i(),VM(t)}},onHasTask:(n,o,r,a)=>{n.hasTask(r,a),o===r&&(a.change=="microTask"?(t._hasPendingMicrotasks=a.microTask,P5(t),v7(t)):a.change=="macroTask"&&(t.hasPendingMacrotasks=a.macroTask))},onHandleError:(n,o,r,a)=>(n.handleError(r,a),t.runOutsideAngular(()=>t.onError.emit(a)),!1)})}function P5(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function FM(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function VM(t){t._nesting--,v7(t)}var o0=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new U;onMicrotaskEmpty=new U;onStable=new U;onError=new U;run(i,e,n){return i.apply(e,n)}runGuarded(i,e,n){return i.apply(e,n)}runOutsideAngular(i){return i()}runTask(i,e,n,o){return i.apply(e,n)}};function bY(t){return tD(t,"__ignore_ng_zone__")}function vY(t){return tD(t,"__scheduler_tick__")}function tD(t,i){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[i]===!0}function nD(t="zone.js",i){return t==="noop"?new o0:t==="zone.js"?new ce(i):t}var N4=(()=>{class t{impl=null;execute(){this.impl?.execute()}static \u0275prov=z({token:t,providedIn:"root",factory:()=>new t})}return t})(),y7=[0,1,2,3],C7=(()=>{class t{ngZone=d(ce);scheduler=d(lr);errorHandler=d(Di,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){d(Zs,{optional:!0})}execute(){let e=this.sequences.size>0;e&&un(16),this.executing=!0;for(let n of y7)for(let o of this.sequences)if(!(o.erroredOrDestroyed||!o.hooks[n]))try{o.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let r=o.hooks[n];return r(o.pipelinedValue)},o.snapshot))}catch(r){o.erroredOrDestroyed=!0,this.errorHandler?.handleError(r)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&un(17)}register(e){let{view:n}=e;n!==void 0?((n[il]??=[]).push(e),Ys(n),n[st]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,n){return n?n.run(z4.AFTER_NEXT_RENDER,e):e()}static \u0275prov=z({token:t,providedIn:"root",factory:()=>new t})}return t})(),r0=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(i,e,n,o,r,a=null){this.impl=i,this.hooks=e,this.view=n,this.once=o,this.snapshot=a,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let i=this.view?.[il];i&&(this.view[il]=i.filter(e=>e!==this))}};function Mt(t,i){let e=i?.injector??d(Ce);return Sa("NgAfterNextRender"),CY(t,e,i,!0)}function yY(t){return t instanceof Function?[void 0,void 0,t,void 0]:[t.earlyRead,t.write,t.mixedReadWrite,t.read]}function CY(t,i,e,n){let o=i.get(N4);o.impl??=i.get(C7);let r=i.get(Zs,null,{optional:!0}),a=e?.manualCleanup!==!0?i.get(Zi):null,s=i.get(sl,null,{optional:!0}),c=new r0(o.impl,yY(t),s?.view,n,a,r?.snapshot(null));return o.impl.register(c),c}var iD=new L("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function oD(t,i,e){let n=t.get(iD);if(Array.isArray(i))for(let o of i)n.queue.add(o),e?.detachedLeaveAnimationFns?.push(o);else n.queue.add(i),e?.detachedLeaveAnimationFns?.push(i);n.scheduler&&n.scheduler(t)}function xY(t,i){let e=t.get(iD);if(i.detachedLeaveAnimationFns){for(let n of i.detachedLeaveAnimationFns)e.queue.delete(n);i.detachedLeaveAnimationFns=void 0}}function MY(t,i){for(let[e,n]of i)oD(t,n.animateFns)}function BM(t,i,e,n){let o=t?.[ol]?.enter;i!==null&&o&&o.has(e.index)&&MY(n,o)}function N1(t,i,e,n,o,r,a,s){if(o!=null){let c,u=!1;Br(o)?c=o:ba(o)&&(u=!0,o=o[Vr]);let f=mr(o);t===0&&n!==null?(BM(s,n,r,e),a==null?Uw(i,n,f):_4(i,n,f,a||null,!0)):t===1&&n!==null?(BM(s,n,r,e),_4(i,n,f,a||null,!0)):t===2?jM(s,r,e,h=>{$w(i,f,u,h)}):t===3&&jM(s,r,e,()=>{i.destroyNode(f)}),c!=null&&AY(i,t,e,c,r,n,a)}}function wY(t,i){rD(t,i),i[Vr]=null,i[ho]=null}function DY(t,i,e,n,o,r){n[Vr]=o,n[ho]=i,V4(t,n,e,1,o,r)}function rD(t,i){i[ga].changeDetectionScheduler?.notify(9),V4(t,i,i[en],2,null,null)}function SY(t){let i=t[E1];if(!i)return c5(t[Ke],t);for(;i;){let e=null;if(ba(i))e=i[E1];else{let n=i[Gn];n&&(e=n)}if(!e){for(;i&&!i[ur]&&i!==t;)ba(i)&&c5(i[Ke],i),i=i[_i];i===null&&(i=t),ba(i)&&c5(i[Ke],i),e=i&&i[ur]}i=e}}function x7(t,i){let e=t[rl],n=e.indexOf(i);e.splice(n,1)}function F4(t,i){if(al(i))return;let e=i[en];e.destroyNode&&V4(t,i,e,3,null,null),SY(i)}function c5(t,i){if(al(i))return;let e=ot(null);try{i[st]&=-129,i[st]|=256,i[Go]&&Fs(i[Go]),IY(t,i),EY(t,i),i[Ke].type===1&&i[en].destroy();let n=i[Gs];if(n!==null&&Br(i[_i])){n!==i[_i]&&x7(n,i);let o=i[_a];o!==null&&o.detachView(t)}v5(i)}finally{ot(e)}}function jM(t,i,e,n){let o=t?.[ol];if(o==null||o.leave==null||!o.leave.has(i.index))return n(!1);t&&ul.add(t),oD(e,()=>{if(o.leave&&o.leave.has(i.index)){let a=o.leave.get(i.index),s=[];if(a){for(let c=0;c{t[ol].running=void 0,ul.delete(t),i(!0)});return}i(!1)}function EY(t,i){let e=t.cleanup,n=i[k1];if(e!==null)for(let a=0;a=0?n[s]():n[-s].unsubscribe(),a+=2}else{let s=n[e[a+1]];e[a].call(s)}n!==null&&(i[k1]=null);let o=i[ns];if(o!==null){i[ns]=null;for(let a=0;aln&&Zw(t,i,ln,!1),un(a?2:0,o,e),e(n,o)}finally{qs(r),un(a?3:1,o,e)}}function B4(t,i,e){BY(t,i,e),(e.flags&64)===64&&jY(t,i,e)}function g0(t,i,e=pr){let n=i.localNames;if(n!==null){let o=i.index+1;for(let r=0;rnull;function VY(t){return t==="class"?"className":t==="for"?"htmlFor":t==="formaction"?"formAction":t==="innerHtml"?"innerHTML":t==="readonly"?"readOnly":t==="tabindex"?"tabIndex":t}function uD(t,i,e,n,o,r){let a=i[Ke];if(j4(t,a,i,e,n)){ss(t)&&pD(i,t.index);return}t.type&3&&(e=VY(e)),mD(t,i,e,n,o,r)}function mD(t,i,e,n,o,r){if(t.type&3){let a=pr(t,i);n=r!=null?r(n,t.value||"",e):n,o.setProperty(a,e,n)}else t.type&12}function pD(t,i){let e=fr(i,t);e[st]&16||(e[st]|=64)}function BY(t,i,e){let n=e.directiveStart,o=e.directiveEnd;ss(e)&&mY(i,e,t.data[n+e.componentOffset]),t.firstCreatePass||g4(e,i);let r=e.initialInputs;for(let a=n;a{Ys(t.lView)},consumerOnSignalRead(){this.lView[Go]=this}});function JY(t){let i=t[Go]??Object.create(eq);return i.lView=t,i}var eq=Re(q({},Vc),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:t=>{let i=$s(t.lView);for(;i&&!bD(i[Ke]);)i=$s(i);i&&H8(i)},consumerOnSignalRead(){this.lView[Go]=this}});function bD(t){return t.type!==2}function vD(t){if(t[as]===null)return;let i=!0;for(;i;){let e=!1;for(let n of t[as])n.dirty&&(e=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));i=e&&!!(t[st]&8192)}}var tq=100;function yD(t,i=0){let n=t[ga].rendererFactory,o=!1;o||n.begin?.();try{nq(t,i)}finally{o||n.end?.()}}function nq(t,i){let e=J8();try{L1(!0),A5(t,i);let n=0;for(;Q2(t);){if(n===tq)throw new he(103,!1);n++,A5(t,1)}}finally{L1(e)}}function iq(t,i,e,n){if(al(i))return;let o=i[st],r=!1,a=!1;K3(i);let s=!0,c=null,u=null;r||(bD(t)?(u=QY(i),c=Ns(u)):Jm()===null?(s=!1,u=JY(i),c=Ns(u)):i[Go]&&(Fs(i[Go]),i[Go]=null));try{j8(i),dM(t.bindingStartIndex),e!==null&&dD(t,i,e,2,n);let f=(o&3)===3;if(!r)if(f){let x=t.preOrderCheckHooks;x!==null&&s4(i,x,null)}else{let x=t.preOrderHooks;x!==null&&c4(i,x,0,null),a5(i,0)}if(a||oq(i),vD(i),CD(i,0),t.contentQueries!==null&&Aw(t,i),!r)if(f){let x=t.contentCheckHooks;x!==null&&s4(i,x)}else{let x=t.contentHooks;x!==null&&c4(i,x,1),a5(i,1)}aq(t,i);let h=t.components;h!==null&&MD(i,h,0);let y=t.viewQuery;if(y!==null&&C5(2,y,n),!r)if(f){let x=t.viewCheckHooks;x!==null&&s4(i,x)}else{let x=t.viewHooks;x!==null&&c4(i,x,2),a5(i,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),i[U3]){for(let x of i[U3])x();i[U3]=null}r||(gD(i),i[st]&=-73)}catch(f){throw r||Ys(i),f}finally{u!==null&&(Bc(u,c),s&&XY(u)),X3()}}function CD(t,i){for(let e=Sw(t);e!==null;e=kw(e))for(let n=Gn;n0&&(t[e-1][ur]=n[ur]);let r=$2(t,Gn+i);wY(n[Ke],n);let a=r[_a];a!==null&&a.detachView(r[Ke]),n[_i]=null,n[ur]=null,n[st]&=-129}return n}function sq(t,i,e,n){let o=Gn+n,r=e.length;n>0&&(e[o-1][ur]=i),n-1&&(s0(i,n),$2(e,n))}this._attachedToViewContainer=!1}F4(this._lView[Ke],this._lView)}onDestroy(i){U8(this._lView,i)}markForCheck(){I7(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[st]&=-129}reattach(){G3(this._lView),this._lView[st]|=128}detectChanges(){this._lView[st]|=1024,yD(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new he(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let i=O1(this._lView),e=this._lView[Gs];e!==null&&!i&&x7(e,this._lView),rD(this._lView[Ke],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new he(902,!1);this._appRef=i;let e=O1(this._lView),n=this._lView[Gs];n!==null&&!e&&kD(n,this._lView),G3(this._lView)}};var rt=(()=>{class t{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=cq;constructor(e,n,o){this._declarationLView=e,this._declarationTContainer=n,this.elementRef=o}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,n){return this.createEmbeddedViewImpl(e,n)}createEmbeddedViewImpl(e,n,o){let r=_0(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:n,dehydratedView:o});return new Qs(r)}}return t})();function cq(){return H4(ri(),ze())}function H4(t,i){return t.type&4?new rt(i,t,G1(t,i)):null}function q1(t,i,e,n,o){let r=t.data[i];if(r===null)r=lq(t,i,e,n,o),uM()&&(r.flags|=32);else if(r.type&64){r.type=e,r.value=n,r.attrs=o;let a=cM();r.injectorIndex=a===null?-1:a.injectorIndex}return P1(r,!0),r}function lq(t,i,e,n,o){let r=K8(),a=X8(),s=a?r:r&&r.parent,c=t.data[i]=uq(t,s,e,i,n,o);return dq(t,c,r,a),c}function dq(t,i,e,n){t.firstChild===null&&(t.firstChild=i),e!==null&&(n?e.child==null&&i.parent!==null&&(e.child=i):e.next===null&&(e.next=i,i.prev=e))}function uq(t,i,e,n,o,r){let a=i?i.injectorIndex:-1,s=0;return Y8()&&(s|=128),{type:e,index:n,insertBeforeIndex:null,injectorIndex:a,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:s,providerIndexes:0,value:o,attrs:r,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:i,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var Q_e=new RegExp(`^(\\d+)*(${_W}|${gW})*(.*)`);function mq(t){let i=t[z8]??[],n=t[_i][en],o=[];for(let r of i)r.data[Ow]!==void 0?o.push(r):pq(r,n);t[z8]=o}function pq(t,i){let e=0,n=t.firstChild;if(n){let o=t.data[Iw];for(;enull,hq=()=>null;function v4(t,i){return fq(t,i)}function ED(t,i,e){return hq(t,i,e)}var ID=class{},U4=class{},R5=class{resolveComponentFactory(i){throw new he(917,!1)}},v0=class{static NULL=new R5},Nn=class{},tt=(()=>{class t{destroyNode=null;static __NG_ELEMENT_ID__=()=>gq()}return t})();function gq(){let t=ze(),i=ri(),e=fr(i.index,t);return(ba(e)?e:t)[en]}var OD=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:()=>null})}return t})();var d4={},z5=class{injector;parentInjector;constructor(i,e){this.injector=i,this.parentInjector=e}get(i,e,n){let o=this.injector.get(i,d4,n);return o!==d4||e===d4?o:this.parentInjector.get(i,e,n)}};function y4(t,i,e){let n=e?t.styles:null,o=e?t.classes:null,r=0;if(i!==null)for(let a=0;a0&&(e.directiveToIndex=new Map);for(let y=0;y0;){let e=t[--i];if(typeof e=="number"&&e<0)return e}return 0}function wq(t,i,e){if(e){if(i.exportAs)for(let n=0;nn(mr(Y[t.index])):t.index;ND(S,i,e,r,s,x,!1)}}return u}function Eq(t){return t.startsWith("animation")||t.startsWith("transition")}function Iq(t,i,e,n){let o=t.cleanup;if(o!=null)for(let r=0;rc?s[c]:null}typeof a=="string"&&(r+=2)}return null}function ND(t,i,e,n,o,r,a){let s=i.firstCreatePass?G8(i):null,c=$8(e),u=c.length;c.push(o,r),s&&s.push(n,t,u,(u+1)*(a?-1:1))}function YM(t,i,e,n,o,r){let a=i[e],s=i[Ke],u=s.data[e].outputs[n],h=a[u].subscribe(r);ND(t.index,s,i,o,r,h,!0)}var N5=Symbol("BINDING");var C4=class extends v0{ngModule;constructor(i){super(),this.ngModule=i}resolveComponentFactory(i){let e=fa(i);return new Ks(e,this.ngModule)}};function Oq(t){return Object.keys(t).map(i=>{let[e,n,o]=t[i],r={propName:e,templateName:i,isSignal:(n&R4.SignalBased)!==0};return o&&(r.transform=o),r})}function Tq(t){return Object.keys(t).map(i=>({propName:t[i],templateName:i}))}function Pq(t,i,e){let n=i instanceof Jt?i:i?.injector;return n&&t.getStandaloneInjector!==null&&(n=t.getStandaloneInjector(n)||n),n?new z5(e,n):e}function Lq(t){let i=t.get(Nn,null);if(i===null)throw new he(407,!1);let e=t.get(OD,null),n=t.get(lr,null);return{rendererFactory:i,sanitizer:e,changeDetectionScheduler:n,ngReflect:!1}}function Aq(t,i){let e=FD(t);return Hw(i,e,e==="svg"?F8:e==="math"?eM:null)}function FD(t){return(t.selectors[0][0]||"div").toLowerCase()}var Ks=class extends U4{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=Oq(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=Tq(this.componentDef.outputs),this.cachedOutputs}constructor(i,e){super(),this.componentDef=i,this.ngModule=e,this.componentType=i.type,this.selector=cY(i.selectors),this.ngContentSelectors=i.ngContentSelectors??[],this.isBoundToModule=!!e}create(i,e,n,o,r,a){un(22);let s=ot(null);try{let c=this.componentDef,u=Rq(n,c,a,r),f=Pq(c,o||this.ngModule,i),h=Lq(f),y=h.rendererFactory.createRenderer(null,c),x=n?zY(y,n,c.encapsulation,f):Aq(c,y),S=a?.some(qM)||r?.some(X=>typeof X!="function"&&X.bindings.some(qM)),Y=h7(null,u,null,512|Kw(c),null,null,h,y,f,null,Lw(x,f,!0));Y[ln]=x,K3(Y);let Q=null;try{let X=O7(ln,Y,2,"#host",()=>u.directiveRegistry,!0,0);Gw(y,x,X),B1(x,Y),B4(u,Y,X),r7(u,X,Y),T7(u,X),e!==void 0&&Nq(X,this.ngContentSelectors,e),Q=fr(X.index,Y),Y[$n]=Q[$n],E7(u,Y,null)}catch(X){throw Q!==null&&v5(Q),v5(Y),X}finally{un(23),X3()}return new x4(this.componentType,Y,!!S)}finally{ot(s)}}};function Rq(t,i,e,n){let o=t?["ng-version","20.3.16"]:lY(i.selectors[0]),r=null,a=null,s=0;if(e)for(let f of e)s+=f[N5].requiredVars,f.create&&(f.targetIdx=0,(r??=[]).push(f)),f.update&&(f.targetIdx=0,(a??=[]).push(f));if(n)for(let f=0;f{if(e&1&&t)for(let n of t)n.create();if(e&2&&i)for(let n of i)n.update()}}function qM(t){let i=t[N5].kind;return i==="input"||i==="twoWay"}var x4=class extends ID{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(i,e,n){super(),this._rootLView=e,this._hasInputBindings=n,this._tNode=q2(e[Ke],ln),this.location=G1(this._tNode,e),this.instance=fr(this._tNode.index,e)[$n],this.hostView=this.changeDetectorRef=new Qs(e,void 0),this.componentType=i}setInput(i,e){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(i)&&Object.is(this.previousInputValues.get(i),e))return;let o=this._rootLView,r=j4(n,o[Ke],o,i,e);this.previousInputValues.set(i,e);let a=fr(n.index,o);I7(a,1)}get injector(){return new ll(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(i){this.hostView.onDestroy(i)}};function Nq(t,i,e){let n=t.projection=[];for(let o=0;o{class t{static __NG_ELEMENT_ID__=Fq}return t})();function Fq(){let t=ri();return BD(t,ze())}var Vq=ft,VD=class extends Vq{_lContainer;_hostTNode;_hostLView;constructor(i,e,n){super(),this._lContainer=i,this._hostTNode=e,this._hostLView=n}get element(){return G1(this._hostTNode,this._hostLView)}get injector(){return new ll(this._hostTNode,this._hostLView)}get parentInjector(){let i=t7(this._hostTNode,this._hostLView);if(fw(i)){let e=f4(i,this._hostLView),n=p4(i),o=e[Ke].data[n+8];return new ll(o,e)}else return new ll(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){let e=QM(this._lContainer);return e!==null&&e[i]||null}get length(){return this._lContainer.length-Gn}createEmbeddedView(i,e,n){let o,r;typeof n=="number"?o=n:n!=null&&(o=n.index,r=n.injector);let a=v4(this._lContainer,i.ssrId),s=i.createEmbeddedViewImpl(e||{},r,a);return this.insertImpl(s,o,j1(this._hostTNode,a)),s}createComponent(i,e,n,o,r,a,s){let c=i&&!GG(i),u;if(c)u=e;else{let Q=e||{};u=Q.index,n=Q.injector,o=Q.projectableNodes,r=Q.environmentInjector||Q.ngModuleRef,a=Q.directives,s=Q.bindings}let f=c?i:new Ks(fa(i)),h=n||this.parentInjector;if(!r&&f.ngModule==null){let X=(c?h:this.parentInjector).get(Jt,null);X&&(r=X)}let y=fa(f.componentType??{}),x=v4(this._lContainer,y?.id??null),S=x?.firstChild??null,Y=f.create(h,o,S,r,a,s);return this.insertImpl(Y.hostView,u,j1(this._hostTNode,x)),Y}insert(i,e){return this.insertImpl(i,e,!0)}insertImpl(i,e,n){let o=i._lView;if(nM(o)){let s=this.indexOf(i);if(s!==-1)this.detach(s);else{let c=o[_i],u=new VD(c,c[ho],c[_i]);u.detach(u.indexOf(i))}}let r=this._adjustIndex(e),a=this._lContainer;return b0(a,o,r,n),i.attachToViewContainerRef(),S8(l5(a),r,i),i}move(i,e){return this.insert(i,e)}indexOf(i){let e=QM(this._lContainer);return e!==null?e.indexOf(i):-1}remove(i){let e=this._adjustIndex(i,-1),n=s0(this._lContainer,e);n&&($2(l5(this._lContainer),e),F4(n[Ke],n))}detach(i){let e=this._adjustIndex(i,-1),n=s0(this._lContainer,e);return n&&$2(l5(this._lContainer),e)!=null?new Qs(n):null}_adjustIndex(i,e=0){return i??this.length+e}};function QM(t){return t[Y2]}function l5(t){return t[Y2]||(t[Y2]=[])}function BD(t,i){let e,n=i[t.index];return Br(n)?e=n:(e=wD(n,i,null,t),i[t.index]=e,g7(i,e)),jq(e,i,t,n),new VD(e,t,i)}function Bq(t,i){let e=t[en],n=e.createComment(""),o=pr(i,t),r=e.parentNode(o);return _4(e,r,n,e.nextSibling(o),!1),n}var jq=$q,Hq=()=>!1;function Uq(t,i,e){return Hq(t,i,e)}function $q(t,i,e,n){if(t[Ws])return;let o;e.type&8?o=mr(n):o=Bq(i,e),t[Ws]=o}var F5=class t{queryList;matches=null;constructor(i){this.queryList=i}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},V5=class t{queries;constructor(i=[]){this.queries=i}createEmbeddedView(i){let e=i.queries;if(e!==null){let n=i.contentQueries!==null?i.contentQueries[0]:e.length,o=[];for(let r=0;r0)n.push(a[s/2]);else{let u=r[s+1],f=i[-c];for(let h=Gn;hi.trim())}function GD(t,i,e){t.queries===null&&(t.queries=new B5),t.queries.track(new j5(i,e))}function Kq(t,i){let e=t.contentQueries||(t.contentQueries=[]),n=e.length?e[e.length-1]:-1;i!==n&&e.push(t.queries.length-1,i)}function A7(t,i){return t.queries.getByIndex(i)}function WD(t,i){let e=t[Ke],n=A7(e,i);return n.crossesNgTemplate?H5(e,t,i,[]):jD(e,t,n,i)}function YD(t,i,e){let n,o=L2(()=>{n._dirtyCounter();let r=Xq(n,t);if(i&&r===void 0)throw new he(-951,!1);return r});return n=o[ni],n._dirtyCounter=ke(0),n._flatValue=void 0,o}function R7(t){return YD(!0,!1,t)}function z7(t){return YD(!0,!0,t)}function qD(t,i){let e=t[ni];e._lView=ze(),e._queryIndex=i,e._queryList=L7(e._lView,i),e._queryList.onDirty(()=>e._dirtyCounter.update(n=>n+1))}function Xq(t,i){let e=t._lView,n=t._queryIndex;if(e===void 0||n===void 0||e[st]&4)return i?void 0:Qi;let o=L7(e,n),r=WD(e,n);return o.reset(r,Mw),i?o.first:o._changesDetected||t._flatValue===void 0?t._flatValue=o.toArray():t._flatValue}function QD(t){let i=[],e=new Map;function n(o){let r=e.get(o);if(!r){let a=t(o);e.set(o,r=a.then(s=>Jq(o,s)))}return r}return w4.forEach((o,r)=>{let a=[];o.templateUrl&&a.push(n(o.templateUrl).then(u=>{o.template=u}));let s=typeof o.styles=="string"?[o.styles]:o.styles||[];if(o.styles=s,o.styleUrl&&o.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(o.styleUrls?.length){let u=o.styles.length,f=o.styleUrls;o.styleUrls.forEach((h,y)=>{s.push(""),a.push(n(h).then(x=>{s[u+y]=x,f.splice(f.indexOf(h),1),f.length==0&&(o.styleUrls=void 0)}))})}else o.styleUrl&&a.push(n(o.styleUrl).then(u=>{s.push(u),o.styleUrl=void 0}));let c=Promise.all(a).then(()=>eQ(r));i.push(c)}),KD(),Promise.all(i).then(()=>{})}var w4=new Map,Zq=new Set;function KD(){let t=w4;return w4=new Map,t}function XD(){return w4.size===0}function Jq(t,i){return typeof i=="string"?i:i.status!==void 0&&i.status!==200?Promise.reject(new he(918,!1)):i.text()}function eQ(t){Zq.delete(t)}var Ma=class{},G4=class{};var l0=class extends Ma{ngModuleType;_parent;_bootstrapComponents=[];_r3Injector;instance;destroyCbs=[];componentFactoryResolver=new C4(this);constructor(i,e,n,o=!0){super(),this.ngModuleType=i,this._parent=e;let r=I8(i);this._bootstrapComponents=Yw(r.bootstrap),this._r3Injector=n5(i,e,[{provide:Ma,useValue:this},{provide:v0,useValue:this.componentFactoryResolver},...n],is(i),new Set(["environment"])),o&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}},d0=class extends G4{moduleType;constructor(i){super(),this.moduleType=i}create(i){return new l0(this.moduleType,i,[])}};function ZD(t,i,e){return new l0(t,i,e,!1)}var D4=class extends Ma{injector;componentFactoryResolver=new C4(this);instance=null;constructor(i){super();let e=new Zc([...i.providers,{provide:Ma,useValue:this},{provide:v0,useValue:this.componentFactoryResolver}],i.parent||S1(),i.debugName,new Set(["environment"]));this.injector=e,i.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}};function Q1(t,i,e=null){return new D4({providers:t,parent:i,debugName:e,runEnvironmentInitializers:!0}).injector}var tQ=(()=>{class t{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let n=O8(!1,e.type),o=n.length>0?Q1([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,o)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=z({token:t,providedIn:"environment",factory:()=>new t(be(Jt))})}return t})();function P(t){return $1(()=>{let i=JD(t),e=Re(q({},i),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===n7.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&t.dependencies||null,getStandaloneInjector:i.standalone?o=>o.get(tQ).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||ls.Emulated,styles:t.styles||Qi,_:null,schemas:t.schemas||null,tView:null,id:""});i.standalone&&Sa("NgStandalone"),eS(e);let n=t.dependencies;return e.directiveDefs=KM(n,nQ),e.pipeDefs=KM(n,qx),e.id=rQ(e),e})}function nQ(t){return fa(t)||H3(t)}function ee(t){return $1(()=>({type:t.type,bootstrap:t.bootstrap||Qi,declarations:t.declarations||Qi,imports:t.imports||Qi,exports:t.exports||Qi,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function iQ(t,i){if(t==null)return Fr;let e={};for(let n in t)if(t.hasOwnProperty(n)){let o=t[n],r,a,s,c;Array.isArray(o)?(s=o[0],r=o[1],a=o[2]??r,c=o[3]||null):(r=o,a=o,s=R4.None,c=null),e[r]=[n,s,c],i[r]=a}return e}function oQ(t){if(t==null)return Fr;let i={};for(let e in t)t.hasOwnProperty(e)&&(i[t[e]]=e);return i}function R(t){return $1(()=>{let i=JD(t);return eS(i),i})}function wt(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone??!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function JD(t){let i={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:i,inputConfig:t.inputs||Fr,exportAs:t.exportAs||null,standalone:t.standalone??!0,signals:t.signals===!0,selectors:t.selectors||Qi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:iQ(t.inputs,i),outputs:oQ(t.outputs),debugInfo:null}}function eS(t){t.features?.forEach(i=>i(t))}function KM(t,i){return t?()=>{let e=typeof t=="function"?t():t,n=[];for(let o of e){let r=i(o);r!==null&&n.push(r)}return n}:null}function rQ(t){let i=0,e=typeof t.consts=="function"?"":t.consts,n=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,e,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery];for(let r of n.join("|"))i=Math.imul(31,i)+r.charCodeAt(0)<<0;return i+=2147483648,"c"+i}function aQ(t){return Object.getPrototypeOf(t.prototype).constructor}function de(t){let i=aQ(t.type),e=!0,n=[t];for(;i;){let o;if(jr(t))o=i.\u0275cmp||i.\u0275dir;else{if(i.\u0275cmp)throw new he(903,!1);o=i.\u0275dir}if(o){if(e){n.push(o);let a=t;a.inputs=d5(t.inputs),a.declaredInputs=d5(t.declaredInputs),a.outputs=d5(t.outputs);let s=o.hostBindings;s&&uQ(t,s);let c=o.viewQuery,u=o.contentQueries;if(c&&lQ(t,c),u&&dQ(t,u),sQ(t,o),Vx(t.outputs,o.outputs),jr(o)&&o.data.animation){let f=t.data;f.animation=(f.animation||[]).concat(o.data.animation)}}let r=o.features;if(r)for(let a=0;a=0;n--){let o=t[n];o.hostVars=i+=o.hostVars,o.hostAttrs=V1(o.hostAttrs,e=V1(e,o.hostAttrs))}}function d5(t){return t===Fr?{}:t===Qi?[]:t}function lQ(t,i){let e=t.viewQuery;e?t.viewQuery=(n,o)=>{i(n,o),e(n,o)}:t.viewQuery=i}function dQ(t,i){let e=t.contentQueries;e?t.contentQueries=(n,o,r)=>{i(n,o,r),e(n,o,r)}:t.contentQueries=i}function uQ(t,i){let e=t.hostBindings;e?t.hostBindings=(n,o)=>{i(n,o),e(n,o)}:t.hostBindings=i}function N7(t){let i=e=>{let n=Array.isArray(t);e.hostDirectives===null?(e.resolveHostDirectives=mQ,e.hostDirectives=n?t.map(U5):[t]):n?e.hostDirectives.unshift(...t.map(U5)):e.hostDirectives.unshift(t)};return i.ngInherit=!0,i}function mQ(t){let i=[],e=!1,n=null,o=null;for(let r=0;r{class t{log(e){console.log(e)}warn(e){console.warn(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();var Y4=new L(""),K1=new L(""),C0=(()=>{class t{_ngZone;registry;_isZoneStable=!0;_callbacks=[];_taskTrackingZone=null;_destroyRef;constructor(e,n,o){this._ngZone=e,this.registry=n,L8()&&(this._destroyRef=d(Zi,{optional:!0})??void 0),F7||(iS(o),o.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this._taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){let e=this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),n=this._ngZone.runOutsideAngular(()=>this._ngZone.onStable.subscribe({next:()=>{ce.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}}));this._destroyRef?.onDestroy(()=>{e.unsubscribe(),n.unsubscribe()})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb()}});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>n.updateCb&&n.updateCb(e)?(clearTimeout(n.timeoutId),!1):!0)}}getPendingTasks(){return this._taskTrackingZone?this._taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,o){let r=-1;n&&n>0&&(r=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==r),e()},n)),this._callbacks.push({doneCb:e,timeoutId:r,updateCb:o})}whenStable(e,n,o){if(o&&!this._taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,o),this._runCallbacksIfReady()}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,o){return[]}static \u0275fac=function(n){return new(n||t)(be(ce),be(x0),be(K1))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),x0=(()=>{class t{_applications=new Map;registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return F7?.findTestabilityInTree(this,e,n)??null}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})();function iS(t){F7=t}var F7;function ms(t){return!!t&&typeof t.then=="function"}function q4(t){return!!t&&typeof t.subscribe=="function"}var V7=new L("");function Q4(t){return ha([{provide:V7,multi:!0,useValue:t}])}var B7=(()=>{class t{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,n)=>{this.resolve=e,this.reject=n});appInits=d(V7,{optional:!0})??[];injector=d(Ce);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let o of this.appInits){let r=Si(this.injector,o);if(ms(r))e.push(r);else if(q4(r)){let a=new Promise((s,c)=>{r.subscribe({complete:s,error:c})});e.push(a)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{n()}).catch(o=>{this.reject(o)}),e.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),K4=new L("");function oS(){Ng(()=>{let t="";throw new he(600,t)})}function rS(t){return t.isBoundToModule}var _Q=10;function j7(t,i){return Array.isArray(i)?i.reduce(j7,t):q(q({},t),i)}var bi=(()=>{class t{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=d(go);afterRenderManager=d(N4);zonelessEnabled=d(Z2);rootEffectScheduler=d(J2);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new B;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=d(Ca);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(le(e=>!e))}constructor(){d(Zs,{optional:!0})}whenStable(){let e;return new Promise(n=>{e=this.isStable.subscribe({next:o=>{o&&n()}})}).finally(()=>{e.unsubscribe()})}_injector=d(Jt);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,n){return this.bootstrapImpl(e,n)}bootstrapImpl(e,n,o=Ce.NULL){return this._injector.get(ce).run(()=>{un(10);let a=e instanceof U4;if(!this._injector.get(B7).done){let S="";throw new he(405,S)}let c;a?c=e:c=this._injector.get(v0).resolveComponentFactory(e),this.componentTypes.push(c.componentType);let u=rS(c)?void 0:this._injector.get(Ma),f=n||c.selector,h=c.create(o,[],f,u),y=h.location.nativeElement,x=h.injector.get(Y4,null);return x?.registerApplication(y),h.onDestroy(()=>{this.detachView(h.hostView),t0(this.components,h),x?.unregisterApplication(y)}),this._loadComponent(h),un(11,h),h})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){un(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(z4.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new he(101,!1);let e=ot(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ot(e),this.afterTick.next(),un(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Nn,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<_Q;)un(14),this.synchronizeOnce(),un(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:o}of this.allViews){if(!n&&!Q2(o))continue;let r=n&&!this.zonelessEnabled?0:1;yD(o,r),e=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}e||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:e})=>Q2(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){let n=e;t0(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(o){this.internalErrorHandler(o)}this.components.push(e),this._injector.get(K4,[]).forEach(o=>o(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>t0(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new he(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function t0(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function X1(t,i){let e=ze(),n=va();if(_o(e,n,i)){let o=dn(),r=R1();if(j4(r,o,e,t,i))ss(r)&&pD(e,r.index);else{let s=pr(r,e);fD(e[en],s,null,r.value,t,i,null)}}return X1}function oe(t,i,e,n){let o=ze(),r=va();if(_o(o,r,i)){let a=dn(),s=R1();UY(s,o,t,i,e,n)}return oe}var nbe=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function H7(){return ze()[Xi][$n]}var $5=class{destroy(i){}updateValue(i,e){}swap(i,e){let n=Math.min(i,e),o=Math.max(i,e),r=this.detach(o);if(o-n>1){let a=this.detach(n);this.attach(n,r),this.attach(o,a)}else this.attach(n,r)}move(i,e){this.attach(e,this.detach(i))}};function u5(t,i,e,n,o){return t===e&&Object.is(i,n)?1:Object.is(o(t,i),o(e,n))?-1:0}function bQ(t,i,e){let n,o,r=0,a=t.length-1,s=void 0;if(Array.isArray(i)){let c=i.length-1;for(;r<=a&&r<=c;){let u=t.at(r),f=i[r],h=u5(r,u,r,f,e);if(h!==0){h<0&&t.updateValue(r,f),r++;continue}let y=t.at(a),x=i[c],S=u5(a,y,c,x,e);if(S!==0){S<0&&t.updateValue(a,x),a--,c--;continue}let Y=e(r,u),Q=e(a,y),X=e(r,f);if(Object.is(X,Q)){let pe=e(c,x);Object.is(pe,Y)?(t.swap(r,a),t.updateValue(a,x),c--,a--):t.move(a,r),t.updateValue(r,f),r++;continue}if(n??=new S4,o??=ew(t,r,a,e),G5(t,n,r,X))t.updateValue(r,f),r++,a++;else if(o.has(X))n.set(Y,t.detach(r)),a--;else{let pe=t.create(r,i[r]);t.attach(r,pe),r++,a++}}for(;r<=c;)JM(t,n,e,r,i[r]),r++}else if(i!=null){let c=i[Symbol.iterator](),u=c.next();for(;!u.done&&r<=a;){let f=t.at(r),h=u.value,y=u5(r,f,r,h,e);if(y!==0)y<0&&t.updateValue(r,h),r++,u=c.next();else{n??=new S4,o??=ew(t,r,a,e);let x=e(r,h);if(G5(t,n,r,x))t.updateValue(r,h),r++,a++,u=c.next();else if(!o.has(x))t.attach(r,t.create(r,h)),r++,a++,u=c.next();else{let S=e(r,f);n.set(S,t.detach(r)),a--}}}for(;!u.done;)JM(t,n,e,t.length,u.value),u=c.next()}for(;r<=a;)t.destroy(t.detach(a--));n?.forEach(c=>{t.destroy(c)})}function G5(t,i,e,n){return i!==void 0&&i.has(n)?(t.attach(e,i.get(n)),i.delete(n),!0):!1}function JM(t,i,e,n,o){if(G5(t,i,n,e(n,o)))t.updateValue(n,o);else{let r=t.create(n,o);t.attach(n,r)}}function ew(t,i,e,n){let o=new Set;for(let r=i;r<=e;r++)o.add(n(r,t.at(r)));return o}var S4=class{kvMap=new Map;_vMap=void 0;has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;let e=this.kvMap.get(i);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(i,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,e){if(this.kvMap.has(i)){let n=this.kvMap.get(i);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(n);)n=o.get(n);o.set(n,e)}else this.kvMap.set(i,e)}forEach(i){for(let[e,n]of this.kvMap)if(i(n,e),this._vMap!==void 0){let o=this._vMap;for(;o.has(n);)n=o.get(n),i(n,e)}}};function I(t,i,e,n,o,r,a,s){Sa("NgControlFlow");let c=ze(),u=dn(),f=Wo(u.consts,r);return H1(c,u,t,i,e,n,o,f,256,a,s),U7}function U7(t,i,e,n,o,r,a,s){Sa("NgControlFlow");let c=ze(),u=dn(),f=Wo(u.consts,r);return H1(c,u,t,i,e,n,o,f,512,a,s),U7}function O(t,i){Sa("NgControlFlow");let e=ze(),n=va(),o=e[n]!==ai?e[n]:-1,r=o!==-1?k4(e,ln+o):void 0,a=0;if(_o(e,n,t)){let s=ot(null);try{if(r!==void 0&&SD(r,a),t!==-1){let c=ln+t,u=k4(e,c),f=Q5(e[Ke],c),h=ED(u,f,e),y=_0(e,f,i,{dehydratedView:h});b0(u,y,a,j1(f,h))}}finally{ot(s)}}else if(r!==void 0){let s=DD(r,a);s!==void 0&&(s[$n]=i)}}var W5=class{lContainer;$implicit;$index;constructor(i,e,n){this.lContainer=i,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-Gn}};function vt(t,i){return i}var Y5=class{hasEmptyBlock;trackByFn;liveCollection;constructor(i,e,n){this.hasEmptyBlock=i,this.trackByFn=e,this.liveCollection=n}};function nt(t,i,e,n,o,r,a,s,c,u,f,h,y){Sa("NgControlFlow");let x=ze(),S=dn(),Y=c!==void 0,Q=ze(),X=s?a.bind(Q[Xi][$n]):a,pe=new Y5(Y,X);Q[ln+t]=pe,H1(x,S,t+1,i,e,n,o,Wo(S.consts,r),256),Y&&H1(x,S,t+2,c,u,f,h,Wo(S.consts,y),512)}var q5=class extends $5{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(i,e,n){super(),this.lContainer=i,this.hostLView=e,this.templateTNode=n}get length(){return this.lContainer.length-Gn}at(i){return this.getLView(i)[$n].$implicit}attach(i,e){let n=e[el];this.needsIndexUpdate||=i!==this.length,b0(this.lContainer,e,i,j1(this.templateTNode,n)),vQ(this.lContainer,i)}detach(i){return this.needsIndexUpdate||=i!==this.length-1,yQ(this.lContainer,i),CQ(this.lContainer,i)}create(i,e){let n=v4(this.lContainer,this.templateTNode.tView.ssrId),o=_0(this.hostLView,this.templateTNode,new W5(this.lContainer,e,i),{dehydratedView:n});return this.operationsCounter?.recordCreate(),o}destroy(i){F4(i[Ke],i),this.operationsCounter?.recordDestroy()}updateValue(i,e){this.getLView(i)[$n].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i0){let r=n[rs];xY(r,o),ul.delete(n),o.detachedLeaveAnimationFns=void 0}}function yQ(t,i){if(t.length<=Gn)return;let e=Gn+i,n=t[e],o=n?n[ol]:void 0;o&&o.leave&&o.leave.size>0&&(o.detachedLeaveAnimationFns=[])}function CQ(t,i){return s0(t,i)}function xQ(t,i){return DD(t,i)}function Q5(t,i){return q2(t,i)}function k(t,i,e){let n=ze(),o=va();if(_o(n,o,i)){let r=dn(),a=R1();uD(a,n,t,i,n[en],e)}return k}function K5(t,i,e,n,o){j4(i,t,e,o?"class":"style",n)}function g(t,i,e,n){let o=ze(),r=o[Ke],a=t+ln,s=r.firstCreatePass?O7(a,o,2,i,D7,W3(),e,n):r.data[a];if(S7(s,o,t,i,aS),I1(s)){let c=o[Ke];B4(c,o,s),r7(c,s,o)}return n!=null&&g0(o,s),g}function _(){let t=dn(),i=ri(),e=k7(i);return t.firstCreatePass&&T7(t,e),q8(e)&&Q8(),W8(),e.classesWithoutHost!=null&&XG(e)&&K5(t,e,ze(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&ZG(e)&&K5(t,e,ze(),e.stylesWithoutHost,!1),_}function F(t,i,e,n){return g(t,i,e,n),_(),F}function Be(t,i,e,n){let o=ze(),r=o[Ke],a=t+ln,s=r.firstCreatePass?Sq(a,r,2,i,e,n):r.data[a];return S7(s,o,t,i,aS),n!=null&&g0(o,s),Be}function Ue(){let t=ri(),i=k7(t);return q8(i)&&Q8(),W8(),Ue}function Fn(t,i,e,n){return Be(t,i,e,n),Ue(),Fn}var aS=(t,i,e,n,o)=>(X2(!0),Hw(i[en],n,vM()));function Ji(t,i,e){let n=ze(),o=n[Ke],r=t+ln,a=o.firstCreatePass?O7(r,n,8,"ng-container",D7,W3(),i,e):o.data[r];if(S7(a,n,t,"ng-container",MQ),I1(a)){let s=n[Ke];B4(s,n,a),r7(s,a,n)}return e!=null&&g0(n,a),Ji}function eo(){let t=dn(),i=ri(),e=k7(i);return t.firstCreatePass&&T7(t,e),eo}function Ut(t,i,e){return Ji(t,i,e),eo(),Ut}var MQ=(t,i,e,n,o)=>(X2(!0),$W(i[en],""));function se(){return ze()}function Dt(t,i,e){let n=ze(),o=va();if(_o(n,o,i)){let r=dn(),a=R1();mD(a,n,t,i,n[en],e)}return Dt}var o4=void 0;function wQ(t){let i=Math.floor(Math.abs(t)),e=t.toString().replace(/^[^.]*\.?/,"").length;return i===1&&e===0?1:5}var DQ=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],o4,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],o4,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",o4,"{1} 'at' {0}",o4],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",wQ],n0={};function $7(t,i,e){typeof i!="string"&&(e=i,i=t[Mn.LocaleId]),i=i.toLowerCase().replace(/_/g,"-"),n0[i]=t,e&&(n0[i][Mn.ExtraData]=e)}function bo(t){let i=SQ(t),e=tw(i);if(e)return e;let n=i.split("-")[0];if(e=tw(n),e)return e;if(n==="en")return DQ;throw new he(701,!1)}function tw(t){return t in n0||(n0[t]=oi.ng&&oi.ng.common&&oi.ng.common.locales&&oi.ng.common.locales[t]),n0[t]}var Mn=(function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t})(Mn||{});function SQ(t){return t.toLowerCase().replace(/_/g,"-")}var M0="en-US",kQ="USD";var EQ=M0;function sS(t){typeof t=="string"&&(EQ=t.toLowerCase().replace(/_/g,"-"))}function N(t,i,e){let n=ze(),o=dn(),r=ri();return cS(o,n,n[en],r,t,i,e),N}function ka(t,i,e){let n=ze(),o=dn(),r=ri();return(r.type&3||e)&&zD(r,o,n,e,n[en],t,i,u4(r,n,i)),ka}function cS(t,i,e,n,o,r,a){let s=!0,c=null;if((n.type&3||a)&&(c??=u4(n,i,r),zD(n,t,i,a,e,o,r,c)&&(s=!1)),s){let u=n.outputs?.[o],f=n.hostDirectiveOutputs?.[o];if(f&&f.length)for(let h=0;h>17&32767}function TQ(t){return(t&2)==2}function PQ(t,i){return t&131071|i<<17}function X5(t){return t|2}function U1(t){return(t&131068)>>2}function m5(t,i){return t&-131069|i<<2}function LQ(t){return(t&1)===1}function Z5(t){return t|1}function AQ(t,i,e,n,o,r){let a=r?i.classBindings:i.styleBindings,s=ml(a),c=U1(a);t[n]=e;let u=!1,f;if(Array.isArray(e)){let h=e;f=h[1],(f===null||D1(h,f)>0)&&(u=!0)}else f=e;if(o)if(c!==0){let y=ml(t[s+1]);t[n+1]=r4(y,s),y!==0&&(t[y+1]=m5(t[y+1],n)),t[s+1]=PQ(t[s+1],n)}else t[n+1]=r4(s,0),s!==0&&(t[s+1]=m5(t[s+1],n)),s=n;else t[n+1]=r4(c,0),s===0?s=n:t[c+1]=m5(t[c+1],n),c=n;u&&(t[n+1]=X5(t[n+1])),nw(t,f,n,!0),nw(t,f,n,!1),RQ(i,f,t,n,r),a=r4(s,c),r?i.classBindings=a:i.styleBindings=a}function RQ(t,i,e,n,o){let r=o?t.residualClasses:t.residualStyles;r!=null&&typeof i=="string"&&D1(r,i)>=0&&(e[n+1]=Z5(e[n+1]))}function nw(t,i,e,n){let o=t[e+1],r=i===null,a=n?ml(o):U1(o),s=!1;for(;a!==0&&(s===!1||r);){let c=t[a],u=t[a+1];zQ(c,i)&&(s=!0,t[a+1]=n?Z5(u):X5(u)),a=n?ml(u):U1(u)}s&&(t[e+1]=n?X5(o):Z5(o))}function zQ(t,i){return t===null||i==null||(Array.isArray(t)?t[1]:t)===i?!0:Array.isArray(t)&&typeof i=="string"?D1(t,i)>=0:!1}var Ur={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function NQ(t){return t.substring(Ur.key,Ur.keyEnd)}function FQ(t){return VQ(t),lS(t,dS(t,0,Ur.textEnd))}function lS(t,i){let e=Ur.textEnd;return e===i?-1:(i=Ur.keyEnd=BQ(t,Ur.key=i,e),dS(t,i,e))}function VQ(t){Ur.key=0,Ur.keyEnd=0,Ur.value=0,Ur.valueEnd=0,Ur.textEnd=t.length}function dS(t,i,e){for(;i32;)i++;return i}function Nt(t,i,e){return uS(t,i,e,!1),Nt}function ie(t,i){return uS(t,i,null,!0),ie}function kt(t){HQ(qQ,jQ,t,!0)}function jQ(t,i){for(let e=FQ(i);e>=0;e=lS(i,e))B3(t,NQ(i),!0)}function uS(t,i,e,n){let o=ze(),r=dn(),a=A1(2);if(r.firstUpdatePass&&pS(r,t,a,n),i!==ai&&_o(o,a,i)){let s=r.data[hr()];fS(r,s,o,o[en],t,o[a+1]=KQ(i,e),n,a)}}function HQ(t,i,e,n){let o=dn(),r=A1(2);o.firstUpdatePass&&pS(o,null,r,n);let a=ze();if(e!==ai&&_o(a,r,e)){let s=o.data[hr()];if(hS(s,n)&&!mS(o,r)){let c=n?s.classesWithoutHost:s.stylesWithoutHost;c!==null&&(e=z3(c,e||"")),K5(o,s,a,e,n)}else QQ(o,s,a,a[en],a[r+1],a[r+1]=YQ(t,i,e),n,r)}}function mS(t,i){return i>=t.expandoStartIndex}function pS(t,i,e,n){let o=t.data;if(o[e+1]===null){let r=o[hr()],a=mS(t,e);hS(r,n)&&i===null&&!a&&(i=!1),i=UQ(o,r,i,n),AQ(o,r,i,e,a,n)}}function UQ(t,i,e,n){let o=fM(t),r=n?i.residualClasses:i.residualStyles;if(o===null)(n?i.classBindings:i.styleBindings)===0&&(e=p5(null,t,i,e,n),e=u0(e,i.attrs,n),r=null);else{let a=i.directiveStylingLast;if(a===-1||t[a]!==o)if(e=p5(o,t,i,e,n),r===null){let c=$Q(t,i,n);c!==void 0&&Array.isArray(c)&&(c=p5(null,t,i,c[1],n),c=u0(c,i.attrs,n),GQ(t,i,n,c))}else r=WQ(t,i,n)}return r!==void 0&&(n?i.residualClasses=r:i.residualStyles=r),e}function $Q(t,i,e){let n=e?i.classBindings:i.styleBindings;if(U1(n)!==0)return t[ml(n)]}function GQ(t,i,e,n){let o=e?i.classBindings:i.styleBindings;t[ml(o)]=n}function WQ(t,i,e){let n,o=i.directiveEnd;for(let r=1+i.directiveStylingLast;r0;){let c=t[o],u=Array.isArray(c),f=u?c[1]:c,h=f===null,y=e[o+1];y===ai&&(y=h?Qi:void 0);let x=h?j3(y,n):f===n?y:void 0;if(u&&!E4(x)&&(x=j3(c,n)),E4(x)&&(s=x,a))return s;let S=t[o+1];o=a?ml(S):U1(S)}if(i!==null){let c=r?i.residualClasses:i.residualStyles;c!=null&&(s=j3(c,n))}return s}function E4(t){return t!==void 0}function KQ(t,i){return t==null||t===""||(typeof i=="string"?t=t+i:typeof t=="object"&&(t=is(Yo(t)))),t}function hS(t,i){return(t.flags&(i?8:16))!==0}function C(t,i=""){let e=ze(),n=dn(),o=t+ln,r=n.firstCreatePass?q1(n,o,1,i,null):n.data[o],a=XQ(n,e,r,i,t);e[o]=a,Z3()&&M7(n,e,a,r),P1(r,!1)}var XQ=(t,i,e,n,o)=>(X2(!0),HW(i[en],n));function gS(t,i,e,n=""){return _o(t,va(),e)?i+Ki(e)+n:ai}function _S(t,i,e,n,o,r=""){let a=Y3(),s=c0(t,a,e,o);return A1(2),s?i+Ki(e)+n+Ki(o)+r:ai}function ZQ(t,i,e,n,o,r,a,s=""){let c=Y3(),u=AD(t,c,e,o,a);return A1(3),u?i+Ki(e)+n+Ki(o)+r+Ki(a)+s:ai}function JQ(t,i,e,n,o,r,a,s,c,u=""){let f=Y3(),h=RD(t,f,e,o,a,c);return A1(4),h?i+Ki(e)+n+Ki(o)+r+Ki(a)+s+Ki(c)+u:ai}function T(t){return K("",t),T}function K(t,i,e){let n=ze(),o=gS(n,t,i,e);return o!==ai&&Z4(n,hr(),o),K}function Tt(t,i,e,n,o){let r=ze(),a=_S(r,t,i,e,n,o);return a!==ai&&Z4(r,hr(),a),Tt}function ps(t,i,e,n,o,r,a){let s=ze(),c=ZQ(s,t,i,e,n,o,r,a);return c!==ai&&Z4(s,hr(),c),ps}function bS(t,i,e,n,o,r,a,s,c){let u=ze(),f=JQ(u,t,i,e,n,o,r,a,s,c);return f!==ai&&Z4(u,hr(),f),bS}function Z4(t,i,e){let n=V8(i,t);UW(t[en],n,e)}function J1(t,i,e){i5(i)&&(i=i());let n=ze(),o=va();if(_o(n,o,i)){let r=dn(),a=R1();uD(a,n,t,i,n[en],e)}return J1}function w0(t,i){let e=i5(t);return e&&t.set(i),e}function ed(t,i){let e=ze(),n=dn(),o=ri();return cS(n,e,e[en],o,t,i),ed}function Ft(t){return _o(ze(),va(),t)?Ki(t):ai}function gl(t,i,e=""){return gS(ze(),t,i,e)}function J4(t,i,e,n,o=""){return _S(ze(),t,i,e,n,o)}function eK(t,i,e){let n=dn();if(n.firstCreatePass){let o=jr(t);J5(e,n.data,n.blueprint,o,!0),J5(i,n.data,n.blueprint,o,!1)}}function J5(t,i,e,n,o){if(t=gi(t),Array.isArray(t))for(let r=0;r>20;if(Xc(t)||!t.multi){let x=new dl(u,o,Me,null),S=h5(c,i,o?f:f+y,h);S===-1?(_5(g4(s,a),r,c),f5(r,t,i.length),i.push(c),s.directiveStart++,s.directiveEnd++,o&&(s.providerIndexes+=1048576),e.push(x),a.push(x)):(e[S]=x,a[S]=x)}else{let x=h5(c,i,f+y,h),S=h5(c,i,f,f+y),Y=x>=0&&e[x],Q=S>=0&&e[S];if(o&&!Q||!o&&!Y){_5(g4(s,a),r,c);let X=iK(o?nK:tK,e.length,o,n,u,t);!o&&Q&&(e[S].providerFactory=X),f5(r,t,i.length,0),i.push(c),s.directiveStart++,s.directiveEnd++,o&&(s.providerIndexes+=1048576),e.push(X),a.push(X)}else{let X=vS(e[o?S:x],u,!o&&n);f5(r,t,x>-1?x:S,X)}!o&&n&&Q&&e[S].componentProviders++}}}function f5(t,i,e,n){let o=Xc(i),r=Zx(i);if(o||r){let c=(r?gi(i.useClass):i).prototype.ngOnDestroy;if(c){let u=t.destroyHooks||(t.destroyHooks=[]);if(!o&&i.multi){let f=u.indexOf(e);f===-1?u.push(e,[n,c]):u[f+1].push(n,c)}else u.push(e,c)}}}function vS(t,i,e){return e&&t.componentProviders++,t.multi.push(i)-1}function h5(t,i,e,n){for(let o=e;o{e.providersResolver=(n,o)=>eK(n,o?o(t):t,i)}}function qo(t,i,e){let n=cs()+t,o=ze();return o[n]===ai?y0(o,n,e?i.call(e):i()):kq(o,n)}function Qo(t,i,e,n){return yS(ze(),cs(),t,i,e,n)}function W7(t,i,e,n,o){return CS(ze(),cs(),t,i,e,n,o)}function Y7(t,i,e,n,o,r){return xS(ze(),cs(),t,i,e,n,o,r)}function ep(t,i){let e=t[i];return e===ai?void 0:e}function yS(t,i,e,n,o,r){let a=i+e;return _o(t,a,o)?y0(t,a+1,r?n.call(r,o):n(o)):ep(t,a+1)}function CS(t,i,e,n,o,r,a){let s=i+e;return c0(t,s,o,r)?y0(t,s+2,a?n.call(a,o,r):n(o,r)):ep(t,s+2)}function xS(t,i,e,n,o,r,a,s){let c=i+e;return AD(t,c,o,r,a)?y0(t,c+3,s?n.call(s,o,r,a):n(o,r,a)):ep(t,c+3)}function oK(t,i,e,n,o,r,a,s,c){let u=i+e;return RD(t,u,o,r,a,s)?y0(t,u+4,c?n.call(c,o,r,a,s):n(o,r,a,s)):ep(t,u+4)}function D(t,i){let e=dn(),n,o=t+ln;e.firstCreatePass?(n=rK(i,e.pipeRegistry),e.data[o]=n,n.onDestroy&&(e.destroyHooks??=[]).push(o,n.onDestroy)):n=e.data[o];let r=n.factory||(n.factory=Us(n.type,!0)),a,s=fo(Me);try{let c=h4(!1),u=r();return h4(c),B8(e,ze(),o,u),u}finally{fo(s)}}function rK(t,i){if(i)for(let e=i.length-1;e>=0;e--){let n=i[e];if(t===n.name)return n}}function E(t,i,e){let n=t+ln,o=ze(),r=T1(o,n);return np(o,n)?yS(o,cs(),i,r.transform,e,r):r.transform(e)}function Ko(t,i,e,n){let o=t+ln,r=ze(),a=T1(r,o);return np(r,o)?CS(r,cs(),i,a.transform,e,n,a):a.transform(e,n)}function aK(t,i,e,n,o){let r=t+ln,a=ze(),s=T1(a,r);return np(a,r)?xS(a,cs(),i,s.transform,e,n,o,s):s.transform(e,n,o)}function tp(t,i,e,n,o,r){let a=t+ln,s=ze(),c=T1(s,a);return np(s,a)?oK(s,cs(),i,c.transform,e,n,o,r,c):c.transform(e,n,o,r)}function np(t,i){return t[Ke].data[i].pure}function Js(t,i){return H4(t,i)}var a4=null;function MS(t){a4!==null&&(t.defaultEncapsulation!==a4.defaultEncapsulation||t.preserveWhitespaces!==a4.preserveWhitespaces)||(a4=t)}var I4=class{ngModuleFactory;componentFactories;constructor(i,e){this.ngModuleFactory=i,this.componentFactories=e}},q7=(()=>{class t{compileModuleSync(e){return new d0(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let n=this.compileModuleSync(e),o=I8(e),r=Yw(o.declarations).reduce((a,s)=>{let c=fa(s);return c&&a.push(new Ks(c)),a},[]);return new I4(n,r)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),wS=new L("");var sK=(()=>{class t{zone=d(ce);changeDetectionScheduler=d(lr);applicationRef=d(bi);applicationErrorHandler=d(go);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function DS({ngZoneFactory:t,ignoreChangesOutsideZone:i,scheduleInRootZone:e}){return t??=()=>new ce(Re(q({},Q7()),{scheduleInRootZone:e})),[{provide:ce,useFactory:t},{provide:os,multi:!0,useFactory:()=>{let n=d(sK,{optional:!0});return()=>n.initialize()}},{provide:os,multi:!0,useFactory:()=>{let n=d(cK);return()=>{n.initialize()}}},i===!0?{provide:o5,useValue:!0}:[],{provide:r5,useValue:e??Jw},{provide:go,useFactory:()=>{let n=d(ce),o=d(Jt),r;return a=>{n.runOutsideAngular(()=>{o.destroyed&&!r?setTimeout(()=>{throw a}):(r??=o.get(Di),r.handleError(a))})}}}]}function Q7(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var cK=(()=>{class t{subscription=new Ee;initialized=!1;zone=d(ce);pendingTasks=d(Ca);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ce.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ce.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var SS=(()=>{class t{applicationErrorHandler=d(go);appRef=d(bi);taskService=d(Ca);ngZone=d(ce);zonelessEnabled=d(Z2);tracing=d(Zs,{optional:!0});disableScheduling=d(o5,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ee;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(b4):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(d(r5,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof o0||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let n=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,n=!0;break}case 12:{this.appRef.dirtyFlags|=16,n=!0;break}case 13:{this.appRef.dirtyFlags|=2,n=!0;break}case 11:{n=!0;break}case 9:case 8:case 7:case 10:default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(n))return;let o=this.useMicrotaskScheduler?NM:eD;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>o(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>o(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(b4+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){this.taskService.remove(e),this.applicationErrorHandler(n)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,NM(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lK(){return typeof $localize<"u"&&$localize.locale||M0}var Wr=new L("",{providedIn:"root",factory:()=>d(Wr,{optional:!0,skipSelf:!0})||lK()}),K7=new L("",{providedIn:"root",factory:()=>kQ});var ip=class{destroyed=!1;listeners=null;errorHandler=d(Di,{optional:!0});destroyRef=d(Zi);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(i){if(this.destroyed)throw new he(953,!1);return(this.listeners??=[]).push(i),{unsubscribe:()=>{let e=this.listeners?.indexOf(i);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(i){if(this.destroyed){console.warn(dr(953,!1));return}if(this.listeners===null)return;let e=ot(null);try{for(let n of this.listeners)try{n(i)}catch(o){this.errorHandler?.handleError(o)}}finally{ot(e)}}};function Yn(t){return Ax(t)}function si(t,i){return L2(t,i?.equal)}var X7=class{[ni];constructor(i){this[ni]=i}destroy(){this[ni].destroy()}};function Ea(t,i){let e=i?.injector??d(Ce),n=i?.manualCleanup!==!0?e.get(Zi):null,o,r=e.get(sl,null,{optional:!0}),a=e.get(lr);return r!==null?(o=mK(r.view,a,t),n instanceof H2&&n._lView===r.view&&(n=null)):o=pK(t,e.get(J2),a),o.injector=e,n!==null&&(o.onDestroyFn=n.onDestroy(()=>o.destroy())),new X7(o)}var kS=Re(q({},Rx),{cleanupFns:void 0,zone:null,onDestroyFn:cl,run(){let t=L1(!1);try{zx(this)}finally{L1(t)}},cleanup(){if(!this.cleanupFns?.length)return;let t=ot(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ot(t)}}}),dK=Re(q({},kS),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){Fs(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),uK=Re(q({},kS),{consumerMarkedDirty(){this.view[st]|=8192,Ys(this.view),this.notifier.notify(13)},destroy(){Fs(this),this.onDestroyFn(),this.cleanup(),this.view[as]?.delete(this)}});function mK(t,i,e){let n=Object.create(uK);return n.view=t,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=i,n.fn=ES(n,e),t[as]??=new Set,t[as].add(n),n.consumerMarkedDirty(n),n}function pK(t,i,e){let n=Object.create(dK);return n.fn=ES(n,t),n.scheduler=i,n.notifier=e,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function ES(t,i){return()=>{i(e=>(t.cleanupFns??=[]).push(e))}}var sp=Symbol("InputSignalNode#UNSET"),BS=Re(q({},A2),{transformFn:void 0,applyValueToInputSignal(t,i){Hc(t,i)}});function jS(t,i){let e=Object.create(BS);e.value=t,e.transformFn=i?.transform;function n(){if(zs(e),e.value===sp){let o=null;throw new he(-950,o)}return e.value}return n[ni]=e,n}var gn=class{attributeName;constructor(i){this.attributeName=i}__NG_ELEMENT_ID__=()=>m0(this.attributeName);toString(){return`HostAttributeToken ${this.attributeName}`}},HS=new L("");HS.__NG_ELEMENT_ID__=t=>{let i=ri();if(i===null)throw new he(204,!1);if(i.type&2)return i.value;if(t&8)return null;throw new he(204,!1)};function IS(t,i){return jS(t,i)}function xK(t){return jS(sp,t)}var td=(IS.required=xK,IS);function OS(t,i){return R7(i)}function MK(t,i){return z7(i)}var S0=(OS.required=MK,OS);function TS(t,i){return R7(i)}function wK(t,i){return z7(i)}var US=(TS.required=wK,TS);function $S(t,i){let e=Object.create(BS),n=new ip;e.value=t;function o(){return zs(e),PS(e.value),e.value}return o[ni]=e,o.asReadonly=J3.bind(o),o.set=r=>{e.equal(e.value,r)||(Hc(e,r),n.emit(r))},o.update=r=>{PS(e.value),o.set(r(e.value))},o.subscribe=n.subscribe.bind(n),o.destroyRef=n.destroyRef,o}function PS(t){if(t===sp)throw new he(952,!1)}function LS(t,i){return $S(t,i)}function DK(t){return $S(sp,t)}var vo=(LS.required=DK,LS);function SK(t,i,e){let n=new d0(e);return Promise.resolve(n)}function AS(t){for(let i=t.length-1;i>=0;i--)if(t[i]!==void 0)return t[i]}var op=new L(""),kK=new L("");function D0(t){return!t.moduleRef}function EK(t){let i=D0(t)?t.r3Injector:t.moduleRef.injector,e=i.get(ce);return e.run(()=>{D0(t)?t.r3Injector.resolveInjectorInitializers():t.moduleRef.resolveInjectorInitializers();let n=i.get(go),o;if(e.runOutsideAngular(()=>{o=e.onError.subscribe({next:n})}),D0(t)){let r=()=>i.destroy(),a=t.platformInjector.get(op);a.add(r),i.onDestroy(()=>{o.unsubscribe(),a.delete(r)})}else{let r=()=>t.moduleRef.destroy(),a=t.platformInjector.get(op);a.add(r),t.moduleRef.onDestroy(()=>{t0(t.allPlatformModules,t.moduleRef),o.unsubscribe(),a.delete(r)})}return OK(n,e,()=>{let r=i.get(Ca),a=r.add(),s=i.get(B7);return s.runInitializers(),s.donePromise.then(()=>{let c=i.get(Wr,M0);if(sS(c||M0),!i.get(kK,!0))return D0(t)?i.get(bi):(t.allPlatformModules.push(t.moduleRef),t.moduleRef);if(D0(t)){let f=i.get(bi);return t.rootComponent!==void 0&&f.bootstrap(t.rootComponent),f}else return GS?.(t.moduleRef,t.allPlatformModules),t.moduleRef}).finally(()=>void r.remove(a))})})}var GS;function RS(){GS=IK}function IK(t,i){let e=t.injector.get(bi);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(n=>e.bootstrap(n));else if(t.instance.ngDoBootstrap)t.instance.ngDoBootstrap(e);else throw new he(-403,!1);i.push(t)}function OK(t,i,e){try{let n=e();return ms(n)?n.catch(o=>{throw i.runOutsideAngular(()=>t(o)),o}):n}catch(n){throw i.runOutsideAngular(()=>t(n)),n}}var WS=(()=>{class t{_injector;_modules=[];_destroyListeners=[];_destroyed=!1;constructor(e){this._injector=e}bootstrapModuleFactory(e,n){let o=n?.scheduleInRootZone,r=()=>nD(n?.ngZone,Re(q({},Q7({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing})),{scheduleInRootZone:o})),a=n?.ignoreChangesOutsideZone,s=[DS({ngZoneFactory:r,ignoreChangesOutsideZone:a}),{provide:lr,useExisting:SS},CM],c=ZD(e.moduleType,this.injector,s);return RS(),EK({moduleRef:c,allPlatformModules:this._modules,platformInjector:this.injector})}bootstrapModule(e,n=[]){let o=j7({},n);return RS(),SK(this.injector,o,e).then(r=>this.bootstrapModuleFactory(r,o))}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new he(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());let e=this._injector.get(op,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static \u0275fac=function(n){return new(n||t)(be(Ce))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"platform"})}return t})(),s_=null;function TK(t){if(l_())throw new he(400,!1);oS(),s_=t;let i=t.get(WS);return AK(t),i}function c_(t,i,e=[]){let n=`Platform: ${i}`,o=new L(n);return(r=[])=>{let a=l_();if(!a){let s=[...e,...r,{provide:o,useValue:!0}];a=t?.(s)??TK(PK(s,n))}return LK(o)}}function PK(t=[],i){return Ce.create({name:i,providers:[{provide:G2,useValue:"platform"},{provide:op,useValue:new Set([()=>s_=null])},...t]})}function LK(t){let i=l_();if(!i)throw new he(-401,!1);return i}function l_(){return s_?.get(WS)??null}function AK(t){let i=t.get(O4,null);Si(t,()=>{i?.forEach(e=>e())})}var we=(()=>{class t{static __NG_ELEMENT_ID__=RK}return t})();function RK(t){return zK(ri(),ze(),(t&16)===16)}function zK(t,i,e){if(ss(t)&&!e){let n=fr(t.index,i);return new Qs(n,n)}else if(t.type&175){let n=i[Xi];return new Qs(n,i)}return null}var J7=class{constructor(){}supports(i){return P7(i)}create(i){return new e_(i)}},NK=(t,i)=>i,e_=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(i){this._trackByFn=i||NK}forEachItem(i){let e;for(e=this._itHead;e!==null;e=e._next)i(e)}forEachOperation(i){let e=this._itHead,n=this._removalsHead,o=0,r=null;for(;e||n;){let a=!n||e&&e.currentIndex{a=this._trackByFn(o,s),e===null||!Object.is(e.trackById,a)?(e=this._mismatch(e,s,a,o),n=!0):(n&&(e=this._verifyReinsertion(e,s,a,o)),Object.is(e.item,s)||this._addIdentityChange(e,s)),e=e._next,o++}),this.length=o;return this._truncate(e),this.collection=i,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;i!==null;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;i!==null;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,e,n,o){let r;return i===null?r=this._itTail:(r=i._prev,this._remove(i)),i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._reinsertAfter(i,r,o)):(i=this._linkedRecords===null?null:this._linkedRecords.get(n,o),i!==null?(Object.is(i.item,e)||this._addIdentityChange(i,e),this._moveAfter(i,r,o)):i=this._addAfter(new t_(e,n),r,o)),i}_verifyReinsertion(i,e,n,o){let r=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return r!==null?i=this._reinsertAfter(r,i._prev,o):i.currentIndex!=o&&(i.currentIndex=o,this._addToMoves(i,o)),i}_truncate(i){for(;i!==null;){let e=i._next;this._addToRemovals(this._unlink(i)),i=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(i,e,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(i);let o=i._prevRemoved,r=i._nextRemoved;return o===null?this._removalsHead=r:o._nextRemoved=r,r===null?this._removalsTail=o:r._prevRemoved=o,this._insertAfter(i,e,n),this._addToMoves(i,n),i}_moveAfter(i,e,n){return this._unlink(i),this._insertAfter(i,e,n),this._addToMoves(i,n),i}_addAfter(i,e,n){return this._insertAfter(i,e,n),this._additionsTail===null?this._additionsTail=this._additionsHead=i:this._additionsTail=this._additionsTail._nextAdded=i,i}_insertAfter(i,e,n){let o=e===null?this._itHead:e._next;return i._next=o,i._prev=e,o===null?this._itTail=i:o._prev=i,e===null?this._itHead=i:e._next=i,this._linkedRecords===null&&(this._linkedRecords=new rp),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){this._linkedRecords!==null&&this._linkedRecords.remove(i);let e=i._prev,n=i._next;return e===null?this._itHead=n:e._next=n,n===null?this._itTail=e:n._prev=e,i}_addToMoves(i,e){return i.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=i:this._movesTail=this._movesTail._nextMoved=i),i}_addToRemovals(i){return this._unlinkedRecords===null&&(this._unlinkedRecords=new rp),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,e){return i.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=i:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=i,i}},t_=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(i,e){this.item=i,this.trackById=e}},n_=class{_head=null;_tail=null;add(i){this._head===null?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,e){let n;for(n=this._head;n!==null;n=n._nextDup)if((e===null||e<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){let e=i._prevDup,n=i._nextDup;return e===null?this._head=n:e._nextDup=n,n===null?this._tail=e:n._prevDup=e,this._head===null}},rp=class{map=new Map;put(i){let e=i.trackById,n=this.map.get(e);n||(n=new n_,this.map.set(e,n)),n.add(i)}get(i,e){let n=i,o=this.map.get(n);return o?o.get(i,e):null}remove(i){let e=i.trackById;return this.map.get(e).remove(i)&&this.map.delete(e),i}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function zS(t,i,e){let n=t.previousIndex;if(n===null)return n;let o=0;return e&&n{if(e&&e.key===o)this._maybeAddToChanges(e,n),this._appendAfter=e,e=e._next;else{let r=this._getOrCreateRecordForKey(o,n);e=this._insertBeforeOrAppend(e,r)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let n=e;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,e){if(i){let n=i._prev;return e._next=i,e._prev=n,i._prev=e,n&&(n._next=e),i===this._mapHead&&(this._mapHead=e),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(i,e){if(this._records.has(i)){let o=this._records.get(i);this._maybeAddToChanges(o,e);let r=o._prev,a=o._next;return r&&(r._next=a),a&&(a._prev=r),o._next=null,o._prev=null,o}let n=new r_(i);return this._records.set(i,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;i!==null;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;i!==null;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;i!=null;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,e){Object.is(e,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=e,this._addToChanges(i))}_addToAdditions(i){this._additionsHead===null?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){this._changesHead===null?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,e){i instanceof Map?i.forEach(e):Object.keys(i).forEach(n=>e(i[n],n))}},r_=class{key;previousValue=null;currentValue=null;_nextPrevious=null;_next=null;_prev=null;_nextAdded=null;_nextRemoved=null;_nextChanged=null;constructor(i){this.key=i}};function NS(){return new Xo([new J7])}var Xo=(()=>{class t{factories;static \u0275prov=z({token:t,providedIn:"root",factory:NS});constructor(e){this.factories=e}static create(e,n){if(n!=null){let o=n.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=d(t,{optional:!0,skipSelf:!0});return t.create(e,n||NS())}}}find(e){let n=this.factories.find(o=>o.supports(e));if(n!=null)return n;throw new he(901,!1)}}return t})();function FS(){return new cp([new i_])}var cp=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:FS});factories;constructor(e){this.factories=e}static create(e,n){if(n){let o=n.factories.slice();e=e.concat(o)}return new t(e)}static extend(e){return{provide:t,useFactory:()=>{let n=d(t,{optional:!0,skipSelf:!0});return t.create(e,n||FS())}}}find(e){let n=this.factories.find(o=>o.supports(e));if(n)return n;throw new he(901,!1)}}return t})();var YS=c_(null,"core",[]),qS=(()=>{class t{constructor(e){}static \u0275fac=function(n){return new(n||t)(be(bi))};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();function $(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function ht(t,i=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):i}var Z7=Symbol("NOT_SET"),QS=new Set,FK=Re(q({},A2),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:Z7,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase(zs(u),u.value),u.signal[ni]=u,u.registerCleanupFn=f=>(u.cleanup??=new Set).add(f),this.nodes[s]=u,this.hooks[s]=f=>u.phaseFn(f)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let i of this.nodes)if(i)try{for(let e of i.cleanup??QS)e()}finally{Fs(i)}}};function KS(t,i){let e=i?.injector??d(Ce),n=e.get(lr),o=e.get(N4),r=e.get(Zs,null,{optional:!0});o.impl??=e.get(C7);let a=t;typeof a=="function"&&(a={mixedReadWrite:t});let s=e.get(sl,null,{optional:!0}),c=new a_(o.impl,[a.earlyRead,a.write,a.mixedReadWrite,a.read],s?.view,n,e,r?.snapshot(null));return o.impl.register(c),c}function lp(t,i){let e=fa(t),n=i.elementInjector||S1();return new Ks(e).create(n,i.projectableNodes,i.hostElement,i.environmentInjector,i.directives,i.bindings)}function XS(t){let i=fa(t);if(!i)return null;let e=new Ks(i);return{get selector(){return e.selector},get type(){return e.componentType},get inputs(){return e.inputs},get outputs(){return e.outputs},get ngContentSelectors(){return e.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}var ek=null;function Zo(){return ek}function d_(t){ek??=t}var k0=class{},E0=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:()=>d(tk),providedIn:"platform"})}return t})(),u_=new L(""),tk=(()=>{class t extends E0{_location;_history;_doc=d(De);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Zo().getBaseHref(this._doc)}onPopState(e){let n=Zo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=Zo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,o){this._history.pushState(e,n,o)}replaceState(e,n,o){this._history.replaceState(e,n,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:()=>new t,providedIn:"platform"})}return t})();function dp(t,i){return t?i?t.endsWith("/")?i.startsWith("/")?t+i.slice(1):t+i:i.startsWith("/")?t+i:`${t}/${i}`:t:i}function ZS(t){let i=t.search(/#|\?|$/);return t[i-1]==="/"?t.slice(0,i-1)+t.slice(i):t}function Yr(t){return t&&t[0]!=="?"?`?${t}`:t}var qr=(()=>{class t{historyGo(e){throw new Error("")}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:()=>d(mp),providedIn:"root"})}return t})(),up=new L(""),mp=(()=>{class t extends qr{_platformLocation;_baseHref;_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??d(De).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return dp(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+Yr(this._platformLocation.search),o=this._platformLocation.hash;return o&&e?`${n}${o}`:n}pushState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(r));this._platformLocation.pushState(e,n,a)}replaceState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(r));this._platformLocation.replaceState(e,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(be(E0),be(up,8))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),br=(()=>{class t{_subject=new B;_basePath;_locationStrategy;_urlChangeListeners=[];_urlChangeSubscription=null;constructor(e){this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=jK(ZS(JS(n))),this._locationStrategy.onPopState(o=>{this._subject.next({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+Yr(n))}normalize(e){return t.stripTrailingSlash(BK(this._basePath,JS(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",o=null){this._locationStrategy.pushState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Yr(n)),o)}replaceState(e,n="",o=null){this._locationStrategy.replaceState(o,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Yr(n)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(o=>o(e,n))}subscribe(e,n,o){return this._subject.subscribe({next:e,error:n??void 0,complete:o??void 0})}static normalizeQueryParams=Yr;static joinWithSlash=dp;static stripTrailingSlash=ZS;static \u0275fac=function(n){return new(n||t)(be(qr))};static \u0275prov=z({token:t,factory:()=>VK(),providedIn:"root"})}return t})();function VK(){return new br(be(qr))}function BK(t,i){if(!t||!i.startsWith(t))return i;let e=i.substring(t.length);return e===""||["/",";","?","#"].includes(e[0])?e:i}function JS(t){return t.replace(/\/index.html$/,"")}function jK(t){if(new RegExp("^(https?:)?//").test(t)){let[,e]=t.split(/\/\/[^\/]+/);return e}return t}var C_=(()=>{class t extends qr{_platformLocation;_baseHref="";_removeListenerFns=[];constructor(e,n){super(),this._platformLocation=e,n!=null&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(e){let n=dp(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(r))||this._platformLocation.pathname;this._platformLocation.pushState(e,n,a)}replaceState(e,n,o,r){let a=this.prepareExternalUrl(o+Yr(r))||this._platformLocation.pathname;this._platformLocation.replaceState(e,n,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static \u0275fac=function(n){return new(n||t)(be(E0),be(up,8))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),lk={ADP:[void 0,void 0,0],AFN:[void 0,"\u060B",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058F",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20BC"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09F3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xA5","\xA5"],COP:[void 0,"$",2],CRC:[void 0,"\u20A1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010D",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xA3"],ESP:[void 0,"\u20A7",0],EUR:["\u20AC"],FJD:[void 0,"$"],FKP:[void 0,"\xA3"],GBP:["\xA3"],GEL:[void 0,"\u20BE"],GHS:[void 0,"GH\u20B5"],GIP:[void 0,"\xA3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20AA"],INR:["\u20B9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xA5",void 0,0],KHR:[void 0,"\u17DB"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20A9",0],KRW:["\u20A9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20B8"],LAK:[void 0,"\u20AD",0],LBP:[void 0,"L\xA3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20AE",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20A6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20B1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20B2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20BD"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xA3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xA3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xA3",0],THB:[void 0,"\u0E3F"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20BA"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20B4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20AB",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202FCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xA4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]},xp=(function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t})(xp||{});var to=(function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t})(to||{}),rn=(function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t})(rn||{}),Ro=(function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t})(Ro||{}),Ri={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function dk(t){return bo(t)[Mn.LocaleId]}function uk(t,i,e){let n=bo(t),o=[n[Mn.DayPeriodsFormat],n[Mn.DayPeriodsStandalone]],r=vr(o,i);return vr(r,e)}function mk(t,i,e){let n=bo(t),o=[n[Mn.DaysFormat],n[Mn.DaysStandalone]],r=vr(o,i);return vr(r,e)}function pk(t,i,e){let n=bo(t),o=[n[Mn.MonthsFormat],n[Mn.MonthsStandalone]],r=vr(o,i);return vr(r,e)}function fk(t,i){let n=bo(t)[Mn.Eras];return vr(n,i)}function I0(t,i){let e=bo(t);return vr(e[Mn.DateFormat],i)}function O0(t,i){let e=bo(t);return vr(e[Mn.TimeFormat],i)}function T0(t,i){let n=bo(t)[Mn.DateTimeFormat];return vr(n,i)}function Kr(t,i){let e=bo(t),n=e[Mn.NumberSymbols][i];if(typeof n>"u"){if(i===Ri.CurrencyDecimal)return e[Mn.NumberSymbols][Ri.Decimal];if(i===Ri.CurrencyGroup)return e[Mn.NumberSymbols][Ri.Group]}return n}function x_(t,i){return bo(t)[Mn.NumberFormats][i]}function HK(t){return bo(t)[Mn.Currencies]}function hk(t){if(!t[Mn.ExtraData])throw new he(2303,!1)}function gk(t){let i=bo(t);return hk(i),(i[Mn.ExtraData][2]||[]).map(n=>typeof n=="string"?m_(n):[m_(n[0]),m_(n[1])])}function _k(t,i,e){let n=bo(t);hk(n);let o=[n[Mn.ExtraData][0],n[Mn.ExtraData][1]],r=vr(o,i)||[];return vr(r,e)||[]}function vr(t,i){for(let e=i;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new he(2304,!1)}function m_(t){let[i,e]=t.split(":");return{hours:+i,minutes:+e}}function bk(t,i,e="en"){let n=HK(e)[t]||lk[t]||[],o=n[1];return i==="narrow"&&typeof o=="string"?o:n[0]||t}var UK=2;function vk(t){let i,e=lk[t];return e&&(i=e[2]),typeof i=="number"?i:UK}var $K=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,pp={},GK=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;function yk(t,i,e,n){let o=eX(t);i=fs(e,i)||i;let a=[],s;for(;i;)if(s=GK.exec(i),s){a=a.concat(s.slice(1));let f=a.pop();if(!f)break;i=f}else{a.push(i);break}let c=o.getTimezoneOffset();n&&(c=xk(n,c),o=JK(o,n));let u="";return a.forEach(f=>{let h=XK(f);u+=h?h(o,e,c):f==="''"?"'":f.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}function bp(t,i,e){let n=new Date(0);return n.setFullYear(t,i,e),n.setHours(0,0,0),n}function fs(t,i){let e=dk(t);if(pp[e]??={},pp[e][i])return pp[e][i];let n="";switch(i){case"shortDate":n=I0(t,Ro.Short);break;case"mediumDate":n=I0(t,Ro.Medium);break;case"longDate":n=I0(t,Ro.Long);break;case"fullDate":n=I0(t,Ro.Full);break;case"shortTime":n=O0(t,Ro.Short);break;case"mediumTime":n=O0(t,Ro.Medium);break;case"longTime":n=O0(t,Ro.Long);break;case"fullTime":n=O0(t,Ro.Full);break;case"short":let o=fs(t,"shortTime"),r=fs(t,"shortDate");n=fp(T0(t,Ro.Short),[o,r]);break;case"medium":let a=fs(t,"mediumTime"),s=fs(t,"mediumDate");n=fp(T0(t,Ro.Medium),[a,s]);break;case"long":let c=fs(t,"longTime"),u=fs(t,"longDate");n=fp(T0(t,Ro.Long),[c,u]);break;case"full":let f=fs(t,"fullTime"),h=fs(t,"fullDate");n=fp(T0(t,Ro.Full),[f,h]);break}return n&&(pp[e][i]=n),n}function fp(t,i){return i&&(t=t.replace(/\{([^}]+)}/g,function(e,n){return i!=null&&n in i?i[n]:e})),t}function Qr(t,i,e="-",n,o){let r="";(t<0||o&&t<=0)&&(o?t=-t+1:(t=-t,r=e));let a=String(t);for(;a.length0||s>-e)&&(s+=e),t===3)s===0&&e===-12&&(s=12);else if(t===6)return WK(s,i);let c=Kr(a,Ri.MinusSign);return Qr(s,i,c,n,o)}}function YK(t,i){switch(t){case 0:return i.getFullYear();case 1:return i.getMonth();case 2:return i.getDate();case 3:return i.getHours();case 4:return i.getMinutes();case 5:return i.getSeconds();case 6:return i.getMilliseconds();case 7:return i.getDay();default:throw new he(2301,!1)}}function _n(t,i,e=to.Format,n=!1){return function(o,r){return qK(o,r,t,i,e,n)}}function qK(t,i,e,n,o,r){switch(e){case 2:return pk(i,o,n)[t.getMonth()];case 1:return mk(i,o,n)[t.getDay()];case 0:let a=t.getHours(),s=t.getMinutes();if(r){let u=gk(i),f=_k(i,o,n),h=u.findIndex(y=>{if(Array.isArray(y)){let[x,S]=y,Y=a>=x.hours&&s>=x.minutes,Q=a0?Math.floor(o/60):Math.ceil(o/60);switch(t){case 0:return(o>=0?"+":"")+Qr(a,2,r)+Qr(Math.abs(o%60),2,r);case 1:return"GMT"+(o>=0?"+":"")+Qr(a,1,r);case 2:return"GMT"+(o>=0?"+":"")+Qr(a,2,r)+":"+Qr(Math.abs(o%60),2,r);case 3:return n===0?"Z":(o>=0?"+":"")+Qr(a,2,r)+":"+Qr(Math.abs(o%60),2,r);default:throw new he(2310,!1)}}}var QK=0,_p=4;function KK(t){let i=bp(t,QK,1).getDay();return bp(t,0,1+(i<=_p?_p:_p+7)-i)}function Ck(t){let i=t.getDay(),e=i===0?-3:_p-i;return bp(t.getFullYear(),t.getMonth(),t.getDate()+e)}function p_(t,i=!1){return function(e,n){let o;if(i){let r=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,a=e.getDate();o=1+Math.floor((a+r)/7)}else{let r=Ck(e),a=KK(r.getFullYear()),s=r.getTime()-a.getTime();o=1+Math.round(s/6048e5)}return Qr(o,t,Kr(n,Ri.MinusSign))}}function gp(t,i=!1){return function(e,n){let r=Ck(e).getFullYear();return Qr(r,t,Kr(n,Ri.MinusSign),i)}}var f_={};function XK(t){if(f_[t])return f_[t];let i;switch(t){case"G":case"GG":case"GGG":i=_n(3,rn.Abbreviated);break;case"GGGG":i=_n(3,rn.Wide);break;case"GGGGG":i=_n(3,rn.Narrow);break;case"y":i=ci(0,1,0,!1,!0);break;case"yy":i=ci(0,2,0,!0,!0);break;case"yyy":i=ci(0,3,0,!1,!0);break;case"yyyy":i=ci(0,4,0,!1,!0);break;case"Y":i=gp(1);break;case"YY":i=gp(2,!0);break;case"YYY":i=gp(3);break;case"YYYY":i=gp(4);break;case"M":case"L":i=ci(1,1,1);break;case"MM":case"LL":i=ci(1,2,1);break;case"MMM":i=_n(2,rn.Abbreviated);break;case"MMMM":i=_n(2,rn.Wide);break;case"MMMMM":i=_n(2,rn.Narrow);break;case"LLL":i=_n(2,rn.Abbreviated,to.Standalone);break;case"LLLL":i=_n(2,rn.Wide,to.Standalone);break;case"LLLLL":i=_n(2,rn.Narrow,to.Standalone);break;case"w":i=p_(1);break;case"ww":i=p_(2);break;case"W":i=p_(1,!0);break;case"d":i=ci(2,1);break;case"dd":i=ci(2,2);break;case"c":case"cc":i=ci(7,1);break;case"ccc":i=_n(1,rn.Abbreviated,to.Standalone);break;case"cccc":i=_n(1,rn.Wide,to.Standalone);break;case"ccccc":i=_n(1,rn.Narrow,to.Standalone);break;case"cccccc":i=_n(1,rn.Short,to.Standalone);break;case"E":case"EE":case"EEE":i=_n(1,rn.Abbreviated);break;case"EEEE":i=_n(1,rn.Wide);break;case"EEEEE":i=_n(1,rn.Narrow);break;case"EEEEEE":i=_n(1,rn.Short);break;case"a":case"aa":case"aaa":i=_n(0,rn.Abbreviated);break;case"aaaa":i=_n(0,rn.Wide);break;case"aaaaa":i=_n(0,rn.Narrow);break;case"b":case"bb":case"bbb":i=_n(0,rn.Abbreviated,to.Standalone,!0);break;case"bbbb":i=_n(0,rn.Wide,to.Standalone,!0);break;case"bbbbb":i=_n(0,rn.Narrow,to.Standalone,!0);break;case"B":case"BB":case"BBB":i=_n(0,rn.Abbreviated,to.Format,!0);break;case"BBBB":i=_n(0,rn.Wide,to.Format,!0);break;case"BBBBB":i=_n(0,rn.Narrow,to.Format,!0);break;case"h":i=ci(3,1,-12);break;case"hh":i=ci(3,2,-12);break;case"H":i=ci(3,1);break;case"HH":i=ci(3,2);break;case"m":i=ci(4,1);break;case"mm":i=ci(4,2);break;case"s":i=ci(5,1);break;case"ss":i=ci(5,2);break;case"S":i=ci(6,1);break;case"SS":i=ci(6,2);break;case"SSS":i=ci(6,3);break;case"Z":case"ZZ":case"ZZZ":i=hp(0);break;case"ZZZZZ":i=hp(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=hp(1);break;case"OOOO":case"ZZZZ":case"zzzz":i=hp(2);break;default:return null}return f_[t]=i,i}function xk(t,i){t=t.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?i:e}function ZK(t,i){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+i),t}function JK(t,i,e){let o=t.getTimezoneOffset(),r=xk(i,o);return ZK(t,-1*(r-o))}function eX(t){if(nk(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[o,r=1,a=1]=t.split("-").map(s=>+s);return bp(o,r-1,a)}let e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let n;if(n=t.match($K))return tX(n)}let i=new Date(t);if(!nk(i))throw new he(2311,!1);return i}function tX(t){let i=new Date(0),e=0,n=0,o=t[8]?i.setUTCFullYear:i.setFullYear,r=t[8]?i.setUTCHours:i.setHours;t[9]&&(e=Number(t[9]+t[10]),n=Number(t[9]+t[11])),o.call(i,Number(t[1]),Number(t[2])-1,Number(t[3]));let a=Number(t[4]||0)-e,s=Number(t[5]||0)-n,c=Number(t[6]||0),u=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return r.call(i,a,s,c,u),i}function nk(t){return t instanceof Date&&!isNaN(t.valueOf())}var nX=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ik=22,vp=".",P0="0",iX=";",oX=",",h_="#",ok="\xA4";function Mk(t,i,e,n,o,r,a=!1){let s="",c=!1;if(!isFinite(t))s=Kr(e,Ri.Infinity);else{let u=aX(t);a&&(u=rX(u));let f=i.minInt,h=i.minFrac,y=i.maxFrac;if(r){let pe=r.match(nX);if(pe===null)throw new he(2306,!1);let mt=pe[1],Et=pe[3],Ht=pe[5];mt!=null&&(f=g_(mt)),Et!=null&&(h=g_(Et)),Ht!=null?y=g_(Ht):Et!=null&&h>y&&(y=h)}sX(u,h,y);let x=u.digits,S=u.integerLen,Y=u.exponent,Q=[];for(c=x.every(pe=>!pe);S0?Q=x.splice(S,x.length):(Q=x,x=[0]);let X=[];for(x.length>=i.lgSize&&X.unshift(x.splice(-i.lgSize,x.length).join(""));x.length>i.gSize;)X.unshift(x.splice(-i.gSize,x.length).join(""));x.length&&X.unshift(x.join("")),s=X.join(Kr(e,n)),Q.length&&(s+=Kr(e,o)+Q.join("")),Y&&(s+=Kr(e,Ri.Exponential)+"+"+Y)}return t<0&&!c?s=i.negPre+s+i.negSuf:s=i.posPre+s+i.posSuf,s}function Mp(t,i,e,n,o){let r=x_(i,xp.Currency),a=Dk(r,Kr(i,Ri.MinusSign));return a.minFrac=vk(n),a.maxFrac=a.minFrac,Mk(t,a,i,Ri.CurrencyGroup,Ri.CurrencyDecimal,o).replace(ok,e).replace(ok,"").trim()}function wk(t,i,e){let n=x_(i,xp.Decimal),o=Dk(n,Kr(i,Ri.MinusSign));return Mk(t,o,i,Ri.Group,Ri.Decimal,e)}function Dk(t,i="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(iX),o=n[0],r=n[1],a=o.indexOf(vp)!==-1?o.split(vp):[o.substring(0,o.lastIndexOf(P0)+1),o.substring(o.lastIndexOf(P0)+1)],s=a[0],c=a[1]||"";e.posPre=s.substring(0,s.indexOf(h_));for(let f=0;f-1&&(i=i.replace(vp,"")),(r=i.search(/e/i))>0?(o<0&&(o=r),o+=+i.slice(r+1),i=i.substring(0,r)):o<0&&(o=i.length),r=0;i.charAt(r)===P0;r++);if(r===(s=i.length))n=[0],o=1;else{for(s--;i.charAt(s)===P0;)s--;for(o-=r,n=[],a=0;r<=s;r++,a++)n[a]=Number(i.charAt(r))}return o>ik&&(n=n.splice(0,ik-1),e=o-1,o=1),{digits:n,exponent:e,integerLen:o}}function sX(t,i,e){if(i>e)throw new he(2307,!1);let n=t.digits,o=n.length-t.integerLen,r=Math.min(Math.max(i,o),e),a=r+t.integerLen,s=n[a];if(a>0){n.splice(Math.max(t.integerLen,a));for(let h=a;h=5)if(a-1<0){for(let h=0;h>a;h--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[a-1]++;for(;o=u?S.pop():c=!1),y>=10?1:0},0);f&&(n.unshift(f),t.integerLen++)}function g_(t){let i=parseInt(t);if(isNaN(i))throw new he(2305,!1);return i}var __=/\s+/,rk=[],Kn=(()=>{class t{_ngEl;_renderer;initialClasses=rk;rawClass;stateMap=new Map;constructor(e,n){this._ngEl=e,this._renderer=n}set klass(e){this.initialClasses=e!=null?e.trim().split(__):rk}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(__):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let o=this.stateMap.get(e);o!==void 0?(o.enabled!==n&&(o.changed=!0,o.enabled=n),o.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],o=e[1];o.changed?(this._toggleClass(n,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),o.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(__).forEach(o=>{n?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}static \u0275fac=function(n){return new(n||t)(Me(Z),Me(tt))};static \u0275dir=R({type:t,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return t})();var yp=class{$implicit;ngForOf;index;count;constructor(i,e,n,o){this.$implicit=i,this.ngForOf=e,this.index=n,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Sk=(()=>{class t{_viewContainer;_template;_differs;set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}_ngForOf=null;_ngForOfDirty=!0;_differ=null;_trackByFn;constructor(e,n,o){this._viewContainer=e,this._template=n,this._differs=o}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let n=this._viewContainer;e.forEachOperation((o,r,a)=>{if(o.previousIndex==null)n.createEmbeddedView(this._template,new yp(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)n.remove(r===null?void 0:r);else if(r!==null){let s=n.get(r);n.move(s,a),ak(s,o)}});for(let o=0,r=n.length;o{let r=n.get(o.currentIndex);ak(r,o)})}static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||t)(Me(ft),Me(rt),Me(Xo))};static \u0275dir=R({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}})}return t})();function ak(t,i){t.context.$implicit=i.item}var cX=(()=>{class t{_viewContainer;_context=new Cp;_thenTemplateRef=null;_elseTemplateRef=null;_thenViewRef=null;_elseViewRef=null;constructor(e,n){this._viewContainer=e,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){sk(e,!1),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){sk(e,!1),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngIfUseIfTypeGuard;static ngTemplateGuard_ngIf;static ngTemplateContextGuard(e,n){return!0}static \u0275fac=function(n){return new(n||t)(Me(ft),Me(rt))};static \u0275dir=R({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}})}return t})(),Cp=class{$implicit=null;ngIf=null};function sk(t,i){if(t&&!t.createEmbeddedView)throw new he(2020,!1)}var b_=class{_viewContainerRef;_templateRef;_created=!1;constructor(i,e){this._viewContainerRef=i,this._templateRef=e}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(i){i&&!this._created?this.create():!i&&this._created&&this.destroy()}},kk=(()=>{class t{_defaultViews=[];_defaultUsed=!1;_caseCount=0;_lastCaseCheckIndex=0;_lastCasesMatched=!1;_ngSwitch;set ngSwitch(e){this._ngSwitch=e,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let n=e===this._ngSwitch;return this._lastCasesMatched||=n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let n of this._defaultViews)n.enforceState(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}})}return t})(),lX=(()=>{class t{ngSwitch;_view;ngSwitchCase;constructor(e,n,o){this.ngSwitch=o,o._addCase(),this._view=new b_(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static \u0275fac=function(n){return new(n||t)(Me(ft),Me(rt),Me(kk,9))};static \u0275dir=R({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}})}return t})();var L0=(()=>{class t{_ngEl;_differs;_renderer;_ngStyle=null;_differ=null;constructor(e,n,o){this._ngEl=e,this._differs=n,this._renderer=o}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){let[o,r]=e.split("."),a=o.indexOf("-")===-1?void 0:$r.DashCase;n!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,r?`${n}${r}`:n,a):this._renderer.removeStyle(this._ngEl.nativeElement,o,a)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}static \u0275fac=function(n){return new(n||t)(Me(Z),Me(cp),Me(tt))};static \u0275dir=R({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}})}return t})(),ec=(()=>{class t{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,o):!1,get:(e,n,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,o)}})}static \u0275fac=function(n){return new(n||t)(Me(ft))};static \u0275dir=R({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[Ne]})}return t})();function nd(t,i){return new he(2100,!1)}var v_=class{createSubscription(i,e,n){return Yn(()=>i.subscribe({next:e,error:n}))}dispose(i){Yn(()=>i.unsubscribe())}},y_=class{createSubscription(i,e,n){return i.then(o=>e?.(o),o=>n?.(o)),{unsubscribe:()=>{e=null,n=null}}}dispose(i){i.unsubscribe()}},dX=new y_,uX=new v_,A0=(()=>{class t{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=d(go);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n),n=>this.applicationErrorHandler(n))}_selectStrategy(e){if(ms(e))return dX;if(q4(e))return uX;throw nd(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(n){return new(n||t)(Me(we,16))};static \u0275pipe=wt({name:"async",type:t,pure:!1})}return t})(),mX=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw nd(t,e);return e.toLowerCase()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=wt({name:"lowercase",type:t,pure:!0})}return t})(),pX=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,M_=(()=>{class t{transform(e){if(e==null)return null;if(typeof e!="string")throw nd(t,e);return e.replace(pX,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=wt({name:"titlecase",type:t,pure:!0})}return t})();var fX="mediumDate",Ek=new L(""),Ik=new L(""),id=(()=>{class t{locale;defaultTimezone;defaultOptions;constructor(e,n,o){this.locale=e,this.defaultTimezone=n,this.defaultOptions=o}transform(e,n,o,r){if(e==null||e===""||e!==e)return null;try{let a=n??this.defaultOptions?.dateFormat??fX,s=o??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return yk(e,a,r||this.locale,s)}catch(a){throw nd(t,a.message)}}static \u0275fac=function(n){return new(n||t)(Me(Wr,16),Me(Ek,24),Me(Ik,24))};static \u0275pipe=wt({name:"date",type:t,pure:!0})}return t})();function hX(t,i){return{key:t,value:i}}var gX=(()=>{class t{differs;constructor(e){this.differs=e}differ;keyValues=[];compareFn=ck;transform(e,n=ck){if(!e||!(e instanceof Map)&&typeof e!="object")return null;this.differ??=this.differs.find(e).create();let o=this.differ.diff(e),r=n!==this.compareFn;return o&&(this.keyValues=[],o.forEachItem(a=>{this.keyValues.push(hX(a.key,a.currentValue))})),(o||r)&&(n&&this.keyValues.sort(n),this.compareFn=n),this.keyValues}static \u0275fac=function(n){return new(n||t)(Me(cp,16))};static \u0275pipe=wt({name:"keyvalue",type:t,pure:!1})}return t})();function ck(t,i){let e=t.key,n=i.key;if(e===n)return 0;if(e==null)return 1;if(n==null)return-1;if(typeof e=="string"&&typeof n=="string")return e{class t{_locale;constructor(e){this._locale=e}transform(e,n,o){if(!Ok(e))return null;o||=this._locale;try{let r=Tk(e);return wk(r,o,n)}catch(r){throw nd(t,r.message)}}static \u0275fac=function(n){return new(n||t)(Me(Wr,16))};static \u0275pipe=wt({name:"number",type:t,pure:!0})}return t})();var w_=(()=>{class t{_locale;_defaultCurrencyCode;constructor(e,n="USD"){this._locale=e,this._defaultCurrencyCode=n}transform(e,n=this._defaultCurrencyCode,o="symbol",r,a){if(!Ok(e))return null;a||=this._locale,typeof o=="boolean"&&(o=o?"symbol":"code");let s=n||this._defaultCurrencyCode;o!=="code"&&(o==="symbol"||o==="symbol-narrow"?s=bk(s,o==="symbol"?"wide":"narrow",a):s=o);try{let c=Tk(e);return Mp(c,a,s,n,r)}catch(c){throw nd(t,c.message)}}static \u0275fac=function(n){return new(n||t)(Me(Wr,16),Me(K7,16))};static \u0275pipe=wt({name:"currency",type:t,pure:!0})}return t})();function Ok(t){return!(t==null||t===""||t!==t)}function Tk(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new he(2309,!1);return t}var fe=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();function z0(t,i){i=encodeURIComponent(i);for(let e of t.split(";")){let n=e.indexOf("="),[o,r]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(o.trim()===i)return decodeURIComponent(r)}return null}var _l=class{};function yMe(t,i,e){return $7(t,i,e)}var S_="browser";function Pk(t){return t===S_}var Lk=(()=>{class t{static \u0275prov=z({token:t,providedIn:"root",factory:()=>new D_(d(De),window)})}return t})(),D_=class{document;window;offset=()=>[0,0];constructor(i,e){this.document=i,this.window=e}setOffset(i){Array.isArray(i)?this.offset=()=>i:this.offset=i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i,e){this.window.scrollTo(Re(q({},e),{left:i[0],top:i[1]}))}scrollToAnchor(i,e){let n=_X(this.document,i);n&&(this.scrollToElement(n,e),n.focus())}setHistoryScrollRestoration(i){try{this.window.history.scrollRestoration=i}catch{console.warn(dr(2400,!1))}}scrollToElement(i,e){let n=i.getBoundingClientRect(),o=n.left+this.window.pageXOffset,r=n.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo(Re(q({},e),{left:o-a[0],top:r-a[1]}))}};function _X(t,i){let e=t.getElementById(i)||t.getElementsByName(i)[0];if(e)return e;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),o=n.currentNode;for(;o;){let r=o.shadowRoot;if(r){let a=r.getElementById(i)||r.querySelector(`[name="${i}"]`);if(a)return a}o=n.nextNode()}}return null}var N0=class{_doc;constructor(i){this._doc=i}manager},wp=(()=>{class t extends N0{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,o,r){return e.addEventListener(n,o,r),()=>this.removeEventListener(e,n,o,r)}removeEventListener(e,n,o,r){return e.removeEventListener(n,o,r)}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Sp=new L(""),T_=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(a=>{a.manager=this});let o=e.filter(a=>!(a instanceof wp));this._plugins=o.slice().reverse();let r=e.find(a=>a instanceof wp);r&&this._plugins.push(r)}addEventListener(e,n,o,r){return this._findPluginFor(n).addEventListener(e,n,o,r)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(r=>r.supports(e)),!n)throw new he(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||t)(be(Sp),be(ce))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),k_="ng-app-id";function Ak(t){for(let i of t)i.remove()}function Rk(t,i){let e=i.createElement("style");return e.textContent=t,e}function bX(t,i,e,n){let o=t.head?.querySelectorAll(`style[${k_}="${i}"],link[${k_}="${i}"]`);if(o)for(let r of o)r.removeAttribute(k_),r instanceof HTMLLinkElement?n.set(r.href.slice(r.href.lastIndexOf("/")+1),{usage:0,elements:[r]}):r.textContent&&e.set(r.textContent,{usage:0,elements:[r]})}function I_(t,i){let e=i.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var P_=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,o,r={}){this.doc=e,this.appId=n,this.nonce=o,bX(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let o of e)this.addUsage(o,this.inline,Rk);n?.forEach(o=>this.addUsage(o,this.external,I_))}removeStyles(e,n){for(let o of e)this.removeUsage(o,this.inline);n?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,n,o){let r=n.get(e);r?r.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(a=>this.addElement(a,o(e,this.doc)))})}removeUsage(e,n){let o=n.get(e);o&&(o.usage--,o.usage<=0&&(Ak(o.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Ak(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:o}]of this.inline)o.push(this.addElement(e,Rk(n,this.doc)));for(let[n,{elements:o}]of this.external)o.push(this.addElement(e,I_(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||t)(be(De),be(Xs),be(W1,8),be(pl))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),E_={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"},L_=/%COMP%/g;var Nk="%COMP%",vX=`_nghost-${Nk}`,yX=`_ngcontent-${Nk}`,CX=!0,xX=new L("",{providedIn:"root",factory:()=>CX});function MX(t){return yX.replace(L_,t)}function wX(t){return vX.replace(L_,t)}function Fk(t,i){return i.map(e=>e.replace(L_,t))}var A_=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,o,r,a,s,c=null,u=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestroy=r,this.doc=a,this.ngZone=s,this.nonce=c,this.tracingService=u,this.platformIsServer=!1,this.defaultRenderer=new F0(e,a,s,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,n);return o instanceof Dp?o.applyToHost(e):o instanceof V0&&o.applyStyles(),o}getOrCreateRenderer(e,n){let o=this.rendererByCompId,r=o.get(n.id);if(!r){let a=this.doc,s=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,f=this.removeStylesOnCompDestroy,h=this.platformIsServer,y=this.tracingService;switch(n.encapsulation){case ls.Emulated:r=new Dp(c,u,n,this.appId,f,a,s,h,y);break;case ls.ShadowDom:return new O_(c,u,e,n,a,s,this.nonce,h,y);default:r=new V0(c,u,n,f,a,s,h,y);break}o.set(n.id,r)}return r}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||t)(be(T_),be(P_),be(Xs),be(xX),be(De),be(ce),be(W1),be(Zs,8))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),F0=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(i,e,n,o,r){this.eventManager=i,this.doc=e,this.ngZone=n,this.platformIsServer=o,this.tracingService=r}destroy(){}destroyNode=null;createElement(i,e){return e?this.doc.createElementNS(E_[e]||e,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,e){(zk(i)?i.content:i).appendChild(e)}insertBefore(i,e,n){i&&(zk(i)?i.content:i).insertBefore(e,n)}removeChild(i,e){e.remove()}selectRootElement(i,e){let n=typeof i=="string"?this.doc.querySelector(i):i;if(!n)throw new he(-5104,!1);return e||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,e,n,o){if(o){e=o+":"+e;let r=E_[o];r?i.setAttributeNS(r,e,n):i.setAttribute(e,n)}else i.setAttribute(e,n)}removeAttribute(i,e,n){if(n){let o=E_[n];o?i.removeAttributeNS(o,e):i.removeAttribute(`${n}:${e}`)}else i.removeAttribute(e)}addClass(i,e){i.classList.add(e)}removeClass(i,e){i.classList.remove(e)}setStyle(i,e,n,o){o&($r.DashCase|$r.Important)?i.style.setProperty(e,n,o&$r.Important?"important":""):i.style[e]=n}removeStyle(i,e,n){n&$r.DashCase?i.style.removeProperty(e):i.style[e]=""}setProperty(i,e,n){i!=null&&(i[e]=n)}setValue(i,e){i.nodeValue=e}listen(i,e,n,o){if(typeof i=="string"&&(i=Zo().getGlobalEventTarget(this.doc,i),!i))throw new he(5102,!1);let r=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(r=this.tracingService.wrapEventListener(i,e,r)),this.eventManager.addEventListener(i,e,r,o)}decoratePreventDefault(i){return e=>{if(e==="__ngUnwrap__")return i;i(e)===!1&&e.preventDefault()}}};function zk(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var O_=class extends F0{sharedStylesHost;hostEl;shadowRoot;constructor(i,e,n,o,r,a,s,c,u){super(i,r,a,c,u),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let f=o.styles;f=Fk(o.id,f);for(let y of f){let x=document.createElement("style");s&&x.setAttribute("nonce",s),x.textContent=y,this.shadowRoot.appendChild(x)}let h=o.getExternalStyles?.();if(h)for(let y of h){let x=I_(y,r);s&&x.setAttribute("nonce",s),this.shadowRoot.appendChild(x)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,e){return super.appendChild(this.nodeOrShadowRoot(i),e)}insertBefore(i,e,n){return super.insertBefore(this.nodeOrShadowRoot(i),e,n)}removeChild(i,e){return super.removeChild(null,e)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},V0=class extends F0{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(i,e,n,o,r,a,s,c,u){super(i,r,a,s,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let f=n.styles;this.styles=u?Fk(u,f):f,this.styleUrls=n.getExternalStyles?.(u)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&ul.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Dp=class extends V0{contentAttr;hostAttr;constructor(i,e,n,o,r,a,s,c,u){let f=o+"-"+n.id;super(i,e,n,r,a,s,c,u,f),this.contentAttr=MX(f),this.hostAttr=wX(f)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,e){let n=super.createElement(i,e);return super.setAttribute(n,this.contentAttr,""),n}};var kp=class t extends k0{supportsDOMEvents=!0;static makeCurrent(){d_(new t)}onAndCancel(i,e,n,o){return i.addEventListener(e,n,o),()=>{i.removeEventListener(e,n,o)}}dispatchEvent(i,e){i.dispatchEvent(e)}remove(i){i.remove()}createElement(i,e){return e=e||this.getDefaultDocument(),e.createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,e){return e==="window"?window:e==="document"?i:e==="body"?i.body:null}getBaseHref(i){let e=DX();return e==null?null:SX(e)}resetBaseElement(){B0=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return z0(document.cookie,i)}},B0=null;function DX(){return B0=B0||document.head.querySelector("base"),B0?B0.getAttribute("href"):null}function SX(t){return new URL(t,document.baseURI).pathname}var Ep=class{addToWindow(i){oi.getAngularTestability=(n,o=!0)=>{let r=i.findTestabilityInTree(n,o);if(r==null)throw new he(5103,!1);return r},oi.getAllAngularTestabilities=()=>i.getAllTestabilities(),oi.getAllAngularRootElements=()=>i.getAllRootElements();let e=n=>{let o=oi.getAllAngularTestabilities(),r=o.length,a=function(){r--,r==0&&n()};o.forEach(s=>{s.whenStable(a)})};oi.frameworkStabilizers||(oi.frameworkStabilizers=[]),oi.frameworkStabilizers.push(e)}findTestabilityInTree(i,e,n){if(e==null)return null;let o=i.getTestability(e);return o??(n?Zo().isShadowRoot(e)?this.findTestabilityInTree(i,e.host,!0):this.findTestabilityInTree(i,e.parentElement,!0):null)}},kX=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Vk=["alt","control","meta","shift"],EX={"\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"},IX={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},Bk=(()=>{class t extends N0{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,n,o,r){let a=t.parseEventName(n),s=t.eventCallback(a.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Zo().onAndCancel(e,a.domEventName,s,r))}static parseEventName(e){let n=e.toLowerCase().split("."),o=n.shift();if(n.length===0||!(o==="keydown"||o==="keyup"))return null;let r=t._normalizeKey(n.pop()),a="",s=n.indexOf("code");if(s>-1&&(n.splice(s,1),a="code."),Vk.forEach(u=>{let f=n.indexOf(u);f>-1&&(n.splice(f,1),a+=u+".")}),a+=r,n.length!=0||r.length===0)return null;let c={};return c.domEventName=o,c.fullKey=a,c}static matchEventFullKeyCode(e,n){let o=EX[e.key]||e.key,r="";return n.indexOf("code.")>-1&&(o=e.code,r="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Vk.forEach(a=>{if(a!==o){let s=IX[a];s(e)&&(r+=a+".")}}),r+=o,r===n)}static eventCallback(e,n,o){return r=>{t.matchEventFullKeyCode(r,e)&&o.runGuarded(()=>n(r))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();function OX(){kp.makeCurrent()}function TX(){return new Di}function PX(){return i7(document),document}var LX=[{provide:pl,useValue:S_},{provide:O4,useValue:OX,multi:!0},{provide:De,useFactory:PX}],AX=c_(YS,"browser",LX);var RX=[{provide:K1,useClass:Ep},{provide:Y4,useClass:C0,deps:[ce,x0,K1]},{provide:C0,useClass:C0,deps:[ce,x0,K1]}],zX=[{provide:G2,useValue:"root"},{provide:Di,useFactory:TX},{provide:Sp,useClass:wp,multi:!0,deps:[De]},{provide:Sp,useClass:Bk,multi:!0,deps:[De]},A_,P_,T_,{provide:Nn,useExisting:A_},{provide:_l,useClass:kX},[]],NX=(()=>{class t{constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({providers:[...zX,...RX],imports:[fe,qS]})}return t})();var ad=class{},j0=class{},ki=class t{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(i){i?typeof i=="string"?this.lazyInit=()=>{this.headers=new Map,i.split(` -`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),r=e.slice(n+1).trim();this.addHeaderEntry(o,r)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(i.name,e);let o=(i.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let r=i.value;if(!r)this.headers.delete(e),this.normalizedNames.delete(e);else{let a=this.headers.get(e);if(!a)return;a=a.filter(s=>r.indexOf(s)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(i,e){let n=i.toLowerCase();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(i,e){let n=(Array.isArray(e)?e:[e]).map(r=>r.toString()),o=i.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(i,o)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var Op=class{encodeKey(i){return jk(i)}encodeValue(i){return jk(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function FX(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let r=o.indexOf("="),[a,s]=r==-1?[i.decodeKey(o),""]:[i.decodeKey(o.slice(0,r)),i.decodeValue(o.slice(r+1))],c=e.get(a)||[];c.push(s),e.set(a,c)}),e}var VX=/%(\d[a-f0-9])/gi,BX={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function jk(t){return encodeURIComponent(t).replace(VX,(i,e)=>BX[e]??i)}function Ip(t){return`${t}`}var te=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Op,i.fromString){if(i.fromObject)throw new he(2805,!1);this.map=FX(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let n=i.fromObject[e],o=Array.isArray(n)?n.map(Ip):[Ip(n)];this.map.set(e,o)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];return Object.keys(i).forEach(n=>{let o=i[n];Array.isArray(o)?o.forEach(r=>{e.push({param:n,value:r,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Ip(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let n=this.map.get(i.param)||[],o=n.indexOf(Ip(i.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};var Tp=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}};function jX(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Hk(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Uk(t){return typeof Blob<"u"&&t instanceof Blob}function $k(t){return typeof FormData<"u"&&t instanceof FormData}function HX(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Gk="Content-Type",Wk="Accept",qk="X-Request-URL",Qk="text/plain",Kk="application/json",UX=`${Kk}, ${Qk}, */*`,od=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(i,e,n,o){this.url=e,this.method=i.toUpperCase();let r;if(jX(this.method)||o?(this.body=n!==void 0?n:null,r=o):r=n,r){if(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,this.keepalive=!!r.keepalive,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),r.priority&&(this.priority=r.priority),r.cache&&(this.cache=r.cache),r.credentials&&(this.credentials=r.credentials),typeof r.timeout=="number"){if(r.timeout<1||!Number.isInteger(r.timeout))throw new he(2822,"");this.timeout=r.timeout}r.mode&&(this.mode=r.mode),r.redirect&&(this.redirect=r.redirect),r.integrity&&(this.integrity=r.integrity),r.referrer&&(this.referrer=r.referrer),this.transferCache=r.transferCache}if(this.headers??=new ki,this.context??=new Tp,!this.params)this.params=new te,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let s=e.indexOf("?"),c=s===-1?"?":sHt.set(nn,i.setHeaders[nn]),pe)),i.setParams&&(mt=Object.keys(i.setParams).reduce((Ht,nn)=>Ht.set(nn,i.setParams[nn]),mt)),new t(e,n,Y,{params:mt,headers:pe,context:Et,reportProgress:X,responseType:o,withCredentials:Q,transferCache:x,keepalive:r,cache:s,priority:a,timeout:S,mode:c,redirect:u,credentials:f,referrer:h,integrity:y})}},bl=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(bl||{}),sd=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new ki,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.redirected=i.redirected,this.ok=this.status>=200&&this.status<300}},Pp=class t extends sd{constructor(i={}){super(i)}type=bl.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},H0=class t extends sd{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=bl.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0,redirected:i.redirected??this.redirected})}},rd=class extends sd{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},$X=200,GX=204;function R_(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer}}var Ln=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let r;if(e instanceof od)r=e;else{let c;o.headers instanceof ki?c=o.headers:c=new ki(o.headers);let u;o.params&&(o.params instanceof te?u=o.params:u=new te({fromObject:o.params})),r=new od(e,n,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let a=ne(r).pipe(po(c=>this.handler.handle(c)));if(e instanceof od||o.observe==="events")return a;let s=a.pipe(Oe(c=>c instanceof H0));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new he(2806,!1);return c.body}));case"blob":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new he(2807,!1);return c.body}));case"text":return s.pipe(le(c=>{if(c.body!==null&&typeof c.body!="string")throw new he(2808,!1);return c.body}));case"json":default:return s.pipe(le(c=>c.body))}case"response":return s;default:throw new he(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new te().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,R_(o,n))}post(e,n,o={}){return this.request("POST",e,R_(o,n))}put(e,n,o={}){return this.request("PUT",e,R_(o,n))}static \u0275fac=function(n){return new(n||t)(be(ad))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var WX=new L("");function Xk(t,i){return i(t)}function YX(t,i){return(e,n)=>i.intercept(e,{handle:o=>t(o,n)})}function qX(t,i,e){return(n,o)=>Si(e,()=>i(n,r=>t(r,o)))}var Ap=new L(""),N_=new L(""),Zk=new L(""),F_=new L("",{providedIn:"root",factory:()=>!0});function QX(){let t=null;return(i,e)=>{t===null&&(t=(d(Ap,{optional:!0})??[]).reduceRight(YX,Xk));let n=d(z1);if(d(F_)){let r=n.add();return t(i,e).pipe(Nr(r))}else return t(i,e)}}var Lp=(()=>{class t extends ad{backend;injector;chain=null;pendingTasks=d(z1);contributeToStability=d(F_);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(N_),...this.injector.get(Zk,[])]));this.chain=n.reduceRight((o,r)=>qX(o,r,this.injector),Xk)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Nr(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(be(j0),be(Jt))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var KX=/^\)\]\}',?\n/,XX=RegExp(`^${qk}:`,"m");function ZX(t){return"responseURL"in t&&t.responseURL?t.responseURL:XX.test(t.getAllResponseHeaders())?t.getResponseHeader(qk):null}var z_=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new he(-2800,!1);let n=this.xhrFactory;return ne(null).pipe(at(()=>new Fe(r=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((Q,X)=>a.setRequestHeader(Q,X.join(","))),e.headers.has(Wk)||a.setRequestHeader(Wk,UX),!e.headers.has(Gk)){let Q=e.detectContentTypeHeader();Q!==null&&a.setRequestHeader(Gk,Q)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let Q=e.responseType.toLowerCase();a.responseType=Q!=="json"?Q:"text"}let s=e.serializeBody(),c=null,u=()=>{if(c!==null)return c;let Q=a.statusText||"OK",X=new ki(a.getAllResponseHeaders()),pe=ZX(a)||e.url;return c=new Pp({headers:X,status:a.status,statusText:Q,url:pe}),c},f=()=>{let{headers:Q,status:X,statusText:pe,url:mt}=u(),Et=null;X!==GX&&(Et=typeof a.response>"u"?a.responseText:a.response),X===0&&(X=Et?$X:0);let Ht=X>=200&&X<300;if(e.responseType==="json"&&typeof Et=="string"){let nn=Et;Et=Et.replace(KX,"");try{Et=Et!==""?JSON.parse(Et):null}catch(ar){Et=nn,Ht&&(Ht=!1,Et={error:ar,text:Et})}}Ht?(r.next(new H0({body:Et,headers:Q,status:X,statusText:pe,url:mt||void 0})),r.complete()):r.error(new rd({error:Et,headers:Q,status:X,statusText:pe,url:mt||void 0}))},h=Q=>{let{url:X}=u(),pe=new rd({error:Q,status:a.status||0,statusText:a.statusText||"Unknown Error",url:X||void 0});r.error(pe)},y=h;e.timeout&&(y=Q=>{let{url:X}=u(),pe=new rd({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:X||void 0});r.error(pe)});let x=!1,S=Q=>{x||(r.next(u()),x=!0);let X={type:bl.DownloadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),e.responseType==="text"&&a.responseText&&(X.partialText=a.responseText),r.next(X)},Y=Q=>{let X={type:bl.UploadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),r.next(X)};return a.addEventListener("load",f),a.addEventListener("error",h),a.addEventListener("timeout",y),a.addEventListener("abort",h),e.reportProgress&&(a.addEventListener("progress",S),s!==null&&a.upload&&a.upload.addEventListener("progress",Y)),a.send(s),r.next({type:bl.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",f),a.removeEventListener("timeout",y),e.reportProgress&&(a.removeEventListener("progress",S),s!==null&&a.upload&&a.upload.removeEventListener("progress",Y)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(be(_l))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Jk=new L(""),JX="XSRF-TOKEN",eZ=new L("",{providedIn:"root",factory:()=>JX}),tZ="X-XSRF-TOKEN",nZ=new L("",{providedIn:"root",factory:()=>tZ}),U0=class{},iZ=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=z0(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(be(De),be(eZ))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),oZ=/^(?:https?:)?\/\//i;function rZ(t,i){if(!d(Jk)||t.method==="GET"||t.method==="HEAD"||oZ.test(t.url))return i(t);let e=d(U0).getToken(),n=d(nZ);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var V_=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(V_||{});function aZ(t,i){return{\u0275kind:t,\u0275providers:i}}function sZ(...t){let i=[Ln,z_,Lp,{provide:ad,useExisting:Lp},{provide:j0,useFactory:()=>d(WX,{optional:!0})??d(z_)},{provide:N_,useValue:rZ,multi:!0},{provide:Jk,useValue:!0},{provide:U0,useClass:iZ}];for(let e of t)i.push(...e.\u0275providers);return ha(i)}var Yk=new L("");function cZ(){return aZ(V_.LegacyInterceptors,[{provide:Yk,useFactory:QX},{provide:N_,useExisting:Yk,multi:!0}])}var tE=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=be(lZ),o},providedIn:"root"})}return t})(),lZ=(()=>{class t extends hs{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Wn.NONE:return n;case Wn.HTML:return Da(n,"HTML")?Yo(n):A4(this._doc,String(n)).toString();case Wn.STYLE:return Da(n,"Style")?Yo(n):n;case Wn.SCRIPT:if(Da(n,"Script"))return Yo(n);throw new he(5200,!1);case Wn.URL:return Da(n,"URL")?Yo(n):f0(String(n));case Wn.RESOURCE_URL:if(Da(n,"ResourceURL"))return Yo(n);throw new he(5201,!1);default:throw new he(5202,!1)}}bypassSecurityTrustHtml(e){return a7(e)}bypassSecurityTrustStyle(e){return s7(e)}bypassSecurityTrustScript(e){return c7(e)}bypassSecurityTrustUrl(e){return l7(e)}bypassSecurityTrustResourceUrl(e){return d7(e)}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var cd=class{},iE=(()=>{class t extends cd{getTranslation(e){return ne({})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),G0=class{},oE=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();function zp(t,i){if(t===i)return!0;if(t===null||i===null)return!1;if(t!==t&&i!==i)return!0;let e=typeof t,n=typeof i,o,r,a;if(e==n&&e=="object")if(Array.isArray(t)){if(!Array.isArray(i))return!1;if((o=t.length)==i.length){for(r=0;r{Y0(i[n])?n in t?e[n]=B_(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e):B_({},i)}function j_(t,i){let e=i.split(".");i="";do i+=e.shift(),tc(t)&&tc(t[i])&&(Y0(t[i])||W_(t[i])||!e.length)?(t=t[i],i=""):e.length?i+=".":t=void 0;while(e.length);return t}function uZ(t,i,e){let n=i.split("."),o=t;for(let r=0;r{class t extends ld{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(Y_(e))return this.interpolateString(e,n);if(dZ(e))return this.interpolateFunction(e,n)}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(o,r)=>{let a=j_(n,r);return tc(a)?a:o}):e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),dd=class{},aE=(()=>{class t extends dd{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),W0=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new U;onLangChange=new U;onDefaultLangChange=new U},H_=new L("ISOLATE_TRANSLATE_SERVICE"),U_=new L("USE_DEFAULT_LANG"),$_=new L("DEFAULT_LANGUAGE"),G_=new L("USE_EXTEND"),$0=t=>hi(t)?t:ne(t),zi=(()=>{class t{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,n,o,r,a,s=!0,c=!1,u=!1,f){this.store=e,this.currentLoader=n,this.compiler=o,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=s,this.extend=u,c&&(this.store=new W0),f&&this.setDefaultLang(f)}setDefaultLang(e){if(e===this.defaultLang)return;let n=this.retrieveTranslations(e);typeof n<"u"?(this.defaultLang==null&&(this.defaultLang=e),n.pipe(Ve(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return ne(this.translations[e]);this.currentLang||(this.currentLang=e);let n=this.retrieveTranslations(e);return hi(n)?(n.pipe(Ve(1)).subscribe(()=>{this.changeLang(e)}),n):(this.changeLang(e),ne(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let n=this.currentLoader.getTranslation(e).pipe(Hs(1),Ve(1));return this.loadingTranslations=n.pipe(le(o=>this.compiler.compileTranslations(o,e)),Hs(1),Ve(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[e]=this.extend&&this.translations[e]?q(q({},o),this.translations[e]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),n}setTranslation(e,n,o=!1){let r=this.compiler.compileTranslations(n,e);(o||this.extend)&&this.translations[e]?this.translations[e]=B_(this.translations[e],r):this.translations[e]=r,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let n=e.filter(o=>!this.langs.includes(o));n.length>0&&(this.langs=[...this.langs,...n])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,n,o){let r;if(e&&(r=this.runInterpolation(j_(e,n),o)),r===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.runInterpolation(j_(this.translations[this.defaultLang],n),o)),r===void 0){let a={key:n,translateService:this};typeof o<"u"&&(a.interpolateParams=o),r=this.missingTranslationHandler.handle(a)}return r!==void 0?r:n}runInterpolation(e,n){if(W_(e))return e.map(o=>this.runInterpolation(o,n));if(Y0(e)){let o={};for(let r in e){let a=this.runInterpolation(e[r],n);a!==void 0&&(o[r]=a)}return o}else return this.parser.interpolate(e,n)}getParsedResult(e,n,o){if(n instanceof Array){let r={},a=!1;for(let c of n)r[c]=this.getParsedResultForKey(e,c,o),a=a||hi(r[c]);if(!a)return r;let s=n.map(c=>$0(r[c]));return Ja(s).pipe(le(c=>{let u={};return c.forEach((f,h)=>{u[n[h]]=f}),u}))}return this.getParsedResultForKey(e,n,o)}get(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(po(o=>$0(this.getParsedResult(o,e,n)))):$0(this.getParsedResult(this.translations[this.currentLang],e,n))}getStreamOnTranslationChange(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return Yi(qi(()=>this.get(e,n)),this.onTranslationChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}stream(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" required');return Yi(qi(()=>this.get(e,n)),this.onLangChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}instant(e,n){if(!tc(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],e,n);return hi(o)?Array.isArray(e)?e.reduce((r,a)=>(r[a]=a,r),{}):e:o}set(e,n,o=this.currentLang){uZ(this.translations[o],e,Y_(n)?this.compiler.compile(n,o):this.compiler.compileTranslations(n,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(n){return new(n||t)(be(W0),be(cd),be(dd),be(ld),be(G0),be(U_),be(H_),be(G_),be($_))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pe=(()=>{class t{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,n){this.translate=e,this._ref=n}updateValue(e,n,o){let r=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(o){let a=this.translate.getParsedResult(o,e,n);hi(a)?a.subscribe(r):r(a)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(zp(e,this.lastKey)&&zp(n,this.lastParams))return this.value;let o;if(tc(n[0])&&n.length)if(Y_(n[0])&&n[0].length){let r=n[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(r)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else Y0(n[0])&&(o=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{this.lastKey&&r.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)(Me(zi,16),Me(we,16))};static \u0275pipe=wt({name:"translate",type:t,pure:!1});static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var q_=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:iE},e.compiler||{provide:dd,useClass:aE},e.parser||{provide:ld,useClass:rE},e.missingTranslationHandler||{provide:G0,useClass:oE},W0,{provide:H_,useValue:e.isolate},{provide:U_,useValue:e.useDefaultLang},{provide:G_,useValue:e.extend},{provide:$_,useValue:e.defaultLanguage},zi]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:iE},e.compiler||{provide:dd,useClass:aE},e.parser||{provide:ld,useClass:rE},e.missingTranslationHandler||{provide:G0,useClass:oE},{provide:H_,useValue:e.isolate},{provide:U_,useValue:e.useDefaultLang},{provide:G_,useValue:e.extend},{provide:$_,useValue:e.defaultLanguage},zi]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();var Q_={mifos_x:{version:"260203",hash:"83a5a9e"},allow_switching_backend_instance:!0};var qe=window.env||{},je={production:!0,version:Q_.mifos_x.version,hash:Q_.mifos_x.hash,fineractPlatformTenantId:qe.fineractPlatformTenantId||"default",fineractPlatformTenantIds:qe.fineractPlatformTenantIds||"default",baseApiUrls:qe.fineractApiUrls||"https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,"+window.location.origin,baseApiUrl:qe.fineractApiUrl||(qe.fineractApiUrls?.length>0?qe.fineractApiUrls.split(",")[0]:window.location.origin),oauthServerUrl:qe.oauthServerUrl||qe.fineractApiUrl+qe.apiProvider,allowServerSwitch:qe.allowServerSwitch||"true",apiProvider:qe.apiProvider||"/fineract-provider/api",apiVersion:qe.apiVersion||"/v1",apiActuator:qe.apiActuator||"/fineract-provider",serverUrl:"",oauth:{enabled:qe.oauthServerEnabled===!0,serverUrl:qe.oauthServerUrl||"",logoutUrl:qe.oauthServerLogoutUrl||"",appId:qe.oauthAppId||"",authorizeUrl:qe.oauthAuthorizeUrl||"",tokenUrl:qe.oauthTokenUrl||"",redirectUri:qe.oauthRedirectUri||"",scope:qe.oauthScope||""},enableRememberMe:!1,warningDialog:{title:"Warning",content:"This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.",buttonText:"Close"},defaultLanguage:qe.defaultLanguage||"en-US",supportedLanguages:qe.supportedLanguages||"cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW",preloadClients:qe.preloadClients||!0,defaultCharDelimiter:qe.defaultCharDelimiter||",",displayBackEndInfo:qe.displayBackEndInfo||"true",displayTenantSelector:qe.displayTenantSelector||"true",productionMode:qe.productionMode==="true"||qe.productionMode===!0||!1,tenantLogoUrl:qe.tenantLogoUrl||"assets/images/default_home.png",tenantLogoUrlDark:qe.tenantLogoUrlDark||"assets/images/white-mifos.png",documentationBaseUrl:qe.documentationBaseUrl||"https://mifosforge.jira.com/wiki",waitTimeForNotifications:qe.waitTimeForNotifications||60,waitTimeForCOBCatchUp:qe.waitTimeForCOBCatchUp||30,session:{timeout:{idleTimeout:qe.sessionIdleTimeout||3e5}},httpCacheEnabled:qe.httpCacheEnabled||!1,mifosInterbankTransfersApiUrl:qe.mifosInterbankTransfersApiUrl||"https://apis.mifos.community",mifosInterbankTransfersApiProvider:qe.mifosInterbankTransfersApiProvider||"/vnext1",mifosInterbankTransfersApiVersion:qe.mifosInterbankTransfersApiVersion||"/v1.0",mifosInterbankTransfersEnabled:qe.mifosInterbankTransfersEnabled??!0,minPasswordLength:qe.minPasswordLength||12,complianceHideClientData:qe.complianceHideClientData==="true"||qe.complianceHideClientData===!0||!1,OIDC:{oidcServerEnabled:qe.oidcServerEnabled===!0||qe.oidcServerEnabled==="true"||qe.FINERACT_PLUGIN_OIDC_ENABLED==="true",oidcBaseUrl:qe.oidcBaseUrl||qe.FINERACT_PLUGIN_OIDC_BASE_URL||"",oidcClientId:qe.oidcClientId||qe.FINERACT_PLUGIN_OIDC_CLIENT_ID||"",oidcApiUrl:qe.oidcApiUrl||qe.FINERACT_PLUGIN_OIDC_API_URL||"",oidcFrontUrl:qe.oidcFrontUrl||qe.FINERACT_PLUGIN_OIDC_FRONTEND_URL||""}};je.serverUrl=`${je.baseApiUrl}${je.apiProvider}${je.apiVersion}`;var sE=(()=>{class t{transform(e,n,o,r){if(e){if(n==="loan"&&(o==="closed"?e=e.filter(a=>a.status.code==="loanStatusType.closed.written.off"||a.status.code==="loanStatusType.closed.obligations.met"||a.status.code==="loanStatusType.closed.reschedule.outstanding.amount"||a.status.code==="loanStatusType.withdrawn.by.client"||a.status.code==="loanStatusType.rejected"):e=e.filter(a=>a.status.code!=="loanStatusType.closed.written.off"&&a.status.code!=="loanStatusType.closed.obligations.met"&&a.status.code!=="loanStatusType.closed.reschedule.outstanding.amount"&&a.status.code!=="loanStatusType.withdrawn.by.client"&&a.status.code!=="loanStatusType.rejected")),n==="saving"&&(r==="isFixed"?e=e.filter(a=>a.depositType.value==="Fixed Deposit"):r==="isRecurring"?e=e.filter(a=>a.depositType.value==="Recurring Deposit"):r==="isSavings"&&(e=e.filter(a=>a.depositType.value==="Savings")),o==="closed"?e=e.filter(a=>a.status.code==="savingsAccountStatusType.withdrawn.by.applicant"||a.status.code==="savingsAccountStatusType.closed"||a.status.code==="savingsAccountStatusType.pre.mature.closure"||a.status.code==="savingsAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="savingsAccountStatusType.withdrawn.by.applicant"&&a.status.code!=="savingsAccountStatusType.closed"&&a.status.code!=="savingsAccountStatusType.pre.mature.closure"&&a.status.code!=="savingsAccountStatusType.rejected")),n==="share"&&(o==="closed"?e=e.filter(a=>a.status.code==="shareAccountStatusType.closed"||a.status.code==="shareAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="shareAccountStatusType.closed"&&a.status.code!=="shareAccountStatusType.rejected")),n==="guarantor")if(o===!1)e=e.filter(a=>a.status);else return e;return n==="clientApproval"&&(e=e.filter(a=>a.active===!1&&a.status.value==="Pending")),e}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"accountsFilter",type:t,pure:!0})}}return t})();var cE=(()=>{class t{transform(e,n,o,r){return e&&(e=e.filter(a=>!(a.currency.code!==o||r&&a.chargeTimeType.id===12||n.filter(s=>s.id===a.id).length))),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesFilter",type:t,pure:!0})}}return t})();var lE=(()=>{class t{transform(e,n){return e&&(e=e.filter(o=>o.penalty===n)),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesPenaltyFilter",type:t,pure:!0})}}return t})();var Ia=(()=>{class t{constructor(){this.alertEvent=new U}alert(e){this.alertEvent.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var md=uo(yo());var zo=(()=>{class t{constructor(){this.datePipe=d(id)}static{this.DEFAULT_DATEFORMAT="yyyy-MM-dd"}static{this.DEFAULT_DATETIMEFORMAT="yyyy-MM-dd HH:mm"}getDate(e){return this.datePipe.transform(e,"yyyy-MM-dd")}formatDate(e,n){return new id(this.language.code).transform(e,n)}formatDateAsString(e,n){let o=n.replace(/y/g,"Y").replace(/d/g,"D").replace(/a/g,"A");return(0,md.default)(e).format(o)}parseDate(e){return e instanceof Array?(0,md.default)(e.join("-"),"YYYY-MM-DD").toDate():(0,md.default)(e).toDate()}parseDatetime(e){return(0,md.default)(e).toDate()}convertToDate(e,n){let o=n.replace(/y/g,"Y").replace(/d/g,"D").replace(/a/g,"A");return(0,md.default)(e,o).toDate()}get language(){return localStorage.getItem("mifosXLanguage")?JSON.parse(localStorage.getItem("mifosXLanguage")):"en"}calculateDiff(e,n){return Math.floor((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/(1e3*60*60*24))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tn=(()=>{class t{constructor(){this.alertService=d(Ia),this.dateUtils=d(zo),this.minAllowedDate=new Date(1950,0,1),this.maxAllowedDate=new Date(2100,0,1)}static{this.businessDateFormat="yyyy-MM-dd"}static{this.businessDateConfigName="enable-business-date"}static{this.businessDateType="BUSINESS_DATE"}static{this.cobDateType="COB_DATE"}setDateFormat(e){localStorage.setItem("mifosXDateFormat",JSON.stringify(e))}setLanguage(e){localStorage.setItem("mifosXLanguage",JSON.stringify(e))}setDecimalToDisplay(e){localStorage.setItem("mifosXDecimalsToDisplay",e)}setDefaultLanguage(){let e=je.defaultLanguage?je.defaultLanguage:"en-US";this.setLanguage({name:e,code:e.substring(0,2)})}setServer(e){localStorage.setItem("mifosXServerURL",e)}setServers(e){localStorage.setItem("mifosXServers",JSON.stringify(e))}setTenantIdentifiers(e){localStorage.setItem("mifosXTenantIdentifiers",JSON.stringify(e))}setTenantIdentifier(e){localStorage.setItem("mifosXTenantIdentifier",e)}setBusinessDate(e){localStorage.setItem("mifosXServerDate",e)}setBusinessDateConfig(e){localStorage.setItem("mifosXServerBusinessDateEnabled",e)}get dateFormat(){return JSON.parse(localStorage.getItem("mifosXDateFormat"))}get language(){return localStorage.getItem("mifosXLanguage")||this.setDefaultLanguage(),JSON.parse(localStorage.getItem("mifosXLanguage"))}get languageCode(){let e=this.language.code;return e==="es"?"es-MX":e==="en"?"en-US":e+"-"+e.toUpperCase()}get decimals(){return localStorage.getItem("mifosXDecimalsToDisplay")?localStorage.getItem("mifosXDecimalsToDisplay"):"2"}get servers(){return JSON.parse(localStorage.getItem("mifosXServers"))}get server(){return localStorage.getItem("mifosXServerURL")?localStorage.getItem("mifosXServerURL"):je.baseApiUrl&&je.baseApiUrl!==""?je.baseApiUrl:this.servers()[0]}get baseServerUrl(){return this.server+je.apiProvider}get serverUrl(){return this.server+je.apiProvider+je.apiVersion}get serverHost(){return this.server}get businessDate(){return this.dateUtils.convertToDate(localStorage.getItem("mifosXServerDate"),t.businessDateFormat)}get businessDateConfig(){return localStorage.getItem("mifosXServerBusinessDateEnabled")}get minPastDate(){return this.minAllowedDate}get maxFutureDate(){return this.maxAllowedDate}get tenantIdentifiers(){return JSON.parse(localStorage.getItem("mifosXTenantIdentifiers"))}get tenantIdentifier(){return localStorage.getItem("mifosXTenantIdentifier")}validateBusinessDateStatus(e){e.some(n=>{if(n.name===t.businessDateConfigName)return n.enabled})}getBusinessDates(e,n){e.some(o=>{if(o.type===n){let r=new Date(o.date);this.setBusinessDate(this.dateUtils.formatDate(r,t.businessDateFormat)),this.alertService.alert({type:n+" Set",message:this.dateUtils.formatDate(r,this.dateFormat)});return}})}setThemeDarkEnabled(e){localStorage.setItem("mifosXThemeDarkEnabled",JSON.stringify(e))}get themeDarkEnabled(){return JSON.parse(localStorage.getItem("mifosXThemeDarkEnabled"))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Np=uo(yo()),DDe=uo(uE()),SDe=uo(pE()),kDe=uo(hE()),EDe=uo(_E()),IDe=uo(vE()),ODe=uo(CE()),TDe=uo(ME()),PDe=uo(DE()),LDe=uo(kE()),ADe=uo(IE()),RDe=uo(TE());var Jo=(()=>{class t{constructor(){this.settingsService=d(tn),this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n){let o=this.settingsService.dateFormat.replace("dd","DD");if(typeof e>"u"||e===null)return"";let r=this.settingsService.language.code,a;r?r.includes("-")?a=r.split("-")[0]:a=r:a="en",Np.default.locale(a);let s;return Array.isArray(e)?s=(0,Np.default)(e.join("-"),"YYYY-MM-DD"):s=(0,Np.default)(e),s.isValid()?n?s.format(n):s.format(o):""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"dateFormat",type:t,pure:!1})}}return t})();var q0=uo(yo());var Oa=(()=>{class t{transform(e,n){if(e==null||e==="")return"";let o;if(Array.isArray(e)){let[a,s,c,u,f,h]=e;u!=null?o=(0,q0.default)({year:a,month:(s??1)-1,date:c,hour:u,minute:f??0,second:h??0}):o=(0,q0.default)({year:a,month:(s??1)-1,date:c})}else typeof e=="number"&&e<1e12?o=q0.default.unix(e):o=(0,q0.default)(e);let r=n??"YYYY-MM-DDTHH:mm:ssZ";return o.format(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"datetimeFormat",type:t,pure:!0})}}return t})();var PE=(()=>{class t{transform(e){if(e){if(/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(e))return e.split("-")[4];{let r=e.length;return r>20?e.substring(r-20,r):e}}else return""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"externalIdentifier",type:t,pure:!0})}}return t})();var LE=new WeakMap,AE=(()=>{class t{constructor(){this.sanitizer=d(hs)}transform(e,n,o,r){if(!n||!o||e===null||e===void 0)return"";let a=LE.get(n);a||(a=new Map,LE.set(n,a));let s=a.get(o);if(!s){if(s=new Map,Array.isArray(n))for(let f of n)f&&f[o]!==void 0&&f[o]!==null&&s.set(f[o],f);a.set(o,s)}let c=s.get(e),u=c?c[r]??"":"";return typeof u=="string"?this.sanitizer.sanitize(Wn.HTML,u)||"":String(u||"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"find",type:t,pure:!0})}}return t})();var nc=(()=>{class t{constructor(){this.decimalFormat=d(R0),this.settingsService=d(tn)}transform(e,n){if(e===void 0)return n||"";let o=this.settingsService.decimals,r=`1.${o}-${o}`;return this.decimalFormat.transform(e,r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"formatNumber",type:t,pure:!0})}}return t})();var NE=uo(zE());var Bp=(()=>{class t{transform(e){if(e.charAt(0)==="{"&&e.charAt(e.length-1)==="}")try{return NE.json(e)}catch{return e}return e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"prettyPrint",type:t,pure:!0})}}return t})();var FE=(()=>{class t{transform(e){return{true:"status-active",false:"status-deleted",Active:"status-active",Block:"status-block","charges.StatusType.active.true":"status-active","loanStatusType.submitted.and.pending.approval":"status-pending","loanStatusType.approved":"status-approved","loanStatusType.active":"status-active","loanStatusType.overpaid":"status-overpaid","loanStatusType.chargeoff":"status-chargeoff","loanStatusType.activeOverdue":"status-active-overdue","loanSubStatusType.contractTermination":"subStatus-contract-termination","savingsAccountStatusType.submitted.and.pending.approval":"status-pending","savingsAccountStatusType.approved":"status-approved","savingsAccountStatusType.active":"status-active","savingsAccountStatusType.activeInactive":"status-active-overdue","savingsAccountStatusType.activeDormant":"status-active-overdue","savingsAccountStatusType.matured":"status-matured","shareAccountStatusType.submitted.and.pending.approval":"status-pending","shareAccountStatusType.approved":"status-approved","shareAccountStatusType.active":"status-active","shareAccountStatusType.rejected":"status-rejected","loanProduct.active":"status-active","loanProduct.inActive":"status-inactive","clientStatusType.pending":"status-pending","clientStatusType.closed":"status-closed","clientStatusType.rejected":"status-rejected","clientStatusType.withdraw":"status-withdraw","clientStatusType.active":"status-active","clientStatusType.submitted.and.pending.approval":"status-pending","clientStatusTYpe.approved":"status-approved","clientStatusType.transfer.in.progress":"status-transfer-progress","clientStatusType.transfer.on.hold":"status-transfer-hold","groupingStatusType.active":"status-active","groupingStatusType.pending":"status-pending","groupingStatusType.submitted.and.pending.approval":"status-pending","groupingStatusType.approved":"status-approved","smsCampaignStatus.active":"status-active","smsCampaignStatus.pending":"status-pending","smsCampaignStatus.closed":"status-closed","purchasedSharesStatusType.applied":"status-pending"}[e]??"status-unknown"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"statusLookup",type:t,pure:!0})}}return t})();var vl=(()=>{class t{constructor(){this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n,o="labels"){if(!e)return e;let r=`${o}.${n}.${e}`;return this.translateService.instant(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"translateKey",type:t,pure:!1})}}return t})();var jp=(()=>{class t{transform(e,n){if(e.length<=40)return e;let o=e.substring(0,30);return n&&(o=e.substring(0,n)),o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"truncateText",type:t,pure:!0})}}return t})();var BE=(()=>{class t{transform(e){e=decodeURIComponent(e);let n=e.slice(1).split("/");if(e.includes("?")){let r=n.pop(),a=r.slice(0,r.indexOf("?"));n.push(a)}return n.map(r=>r.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")).join(" | ")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"urlToString",type:t,pure:!0})}}return t})();var Hp=(()=>{class t{constructor(){this.translateService=d(zi)}transform(e,...n){if(e==null)return null;let o=e?"Yes":"No";return this.translateService.instant("labels.buttons."+o)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"yesNo",type:t,pure:!1})}}return t})();var jE=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({providers:[FE,sE,cE,lE,AE,BE,Jo,Oa,PE,nc,Hp,Bp,vl,jp],imports:[fe]})}}return t})();var Up=class{validateSignature(i){return Promise.resolve(null)}validateAtHash(i){return Promise.resolve(!0)}},$p=class{};var Q0=class{},fZ=(()=>{class t extends Q0{now(){return Date.now()}new(){return new Date}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})()}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var Gp=class{},Wp=class{},hZ=(()=>{class t{constructor(){this.data=new Map}getItem(e){return this.data.get(e)}removeItem(e){this.data.delete(e)}setItem(e,n){this.data.set(e,n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var K0=class{constructor(i){this.type=i}},Co=class extends K0{constructor(i,e=null){super(i),this.info=e}},Xr=class extends K0{constructor(i,e=null){super(i),this.info=e}},Vn=class extends K0{constructor(i,e,n=null){super(i),this.reason=e,this.params=n}};function HE(t){let i=t.replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(atob(i).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function UE(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var pd=class{constructor(i){this.clientId="",this.redirectUri="",this.postLogoutRedirectUri="",this.redirectUriAsPostLogoutRedirectUriFallback=!0,this.loginUrl="",this.scope="openid profile",this.resource="",this.rngUrl="",this.oidc=!0,this.requestAccessToken=!0,this.options=null,this.issuer="",this.logoutUrl="",this.clearHashAfterLogin=!0,this.tokenEndpoint=null,this.revocationEndpoint=null,this.customTokenParameters=[],this.userinfoEndpoint=null,this.responseType="",this.showDebugInformation=!1,this.silentRefreshRedirectUri="",this.silentRefreshMessagePrefix="",this.silentRefreshShowIFrame=!1,this.siletRefreshTimeout=1e3*20,this.silentRefreshTimeout=1e3*20,this.dummyClientSecret="",this.requireHttps="remoteOnly",this.strictDiscoveryDocumentValidation=!0,this.jwks=null,this.customQueryParams=null,this.silentRefreshIFrameName="angular-oauth-oidc-silent-refresh-iframe",this.timeoutFactor=.75,this.sessionChecksEnabled=!1,this.sessionCheckIntervall=3*1e3,this.sessionCheckIFrameUrl=null,this.sessionCheckIFrameName="angular-oauth-oidc-check-session-iframe",this.disableAtHashCheck=!1,this.skipSubjectCheck=!1,this.useIdTokenHintForSilentRefresh=!1,this.skipIssuerCheck=!1,this.nonceStateSeparator=";",this.useHttpBasicAuth=!1,this.decreaseExpirationBySec=0,this.waitForTokenInMsec=0,this.disablePKCE=!1,this.preserveRequestedRoute=!1,this.disableIdTokenTimer=!1,this.checkOrigin=!1,this.openUri=e=>{location.href=e},i&&Object.assign(this,i)}},yl=class{encodeKey(i){return encodeURIComponent(i)}encodeValue(i){return encodeURIComponent(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}},Yp=class{};var $E=(()=>{class t{getHashFragmentParams(e){let n=e||window.location.hash;if(n=decodeURIComponent(n),n.indexOf("#")!==0)return{};let o=n.indexOf("?");return o>-1?n=n.substr(o+1):n=n.substr(1),this.parseQueryString(n)}parseQueryString(e){let n={},o,r,a,s,c,u;if(e===null)return n;let f=e.split("&");for(let h=0;h=64;){for(r=i[0],a=i[1],s=i[2],c=i[3],u=i[4],f=i[5],h=i[6],y=i[7],S=0;S<16;S++)Y=n+S*4,t[S]=(e[Y]&255)<<24|(e[Y+1]&255)<<16|(e[Y+2]&255)<<8|e[Y+3]&255;for(S=16;S<64;S++)x=t[S-2],Q=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,x=t[S-15],X=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,t[S]=(Q+t[S-7]|0)+(X+t[S-16]|0);for(S=0;S<64;S++)Q=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(y+(_Z[S]+t[S]|0)|0)|0,X=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&a^r&s^a&s)|0,y=h,h=f,f=u,u=c+Q|0,c=s,s=a,a=r,r=Q+X|0;i[0]+=r,i[1]+=a,i[2]+=s,i[3]+=c,i[4]+=u,i[5]+=f,i[6]+=h,i[7]+=y,n+=64,o-=64}return n}var lb=class{constructor(){this.digestLength=GE,this.blockSize=gZ,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}reset(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this}clean(){for(let i=0;i0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=i[n++],e--;this.bufferLength===64&&(cb(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(n=cb(this.temp,this.state,i,n,e),e%=64);e>0;)this.buffer[this.bufferLength++]=i[n++],e--;return this}finish(i){if(!this.finished){let e=this.bytesHashed,n=this.bufferLength,o=e/536870912|0,r=e<<3,a=e%64<56?64:128;this.buffer[n]=128;for(let s=n+1;s>>24&255,this.buffer[a-7]=o>>>16&255,this.buffer[a-6]=o>>>8&255,this.buffer[a-5]=o>>>0&255,this.buffer[a-4]=r>>>24&255,this.buffer[a-3]=r>>>16&255,this.buffer[a-2]=r>>>8&255,this.buffer[a-1]=r>>>0&255,cb(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(let e=0;e<8;e++)i[e*4+0]=this.state[e]>>>24&255,i[e*4+1]=this.state[e]>>>16&255,i[e*4+2]=this.state[e]>>>8&255,i[e*4+3]=this.state[e]>>>0&255;return this}digest(){let i=new Uint8Array(this.digestLength);return this.finish(i),i}_saveState(i){for(let e=0;e{class t{calcHash(e,n){return Yt(this,null,function*(){return yZ(bZ(vZ(e)))})}toHashString2(e){let n="";for(let o of e)n+=String.fromCharCode(o);return n}toHashString(e){let n=new Uint8Array(e),o="";for(let r of n)o+=String.fromCharCode(r);return o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})(),Kp=(()=>{class t extends pd{constructor(e,n,o,r,a,s,c,u,f,h){super(),this.ngZone=e,this.http=n,this.config=a,this.urlHelper=s,this.logger=c,this.crypto=u,this.dateTimeService=h,this.discoveryDocumentLoaded=!1,this.state="",this.eventsSubject=new B,this.discoveryDocumentLoadedSubject=new B,this.grantTypesSupported=[],this.inImplicitFlow=!1,this.saveNoncesInLocalStorage=!1,this.debug("angular-oauth2-oidc v10"),this.document=f,a||(a={}),this.discoveryDocumentLoaded$=this.discoveryDocumentLoadedSubject.asObservable(),this.events=this.eventsSubject.asObservable(),r&&(this.tokenValidationHandler=r),a&&this.configure(a);try{o?this.setStorage(o):typeof sessionStorage<"u"&&this.setStorage(sessionStorage)}catch(y){console.error("No OAuthStorage provided and cannot access default (sessionStorage).Consider providing a custom OAuthStorage implementation in your module.",y)}if(this.checkLocalStorageAccessable()){let y=window?.navigator?.userAgent;(y?.includes("MSIE ")||y?.includes("Trident"))&&(this.saveNoncesInLocalStorage=!0)}this.setupRefreshTimer()}checkLocalStorageAccessable(){if(typeof window>"u")return!1;let e="test";try{return typeof window.localStorage>"u"?!1:(localStorage.setItem(e,e),localStorage.removeItem(e),!0)}catch{return!1}}configure(e){Object.assign(this,new pd,e),this.config=Object.assign({},new pd,e),this.sessionChecksEnabled&&this.setupSessionCheck(),this.configChanged()}configChanged(){this.setupRefreshTimer()}restartSessionChecksIfStillLoggedIn(){this.hasValidIdToken()&&this.initSessionCheck()}restartRefreshTimerIfStillLoggedIn(){this.setupExpirationTimers()}setupSessionCheck(){this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.initSessionCheck()})}setupAutomaticSilentRefresh(e={},n,o=!0){let r=!0;this.clearAutomaticRefreshTimer(),this.automaticRefreshSubscription=this.events.pipe(It(a=>{a.type==="token_received"?r=!0:a.type==="logout"&&(r=!1)}),Oe(a=>a.type==="token_expires"&&(n==null||n==="any"||a.info===n)),$o(1e3)).subscribe(()=>{r&&this.refreshInternal(e,o).catch(()=>{this.debug("Automatic silent refresh did not work")})}),this.restartRefreshTimerIfStillLoggedIn()}refreshInternal(e,n){return!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken():this.silentRefresh(e,n)}loadDiscoveryDocumentAndTryLogin(e=null){return this.loadDiscoveryDocument().then(()=>this.tryLogin(e))}loadDiscoveryDocumentAndLogin(e=null){return e=e||{},this.loadDiscoveryDocumentAndTryLogin(e).then(()=>{if(!this.hasValidIdToken()||!this.hasValidAccessToken()){let n=typeof e.state=="string"?e.state:"";return this.initLoginFlow(n),!1}else return!0})}debug(...e){this.showDebugInformation&&this.logger.debug(...e)}validateUrlFromDiscoveryDocument(e){let n=[],o=this.validateUrlForHttps(e),r=this.validateUrlAgainstIssuer(e);return o||n.push("https for all urls required. Also for urls received by discovery."),r||n.push("Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation."),n}validateUrlForHttps(e){if(!e)return!0;let n=e.toLowerCase();return this.requireHttps===!1||(n.match(/^http:\/\/localhost($|[:/])/)||n.match(/^http:\/\/localhost($|[:/])/))&&this.requireHttps==="remoteOnly"?!0:n.startsWith("https://")}assertUrlNotNullAndCorrectProtocol(e,n){if(!e)throw new Error(`'${n}' should not be null`);if(!this.validateUrlForHttps(e))throw new Error(`'${n}' must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).`)}validateUrlAgainstIssuer(e){return!this.strictDiscoveryDocumentValidation||!e?!0:e.toLowerCase().startsWith(this.issuer.toLowerCase())}setupRefreshTimer(){if(typeof window>"u"){this.debug("timer not supported on this plattform");return}(this.hasValidIdToken()||this.hasValidAccessToken())&&(this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()),this.tokenReceivedSubscription&&this.tokenReceivedSubscription.unsubscribe(),this.tokenReceivedSubscription=this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()})}setupExpirationTimers(){this.hasValidAccessToken()&&this.setupAccessTokenTimer(),!this.disableIdTokenTimer&&this.hasValidIdToken()&&this.setupIdTokenTimer()}setupAccessTokenTimer(){let e=this.getAccessTokenExpiration(),n=this.getAccessTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.accessTokenTimeoutSubscription=ne(new Xr("token_expires","access_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}setupIdTokenTimer(){let e=this.getIdTokenExpiration(),n=this.getIdTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.idTokenTimeoutSubscription=ne(new Xr("token_expires","id_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}stopAutomaticRefresh(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.clearAutomaticRefreshTimer()}clearAccessTokenTimer(){this.accessTokenTimeoutSubscription&&this.accessTokenTimeoutSubscription.unsubscribe()}clearIdTokenTimer(){this.idTokenTimeoutSubscription&&this.idTokenTimeoutSubscription.unsubscribe()}clearAutomaticRefreshTimer(){this.automaticRefreshSubscription&&this.automaticRefreshSubscription.unsubscribe()}calcTimeout(e,n){let o=this.dateTimeService.now(),r=(n-e)*this.timeoutFactor-(o-e),a=Math.max(0,r),s=2147483647;return a>s?s:a}setStorage(e){this._storage=e,this.configChanged()}loadDiscoveryDocument(e=null){return new Promise((n,o)=>{if(e||(e=this.issuer||"",e.endsWith("/")||(e+="/"),e+=".well-known/openid-configuration"),!this.validateUrlForHttps(e)){o("issuer must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return}this.http.get(e).subscribe(r=>{if(!this.validateDiscoveryDocument(r)){this.eventsSubject.next(new Vn("discovery_document_validation_error",null)),o("discovery_document_validation_error");return}this.loginUrl=r.authorization_endpoint,this.logoutUrl=r.end_session_endpoint||this.logoutUrl,this.grantTypesSupported=r.grant_types_supported,this.issuer=r.issuer,this.tokenEndpoint=r.token_endpoint,this.userinfoEndpoint=r.userinfo_endpoint||this.userinfoEndpoint,this.jwksUri=r.jwks_uri,this.sessionCheckIFrameUrl=r.check_session_iframe||this.sessionCheckIFrameUrl,this.discoveryDocumentLoaded=!0,this.discoveryDocumentLoadedSubject.next(r),this.revocationEndpoint=r.revocation_endpoint||this.revocationEndpoint,this.sessionChecksEnabled&&this.restartSessionChecksIfStillLoggedIn(),this.loadJwks().then(a=>{let s={discoveryDocument:r,jwks:a},c=new Co("discovery_document_loaded",s);this.eventsSubject.next(c),n(c)}).catch(a=>{this.eventsSubject.next(new Vn("discovery_document_load_error",a)),o(a)})},r=>{this.logger.error("error loading discovery document",r),this.eventsSubject.next(new Vn("discovery_document_load_error",r)),o(r)})})}loadJwks(){return new Promise((e,n)=>{this.jwksUri?this.http.get(this.jwksUri).subscribe(o=>{this.jwks=o,e(o)},o=>{this.logger.error("error loading jwks",o),this.eventsSubject.next(new Vn("jwks_load_error",o)),n(o)}):e(null)})}validateDiscoveryDocument(e){let n;return!this.skipIssuerCheck&&e.issuer!==this.issuer?(this.logger.error("invalid issuer in discovery document","expected: "+this.issuer,"current: "+e.issuer),!1):(n=this.validateUrlFromDiscoveryDocument(e.authorization_endpoint),n.length>0?(this.logger.error("error validating authorization_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.end_session_endpoint),n.length>0?(this.logger.error("error validating end_session_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.token_endpoint),n.length>0&&this.logger.error("error validating token_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.revocation_endpoint),n.length>0&&this.logger.error("error validating revocation_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.userinfo_endpoint),n.length>0?(this.logger.error("error validating userinfo_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.jwks_uri),n.length>0?(this.logger.error("error validating jwks_uri in discovery document",n),!1):(this.sessionChecksEnabled&&!e.check_session_iframe&&this.logger.warn("sessionChecksEnabled is activated but discovery document does not contain a check_session_iframe field"),!0)))))}fetchTokenUsingPasswordFlowAndLoadUserProfile(e,n,o=new ki){return this.fetchTokenUsingPasswordFlow(e,n,o).then(()=>this.loadUserProfile())}loadUserProfile(){if(!this.hasValidAccessToken())throw new Error("Can not load User Profile without access_token");if(!this.validateUrlForHttps(this.userinfoEndpoint))throw new Error("userinfoEndpoint must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return new Promise((e,n)=>{let o=new ki().set("Authorization","Bearer "+this.getAccessToken());this.http.get(this.userinfoEndpoint,{headers:o,observe:"response",responseType:"text"}).subscribe(r=>{if(this.debug("userinfo received",JSON.stringify(r)),r.headers.get("content-type").startsWith("application/json")){let a=JSON.parse(r.body),s=this.getIdentityClaims()||{};if(!this.skipSubjectCheck&&this.oidc&&(!s.sub||a.sub!==s.sub)){n(`if property oidc is true, the received user-id (sub) has to be the user-id of the user that has logged in with oidc. +`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),r=e.slice(n+1).trim();this.addHeaderEntry(o,r)}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();let e=this.headers.get(i.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,e){return this.clone({name:i,value:e,op:"a"})}set(i,e){return this.clone({name:i,value:e,op:"s"})}delete(i,e){return this.clone({name:i,value:e,op:"d"})}maybeSetNormalizedName(i,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,i)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(e=>{this.headers.set(e,i.headers.get(e)),this.normalizedNames.set(e,i.normalizedNames.get(e))})}clone(i){let e=new t;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([i]),e}applyUpdate(i){let e=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(i.name,e);let o=(i.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let r=i.value;if(!r)this.headers.delete(e),this.normalizedNames.delete(e);else{let a=this.headers.get(e);if(!a)return;a=a.filter(s=>r.indexOf(s)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(i,e){let n=i.toLowerCase();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(i,e){let n=(Array.isArray(e)?e:[e]).map(r=>r.toString()),o=i.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(i,o)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>i(this.normalizedNames.get(e),this.headers.get(e)))}};var Op=class{encodeKey(i){return jk(i)}encodeValue(i){return jk(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}};function FX(t,i){let e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let r=o.indexOf("="),[a,s]=r==-1?[i.decodeKey(o),""]:[i.decodeKey(o.slice(0,r)),i.decodeValue(o.slice(r+1))],c=e.get(a)||[];c.push(s),e.set(a,c)}),e}var VX=/%(\d[a-f0-9])/gi,BX={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function jk(t){return encodeURIComponent(t).replace(VX,(i,e)=>BX[e]??i)}function Ip(t){return`${t}`}var te=class t{map;encoder;updates=null;cloneFrom=null;constructor(i={}){if(this.encoder=i.encoder||new Op,i.fromString){if(i.fromObject)throw new he(2805,!1);this.map=FX(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(e=>{let n=i.fromObject[e],o=Array.isArray(n)?n.map(Ip):[Ip(n)];this.map.set(e,o)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();let e=this.map.get(i);return e?e[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,e){return this.clone({param:i,value:e,op:"a"})}appendAll(i){let e=[];return Object.keys(i).forEach(n=>{let o=i[n];Array.isArray(o)?o.forEach(r=>{e.push({param:n,value:r,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(i,e){return this.clone({param:i,value:e,op:"s"})}delete(i,e){return this.clone({param:i,value:e,op:"d"})}toString(){return this.init(),this.keys().map(i=>{let e=this.encoder.encodeKey(i);return this.map.get(i).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>i!=="").join("&")}clone(i){let e=new t({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(i),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":let e=(i.op==="a"?this.map.get(i.param):void 0)||[];e.push(Ip(i.value)),this.map.set(i.param,e);break;case"d":if(i.value!==void 0){let n=this.map.get(i.param)||[],o=n.indexOf(Ip(i.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}else{this.map.delete(i.param);break}}}),this.cloneFrom=this.updates=null)}};var Tp=class{map=new Map;set(i,e){return this.map.set(i,e),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}};function jX(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Hk(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function Uk(t){return typeof Blob<"u"&&t instanceof Blob}function $k(t){return typeof FormData<"u"&&t instanceof FormData}function HX(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Gk="Content-Type",Wk="Accept",qk="X-Request-URL",Qk="text/plain",Kk="application/json",UX=`${Kk}, ${Qk}, */*`,od=class t{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(i,e,n,o){this.url=e,this.method=i.toUpperCase();let r;if(jX(this.method)||o?(this.body=n!==void 0?n:null,r=o):r=n,r){if(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,this.keepalive=!!r.keepalive,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.context&&(this.context=r.context),r.params&&(this.params=r.params),r.priority&&(this.priority=r.priority),r.cache&&(this.cache=r.cache),r.credentials&&(this.credentials=r.credentials),typeof r.timeout=="number"){if(r.timeout<1||!Number.isInteger(r.timeout))throw new he(2822,"");this.timeout=r.timeout}r.mode&&(this.mode=r.mode),r.redirect&&(this.redirect=r.redirect),r.integrity&&(this.integrity=r.integrity),r.referrer&&(this.referrer=r.referrer),this.transferCache=r.transferCache}if(this.headers??=new ki,this.context??=new Tp,!this.params)this.params=new te,this.urlWithParams=e;else{let a=this.params.toString();if(a.length===0)this.urlWithParams=e;else{let s=e.indexOf("?"),c=s===-1?"?":sHt.set(nn,i.setHeaders[nn]),pe)),i.setParams&&(mt=Object.keys(i.setParams).reduce((Ht,nn)=>Ht.set(nn,i.setParams[nn]),mt)),new t(e,n,Y,{params:mt,headers:pe,context:Et,reportProgress:X,responseType:o,withCredentials:Q,transferCache:x,keepalive:r,cache:s,priority:a,timeout:S,mode:c,redirect:u,credentials:f,referrer:h,integrity:y})}},bl=(function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t})(bl||{}),sd=class{headers;status;statusText;url;ok;type;redirected;constructor(i,e=200,n="OK"){this.headers=i.headers||new ki,this.status=i.status!==void 0?i.status:e,this.statusText=i.statusText||n,this.url=i.url||null,this.redirected=i.redirected,this.ok=this.status>=200&&this.status<300}},Pp=class t extends sd{constructor(i={}){super(i)}type=bl.ResponseHeader;clone(i={}){return new t({headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}},H0=class t extends sd{body;constructor(i={}){super(i),this.body=i.body!==void 0?i.body:null}type=bl.Response;clone(i={}){return new t({body:i.body!==void 0?i.body:this.body,headers:i.headers||this.headers,status:i.status!==void 0?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0,redirected:i.redirected??this.redirected})}},rd=class extends sd{name="HttpErrorResponse";message;error;ok=!1;constructor(i){super(i,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${i.url||"(unknown url)"}`:this.message=`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}},$X=200,GX=204;function R_(t,i){return{body:i,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,credentials:t.credentials,transferCache:t.transferCache,timeout:t.timeout,keepalive:t.keepalive,priority:t.priority,cache:t.cache,mode:t.mode,redirect:t.redirect,integrity:t.integrity,referrer:t.referrer}}var Ln=(()=>{class t{handler;constructor(e){this.handler=e}request(e,n,o={}){let r;if(e instanceof od)r=e;else{let c;o.headers instanceof ki?c=o.headers:c=new ki(o.headers);let u;o.params&&(o.params instanceof te?u=o.params:u=new te({fromObject:o.params})),r=new od(e,n,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let a=ne(r).pipe(po(c=>this.handler.handle(c)));if(e instanceof od||o.observe==="events")return a;let s=a.pipe(Oe(c=>c instanceof H0));switch(o.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new he(2806,!1);return c.body}));case"blob":return s.pipe(le(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new he(2807,!1);return c.body}));case"text":return s.pipe(le(c=>{if(c.body!==null&&typeof c.body!="string")throw new he(2808,!1);return c.body}));case"json":default:return s.pipe(le(c=>c.body))}case"response":return s;default:throw new he(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new te().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,R_(o,n))}post(e,n,o={}){return this.request("POST",e,R_(o,n))}put(e,n,o={}){return this.request("PUT",e,R_(o,n))}static \u0275fac=function(n){return new(n||t)(be(ad))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var WX=new L("");function Xk(t,i){return i(t)}function YX(t,i){return(e,n)=>i.intercept(e,{handle:o=>t(o,n)})}function qX(t,i,e){return(n,o)=>Si(e,()=>i(n,r=>t(r,o)))}var Ap=new L(""),N_=new L(""),Zk=new L(""),F_=new L("",{providedIn:"root",factory:()=>!0});function QX(){let t=null;return(i,e)=>{t===null&&(t=(d(Ap,{optional:!0})??[]).reduceRight(YX,Xk));let n=d(z1);if(d(F_)){let r=n.add();return t(i,e).pipe(Nr(r))}else return t(i,e)}}var Lp=(()=>{class t extends ad{backend;injector;chain=null;pendingTasks=d(z1);contributeToStability=d(F_);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(N_),...this.injector.get(Zk,[])]));this.chain=n.reduceRight((o,r)=>qX(o,r,this.injector),Xk)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Nr(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||t)(be(j0),be(Jt))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var KX=/^\)\]\}',?\n/,XX=RegExp(`^${qk}:`,"m");function ZX(t){return"responseURL"in t&&t.responseURL?t.responseURL:XX.test(t.getAllResponseHeaders())?t.getResponseHeader(qk):null}var z_=(()=>{class t{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new he(-2800,!1);let n=this.xhrFactory;return ne(null).pipe(at(()=>new Fe(r=>{let a=n.build();if(a.open(e.method,e.urlWithParams),e.withCredentials&&(a.withCredentials=!0),e.headers.forEach((Q,X)=>a.setRequestHeader(Q,X.join(","))),e.headers.has(Wk)||a.setRequestHeader(Wk,UX),!e.headers.has(Gk)){let Q=e.detectContentTypeHeader();Q!==null&&a.setRequestHeader(Gk,Q)}if(e.timeout&&(a.timeout=e.timeout),e.responseType){let Q=e.responseType.toLowerCase();a.responseType=Q!=="json"?Q:"text"}let s=e.serializeBody(),c=null,u=()=>{if(c!==null)return c;let Q=a.statusText||"OK",X=new ki(a.getAllResponseHeaders()),pe=ZX(a)||e.url;return c=new Pp({headers:X,status:a.status,statusText:Q,url:pe}),c},f=()=>{let{headers:Q,status:X,statusText:pe,url:mt}=u(),Et=null;X!==GX&&(Et=typeof a.response>"u"?a.responseText:a.response),X===0&&(X=Et?$X:0);let Ht=X>=200&&X<300;if(e.responseType==="json"&&typeof Et=="string"){let nn=Et;Et=Et.replace(KX,"");try{Et=Et!==""?JSON.parse(Et):null}catch(ar){Et=nn,Ht&&(Ht=!1,Et={error:ar,text:Et})}}Ht?(r.next(new H0({body:Et,headers:Q,status:X,statusText:pe,url:mt||void 0})),r.complete()):r.error(new rd({error:Et,headers:Q,status:X,statusText:pe,url:mt||void 0}))},h=Q=>{let{url:X}=u(),pe=new rd({error:Q,status:a.status||0,statusText:a.statusText||"Unknown Error",url:X||void 0});r.error(pe)},y=h;e.timeout&&(y=Q=>{let{url:X}=u(),pe=new rd({error:new DOMException("Request timed out","TimeoutError"),status:a.status||0,statusText:a.statusText||"Request timeout",url:X||void 0});r.error(pe)});let x=!1,S=Q=>{x||(r.next(u()),x=!0);let X={type:bl.DownloadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),e.responseType==="text"&&a.responseText&&(X.partialText=a.responseText),r.next(X)},Y=Q=>{let X={type:bl.UploadProgress,loaded:Q.loaded};Q.lengthComputable&&(X.total=Q.total),r.next(X)};return a.addEventListener("load",f),a.addEventListener("error",h),a.addEventListener("timeout",y),a.addEventListener("abort",h),e.reportProgress&&(a.addEventListener("progress",S),s!==null&&a.upload&&a.upload.addEventListener("progress",Y)),a.send(s),r.next({type:bl.Sent}),()=>{a.removeEventListener("error",h),a.removeEventListener("abort",h),a.removeEventListener("load",f),a.removeEventListener("timeout",y),e.reportProgress&&(a.removeEventListener("progress",S),s!==null&&a.upload&&a.upload.removeEventListener("progress",Y)),a.readyState!==a.DONE&&a.abort()}})))}static \u0275fac=function(n){return new(n||t)(be(_l))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),Jk=new L(""),JX="XSRF-TOKEN",eZ=new L("",{providedIn:"root",factory:()=>JX}),tZ="X-XSRF-TOKEN",nZ=new L("",{providedIn:"root",factory:()=>tZ}),U0=class{},iZ=(()=>{class t{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=z0(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||t)(be(De),be(eZ))};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),oZ=/^(?:https?:)?\/\//i;function rZ(t,i){if(!d(Jk)||t.method==="GET"||t.method==="HEAD"||oZ.test(t.url))return i(t);let e=d(U0).getToken(),n=d(nZ);return e!=null&&!t.headers.has(n)&&(t=t.clone({headers:t.headers.set(n,e)})),i(t)}var V_=(function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t})(V_||{});function aZ(t,i){return{\u0275kind:t,\u0275providers:i}}function sZ(...t){let i=[Ln,z_,Lp,{provide:ad,useExisting:Lp},{provide:j0,useFactory:()=>d(WX,{optional:!0})??d(z_)},{provide:N_,useValue:rZ,multi:!0},{provide:Jk,useValue:!0},{provide:U0,useClass:iZ}];for(let e of t)i.push(...e.\u0275providers);return ha(i)}var Yk=new L("");function cZ(){return aZ(V_.LegacyInterceptors,[{provide:Yk,useFactory:QX},{provide:N_,useExisting:Yk,multi:!0}])}var tE=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var hs=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:function(n){let o=null;return n?o=new(n||t):o=be(lZ),o},providedIn:"root"})}return t})(),lZ=(()=>{class t extends hs{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Wn.NONE:return n;case Wn.HTML:return Da(n,"HTML")?Yo(n):A4(this._doc,String(n)).toString();case Wn.STYLE:return Da(n,"Style")?Yo(n):n;case Wn.SCRIPT:if(Da(n,"Script"))return Yo(n);throw new he(5200,!1);case Wn.URL:return Da(n,"URL")?Yo(n):f0(String(n));case Wn.RESOURCE_URL:if(Da(n,"ResourceURL"))return Yo(n);throw new he(5201,!1);default:throw new he(5202,!1)}}bypassSecurityTrustHtml(e){return a7(e)}bypassSecurityTrustStyle(e){return s7(e)}bypassSecurityTrustScript(e){return c7(e)}bypassSecurityTrustUrl(e){return l7(e)}bypassSecurityTrustResourceUrl(e){return d7(e)}static \u0275fac=function(n){return new(n||t)(be(De))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var cd=class{},iE=(()=>{class t extends cd{getTranslation(e){return ne({})}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),G0=class{},oE=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();function zp(t,i){if(t===i)return!0;if(t===null||i===null)return!1;if(t!==t&&i!==i)return!0;let e=typeof t,n=typeof i,o,r,a;if(e==n&&e=="object")if(Array.isArray(t)){if(!Array.isArray(i))return!1;if((o=t.length)==i.length){for(r=0;r{Y0(i[n])?n in t?e[n]=B_(t[n],i[n]):Object.assign(e,{[n]:i[n]}):Object.assign(e,{[n]:i[n]})}),e):B_({},i)}function j_(t,i){let e=i.split(".");i="";do i+=e.shift(),tc(t)&&tc(t[i])&&(Y0(t[i])||W_(t[i])||!e.length)?(t=t[i],i=""):e.length?i+=".":t=void 0;while(e.length);return t}function uZ(t,i,e){let n=i.split("."),o=t;for(let r=0;r{class t extends ld{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(Y_(e))return this.interpolateString(e,n);if(dZ(e))return this.interpolateFunction(e,n)}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(o,r)=>{let a=j_(n,r);return tc(a)?a:o}):e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),dd=class{},aE=(()=>{class t extends dd{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})(),W0=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new U;onLangChange=new U;onDefaultLangChange=new U},H_=new L("ISOLATE_TRANSLATE_SERVICE"),U_=new L("USE_DEFAULT_LANG"),$_=new L("DEFAULT_LANGUAGE"),G_=new L("USE_EXTEND"),$0=t=>hi(t)?t:ne(t),zi=(()=>{class t{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,n,o,r,a,s=!0,c=!1,u=!1,f){this.store=e,this.currentLoader=n,this.compiler=o,this.parser=r,this.missingTranslationHandler=a,this.useDefaultLang=s,this.extend=u,c&&(this.store=new W0),f&&this.setDefaultLang(f)}setDefaultLang(e){if(e===this.defaultLang)return;let n=this.retrieveTranslations(e);typeof n<"u"?(this.defaultLang==null&&(this.defaultLang=e),n.pipe(Ve(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return ne(this.translations[e]);this.currentLang||(this.currentLang=e);let n=this.retrieveTranslations(e);return hi(n)?(n.pipe(Ve(1)).subscribe(()=>{this.changeLang(e)}),n):(this.changeLang(e),ne(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let n=this.currentLoader.getTranslation(e).pipe(Hs(1),Ve(1));return this.loadingTranslations=n.pipe(le(o=>this.compiler.compileTranslations(o,e)),Hs(1),Ve(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[e]=this.extend&&this.translations[e]?q(q({},o),this.translations[e]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),n}setTranslation(e,n,o=!1){let r=this.compiler.compileTranslations(n,e);(o||this.extend)&&this.translations[e]?this.translations[e]=B_(this.translations[e],r):this.translations[e]=r,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let n=e.filter(o=>!this.langs.includes(o));n.length>0&&(this.langs=[...this.langs,...n])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,n,o){let r;if(e&&(r=this.runInterpolation(j_(e,n),o)),r===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(r=this.runInterpolation(j_(this.translations[this.defaultLang],n),o)),r===void 0){let a={key:n,translateService:this};typeof o<"u"&&(a.interpolateParams=o),r=this.missingTranslationHandler.handle(a)}return r!==void 0?r:n}runInterpolation(e,n){if(W_(e))return e.map(o=>this.runInterpolation(o,n));if(Y0(e)){let o={};for(let r in e){let a=this.runInterpolation(e[r],n);a!==void 0&&(o[r]=a)}return o}else return this.parser.interpolate(e,n)}getParsedResult(e,n,o){if(n instanceof Array){let r={},a=!1;for(let c of n)r[c]=this.getParsedResultForKey(e,c,o),a=a||hi(r[c]);if(!a)return r;let s=n.map(c=>$0(r[c]));return Ja(s).pipe(le(c=>{let u={};return c.forEach((f,h)=>{u[n[h]]=f}),u}))}return this.getParsedResultForKey(e,n,o)}get(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(po(o=>$0(this.getParsedResult(o,e,n)))):$0(this.getParsedResult(this.translations[this.currentLang],e,n))}getStreamOnTranslationChange(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return Yi(qi(()=>this.get(e,n)),this.onTranslationChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}stream(e,n){if(!tc(e)||!e.length)throw new Error('Parameter "key" required');return Yi(qi(()=>this.get(e,n)),this.onLangChange.pipe(at(o=>{let r=this.getParsedResult(o.translations,e,n);return $0(r)})))}instant(e,n){if(!tc(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let o=this.getParsedResult(this.translations[this.currentLang],e,n);return hi(o)?Array.isArray(e)?e.reduce((r,a)=>(r[a]=a,r),{}):e:o}set(e,n,o=this.currentLang){uZ(this.translations[o],e,Y_(n)?this.compiler.compile(n,o):this.compiler.compileTranslations(n,o)),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}static \u0275fac=function(n){return new(n||t)(be(W0),be(cd),be(dd),be(ld),be(G0),be(U_),be(H_),be(G_),be($_))};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pe=(()=>{class t{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,n){this.translate=e,this._ref=n}updateValue(e,n,o){let r=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(o){let a=this.translate.getParsedResult(o,e,n);hi(a)?a.subscribe(r):r(a)}this.translate.get(e,n).subscribe(r)}transform(e,...n){if(!e||!e.length)return e;if(zp(e,this.lastKey)&&zp(n,this.lastParams))return this.value;let o;if(tc(n[0])&&n.length)if(Y_(n[0])&&n[0].length){let r=n[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{o=JSON.parse(r)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else Y0(n[0])&&(o=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{this.lastKey&&r.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o,r.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)(Me(zi,16),Me(we,16))};static \u0275pipe=wt({name:"translate",type:t,pure:!1});static \u0275prov=z({token:t,factory:t.\u0275fac})}return t})();var q_=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:iE},e.compiler||{provide:dd,useClass:aE},e.parser||{provide:ld,useClass:rE},e.missingTranslationHandler||{provide:G0,useClass:oE},W0,{provide:H_,useValue:e.isolate},{provide:U_,useValue:e.useDefaultLang},{provide:G_,useValue:e.extend},{provide:$_,useValue:e.defaultLanguage},zi]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:cd,useClass:iE},e.compiler||{provide:dd,useClass:aE},e.parser||{provide:ld,useClass:rE},e.missingTranslationHandler||{provide:G0,useClass:oE},{provide:H_,useValue:e.isolate},{provide:U_,useValue:e.useDefaultLang},{provide:G_,useValue:e.extend},{provide:$_,useValue:e.defaultLanguage},zi]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})();var Q_={mifos_x:{version:"260203",hash:"58adc0a"},allow_switching_backend_instance:!0};var qe=window.env||{},je={production:!0,version:Q_.mifos_x.version,hash:Q_.mifos_x.hash,fineractPlatformTenantId:qe.fineractPlatformTenantId||"default",fineractPlatformTenantIds:qe.fineractPlatformTenantIds||"default",baseApiUrls:qe.fineractApiUrls||"https://sandbox.mifos.community,https://demo.mifos.community,https://localhost:8443,"+window.location.origin,baseApiUrl:qe.fineractApiUrl||(qe.fineractApiUrls?.length>0?qe.fineractApiUrls.split(",")[0]:window.location.origin),oauthServerUrl:qe.oauthServerUrl||qe.fineractApiUrl+qe.apiProvider,allowServerSwitch:qe.allowServerSwitch||"true",apiProvider:qe.apiProvider||"/fineract-provider/api",apiVersion:qe.apiVersion||"/v1",apiActuator:qe.apiActuator||"/fineract-provider",serverUrl:"",oauth:{enabled:qe.oauthServerEnabled===!0,serverUrl:qe.oauthServerUrl||"",logoutUrl:qe.oauthServerLogoutUrl||"",appId:qe.oauthAppId||"",authorizeUrl:qe.oauthAuthorizeUrl||"",tokenUrl:qe.oauthTokenUrl||"",redirectUri:qe.oauthRedirectUri||"",scope:qe.oauthScope||""},enableRememberMe:!1,warningDialog:{title:"Warning",content:"This system is for authorized use only. Unauthorized access will result in possible legal action. By accessing this system, you acknowledge that you are authorized to do so and that all data stored and processed here is confidential.",buttonText:"Close"},defaultLanguage:qe.defaultLanguage||"en-US",supportedLanguages:qe.supportedLanguages||"cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW",preloadClients:qe.preloadClients||!0,defaultCharDelimiter:qe.defaultCharDelimiter||",",displayBackEndInfo:qe.displayBackEndInfo||"true",displayTenantSelector:qe.displayTenantSelector||"true",productionMode:qe.productionMode==="true"||qe.productionMode===!0||!1,tenantLogoUrl:qe.tenantLogoUrl||"assets/images/default_home.png",tenantLogoUrlDark:qe.tenantLogoUrlDark||"assets/images/white-mifos.png",documentationBaseUrl:qe.documentationBaseUrl||"https://mifosforge.jira.com/wiki",waitTimeForNotifications:qe.waitTimeForNotifications||60,waitTimeForCOBCatchUp:qe.waitTimeForCOBCatchUp||30,session:{timeout:{idleTimeout:qe.sessionIdleTimeout||3e5}},httpCacheEnabled:qe.httpCacheEnabled||!1,mifosInterbankTransfersApiUrl:qe.mifosInterbankTransfersApiUrl||"https://apis.mifos.community",mifosInterbankTransfersApiProvider:qe.mifosInterbankTransfersApiProvider||"/vnext1",mifosInterbankTransfersApiVersion:qe.mifosInterbankTransfersApiVersion||"/v1.0",mifosInterbankTransfersEnabled:qe.mifosInterbankTransfersEnabled??!0,minPasswordLength:qe.minPasswordLength||12,complianceHideClientData:qe.complianceHideClientData==="true"||qe.complianceHideClientData===!0||!1,OIDC:{oidcServerEnabled:qe.oidcServerEnabled===!0||qe.oidcServerEnabled==="true"||qe.FINERACT_PLUGIN_OIDC_ENABLED==="true",oidcBaseUrl:qe.oidcBaseUrl||qe.FINERACT_PLUGIN_OIDC_BASE_URL||"",oidcClientId:qe.oidcClientId||qe.FINERACT_PLUGIN_OIDC_CLIENT_ID||"",oidcApiUrl:qe.oidcApiUrl||qe.FINERACT_PLUGIN_OIDC_API_URL||"",oidcFrontUrl:qe.oidcFrontUrl||qe.FINERACT_PLUGIN_OIDC_FRONTEND_URL||""}};je.serverUrl=`${je.baseApiUrl}${je.apiProvider}${je.apiVersion}`;var sE=(()=>{class t{transform(e,n,o,r){if(e){if(n==="loan"&&(o==="closed"?e=e.filter(a=>a.status.code==="loanStatusType.closed.written.off"||a.status.code==="loanStatusType.closed.obligations.met"||a.status.code==="loanStatusType.closed.reschedule.outstanding.amount"||a.status.code==="loanStatusType.withdrawn.by.client"||a.status.code==="loanStatusType.rejected"):e=e.filter(a=>a.status.code!=="loanStatusType.closed.written.off"&&a.status.code!=="loanStatusType.closed.obligations.met"&&a.status.code!=="loanStatusType.closed.reschedule.outstanding.amount"&&a.status.code!=="loanStatusType.withdrawn.by.client"&&a.status.code!=="loanStatusType.rejected")),n==="saving"&&(r==="isFixed"?e=e.filter(a=>a.depositType.value==="Fixed Deposit"):r==="isRecurring"?e=e.filter(a=>a.depositType.value==="Recurring Deposit"):r==="isSavings"&&(e=e.filter(a=>a.depositType.value==="Savings")),o==="closed"?e=e.filter(a=>a.status.code==="savingsAccountStatusType.withdrawn.by.applicant"||a.status.code==="savingsAccountStatusType.closed"||a.status.code==="savingsAccountStatusType.pre.mature.closure"||a.status.code==="savingsAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="savingsAccountStatusType.withdrawn.by.applicant"&&a.status.code!=="savingsAccountStatusType.closed"&&a.status.code!=="savingsAccountStatusType.pre.mature.closure"&&a.status.code!=="savingsAccountStatusType.rejected")),n==="share"&&(o==="closed"?e=e.filter(a=>a.status.code==="shareAccountStatusType.closed"||a.status.code==="shareAccountStatusType.rejected"):e=e.filter(a=>a.status.code!=="shareAccountStatusType.closed"&&a.status.code!=="shareAccountStatusType.rejected")),n==="guarantor")if(o===!1)e=e.filter(a=>a.status);else return e;return n==="clientApproval"&&(e=e.filter(a=>a.active===!1&&a.status.value==="Pending")),e}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"accountsFilter",type:t,pure:!0})}}return t})();var cE=(()=>{class t{transform(e,n,o,r){return e&&(e=e.filter(a=>!(a.currency.code!==o||r&&a.chargeTimeType.id===12||n.filter(s=>s.id===a.id).length))),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesFilter",type:t,pure:!0})}}return t})();var lE=(()=>{class t{transform(e,n){return e&&(e=e.filter(o=>o.penalty===n)),e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"chargesPenaltyFilter",type:t,pure:!0})}}return t})();var Ia=(()=>{class t{constructor(){this.alertEvent=new U}alert(e){this.alertEvent.emit(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var md=uo(yo());var zo=(()=>{class t{constructor(){this.datePipe=d(id)}static{this.DEFAULT_DATEFORMAT="yyyy-MM-dd"}static{this.DEFAULT_DATETIMEFORMAT="yyyy-MM-dd HH:mm"}getDate(e){return this.datePipe.transform(e,"yyyy-MM-dd")}formatDate(e,n){return new id(this.language.code).transform(e,n)}formatDateAsString(e,n){let o=n.replace(/y/g,"Y").replace(/d/g,"D").replace(/a/g,"A");return(0,md.default)(e).format(o)}parseDate(e){return e instanceof Array?(0,md.default)(e.join("-"),"YYYY-MM-DD").toDate():(0,md.default)(e).toDate()}parseDatetime(e){return(0,md.default)(e).toDate()}convertToDate(e,n){let o=n.replace(/y/g,"Y").replace(/d/g,"D").replace(/a/g,"A");return(0,md.default)(e,o).toDate()}get language(){return localStorage.getItem("mifosXLanguage")?JSON.parse(localStorage.getItem("mifosXLanguage")):"en"}calculateDiff(e,n){return Math.floor((Date.UTC(n.getFullYear(),n.getMonth(),n.getDate())-Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))/(1e3*60*60*24))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var tn=(()=>{class t{constructor(){this.alertService=d(Ia),this.dateUtils=d(zo),this.minAllowedDate=new Date(1950,0,1),this.maxAllowedDate=new Date(2100,0,1)}static{this.businessDateFormat="yyyy-MM-dd"}static{this.businessDateConfigName="enable-business-date"}static{this.businessDateType="BUSINESS_DATE"}static{this.cobDateType="COB_DATE"}setDateFormat(e){localStorage.setItem("mifosXDateFormat",JSON.stringify(e))}setLanguage(e){localStorage.setItem("mifosXLanguage",JSON.stringify(e))}setDecimalToDisplay(e){localStorage.setItem("mifosXDecimalsToDisplay",e)}setDefaultLanguage(){let e=je.defaultLanguage?je.defaultLanguage:"en-US";this.setLanguage({name:e,code:e.substring(0,2)})}setServer(e){localStorage.setItem("mifosXServerURL",e)}setServers(e){localStorage.setItem("mifosXServers",JSON.stringify(e))}setTenantIdentifiers(e){localStorage.setItem("mifosXTenantIdentifiers",JSON.stringify(e))}setTenantIdentifier(e){localStorage.setItem("mifosXTenantIdentifier",e)}setBusinessDate(e){localStorage.setItem("mifosXServerDate",e)}setBusinessDateConfig(e){localStorage.setItem("mifosXServerBusinessDateEnabled",e)}get dateFormat(){return JSON.parse(localStorage.getItem("mifosXDateFormat"))}get language(){return localStorage.getItem("mifosXLanguage")||this.setDefaultLanguage(),JSON.parse(localStorage.getItem("mifosXLanguage"))}get languageCode(){let e=this.language.code;return e==="es"?"es-MX":e==="en"?"en-US":e+"-"+e.toUpperCase()}get decimals(){return localStorage.getItem("mifosXDecimalsToDisplay")?localStorage.getItem("mifosXDecimalsToDisplay"):"2"}get servers(){return JSON.parse(localStorage.getItem("mifosXServers"))}get server(){return localStorage.getItem("mifosXServerURL")?localStorage.getItem("mifosXServerURL"):je.baseApiUrl&&je.baseApiUrl!==""?je.baseApiUrl:this.servers()[0]}get baseServerUrl(){return this.server+je.apiProvider}get serverUrl(){return this.server+je.apiProvider+je.apiVersion}get serverHost(){return this.server}get businessDate(){return this.dateUtils.convertToDate(localStorage.getItem("mifosXServerDate"),t.businessDateFormat)}get businessDateConfig(){return localStorage.getItem("mifosXServerBusinessDateEnabled")}get minPastDate(){return this.minAllowedDate}get maxFutureDate(){return this.maxAllowedDate}get tenantIdentifiers(){return JSON.parse(localStorage.getItem("mifosXTenantIdentifiers"))}get tenantIdentifier(){return localStorage.getItem("mifosXTenantIdentifier")}validateBusinessDateStatus(e){e.some(n=>{if(n.name===t.businessDateConfigName)return n.enabled})}getBusinessDates(e,n){e.some(o=>{if(o.type===n){let r=new Date(o.date);this.setBusinessDate(this.dateUtils.formatDate(r,t.businessDateFormat)),this.alertService.alert({type:n+" Set",message:this.dateUtils.formatDate(r,this.dateFormat)});return}})}setThemeDarkEnabled(e){localStorage.setItem("mifosXThemeDarkEnabled",JSON.stringify(e))}get themeDarkEnabled(){return JSON.parse(localStorage.getItem("mifosXThemeDarkEnabled"))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Np=uo(yo()),DDe=uo(uE()),SDe=uo(pE()),kDe=uo(hE()),EDe=uo(_E()),IDe=uo(vE()),ODe=uo(CE()),TDe=uo(ME()),PDe=uo(DE()),LDe=uo(kE()),ADe=uo(IE()),RDe=uo(TE());var Jo=(()=>{class t{constructor(){this.settingsService=d(tn),this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n){let o=this.settingsService.dateFormat.replace("dd","DD");if(typeof e>"u"||e===null)return"";let r=this.settingsService.language.code,a;r?r.includes("-")?a=r.split("-")[0]:a=r:a="en",Np.default.locale(a);let s;return Array.isArray(e)?s=(0,Np.default)(e.join("-"),"YYYY-MM-DD"):s=(0,Np.default)(e),s.isValid()?n?s.format(n):s.format(o):""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"dateFormat",type:t,pure:!1})}}return t})();var q0=uo(yo());var Oa=(()=>{class t{transform(e,n){if(e==null||e==="")return"";let o;if(Array.isArray(e)){let[a,s,c,u,f,h]=e;u!=null?o=(0,q0.default)({year:a,month:(s??1)-1,date:c,hour:u,minute:f??0,second:h??0}):o=(0,q0.default)({year:a,month:(s??1)-1,date:c})}else typeof e=="number"&&e<1e12?o=q0.default.unix(e):o=(0,q0.default)(e);let r=n??"YYYY-MM-DDTHH:mm:ssZ";return o.format(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"datetimeFormat",type:t,pure:!0})}}return t})();var PE=(()=>{class t{transform(e){if(e){if(/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi.test(e))return e.split("-")[4];{let r=e.length;return r>20?e.substring(r-20,r):e}}else return""}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"externalIdentifier",type:t,pure:!0})}}return t})();var LE=new WeakMap,AE=(()=>{class t{constructor(){this.sanitizer=d(hs)}transform(e,n,o,r){if(!n||!o||e===null||e===void 0)return"";let a=LE.get(n);a||(a=new Map,LE.set(n,a));let s=a.get(o);if(!s){if(s=new Map,Array.isArray(n))for(let f of n)f&&f[o]!==void 0&&f[o]!==null&&s.set(f[o],f);a.set(o,s)}let c=s.get(e),u=c?c[r]??"":"";return typeof u=="string"?this.sanitizer.sanitize(Wn.HTML,u)||"":String(u||"")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"find",type:t,pure:!0})}}return t})();var nc=(()=>{class t{constructor(){this.decimalFormat=d(R0),this.settingsService=d(tn)}transform(e,n){if(e===void 0)return n||"";let o=this.settingsService.decimals,r=`1.${o}-${o}`;return this.decimalFormat.transform(e,r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"formatNumber",type:t,pure:!0})}}return t})();var NE=uo(zE());var Bp=(()=>{class t{transform(e){if(e.charAt(0)==="{"&&e.charAt(e.length-1)==="}")try{return NE.json(e)}catch{return e}return e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"prettyPrint",type:t,pure:!0})}}return t})();var FE=(()=>{class t{transform(e){return{true:"status-active",false:"status-deleted",Active:"status-active",Block:"status-block","charges.StatusType.active.true":"status-active","loanStatusType.submitted.and.pending.approval":"status-pending","loanStatusType.approved":"status-approved","loanStatusType.active":"status-active","loanStatusType.overpaid":"status-overpaid","loanStatusType.chargeoff":"status-chargeoff","loanStatusType.activeOverdue":"status-active-overdue","loanSubStatusType.contractTermination":"subStatus-contract-termination","savingsAccountStatusType.submitted.and.pending.approval":"status-pending","savingsAccountStatusType.approved":"status-approved","savingsAccountStatusType.active":"status-active","savingsAccountStatusType.activeInactive":"status-active-overdue","savingsAccountStatusType.activeDormant":"status-active-overdue","savingsAccountStatusType.matured":"status-matured","shareAccountStatusType.submitted.and.pending.approval":"status-pending","shareAccountStatusType.approved":"status-approved","shareAccountStatusType.active":"status-active","shareAccountStatusType.rejected":"status-rejected","loanProduct.active":"status-active","loanProduct.inActive":"status-inactive","clientStatusType.pending":"status-pending","clientStatusType.closed":"status-closed","clientStatusType.rejected":"status-rejected","clientStatusType.withdraw":"status-withdraw","clientStatusType.active":"status-active","clientStatusType.submitted.and.pending.approval":"status-pending","clientStatusTYpe.approved":"status-approved","clientStatusType.transfer.in.progress":"status-transfer-progress","clientStatusType.transfer.on.hold":"status-transfer-hold","groupingStatusType.active":"status-active","groupingStatusType.pending":"status-pending","groupingStatusType.submitted.and.pending.approval":"status-pending","groupingStatusType.approved":"status-approved","smsCampaignStatus.active":"status-active","smsCampaignStatus.pending":"status-pending","smsCampaignStatus.closed":"status-closed","purchasedSharesStatusType.applied":"status-pending"}[e]??"status-unknown"}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"statusLookup",type:t,pure:!0})}}return t})();var vl=(()=>{class t{constructor(){this.translateService=d(zi),this.onLangChange=this.translateService.onLangChange.subscribe(()=>{})}ngOnDestroy(){this.onLangChange&&this.onLangChange.unsubscribe()}transform(e,n,o="labels"){if(!e)return e;let r=`${o}.${n}.${e}`;return this.translateService.instant(r)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"translateKey",type:t,pure:!1})}}return t})();var jp=(()=>{class t{transform(e,n){if(e.length<=40)return e;let o=e.substring(0,30);return n&&(o=e.substring(0,n)),o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"truncateText",type:t,pure:!0})}}return t})();var BE=(()=>{class t{transform(e){e=decodeURIComponent(e);let n=e.slice(1).split("/");if(e.includes("?")){let r=n.pop(),a=r.slice(0,r.indexOf("?"));n.push(a)}return n.map(r=>r.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")).join(" | ")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"urlToString",type:t,pure:!0})}}return t})();var Hp=(()=>{class t{constructor(){this.translateService=d(zi)}transform(e,...n){if(e==null)return null;let o=e?"Yes":"No";return this.translateService.instant("labels.buttons."+o)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275pipe=wt({name:"yesNo",type:t,pure:!1})}}return t})();var jE=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({providers:[FE,sE,cE,lE,AE,BE,Jo,Oa,PE,nc,Hp,Bp,vl,jp],imports:[fe]})}}return t})();var Up=class{validateSignature(i){return Promise.resolve(null)}validateAtHash(i){return Promise.resolve(!0)}},$p=class{};var Q0=class{},fZ=(()=>{class t extends Q0{now(){return Date.now()}new(){return new Date}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})()}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var Gp=class{},Wp=class{},hZ=(()=>{class t{constructor(){this.data=new Map}getItem(e){return this.data.get(e)}removeItem(e){this.data.delete(e)}setItem(e,n){this.data.set(e,n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var K0=class{constructor(i){this.type=i}},Co=class extends K0{constructor(i,e=null){super(i),this.info=e}},Xr=class extends K0{constructor(i,e=null){super(i),this.info=e}},Vn=class extends K0{constructor(i,e,n=null){super(i),this.reason=e,this.params=n}};function HE(t){let i=t.replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(atob(i).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function UE(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var pd=class{constructor(i){this.clientId="",this.redirectUri="",this.postLogoutRedirectUri="",this.redirectUriAsPostLogoutRedirectUriFallback=!0,this.loginUrl="",this.scope="openid profile",this.resource="",this.rngUrl="",this.oidc=!0,this.requestAccessToken=!0,this.options=null,this.issuer="",this.logoutUrl="",this.clearHashAfterLogin=!0,this.tokenEndpoint=null,this.revocationEndpoint=null,this.customTokenParameters=[],this.userinfoEndpoint=null,this.responseType="",this.showDebugInformation=!1,this.silentRefreshRedirectUri="",this.silentRefreshMessagePrefix="",this.silentRefreshShowIFrame=!1,this.siletRefreshTimeout=1e3*20,this.silentRefreshTimeout=1e3*20,this.dummyClientSecret="",this.requireHttps="remoteOnly",this.strictDiscoveryDocumentValidation=!0,this.jwks=null,this.customQueryParams=null,this.silentRefreshIFrameName="angular-oauth-oidc-silent-refresh-iframe",this.timeoutFactor=.75,this.sessionChecksEnabled=!1,this.sessionCheckIntervall=3*1e3,this.sessionCheckIFrameUrl=null,this.sessionCheckIFrameName="angular-oauth-oidc-check-session-iframe",this.disableAtHashCheck=!1,this.skipSubjectCheck=!1,this.useIdTokenHintForSilentRefresh=!1,this.skipIssuerCheck=!1,this.nonceStateSeparator=";",this.useHttpBasicAuth=!1,this.decreaseExpirationBySec=0,this.waitForTokenInMsec=0,this.disablePKCE=!1,this.preserveRequestedRoute=!1,this.disableIdTokenTimer=!1,this.checkOrigin=!1,this.openUri=e=>{location.href=e},i&&Object.assign(this,i)}},yl=class{encodeKey(i){return encodeURIComponent(i)}encodeValue(i){return encodeURIComponent(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}},Yp=class{};var $E=(()=>{class t{getHashFragmentParams(e){let n=e||window.location.hash;if(n=decodeURIComponent(n),n.indexOf("#")!==0)return{};let o=n.indexOf("?");return o>-1?n=n.substr(o+1):n=n.substr(1),this.parseQueryString(n)}parseQueryString(e){let n={},o,r,a,s,c,u;if(e===null)return n;let f=e.split("&");for(let h=0;h=64;){for(r=i[0],a=i[1],s=i[2],c=i[3],u=i[4],f=i[5],h=i[6],y=i[7],S=0;S<16;S++)Y=n+S*4,t[S]=(e[Y]&255)<<24|(e[Y+1]&255)<<16|(e[Y+2]&255)<<8|e[Y+3]&255;for(S=16;S<64;S++)x=t[S-2],Q=(x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,x=t[S-15],X=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,t[S]=(Q+t[S-7]|0)+(X+t[S-16]|0);for(S=0;S<64;S++)Q=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(y+(_Z[S]+t[S]|0)|0)|0,X=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&a^r&s^a&s)|0,y=h,h=f,f=u,u=c+Q|0,c=s,s=a,a=r,r=Q+X|0;i[0]+=r,i[1]+=a,i[2]+=s,i[3]+=c,i[4]+=u,i[5]+=f,i[6]+=h,i[7]+=y,n+=64,o-=64}return n}var lb=class{constructor(){this.digestLength=GE,this.blockSize=gZ,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}reset(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this}clean(){for(let i=0;i0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=i[n++],e--;this.bufferLength===64&&(cb(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(n=cb(this.temp,this.state,i,n,e),e%=64);e>0;)this.buffer[this.bufferLength++]=i[n++],e--;return this}finish(i){if(!this.finished){let e=this.bytesHashed,n=this.bufferLength,o=e/536870912|0,r=e<<3,a=e%64<56?64:128;this.buffer[n]=128;for(let s=n+1;s>>24&255,this.buffer[a-7]=o>>>16&255,this.buffer[a-6]=o>>>8&255,this.buffer[a-5]=o>>>0&255,this.buffer[a-4]=r>>>24&255,this.buffer[a-3]=r>>>16&255,this.buffer[a-2]=r>>>8&255,this.buffer[a-1]=r>>>0&255,cb(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(let e=0;e<8;e++)i[e*4+0]=this.state[e]>>>24&255,i[e*4+1]=this.state[e]>>>16&255,i[e*4+2]=this.state[e]>>>8&255,i[e*4+3]=this.state[e]>>>0&255;return this}digest(){let i=new Uint8Array(this.digestLength);return this.finish(i),i}_saveState(i){for(let e=0;e{class t{calcHash(e,n){return Yt(this,null,function*(){return yZ(bZ(vZ(e)))})}toHashString2(e){let n="";for(let o of e)n+=String.fromCharCode(o);return n}toHashString(e){let n=new Uint8Array(e),o="";for(let r of n)o+=String.fromCharCode(r);return o}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})(),Kp=(()=>{class t extends pd{constructor(e,n,o,r,a,s,c,u,f,h){super(),this.ngZone=e,this.http=n,this.config=a,this.urlHelper=s,this.logger=c,this.crypto=u,this.dateTimeService=h,this.discoveryDocumentLoaded=!1,this.state="",this.eventsSubject=new B,this.discoveryDocumentLoadedSubject=new B,this.grantTypesSupported=[],this.inImplicitFlow=!1,this.saveNoncesInLocalStorage=!1,this.debug("angular-oauth2-oidc v10"),this.document=f,a||(a={}),this.discoveryDocumentLoaded$=this.discoveryDocumentLoadedSubject.asObservable(),this.events=this.eventsSubject.asObservable(),r&&(this.tokenValidationHandler=r),a&&this.configure(a);try{o?this.setStorage(o):typeof sessionStorage<"u"&&this.setStorage(sessionStorage)}catch(y){console.error("No OAuthStorage provided and cannot access default (sessionStorage).Consider providing a custom OAuthStorage implementation in your module.",y)}if(this.checkLocalStorageAccessable()){let y=window?.navigator?.userAgent;(y?.includes("MSIE ")||y?.includes("Trident"))&&(this.saveNoncesInLocalStorage=!0)}this.setupRefreshTimer()}checkLocalStorageAccessable(){if(typeof window>"u")return!1;let e="test";try{return typeof window.localStorage>"u"?!1:(localStorage.setItem(e,e),localStorage.removeItem(e),!0)}catch{return!1}}configure(e){Object.assign(this,new pd,e),this.config=Object.assign({},new pd,e),this.sessionChecksEnabled&&this.setupSessionCheck(),this.configChanged()}configChanged(){this.setupRefreshTimer()}restartSessionChecksIfStillLoggedIn(){this.hasValidIdToken()&&this.initSessionCheck()}restartRefreshTimerIfStillLoggedIn(){this.setupExpirationTimers()}setupSessionCheck(){this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.initSessionCheck()})}setupAutomaticSilentRefresh(e={},n,o=!0){let r=!0;this.clearAutomaticRefreshTimer(),this.automaticRefreshSubscription=this.events.pipe(It(a=>{a.type==="token_received"?r=!0:a.type==="logout"&&(r=!1)}),Oe(a=>a.type==="token_expires"&&(n==null||n==="any"||a.info===n)),$o(1e3)).subscribe(()=>{r&&this.refreshInternal(e,o).catch(()=>{this.debug("Automatic silent refresh did not work")})}),this.restartRefreshTimerIfStillLoggedIn()}refreshInternal(e,n){return!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken():this.silentRefresh(e,n)}loadDiscoveryDocumentAndTryLogin(e=null){return this.loadDiscoveryDocument().then(()=>this.tryLogin(e))}loadDiscoveryDocumentAndLogin(e=null){return e=e||{},this.loadDiscoveryDocumentAndTryLogin(e).then(()=>{if(!this.hasValidIdToken()||!this.hasValidAccessToken()){let n=typeof e.state=="string"?e.state:"";return this.initLoginFlow(n),!1}else return!0})}debug(...e){this.showDebugInformation&&this.logger.debug(...e)}validateUrlFromDiscoveryDocument(e){let n=[],o=this.validateUrlForHttps(e),r=this.validateUrlAgainstIssuer(e);return o||n.push("https for all urls required. Also for urls received by discovery."),r||n.push("Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation."),n}validateUrlForHttps(e){if(!e)return!0;let n=e.toLowerCase();return this.requireHttps===!1||(n.match(/^http:\/\/localhost($|[:/])/)||n.match(/^http:\/\/localhost($|[:/])/))&&this.requireHttps==="remoteOnly"?!0:n.startsWith("https://")}assertUrlNotNullAndCorrectProtocol(e,n){if(!e)throw new Error(`'${n}' should not be null`);if(!this.validateUrlForHttps(e))throw new Error(`'${n}' must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).`)}validateUrlAgainstIssuer(e){return!this.strictDiscoveryDocumentValidation||!e?!0:e.toLowerCase().startsWith(this.issuer.toLowerCase())}setupRefreshTimer(){if(typeof window>"u"){this.debug("timer not supported on this plattform");return}(this.hasValidIdToken()||this.hasValidAccessToken())&&(this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()),this.tokenReceivedSubscription&&this.tokenReceivedSubscription.unsubscribe(),this.tokenReceivedSubscription=this.events.pipe(Oe(e=>e.type==="token_received")).subscribe(()=>{this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()})}setupExpirationTimers(){this.hasValidAccessToken()&&this.setupAccessTokenTimer(),!this.disableIdTokenTimer&&this.hasValidIdToken()&&this.setupIdTokenTimer()}setupAccessTokenTimer(){let e=this.getAccessTokenExpiration(),n=this.getAccessTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.accessTokenTimeoutSubscription=ne(new Xr("token_expires","access_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}setupIdTokenTimer(){let e=this.getIdTokenExpiration(),n=this.getIdTokenStoredAt(),o=this.calcTimeout(n,e);this.ngZone.runOutsideAngular(()=>{this.idTokenTimeoutSubscription=ne(new Xr("token_expires","id_token")).pipe(ts(o)).subscribe(r=>{this.ngZone.run(()=>{this.eventsSubject.next(r)})})})}stopAutomaticRefresh(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.clearAutomaticRefreshTimer()}clearAccessTokenTimer(){this.accessTokenTimeoutSubscription&&this.accessTokenTimeoutSubscription.unsubscribe()}clearIdTokenTimer(){this.idTokenTimeoutSubscription&&this.idTokenTimeoutSubscription.unsubscribe()}clearAutomaticRefreshTimer(){this.automaticRefreshSubscription&&this.automaticRefreshSubscription.unsubscribe()}calcTimeout(e,n){let o=this.dateTimeService.now(),r=(n-e)*this.timeoutFactor-(o-e),a=Math.max(0,r),s=2147483647;return a>s?s:a}setStorage(e){this._storage=e,this.configChanged()}loadDiscoveryDocument(e=null){return new Promise((n,o)=>{if(e||(e=this.issuer||"",e.endsWith("/")||(e+="/"),e+=".well-known/openid-configuration"),!this.validateUrlForHttps(e)){o("issuer must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return}this.http.get(e).subscribe(r=>{if(!this.validateDiscoveryDocument(r)){this.eventsSubject.next(new Vn("discovery_document_validation_error",null)),o("discovery_document_validation_error");return}this.loginUrl=r.authorization_endpoint,this.logoutUrl=r.end_session_endpoint||this.logoutUrl,this.grantTypesSupported=r.grant_types_supported,this.issuer=r.issuer,this.tokenEndpoint=r.token_endpoint,this.userinfoEndpoint=r.userinfo_endpoint||this.userinfoEndpoint,this.jwksUri=r.jwks_uri,this.sessionCheckIFrameUrl=r.check_session_iframe||this.sessionCheckIFrameUrl,this.discoveryDocumentLoaded=!0,this.discoveryDocumentLoadedSubject.next(r),this.revocationEndpoint=r.revocation_endpoint||this.revocationEndpoint,this.sessionChecksEnabled&&this.restartSessionChecksIfStillLoggedIn(),this.loadJwks().then(a=>{let s={discoveryDocument:r,jwks:a},c=new Co("discovery_document_loaded",s);this.eventsSubject.next(c),n(c)}).catch(a=>{this.eventsSubject.next(new Vn("discovery_document_load_error",a)),o(a)})},r=>{this.logger.error("error loading discovery document",r),this.eventsSubject.next(new Vn("discovery_document_load_error",r)),o(r)})})}loadJwks(){return new Promise((e,n)=>{this.jwksUri?this.http.get(this.jwksUri).subscribe(o=>{this.jwks=o,e(o)},o=>{this.logger.error("error loading jwks",o),this.eventsSubject.next(new Vn("jwks_load_error",o)),n(o)}):e(null)})}validateDiscoveryDocument(e){let n;return!this.skipIssuerCheck&&e.issuer!==this.issuer?(this.logger.error("invalid issuer in discovery document","expected: "+this.issuer,"current: "+e.issuer),!1):(n=this.validateUrlFromDiscoveryDocument(e.authorization_endpoint),n.length>0?(this.logger.error("error validating authorization_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.end_session_endpoint),n.length>0?(this.logger.error("error validating end_session_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.token_endpoint),n.length>0&&this.logger.error("error validating token_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.revocation_endpoint),n.length>0&&this.logger.error("error validating revocation_endpoint in discovery document",n),n=this.validateUrlFromDiscoveryDocument(e.userinfo_endpoint),n.length>0?(this.logger.error("error validating userinfo_endpoint in discovery document",n),!1):(n=this.validateUrlFromDiscoveryDocument(e.jwks_uri),n.length>0?(this.logger.error("error validating jwks_uri in discovery document",n),!1):(this.sessionChecksEnabled&&!e.check_session_iframe&&this.logger.warn("sessionChecksEnabled is activated but discovery document does not contain a check_session_iframe field"),!0)))))}fetchTokenUsingPasswordFlowAndLoadUserProfile(e,n,o=new ki){return this.fetchTokenUsingPasswordFlow(e,n,o).then(()=>this.loadUserProfile())}loadUserProfile(){if(!this.hasValidAccessToken())throw new Error("Can not load User Profile without access_token");if(!this.validateUrlForHttps(this.userinfoEndpoint))throw new Error("userinfoEndpoint must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return new Promise((e,n)=>{let o=new ki().set("Authorization","Bearer "+this.getAccessToken());this.http.get(this.userinfoEndpoint,{headers:o,observe:"response",responseType:"text"}).subscribe(r=>{if(this.debug("userinfo received",JSON.stringify(r)),r.headers.get("content-type").startsWith("application/json")){let a=JSON.parse(r.body),s=this.getIdentityClaims()||{};if(!this.skipSubjectCheck&&this.oidc&&(!s.sub||a.sub!==s.sub)){n(`if property oidc is true, the received user-id (sub) has to be the user-id of the user that has logged in with oidc. if you are not using oidc but just oauth2 password flow set oidc to false`);return}a=Object.assign({},s,a),this._storage.setItem("id_token_claims_obj",JSON.stringify(a)),this.eventsSubject.next(new Co("user_profile_loaded")),e({info:a})}else this.debug("userinfo is not JSON, treating it as JWE/JWS"),this.eventsSubject.next(new Co("user_profile_loaded")),e(JSON.parse(r.body))},r=>{this.logger.error("error loading user info",r),this.eventsSubject.next(new Vn("user_profile_load_error",r)),n(r)})})}fetchTokenUsingPasswordFlow(e,n,o=new ki){let r={username:e,password:n};return this.fetchTokenUsingGrant("password",r,o)}fetchTokenUsingGrant(e,n,o=new ki){this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint");let r=new te({encoder:new yl}).set("grant_type",e).set("scope",this.scope);if(this.useHttpBasicAuth){let a=btoa(`${this.clientId}:${this.dummyClientSecret}`);o=o.set("Authorization","Basic "+a)}if(this.useHttpBasicAuth||(r=r.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(r=r.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let a of Object.getOwnPropertyNames(this.customQueryParams))r=r.set(a,this.customQueryParams[a]);for(let a of Object.keys(n))r=r.set(a,n[a]);return o=o.set("Content-Type","application/x-www-form-urlencoded"),new Promise((a,s)=>{this.http.post(this.tokenEndpoint,r,{headers:o}).subscribe(c=>{this.debug("tokenResponse",c),this.storeAccessTokenResponse(c.access_token,c.refresh_token,c.expires_in||this.fallbackAccessTokenExpirationTimeInSec,c.scope,this.extractRecognizedCustomParameters(c)),this.oidc&&c.id_token&&this.processIdToken(c.id_token,c.access_token).then(u=>{this.storeIdToken(u),a(c)}),this.eventsSubject.next(new Co("token_received")),a(c)},c=>{this.logger.error("Error performing ${grantType} flow",c),this.eventsSubject.next(new Vn("token_error",c)),s(c)})})}refreshToken(){return this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint"),new Promise((e,n)=>{let o=new te({encoder:new yl}).set("grant_type","refresh_token").set("scope",this.scope).set("refresh_token",this._storage.getItem("refresh_token")),r=new ki().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let a=btoa(`${this.clientId}:${this.dummyClientSecret}`);r=r.set("Authorization","Basic "+a)}if(this.useHttpBasicAuth||(o=o.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(o=o.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let a of Object.getOwnPropertyNames(this.customQueryParams))o=o.set(a,this.customQueryParams[a]);this.http.post(this.tokenEndpoint,o,{headers:r}).pipe(at(a=>this.oidc&&a.id_token?Zt(this.processIdToken(a.id_token,a.access_token,!0)).pipe(It(s=>this.storeIdToken(s)),le(()=>a)):ne(a))).subscribe(a=>{this.debug("refresh tokenResponse",a),this.storeAccessTokenResponse(a.access_token,a.refresh_token,a.expires_in||this.fallbackAccessTokenExpirationTimeInSec,a.scope,this.extractRecognizedCustomParameters(a)),this.eventsSubject.next(new Co("token_received")),this.eventsSubject.next(new Co("token_refreshed")),e(a)},a=>{this.logger.error("Error refreshing token",a),this.eventsSubject.next(new Vn("token_refresh_error",a)),n(a)})})}removeSilentRefreshEventListener(){this.silentRefreshPostMessageEventListener&&(window.removeEventListener("message",this.silentRefreshPostMessageEventListener),this.silentRefreshPostMessageEventListener=null)}setupSilentRefreshEventListener(){this.removeSilentRefreshEventListener(),this.silentRefreshPostMessageEventListener=e=>{let n=this.processMessageEventMessage(e);this.checkOrigin&&e.origin!==location.origin&&console.error("wrong origin requested silent refresh!"),this.tryLogin({customHashFragment:n,preventClearHashAfterLogin:!0,customRedirectUri:this.silentRefreshRedirectUri||this.redirectUri}).catch(o=>this.debug("tryLogin during silent refresh failed",o))},window.addEventListener("message",this.silentRefreshPostMessageEventListener)}silentRefresh(e={},n=!0){let o=this.getIdentityClaims()||{};if(this.useIdTokenHintForSilentRefresh&&this.hasValidIdToken()&&(e.id_token_hint=this.getIdToken()),!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");if(typeof this.document>"u")throw new Error("silent refresh is not supported on this platform");let r=this.document.getElementById(this.silentRefreshIFrameName);r&&this.document.body.removeChild(r),this.silentRefreshSubject=o.sub;let a=this.document.createElement("iframe");a.id=this.silentRefreshIFrameName,this.setupSilentRefreshEventListener();let s=this.silentRefreshRedirectUri||this.redirectUri;this.createLoginUrl(null,null,s,n,e).then(h=>{a.setAttribute("src",h),this.silentRefreshShowIFrame||(a.style.display="none"),this.document.body.appendChild(a)});let c=this.events.pipe(Oe(h=>h instanceof Vn),Ao()),u=this.events.pipe(Oe(h=>h.type==="token_received"),Ao()),f=ne(new Vn("silent_refresh_timeout",null)).pipe(ts(this.silentRefreshTimeout));return Jg([c,u,f]).pipe(le(h=>{if(h instanceof Vn)throw h.type==="silent_refresh_timeout"?this.eventsSubject.next(h):(h=new Vn("silent_refresh_error",h),this.eventsSubject.next(h)),h;return h.type==="token_received"&&(h=new Co("silently_refreshed"),this.eventsSubject.next(h)),h})).toPromise()}initImplicitFlowInPopup(e){return this.initLoginFlowInPopup(e)}initLoginFlowInPopup(e){return e=e||{},this.createLoginUrl(null,null,this.silentRefreshRedirectUri,!1,{display:"popup"}).then(n=>new Promise((o,r)=>{let s=null;e.windowRef?e.windowRef&&!e.windowRef.closed&&(s=e.windowRef,s.location.href=n):s=window.open(n,"ngx-oauth2-oidc-login",this.calculatePopupFeatures(e));let c,u=S=>{this.tryLogin({customHashFragment:S,preventClearHashAfterLogin:!0,customRedirectUri:this.silentRefreshRedirectUri}).then(()=>{h(),o(!0)},Y=>{h(),r(Y)})},f=()=>{(!s||s.closed)&&(h(),r(new Vn("popup_closed",{})))};s?c=window.setInterval(f,500):r(new Vn("popup_blocked",{}));let h=()=>{window.clearInterval(c),window.removeEventListener("storage",x),window.removeEventListener("message",y),s!==null&&s.close(),s=null},y=S=>{let Y=this.processMessageEventMessage(S);Y&&Y!==null?(window.removeEventListener("storage",x),u(Y)):console.log("false event firing")},x=S=>{S.key==="auth_hash"&&(window.removeEventListener("message",y),u(S.newValue))};window.addEventListener("message",y),window.addEventListener("storage",x)}))}calculatePopupFeatures(e){let n=e.height||470,o=e.width||500,r=window.screenLeft+(window.outerWidth-o)/2,a=window.screenTop+(window.outerHeight-n)/2;return`location=no,toolbar=no,width=${o},height=${n},top=${a},left=${r}`}processMessageEventMessage(e){let n="#";if(this.silentRefreshMessagePrefix&&(n+=this.silentRefreshMessagePrefix),!e||!e.data||typeof e.data!="string")return;let o=e.data;if(o.startsWith(n))return"#"+o.substr(n.length)}canPerformSessionCheck(){return this.sessionChecksEnabled?this.sessionCheckIFrameUrl?this.getSessionState()?!(typeof this.document>"u"):(console.warn("sessionChecksEnabled is activated but there is no session_state"),!1):(console.warn("sessionChecksEnabled is activated but there is no sessionCheckIFrameUrl"),!1):!1}setupSessionCheckEventListener(){this.removeSessionCheckEventListener(),this.sessionCheckEventListener=e=>{let n=e.origin.toLowerCase(),o=this.issuer.toLowerCase();if(this.debug("sessionCheckEventListener"),!o.startsWith(n)){this.debug("sessionCheckEventListener","wrong origin",n,"expected",o,"event",e);return}switch(e.data){case"unchanged":this.ngZone.run(()=>{this.handleSessionUnchanged()});break;case"changed":this.ngZone.run(()=>{this.handleSessionChange()});break;case"error":this.ngZone.run(()=>{this.handleSessionError()});break}this.debug("got info from session check inframe",e)},this.ngZone.runOutsideAngular(()=>{window.addEventListener("message",this.sessionCheckEventListener)})}handleSessionUnchanged(){this.debug("session check","session unchanged"),this.eventsSubject.next(new Xr("session_unchanged"))}handleSessionChange(){this.eventsSubject.next(new Xr("session_changed")),this.stopSessionCheckTimer(),!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken().then(()=>{this.debug("token refresh after session change worked")}).catch(()=>{this.debug("token refresh did not work after session changed"),this.eventsSubject.next(new Xr("session_terminated")),this.logOut(!0)}):this.silentRefreshRedirectUri?(this.silentRefresh().catch(()=>this.debug("silent refresh failed after session changed")),this.waitForSilentRefreshAfterSessionChange()):(this.eventsSubject.next(new Xr("session_terminated")),this.logOut(!0))}waitForSilentRefreshAfterSessionChange(){this.events.pipe(Oe(e=>e.type==="silently_refreshed"||e.type==="silent_refresh_timeout"||e.type==="silent_refresh_error"),Ao()).subscribe(e=>{e.type!=="silently_refreshed"&&(this.debug("silent refresh did not work after session changed"),this.eventsSubject.next(new Xr("session_terminated")),this.logOut(!0))})}handleSessionError(){this.stopSessionCheckTimer(),this.eventsSubject.next(new Xr("session_error"))}removeSessionCheckEventListener(){this.sessionCheckEventListener&&(window.removeEventListener("message",this.sessionCheckEventListener),this.sessionCheckEventListener=null)}initSessionCheck(){if(!this.canPerformSessionCheck())return;let e=this.document.getElementById(this.sessionCheckIFrameName);e&&this.document.body.removeChild(e);let n=this.document.createElement("iframe");n.id=this.sessionCheckIFrameName,this.setupSessionCheckEventListener();let o=this.sessionCheckIFrameUrl;n.setAttribute("src",o),n.style.display="none",this.document.body.appendChild(n),this.startSessionCheckTimer()}startSessionCheckTimer(){this.stopSessionCheckTimer(),this.ngZone.runOutsideAngular(()=>{this.sessionCheckTimer=setInterval(this.checkSession.bind(this),this.sessionCheckIntervall)})}stopSessionCheckTimer(){this.sessionCheckTimer&&(clearInterval(this.sessionCheckTimer),this.sessionCheckTimer=null)}checkSession(){let e=this.document.getElementById(this.sessionCheckIFrameName);e||this.logger.warn("checkSession did not find iframe",this.sessionCheckIFrameName);let n=this.getSessionState();n||this.stopSessionCheckTimer();let o=this.clientId+" "+n;e.contentWindow.postMessage(o,this.issuer)}createLoginUrl(){return Yt(this,arguments,function*(e="",n="",o="",r=!1,a={}){let s=this,c;o?c=o:c=this.redirectUri;let u=yield this.createAndSaveNonce();if(e?e=u+this.config.nonceStateSeparator+encodeURIComponent(e):e=u,!this.requestAccessToken&&!this.oidc)throw new Error("Either requestAccessToken or oidc or both must be true");this.config.responseType?this.responseType=this.config.responseType:this.oidc&&this.requestAccessToken?this.responseType="id_token token":this.oidc&&!this.requestAccessToken?this.responseType="id_token":this.responseType="token";let f=s.loginUrl.indexOf("?")>-1?"&":"?",h=s.scope;this.oidc&&!h.match(/(^|\s)openid($|\s)/)&&(h="openid "+h);let y=s.loginUrl+f+"response_type="+encodeURIComponent(s.responseType)+"&client_id="+encodeURIComponent(s.clientId)+"&state="+encodeURIComponent(e)+"&redirect_uri="+encodeURIComponent(c)+"&scope="+encodeURIComponent(h);if(this.responseType.includes("code")&&!this.disablePKCE){let[x,S]=yield this.createChallangeVerifierPairForPKCE();this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?localStorage.setItem("PKCE_verifier",S):this._storage.setItem("PKCE_verifier",S),y+="&code_challenge="+x,y+="&code_challenge_method=S256"}n&&(y+="&login_hint="+encodeURIComponent(n)),s.resource&&(y+="&resource="+encodeURIComponent(s.resource)),s.oidc&&(y+="&nonce="+encodeURIComponent(u)),r&&(y+="&prompt=none");for(let x of Object.keys(a))y+="&"+encodeURIComponent(x)+"="+encodeURIComponent(a[x]);if(this.customQueryParams)for(let x of Object.getOwnPropertyNames(this.customQueryParams))y+="&"+x+"="+encodeURIComponent(this.customQueryParams[x]);return y})}initImplicitFlowInternal(e="",n=""){if(this.inImplicitFlow)return;if(this.inImplicitFlow=!0,!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");let o={},r=null;typeof n=="string"?r=n:typeof n=="object"&&(o=n),this.createLoginUrl(e,r,null,!1,o).then(this.config.openUri).catch(a=>{console.error("Error in initImplicitFlow",a),this.inImplicitFlow=!1})}initImplicitFlow(e="",n=""){this.loginUrl!==""?this.initImplicitFlowInternal(e,n):this.events.pipe(Oe(o=>o.type==="discovery_document_loaded")).subscribe(()=>this.initImplicitFlowInternal(e,n))}resetImplicitFlow(){this.inImplicitFlow=!1}callOnTokenReceivedIfExists(e){let n=this;if(e.onTokenReceived){let o={idClaims:n.getIdentityClaims(),idToken:n.getIdToken(),accessToken:n.getAccessToken(),state:n.state};e.onTokenReceived(o)}}storeAccessTokenResponse(e,n,o,r,a){if(this._storage.setItem("access_token",e),r&&!Array.isArray(r)?this._storage.setItem("granted_scopes",JSON.stringify(r.split(" "))):r&&Array.isArray(r)&&this._storage.setItem("granted_scopes",JSON.stringify(r)),this._storage.setItem("access_token_stored_at",""+this.dateTimeService.now()),o){let s=o*1e3,u=this.dateTimeService.new().getTime()+s;this._storage.setItem("expires_at",""+u)}n&&this._storage.setItem("refresh_token",n),a&&a.forEach((s,c)=>{this._storage.setItem(c,s)})}tryLogin(e=null){return this.config.responseType==="code"?this.tryLoginCodeFlow(e).then(()=>!0):this.tryLoginImplicitFlow(e)}parseQueryString(e){return!e||e.length===0?{}:(e.charAt(0)==="?"&&(e=e.substr(1)),this.urlHelper.parseQueryString(e))}tryLoginCodeFlow(e=null){return Yt(this,null,function*(){e=e||{};let n=e.customHashFragment?e.customHashFragment.substring(1):window.location.search,o=this.getCodePartsFromUrl(n),r=o.code,a=o.state,s=o.session_state;if(!e.preventClearHashAfterLogin){let f=location.origin+location.pathname+location.search.replace(/code=[^&$]*/,"").replace(/scope=[^&$]*/,"").replace(/state=[^&$]*/,"").replace(/session_state=[^&$]*/,"").replace(/^\?&/,"?").replace(/&$/,"").replace(/^\?$/,"").replace(/&+/g,"&").replace(/\?&/,"?").replace(/\?$/,"")+location.hash;history.replaceState(null,window.name,f)}let[c,u]=this.parseState(a);if(this.state=u,o.error){this.debug("error trying to login"),this.handleLoginError(e,o);let f=new Vn("code_error",{},o);return this.eventsSubject.next(f),Promise.reject(f)}if(!e.disableNonceCheck){if(!c)return this.saveRequestedRoute(),Promise.resolve();if(!e.disableOAuth2StateCheck&&!this.validateNonce(c)){let h=new Vn("invalid_nonce_in_state",null);return this.eventsSubject.next(h),Promise.reject(h)}}return this.storeSessionState(s),r&&(yield this.getTokenFromCode(r,e),this.restoreRequestedRoute()),Promise.resolve()})}saveRequestedRoute(){this.config.preserveRequestedRoute&&this._storage.setItem("requested_route",window.location.pathname+window.location.search)}restoreRequestedRoute(){let e=this._storage.getItem("requested_route");e&&history.replaceState(null,"",window.location.origin+e)}getCodePartsFromUrl(e){return!e||e.length===0?this.urlHelper.getHashFragmentParams():(e.charAt(0)==="?"&&(e=e.substr(1)),this.urlHelper.parseQueryString(e))}getTokenFromCode(e,n){let o=new te({encoder:new yl}).set("grant_type","authorization_code").set("code",e).set("redirect_uri",n.customRedirectUri||this.redirectUri);if(!this.disablePKCE){let r;this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?r=localStorage.getItem("PKCE_verifier"):r=this._storage.getItem("PKCE_verifier"),r?o=o.set("code_verifier",r):console.warn("No PKCE verifier found in oauth storage!")}return this.fetchAndProcessToken(o,n)}fetchAndProcessToken(e,n){n=n||{},this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint");let o=new ki().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let r=btoa(`${this.clientId}:${this.dummyClientSecret}`);o=o.set("Authorization","Basic "+r)}return this.useHttpBasicAuth||(e=e.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(e=e.set("client_secret",this.dummyClientSecret)),new Promise((r,a)=>{if(this.customQueryParams)for(let s of Object.getOwnPropertyNames(this.customQueryParams))e=e.set(s,this.customQueryParams[s]);this.http.post(this.tokenEndpoint,e,{headers:o}).subscribe(s=>{this.debug("refresh tokenResponse",s),this.storeAccessTokenResponse(s.access_token,s.refresh_token,s.expires_in||this.fallbackAccessTokenExpirationTimeInSec,s.scope,this.extractRecognizedCustomParameters(s)),this.oidc&&s.id_token?this.processIdToken(s.id_token,s.access_token,n.disableNonceCheck).then(c=>{this.storeIdToken(c),this.eventsSubject.next(new Co("token_received")),this.eventsSubject.next(new Co("token_refreshed")),r(s)}).catch(c=>{this.eventsSubject.next(new Vn("token_validation_error",c)),console.error("Error validating tokens"),console.error(c),a(c)}):(this.eventsSubject.next(new Co("token_received")),this.eventsSubject.next(new Co("token_refreshed")),r(s))},s=>{console.error("Error getting token",s),this.eventsSubject.next(new Vn("token_error",s)),a(s)})})}tryLoginImplicitFlow(e=null){e=e||{};let n;e.customHashFragment?n=this.urlHelper.getHashFragmentParams(e.customHashFragment):n=this.urlHelper.getHashFragmentParams(),this.debug("parsed url",n);let o=n.state,[r,a]=this.parseState(o);if(this.state=a,n.error){this.debug("error trying to login"),this.handleLoginError(e,n);let h=new Vn("token_error",{},n);return this.eventsSubject.next(h),Promise.reject(h)}let s=n.access_token,c=n.id_token,u=n.session_state,f=n.scope;if(!this.requestAccessToken&&!this.oidc)return Promise.reject("Either requestAccessToken or oidc (or both) must be true.");if(this.requestAccessToken&&!s||this.requestAccessToken&&!e.disableOAuth2StateCheck&&!o||this.oidc&&!c)return Promise.resolve(!1);if(this.sessionChecksEnabled&&!u&&this.logger.warn("session checks (Session Status Change Notification) were activated in the configuration but the id_token does not contain a session_state claim"),this.requestAccessToken&&!e.disableNonceCheck&&!this.validateNonce(r)){let y=new Vn("invalid_nonce_in_state",null);return this.eventsSubject.next(y),Promise.reject(y)}return this.requestAccessToken&&this.storeAccessTokenResponse(s,null,n.expires_in||this.fallbackAccessTokenExpirationTimeInSec,f),this.oidc?this.processIdToken(c,s,e.disableNonceCheck).then(h=>e.validationHandler?e.validationHandler({accessToken:s,idClaims:h.idTokenClaims,idToken:h.idToken,state:o}).then(()=>h):h).then(h=>(this.storeIdToken(h),this.storeSessionState(u),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash(),this.eventsSubject.next(new Co("token_received")),this.callOnTokenReceivedIfExists(e),this.inImplicitFlow=!1,!0)).catch(h=>(this.eventsSubject.next(new Vn("token_validation_error",h)),this.logger.error("Error validating tokens"),this.logger.error(h),Promise.reject(h))):(this.eventsSubject.next(new Co("token_received")),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash(),this.callOnTokenReceivedIfExists(e),Promise.resolve(!0))}parseState(e){let n=e,o="";if(e){let r=e.indexOf(this.config.nonceStateSeparator);r>-1&&(n=e.substr(0,r),o=e.substr(r+this.config.nonceStateSeparator.length))}return[n,o]}validateNonce(e){let n;return this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?n=localStorage.getItem("nonce"):n=this._storage.getItem("nonce"),n!==e?(console.error("Validating access_token failed, wrong state/nonce.",n,e),!1):!0}storeIdToken(e){this._storage.setItem("id_token",e.idToken),this._storage.setItem("id_token_claims_obj",e.idTokenClaimsJson),this._storage.setItem("id_token_expires_at",""+e.idTokenExpiresAt),this._storage.setItem("id_token_stored_at",""+this.dateTimeService.now())}storeSessionState(e){this._storage.setItem("session_state",e)}getSessionState(){return this._storage.getItem("session_state")}handleLoginError(e,n){e.onLoginError&&e.onLoginError(n),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash()}getClockSkewInMsec(e=6e5){return!this.clockSkewInSec&&this.clockSkewInSec!==0?e:this.clockSkewInSec*1e3}processIdToken(e,n,o=!1){let r=e.split("."),a=this.padBase64(r[0]),s=HE(a),c=JSON.parse(s),u=this.padBase64(r[1]),f=HE(u),h=JSON.parse(f),y;if(this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?y=localStorage.getItem("nonce"):y=this._storage.getItem("nonce"),Array.isArray(h.aud)){if(h.aud.every(pe=>pe!==this.clientId)){let pe="Wrong audience: "+h.aud.join(",");return this.logger.warn(pe),Promise.reject(pe)}}else if(h.aud!==this.clientId){let pe="Wrong audience: "+h.aud;return this.logger.warn(pe),Promise.reject(pe)}if(!h.sub){let pe="No sub claim in id_token";return this.logger.warn(pe),Promise.reject(pe)}if(this.sessionChecksEnabled&&this.silentRefreshSubject&&this.silentRefreshSubject!==h.sub){let pe=`After refreshing, we got an id_token for another user (sub). Expected sub: ${this.silentRefreshSubject}, received sub: ${h.sub}`;return this.logger.warn(pe),Promise.reject(pe)}if(!h.iat){let pe="No iat claim in id_token";return this.logger.warn(pe),Promise.reject(pe)}if(!this.skipIssuerCheck&&h.iss!==this.issuer){let pe="Wrong issuer: "+h.iss;return this.logger.warn(pe),Promise.reject(pe)}if(!o&&h.nonce!==y){let pe="Wrong nonce: "+h.nonce;return this.logger.warn(pe),Promise.reject(pe)}if(Object.prototype.hasOwnProperty.call(this,"responseType")&&(this.responseType==="code"||this.responseType==="id_token")&&(this.disableAtHashCheck=!0),!this.disableAtHashCheck&&this.requestAccessToken&&!h.at_hash){let pe="An at_hash is needed!";return this.logger.warn(pe),Promise.reject(pe)}let x=this.dateTimeService.now(),S=h.iat*1e3,Y=h.exp*1e3,Q=this.getClockSkewInMsec();if(S-Q>=x||Y+Q-this.decreaseExpirationBySec<=x){let pe="Token has expired";return console.error(pe),console.error({now:x,issuedAtMSec:S,expiresAtMSec:Y}),Promise.reject(pe)}let X={accessToken:n,idToken:e,jwks:this.jwks,idTokenClaims:h,idTokenHeader:c,loadKeys:()=>this.loadJwks()};return this.disableAtHashCheck?this.checkSignature(X).then(()=>({idToken:e,idTokenClaims:h,idTokenClaimsJson:f,idTokenHeader:c,idTokenHeaderJson:s,idTokenExpiresAt:Y})):this.checkAtHash(X).then(pe=>{if(!this.disableAtHashCheck&&this.requestAccessToken&&!pe){let mt="Wrong at_hash";return this.logger.warn(mt),Promise.reject(mt)}return this.checkSignature(X).then(()=>{let mt=!this.disableAtHashCheck,Et={idToken:e,idTokenClaims:h,idTokenClaimsJson:f,idTokenHeader:c,idTokenHeaderJson:s,idTokenExpiresAt:Y};return mt?this.checkAtHash(X).then(Ht=>{if(this.requestAccessToken&&!Ht){let nn="Wrong at_hash";return this.logger.warn(nn),Promise.reject(nn)}else return Et}):Et})})}getIdentityClaims(){let e=this._storage.getItem("id_token_claims_obj");return e?JSON.parse(e):null}getGrantedScopes(){let e=this._storage.getItem("granted_scopes");return e?JSON.parse(e):null}getIdToken(){return this._storage?this._storage.getItem("id_token"):null}padBase64(e){for(;e.length%4!==0;)e+="=";return e}getAccessToken(){return this._storage?this._storage.getItem("access_token"):null}getRefreshToken(){return this._storage?this._storage.getItem("refresh_token"):null}getAccessTokenExpiration(){return this._storage.getItem("expires_at")?parseInt(this._storage.getItem("expires_at"),10):null}getAccessTokenStoredAt(){return parseInt(this._storage.getItem("access_token_stored_at"),10)}getIdTokenStoredAt(){return parseInt(this._storage.getItem("id_token_stored_at"),10)}getIdTokenExpiration(){return this._storage.getItem("id_token_expires_at")?parseInt(this._storage.getItem("id_token_expires_at"),10):null}hasValidAccessToken(){if(this.getAccessToken()){let e=this._storage.getItem("expires_at"),n=this.dateTimeService.new();return!(e&&parseInt(e,10)-this.decreaseExpirationBySec=0&&this._storage.getItem(e)!==null?JSON.parse(this._storage.getItem(e)):null}authorizationHeader(){return"Bearer "+this.getAccessToken()}logOut(e={},n=""){let o=!1;typeof e=="boolean"&&(o=e,e={});let r=this.getIdToken();if(this._storage.removeItem("access_token"),this._storage.removeItem("id_token"),this._storage.removeItem("refresh_token"),this.saveNoncesInLocalStorage?(localStorage.removeItem("nonce"),localStorage.removeItem("PKCE_verifier")):(this._storage.removeItem("nonce"),this._storage.removeItem("PKCE_verifier")),this._storage.removeItem("expires_at"),this._storage.removeItem("id_token_claims_obj"),this._storage.removeItem("id_token_expires_at"),this._storage.removeItem("id_token_stored_at"),this._storage.removeItem("access_token_stored_at"),this._storage.removeItem("granted_scopes"),this._storage.removeItem("session_state"),this.config.customTokenParameters&&this.config.customTokenParameters.forEach(s=>this._storage.removeItem(s)),this.silentRefreshSubject=null,this.eventsSubject.next(new Xr("logout")),!this.logoutUrl||o)return;let a;if(!this.validateUrlForHttps(this.logoutUrl))throw new Error("logoutUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");if(this.logoutUrl.indexOf("{{")>-1)a=this.logoutUrl.replace(/\{\{id_token\}\}/,encodeURIComponent(r)).replace(/\{\{client_id\}\}/,encodeURIComponent(this.clientId));else{let s=new te({encoder:new yl});r&&(s=s.set("id_token_hint",r));let c=this.postLogoutRedirectUri||this.redirectUriAsPostLogoutRedirectUriFallback&&this.redirectUri||"";c&&(s=s.set("post_logout_redirect_uri",c),n&&(s=s.set("state",n)));for(let u in e)s=s.set(u,e[u]);a=this.logoutUrl+(this.logoutUrl.indexOf("?")>-1?"&":"?")+s.toString()}this.config.openUri(a)}createAndSaveNonce(){let e=this;return this.createNonce().then(function(n){return e.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?localStorage.setItem("nonce",n):e._storage.setItem("nonce",n),n})}ngOnDestroy(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.removeSilentRefreshEventListener();let e=this.document.getElementById(this.silentRefreshIFrameName);e&&e.remove(),this.stopSessionCheckTimer(),this.removeSessionCheckEventListener();let n=this.document.getElementById(this.sessionCheckIFrameName);n&&n.remove()}createNonce(){return new Promise(e=>{if(this.rngUrl)throw new Error("createNonce with rng-web-api has not been implemented so far");let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",o=45,r="",a=typeof self>"u"?null:self.crypto||self.msCrypto;if(a){let s=new Uint8Array(o);a.getRandomValues(s),s.map||(s.map=Array.prototype.map),s=s.map(c=>n.charCodeAt(c%n.length)),r=String.fromCharCode.apply(null,s)}else for(;0o.type==="discovery_document_loaded")).subscribe(()=>this.initCodeFlowInternal(e,n))}initCodeFlowInternal(e="",n={}){if(!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");let o={},r=null;typeof n=="string"?r=n:typeof n=="object"&&(o=n),this.createLoginUrl(e,r,null,!1,o).then(this.config.openUri).catch(a=>{console.error("Error in initAuthorizationCodeFlow"),console.error(a)})}createChallangeVerifierPairForPKCE(){return Yt(this,null,function*(){if(!this.crypto)throw new Error("PKCE support for code flow needs a CryptoHander. Did you import the OAuthModule using forRoot() ?");let e=yield this.createNonce(),n=yield this.crypto.calcHash(e,"sha-256");return[UE(n),e]})}extractRecognizedCustomParameters(e){let n=new Map;return this.config.customTokenParameters&&this.config.customTokenParameters.forEach(o=>{e[o]&&n.set(o,JSON.stringify(e[o]))}),n}revokeTokenAndLogout(e={},n=!1){let o=this.revocationEndpoint,r=this.getAccessToken(),a=this.getRefreshToken();if(!r)return Promise.resolve();let s=new te({encoder:new yl}),c=new ki().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let u=btoa(`${this.clientId}:${this.dummyClientSecret}`);c=c.set("Authorization","Basic "+u)}if(this.useHttpBasicAuth||(s=s.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(s=s.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let u of Object.getOwnPropertyNames(this.customQueryParams))s=s.set(u,this.customQueryParams[u]);return new Promise((u,f)=>{let h,y;if(r){let x=s.set("token",r).set("token_type_hint","access_token");h=this.http.post(o,x,{headers:c})}else h=ne(null);if(a){let x=s.set("token",a).set("token_type_hint","refresh_token");y=this.http.post(o,x,{headers:c})}else y=ne(null);n&&(h=h.pipe(hn(x=>x.status===0?ne(null):Lo(x))),y=y.pipe(hn(x=>x.status===0?ne(null):Lo(x)))),ii([h,y]).subscribe(x=>{this.logOut(e),u(x),this.logger.info("Token successfully revoked")},x=>{this.logger.error("Error revoking token",x),this.eventsSubject.next(new Vn("token_revoke_error",x)),f(x)})})}clearLocationHash(){location.hash!=""&&(location.hash="")}static{this.\u0275fac=function(n){return new(n||t)(be(ce),be(Ln),be(Wp,8),be(Yp,8),be(pd,8),be($E),be(Gp),be(qp,8),be(De),be(Q0))}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})(),Qp=class{},db=class{handleError(i){return Lo(i)}},xZ=(()=>{class t{constructor(e,n,o){this.oAuthService=e,this.errorHandler=n,this.moduleConfig=o}checkUrl(e){return this.moduleConfig.resourceServer.customUrlValidation?this.moduleConfig.resourceServer.customUrlValidation(e):this.moduleConfig.resourceServer.allowedUrls?!!this.moduleConfig.resourceServer.allowedUrls.find(n=>e.toLowerCase().startsWith(n.toLowerCase())):!0}intercept(e,n){let o=e.url.toLowerCase();return!this.moduleConfig||!this.moduleConfig.resourceServer||!this.checkUrl(o)?n.handle(e):this.moduleConfig.resourceServer.sendAccessToken?pt(ne(this.oAuthService.getAccessToken()).pipe(Oe(a=>!!a)),this.oAuthService.events.pipe(Oe(a=>a.type==="token_received"),Xg(this.oAuthService.waitForTokenInMsec||0),hn(()=>ne(null)),le(()=>this.oAuthService.getAccessToken()))).pipe(Ve(1),cn(a=>{if(a){let s="Bearer "+a,c=e.headers.set("Authorization",s);e=e.clone({headers:c})}return n.handle(e).pipe(hn(s=>this.errorHandler.handleError(s)))})):n.handle(e).pipe(hn(a=>this.errorHandler.handleError(a)))}static{this.\u0275fac=function(n){return new(n||t)(be(Kp),be(Qp),be($p,8))}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();function MZ(){return console}function wZ(){return typeof sessionStorage<"u"?sessionStorage:new hZ}function DZ(t=null,i=Up){return ha([Kp,$E,{provide:Gp,useFactory:MZ},{provide:Wp,useFactory:wZ},{provide:Yp,useClass:i},{provide:qp,useClass:CZ},{provide:Qp,useClass:db},{provide:$p,useValue:t},{provide:Ap,useClass:xZ,multi:!0},{provide:Q0,useClass:fZ}])}var TSe=(()=>{class t{static forRoot(e=null,n=Up){return{ngModule:t,providers:[DZ(e,n)]}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({imports:[fe]})}}return t})();var _s={headers:{"Fineract-Platform-TenantId":je.fineractPlatformTenantId}},Xp="Authorization",SZ="Fineract-Platform-TenantId",WE="Fineract-Platform-TFA-Token",YE=(()=>{class t{constructor(){this.settingsService=d(tn)}intercept(e,n){return this.settingsService.tenantIdentifier&&(_s.headers["Fineract-Platform-TenantId"]=this.settingsService.tenantIdentifier),e=e.clone({setHeaders:_s.headers}),n.handle(e)}setAuthorizationToken(e){je.oauth.enabled?_s.headers[Xp]=`Bearer ${e}`:_s.headers[Xp]=`Basic ${e}`}setTwoFactorAccessToken(e){_s.headers[WE]=e}removeAuthorization(){delete _s.headers[Xp]}removeAuthorizationTenant(){delete _s.headers[Xp],delete _s.headers[SZ]}removeTwoFactorAuthorization(){delete _s.headers[WE]}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var Ni=(function(t){return t.OAuth2="oauth2",t.OIDC="oidc",t.Basic="basic",t})(Ni||{});function ub(){return je.OIDC.oidcServerEnabled?Ni.OIDC:je.oauth.enabled?Ni.OAuth2:Ni.Basic}function qE(){switch(ub()){case Ni.OIDC:return kZ();case Ni.OAuth2:return EZ();default:return{clientId:""}}}function kZ(){let t=je.OIDC.oidcFrontUrl||window.location.origin;return{issuer:je.OIDC.oidcBaseUrl,clientId:je.OIDC.oidcClientId,redirectUri:`${t}/callback`,postLogoutRedirectUri:`${t}/#/login`,responseType:"code",scope:"openid profile email offline_access",oidc:!0,useSilentRefresh:!1,requireHttps:je.production,showDebugInformation:!je.production,sessionChecksEnabled:!1,clearHashAfterLogin:!1}}function EZ(){let t=window.location.origin;return{issuer:je.oauth.serverUrl,loginUrl:je.oauth.authorizeUrl,tokenEndpoint:je.oauth.tokenUrl,redirectUri:je.oauth.redirectUri,postLogoutRedirectUri:`${t}/#/login`,clientId:je.oauth.appId,responseType:"code",scope:je.oauth.scope,useSilentRefresh:!1,oidc:!1,skipIssuerCheck:!0,strictDiscoveryDocumentValidation:!1,requireHttps:je.production,showDebugInformation:!je.production,sessionChecksEnabled:!1,clearHashAfterLogin:!1}}var Zp=(()=>{class t{changePassword(e,n){return this.http.put(`/users/${e}`,n)}constructor(){this.http=d(Ln),this.alertService=d(Ia),this.authenticationInterceptor=d(YE),this.oauthService=d(Kp),this.userLoggedIn$=new ut(!1),this.isAuthenticated$=this.userLoggedIn$.asObservable(),this.rememberMe=!1,this.storage=sessionStorage,this.dialogShown=!1,this.authMode=Ni.Basic,this.credentialsStorageKey="mifosXCredentials",this.twoFactorAuthenticationTokenStorageKey="mifosXTwoFactorAuthenticationToken",this.authMode=ub(),this.authMode!==Ni.Basic&&this.initializeOAuthService(),this.restoreSession()}initializeOAuthService(){this.oauthService.configure(qE());let e=je.enableRememberMe?localStorage:sessionStorage;this.oauthService.setStorage(e),this.oauthService.setupAutomaticSilentRefresh(),this.oauthService.events.subscribe(n=>{(n.type==="token_received"||n.type==="token_refreshed")&&this.updateCredentialsToken()}),this.cleanupLegacyStorage()}restoreSession(){let e=this.getSavedCredentials();if(e)if(e.rememberMe&&(this.rememberMe=!0,this.storage=localStorage,this.oauthService.setStorage(this.storage)),this.authMode!==Ni.Basic)this.oauthService.hasValidAccessToken()?(this.authenticationInterceptor.setAuthorizationToken(this.oauthService.getAccessToken()),this.userLoggedIn$.next(!0)):this.oauthService.getRefreshToken()&&this.oauthService.refreshToken().then(()=>this.userLoggedIn$.next(!0)).catch(()=>this.logout().subscribe());else{this.authenticationInterceptor.setAuthorizationToken(e.base64EncodedAuthenticationKey);let n=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));n&&this.authenticationInterceptor.setTwoFactorAccessToken(n.token),this.userLoggedIn$.next(!0)}}updateCredentialsToken(){let e=this.oauthService.getAccessToken();if(!e)return;this.authenticationInterceptor.setAuthorizationToken(e);let n=this.getCredentials();n&&(n.accessToken=e,this.storage.setItem(this.credentialsStorageKey,JSON.stringify(n)))}getSavedCredentials(){let e=sessionStorage.getItem(this.credentialsStorageKey)||localStorage.getItem(this.credentialsStorageKey);return e?JSON.parse(e):null}login(e){if(this.alertService.alert({type:"Authentication Start",message:"Please wait..."}),this.authMode!==Ni.Basic)return this.oauthService.initCodeFlow(),ne(!0);if(!e)throw new Error("loginContext is required when using Basic authentication");return this.rememberMe=je.enableRememberMe?e?.remember??!1:!1,this.storage=this.rememberMe?localStorage:sessionStorage,this.http.post("/authentication",{username:e.username,password:e.password,remember:this.rememberMe}).pipe(le(n=>(this.onLoginSuccess(n),!0)))}getUserDetails(){return Yt(this,null,function*(){let e=this.oauthService.getAccessToken();return new Promise((n,o)=>{if(this.authMode===Ni.OIDC){let r=`${je.OIDC.oidcApiUrl}authentication/userdetails`;this.http.post(r,{token:e}).subscribe({next:a=>{let s=a.object;s.accessToken=e,this.onLoginSuccess(s),n()},error:a=>{console.error("Failed to fetch user details:",a),o(a)}})}else if(this.authMode===Ni.OAuth2){let r=new ki().set("Authorization",`Bearer ${e}`),a=`${je.oauth.serverUrl}/userdetails`;this.http.get(a,{headers:r}).subscribe({next:s=>{s.accessToken=e,this.onLoginSuccess(s),n()},error:s=>{console.error("Failed to fetch user details:",s),o(s)}})}})})}onLoginSuccess(e){this.userLoggedIn$.next(!0),e.rememberMe=this.rememberMe,this.authMode!==Ni.Basic?this.authenticationInterceptor.setAuthorizationToken(e.accessToken):this.authenticationInterceptor.setAuthorizationToken(e.base64EncodedAuthenticationKey),e.isTwoFactorAuthenticationRequired?(this.credentials=e,this.alertService.alert({type:"Two Factor Authentication Required",message:"Two Factor Authentication Required"})):e.shouldRenewPassword?(this.credentials=e,this.alertService.alert({type:"Password Expired",message:"Your password has expired, please reset your password!"})):(this.setCredentials(e),this.alertService.alert({type:"Authentication Success",message:`${e.username} successfully logged in!`}),delete this.credentials)}handleOAuthCallback(){return Yt(this,null,function*(){try{let e=sessionStorage.getItem("oauth_callback_query");return e?(sessionStorage.removeItem("oauth_callback_query"),yield this.oauthService.tryLoginCodeFlow({customHashFragment:e})):yield this.oauthService.tryLoginCodeFlow(),this.oauthService.hasValidAccessToken()?(yield this.getUserDetails(),!0):!1}catch(e){return console.error("OAuth callback failed:",e),!1}})}logout(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));if(e&&(this.http.post("/twofactor/invalidate",{token:e.token}).subscribe(),this.authenticationInterceptor.removeTwoFactorAuthorization()),sessionStorage.removeItem("oauth_callback_query"),this.authenticationInterceptor.removeAuthorization(),this.setCredentials(),this.resetDialog(),this.userLoggedIn$.next(!1),this.authMode===Ni.OIDC)this.oauthService.logOut();else if(this.authMode===Ni.OAuth2){this.oauthService.logOut(!0);let n=window.open(je.oauth.logoutUrl,"_blank","width=100,height=100");setTimeout(()=>{n&&n.close(),window.location.href=`${window.location.origin}/#/login`},500)}return ne(!0)}twoFactorAccessTokenIsValid(){let e=JSON.parse(this.storage.getItem(this.twoFactorAuthenticationTokenStorageKey));return e?new Date().getTime(){n.removeItem(this.credentialsStorageKey),n.removeItem(this.twoFactorAuthenticationTokenStorageKey)}),this.cleanupLegacyStorage())}cleanupLegacyStorage(){["mifosXZitadelTokenDetails","mifosXOAuthTokenDetails","token_start_time","refresh_expires_in","mifosXZitadel","auth_code"].forEach(n=>{localStorage.removeItem(n),sessionStorage.removeItem(n)})}getDeliveryMethods(){return this.http.get("/twofactor")}showDialog(){this.dialogShown=!0}resetDialog(){this.dialogShown=!1}hasDialogBeenShown(){return this.dialogShown}requestOTP(e){let n=new te;return n=n.set("deliveryMethod",e.name),n=n.set("extendedToken",this.rememberMe.toString()),this.http.post("/twofactor",{},{params:n})}validateOTP(e){let n=new te().set("token",e);return this.http.post("/twofactor/validate",{},{params:n}).pipe(le(o=>{this.onOTPValidateSuccess(o)}))}onOTPValidateSuccess(e){this.authenticationInterceptor.setTwoFactorAccessToken(e.token),this.credentials.shouldRenewPassword?this.alertService.alert({type:"Password Expired",message:"Your password has expired, please reset your password!"}):(this.setCredentials(this.credentials),this.alertService.alert({type:"Authentication Success",message:`${this.credentials.username} successfully logged in!`}),delete this.credentials,this.storage.setItem(this.twoFactorAuthenticationTokenStorageKey,JSON.stringify(e)))}resetPassword(e){return this.http.put(`/users/${this.credentials.userId}`,e).pipe(le(()=>{this.alertService.alert({type:"Password Reset Success",message:"Your password was sucessfully reset!"}),this.authenticationInterceptor.removeAuthorization(),this.authenticationInterceptor.removeTwoFactorAuthorization();let n={username:this.credentials.username,password:e.password,remember:this.rememberMe};this.login(n).subscribe()}))}getUserLoggedIn(){return this.userLoggedIn$.value}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=z({token:t,factory:t.\u0275fac})}}return t})();var ic=(()=>{class t{constructor(){this.templateRef=d(rt),this.viewContainer=d(ft),this.authenticationService=d(Zp);let e=this.authenticationService.getCredentials();this.userPermissions=e.permissions}set mifosxHasPermission(e){if(typeof e!="string")throw new Error("hasPermission value must be a string");this.viewContainer.clear(),this.hasPermission(e)&&this.viewContainer.createEmbeddedView(this.templateRef)}hasPermission(e){return e=e.trim(),this.userPermissions.includes("ALL_FUNCTIONS")?!0:e!==""?e.substring(0,5)==="READ_"&&this.userPermissions.includes("ALL_FUNCTIONS_READ")?!0:!!this.userPermissions.includes(e):!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=R({type:t,selectors:[["","mifosxHasPermission",""]],inputs:{mifosxHasPermission:"mifosxHasPermission"}})}}return t})();var nI=(()=>{class t{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,n){this._renderer=e,this._elementRef=n}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(n){return new(n||t)(Me(tt),Me(Z))};static \u0275dir=R({type:t})}return t})(),iI=(()=>{class t extends nI{static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,features:[de]})}return t})(),vi=new L("");var IZ={provide:vi,useExisting:Pt(()=>Ii),multi:!0};function OZ(){let t=Zo()?Zo().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var TZ=new L(""),Ii=(()=>{class t extends nI{_compositionMode;_composing=!1;constructor(e,n,o){super(e,n),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!OZ())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(n){return new(n||t)(Me(tt),Me(Z),Me(TZ,8))};static \u0275dir=R({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,o){n&1&&N("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},standalone:!1,features:[ue([IZ]),de]})}return t})();function hb(t){return t==null||gb(t)===0}function gb(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Oi=new L(""),xl=new L(""),PZ=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,an=class{static min(i){return oI(i)}static max(i){return rI(i)}static required(i){return aI(i)}static requiredTrue(i){return LZ(i)}static email(i){return AZ(i)}static minLength(i){return sI(i)}static maxLength(i){return cI(i)}static pattern(i){return RZ(i)}static nullValidator(i){return ef()}static compose(i){return fI(i)}static composeAsync(i){return hI(i)}};function oI(t){return i=>{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e{if(i.value==null||t==null)return null;let e=parseFloat(i.value);return!isNaN(e)&&e>t?{max:{max:t,actual:i.value}}:null}}function aI(t){return hb(t.value)?{required:!0}:null}function LZ(t){return t.value===!0?null:{required:!0}}function AZ(t){return hb(t.value)||PZ.test(t.value)?null:{email:!0}}function sI(t){return i=>{let e=i.value?.length??gb(i.value);return e===null||e===0?null:e{let e=i.value?.length??gb(i.value);return e!==null&&e>t?{maxlength:{requiredLength:t,actualLength:e}}:null}}function RZ(t){if(!t)return ef;let i,e;return typeof t=="string"?(e="",t.charAt(0)!=="^"&&(e+="^"),e+=t,t.charAt(t.length-1)!=="$"&&(e+="$"),i=new RegExp(e)):(e=t.toString(),i=t),n=>{if(hb(n.value))return null;let o=n.value;return i.test(o)?null:{pattern:{requiredPattern:e,actualValue:o}}}}function ef(t){return null}function lI(t){return t!=null}function dI(t){return ms(t)?Zt(t):t}function uI(t){let i={};return t.forEach(e=>{i=e!=null?q(q({},i),e):i}),Object.keys(i).length===0?null:i}function mI(t,i){return i.map(e=>e(t))}function zZ(t){return!t.validate}function pI(t){return t.map(i=>zZ(i)?i:e=>i.validate(e))}function fI(t){if(!t)return null;let i=t.filter(lI);return i.length==0?null:function(e){return uI(mI(e,i))}}function _b(t){return t!=null?fI(pI(t)):null}function hI(t){if(!t)return null;let i=t.filter(lI);return i.length==0?null:function(e){let n=mI(e,i).map(dI);return Ja(n).pipe(le(uI))}}function bb(t){return t!=null?hI(pI(t)):null}function QE(t,i){return t===null?[i]:Array.isArray(t)?[...t,i]:[t,i]}function gI(t){return t._rawValidators}function _I(t){return t._rawAsyncValidators}function mb(t){return t?Array.isArray(t)?t:[t]:[]}function tf(t,i){return Array.isArray(t)?t.includes(i):t===i}function KE(t,i){let e=mb(i);return mb(t).forEach(o=>{tf(e,o)||e.push(o)}),e}function XE(t,i){return mb(i).filter(e=>!tf(t,e))}var nf=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(i){this._rawValidators=i||[],this._composedValidatorFn=_b(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=bb(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,e){return this.control?this.control.hasError(i,e):!1}getError(i,e){return this.control?this.control.getError(i,e):null}},Ei=class extends nf{name;get formDirective(){return null}get path(){return null}},li=class extends nf{_parent=null;name=null;valueAccessor=null},of=class{_cd;constructor(i){this._cd=i}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},NZ={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},vke=Re(q({},NZ),{"[class.ng-submitted]":"isSubmitted"}),bn=(()=>{class t extends of{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Me(li,2))};static \u0275dir=R({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,o){n&2&&ie("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[de]})}return t})(),yr=(()=>{class t extends of{constructor(e){super(e)}static \u0275fac=function(n){return new(n||t)(Me(Ei,10))};static \u0275dir=R({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,o){n&2&&ie("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[de]})}return t})();var X0="VALID",Jp="INVALID",fd="PENDING",Z0="DISABLED",rc=class{},rf=class extends rc{value;source;constructor(i,e){super(),this.value=i,this.source=e}},eu=class extends rc{pristine;source;constructor(i,e){super(),this.pristine=i,this.source=e}},tu=class extends rc{touched;source;constructor(i,e){super(),this.touched=i,this.source=e}},hd=class extends rc{status;source;constructor(i,e){super(),this.status=i,this.source=e}},af=class extends rc{source;constructor(i){super(),this.source=i}},nu=class extends rc{source;constructor(i){super(),this.source=i}};function vb(t){return(df(t)?t.validators:t)||null}function FZ(t){return Array.isArray(t)?_b(t):t||null}function yb(t,i){return(df(i)?i.asyncValidators:t)||null}function VZ(t){return Array.isArray(t)?bb(t):t||null}function df(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function bI(t,i,e){let n=t.controls;if(!(i?Object.keys(n):n).length)throw new he(1e3,"");if(!n[e])throw new he(1001,"")}function vI(t,i,e){t._forEachChild((n,o)=>{if(e[o]===void 0)throw new he(1002,"")})}var gd=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(i,e){this._assignValidators(i),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get status(){return Yn(this.statusReactive)}set status(i){Yn(()=>this.statusReactive.set(i))}_status=si(()=>this.statusReactive());statusReactive=ke(void 0);get valid(){return this.status===X0}get invalid(){return this.status===Jp}get pending(){return this.status==fd}get disabled(){return this.status===Z0}get enabled(){return this.status!==Z0}errors;get pristine(){return Yn(this.pristineReactive)}set pristine(i){Yn(()=>this.pristineReactive.set(i))}_pristine=si(()=>this.pristineReactive());pristineReactive=ke(!0);get dirty(){return!this.pristine}get touched(){return Yn(this.touchedReactive)}set touched(i){Yn(()=>this.touchedReactive.set(i))}_touched=si(()=>this.touchedReactive());touchedReactive=ke(!1);get untouched(){return!this.touched}_events=new B;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(KE(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(KE(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(XE(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(XE(i,this._rawAsyncValidators))}hasValidator(i){return tf(this._rawValidators,i)}hasAsyncValidator(i){return tf(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){let e=this.touched===!1;this.touched=!0;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsTouched(Re(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new tu(!0,n))}markAllAsDirty(i={}){this.markAsDirty({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(i))}markAllAsTouched(i={}){this.markAsTouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(i))}markAsUntouched(i={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=i.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:i.emitEvent,sourceControl:n})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,n),e&&i.emitEvent!==!1&&this._events.next(new tu(!1,n))}markAsDirty(i={}){let e=this.pristine===!0;this.pristine=!1;let n=i.sourceControl??this;this._parent&&!i.onlySelf&&this._parent.markAsDirty(Re(q({},i),{sourceControl:n})),e&&i.emitEvent!==!1&&this._events.next(new eu(!1,n))}markAsPristine(i={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=i.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:i.emitEvent})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i,n),e&&i.emitEvent!==!1&&this._events.next(new eu(!0,n))}markAsPending(i={}){this.status=fd;let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new hd(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.markAsPending(Re(q({},i),{sourceControl:e}))}disable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=Z0,this.errors=null,this._forEachChild(o=>{o.disable(Re(q({},i),{onlySelf:!0}))}),this._updateValue();let n=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new rf(this.value,n)),this._events.next(new hd(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Re(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(i={}){let e=this._parentMarkedDirty(i.onlySelf);this.status=X0,this._forEachChild(n=>{n.enable(Re(q({},i),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors(Re(q({},i),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i,e){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===X0||this.status===fd)&&this._runAsyncValidator(n,i.emitEvent)}let e=i.sourceControl??this;i.emitEvent!==!1&&(this._events.next(new rf(this.value,e)),this._events.next(new hd(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(Re(q({},i),{sourceControl:e}))}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Z0:X0}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i,e){if(this.asyncValidator){this.status=fd,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:i!==!1};let n=dI(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:e,shouldHaveEmitted:i})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let i=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,i}return!1}setErrors(i,e={}){this.errors=i,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(i){let e=i;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,o)=>n&&n._find(o),this)}getError(i,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[i]:null}hasError(i,e){return!!this.getError(i,e)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i,e,n){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),(i||n)&&this._events.next(new hd(this.status,e)),this._parent&&this._parent._updateControlsErrors(i,e,n)}_initObservables(){this.valueChanges=new U,this.statusChanges=new U}_calculateStatus(){return this._allControlsDisabled()?Z0:this.errors?Jp:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(fd)?fd:this._anyControlsHaveStatus(Jp)?Jp:X0}_anyControlsHaveStatus(i){return this._anyControls(e=>e.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i,e){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!i.onlySelf&&this._parent._updatePristine(i,e),o&&this._events.next(new eu(this.pristine,e))}_updateTouched(i={},e){this.touched=this._anyControlsTouched(),this._events.next(new tu(this.touched,e)),this._parent&&!i.onlySelf&&this._parent._updateTouched(i,e)}_onDisabledChange=[];_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){df(i)&&i.updateOn!=null&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){let e=this._parent&&this._parent.dirty;return!i&&!!e&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=FZ(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=VZ(this._rawAsyncValidators)}},Cl=class extends gd{constructor(i,e,n){super(vb(e),yb(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(i,e){return this.controls[i]?this.controls[i]:(this.controls[i]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(i,e,n={}){this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,e={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(i,e,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],e&&this.registerControl(i,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,e={}){vI(this,!0,i),Object.keys(i).forEach(n=>{bI(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(Object.keys(i).forEach(n=>{let o=this.controls[n];o&&o.patchValue(i[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i={},e={}){this._forEachChild((n,o)=>{n.reset(i?i[o]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new nu(this))}getRawValue(){return this._reduceChildren({},(i,e,n)=>(i[n]=e.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&i(n,e)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&i(n))return!0;return!1}_reduceValue(){let i={};return this._reduceChildren(i,(e,n,o)=>((n.enabled||this.disabled)&&(e[o]=n.value),e))}_reduceChildren(i,e){let n=i;return this._forEachChild((o,r)=>{n=e(n,o,r)}),n}_allControlsDisabled(){for(let i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}};var yI=Cl;var pb=class extends Cl{};var _d=new L("",{providedIn:"root",factory:()=>uf}),uf="always";function mf(t,i){return[...i.path,t]}function iu(t,i,e=uf){Cb(t,i),i.valueAccessor.writeValue(t.value),(t.disabled||e==="always")&&i.valueAccessor.setDisabledState?.(t.disabled),jZ(t,i),UZ(t,i),HZ(t,i),BZ(t,i)}function sf(t,i,e=!0){let n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),lf(t,i),t&&(i._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function cf(t,i){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(i)})}function BZ(t,i){if(i.valueAccessor.setDisabledState){let e=n=>{i.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(e),i._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}function Cb(t,i){let e=gI(t);i.validator!==null?t.setValidators(QE(e,i.validator)):typeof e=="function"&&t.setValidators([e]);let n=_I(t);i.asyncValidator!==null?t.setAsyncValidators(QE(n,i.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let o=()=>t.updateValueAndValidity();cf(i._rawValidators,o),cf(i._rawAsyncValidators,o)}function lf(t,i){let e=!1;if(t!==null){if(i.validator!==null){let o=gI(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==i.validator);r.length!==o.length&&(e=!0,t.setValidators(r))}}if(i.asyncValidator!==null){let o=_I(t);if(Array.isArray(o)&&o.length>0){let r=o.filter(a=>a!==i.asyncValidator);r.length!==o.length&&(e=!0,t.setAsyncValidators(r))}}}let n=()=>{};return cf(i._rawValidators,n),cf(i._rawAsyncValidators,n),e}function jZ(t,i){i.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&CI(t,i)})}function HZ(t,i){i.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&CI(t,i),t.updateOn!=="submit"&&t.markAsTouched()})}function CI(t,i){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function UZ(t,i){let e=(n,o)=>{i.valueAccessor.writeValue(n),o&&i.viewToModelUpdate(n)};t.registerOnChange(e),i._registerOnDestroy(()=>{t._unregisterOnChange(e)})}function xI(t,i){t==null,Cb(t,i)}function $Z(t,i){return lf(t,i)}function xb(t,i){if(!t.hasOwnProperty("model"))return!1;let e=t.model;return e.isFirstChange()?!0:!Object.is(i,e.currentValue)}function GZ(t){return Object.getPrototypeOf(t.constructor)===iI}function MI(t,i){t._syncPendingControls(),i.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Mb(t,i){if(!i)return null;Array.isArray(i);let e,n,o;return i.forEach(r=>{r.constructor===Ii?e=r:GZ(r)?n=r:o=r}),o||n||e||null}function WZ(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}var YZ={provide:Ei,useExisting:Pt(()=>bd)},J0=Promise.resolve(),bd=(()=>{class t extends Ei{callSetDisabledState;get submitted(){return Yn(this.submittedReactive)}_submitted=si(()=>this.submittedReactive());submittedReactive=ke(!1);_directives=new Set;form;ngSubmit=new U;options;constructor(e,n,o){super(),this.callSetDisabledState=o,this.form=new Cl({},_b(e),bb(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){J0.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),iu(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){J0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){J0.then(()=>{let n=this._findContainer(e.path),o=new Cl({});xI(o,e),n.registerControl(e.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){J0.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){J0.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),MI(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new af(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(n){return new(n||t)(Me(Oi,10),Me(xl,10),Me(_d,8))};static \u0275dir=R({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,o){n&1&&N("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ue([YZ]),de]})}return t})();function ZE(t,i){let e=t.indexOf(i);e>-1&&t.splice(e,1)}function JE(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var oc=class extends gd{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(i=null,e,n){super(vb(e),yb(n,e)),this._applyFormState(i),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),df(e)&&(e.nonNullable||e.initialValueIsDefault)&&(JE(i)?this.defaultValue=i.value:this.defaultValue=i)}setValue(i,e={}){this.value=this._pendingValue=i,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(i,e={}){this.setValue(i,e)}reset(i=this.defaultValue,e={}){this._applyFormState(i),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new nu(this))}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){ZE(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){ZE(this._onDisabledChange,i)}_forEachChild(i){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(i){JE(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},no=oc,qZ=t=>t instanceof oc,QZ=(()=>{class t extends Ei{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return mf(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,standalone:!1,features:[de]})}return t})();var KZ={provide:li,useExisting:Pt(()=>XZ)},eI=Promise.resolve(),XZ=(()=>{class t extends li{_changeDetectorRef;callSetDisabledState;control=new oc;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new U;constructor(e,n,o,r,a,s){super(),this._changeDetectorRef=a,this.callSetDisabledState=s,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=Mb(this,r)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),xb(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){iu(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){eI.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let n=e.isDisabled.currentValue,o=n!==0&&$(n);eI.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?mf(e,this._parent):[e]}static \u0275fac=function(n){return new(n||t)(Me(Ei,9),Me(Oi,10),Me(xl,10),Me(vi,10),Me(we,8),Me(_d,8))};static \u0275dir=R({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ue([KZ]),de,Ne]})}return t})();var ac=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return t})(),ZZ={provide:vi,useExisting:Pt(()=>JZ),multi:!0},JZ=(()=>{class t extends iI{writeValue(e){let n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,o){n&1&&N("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[ue([ZZ]),de]})}return t})();var wb=new L(""),eJ={provide:li,useExisting:Pt(()=>Fi)},Fi=(()=>{class t extends li{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new U;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,o,r,a){super(),this._ngModelWarningConfig=r,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=Mb(this,o)}ngOnChanges(e){if(this._isControlChanged(e)){let n=e.form.previousValue;n&&sf(n,this,!1),iu(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}xb(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&sf(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(n){return new(n||t)(Me(Oi,10),Me(xl,10),Me(vi,10),Me(wb,8),Me(_d,8))};static \u0275dir=R({type:t,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[ue([eJ]),de,Ne]})}return t})(),tJ={provide:Ei,useExisting:Pt(()=>yi)},yi=(()=>{class t extends Ei{callSetDisabledState;get submitted(){return Yn(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=si(()=>this._submittedReactive());_submittedReactive=ke(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new U;constructor(e,n,o){super(),this.callSetDisabledState=o,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(lf(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return iu(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){sf(e.control||null,e,!1),WZ(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),MI(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new af(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0,n={}){this.form.reset(e,n),this._submittedReactive.set(!1)}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,o=this.form.get(e.path);n!==o&&(sf(n||null,e),qZ(o)&&(iu(o,e,this.callSetDisabledState),e.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);xI(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&$Z(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Cb(this.form,this),this._oldForm&&lf(this._oldForm,this)}static \u0275fac=function(n){return new(n||t)(Me(Oi,10),Me(xl,10),Me(_d,8))};static \u0275dir=R({type:t,selectors:[["","formGroup",""]],hostBindings:function(n,o){n&1&&N("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[ue([tJ]),de,Ne]})}return t})(),nJ={provide:Ei,useExisting:Pt(()=>wI)},wI=(()=>{class t extends QZ{name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){SI(this._parent)}static \u0275fac=function(n){return new(n||t)(Me(Ei,13),Me(Oi,10),Me(xl,10))};static \u0275dir=R({type:t,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[ue([nJ]),de]})}return t})(),iJ={provide:Ei,useExisting:Pt(()=>DI)},DI=(()=>{class t extends Ei{_parent;name=null;constructor(e,n,o){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){SI(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return mf(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||t)(Me(Ei,13),Me(Oi,10),Me(xl,10))};static \u0275dir=R({type:t,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[ue([iJ]),de]})}return t})();function SI(t){return!(t instanceof wI)&&!(t instanceof yi)&&!(t instanceof DI)}var oJ={provide:li,useExisting:Pt(()=>er)},er=(()=>{class t extends li{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new U;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,n,o,r,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=Mb(this,r)}ngOnChanges(e){this._added||this._setUpControl(),xb(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return mf(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||t)(Me(Ei,13),Me(Oi,10),Me(xl,10),Me(vi,10),Me(wb,8))};static \u0275dir=R({type:t,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[ue([oJ]),de,Ne]})}return t})();function kI(t){return typeof t=="number"?t:parseInt(t,10)}function EI(t){return typeof t=="number"?t:parseFloat(t)}var ou=(()=>{class t{_validator=ef;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let n=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):ef,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,features:[Ne]})}return t})(),rJ={provide:Oi,useExisting:Pt(()=>aJ),multi:!0},aJ=(()=>{class t extends ou{max;inputName="max";normalizeInput=e=>EI(e);createValidator=e=>rI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&oe("max",o._enabled?o.max:null)},inputs:{max:"max"},standalone:!1,features:[ue([rJ]),de]})}return t})(),sJ={provide:Oi,useExisting:Pt(()=>cJ),multi:!0},cJ=(()=>{class t extends ou{min;inputName="min";normalizeInput=e=>EI(e);createValidator=e=>oI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&oe("min",o._enabled?o.min:null)},inputs:{min:"min"},standalone:!1,features:[ue([sJ]),de]})}return t})(),lJ={provide:Oi,useExisting:Pt(()=>Zr),multi:!0};var Zr=(()=>{class t extends ou{required;inputName="required";normalizeInput=$;createValidator=e=>aI;enabled(e){return e}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,o){n&2&&oe("required",o._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[ue([lJ]),de]})}return t})();var dJ={provide:Oi,useExisting:Pt(()=>uJ),multi:!0},uJ=(()=>{class t extends ou{minlength;inputName="minlength";normalizeInput=e=>kI(e);createValidator=e=>sI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&oe("minlength",o._enabled?o.minlength:null)},inputs:{minlength:"minlength"},standalone:!1,features:[ue([dJ]),de]})}return t})(),mJ={provide:Oi,useExisting:Pt(()=>pJ),multi:!0},pJ=(()=>{class t extends ou{maxlength;inputName="maxlength";normalizeInput=e=>kI(e);createValidator=e=>cI(e);static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275dir=R({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(n,o){n&2&&oe("maxlength",o._enabled?o.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[ue([mJ]),de]})}return t})();var II=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})(),fb=class extends gd{constructor(i,e,n){super(vb(e),yb(n,e)),this.controls=i,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(i){return this.controls[this._adjustIndex(i)]}push(i,e={}){Array.isArray(i)?i.forEach(n=>{this.controls.push(n),this._registerControl(n)}):(this.controls.push(i),this._registerControl(i)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(i,e,n={}){this.controls.splice(i,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,e={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(i,e,n={}){let o=this._adjustIndex(i);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),e&&(this.controls.splice(o,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,e={}){vI(this,!1,i),i.forEach((n,o)=>{bI(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(i,e={}){i!=null&&(i.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(i=[],e={}){this._forEachChild((n,o)=>{n.reset(i[o],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new nu(this))}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((e,n)=>n._syncPendingControls()?!0:e,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((e,n)=>{i(e,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(e=>e.enabled&&i(e))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(let i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}};function tI(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var fJ=(()=>{class t{useNonNullable=!1;get nonNullable(){let e=new t;return e.useNonNullable=!0,e}group(e,n=null){let o=this._reduceControls(e),r={};return tI(n)?r=n:n!==null&&(r.validators=n.validator,r.asyncValidators=n.asyncValidator),new Cl(o,r)}record(e,n=null){let o=this._reduceControls(e);return new pb(o,n)}control(e,n,o){let r={};return this.useNonNullable?(tI(n)?r=n:(r.validators=n,r.asyncValidators=o),new oc(e,Re(q({},r),{nonNullable:!0}))):new oc(e,n,o)}array(e,n,o){let r=e.map(a=>this._createControl(a));return new fb(r,n,o)}_reduceControls(e){let n={};return Object.keys(e).forEach(o=>{n[o]=this._createControl(e[o])}),n}_createControl(e){if(e instanceof oc)return e;if(e instanceof gd)return e;if(Array.isArray(e)){let n=e[0],o=e.length>1?e[1]:null,r=e.length>2?e[2]:null;return this.control(n,o,r)}else return this.control(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var sc=(()=>{class t extends fJ{group(e,n=null){return super.group(e,n)}control(e,n,o){return super.control(e,n,o)}array(e,n,o){return super.array(e,n,o)}static \u0275fac=(()=>{let e;return function(o){return(e||(e=Te(t)))(o||t)}})();static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var OI=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:_d,useValue:e.callSetDisabledState??uf}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({imports:[II]})}return t})(),ve=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wb,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:_d,useValue:e.callSetDisabledState??uf}]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({imports:[II]})}return t})();var TI=(()=>{class t{constructor(){this.locale=d(Wr),this.el=d(Z),this.control=d(li),this.format="N0",this.digitsInfo="1.0-0",this.sufix=""}set _(e){let n=e.split(":");this.currencyCode=n[0],this.displaySymbol=n.length>1?n[1]:"$",this.digitsInfo=n.length>2?n[2]:"1.2-2"}blur(e){e.value=this.parse(e.value)}focus(e){typeof this.control.value>"u"?e.value="":e.value=this.control.value}ngOnInit(){setTimeout(()=>{this.el.nativeElement.value=this.parse(this.el.nativeElement.value)})}parse(e){return e==""?""+this.sufix:Mp(e,this.locale,this.displaySymbol,this.currencyCode,this.digitsInfo)+this.sufix}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=R({type:t,selectors:[["","mifosxFormatAmount",""]],hostBindings:function(n,o){n&1&&N("blur",function(a){return o.blur(a.target)})("focus",function(a){return o.focus(a.target)})},inputs:{sufix:"sufix",_:[0,"mifosxFormatAmount","_"]}})}}return t})();var Ake=(()=>{class t{constructor(){this.control=d(li),this.el=d(Z)}onFocus(){this.control.control?.markAsTouched(),this.control.control?.updateValueAndValidity()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275dir=R({type:t,selectors:[["","mifosxValidateOnFocus",""]],hostBindings:function(n,o){n&1&&N("focus",function(){return o.onFocus()})}})}}return t})();var PI=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=ee({type:t})}static{this.\u0275inj=J({imports:[fe]})}}return t})();var Cr=class{constructor(i={}){this.controlType=i.controlType||"",this.controlName=i.controlName||"",this.label=i.label||"",this.value=i.value===void 0?"":i.value,this.required=!!i.required,this.order=i.order===void 0?1:i.order,this.validators=i.validators===void 0?[]:i.validators,this.min=i.min===void 0?null:i.min,this.max=i.max===void 0?null:i.max}};function bs(t){return t.buttons===0||t.detail===0}function vs(t){let i=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!i&&i.identifier===-1&&(i.radiusX==null||i.radiusX===1)&&(i.radiusY==null||i.radiusY===1)}var Db;function LI(){if(Db==null){let t=typeof document<"u"?document.head:null;Db=!!(t&&(t.createShadowRoot||t.attachShadow))}return Db}function Ml(t){if(LI()){let i=t.getRootNode?t.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function xo(){let t=typeof document<"u"&&document?document.activeElement:null;for(;t&&t.shadowRoot;){let i=t.shadowRoot.activeElement;if(i===t)break;t=i}return t}function qn(t){return t.composedPath?t.composedPath()[0]:t.target}var Sb;try{Sb=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Sb=!1}var $e=(()=>{class t{_platformId=d(pl);isBrowser=this._platformId?Pk(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Sb)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ru;function AI(){if(ru==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ru=!0}))}finally{ru=ru||!1}return ru}function cc(t){return AI()?t:!!t.capture}function wn(t,i=0){return pf(t)?Number(t):arguments.length===2?i:0}function pf(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function An(t){return t instanceof Z?t.nativeElement:t}var RI=new L("cdk-input-modality-detector-options"),zI={ignoreKeys:[18,17,224,91,16]},NI=650,kb={passive:!0,capture:!0},FI=(()=>{class t{_platform=d($e);_listenerCleanups;modalityDetected;modalityChanged;get mostRecentModality(){return this._modality.value}_mostRecentTarget=null;_modality=new ut(null);_options;_lastTouchMs=0;_onKeydown=e=>{this._options?.ignoreKeys?.some(n=>n===e.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=qn(e))};_onMousedown=e=>{Date.now()-this._lastTouchMs{if(vs(e)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=qn(e)};constructor(){let e=d(ce),n=d(De),o=d(RI,{optional:!0});if(this._options=q(q({},zI),o),this.modalityDetected=this._modality.pipe(qc(1)),this.modalityChanged=this.modalityDetected.pipe(x1()),this._platform.isBrowser){let r=d(Nn).createRenderer(null,null);this._listenerCleanups=e.runOutsideAngular(()=>[r.listen(n,"keydown",this._onKeydown,kb),r.listen(n,"mousedown",this._onMousedown,kb),r.listen(n,"touchstart",this._onTouchstart,kb)])}}ngOnDestroy(){this._modality.complete(),this._listenerCleanups?.forEach(e=>e())}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),au=(function(t){return t[t.IMMEDIATE=0]="IMMEDIATE",t[t.EVENTUAL=1]="EVENTUAL",t})(au||{}),VI=new L("cdk-focus-monitor-default-options"),ff=cc({passive:!0,capture:!0}),mn=(()=>{class t{_ngZone=d(ce);_platform=d($e);_inputModalityDetector=d(FI);_origin=null;_lastFocusOrigin;_windowFocused=!1;_windowFocusTimeoutId;_originTimeoutId;_originFromTouchInteraction=!1;_elementInfo=new Map;_monitoredElementCount=0;_rootNodeFocusListenerCount=new Map;_detectionMode;_windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)};_document=d(De);_stopInputModalityDetector=new B;constructor(){let e=d(VI,{optional:!0});this._detectionMode=e?.detectionMode||au.IMMEDIATE}_rootNodeFocusAndBlurListener=e=>{let n=qn(e);for(let o=n;o;o=o.parentElement)e.type==="focus"?this._onFocus(e,o):this._onBlur(e,o)};monitor(e,n=!1){let o=An(e);if(!this._platform.isBrowser||o.nodeType!==1)return ne();let r=Ml(o)||this._document,a=this._elementInfo.get(o);if(a)return n&&(a.checkChildren=!0),a.subject;let s={checkChildren:n,subject:new B,rootNode:r};return this._elementInfo.set(o,s),this._registerGlobalListeners(s),s.subject}stopMonitoring(e){let n=An(e),o=this._elementInfo.get(n);o&&(o.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(o))}focusVia(e,n,o){let r=An(e),a=this._document.activeElement;r===a?this._getClosestElementsInfo(r).forEach(([s,c])=>this._originChanged(s,n,c)):(this._setOrigin(n),typeof r.focus=="function"&&r.focus(o))}ngOnDestroy(){this._elementInfo.forEach((e,n)=>this.stopMonitoring(n))}_getWindow(){return this._document.defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===au.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,n){e.classList.toggle("cdk-focused",!!n),e.classList.toggle("cdk-touch-focused",n==="touch"),e.classList.toggle("cdk-keyboard-focused",n==="keyboard"),e.classList.toggle("cdk-mouse-focused",n==="mouse"),e.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(e,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&n,this._detectionMode===au.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?NI:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(e,n){let o=this._elementInfo.get(n),r=qn(e);!o||!o.checkChildren&&n!==r||this._originChanged(n,this._getFocusOrigin(r),o)}_onBlur(e,n){let o=this._elementInfo.get(n);!o||o.checkChildren&&e.relatedTarget instanceof Node&&n.contains(e.relatedTarget)||(this._setClasses(n),this._emitOrigin(o,null))}_emitOrigin(e,n){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(n))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let n=e.rootNode,o=this._rootNodeFocusListenerCount.get(n)||0;o||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,ff),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,ff)}),this._rootNodeFocusListenerCount.set(n,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(xe(this._stopInputModalityDetector)).subscribe(r=>{this._setOrigin(r,!0)}))}_removeGlobalListeners(e){let n=e.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let o=this._rootNodeFocusListenerCount.get(n);o>1?this._rootNodeFocusListenerCount.set(n,o-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,ff),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ff),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,n,o){this._setClasses(e,n),this._emitOrigin(o,n),this._lastFocusOrigin=n}_getClosestElementsInfo(e){let n=[];return this._elementInfo.forEach((o,r)=>{(r===e||o.checkChildren&&r.contains(e))&&n.push([r,o])}),n}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:n,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!n||n===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let r=e.labels;if(r){for(let a=0;a{class t{_elementRef=d(Z);_focusMonitor=d(mn);_monitorSubscription;_focusOrigin=null;cdkFocusChange=new U;constructor(){}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,e.nodeType===1&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]})}return t})();var hf=new WeakMap,lt=(()=>{class t{_appRef;_injector=d(Ce);_environmentInjector=d(Jt);load(e){let n=this._appRef=this._appRef||this._injector.get(bi),o=hf.get(n);o||(o={loaders:new Set,refs:[]},hf.set(n,o),n.onDestroy(()=>{hf.get(n)?.refs.forEach(r=>r.destroy()),hf.delete(n)})),o.loaders.has(e)||(o.loaders.add(e),o.refs.push(lp(e,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var No=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],decls:0,vars:0,template:function(n,o){},styles:[`.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0} `],encapsulation:2,changeDetection:0})}return t})();function Jr(t){return Array.isArray(t)?t:[t]}var BI=new Set,wl,gf=(()=>{class t{_platform=d($e);_nonce=d(W1,{optional:!0});_matchMedia;constructor(){this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):gJ}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&hJ(e,this._nonce),this._matchMedia(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function hJ(t,i){if(!BI.has(t))try{wl||(wl=document.createElement("style"),i&&wl.setAttribute("nonce",i),wl.setAttribute("type","text/css"),document.head.appendChild(wl)),wl.sheet&&(wl.sheet.insertRule(`@media ${t} {body{ }}`,0),BI.add(t))}catch(e){console.error(e)}}function gJ(t){return{matches:t==="all"||t==="",media:t,addListener:()=>{},removeListener:()=>{}}}var Dl=(()=>{class t{_mediaMatcher=d(gf);_zone=d(ce);_queries=new Map;_destroySubject=new B;constructor(){}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return jI(Jr(e)).some(o=>this._registerQuery(o).mql.matches)}observe(e){let o=jI(Jr(e)).map(a=>this._registerQuery(a).observable),r=ii(o);return r=Yi(r.pipe(Ve(1)),r.pipe(qc(1),$o(0))),r.pipe(le(a=>{let s={matches:!1,breakpoints:{}};return a.forEach(({matches:c,query:u})=>{s.matches=s.matches||c,s.breakpoints[u]=c}),s}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let n=this._mediaMatcher.matchMedia(e),r={observable:new Fe(a=>{let s=c=>this._zone.run(()=>a.next(c));return n.addListener(s),()=>{n.removeListener(s)}}).pipe(Ze(n),le(({matches:a})=>({query:e,matches:a})),xe(this._destroySubject)),mql:n};return this._queries.set(e,r),r}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function jI(t){return t.map(i=>i.split(",")).reduce((i,e)=>i.concat(e)).map(i=>i.trim())}function _J(t){if(t.type==="characterData"&&t.target instanceof Comment)return!0;if(t.type==="childList"){for(let i=0;i{class t{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),UI=(()=>{class t{_mutationObserverFactory=d(HI);_observedElements=new Map;_ngZone=d(ce);constructor(){}ngOnDestroy(){this._observedElements.forEach((e,n)=>this._cleanupObserver(n))}observe(e){let n=An(e);return new Fe(o=>{let a=this._observeElement(n).pipe(le(s=>s.filter(c=>!_J(c))),Oe(s=>!!s.length)).subscribe(s=>{this._ngZone.run(()=>{o.next(s)})});return()=>{a.unsubscribe(),this._unobserveElement(n)}})}_observeElement(e){return this._ngZone.runOutsideAngular(()=>{if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let n=new B,o=this._mutationObserverFactory.create(r=>n.next(r));o&&o.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:o,stream:n,count:1})}return this._observedElements.get(e).stream})}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:n,stream:o}=this._observedElements.get(e);n&&n.disconnect(),o.complete(),this._observedElements.delete(e)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),cu=(()=>{class t{_contentObserver=d(UI);_elementRef=d(Z);event=new U;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._disabled?this._unsubscribe():this._subscribe()}_disabled=!1;get debounce(){return this._debounce}set debounce(e){this._debounce=wn(e),this._subscribe()}_debounce;_currentSubscription=null;constructor(){}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._currentSubscription=(this.debounce?e.pipe($o(this.debounce)):e).subscribe(this.event)}_unsubscribe(){this._currentSubscription?.unsubscribe()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[2,"cdkObserveContentDisabled","disabled",$],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]})}return t})(),vd=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({providers:[HI]})}return t})();var dc=(()=>{class t{_platform=d($e);constructor(){}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return vJ(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let n=bJ(kJ(e));if(n&&($I(n)===-1||!this.isVisible(n)))return!1;let o=e.nodeName.toLowerCase(),r=$I(e);return e.hasAttribute("contenteditable")?r!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!DJ(e)?!1:o==="audio"?e.hasAttribute("controls")?r!==-1:!1:o==="video"?r===-1?!1:r!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,n){return SJ(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function bJ(t){try{return t.frameElement}catch{return null}}function vJ(t){return!!(t.offsetWidth||t.offsetHeight||typeof t.getClientRects=="function"&&t.getClientRects().length)}function yJ(t){let i=t.nodeName.toLowerCase();return i==="input"||i==="select"||i==="button"||i==="textarea"}function CJ(t){return MJ(t)&&t.type=="hidden"}function xJ(t){return wJ(t)&&t.hasAttribute("href")}function MJ(t){return t.nodeName.toLowerCase()=="input"}function wJ(t){return t.nodeName.toLowerCase()=="a"}function YI(t){if(!t.hasAttribute("tabindex")||t.tabIndex===void 0)return!1;let i=t.getAttribute("tabindex");return!!(i&&!isNaN(parseInt(i,10)))}function $I(t){if(!YI(t))return null;let i=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}function DJ(t){let i=t.nodeName.toLowerCase(),e=i==="input"&&t.type;return e==="text"||e==="password"||i==="select"||i==="textarea"}function SJ(t){return CJ(t)?!1:yJ(t)||xJ(t)||t.hasAttribute("contenteditable")||YI(t)}function kJ(t){return t.ownerDocument&&t.ownerDocument.defaultView||window}var _f=class{_element;_checker;_ngZone;_document;_injector;_startAnchor;_endAnchor;_hasAttached=!1;startAnchorListener=()=>this.focusLastTabbableElement();endAnchorListener=()=>this.focusFirstTabbableElement();get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_enabled=!0;constructor(i,e,n,o,r=!1,a){this._element=i,this._checker=e,this._ngZone=n,this._document=o,this._injector=a,r||this.attachAnchors()}destroy(){let i=this._startAnchor,e=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){let e=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return i=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let n=this._getFirstTabbableElement(e);return n?.focus(i),!!n}return e.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){let e=this._getRegionBoundary("start");return e&&e.focus(i),!!e}focusLastTabbableElement(i){let e=this._getRegionBoundary("end");return e&&e.focus(i),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;let e=i.children;for(let n=0;n=0;n--){let o=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(o)return o}return null}_createAnchor(){let i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,e){i?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._injector?Mt(i,{injector:this._injector}):setTimeout(i)}},yd=(()=>{class t{_checker=d(dc);_ngZone=d(ce);_document=d(De);_injector=d(Ce);constructor(){d(lt).load(No)}create(e,n=!1){return new _f(e,this._checker,this._ngZone,this._document,n,this._injector)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ib=(()=>{class t{_elementRef=d(Z);_focusTrapFactory=d(yd);focusTrap;_previouslyFocusedElement=null;get enabled(){return this.focusTrap?.enabled||!1}set enabled(e){this.focusTrap&&(this.focusTrap.enabled=e)}autoCapture;constructor(){d($e).isBrowser&&(this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0))}ngOnDestroy(){this.focusTrap?.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap?.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap&&!this.focusTrap.hasAttached()&&this.focusTrap.attachAnchors()}ngOnChanges(e){let n=e.autoCapture;n&&!n.firstChange&&this.autoCapture&&this.focusTrap?.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=xo(),this.focusTrap?.focusInitialElementWhenReady()}static \u0275fac=function(n){return new(n||t)};static \u0275dir=R({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:[2,"cdkTrapFocus","enabled",$],autoCapture:[2,"cdkTrapFocusAutoCapture","autoCapture",$]},exportAs:["cdkTrapFocus"],features:[Ne]})}return t})(),qI=new L("liveAnnouncerElement",{providedIn:"root",factory:QI});function QI(){return null}var KI=new L("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),EJ=0,lu=(()=>{class t{_ngZone=d(ce);_defaultOptions=d(KI,{optional:!0});_liveElement;_document=d(De);_previousTimeout;_currentPromise;_currentResolve;constructor(){let e=d(qI,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...n){let o=this._defaultOptions,r,a;return n.length===1&&typeof n[0]=="number"?a=n[0]:[r,a]=n,this.clear(),clearTimeout(this._previousTimeout),r||(r=o&&o.politeness?o.politeness:"polite"),a==null&&o&&(a=o.duration),this._liveElement.setAttribute("aria-live",r),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(s=>this._currentResolve=s)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",n=this._document.getElementsByClassName(e),o=this._document.createElement("div");for(let r=0;r .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{class t{_platform=d($e);_hasCheckedHighContrastMode;_document=d(De);_breakpointSubscription;constructor(){this._breakpointSubscription=d(Dl).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return lc.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let n=this._document.defaultView||window,o=n&&n.getComputedStyle?n.getComputedStyle(e):null,r=(o&&o.backgroundColor||"").replace(/ /g,"");switch(e.remove(),r){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return lc.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return lc.BLACK_ON_WHITE}return lc.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(Eb,GI,WI),this._hasCheckedHighContrastMode=!0;let n=this.getHighContrastMode();n===lc.BLACK_ON_WHITE?e.add(Eb,GI):n===lc.WHITE_ON_BLACK&&e.add(Eb,WI)}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ys=(()=>{class t{constructor(){d(bf)._applyBodyHighContrastModeCssClasses()}static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({imports:[vd]})}return t})();var Ob={},Ge=(()=>{class t{_appId=d(Xs);getId(e){return this._appId!=="ng"&&(e+=this._appId),Ob.hasOwnProperty(e)||(Ob[e]=0),`${e}${Ob[e]++}`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var IJ=200,Cd=class{_letterKeyStream=new B;_items=[];_selectedItemIndex=-1;_pressedLetters=[];_skipPredicateFn;_selectedItem=new B;selectedItem=this._selectedItem;constructor(i,e){let n=typeof e?.debounceInterval=="number"?e.debounceInterval:IJ;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(i),this._setupKeyHandler(n)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(i){this._selectedItemIndex=i}setItems(i){this._items=i}handleKey(i){let e=i.keyCode;i.key&&i.key.length===1?this._letterKeyStream.next(i.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(i){this._letterKeyStream.pipe(It(e=>this._pressedLetters.push(e)),$o(i),Oe(()=>this._pressedLetters.length>0),le(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let n=1;nt[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}var xd=class{_items;_activeItemIndex=ke(-1);_activeItem=ke(null);_wrap=!1;_typeaheadSubscription=Ee.EMPTY;_itemChangesSubscription;_vertical=!0;_horizontal;_allowedModifierKeys=[];_homeAndEnd=!1;_pageUpAndDown={enabled:!1,delta:10};_effectRef;_typeahead;_skipPredicateFn=i=>i.disabled;constructor(i,e){this._items=i,i instanceof zn?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):ya(i)&&(this._effectRef=Ea(()=>this._itemsChanged(i()),{injector:e}))}tabOut=new B;change=new B;skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new Cd(e,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:n=>this._skipPredicateFn(n)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(n=>{this.setActiveItem(n)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(i=!0){return this._homeAndEnd=i,this}withPageUpDown(i=!0,e=10){return this._pageUpAndDown={enabled:i,delta:e},this}setActiveItem(i){let e=this._activeItem();this.updateActiveItem(i),this._activeItem()!==e&&this.change.next(this._activeItemIndex())}onKeydown(i){let e=i.keyCode,o=["altKey","ctrlKey","metaKey","shiftKey"].every(r=>!i[r]||this._allowedModifierKeys.indexOf(r)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&o){this.setNextItemActive();break}else return;case 38:if(this._vertical&&o){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&o){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&o){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&o){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&o){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()-this._pageUpAndDown.delta;this._setActiveItemByIndex(r>0?r:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&o){let r=this._activeItemIndex()+this._pageUpAndDown.delta,a=this._getItemsArray().length;this._setActiveItemByIndex(r-1&&n!==this._activeItemIndex()&&(this._activeItemIndex.set(n),this._typeahead?.setCurrentSelectedItemIndex(n))}}};var Sl=class extends xd{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}};var ea=class extends xd{_origin="program";setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}};function kl(t){return hi(t)?t:ne(t)}var Tb=class{_activeItemIndex=-1;_activeItem=null;_shouldActivationFollowFocus=!1;_horizontalOrientation="ltr";_skipPredicateFn=i=>!1;_trackByFn=i=>i;_items=[];_typeahead;_typeaheadSubscription=Ee.EMPTY;_hasInitialFocused=!1;_initializeFocus(){if(this._hasInitialFocused||this._items.length===0)return;let i=0;for(let n=0;n{this._items=n.toArray(),this._typeahead?.setItems(this._items),this._updateActiveItemIndex(this._items),this._initializeFocus()})):hi(i)?i.subscribe(n=>{this._items=n,this._typeahead?.setItems(n),this._updateActiveItemIndex(n),this._initializeFocus()}):(this._items=i,this._initializeFocus()),typeof e.shouldActivationFollowFocus=="boolean"&&(this._shouldActivationFollowFocus=e.shouldActivationFollowFocus),e.horizontalOrientation&&(this._horizontalOrientation=e.horizontalOrientation),e.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),e.trackBy&&(this._trackByFn=e.trackBy),typeof e.typeAheadDebounceInterval<"u"&&this._setTypeAhead(e.typeAheadDebounceInterval)}change=new B;destroy(){this._typeaheadSubscription.unsubscribe(),this._typeahead?.destroy(),this.change.complete()}onKeydown(i){switch(i.key){case"Tab":return;case"ArrowDown":this._focusNextItem();break;case"ArrowUp":this._focusPreviousItem();break;case"ArrowRight":this._horizontalOrientation==="rtl"?this._collapseCurrentItem():this._expandCurrentItem();break;case"ArrowLeft":this._horizontalOrientation==="rtl"?this._expandCurrentItem():this._collapseCurrentItem();break;case"Home":this._focusFirstItem();break;case"End":this._focusLastItem();break;case"Enter":case" ":this._activateCurrentItem();break;default:if(i.key==="*"){this._expandAllItemsAtCurrentItemLevel();break}this._typeahead?.handleKey(i);return}this._typeahead?.reset(),i.preventDefault()}getActiveItemIndex(){return this._activeItemIndex}getActiveItem(){return this._activeItem}_focusFirstItem(){this.focusItem(this._findNextAvailableItemIndex(-1))}_focusLastItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._items.length))}_focusNextItem(){this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex))}_focusPreviousItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex))}focusItem(i,e={}){e.emitChangeEvent??=!0;let n=typeof i=="number"?i:this._items.findIndex(a=>this._trackByFn(a)===this._trackByFn(i));if(n<0||n>=this._items.length)return;let o=this._items[n];if(this._activeItem!==null&&this._trackByFn(o)===this._trackByFn(this._activeItem))return;let r=this._activeItem;this._activeItem=o??null,this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n),this._activeItem?.focus(),r?.unfocus(),e.emitChangeEvent&&this.change.next(this._activeItem),this._shouldActivationFollowFocus&&this._activateCurrentItem()}_updateActiveItemIndex(i){let e=this._activeItem;if(!e)return;let n=i.findIndex(o=>this._trackByFn(o)===this._trackByFn(e));n>-1&&n!==this._activeItemIndex&&(this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n))}_setTypeAhead(i){this._typeahead=new Cd(this._items,{debounceInterval:typeof i=="number"?i:void 0,skipPredicate:e=>this._skipPredicateFn(e)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(e=>{this.focusItem(e)})}_findNextAvailableItemIndex(i){for(let e=i+1;e=0;e--)if(!this._skipPredicateFn(this._items[e]))return e;return i}_collapseCurrentItem(){if(this._activeItem)if(this._isCurrentItemExpanded())this._activeItem.collapse();else{let i=this._activeItem.getParent();if(!i||this._skipPredicateFn(i))return;this.focusItem(i)}}_expandCurrentItem(){this._activeItem&&(this._isCurrentItemExpanded()?kl(this._activeItem.getChildren()).pipe(Ve(1)).subscribe(i=>{let e=i.find(n=>!this._skipPredicateFn(n));e&&this.focusItem(e)}):this._activeItem.expand())}_isCurrentItemExpanded(){return this._activeItem?typeof this._activeItem.isExpanded=="boolean"?this._activeItem.isExpanded:this._activeItem.isExpanded():!1}_isItemDisabled(i){return typeof i.isDisabled=="boolean"?i.isDisabled:i.isDisabled?.()}_expandAllItemsAtCurrentItemLevel(){if(!this._activeItem)return;let i=this._activeItem.getParent(),e;i?e=kl(i.getChildren()):e=ne(this._items.filter(n=>n.getParent()===null)),e.pipe(Ve(1)).subscribe(n=>{for(let o of n)o.expand()})}_activateCurrentItem(){this._activeItem?.activate()}};function OJ(){return(t,i)=>new Tb(t,i)}var JI=new L("tree-key-manager",{providedIn:"root",factory:OJ});var tO=" ";function Md(t,i,e){let n=xf(t,i);e=e.trim(),!n.some(o=>o.trim()===e)&&(n.push(e),t.setAttribute(i,n.join(tO)))}function uc(t,i,e){let n=xf(t,i);e=e.trim();let o=n.filter(r=>r!==e);o.length?t.setAttribute(i,o.join(tO)):t.removeAttribute(i)}function xf(t,i){return t.getAttribute(i)?.match(/\S+/g)??[]}var nO="cdk-describedby-message",Cf="cdk-describedby-host",Lb=0,wd=(()=>{class t{_platform=d($e);_document=d(De);_messageRegistry=new Map;_messagesContainer=null;_id=`${Lb++}`;constructor(){d(lt).load(No),this._id=d(Xs)+"-"+Lb++}describe(e,n,o){if(!this._canBeDescribed(e,n))return;let r=Pb(n,o);typeof n!="string"?(eO(n,this._id),this._messageRegistry.set(r,{messageElement:n,referenceCount:0})):this._messageRegistry.has(r)||this._createMessageElement(n,o),this._isElementDescribedByMessage(e,r)||this._addMessageReference(e,r)}removeDescription(e,n,o){if(!n||!this._isElementNode(e))return;let r=Pb(n,o);if(this._isElementDescribedByMessage(e,r)&&this._removeMessageReference(e,r),typeof n=="string"){let a=this._messageRegistry.get(r);a&&a.referenceCount===0&&this._deleteMessageElement(r)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${Cf}="${this._id}"]`);for(let n=0;no.indexOf(nO)!=0);e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){let o=this._messageRegistry.get(n);Md(e,"aria-describedby",o.messageElement.id),e.setAttribute(Cf,this._id),o.referenceCount++}_removeMessageReference(e,n){let o=this._messageRegistry.get(n);o.referenceCount--,uc(e,"aria-describedby",o.messageElement.id),e.removeAttribute(Cf)}_isElementDescribedByMessage(e,n){let o=xf(e,"aria-describedby"),r=this._messageRegistry.get(n),a=r&&r.messageElement.id;return!!a&&o.indexOf(a)!=-1}_canBeDescribed(e,n){if(!this._isElementNode(e))return!1;if(n&&typeof n=="object")return!0;let o=n==null?"":`${n}`.trim(),r=e.getAttribute("aria-label");return o?!r||r.trim()!==o:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static \u0275fac=function(n){return new(n||t)};static \u0275prov=z({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Pb(t,i){return typeof t=="string"?`${i||""}/${t}`:t}function eO(t,i){t.id||(t.id=`${nO}-${i}-${Lb++}`)}var TJ=["mat-internal-form-field",""],PJ=["*"],Dd=(()=>{class t{labelPosition;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,o){n&2&&ie("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},attrs:TJ,ngContentSelectors:PJ,decls:1,vars:0,template:function(n,o){n&1&&(Se(),ae(0))},styles:[`.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0} `],encapsulation:2,changeDetection:0})}return t})();var iO=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=ee({type:t});static \u0275inj=J({})}return t})(),Mf={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var LJ=new L("MATERIAL_ANIMATIONS");var oO=null;function mu(){return d(LJ,{optional:!0})?.animationsDisabled||d(p0,{optional:!0})==="NoopAnimations"?"di-disabled":(oO??=d(gf).matchMedia("(prefers-reduced-motion)").matches,oO?"reduced-motion":"enabled")}function We(){return mu()!=="enabled"}var pn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=P({type:t,selectors:[["structural-styles"]],decls:0,vars:0,template:function(n,o){},styles:[`.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}} diff --git a/browser/chunk-NJEDRF32.js b/browser/chunk-74HZWEDD.js similarity index 99% rename from browser/chunk-NJEDRF32.js rename to browser/chunk-74HZWEDD.js index ede190ffd..abc1e803d 100644 --- a/browser/chunk-NJEDRF32.js +++ b/browser/chunk-74HZWEDD.js @@ -1,3 +1,3 @@ -import{C as Es,G as rt,J as Rs,K as gt,Kc as Fs,Nb as L,Qb as Oe,R as Is,Tc as Te,b as Ls}from"./chunk-HZWIHY3V.js";import{a as It,b as Ft}from"./chunk-PHUH23IY.js";var Vh=(()=>{class e{constructor(t){this.translateService=t}translate(t,s){return this.translateService.get(t,s)}static{this.\u0275fac=function(s){return new(s||e)(Rs(Fs))}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac})}}return e})();function Zh(e){e||(e=gt(Is));let i=new Ls(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Es(i))}var nd=(()=>{class e{constructor(){this.settingsService=gt(Te),this.globalConfigurations=[e.DAYS_BEFORE_REPAYMENT_IS_DUE,e.DAYS_AFTER_REPAYMENT_IS_OVERDUE],this.propertyNames=["dueDaysForRepaymentEvent","overDueDaysForRepaymentEvent"]}static{this.LOAN_SCHEDULE_TYPE_CUMULATIVE="CUMULATIVE"}static{this.LOAN_SCHEDULE_TYPE_PROGRESSIVE="PROGRESSIVE"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL="HORIZONTAL"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_VERTICAL="VERTICAL"}static{this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY="advanced-payment-allocation-strategy"}static{this.DAYS_BEFORE_REPAYMENT_IS_DUE="days-before-repayment-is-due"}static{this.DAYS_AFTER_REPAYMENT_IS_OVERDUE="days-after-repayment-is-overdue"}static isAdvancedPaymentAllocationStrategy(t){return t===this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY}setItemsByDefault(t){let s=[];return t.globalConfiguration.forEach(n=>{this.globalConfigurations.includes(n.name)&&s.push(n)}),s}updateLoanProductDefaults(t,s){return t.itemsByDefault.forEach(o=>{let a=this.resolvePropertyName(o.name);a!==""&&(s?(!t[a]||t[a]==="")&&(t[a]=o.value):t[a]=o.value)}),t}buildPayload(t,s){let n=this.settingsService.dateFormat,o=this.settingsService.language.code,a=Ft(It({},t),{charges:t.charges.map(r=>({id:r.id})),dateFormat:n,locale:o});return delete a.allowAttributeConfiguration,delete a.advancedAccountingRules,a.allowPartialPeriodInterestCalculation=a.allowPartialPeriodInterestCalculation,delete a.allowPartialPeriodInterestCalculation,s.forEach(r=>{let l=this.resolvePropertyName(r.name);l!==""&&(!a[l]||a[l]==="")&&(a[l]=r.value)}),a}isItemByDefault(t){return this.propertyNames.includes(t)}isGlobalConfigurations(t){return this.globalConfigurations.includes(t)}resolvePropertyName(t){if(this.globalConfigurations.includes(t)){let s=this.globalConfigurations.indexOf(t);if(s>-1)return this.propertyNames[s]}return""}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var hd=(()=>{class e{constructor(){this.http=gt(Oe),this.basePath="/external-asset-owners"}executeExternalAssetOwnerLoanCommand(t,s,n){let o=new L().set("command",n);return this.http.post(`${this.basePath}/transfers/loans/${t}`,s,{params:o})}executeExternalAssetOwnerTransferCommand(t,s,n){let o=new L().set("command",n);return this.http.post(`${this.basePath}/transfers/${t}`,s,{params:o})}retrieveExternalAssetOwnerTransfers(t){let s=new L().set("loanId",t);return this.http.get(`${this.basePath}/transfers`,{params:s})}retrieveExternalAssetOwnerActiveTransfer(t){let s=new L().set("loanId",t);return this.http.get(`${this.basePath}/transfers/active-transfer`,{params:s})}retrieveExternalAssetOwnerTransferJournalEntries(t){return this.http.get(`${this.basePath}/transfers/${t}/journal-entries`)}searchExternalAssetOwnerTransfer(t){return this.http.post(`${this.basePath}/search`,t)}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var md=(()=>{class e{constructor(){this.http=gt(Oe),this.settingsService=gt(Te)}getProvisioningCriterias(){return this.http.get("/provisioningcriteria")}getProvisioningCriteriaTemplate(){return this.http.get("/provisioningcriteria/template")}getProvisioningCriteria(t,s=!1){let n=new L().set("template",s.toString());return this.http.get(`/provisioningcriteria/${t}`,{params:n})}createProvisioningCriteria(t){return this.http.post("/provisioningcriteria",t)}updateProvisioningCriteria(t,s){return this.http.put(`/provisioningcriteria/${t}`,s)}deleteProvisioningCriteria(t){return this.http.delete(`/provisioningcriteria/${t}`)}getOffices(){return this.http.get("/offices")}getOfficeTemplate(t){let s=new L().set("officeId",t.toString());return this.http.get("/loans/loanreassignment/template",{params:s})}getOfficerTemplate(t,s){let n=new L().set("fromLoanOfficerId",t.toString()).set("officeId",s.toString());return this.http.get("/loans/loanreassignment/template",{params:n})}createLoanReassignment(t){return this.http.post("/loans/loanreassignment",t)}getOffice(t,s=!1){let n=new L().set("template",s.toString());return this.http.get(`/offices/${t}`,{params:n})}createOffice(t){return this.http.post("/offices",t)}updateOffice(t,s){return this.http.put(`/offices/${t}`,s)}getOfficeDatatables(){let t=new L().set("apptable","m_office");return this.http.get("/datatables",{params:t})}getOfficeDatatable(t,s){let n=new L().set("genericResultSet","true");return this.http.get(`/datatables/${s}/${t}`,{params:n})}addOfficeDatatableEntry(t,s,n){let o=new L().set("genericResultSet","true");return this.http.post(`/datatables/${s}/${t}`,n,{params:o})}editOfficeDatatableEntry(t,s,n){let o=new L().set("genericResultSet","true");return this.http.put(`/datatables/${s}/${t}`,n,{params:o})}deleteDatatableContent(t,s){let n=new L().set("genericResultSet","true");return this.http.delete(`/datatables/${s}/${t}`,{params:n})}getEmployees(){let t=new L().set("status","all");return this.http.get("/staff",{params:t})}createEmployee(t){return this.http.post("/staff",t)}getEmployee(t,s=!0){let n=new L().set("template",s.toString());return this.http.get(`/staff/${t}`,{params:n})}getCurrencies(){return this.http.get("/currencies")}updateCurrencies(t){return this.http.put("/currencies",{currencies:t})}getSmsCampaigns(){return this.http.get("/smscampaigns")}getSmsCampaign(t){return this.http.get(`/smscampaigns/${t}`)}createSmsCampaign(t){return this.http.post("/smscampaigns",t)}updateSmsCampaign(t,s){return this.http.put(`/smscampaigns/${s}`,t)}deleteSmsCampaign(t){return this.http.delete(`/smscampaigns/${t}`)}getSmsCampaignTemplate(){return this.http.get("/smscampaigns/template")}executeSmsCampaignCommand(t,s,n){let o=new L().set("command",n.toString());return this.http.post(`/smscampaigns/${t}`,s,{params:o})}getMessagebyStatus(t){let s=new L().set("status",t.status.toString()).set("locale",t.locale).set("dateFormat",t.dateFormat);return s=t.fromDate?s.set("fromDate",t.fromDate):s,s=t.toDate?s.set("toDate",t.toDate):s,this.http.get(`/sms/${t.id}/messageByStatus`,{params:s})}getAdhocQueries(){return this.http.get("/adhocquery")}getAdhocQuery(t){return this.http.get(`/adhocquery/${t}`)}getAdhocQueryTemplate(){return this.http.get("/adhocquery/template")}getAdhocQueryAndTemplate(t){let s=new L().set("template","true");return this.http.get(`/adhocquery/${t}`,{params:s})}createAdhocQuery(t){return this.http.post("/adhocquery",t)}updateAdhocQuery(t,s){return this.http.put(`/adhocquery/${t}`,s)}deleteAdhocQuery(t){return this.http.delete(`/adhocquery/${t}`)}getTellers(){return this.http.get("/tellers")}getTeller(t){return this.http.get(`/tellers/${t}`)}getCashiers(t){return this.http.get(`/tellers/${t}/cashiers`)}getCashier(t,s){return this.http.get(`/tellers/${t}/cashiers/${s}`)}getCashierSummaryAndTransactions(t,s,n){let o=new L().set("currencyCode",n);return this.http.get(`/tellers/${t}/cashiers/${s}/summaryandtransactions`,{params:o})}getCashierTransactionTemplate(t,s){return this.http.get(`/tellers/${t}/cashiers/${s}/transactions/template`)}createCashier(t,s){return this.http.post(`/tellers/${t}/cashiers`,s)}deleteCashier(t,s){return this.http.delete(`/tellers/${t}/cashiers/${s}`)}settleCash(t,s,n){let o=new L().set("command","settle");return this.http.post(`/tellers/${t}/cashiers/${s}/settle`,n,{params:o})}allocateCash(t,s,n){let o=new L().set("command","allocate");return this.http.post(`/tellers/${t}/cashiers/${s}/allocate`,n,{params:o})}getCashierTemplate(t){return this.http.get(`/tellers/${t}/cashiers/template`)}updateCashier(t,s,n){return this.http.put(`/tellers/${t}/cashiers/${s}`,n)}deleteTeller(t){return this.http.delete(`/tellers/${t}`)}createTeller(t){return this.http.post("/tellers",t)}getPaymentTypes(){return this.http.get("/paymenttypes")}getPaymentTypesWithCode(){return this.http.get("/paymenttypes?onlyWithCode=true")}createPaymentType(t){return this.http.post("/paymenttypes",t)}deletePaymentType(t){return this.http.delete(`/paymenttypes/${t}`)}getPaymentType(t){return this.http.get(`/paymenttypes/${t}`)}updatePaymentType(t,s){return this.http.put(`/paymenttypes/${t}`,s)}getPasswordPreferencesTemplate(){return this.http.get("/passwordpreferences/template")}updatePasswordPreferences(t){return this.http.put("/passwordpreferences",t)}getEntityDataTableChecks(t=0,s=-1){let n=new L().set("offset",t.toString()).set("limit",s.toString());return this.http.get("/entityDatatableChecks",{params:n})}getEntityDataTableChecksTemplate(){return this.http.get("/entityDatatableChecks/template")}createEntityDataTableChecks(t){return this.http.post("/entityDatatableChecks",t)}deleteEntityDataTableCheck(t){return this.http.delete(`/entityDatatableChecks/${t}`)}getWorkingDays(){return this.http.get("/workingdays")}updateWorkingDays(t){return this.http.put("/workingdays",t)}getHolidays(t){let s=new L().set("officeId",t.toString());return this.http.get("/holidays",{params:s})}getHoliday(t){return this.http.get(`/holidays/${t}`)}getHolidayTemplate(){return this.http.get("/holidays/template")}createHoliday(t){return this.http.post("/holidays",t)}updateHoliday(t,s){return this.http.put(`/holidays/${t}`,s)}deleteHoliday(t){return this.http.delete(`/holidays/${t}`)}activateHoliday(t){let s=new L().set("command","activate");return this.http.post(`/holidays/${t}`,null,{params:s})}updateEmployee(t,s){return this.http.put(`/staff/${t}`,s)}updateTeller(t,s){return this.http.put(`/tellers/${t}`,s)}getFunds(){return this.http.get("/funds")}getFund(t){return this.http.get(`/funds/${t}`)}createFund(t){return this.http.post("/funds",t)}editFund(t,s){return this.http.put(`/funds/${t}`,s)}getStaffs(t){let s=new L().set("officeId",t).set("status","all");return this.http.get("/staff",{params:s})}getCenters(t){let s=new L().set("officeId",t).set("status","all");return this.http.get("/centers",{params:s})}getGroups(t){let s=new L().set("officeId",t).set("status","all");return this.http.get("/groups",{params:s})}getStaff(t){let s=new L().set("officeId",t.toString());return this.http.get("/staff",{params:s})}getImports(t){let s=new L().set("entityType",t);return this.http.get("/imports",{params:s})}getAdvanceSearchTemplate(){return this.http.get("/search/template")}retrieveAdvanceSearchResults(t){return this.http.post("/search/advance",t)}getStandingInstructionTemplate(){return this.http.get("/standinginstructions/template")}getStandingInstructions(t){let s=new L;for(let n in t)t[n]!==""&&t[n]!==null&&(s=s.set(n,t[n]));return this.http.get("/standinginstructionrunhistory",{params:s})}getImportTemplate(t,s,n,o){let a=new L().set("tenantIdentifier","default").set("locale",this.settingsService.language.code).set("dateFormat",this.settingsService.dateFormat);return s&&(a=a.set("officeId",s.toString())),n&&(a=a.set("staffId",n.toString())),o.length&&(a=a.set("legalFormType",o)),this.http.get(`${t}/downloadtemplate`,{params:a,responseType:"arraybuffer",observe:"response"})}getImportDocument(t){let s=new L().set("importDocumentId",t).set("tenantIdentifier","default");return this.http.get("/imports/downloadOutputTemplate",{params:s,responseType:"arraybuffer",observe:"response"})}uploadImportDocument(t,s,n){let o=new L;n.length&&(o=o.set("legalFormType",n));let a=new FormData;return a.append("file",t),a.append("locale",this.settingsService.language.code),a.append("dateFormat",this.settingsService.dateFormat),this.http.post(`${s}/uploadtemplate`,a,{params:o})}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var xd=(()=>{class e{constructor(){this.defaultDate="9999-12-31"}validateStatus(t,s){return t!=null?t.status===s:!1}itemCurrentStatus(t){return this.isBuyBackPending(t)?t.status+" PENDING":t.status}itemStatus(t){return"status-"+t.toLowerCase()}isPending(t){return t.status==="PENDING"}isPendingOrCanceled(t){return t.status==="PENDING"||t.status==="CANCELLED"||this.isBuyBackPending(t)}isBuyBackPending(t){return t.status==="BUYBACK"&&t.effectiveTo===this.defaultDate}canBeCancelled(t){return this.validateStatus(t,"PENDING")}canBeSold(t){return t==null?!0:["","CANCELLED"].includes(t.status)||t.status==="BUYBACK"&&t.effectiveTo!==this.defaultDate}canBeBuyed(t){return this.validateStatus(t,"ACTIVE")}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function de(e){return e+.5|0}var St=(e,i,t)=>Math.max(Math.min(e,t),i);function ce(e){return St(de(e*2.55),0,255)}function Mt(e){return St(de(e*255),0,255)}function pt(e){return St(de(e/2.55)/100,0,1)}function zs(e){return St(de(e*100),0,100)}var it={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xi=[..."0123456789ABCDEF"],Zo=e=>xi[e&15],Jo=e=>xi[(e&240)>>4]+xi[e&15],Ee=e=>(e&240)>>4===(e&15),ta=e=>Ee(e.r)&&Ee(e.g)&&Ee(e.b)&&Ee(e.a);function ea(e){var i=e.length,t;return e[0]==="#"&&(i===4||i===5?t={r:255&it[e[1]]*17,g:255&it[e[2]]*17,b:255&it[e[3]]*17,a:i===5?it[e[4]]*17:255}:(i===7||i===9)&&(t={r:it[e[1]]<<4|it[e[2]],g:it[e[3]]<<4|it[e[4]],b:it[e[5]]<<4|it[e[6]],a:i===9?it[e[7]]<<4|it[e[8]]:255})),t}var ia=(e,i)=>e<255?i(e):"";function sa(e){var i=ta(e)?Zo:Jo;return e?"#"+i(e.r)+i(e.g)+i(e.b)+ia(e.a,i):void 0}var na=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ws(e,i,t){let s=i*Math.min(t,1-t),n=(o,a=(o+e/30)%12)=>t-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function oa(e,i,t){let s=(n,o=(n+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function aa(e,i,t){let s=Ws(e,1,.5),n;for(i+t>1&&(n=1/(i+t),i*=n,t*=n),n=0;n<3;n++)s[n]*=1-i-t,s[n]+=i;return s}function ra(e,i,t,s,n){return e===n?(i-t)/s+(i.5?h/(2-o-a):h/(o+a),l=ra(t,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function yi(e,i,t,s){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,s)).map(Mt)}function vi(e,i,t){return yi(Ws,e,i,t)}function la(e,i,t){return yi(aa,e,i,t)}function ca(e,i,t){return yi(oa,e,i,t)}function Hs(e){return(e%360+360)%360}function ha(e){let i=na.exec(e),t=255,s;if(!i)return;i[5]!==s&&(t=i[6]?ce(+i[5]):Mt(+i[5]));let n=Hs(+i[2]),o=+i[3]/100,a=+i[4]/100;return i[1]==="hwb"?s=la(n,o,a):i[1]==="hsv"?s=ca(n,o,a):s=vi(n,o,a),{r:s[0],g:s[1],b:s[2],a:t}}function da(e,i){var t=_i(e);t[0]=Hs(t[0]+i),t=vi(t),e.r=t[0],e.g=t[1],e.b=t[2]}function ua(e){if(!e)return;let i=_i(e),t=i[0],s=zs(i[1]),n=zs(i[2]);return e.a<255?`hsla(${t}, ${s}%, ${n}%, ${pt(e.a)})`:`hsl(${t}, ${s}%, ${n}%)`}var Bs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ns={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function fa(){let e={},i=Object.keys(Ns),t=Object.keys(Bs),s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return e}var Re;function ga(e){Re||(Re=fa(),Re.transparent=[0,0,0,0]);let i=Re[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var pa=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ma(e){let i=pa.exec(e),t=255,s,n,o;if(i){if(i[7]!==s){let a=+i[7];t=i[8]?ce(a):St(a*255,0,255)}return s=+i[1],n=+i[3],o=+i[5],s=255&(i[2]?ce(s):St(s,0,255)),n=255&(i[4]?ce(n):St(n,0,255)),o=255&(i[6]?ce(o):St(o,0,255)),{r:s,g:n,b:o,a:t}}}function ba(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${pt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var bi=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Xt=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function xa(e,i,t){let s=Xt(pt(e.r)),n=Xt(pt(e.g)),o=Xt(pt(e.b));return{r:Mt(bi(s+t*(Xt(pt(i.r))-s))),g:Mt(bi(n+t*(Xt(pt(i.g))-n))),b:Mt(bi(o+t*(Xt(pt(i.b))-o))),a:e.a+t*(i.a-e.a)}}function Ie(e,i,t){if(e){let s=_i(e);s[i]=Math.max(0,Math.min(s[i]+s[i]*t,i===0?360:1)),s=vi(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function js(e,i){return e&&Object.assign(i||{},e)}function Vs(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=Mt(e[3]))):(i=js(e,{r:0,g:0,b:0,a:1}),i.a=Mt(i.a)),i}function _a(e){return e.charAt(0)==="r"?ma(e):ha(e)}var he=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,s;t==="object"?s=Vs(i):t==="string"&&(s=ea(i)||ga(i)||_a(i)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var i=js(this._rgb);return i&&(i.a=pt(i.a)),i}set rgb(i){this._rgb=Vs(i)}rgbString(){return this._valid?ba(this._rgb):void 0}hexString(){return this._valid?sa(this._rgb):void 0}hslString(){return this._valid?ua(this._rgb):void 0}mix(i,t){if(i){let s=this.rgb,n=i.rgb,o,a=t===o?.5:t,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(i,t){return i&&(this._rgb=xa(this._rgb,i._rgb,t)),this}clone(){return new e(this.rgb)}alpha(i){return this._rgb.a=Mt(i),this}clearer(i){let t=this._rgb;return t.a*=1-i,this}greyscale(){let i=this._rgb,t=de(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=t,this}opaquer(i){let t=this._rgb;return t.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return Ie(this._rgb,2,i),this}darken(i){return Ie(this._rgb,2,-i),this}saturate(i){return Ie(this._rgb,1,i),this}desaturate(i){return Ie(this._rgb,1,-i),this}rotate(i){return da(this._rgb,i),this}};function ht(){}var tn=(()=>{let e=0;return()=>e++})();function A(e){return e==null}function z(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function O(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function W(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Z(e,i){return W(e)?e:i}function P(e,i){return typeof e>"u"?i:e}var en=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/i,ki=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*i:+e;function F(e,i,t){if(e&&typeof e.call=="function")return e.apply(t,i)}function R(e,i,t,s){let n,o,a;if(z(e))if(o=e.length,s)for(n=o-1;n>=0;n--)i.call(t,e[n],n);else for(n=0;ne,x:e=>e.x,y:e=>e.y};function Sa(e){let i=e.split("."),t=[],s="";for(let n of i)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(t.push(s),s="");return t}function Ma(e){let i=Sa(e);return t=>{for(let s of i){if(s==="")break;t=t&&t[s]}return t}}function xt(e,i){return($s[i]||($s[i]=Ma(i)))(e)}function je(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Zt=e=>typeof e<"u",mt=e=>typeof e=="function",Pi=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0};function nn(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var E=Math.PI,B=2*E,wa=B+E,Ve=Number.POSITIVE_INFINITY,ka=E/180,H=E/2,zt=E/4,Ys=E*2/3,bt=Math.log10,ot=Math.sign;function Jt(e,i,t){return Math.abs(e-i)n-o).pop(),i}function Pa(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Vt(e){return!Pa(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function an(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e}function Di(e,i,t){let s,n,o;for(s=0,n=e.length;sl&&c=Math.min(i,t)-s&&e<=Math.max(i,t)+s}function Ye(e,i,t){t=t||(a=>e[a]1;)o=n+s>>1,t(o)?n=o:s=o;return{lo:n,hi:s}}var lt=(e,i,t,s)=>Ye(e,t,s?n=>{let o=e[n][i];return oe[n][i]Ye(e,t,s=>e[s][i]>=t);function cn(e,i,t){let s=0,n=e.length;for(;ss&&e[n-1]>t;)n--;return s>0||n{let s="_onData"+je(t),n=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return e._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ti(e,i){let t=e._chartjs;if(!t)return;let s=t.listeners,n=s.indexOf(i);n!==-1&&s.splice(n,1),!(s.length>0)&&(hn.forEach(o=>{delete e[o]}),delete e._chartjs)}function Li(e){let i=new Set(e);return i.size===e.length?e:Array.from(i)}var Ei=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Ri(e,i){let t=[],s=!1;return function(...n){t=n,s||(s=!0,Ei.call(window,()=>{s=!1,e.apply(i,t)}))}}function un(e,i){let t;return function(...s){return i?(clearTimeout(t),t=setTimeout(e,i,s)):e.apply(this,s),i}}var Ue=e=>e==="start"?"left":e==="end"?"right":"center",q=(e,i,t)=>e==="start"?i:e==="end"?t:(i+t)/2,fn=(e,i,t,s)=>e===(s?"left":"right")?t:e==="center"?(i+t)/2:i;function Ii(e,i,t){let s=i.length,n=0,o=s;if(e._sorted){let{iScale:a,vScale:r,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,h=a.axis,{min:d,max:u,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(n=Math.min(lt(l,h,d).lo,t?s:lt(i,h,a.getPixelForValue(d)).lo),c){let g=l.slice(0,n+1).reverse().findIndex(m=>!A(m[r.axis]));n-=Math.max(0,g)}n=Y(n,0,s-1)}if(p){let g=Math.max(lt(l,a.axis,u,!0).hi+1,t?0:lt(i,h,a.getPixelForValue(u),!0).hi+1);if(c){let m=l.slice(g-1).findIndex(b=>!A(b[r.axis]));g+=Math.max(0,m)}o=Y(g,n,s)-n}else o=s-n}return{start:n,count:o}}function Fi(e){let{xScale:i,yScale:t,_scaleRanges:s}=e,n={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!s)return e._scaleRanges=n,!0;let o=s.xmin!==i.min||s.xmax!==i.max||s.ymin!==t.min||s.ymax!==t.max;return Object.assign(s,n),o}var Fe=e=>e===0||e===1,Us=(e,i,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-i)*B/t)),Xs=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*B/t)+1,qt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*H)+1,easeOutSine:e=>Math.sin(e*H),easeInOutSine:e=>-.5*(Math.cos(E*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Fe(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Fe(e)?e:Us(e,.075,.3),easeOutElastic:e=>Fe(e)?e:Xs(e,.075,.3),easeInOutElastic(e){return Fe(e)?e:e<.5?.5*Us(e*2,.1125,.45):.5+.5*Xs(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let i=1.70158;return(e/=.5)<1?.5*(e*e*(((i*=1.525)+1)*e-i)):.5*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)},easeInBounce:e=>1-qt.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?qt.easeInBounce(e*2)*.5:qt.easeOutBounce(e*2-1)*.5+.5};function zi(e){if(e&&typeof e=="object"){let i=e.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]"}return!1}function Bi(e){return zi(e)?e:new he(e)}function Si(e){return zi(e)?e:new he(e).saturate(.5).darken(.1).hexString()}var Da=["x","y","borderWidth","radius","tension"],Aa=["color","borderColor","backgroundColor"];function Oa(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),e.set("animations",{colors:{type:"color",properties:Aa},numbers:{type:"number",properties:Da}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}})}function Ta(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var qs=new Map;function La(e,i){i=i||{};let t=e+JSON.stringify(i),s=qs.get(t);return s||(s=new Intl.NumberFormat(e,i),qs.set(t,s)),s}function ee(e,i,t){return La(i,t).format(e)}var gn={values(e){return z(e)?e:""+e},numeric(e,i,t){if(e===0)return"0";let s=this.chart.options.locale,n,o=e;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=Ea(e,t)}let a=bt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ee(e,s,l)},logarithmic(e,i,t){if(e===0)return"0";let s=t[i].significand||e/Math.pow(10,Math.floor(bt(e)));return[1,2,3,5,10,15].includes(s)||i>.8*t.length?gn.numeric.call(this,e,i,t):""}};function Ea(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}var pe={formatters:gn};function Ra(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:pe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"})}var Pt=Object.create(null),Xe=Object.create(null);function ue(e,i){if(!i)return e;let t=i.split(".");for(let s=0,n=t.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Si(n.backgroundColor),this.hoverBorderColor=(s,n)=>Si(n.borderColor),this.hoverColor=(s,n)=>Si(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return Mi(this,i,t)}get(i){return ue(this,i)}describe(i,t){return Mi(Xe,i,t)}override(i,t){return Mi(Pt,i,t)}route(i,t,s,n){let o=ue(this,i),a=ue(this,s),r="_"+t;Object.defineProperties(o,{[r]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[r],c=a[n];return O(l)?Object.assign({},c,l):P(l,c)},set(l){this[r]=l}}})}apply(i){i.forEach(t=>t(this))}},N=new wi({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Oa,Ta,Ra]);function Ia(e){return!e||A(e.size)||A(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function fe(e,i,t,s,n){let o=i[n];return o||(o=i[n]=e.measureText(n).width,t.push(n)),o>s&&(s=o),s}function pn(e,i,t,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==i&&(n=s.data={},o=s.garbageCollect=[],s.font=i),e.save(),e.font=i;let a=0,r=t.length,l,c,h,d,u;for(l=0;lt.length){for(l=0;l0&&e.stroke()}}function ct(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.xi.top-t&&e.y0&&o.strokeColor!=="",l,c;for(e.save(),e.font=n.string,Fa(e,o),l=0;l+e||0;function Ke(e,i){let t={},s=O(i),n=s?Object.keys(i):i,o=O(e)?s?a=>P(e[a],e[i[a]]):a=>e[a]:()=>e;for(let a of n)t[a]=Ha(o(a));return t}function Wi(e){return Ke(e,{top:"y",right:"x",bottom:"y",left:"x"})}function At(e){return Ke(e,["topLeft","topRight","bottomLeft","bottomRight"])}function K(e){let i=Wi(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function $(e,i){e=e||{},i=i||N.font;let t=P(e.size,i.size);typeof t=="string"&&(t=parseInt(t,10));let s=P(e.style,i.style);s&&!(""+s).match(Va)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let n={family:P(e.family,i.family),lineHeight:Wa(P(e.lineHeight,i.lineHeight),t),size:t,style:s,weight:P(e.weight,i.weight),string:""};return n.string=Ia(n),n}function se(e,i,t,s){let n=!0,o,a,r;for(o=0,a=e.length;ot&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function _t(e,i){return Object.assign(Object.create(e),i)}function Ge(e,i=[""],t,s,n=()=>e[0]){let o=t||e;typeof s>"u"&&(s=vn("_fallback",e));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>Ge([r,...e],i,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete e[0][l],!0},get(r,l){return _n(r,l,()=>Ga(l,i,e,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(r,l){return Gs(r).includes(l)},ownKeys(r){return Gs(r)},set(r,l,c){let h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function Nt(e,i,t,s){let n={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:Hi(e,s),setContext:o=>Nt(e,o,t,s),override:o=>Nt(e.override(o),i,t,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,r){return _n(o,a,()=>$a(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,r){return e[a]=r,delete o[a],!0}})}function Hi(e,i={scriptable:!0,indexable:!0}){let{_scriptable:t=i.scriptable,_indexable:s=i.indexable,_allKeys:n=i.allKeys}=e;return{allKeys:n,scriptable:t,indexable:s,isScriptable:mt(t)?t:()=>t,isIndexable:mt(s)?s:()=>s}}var ja=(e,i)=>e?e+je(i):i,ji=(e,i)=>O(i)&&e!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function _n(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||i==="constructor")return e[i];let s=t();return e[i]=s,s}function $a(e,i,t){let{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=e,r=s[i];return mt(r)&&a.isScriptable(i)&&(r=Ya(i,r,e,t)),z(r)&&r.length&&(r=Ua(i,r,e,a.isIndexable)),ji(i,r)&&(r=Nt(r,n,o&&o[i],a)),r}function Ya(e,i,t,s){let{_proxy:n,_context:o,_subProxy:a,_stack:r}=t;if(r.has(e))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+e);r.add(e);let l=i(o,a||s);return r.delete(e),ji(e,l)&&(l=$i(n._scopes,n,e,l)),l}function Ua(e,i,t,s){let{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=t;if(typeof o.index<"u"&&s(e))return i[o.index%i.length];if(O(i[0])){let l=i,c=n._scopes.filter(h=>h!==l);i=[];for(let h of l){let d=$i(c,n,e,h);i.push(Nt(d,o,a&&a[e],r))}}return i}function yn(e,i,t){return mt(e)?e(i,t):e}var Xa=(e,i)=>e===!0?i:typeof e=="string"?xt(i,e):void 0;function qa(e,i,t,s,n){for(let o of i){let a=Xa(t,o);if(a){e.add(a);let r=yn(a._fallback,t,n);if(typeof r<"u"&&r!==t&&r!==s)return r}else if(a===!1&&typeof s<"u"&&t!==s)return null}return!1}function $i(e,i,t,s){let n=i._rootScopes,o=yn(i._fallback,t,s),a=[...e,...n],r=new Set;r.add(s);let l=Ks(r,a,t,o||t,s);return l===null||typeof o<"u"&&o!==t&&(l=Ks(r,a,o,l,s),l===null)?!1:Ge(Array.from(r),[""],n,o,()=>Ka(i,t,s))}function Ks(e,i,t,s,n){for(;t;)t=qa(e,i,t,s,n);return t}function Ka(e,i,t){let s=e._getTarget();i in s||(s[i]={});let n=s[i];return z(n)&&O(t)?t:n||{}}function Ga(e,i,t,s){let n;for(let o of i)if(n=vn(ja(o,e),t),typeof n<"u")return ji(e,n)?$i(t,s,e,n):n}function vn(e,i){for(let t of i){if(!t)continue;let s=t[e];if(typeof s<"u")return s}}function Gs(e){let i=e._keys;return i||(i=e._keys=Qa(e._scopes)),i}function Qa(e){let i=new Set;for(let t of e)for(let s of Object.keys(t).filter(n=>!n.startsWith("_")))i.add(s);return Array.from(i)}function Yi(e,i,t,s){let{iScale:n}=e,{key:o="r"}=this._parsing,a=new Array(s),r,l,c,h;for(r=0,l=s;rie==="x"?"y":"x";function Ja(e,i,t,s){let n=e.skip?i:e,o=i,a=t.skip?i:t,r=We(o,n),l=We(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function tr(e,i,t){let s=e.length,n,o,a,r,l,c=Gt(e,0);for(let h=0;h!c.skip)),i.cubicInterpolationMode==="monotone")ir(e,n);else{let c=s?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function nr(e,i){return Je(e).getPropertyValue(i)}var or=["top","right","bottom","left"];function Bt(e,i,t){let s={};t=t?"-"+t:"";for(let n=0;n<4;n++){let o=or[n];s[o]=parseFloat(e[i+"-"+o+t])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var ar=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function rr(e,i){let t=e.touches,s=t&&t.length?t[0]:e,{offsetX:n,offsetY:o}=s,a=!1,r,l;if(ar(n,o,e.target))r=n,l=o;else{let c=i.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Ot(e,i){if("native"in e)return e;let{canvas:t,currentDevicePixelRatio:s}=i,n=Je(t),o=n.boxSizing==="border-box",a=Bt(n,"padding"),r=Bt(n,"border","width"),{x:l,y:c,box:h}=rr(e,t),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:p}=i;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/f*t.width/s),y:Math.round((c-u)/p*t.height/s)}}function lr(e,i,t){let s,n;if(i===void 0||t===void 0){let o=e&&Ze(e);if(!o)i=e.clientWidth,t=e.clientHeight;else{let a=o.getBoundingClientRect(),r=Je(o),l=Bt(r,"border","width"),c=Bt(r,"padding");i=a.width-c.width-l.width,t=a.height-c.height-l.height,s=He(r.maxWidth,o,"clientWidth"),n=He(r.maxHeight,o,"clientHeight")}}return{width:i,height:t,maxWidth:s||Ve,maxHeight:n||Ve}}var kt=e=>Math.round(e*10)/10;function wn(e,i,t,s){let n=Je(e),o=Bt(n,"margin"),a=He(n.maxWidth,e,"clientWidth")||Ve,r=He(n.maxHeight,e,"clientHeight")||Ve,l=lr(e,i,t),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=Bt(n,"border","width"),f=Bt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=kt(Math.min(c,a,l.maxWidth)),h=kt(Math.min(h,r,l.maxHeight)),c&&!h&&(h=kt(c/2)),(i!==void 0||t!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=kt(Math.floor(h*s))),{width:c,height:h}}function Ui(e,i,t){let s=i||1,n=kt(e.height*s),o=kt(e.width*s);e.height=kt(e.height),e.width=kt(e.width);let a=e.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(e.currentDevicePixelRatio=s,a.height=n,a.width=o,e.ctx.setTransform(s,0,0,s,0,0),!0):!1}var kn=(function(){let e=!1;try{let i={get passive(){return e=!0,!1}};Qe()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e})();function Xi(e,i){let t=nr(e,i),s=t&&t.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function wt(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function Pn(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:s==="middle"?t<.5?e.y:i.y:s==="after"?t<1?e.y:i.y:t>0?i.y:e.y}}function Cn(e,i,t,s){let n={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},a=wt(e,n,t),r=wt(n,o,t),l=wt(o,i,t),c=wt(a,r,t),h=wt(r,l,t);return wt(c,h,t)}var cr=function(e,i){return{x(t){return e+e+i-t},setWidth(t){i=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,s){return t-s},leftForLtr(t,s){return t-s}}},hr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,i){return e+i},leftForLtr(e,i){return e}}};function Wt(e,i,t){return e?cr(i,t):hr()}function qi(e,i){let t,s;(i==="ltr"||i==="rtl")&&(t=e.canvas.style,s=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=s)}function Ki(e,i){i!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function Dn(e){return e==="angle"?{between:te,compare:Ca,normalize:X}:{between:dt,compare:(i,t)=>i-t,normalize:i=>i}}function Qs({start:e,end:i,count:t,loop:s,style:n}){return{start:e%t,end:i%t,loop:s&&(i-e+1)%t===0,style:n}}function dr(e,i,t){let{property:s,start:n,end:o}=t,{between:a,normalize:r}=Dn(s),l=i.length,{start:c,end:h,loop:d}=e,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,y,b)&&r(n,y)!==0,_=()=>r(o,b)===0||l(o,y,b),v=()=>g||S(),w=()=>!g||_();for(let M=h,k=h;M<=d;++M)x=i[M%a],!x.skip&&(b=c(x[s]),b!==y&&(g=l(b,n,o),m===null&&v()&&(m=r(b,n)===0?M:k),m!==null&&w()&&(p.push(Qs({start:m,end:M,loop:u,count:a,style:f})),m=null),k=M,y=b));return m!==null&&p.push(Qs({start:m,end:d,loop:u,count:a,style:f})),p}function Qi(e,i){let t=[],s=e.segments;for(let n=0;nn&&e[o%i].skip;)o--;return o%=i,{start:n,end:o}}function fr(e,i,t,s){let n=e.length,o=[],a=i,r=e[i],l;for(l=i+1;l<=t;++l){let c=e[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:i%n,end:(l-1)%n,loop:s}),i=a=c.stop?l:null):(a=l,r.skip&&(i=l)),r=c}return a!==null&&o.push({start:i%n,end:a%n,loop:s}),o}function An(e,i){let t=e.points,s=e.options.spanGaps,n=t.length;if(!n)return[];let o=!!e._loop,{start:a,end:r}=ur(t,n,o,s);if(s===!0)return Zs(e,[{start:a,end:r,loop:o}],t,i);let l=rr({chart:i,initial:t.initial,numSteps:a,currentStep:Math.min(s-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Ei.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(i),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,i,"progress")),o.length||(s.running=!1,this._notify(n,s,i,"complete"),s.initial=!1),t+=o.length}),this._lastDate=i,t===0&&(this._running=!1)}_getAnims(i){let t=this._charts,s=t.get(i);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,s)),s}listen(i,t,s){this._getAnims(i).listeners[t].push(s)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){let t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(i){if(!this._running)return!1;let t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){let t=this._charts.get(i);if(!t||!t.items.length)return;let s=t.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}},yt=new hs,On="transparent",br={boolean(e,i,t){return t>.5?i:e},color(e,i,t){let s=Bi(e||On),n=s.valid&&Bi(i||On);return n&&n.valid?n.mix(s,t).hexString():i},number(e,i,t){return e+(i-e)*t}},ds=class{constructor(i,t,s,n){let o=t[s];n=se([i.to,n,o,i.from]);let a=se([i.from,o,n]);this._active=!0,this._fn=i.fn||br[i.type||typeof a],this._easing=qt[i.easing]||qt.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(i,t,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=se([i.to,t,n,i.from]),this._from=se([i.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let t=i-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,s)=>{i.push({res:t,rej:s})})}_notify(i){let t=i?"res":"rej",s=this._promises||[];for(let n=0;n{let o=i[n];if(!O(o))return;let a={};for(let r of t)a[r]=o[r];(z(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(i,t){let s=t.options,n=_r(i,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&xr(i.options.$animations,s).then(()=>{i.options=s},()=>{}),o}_createAnimations(i,t){let s=this._properties,n=[],o=i.$animations||(i.$animations={}),a=Object.keys(t),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(i,t));continue}let h=t[c],d=o[c],u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){i[c]=h;continue}o[c]=d=new ds(u,i,c,h),n.push(d)}return n}update(i,t){if(this._properties.size===0){Object.assign(i,t);return}let s=this._createAnimations(i,t);if(s.length)return yt.add(this._chart,s),!0}};function xr(e,i){let t=[],s=Object.keys(i);for(let n=0;n0||!t&&o<0)return n.index}return null}function Rn(e,i){let{chart:t,_cachedMeta:s}=e,n=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Mr(o,a,s),d=i.length,u;for(let f=0;ft[s].axis===i).shift()}function Pr(e,i){return _t(e,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}function Cr(e,i,t){return _t(e,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:"default",type:"data"})}function xe(e,i){let t=e.controller.index,s=e.vScale&&e.vScale.axis;if(s){i=i||e._parsed;for(let n of i){let o=n._stacks;if(!o||o[s]===void 0||o[s][t]===void 0)return;delete o[s][t],o[s]._visualValues!==void 0&&o[s]._visualValues[t]!==void 0&&delete o[s]._visualValues[t]}}}var es=e=>e==="reset"||e==="none",In=(e,i)=>i?e:Object.assign({},e),Dr=(e,i,t)=>e&&!i.hidden&&i._stacked&&{keys:To(t,!0),values:null},Lt=(()=>{class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,s){this.chart=t,this._ctx=t.ctx,this.index=s,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ji(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&xe(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,s=this._cachedMeta,n=this.getDataset(),o=(u,f,p,g)=>u==="x"?f:u==="r"?g:p,a=s.xAxisID=P(n.xAxisID,ts(t,"x")),r=s.yAxisID=P(n.yAxisID,ts(t,"y")),l=s.rAxisID=P(n.rAxisID,ts(t,"r")),c=s.indexAxis,h=s.iAxisID=o(c,a,r,l),d=s.vAxisID=o(c,r,a,l);s.xScale=this.getScaleForId(a),s.yScale=this.getScaleForId(r),s.rScale=this.getScaleForId(l),s.iScale=this.getScaleForId(h),s.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let s=this._cachedMeta;return t===s.iScale?s.vScale:s.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ti(this._data,this),t._stacked&&xe(t)}_dataCheck(){let t=this.getDataset(),s=t.data||(t.data=[]),n=this._data;if(O(s)){let o=this._cachedMeta;this._data=Sr(s,o)}else if(n!==s){if(n){Ti(n,this);let o=this._cachedMeta;xe(o),o._parsed=[]}s&&Object.isExtensible(s)&&dn(s,this),this._syncList=[],this._data=s}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let s=this._cachedMeta,n=this.getDataset(),o=!1;this._dataCheck();let a=s._stacked;s._stacked=Ji(s.vScale,s),s.stack!==n.stack&&(o=!0,xe(s),s.stack=n.stack),this._resyncElements(t),(o||a!==s._stacked)&&(Rn(this,s._parsed),s._stacked=Ji(s.vScale,s))}configure(){let t=this.chart.config,s=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),s,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,s){let{_cachedMeta:n,_data:o}=this,{iScale:a,_stacked:r}=n,l=a.axis,c=t===0&&s===o.length?!0:n._sorted,h=t>0&&n._parsed[t-1],d,u,f;if(this._parsing===!1)n._parsed=o,n._sorted=!0,f=o;else{z(o[t])?f=this.parseArrayData(n,o,t,s):O(o[t])?f=this.parseObjectData(n,o,t,s):f=this.parsePrimitiveData(n,o,t,s);let p=()=>u[l]===null||h&&u[l]m||u=0;--f)if(!g()){this.updateRangeFromParsed(h,t,p,c);break}}return h}getAllParsedValues(t){let s=this._cachedMeta._parsed,n=[],o,a,r;for(o=0,a=s.length;o=0&&tthis.getContext(n,o,s),m=h.resolveNamedOptions(f,p,g,u);return m.$shared&&(m.$shared=c,a[r]=Object.freeze(In(m,c))),m}_resolveAnimations(t,s,n){let o=this.chart,a=this._cachedDataOpts,r=`animation-${s}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,s),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,n,s))}let h=new li(o,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,s){return!s||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,s){let n=this.resolveDataElementOptions(t,s),o=this._sharedOptions,a=this.getSharedOptions(n),r=this.includeOptions(s,a)||a!==o;return this.updateSharedOptions(a,s,n),{sharedOptions:a,includeOptions:r}}updateElement(t,s,n,o){es(o)?Object.assign(t,n):this._resolveAnimations(s,o).update(t,n)}updateSharedOptions(t,s,n){t&&!es(s)&&this._resolveAnimations(void 0,s).update(t,n)}_setStyle(t,s,n,o){t.active=o;let a=this.getStyle(s,o);this._resolveAnimations(s,n,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,s,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,s,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let s=this._data,n=this._cachedMeta.data;for(let[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];let o=n.length,a=s.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a{for(h.length+=s,l=h.length-1;l>=r;l--)h[l]=h[l-s]};for(c(a),l=t;ln-o))}return e._cache.$bar}function Or(e){let i=e.iScale,t=Ar(i,e.type),s=i._length,n,o,a,r,l=()=>{a===32767||a===-32768||(Zt(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=t.length;n0?n[e-1]:null,r=eMath.abs(r)&&(l=r,c=a),i[t.axis]=c,i._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function Lo(e,i,t,s){return z(e)?Er(e,i,t,s):i[t.axis]=t.parse(e,s),i}function Fn(e,i,t,s){let n=e.iScale,o=e.vScale,a=n.getLabels(),r=n===o,l=[],c,h,d,u;for(c=t,h=t+s;c=t?1:-1)}function Ir(e){let i,t,s,n,o;return e.horizontal?(i=e.base>e.x,t="left",s="right"):(i=e.base{class e extends Lt{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,s,n,o){return Fn(t,s,n,o)}parseArrayData(t,s,n,o){return Fn(t,s,n,o)}parseObjectData(t,s,n,o){let{iScale:a,vScale:r}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=a.axis==="x"?l:c,d=r.axis==="x"?l:c,u=[],f,p,g,m;for(f=n,p=n+o;fd.controller.options.grouped),a=n.options.stacked,r=[],l=this._cachedMeta.controller.getParsed(s),c=l&&l[n.axis],h=d=>{let u=d._parsed.find(p=>p[n.axis]===c),f=u&&u[d.vScale.axis];if(A(f)||isNaN(f))return!0};for(let d of o)if(!(s!==void 0&&h(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,s=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===s).shift()}_getAxis(){let t={},s=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,s)]=!0;return Object.keys(t)}_getStackIndex(t,s,n){let o=this._getStacks(t,n),a=s!==void 0?o.indexOf(s):-1;return a===-1?o.length-1:a}_getRuler(){let t=this.options,s=this._cachedMeta,n=s.iScale,o=[],a,r;for(a=0,r=s.data.length;a{class e extends Lt{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,s,n,o){let a=super.parsePrimitiveData(t,s,n,o);for(let r=0;r=0;--n)s=Math.max(s,t[n].size(this.resolveDataElementOptions(n))/2);return s>0&&s}getLabelAndValue(t){let s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:o,yScale:a}=s,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y),h=r._custom;return{label:n[t]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(t){let s=this._cachedMeta.data;this.updateElements(s,0,s.length,t)}updateElements(t,s,n,o){let a=o==="reset",{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(s,o),d=r.axis,u=l.axis;for(let f=s;fte(y,r,l,!0)?1:Math.max(S,S*t,_,_*t),p=(y,S,_)=>te(y,r,l,!0)?-1:Math.min(S,S*t,_,_*t),g=f(0,c,d),m=f(H,h,u),b=p(E,c,d),x=p(E+H,h,u);s=(g-b)/2,n=(m-x)/2,o=-(g+b)/2,a=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}var Ts=(()=>{class e extends Lt{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let s=t.data,{labels:{pointStyle:n,textAlign:o,color:a,useBorderRadius:r,borderRadius:l}}=t.legend.options;return s.labels.length&&s.datasets.length?s.labels.map((c,h)=>{let u=t.getDatasetMeta(0).controller.getStyle(h);return{text:c,fillStyle:u.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(h),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:o,pointStyle:n,borderRadius:r&&(l||u.borderRadius),index:h}}):[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}}};constructor(t,s){super(t,s),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,s){let n=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=n;else{let a=c=>+n[c];if(O(n[t])){let{key:c="value"}=this._parsing;a=h=>+xt(n[h],c)}let r,l;for(r=t,l=t+s;r0&&!isNaN(t)?B*(Math.abs(t)/s):0}getLabelAndValue(t){let s=this._cachedMeta,n=this.chart,o=n.data.labels||[],a=ee(s._parsed[t],n.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let s=0,n=this.chart,o,a,r,l,c;if(!t){for(o=0,a=n.data.datasets.length;o{class e extends Lt{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let s=this._cachedMeta,{dataset:n,data:o=[],_dataset:a}=s,r=this.chart._animationsDisabled,{start:l,count:c}=Ii(s,o,r);this._drawStart=l,this._drawCount=c,Fi(s)&&(l=0,c=o.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=o;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,s,n,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(s,o),f=r.axis,p=l.axis,{spanGaps:g,segment:m}=this.options,b=Vt(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||o==="none",y=s+n,S=t.length,_=s>0&&this.getParsed(s-1);for(let v=0;v=y){M.skip=!0;continue}let k=this.getParsed(v),D=A(k[p]),C=M[f]=r.getPixelForValue(k[f],v),T=M[p]=a||D?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,k,c):k[p],v);M.skip=isNaN(C)||isNaN(T)||D,M.stop=v>0&&Math.abs(k[f]-_[f])>b,m&&(M.parsed=k,M.raw=h.data[v]),u&&(M.options=d||this.resolveDataElementOptions(v,w.active?"active":o)),x||this.updateElement(w,v,M,o),_=k}}getMaxOverflow(){let t=this._cachedMeta,s=t.dataset,n=s.options&&s.options.borderWidth||0,o=t.data||[];if(!o.length)return n;let a=o[0].size(this.resolveDataElementOptions(0)),r=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(n,a,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return e})(),Eo=(()=>{class e extends Lt{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let s=t.data;if(s.labels.length&&s.datasets.length){let{labels:{pointStyle:n,color:o}}=t.legend.options;return s.labels.map((a,r)=>{let c=t.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,s){super(t,s),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let s=this._cachedMeta,n=this.chart,o=n.data.labels||[],a=ee(s._parsed[t].r,n.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,s,n,o){return Yi.bind(this)(t,s,n,o)}update(t){let s=this._cachedMeta.data;this._updateRadius(),this.updateElements(s,0,s.length,t)}getMinMax(){let t=this._cachedMeta,s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,o)=>{let a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(as.max&&(s.max=a))}),s}_updateRadius(){let t=this.chart,s=t.chartArea,n=t.options,o=Math.min(s.right-s.left,s.bottom-s.top),a=Math.max(o/2,0),r=Math.max(n.cutoutPercentage?a/100*n.cutoutPercentage:1,0),l=(a-r)/t.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,s,n,o){let a=o==="reset",r=this.chart,c=r.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,u=h.yCenter,f=h.getIndexAngle(0)-.5*E,p=f,g,m=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&s++}),s}_computeAngle(t,s,n){return this.chart.getDataVisibility(t)?st(this.resolveDataElementOptions(t,s).angle||n):0}}return e})(),jr=(()=>{class e extends Ts{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return e})(),$r=(()=>{class e extends Lt{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let s=this._cachedMeta.vScale,n=this.getParsed(t);return{label:s.getLabels()[t],value:""+s.getLabelForValue(n[s.axis])}}parseObjectData(t,s,n,o){return Yi.bind(this)(t,s,n,o)}update(t){let s=this._cachedMeta,n=s.dataset,o=s.data||[],a=s.iScale.getLabels();if(n.points=o,t!=="resize"){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===o.length,options:r};this.updateElement(n,void 0,l,t)}this.updateElements(o,0,o.length,t)}updateElements(t,s,n,o){let a=this._cachedMeta.rScale,r=o==="reset";for(let l=s;l{class e extends Lt{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:o,yScale:a}=s,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:n[t]||"",value:"("+l+", "+c+")"}}update(t){let s=this._cachedMeta,{data:n=[]}=s,o=this.chart._animationsDisabled,{start:a,count:r}=Ii(s,n,o);if(this._drawStart=a,this._drawCount=r,Fi(s)&&(a=0,r=n.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=s;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=n;let h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete s.dataset,this.datasetElementType=!1);this.updateElements(n,a,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,s,n,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(s,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),p=r.axis,g=l.axis,{spanGaps:m,segment:b}=this.options,x=Vt(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||o==="none",S=s>0&&this.getParsed(s-1);for(let _=s;_0&&Math.abs(w[p]-S[p])>x,b&&(M.parsed=w,M.raw=h.data[_]),f&&(M.options=u||this.resolveDataElementOptions(_,v.active?"active":o)),y||this.updateElement(v,_,M,o),S=w}this.updateSharedOptions(u,o,d)}getMaxOverflow(){let t=this._cachedMeta,s=t.data||[];if(!this.options.showLine){let l=0;for(let c=s.length-1;c>=0;--c)l=Math.max(l,s[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let n=t.dataset,o=n.options&&n.options.borderWidth||0;if(!s.length)return o;let a=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(o,a,r)/2}}return e})(),Ur=Object.freeze({__proto__:null,BarController:Nr,BubbleController:Vr,DoughnutController:Ts,LineController:Hr,PieController:jr,PolarAreaController:Eo,RadarController:$r,ScatterController:Yr});function Ht(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var us=class e{static override(i){Object.assign(e.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Ht()}parse(){return Ht()}format(){return Ht()}add(){return Ht()}diff(){return Ht()}startOf(){return Ht()}endOf(){return Ht()}},Xr={_date:us};function qr(e,i,t,s){let{controller:n,data:o,_sorted:a}=e,r=n._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(r&&i===r.axis&&i!=="r"&&a&&o.length){let c=r._reversePixels?ln:lt;if(s){if(n._sharedOptions){let h=o[0],d=typeof h.getRange=="function"&&h.getRange(i);if(d){let u=c(o,i,t-d),f=c(o,i,t+d);return{lo:u.lo,hi:f.hi}}}}else{let h=c(o,i,t);if(l){let{vScale:d}=n._cachedMeta,{_parsed:u}=e,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!A(g[d.axis]));h.lo-=Math.max(0,f);let p=u.slice(h.hi).findIndex(g=>!A(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function De(e,i,t,s,n){let o=e.getSortedVisibleDatasetMetas(),a=t[i];for(let r=0,l=o.length;r{l[a]&&l[a](i[t],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(i.x,i.y,n))}),s&&!r?[]:o}var Zr={evaluateInteractionItems:De,modes:{index(e,i,t,s){let n=Ot(i,e),o=t.axis||"x",a=t.includeInvisible||!1,r=t.intersect?ss(e,n,o,s,a):ns(e,n,o,!1,s,a),l=[];return r.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(e,i,t,s){let n=Ot(i,e),o=t.axis||"xy",a=t.includeInvisible||!1,r=t.intersect?ss(e,n,o,s,a):ns(e,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,c=e.getDatasetMeta(l).data;r=[];for(let h=0;ht.pos===i)}function Vn(e,i){return e.filter(t=>Ro.indexOf(t.pos)===-1&&t.box.axis===i)}function ye(e,i){return e.sort((t,s)=>{let n=i?s:t,o=i?t:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Jr(e){let i=[],t,s,n,o,a,r;for(t=0,s=(e||[]).length;tc.box.fullSize),!0),s=ye(_e(i,"left"),!0),n=ye(_e(i,"right")),o=ye(_e(i,"top"),!0),a=ye(_e(i,"bottom")),r=Vn(i,"x"),l=Vn(i,"y");return{fullSize:t,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:_e(i,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function Wn(e,i,t,s){return Math.max(e[t],i[t])+Math.max(e[s],i[s])}function Io(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function sl(e,i,t,s){let{pos:n,box:o}=t,a=e.maxPadding;if(!O(n)){t.size&&(e[n]-=t.size);let d=s[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,e[n]+=t.size}o.getPadding&&Io(a,o.getPadding());let r=Math.max(0,i.outerWidth-Wn(a,e,"left","right")),l=Math.max(0,i.outerHeight-Wn(a,e,"top","bottom")),c=r!==e.w,h=l!==e.h;return e.w=r,e.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function nl(e){let i=e.maxPadding;function t(s){let n=Math.max(i[s]-e[s],0);return e[s]+=n,n}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}function ol(e,i){let t=i.maxPadding;function s(n){let o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(i[a],t[a])}),o}return s(e?["left","right"]:["top","bottom"])}function Me(e,i,t,s){let n=[],o,a,r,l,c,h;for(o=0,a=e.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});let h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:i,outerHeight:t,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);Io(u,K(s));let f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),p=el(l.concat(c),d);Me(r.fullSize,f,d,p),Me(l,f,d,p),Me(c,f,d,p)&&Me(l,f,d,p),nl(f),Hn(r.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Hn(r.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(r.chartArea,g=>{let m=g.box;Object.assign(m,e.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},ci=class{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,s){}removeEventListener(i,t,s){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,s,n){return t=Math.max(0,t||i.width),s=s||i.height,{width:t,height:Math.max(0,n?Math.floor(t/n):s)}}isAttached(i){return!0}updateConfig(i){}},fs=class extends ci{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}},ai="$chartjs",al={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jn=e=>e===null||e==="";function rl(e,i){let t=e.style,s=e.getAttribute("height"),n=e.getAttribute("width");if(e[ai]={initial:{height:s,width:n,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",jn(n)){let o=Xi(e,"width");o!==void 0&&(e.width=o)}if(jn(s))if(e.style.height==="")e.height=e.width/(i||2);else{let o=Xi(e,"height");o!==void 0&&(e.height=o)}return e}var Fo=kn?{passive:!0}:!1;function ll(e,i,t){e&&e.addEventListener(i,t,Fo)}function cl(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,Fo)}function hl(e,i){let t=al[e.type]||e.type,{x:s,y:n}=Ot(e,i);return{type:t,chart:i,native:e,x:s!==void 0?s:null,y:n!==void 0?n:null}}function hi(e,i){for(let t of e)if(t===i||t.contains(i))return!0}function dl(e,i,t){let s=e.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||hi(r.addedNodes,s),a=a&&!hi(r.removedNodes,s);a&&t()});return n.observe(document,{childList:!0,subtree:!0}),n}function ul(e,i,t){let s=e.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||hi(r.removedNodes,s),a=a&&!hi(r.addedNodes,s);a&&t()});return n.observe(document,{childList:!0,subtree:!0}),n}var ke=new Map,$n=0;function zo(){let e=window.devicePixelRatio;e!==$n&&($n=e,ke.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function fl(e,i){ke.size||window.addEventListener("resize",zo),ke.set(e,i)}function gl(e){ke.delete(e),ke.size||window.removeEventListener("resize",zo)}function pl(e,i,t){let s=e.canvas,n=s&&Ze(s);if(!n)return;let o=Ri((r,l)=>{let c=n.clientWidth;t(r,l),c{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),fl(e,o),a}function os(e,i,t){t&&t.disconnect(),i==="resize"&&gl(e)}function ml(e,i,t){let s=e.canvas,n=Ri(o=>{e.ctx!==null&&t(hl(o,e))},e);return ll(s,i,n),n}var gs=class extends ci{acquireContext(i,t){let s=i&&i.getContext&&i.getContext("2d");return s&&s.canvas===i?(rl(i,t),s):null}releaseContext(i){let t=i.canvas;if(!t[ai])return!1;let s=t[ai].initial;["height","width"].forEach(o=>{let a=s[o];A(a)?t.removeAttribute(o):t.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{t.style[o]=n[o]}),t.width=t.width,delete t[ai],!0}addEventListener(i,t,s){this.removeEventListener(i,t);let n=i.$proxies||(i.$proxies={}),a={attach:dl,detach:ul,resize:pl}[t]||ml;n[t]=a(i,t,s)}removeEventListener(i,t){let s=i.$proxies||(i.$proxies={}),n=s[t];if(!n)return;({attach:os,detach:os,resize:os}[t]||cl)(i,t,n),s[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,s,n){return wn(i,t,s,n)}isAttached(i){let t=i&&Ze(i);return!!(t&&t.isConnected)}};function bl(e){return!Qe()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?fs:gs}var at=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){let{x:t,y:s}=this.getProps(["x","y"],i);return{x:t,y:s}}hasValue(){return Vt(this.x)&&Vt(this.y)}getProps(i,t){let s=this.$animations;if(!t||!s)return this;let n={};return i.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};function xl(e,i){let t=e.options.ticks,s=_l(e),n=Math.min(t.maxTicksLimit||s,s),o=t.major.enabled?vl(i):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return Sl(i,c,o,a/n),c;let h=yl(o,i,n);if(a>0){let d,u,f=a>1?Math.round((l-r)/(a-1)):null;for(ei(i,c,h,A(f)?0:r-f,r),d=0,u=a-1;dn)return l}return Math.max(n,1)}function vl(e){let i=[],t,s;for(t=0,s=e.length;te==="left"?"right":e==="right"?"left":e,Yn=(e,i,t)=>i==="top"||i==="left"?e[i]+t:e[i]-t,Un=(e,i)=>Math.min(i||e,e);function Xn(e,i){let t=[],s=e.length/i,n=e.length,o=0;for(;oa+r)))return l}function Pl(e,i){R(e,t=>{let s=t.gc,n=s.length/2,o;if(n>i){for(o=0;os?s:t,s=n&&t>s?t:s,{min:Z(t,Z(s,t)),max:Z(s,Z(t,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(i,t,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);r=i.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(i.offset?.5:1)),l=this.maxHeight-ve(i.grid)-t.padding-qn(i.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=$e(Math.min(Math.asin(Y((h.highest.height+6)/r,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:t,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=qn(n,t.options.font);if(r?(i.width=this.maxWidth,i.height=ve(o)+l):(i.height=this.maxHeight,i.width=ve(o)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=st(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){let b=s.mirror?0:m*d.width+g*u.height;i.height=Math.min(this.maxHeight,i.height+b+f)}else{let b=s.mirror?0:g*d.width+m*u.height;i.width=Math.min(this.maxWidth,i.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=n*i.width,f=s*t.height):(u=s*i.height,f=n*t.width):o==="start"?f=t.width:o==="end"?u=i.width:o!=="inner"&&(u=i.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=t.height/2,d=i.height/2;o==="start"?(h=0,d=i.height):o==="end"&&(h=t.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:t}=this.options;return t==="top"||t==="bottom"||i==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let t,s;for(t=0,s=i.length;t({width:a[k]||0,height:r[k]||0});return{first:M(0),last:M(t-1),widest:M(v),highest:M(w),widths:a,heights:r}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let t=this._startPixel+i*this._length;return rn(this._alignToPixels?Ct(this.chart,t,0):t)}getDecimalForPixel(i){let t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){let t=this.ticks||[];if(i>=0&&ir*n?r/s:l/n:l*n0}_computeGridLineItems(i){let t=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=ve(o),f=[],p=r.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(V){return Ct(s,V,g)},x,y,S,_,v,w,M,k,D,C,T,U;if(a==="top")x=b(this.bottom),w=this.bottom-u,k=x-m,C=b(i.top)+m,U=i.bottom;else if(a==="bottom")x=b(this.top),C=i.top,U=b(i.bottom)-m,w=x+m,k=this.top+u;else if(a==="left")x=b(this.right),v=this.right-u,M=x-m,D=b(i.left)+m,T=i.right;else if(a==="right")x=b(this.left),D=i.left,T=b(i.right)-m,v=x+m,M=this.left+u;else if(t==="x"){if(a==="center")x=b((i.top+i.bottom)/2+.5);else if(O(a)){let V=Object.keys(a)[0],j=a[V];x=b(this.chart.scales[V].getPixelForValue(j))}C=i.top,U=i.bottom,w=x+m,k=w+u}else if(t==="y"){if(a==="center")x=b((i.left+i.right)/2);else if(O(a)){let V=Object.keys(a)[0],j=a[V];x=b(this.chart.scales[V].getPixelForValue(j))}v=x-m,M=v-u,D=i.left,T=i.right}let et=P(n.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/et));for(y=0;y0&&(Rt-=Et/2);break}Ae={left:Rt,top:le,width:Et+Ut.width,height:re+Ut.height,color:I.backdropColor}}m.push({label:S,font:k,textOffset:T,options:{rotation:g,color:j,strokeColor:nt,strokeWidth:G,textAlign:Yt,textBaseline:U,translation:[_,v],backdrop:Ae}})}return m}_getXAxisLabelAlignment(){let{position:i,ticks:t}=this.options;if(-st(this.labelRotation))return i==="top"?"left":"right";let n="center";return t.align==="start"?n="left":t.align==="end"?n="right":t.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(i){let{position:t,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=i+o,l=a.widest.width,c,h;return t==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):t==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:i.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:t},left:s,top:n,width:o,height:a}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(s,n,o,a),i.restore())}getLineWidthForValue(i){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(o=>o.value===i);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(i){let t=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,a,r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(t.display)for(o=0,a=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(i){let t=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=t.length;o{let s=t.split("."),n=s.pop(),o=[e].concat(s).join("."),a=i[t].split("."),r=a.pop(),l=a.join(".");N.route(o,n,l,r)})}function El(e){return"id"in e&&"defaults"in e}var ps=class{constructor(){this.controllers=new oe(Lt,"datasets",!0),this.elements=new oe(at,"elements"),this.plugins=new oe(Object,"plugins"),this.scales=new oe($t,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,s){[...t].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(i,o,n):R(n,a=>{let r=s||this._getRegistryForType(a);this._exec(i,r,a)})})}_exec(i,t,s){let n=je(i);F(s["before"+n],[],s),t[i](s),F(s["after"+n],[],s)}_getRegistryForType(i){for(let t=0;to.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(t,s),i,"stop"),this._notify(n(s,t),i,"start")}};function Rl(e){let i={},t=[],s=Object.keys(ft.plugins.items);for(let o=0;o1&&Kn(e[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Gn(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function Wl(e,i){if(i.data&&i.data.datasets){let t=i.data.datasets.filter(s=>s.xAxisID===e||s.yAxisID===e);if(t.length)return Gn(e,"x",t[0])||Gn(e,"y",t[0])}return{}}function Hl(e,i){let t=Pt[e.type]||{scales:{}},s=i.scales||{},n=bs(e.type,i),o=Object.create(null);return Object.keys(s).forEach(a=>{let r=s[a];if(!O(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=xs(a,r,Wl(a,e),N.scales[r.type]),c=Nl(l,n),h=t.scales||{};o[a]=Qt(Object.create(null),[{axis:l},r,h[l],h[c]])}),e.data.datasets.forEach(a=>{let r=a.type||e.type,l=a.indexAxis||bs(r,i),h=(Pt[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=Bl(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Qt(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];Qt(r,[N.scales[r.type],N.scale])}),o}function Bo(e){let i=e.options||(e.options={});i.plugins=P(i.plugins,{}),i.scales=Hl(e,i)}function No(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function jl(e){return e=e||{},e.data=No(e.data),Bo(e),e}var Qn=new Map,Vo=new Set;function ii(e,i){let t=Qn.get(e);return t||(t=i(),Qn.set(e,t),Vo.add(t)),t}var Se=(e,i,t)=>{let s=xt(i,t);s!==void 0&&e.add(s)},_s=class{constructor(i){this._config=jl(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=No(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),Bo(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return ii(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return ii(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return ii(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){let t=i.id,s=this.type;return ii(`${s}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){let s=this._scopeCache,n=s.get(i);return(!n||t)&&(n=new Map,s.set(i,n)),n}getOptionScopes(i,t,s){let{options:n,type:o}=this,a=this._cachedScopes(i,s),r=a.get(t);if(r)return r;let l=new Set;t.forEach(h=>{i&&(l.add(i),h.forEach(d=>Se(l,i,d))),h.forEach(d=>Se(l,n,d)),h.forEach(d=>Se(l,Pt[o]||{},d)),h.forEach(d=>Se(l,N,d)),h.forEach(d=>Se(l,Xe,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Vo.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:i,type:t}=this;return[i,Pt[t]||{},N.datasets[t]||{},{type:t},N,Xe]}resolveNamedOptions(i,t,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Zn(this._resolverCache,i,n),l=a;if(Yl(a,t)){o.$shared=!1,s=mt(s)?s():s;let c=this.createResolver(i,s,r);l=Nt(a,s,c)}for(let c of t)o[c]=l[c];return o}createResolver(i,t,s=[""],n){let{resolver:o}=Zn(this._resolverCache,i,s);return O(t)?Nt(o,t,void 0,n):o}};function Zn(e,i,t){let s=e.get(i);s||(s=new Map,e.set(i,s));let n=t.join(),o=s.get(n);return o||(o={resolver:Ge(i,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}var $l=e=>O(e)&&Object.getOwnPropertyNames(e).some(i=>mt(e[i]));function Yl(e,i){let{isScriptable:t,isIndexable:s}=Hi(e);for(let n of i){let o=t(n),a=s(n),r=(a||o)&&e[n];if(o&&(mt(r)||$l(r))||a&&z(r))return!0}return!1}var Ul="4.5.1",Xl=["top","bottom","left","right","chartArea"];function Jn(e,i){return e==="top"||e==="bottom"||Xl.indexOf(e)===-1&&i==="x"}function to(e,i){return function(t,s){return t[e]===s[e]?t[i]-s[i]:t[e]-s[e]}}function eo(e){let i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),F(t&&t.onComplete,[e],i)}function ql(e){let i=e.chart,t=i.options.animation;F(t&&t.onProgress,[e],i)}function Wo(e){return Qe()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var ri={},io=e=>{let i=Wo(e);return Object.values(ri).filter(t=>t.canvas===i).pop()};function Kl(e,i,t){let s=Object.keys(e);for(let n of s){let o=+n;if(o>=i){let a=e[n];delete e[n],(t>0||o>i)&&(e[o+t]=a)}}}function Gl(e,i,t,s){return!t||e.type==="mouseout"?null:s?i:e}var Ql=(()=>{class e{static defaults=N;static instances=ri;static overrides=Pt;static registry=ft;static version=Ul;static getChart=io;static register(...t){ft.add(...t),so()}static unregister(...t){ft.remove(...t),so()}constructor(t,s){let n=this.config=new _s(s),o=Wo(t),a=io(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||bl(o)),this.platform.updateConfig(n);let l=this.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=tn(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ms,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=un(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],ri[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}yt.listen(this,"complete",eo),yt.listen(this,"progress",ql),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:s},width:n,height:o,_aspectRatio:a}=this;return A(t)?s&&a?a:o?n/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ui(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ni(this.canvas,this.ctx),this}stop(){return yt.stop(this),this}resize(t,s){yt.running(this)?this._resizeBeforeDraw={width:t,height:s}:this._resize(t,s)}_resize(t,s){let n=this.options,o=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,s,a),l=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ui(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),F(n.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let s=this.options.scales||{};R(s,(n,o)=>{n.id=o})}buildOrUpdateScales(){let t=this.options,s=t.scales,n=this.scales,o=Object.keys(n).reduce((r,l)=>(r[l]=!1,r),{}),a=[];s&&(a=a.concat(Object.keys(s).map(r=>{let l=s[r],c=xs(r,l),h=c==="r",d=c==="x";return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),R(a,r=>{let l=r.options,c=l.id,h=xs(c,l),d=P(l.type,r.dtype);(l.position===void 0||Jn(l.position,h)!==Jn(r.dposition))&&(l.position=r.dposition),o[c]=!0;let u=null;if(c in n&&n[c].type===d)u=n[c];else{let f=ft.getScale(d);u=new f({id:c,type:d,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(l,t)}),R(o,(r,l)=>{r||delete n[l]}),R(n,r=>{Q.configure(this,r,r.options),Q.addBox(this,r)})}_updateMetasets(){let t=this._metasets,s=this.data.datasets.length,n=t.length;if(t.sort((o,a)=>o.index-a.index),n>s){for(let o=s;os.length&&delete this._stacks,t.forEach((n,o)=>{s.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],s=this.data.datasets,n,o;for(this._removeUnreferencedMetasets(),n=0,o=s.length;n{this.getDatasetMeta(s).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let s=this.config;s.update();let n=this._options=s.createResolver(s.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let h=0,d=this.data.datasets.length;h{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(to("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){R(this.scales,t=>{Q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,s=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!Pi(s,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,s=this._getUniformDataChanges()||[];for(let{method:n,start:o,count:a}of s){let r=n==="_removeElements"?-a:a;Kl(t,o,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let s=this.data.datasets.length,n=a=>new Set(t.filter(r=>r[0]===a).map((r,l)=>l+","+r.splice(1).join(","))),o=n(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Q.update(this,this.width,this.height,t);let s=this.chartArea,n=s.width<=0||s.height<=0;this._layers=[],R(this.boxes,o=>{n&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let s=0,n=this.data.datasets.length;s=0;--s)this._drawDataset(t[s]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let s=this.ctx,n={meta:t,index:t.index,cancelable:!0},o=Zi(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(o&&me(s,o),t.controller.draw(),o&&be(s),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return ct(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,n,o){let a=Zr.modes[s];return typeof a=="function"?a(this,t,n,o):[]}getDatasetMeta(t){let s=this.data.datasets[t],n=this._metasets,o=n.filter(a=>a&&a._dataset===s).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:s&&s.order||0,index:t,_dataset:s,_parsed:[],_sorted:!1},n.push(o)),o}getContext(){return this.$context||(this.$context=_t(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let s=this.data.datasets[t];if(!s)return!1;let n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!s.hidden}setDatasetVisibility(t,s){let n=this.getDatasetMeta(t);n.hidden=!s}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,s,n){let o=n?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);Zt(s)?(a.data[s].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(a,{visible:n}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,s){this._updateVisibility(t,s,!1)}show(t,s){this._updateVisibility(t,s,!0)}_destroyDatasetMeta(t){let s=this._metasets[t];s&&s.controller&&s.controller._destroy(),delete this._metasets[t]}_stop(){let t,s;for(this.stop(),yt.remove(this),t=0,s=this.data.datasets.length;t{s.addEventListener(this,a,r),t[a]=r},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};R(this.options.events,a=>n(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,s=this.platform,n=(c,h)=>{s.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(s.removeEventListener(this,c,h),delete t[c])},a=(c,h)=>{this.canvas&&this.resize(c,h)},r,l=()=>{o("attach",l),this.attached=!0,this.resize(),n("resize",a),n("detach",r)};r=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),n("attach",l)},s.isAttached(this.canvas)?l():r()}unbindEvents(){R(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},R(this._responsiveListeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,s,n){let o=n?"set":"remove",a,r,l,c;for(s==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l{let l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[r],index:r}});!ge(n,s)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,s))}notifyPlugins(t,s,n){return this._plugins.notify(this,t,s,n)}isPluginEnabled(t){return this._plugins._cache.filter(s=>s.plugin.id===t).length===1}_updateHoverStyles(t,s,n){let o=this.options.hover,a=(c,h)=>c.filter(d=>!h.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=a(s,t),l=n?t:a(t,s);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,s){let n={event:t,replay:s,cancelable:!0,inChartArea:this.isPointInArea(t)},o=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,o)===!1)return;let a=this._handleEvent(t,s,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,o),(a||n.changed)&&this.render(),this}_handleEvent(t,s,n){let{_active:o=[],options:a}=this,r=s,l=this._getActiveElements(t,o,n,r),c=nn(t),h=Gl(t,this._lastEvent,n,c);n&&(this._lastEvent=null,F(a.onHover,[t,l,this],this),c&&F(a.onClick,[t,l,this],this));let d=!ge(l,o);return(d||s)&&(this._active=l,this._updateHoverStyles(l,o,s)),this._lastEvent=h,d}_getActiveElements(t,s,n,o){if(t.type==="mouseout")return[];if(!n)return s;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return e})();function so(){return R(Ql.instances,e=>e._plugins.invalidate())}function Zl(e,i,t){let{startAngle:s,x:n,y:o,outerRadius:a,innerRadius:r,options:l}=i,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/a,X(s-t));if(e.beginPath(),e.arc(n,o,a-c/2,s+d/2,t-d/2),r>0){let u=Math.min(c/r,X(s-t));e.arc(n,o,r+c/2,t-u/2,s+u/2,!0)}else{let u=Math.min(c/2,a*X(s-t));if(h==="round")e.arc(n,o,u,t-E/2,s+E/2,!0);else if(h==="bevel"){let f=2*u*u,p=-f*Math.cos(t+E/2)+n,g=-f*Math.sin(t+E/2)+o,m=f*Math.cos(s+E/2)+n,b=f*Math.sin(s+E/2)+o;e.lineTo(p,g),e.lineTo(m,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Jl(e,i,t){let{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=i,c=n/r;e.beginPath(),e.arc(o,a,r,s-c,t+c),l>n?(c=n/l,e.arc(o,a,l,t+c,s-c,!0)):e.arc(o,a,n,t+H,s-H),e.closePath(),e.clip()}function tc(e){return Ke(e,["outerStart","outerEnd","innerStart","innerEnd"])}function ec(e,i,t,s){let n=tc(e.options.borderRadius),o=(t-i)/2,a=Math.min(o,s*i/2),r=l=>{let c=(t-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Y(n.innerStart,0,a),innerEnd:Y(n.innerEnd,0,a)}}function ne(e,i,t,s){return{x:t+e*Math.cos(i),y:s+e*Math.sin(i)}}function di(e,i,t,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=i,d=Math.max(i.outerRadius+s+t-c,0),u=h>0?h+s+t+c:0,f=0,p=n-l;if(s){let I=h>0?h-s:0,V=d>0?d-s:0,j=(I+V)/2,nt=j!==0?p*j/(j+s):p;f=(p-nt)/2}let g=Math.max(.001,p*d-t/E)/d,m=(p-g)/2,b=l+m+f,x=n-m-f,{outerStart:y,outerEnd:S,innerStart:_,innerEnd:v}=ec(i,u,d,x-b),w=d-y,M=d-S,k=b+y/w,D=x-S/M,C=u+_,T=u+v,U=b+_/C,et=x-v/T;if(e.beginPath(),o){let I=(k+D)/2;if(e.arc(a,r,d,k,I),e.arc(a,r,d,I,D),S>0){let G=ne(M,D,a,r);e.arc(G.x,G.y,S,D,x+H)}let V=ne(T,x,a,r);if(e.lineTo(V.x,V.y),v>0){let G=ne(T,et,a,r);e.arc(G.x,G.y,v,x+H,et+Math.PI)}let j=(x-v/u+(b+_/u))/2;if(e.arc(a,r,u,x-v/u,j,!0),e.arc(a,r,u,j,b+_/u,!0),_>0){let G=ne(C,U,a,r);e.arc(G.x,G.y,_,U+Math.PI,b-H)}let nt=ne(w,b,a,r);if(e.lineTo(nt.x,nt.y),y>0){let G=ne(w,k,a,r);e.arc(G.x,G.y,y,b-H,k)}}else{e.moveTo(a,r);let I=Math.cos(k)*d+a,V=Math.sin(k)*d+r;e.lineTo(I,V);let j=Math.cos(D)*d+a,nt=Math.sin(D)*d+r;e.lineTo(j,nt)}e.closePath()}function ic(e,i,t,s,n){let{fullCircles:o,startAngle:a,circumference:r}=i,l=i.endAngle;if(o){di(e,i,t,s,l,n);for(let c=0;c=E&&f===0&&h!=="miter"&&Zl(e,i,g),o||(di(e,i,t,s,g,n),e.stroke())}var ys=class extends at{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:i=>i!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,t,s){let n=this.getProps(["x","y"],s),{angle:o,distance:a}=Oi(n,{x:i,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-r),p=te(o,r,l)&&r!==l,g=f>=B||p,m=dt(a,c+u,h+u);return g&&m}getCenterPoint(i){let{x:t,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(a+r+c+l)/2;return{x:t+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:t,circumference:s}=this,n=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=s>B?Math.floor(s/B):0,s===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let r=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(r)*n,Math.sin(r)*n);let l=1-Math.sin(Math.min(E,s||0)),c=n*l;i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,ic(i,this,c,o,a),sc(i,this,c,o,a),i.restore()}};function Ho(e,i,t=i){e.lineCap=P(t.borderCapStyle,i.borderCapStyle),e.setLineDash(P(t.borderDash,i.borderDash)),e.lineDashOffset=P(t.borderDashOffset,i.borderDashOffset),e.lineJoin=P(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=P(t.borderWidth,i.borderWidth),e.strokeStyle=P(t.borderColor,i.borderColor)}function nc(e,i,t){e.lineTo(t.x,t.y)}function oc(e){return e.stepped?mn:e.tension||e.cubicInterpolationMode==="monotone"?bn:nc}function jo(e,i,t={}){let s=e.length,{start:n=0,end:o=s-1}=t,{start:a,end:r}=i,l=Math.max(n,a),c=Math.min(o,r),h=nr&&o>r;return{count:s,start:l,loop:i.loop,ilen:c(a+(c?r-S:S))%o,y=()=>{g!==m&&(e.lineTo(h,m),e.lineTo(h,g),e.lineTo(h,b))};for(l&&(f=n[x(0)],e.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[x(u)],f.skip)continue;let S=f.x,_=f.y,v=S|0;v===p?(_m&&(m=_),h=(d*h+S)/++d):(y(),e.lineTo(S,_),p=v,d=0,g=m=_),b=_}y()}function vs(e){let i=e.options,t=i.borderDash&&i.borderDash.length;return!e._decimated&&!e._loop&&!i.tension&&i.cubicInterpolationMode!=="monotone"&&!i.stepped&&!t?rc:ac}function lc(e){return e.stepped?Pn:e.tension||e.cubicInterpolationMode==="monotone"?Cn:wt}function cc(e,i,t,s){let n=i._path;n||(n=i._path=new Path2D,i.path(n,t,s)&&n.closePath()),Ho(e,i.options),e.stroke(n)}function hc(e,i,t,s){let{segments:n,options:o}=i,a=vs(i);for(let r of n)Ho(e,o,r.style),e.beginPath(),a(e,i,r,{start:t,end:t+s-1})&&e.closePath(),e.stroke()}var dc=typeof Path2D=="function";function uc(e,i,t,s){dc&&!i.options.segment?cc(e,i,t,s):hc(e,i,t,s)}var gi=(()=>{class e extends at{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,s){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let o=n.spanGaps?this._loop:this._fullLoop;Mn(this._points,n,t,o,s),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=An(this,this.options.segment))}first(){let t=this.segments,s=this.points;return t.length&&s[t[0].start]}last(){let t=this.segments,s=this.points,n=t.length;return n&&s[t[n-1].end]}interpolate(t,s){let n=this.options,o=t[s],a=this.points,r=Qi(this,{property:s,start:o,end:o});if(!r.length)return;let l=[],c=lc(n),h,d;for(h=0,d=r.length;h{class e extends at{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,s,n){let o=this.options,{x:a,y:r}=this.getProps(["x","y"],n);return Math.pow(t-a,2)+Math.pow(s-r,2)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Yo(e){return Ms[e%Ms.length]}function Uo(e){return oo[e%oo.length]}function yc(e,i){return e.borderColor=Yo(i),e.backgroundColor=Uo(i),++i}function vc(e,i){return e.backgroundColor=e.data.map(()=>Yo(i++)),i}function Sc(e,i){return e.backgroundColor=e.data.map(()=>Uo(i++)),i}function Mc(e){let i=0;return(t,s)=>{let n=e.getDatasetMeta(s).controller;n instanceof Ts?i=vc(t,i):n instanceof Eo?i=Sc(t,i):n&&(i=yc(t,i))}}function ao(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}function wc(e){return e&&(e.borderColor||e.backgroundColor)}function kc(){return N.borderColor!=="rgba(0,0,0,0.1)"||N.backgroundColor!=="rgba(0,0,0,0.1)"}var Pc={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;let{data:{datasets:s},options:n}=e.config,{elements:o}=n,a=ao(s)||wc(n)||o&&ao(o)||kc();if(!t.forceOverride&&a)return;let r=Mc(e);s.forEach(r)}};function Cc(e,i,t,s,n){let o=n.samples||s;if(o>=t)return e.slice(i,i+t);let a=[],r=(t-2)/(o-2),l=0,c=i+t-1,h=i,d,u,f,p,g;for(a[l++]=e[h],d=0;df&&(f=p,u=e[x],g=x);a[l++]=u,h=g}return a[l++]=e[c],a}function Dc(e,i,t,s){let n=0,o=0,a,r,l,c,h,d,u,f,p,g,m=[],b=i+t-1,x=e[i].x,S=e[b].x-x;for(a=i;ag&&(g=c,u=a),n=(o*n+r.x)/++o;else{let v=a-1;if(!A(d)&&!A(u)){let w=Math.min(d,u),M=Math.max(d,u);w!==f&&w!==v&&m.push(Ft(It({},e[w]),{x:n})),M!==f&&M!==v&&m.push(Ft(It({},e[M]),{x:n}))}a>0&&v!==f&&m.push(e[v]),m.push(r),h=_,o=0,p=g=c,d=u=f=a}}return m}function Xo(e){if(e._decimated){let i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function ro(e){e.data.datasets.forEach(i=>{Xo(i)})}function Ac(e,i){let t=i.length,s=0,n,{iScale:o}=e,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Y(lt(i,o.axis,a).lo,0,t-1)),c?n=Y(lt(i,o.axis,r).hi+1,s,t)-s:n=t-s,{start:s,count:n}}var Oc={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled){ro(e);return}let s=e.width;e.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=e.getDatasetMeta(o),c=a||n.data;if(se([r,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=e.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||e.options.parsing)return;let{start:d,count:u}=Ac(l,c),f=t.threshold||4*s;if(u<=f){Xo(n);return}A(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(t.algorithm){case"lttb":p=Cc(c,d,u,s,t);break;case"min-max":p=Dc(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}n._decimated=p})},destroy(e){ro(e)}};function Tc(e,i,t){let s=e.segments,n=e.points,o=i.points,a=[];for(let r of s){let{start:l,end:c}=r;c=pi(l,c,n);let h=ws(t,n[l],n[c],r.loop);if(!i.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}let d=Qi(i,h);for(let u of d){let f=ws(t,o[u.start],o[u.end],u.loop),p=Gi(r,n,f);for(let g of p)a.push({source:g,target:u,start:{[t]:lo(h,f,"start",Math.max)},end:{[t]:lo(h,f,"end",Math.min)}})}}return a}function ws(e,i,t,s){if(s)return;let n=i[e],o=t[e];return e==="angle"&&(n=X(n),o=X(o)),{property:e,start:n,end:o}}function Lc(e,i){let{x:t=null,y:s=null}=e||{},n=i.points,o=[];return i.segments.forEach(({start:a,end:r})=>{r=pi(a,r,n);let l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function pi(e,i,t){for(;i>e;i--){let s=t[i];if(!isNaN(s.x)&&!isNaN(s.y))break}return i}function lo(e,i,t,s){return e&&i?s(e[t],i[t]):e?e[t]:i?i[t]:0}function qo(e,i){let t=[],s=!1;return z(e)?(s=!0,t=e):t=Lc(e,i),t.length?new gi({points:t,options:{tension:0},_loop:s,_fullLoop:s}):null}function co(e){return e&&e.fill!==!1}function Ec(e,i,t){let n=e[i].fill,o=[i],a;if(!t)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(a=e[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Rc(e,i,t){let s=Bc(e);if(O(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?Ic(s[0],i,n,t):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Ic(e,i,t,s){return(e==="-"||e==="+")&&(t=i+t),t===i||t<0||t>=s?!1:t}function Fc(e,i){let t=null;return e==="start"?t=i.bottom:e==="end"?t=i.top:O(e)?t=i.getPixelForValue(e.value):i.getBasePixel&&(t=i.getBasePixel()),t}function zc(e,i,t){let s;return e==="start"?s=t:e==="end"?s=i.options.reverse?i.min:i.max:O(e)?s=e.value:s=i.getBaseValue(),s}function Bc(e){let i=e.options,t=i.fill,s=P(t&&t.target,t);return s===void 0&&(s=!!i.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Nc(e){let{scale:i,index:t,line:s}=e,n=[],o=s.segments,a=s.points,r=Vc(i,t);r.push(qo({x:null,y:i.bottom},s));for(let l=0;l=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&ls(e.ctx,r,o))}},beforeDatasetsDraw(e,i,t){if(t.drawTime!=="beforeDatasetsDraw")return;let s=e.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;co(o)&&ls(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,i,t){let s=i.meta.$filler;!co(s)||t.drawTime!=="beforeDatasetDraw"||ls(e.ctx,s,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},go=(e,i)=>{let{boxHeight:t=i,boxWidth:s=i}=e;return e.usePointStyle&&(t=Math.min(t,i),s=e.pointStyleWidth||Math.min(s,i)),{boxWidth:s,boxHeight:t,itemHeight:Math.max(i,t)}},Qc=(e,i)=>e!==null&&i!==null&&e.datasetIndex===i.datasetIndex&&e.index===i.index,fi=class extends at{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t,s){this.maxWidth=i,this.maxHeight=t,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let i=this.options.labels||{},t=F(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(s=>i.filter(s,this.chart.data))),i.sort&&(t=t.sort((s,n)=>i.sort(s,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:i,ctx:t}=this;if(!i.display){this.width=this.height=0;return}let s=i.labels,n=$(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=go(s,o),c,h;t.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(h,i.maxHeight||this.maxHeight)}_fitRows(i,t,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r,d=i;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{let m=s+t/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(i,t,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-i,d=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{let{itemWidth:x,itemHeight:y}=Zc(s,t,o,m,n);b>0&&f+y+2*r>h&&(d+=u+r,c.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[b]={left:p,top:f,col:g,width:x,height:y},u=Math.max(u,x),f+=y+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Wt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=q(s,this.left+n,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=q(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+i+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=q(s,this.top+i+n,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=q(s,this.top+i+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let i=this.ctx;me(i,this),this._draw(),be(i)}}_draw(){let{options:i,columnSizes:t,lineWidths:s,ctx:n}=this,{align:o,labels:a}=i,r=N.color,l=Wt(i.rtl,this.left,this.width),c=$(a.font),{padding:h}=a,d=c.size,u=d/2,f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:p,boxHeight:g,itemHeight:m}=go(a,d),b=function(v,w,M){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();let k=P(M.lineWidth,1);if(n.fillStyle=P(M.fillStyle,r),n.lineCap=P(M.lineCap,"butt"),n.lineDashOffset=P(M.lineDashOffset,0),n.lineJoin=P(M.lineJoin,"miter"),n.lineWidth=k,n.strokeStyle=P(M.strokeStyle,r),n.setLineDash(P(M.lineDash,[])),a.usePointStyle){let D={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:k},C=l.xPlus(v,p/2),T=w+u;Vi(n,D,C,T,a.pointStyleWidth&&p)}else{let D=w+Math.max((d-g)/2,0),C=l.leftForLtr(v,p),T=At(M.borderRadius);n.beginPath(),Object.values(T).some(U=>U!==0)?ie(n,{x:C,y:D,w:p,h:g,radius:T}):n.rect(C,D,p,g),n.fill(),k!==0&&n.stroke()}n.restore()},x=function(v,w,M){Dt(n,M.text,v,w+m/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),S=this._computeTitleHeight();y?f={x:q(o,this.left+h,this.right-s[0]),y:this.top+h+S,line:0}:f={x:this.left+h,y:q(o,this.top+S+h,this.bottom-t[0].height),line:0},qi(this.ctx,i.textDirection);let _=m+h;this.legendItems.forEach((v,w)=>{n.strokeStyle=v.fontColor,n.fillStyle=v.fontColor;let M=n.measureText(v.text).width,k=l.textAlign(v.textAlign||(v.textAlign=a.textAlign)),D=p+u+M,C=f.x,T=f.y;l.setWidth(this.width),y?w>0&&C+D+h>this.right&&(T=f.y+=_,f.line++,C=f.x=q(o,this.left+h,this.right-s[f.line])):w>0&&T+_>this.bottom&&(C=f.x=C+t[f.line].width+h,f.line++,T=f.y=q(o,this.top+S+h,this.bottom-t[f.line].height));let U=l.x(C);if(b(U,T,v),C=fn(k,C+p+u,y?C+D:this.right,i.rtl),x(l.x(C),T,v),y)f.x+=D+h;else if(typeof v.text!="string"){let et=c.lineHeight;f.y+=Ko(v,et)+h}else f.y+=_}),Ki(this.ctx,i.textDirection)}drawTitle(){let i=this.options,t=i.title,s=$(t.font),n=K(t.padding);if(!t.display)return;let o=Wt(i.rtl,this.left,this.width),a=this.ctx,r=t.position,l=s.size/2,c=n.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=q(i.align,d,this.right-u);else{let p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+q(i.align,this.top,this.bottom-p-i.labels.padding-this._computeTitleHeight())}let f=q(r,d,d+u);a.textAlign=o.textAlign(Ue(r)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=s.string,Dt(a,t.text,f,h,s)}_computeTitleHeight(){let i=this.options.title,t=$(i.font),s=K(i.padding);return i.display?t.lineHeight+s.height:0}_getLegendItemAt(i,t){let s,n,o;if(dt(i,this.left,this.right)&&dt(t,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>a.length?o:a)),i+t.size/2+s.measureText(n).width}function th(e,i,t){let s=e;return typeof i.text!="string"&&(s=Ko(i,t)),s}function Ko(e,i){let t=e.text?e.text.length:0;return i*t}function eh(e,i){return!!((e==="mousemove"||e==="mouseout")&&(i.onHover||i.onLeave)||i.onClick&&(e==="click"||e==="mouseup"))}var ih={id:"legend",_element:fi,start(e,i,t){let s=e.legend=new fi({ctx:e.ctx,options:t,chart:e});Q.configure(e,s,t),Q.addBox(e,s)},stop(e){Q.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){let s=e.legend;Q.configure(e,s,t),s.options=t},afterUpdate(e){let i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){let s=i.datasetIndex,n=t.chart;n.isDatasetVisible(s)?(n.hide(s),i.hidden=!0):(n.show(s),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=K(c.borderWidth);return{text:i[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}},Pe=class extends at{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=t;let n=z(s.text)?s.text.length:1;this._padding=K(s.padding);let o=n*$(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let i=this.options.position;return i==="top"||i==="bottom"}_drawArgs(i){let{top:t,left:s,bottom:n,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=q(r,s,o),d=t+i,c=o-s):(a.position==="left"?(h=s+i,d=q(r,n,t),l=E*-.5):(h=o-i,d=q(r,t,n),l=E*.5),c=n-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let i=this.ctx,t=this.options;if(!t.display)return;let s=$(t.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Dt(i,t.text,0,0,s,{color:t.color,maxWidth:l,rotation:c,textAlign:Ue(t.align),textBaseline:"middle",translation:[a,r]})}};function sh(e,i){let t=new Pe({ctx:e.ctx,options:i,chart:e});Q.configure(e,t,i),Q.addBox(e,t),e.titleBlock=t}var nh={id:"title",_element:Pe,start(e,i,t){sh(e,t)},stop(e){let i=e.titleBlock;Q.removeBox(e,i),delete e.titleBlock},beforeUpdate(e,i,t){let s=e.titleBlock;Q.configure(e,s,t),s.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},si=new WeakMap,oh={id:"subtitle",start(e,i,t){let s=new Pe({ctx:e.ctx,options:t,chart:e});Q.configure(e,s,t),Q.addBox(e,s),si.set(e,s)},stop(e){Q.removeBox(e,si.get(e)),si.delete(e)},beforeUpdate(e,i,t){let s=si.get(e);Q.configure(e,s,t),s.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},we={average(e){if(!e.length)return!1;let i,t,s=new Set,n=0,o=0;for(i=0,t=e.length;ir+l)/s.size,y:n/o}},nearest(e,i){if(!e.length)return!1;let t=i.x,s=i.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=e.length;o{class e{constructor(t){this.translateService=t}translate(t,s){return this.translateService.get(t,s)}static{this.\u0275fac=function(s){return new(s||e)(Rs(Fs))}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac})}}return e})();function Zh(e){e||(e=gt(Is));let i=new Ls(t=>{if(e.destroyed){t.next();return}return e.onDestroy(t.next.bind(t))});return t=>t.pipe(Es(i))}var nd=(()=>{class e{constructor(){this.settingsService=gt(Te),this.globalConfigurations=[e.DAYS_BEFORE_REPAYMENT_IS_DUE,e.DAYS_AFTER_REPAYMENT_IS_OVERDUE],this.propertyNames=["dueDaysForRepaymentEvent","overDueDaysForRepaymentEvent"]}static{this.LOAN_SCHEDULE_TYPE_CUMULATIVE="CUMULATIVE"}static{this.LOAN_SCHEDULE_TYPE_PROGRESSIVE="PROGRESSIVE"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL="HORIZONTAL"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_VERTICAL="VERTICAL"}static{this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY="advanced-payment-allocation-strategy"}static{this.DAYS_BEFORE_REPAYMENT_IS_DUE="days-before-repayment-is-due"}static{this.DAYS_AFTER_REPAYMENT_IS_OVERDUE="days-after-repayment-is-overdue"}static isAdvancedPaymentAllocationStrategy(t){return t===this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY}setItemsByDefault(t){let s=[];return t.globalConfiguration.forEach(n=>{this.globalConfigurations.includes(n.name)&&s.push(n)}),s}updateLoanProductDefaults(t,s){return t.itemsByDefault.forEach(o=>{let a=this.resolvePropertyName(o.name);a!==""&&(s?(!t[a]||t[a]==="")&&(t[a]=o.value):t[a]=o.value)}),t}buildPayload(t,s){let n=this.settingsService.dateFormat,o=this.settingsService.language.code,a=Ft(It({},t),{charges:t.charges.map(r=>({id:r.id})),dateFormat:n,locale:o});return delete a.allowAttributeConfiguration,delete a.advancedAccountingRules,a.allowPartialPeriodInterestCalculation=a.allowPartialPeriodInterestCalculation,delete a.allowPartialPeriodInterestCalculation,s.forEach(r=>{let l=this.resolvePropertyName(r.name);l!==""&&(!a[l]||a[l]==="")&&(a[l]=r.value)}),a}isItemByDefault(t){return this.propertyNames.includes(t)}isGlobalConfigurations(t){return this.globalConfigurations.includes(t)}resolvePropertyName(t){if(this.globalConfigurations.includes(t)){let s=this.globalConfigurations.indexOf(t);if(s>-1)return this.propertyNames[s]}return""}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var hd=(()=>{class e{constructor(){this.http=gt(Oe),this.basePath="/external-asset-owners"}executeExternalAssetOwnerLoanCommand(t,s,n){let o=new L().set("command",n);return this.http.post(`${this.basePath}/transfers/loans/${t}`,s,{params:o})}executeExternalAssetOwnerTransferCommand(t,s,n){let o=new L().set("command",n);return this.http.post(`${this.basePath}/transfers/${t}`,s,{params:o})}retrieveExternalAssetOwnerTransfers(t){let s=new L().set("loanId",t);return this.http.get(`${this.basePath}/transfers`,{params:s})}retrieveExternalAssetOwnerActiveTransfer(t){let s=new L().set("loanId",t);return this.http.get(`${this.basePath}/transfers/active-transfer`,{params:s})}retrieveExternalAssetOwnerTransferJournalEntries(t){return this.http.get(`${this.basePath}/transfers/${t}/journal-entries`)}searchExternalAssetOwnerTransfer(t){return this.http.post(`${this.basePath}/search`,t)}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var md=(()=>{class e{constructor(){this.http=gt(Oe),this.settingsService=gt(Te)}getProvisioningCriterias(){return this.http.get("/provisioningcriteria")}getProvisioningCriteriaTemplate(){return this.http.get("/provisioningcriteria/template")}getProvisioningCriteria(t,s=!1){let n=new L().set("template",s.toString());return this.http.get(`/provisioningcriteria/${t}`,{params:n})}createProvisioningCriteria(t){return this.http.post("/provisioningcriteria",t)}updateProvisioningCriteria(t,s){return this.http.put(`/provisioningcriteria/${t}`,s)}deleteProvisioningCriteria(t){return this.http.delete(`/provisioningcriteria/${t}`)}getOffices(){return this.http.get("/offices")}getOfficeTemplate(t){let s=new L().set("officeId",t.toString());return this.http.get("/loans/loanreassignment/template",{params:s})}getOfficerTemplate(t,s){let n=new L().set("fromLoanOfficerId",t.toString()).set("officeId",s.toString());return this.http.get("/loans/loanreassignment/template",{params:n})}createLoanReassignment(t){return this.http.post("/loans/loanreassignment",t)}getOffice(t,s=!1){let n=new L().set("template",s.toString());return this.http.get(`/offices/${t}`,{params:n})}createOffice(t){return this.http.post("/offices",t)}updateOffice(t,s){return this.http.put(`/offices/${t}`,s)}getOfficeDatatables(){let t=new L().set("apptable","m_office");return this.http.get("/datatables",{params:t})}getOfficeDatatable(t,s){let n=new L().set("genericResultSet","true");return this.http.get(`/datatables/${s}/${t}`,{params:n})}addOfficeDatatableEntry(t,s,n){let o=new L().set("genericResultSet","true");return this.http.post(`/datatables/${s}/${t}`,n,{params:o})}editOfficeDatatableEntry(t,s,n){let o=new L().set("genericResultSet","true");return this.http.put(`/datatables/${s}/${t}`,n,{params:o})}deleteDatatableContent(t,s){let n=new L().set("genericResultSet","true");return this.http.delete(`/datatables/${s}/${t}`,{params:n})}getEmployees(){let t=new L().set("status","all");return this.http.get("/staff",{params:t})}createEmployee(t){return this.http.post("/staff",t)}getEmployee(t,s=!0){let n=new L().set("template",s.toString());return this.http.get(`/staff/${t}`,{params:n})}getCurrencies(){return this.http.get("/currencies")}updateCurrencies(t){return this.http.put("/currencies",{currencies:t})}getSmsCampaigns(){return this.http.get("/smscampaigns")}getSmsCampaign(t){return this.http.get(`/smscampaigns/${t}`)}createSmsCampaign(t){return this.http.post("/smscampaigns",t)}updateSmsCampaign(t,s){return this.http.put(`/smscampaigns/${s}`,t)}deleteSmsCampaign(t){return this.http.delete(`/smscampaigns/${t}`)}getSmsCampaignTemplate(){return this.http.get("/smscampaigns/template")}executeSmsCampaignCommand(t,s,n){let o=new L().set("command",n.toString());return this.http.post(`/smscampaigns/${t}`,s,{params:o})}getMessagebyStatus(t){let s=new L().set("status",t.status.toString()).set("locale",t.locale).set("dateFormat",t.dateFormat);return s=t.fromDate?s.set("fromDate",t.fromDate):s,s=t.toDate?s.set("toDate",t.toDate):s,this.http.get(`/sms/${t.id}/messageByStatus`,{params:s})}getAdhocQueries(){return this.http.get("/adhocquery")}getAdhocQuery(t){return this.http.get(`/adhocquery/${t}`)}getAdhocQueryTemplate(){return this.http.get("/adhocquery/template")}getAdhocQueryAndTemplate(t){let s=new L().set("template","true");return this.http.get(`/adhocquery/${t}`,{params:s})}createAdhocQuery(t){return this.http.post("/adhocquery",t)}updateAdhocQuery(t,s){return this.http.put(`/adhocquery/${t}`,s)}deleteAdhocQuery(t){return this.http.delete(`/adhocquery/${t}`)}getTellers(){return this.http.get("/tellers")}getTeller(t){return this.http.get(`/tellers/${t}`)}getCashiers(t){return this.http.get(`/tellers/${t}/cashiers`)}getCashier(t,s){return this.http.get(`/tellers/${t}/cashiers/${s}`)}getCashierSummaryAndTransactions(t,s,n){let o=new L().set("currencyCode",n);return this.http.get(`/tellers/${t}/cashiers/${s}/summaryandtransactions`,{params:o})}getCashierTransactionTemplate(t,s){return this.http.get(`/tellers/${t}/cashiers/${s}/transactions/template`)}createCashier(t,s){return this.http.post(`/tellers/${t}/cashiers`,s)}deleteCashier(t,s){return this.http.delete(`/tellers/${t}/cashiers/${s}`)}settleCash(t,s,n){let o=new L().set("command","settle");return this.http.post(`/tellers/${t}/cashiers/${s}/settle`,n,{params:o})}allocateCash(t,s,n){let o=new L().set("command","allocate");return this.http.post(`/tellers/${t}/cashiers/${s}/allocate`,n,{params:o})}getCashierTemplate(t){return this.http.get(`/tellers/${t}/cashiers/template`)}updateCashier(t,s,n){return this.http.put(`/tellers/${t}/cashiers/${s}`,n)}deleteTeller(t){return this.http.delete(`/tellers/${t}`)}createTeller(t){return this.http.post("/tellers",t)}getPaymentTypes(){return this.http.get("/paymenttypes")}getPaymentTypesWithCode(){return this.http.get("/paymenttypes?onlyWithCode=true")}createPaymentType(t){return this.http.post("/paymenttypes",t)}deletePaymentType(t){return this.http.delete(`/paymenttypes/${t}`)}getPaymentType(t){return this.http.get(`/paymenttypes/${t}`)}updatePaymentType(t,s){return this.http.put(`/paymenttypes/${t}`,s)}getPasswordPreferencesTemplate(){return this.http.get("/passwordpreferences/template")}updatePasswordPreferences(t){return this.http.put("/passwordpreferences",t)}getEntityDataTableChecks(t=0,s=-1){let n=new L().set("offset",t.toString()).set("limit",s.toString());return this.http.get("/entityDatatableChecks",{params:n})}getEntityDataTableChecksTemplate(){return this.http.get("/entityDatatableChecks/template")}createEntityDataTableChecks(t){return this.http.post("/entityDatatableChecks",t)}deleteEntityDataTableCheck(t){return this.http.delete(`/entityDatatableChecks/${t}`)}getWorkingDays(){return this.http.get("/workingdays")}updateWorkingDays(t){return this.http.put("/workingdays",t)}getHolidays(t){let s=new L().set("officeId",t.toString());return this.http.get("/holidays",{params:s})}getHoliday(t){return this.http.get(`/holidays/${t}`)}getHolidayTemplate(){return this.http.get("/holidays/template")}createHoliday(t){return this.http.post("/holidays",t)}updateHoliday(t,s){return this.http.put(`/holidays/${t}`,s)}deleteHoliday(t){return this.http.delete(`/holidays/${t}`)}activateHoliday(t){let s=new L().set("command","activate");return this.http.post(`/holidays/${t}`,null,{params:s})}updateEmployee(t,s){return this.http.put(`/staff/${t}`,s)}updateTeller(t,s){return this.http.put(`/tellers/${t}`,s)}getFunds(){return this.http.get("/funds")}getFund(t){return this.http.get(`/funds/${t}`)}createFund(t){return this.http.post("/funds",t)}editFund(t,s){return this.http.put(`/funds/${t}`,s)}getStaffs(t){let s=new L().set("officeId",t).set("status","all");return this.http.get("/staff",{params:s})}getCenters(t){let s=new L().set("officeId",t).set("status","all");return this.http.get("/centers",{params:s})}getGroups(t){let s=new L().set("officeId",t).set("status","all");return this.http.get("/groups",{params:s})}getStaff(t){let s=new L().set("officeId",t.toString());return this.http.get("/staff",{params:s})}getImports(t){let s=new L().set("entityType",t);return this.http.get("/imports",{params:s})}getAdvanceSearchTemplate(){return this.http.get("/search/template")}retrieveAdvanceSearchResults(t){return this.http.post("/search/advance",t)}getStandingInstructionTemplate(){return this.http.get("/standinginstructions/template")}getStandingInstructions(t){let s=new L;for(let n in t)t[n]!==""&&t[n]!==null&&(s=s.set(n,t[n]));return this.http.get("/standinginstructionrunhistory",{params:s})}getImportTemplate(t,s,n,o){let a=new L().set("tenantIdentifier","default").set("locale",this.settingsService.language.code).set("dateFormat",this.settingsService.dateFormat);return s&&(a=a.set("officeId",s.toString())),n&&(a=a.set("staffId",n.toString())),o.length&&(a=a.set("legalFormType",o)),this.http.get(`${t}/downloadtemplate`,{params:a,responseType:"arraybuffer",observe:"response"})}getImportDocument(t){let s=new L().set("importDocumentId",t).set("tenantIdentifier","default");return this.http.get("/imports/downloadOutputTemplate",{params:s,responseType:"arraybuffer",observe:"response"})}uploadImportDocument(t,s,n){let o=new L;n.length&&(o=o.set("legalFormType",n));let a=new FormData;return a.append("file",t),a.append("locale",this.settingsService.language.code),a.append("dateFormat",this.settingsService.dateFormat),this.http.post(`${s}/uploadtemplate`,a,{params:o})}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var xd=(()=>{class e{constructor(){this.defaultDate="9999-12-31"}validateStatus(t,s){return t!=null?t.status===s:!1}itemCurrentStatus(t){return this.isBuyBackPending(t)?t.status+" PENDING":t.status}itemStatus(t){return"status-"+t.toLowerCase()}isPending(t){return t.status==="PENDING"}isPendingOrCanceled(t){return t.status==="PENDING"||t.status==="CANCELLED"||this.isBuyBackPending(t)}isBuyBackPending(t){return t.status==="BUYBACK"&&t.effectiveTo===this.defaultDate}canBeCancelled(t){return this.validateStatus(t,"PENDING")}canBeSold(t){return t==null?!0:["","CANCELLED"].includes(t.status)||t.status==="BUYBACK"&&t.effectiveTo!==this.defaultDate}canBeBuyed(t){return this.validateStatus(t,"ACTIVE")}static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275prov=rt({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function de(e){return e+.5|0}var St=(e,i,t)=>Math.max(Math.min(e,t),i);function ce(e){return St(de(e*2.55),0,255)}function Mt(e){return St(de(e*255),0,255)}function pt(e){return St(de(e/2.55)/100,0,1)}function zs(e){return St(de(e*100),0,100)}var it={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xi=[..."0123456789ABCDEF"],Zo=e=>xi[e&15],Jo=e=>xi[(e&240)>>4]+xi[e&15],Ee=e=>(e&240)>>4===(e&15),ta=e=>Ee(e.r)&&Ee(e.g)&&Ee(e.b)&&Ee(e.a);function ea(e){var i=e.length,t;return e[0]==="#"&&(i===4||i===5?t={r:255&it[e[1]]*17,g:255&it[e[2]]*17,b:255&it[e[3]]*17,a:i===5?it[e[4]]*17:255}:(i===7||i===9)&&(t={r:it[e[1]]<<4|it[e[2]],g:it[e[3]]<<4|it[e[4]],b:it[e[5]]<<4|it[e[6]],a:i===9?it[e[7]]<<4|it[e[8]]:255})),t}var ia=(e,i)=>e<255?i(e):"";function sa(e){var i=ta(e)?Zo:Jo;return e?"#"+i(e.r)+i(e.g)+i(e.b)+ia(e.a,i):void 0}var na=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ws(e,i,t){let s=i*Math.min(t,1-t),n=(o,a=(o+e/30)%12)=>t-s*Math.max(Math.min(a-3,9-a,1),-1);return[n(0),n(8),n(4)]}function oa(e,i,t){let s=(n,o=(n+e/60)%6)=>t-t*i*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function aa(e,i,t){let s=Ws(e,1,.5),n;for(i+t>1&&(n=1/(i+t),i*=n,t*=n),n=0;n<3;n++)s[n]*=1-i-t,s[n]+=i;return s}function ra(e,i,t,s,n){return e===n?(i-t)/s+(i.5?h/(2-o-a):h/(o+a),l=ra(t,s,n,h,o),l=l*60+.5),[l|0,c||0,r]}function yi(e,i,t,s){return(Array.isArray(i)?e(i[0],i[1],i[2]):e(i,t,s)).map(Mt)}function vi(e,i,t){return yi(Ws,e,i,t)}function la(e,i,t){return yi(aa,e,i,t)}function ca(e,i,t){return yi(oa,e,i,t)}function Hs(e){return(e%360+360)%360}function ha(e){let i=na.exec(e),t=255,s;if(!i)return;i[5]!==s&&(t=i[6]?ce(+i[5]):Mt(+i[5]));let n=Hs(+i[2]),o=+i[3]/100,a=+i[4]/100;return i[1]==="hwb"?s=la(n,o,a):i[1]==="hsv"?s=ca(n,o,a):s=vi(n,o,a),{r:s[0],g:s[1],b:s[2],a:t}}function da(e,i){var t=_i(e);t[0]=Hs(t[0]+i),t=vi(t),e.r=t[0],e.g=t[1],e.b=t[2]}function ua(e){if(!e)return;let i=_i(e),t=i[0],s=zs(i[1]),n=zs(i[2]);return e.a<255?`hsla(${t}, ${s}%, ${n}%, ${pt(e.a)})`:`hsl(${t}, ${s}%, ${n}%)`}var Bs={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ns={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function fa(){let e={},i=Object.keys(Ns),t=Object.keys(Bs),s,n,o,a,r;for(s=0;s>16&255,o>>8&255,o&255]}return e}var Re;function ga(e){Re||(Re=fa(),Re.transparent=[0,0,0,0]);let i=Re[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:i.length===4?i[3]:255}}var pa=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ma(e){let i=pa.exec(e),t=255,s,n,o;if(i){if(i[7]!==s){let a=+i[7];t=i[8]?ce(a):St(a*255,0,255)}return s=+i[1],n=+i[3],o=+i[5],s=255&(i[2]?ce(s):St(s,0,255)),n=255&(i[4]?ce(n):St(n,0,255)),o=255&(i[6]?ce(o):St(o,0,255)),{r:s,g:n,b:o,a:t}}}function ba(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${pt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var bi=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Xt=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function xa(e,i,t){let s=Xt(pt(e.r)),n=Xt(pt(e.g)),o=Xt(pt(e.b));return{r:Mt(bi(s+t*(Xt(pt(i.r))-s))),g:Mt(bi(n+t*(Xt(pt(i.g))-n))),b:Mt(bi(o+t*(Xt(pt(i.b))-o))),a:e.a+t*(i.a-e.a)}}function Ie(e,i,t){if(e){let s=_i(e);s[i]=Math.max(0,Math.min(s[i]+s[i]*t,i===0?360:1)),s=vi(s),e.r=s[0],e.g=s[1],e.b=s[2]}}function js(e,i){return e&&Object.assign(i||{},e)}function Vs(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=Mt(e[3]))):(i=js(e,{r:0,g:0,b:0,a:1}),i.a=Mt(i.a)),i}function _a(e){return e.charAt(0)==="r"?ma(e):ha(e)}var he=class e{constructor(i){if(i instanceof e)return i;let t=typeof i,s;t==="object"?s=Vs(i):t==="string"&&(s=ea(i)||ga(i)||_a(i)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var i=js(this._rgb);return i&&(i.a=pt(i.a)),i}set rgb(i){this._rgb=Vs(i)}rgbString(){return this._valid?ba(this._rgb):void 0}hexString(){return this._valid?sa(this._rgb):void 0}hslString(){return this._valid?ua(this._rgb):void 0}mix(i,t){if(i){let s=this.rgb,n=i.rgb,o,a=t===o?.5:t,r=2*a-1,l=s.a-n.a,c=((r*l===-1?r:(r+l)/(1+r*l))+1)/2;o=1-c,s.r=255&c*s.r+o*n.r+.5,s.g=255&c*s.g+o*n.g+.5,s.b=255&c*s.b+o*n.b+.5,s.a=a*s.a+(1-a)*n.a,this.rgb=s}return this}interpolate(i,t){return i&&(this._rgb=xa(this._rgb,i._rgb,t)),this}clone(){return new e(this.rgb)}alpha(i){return this._rgb.a=Mt(i),this}clearer(i){let t=this._rgb;return t.a*=1-i,this}greyscale(){let i=this._rgb,t=de(i.r*.3+i.g*.59+i.b*.11);return i.r=i.g=i.b=t,this}opaquer(i){let t=this._rgb;return t.a*=1+i,this}negate(){let i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return Ie(this._rgb,2,i),this}darken(i){return Ie(this._rgb,2,-i),this}saturate(i){return Ie(this._rgb,1,i),this}desaturate(i){return Ie(this._rgb,1,-i),this}rotate(i){return da(this._rgb,i),this}};function ht(){}var tn=(()=>{let e=0;return()=>e++})();function A(e){return e==null}function z(e){if(Array.isArray&&Array.isArray(e))return!0;let i=Object.prototype.toString.call(e);return i.slice(0,7)==="[object"&&i.slice(-6)==="Array]"}function O(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function W(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Z(e,i){return W(e)?e:i}function P(e,i){return typeof e>"u"?i:e}var en=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/i,ki=(e,i)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*i:+e;function F(e,i,t){if(e&&typeof e.call=="function")return e.apply(t,i)}function R(e,i,t,s){let n,o,a;if(z(e))if(o=e.length,s)for(n=o-1;n>=0;n--)i.call(t,e[n],n);else for(n=0;ne,x:e=>e.x,y:e=>e.y};function Sa(e){let i=e.split("."),t=[],s="";for(let n of i)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(t.push(s),s="");return t}function Ma(e){let i=Sa(e);return t=>{for(let s of i){if(s==="")break;t=t&&t[s]}return t}}function xt(e,i){return($s[i]||($s[i]=Ma(i)))(e)}function je(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Zt=e=>typeof e<"u",mt=e=>typeof e=="function",Pi=(e,i)=>{if(e.size!==i.size)return!1;for(let t of e)if(!i.has(t))return!1;return!0};function nn(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var E=Math.PI,B=2*E,wa=B+E,Ve=Number.POSITIVE_INFINITY,ka=E/180,H=E/2,zt=E/4,Ys=E*2/3,bt=Math.log10,ot=Math.sign;function Jt(e,i,t){return Math.abs(e-i)n-o).pop(),i}function Pa(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Vt(e){return!Pa(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function an(e,i){let t=Math.round(e);return t-i<=e&&t+i>=e}function Di(e,i,t){let s,n,o;for(s=0,n=e.length;sl&&c=Math.min(i,t)-s&&e<=Math.max(i,t)+s}function Ye(e,i,t){t=t||(a=>e[a]1;)o=n+s>>1,t(o)?n=o:s=o;return{lo:n,hi:s}}var lt=(e,i,t,s)=>Ye(e,t,s?n=>{let o=e[n][i];return oe[n][i]Ye(e,t,s=>e[s][i]>=t);function cn(e,i,t){let s=0,n=e.length;for(;ss&&e[n-1]>t;)n--;return s>0||n{let s="_onData"+je(t),n=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...o){let a=n.apply(this,o);return e._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...o)}),a}})})}function Ti(e,i){let t=e._chartjs;if(!t)return;let s=t.listeners,n=s.indexOf(i);n!==-1&&s.splice(n,1),!(s.length>0)&&(hn.forEach(o=>{delete e[o]}),delete e._chartjs)}function Li(e){let i=new Set(e);return i.size===e.length?e:Array.from(i)}var Ei=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Ri(e,i){let t=[],s=!1;return function(...n){t=n,s||(s=!0,Ei.call(window,()=>{s=!1,e.apply(i,t)}))}}function un(e,i){let t;return function(...s){return i?(clearTimeout(t),t=setTimeout(e,i,s)):e.apply(this,s),i}}var Ue=e=>e==="start"?"left":e==="end"?"right":"center",q=(e,i,t)=>e==="start"?i:e==="end"?t:(i+t)/2,fn=(e,i,t,s)=>e===(s?"left":"right")?t:e==="center"?(i+t)/2:i;function Ii(e,i,t){let s=i.length,n=0,o=s;if(e._sorted){let{iScale:a,vScale:r,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,h=a.axis,{min:d,max:u,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(n=Math.min(lt(l,h,d).lo,t?s:lt(i,h,a.getPixelForValue(d)).lo),c){let g=l.slice(0,n+1).reverse().findIndex(m=>!A(m[r.axis]));n-=Math.max(0,g)}n=Y(n,0,s-1)}if(p){let g=Math.max(lt(l,a.axis,u,!0).hi+1,t?0:lt(i,h,a.getPixelForValue(u),!0).hi+1);if(c){let m=l.slice(g-1).findIndex(b=>!A(b[r.axis]));g+=Math.max(0,m)}o=Y(g,n,s)-n}else o=s-n}return{start:n,count:o}}function Fi(e){let{xScale:i,yScale:t,_scaleRanges:s}=e,n={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!s)return e._scaleRanges=n,!0;let o=s.xmin!==i.min||s.xmax!==i.max||s.ymin!==t.min||s.ymax!==t.max;return Object.assign(s,n),o}var Fe=e=>e===0||e===1,Us=(e,i,t)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-i)*B/t)),Xs=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*B/t)+1,qt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*H)+1,easeOutSine:e=>Math.sin(e*H),easeInOutSine:e=>-.5*(Math.cos(E*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Fe(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Fe(e)?e:Us(e,.075,.3),easeOutElastic:e=>Fe(e)?e:Xs(e,.075,.3),easeInOutElastic(e){return Fe(e)?e:e<.5?.5*Us(e*2,.1125,.45):.5+.5*Xs(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let i=1.70158;return(e/=.5)<1?.5*(e*e*(((i*=1.525)+1)*e-i)):.5*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)},easeInBounce:e=>1-qt.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?qt.easeInBounce(e*2)*.5:qt.easeOutBounce(e*2-1)*.5+.5};function zi(e){if(e&&typeof e=="object"){let i=e.toString();return i==="[object CanvasPattern]"||i==="[object CanvasGradient]"}return!1}function Bi(e){return zi(e)?e:new he(e)}function Si(e){return zi(e)?e:new he(e).saturate(.5).darken(.1).hexString()}var Da=["x","y","borderWidth","radius","tension"],Aa=["color","borderColor","backgroundColor"];function Oa(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>i!=="onProgress"&&i!=="onComplete"&&i!=="fn"}),e.set("animations",{colors:{type:"color",properties:Aa},numbers:{type:"number",properties:Da}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>i|0}}}})}function Ta(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var qs=new Map;function La(e,i){i=i||{};let t=e+JSON.stringify(i),s=qs.get(t);return s||(s=new Intl.NumberFormat(e,i),qs.set(t,s)),s}function ee(e,i,t){return La(i,t).format(e)}var gn={values(e){return z(e)?e:""+e},numeric(e,i,t){if(e===0)return"0";let s=this.chart.options.locale,n,o=e;if(t.length>1){let c=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=Ea(e,t)}let a=bt(Math.abs(o)),r=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),ee(e,s,l)},logarithmic(e,i,t){if(e===0)return"0";let s=t[i].significand||e/Math.pow(10,Math.floor(bt(e)));return[1,2,3,5,10,15].includes(s)||i>.8*t.length?gn.numeric.call(this,e,i,t):""}};function Ea(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}var pe={formatters:gn};function Ra(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:pe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&i!=="callback"&&i!=="parser",_indexable:i=>i!=="borderDash"&&i!=="tickBorderDash"&&i!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>i!=="backdropPadding"&&i!=="callback",_indexable:i=>i!=="backdropPadding"})}var Pt=Object.create(null),Xe=Object.create(null);function ue(e,i){if(!i)return e;let t=i.split(".");for(let s=0,n=t.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Si(n.backgroundColor),this.hoverBorderColor=(s,n)=>Si(n.borderColor),this.hoverColor=(s,n)=>Si(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return Mi(this,i,t)}get(i){return ue(this,i)}describe(i,t){return Mi(Xe,i,t)}override(i,t){return Mi(Pt,i,t)}route(i,t,s,n){let o=ue(this,i),a=ue(this,s),r="_"+t;Object.defineProperties(o,{[r]:{value:o[t],writable:!0},[t]:{enumerable:!0,get(){let l=this[r],c=a[n];return O(l)?Object.assign({},c,l):P(l,c)},set(l){this[r]=l}}})}apply(i){i.forEach(t=>t(this))}},N=new wi({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Oa,Ta,Ra]);function Ia(e){return!e||A(e.size)||A(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function fe(e,i,t,s,n){let o=i[n];return o||(o=i[n]=e.measureText(n).width,t.push(n)),o>s&&(s=o),s}function pn(e,i,t,s){s=s||{};let n=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==i&&(n=s.data={},o=s.garbageCollect=[],s.font=i),e.save(),e.font=i;let a=0,r=t.length,l,c,h,d,u;for(l=0;lt.length){for(l=0;l0&&e.stroke()}}function ct(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.xi.top-t&&e.y0&&o.strokeColor!=="",l,c;for(e.save(),e.font=n.string,Fa(e,o),l=0;l+e||0;function Ke(e,i){let t={},s=O(i),n=s?Object.keys(i):i,o=O(e)?s?a=>P(e[a],e[i[a]]):a=>e[a]:()=>e;for(let a of n)t[a]=Ha(o(a));return t}function Wi(e){return Ke(e,{top:"y",right:"x",bottom:"y",left:"x"})}function At(e){return Ke(e,["topLeft","topRight","bottomLeft","bottomRight"])}function K(e){let i=Wi(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function $(e,i){e=e||{},i=i||N.font;let t=P(e.size,i.size);typeof t=="string"&&(t=parseInt(t,10));let s=P(e.style,i.style);s&&!(""+s).match(Va)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);let n={family:P(e.family,i.family),lineHeight:Wa(P(e.lineHeight,i.lineHeight),t),size:t,style:s,weight:P(e.weight,i.weight),string:""};return n.string=Ia(n),n}function se(e,i,t,s){let n=!0,o,a,r;for(o=0,a=e.length;ot&&r===0?0:r+l;return{min:a(s,-Math.abs(o)),max:a(n,o)}}function _t(e,i){return Object.assign(Object.create(e),i)}function Ge(e,i=[""],t,s,n=()=>e[0]){let o=t||e;typeof s>"u"&&(s=vn("_fallback",e));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:s,_getTarget:n,override:r=>Ge([r,...e],i,o,s)};return new Proxy(a,{deleteProperty(r,l){return delete r[l],delete r._keys,delete e[0][l],!0},get(r,l){return _n(r,l,()=>Ga(l,i,e,r))},getOwnPropertyDescriptor(r,l){return Reflect.getOwnPropertyDescriptor(r._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(r,l){return Gs(r).includes(l)},ownKeys(r){return Gs(r)},set(r,l,c){let h=r._storage||(r._storage=n());return r[l]=h[l]=c,delete r._keys,!0}})}function Nt(e,i,t,s){let n={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:Hi(e,s),setContext:o=>Nt(e,o,t,s),override:o=>Nt(e.override(o),i,t,s)};return new Proxy(n,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,r){return _n(o,a,()=>$a(o,a,r))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,r){return e[a]=r,delete o[a],!0}})}function Hi(e,i={scriptable:!0,indexable:!0}){let{_scriptable:t=i.scriptable,_indexable:s=i.indexable,_allKeys:n=i.allKeys}=e;return{allKeys:n,scriptable:t,indexable:s,isScriptable:mt(t)?t:()=>t,isIndexable:mt(s)?s:()=>s}}var ja=(e,i)=>e?e+je(i):i,ji=(e,i)=>O(i)&&e!=="adapters"&&(Object.getPrototypeOf(i)===null||i.constructor===Object);function _n(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||i==="constructor")return e[i];let s=t();return e[i]=s,s}function $a(e,i,t){let{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=e,r=s[i];return mt(r)&&a.isScriptable(i)&&(r=Ya(i,r,e,t)),z(r)&&r.length&&(r=Ua(i,r,e,a.isIndexable)),ji(i,r)&&(r=Nt(r,n,o&&o[i],a)),r}function Ya(e,i,t,s){let{_proxy:n,_context:o,_subProxy:a,_stack:r}=t;if(r.has(e))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+e);r.add(e);let l=i(o,a||s);return r.delete(e),ji(e,l)&&(l=$i(n._scopes,n,e,l)),l}function Ua(e,i,t,s){let{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=t;if(typeof o.index<"u"&&s(e))return i[o.index%i.length];if(O(i[0])){let l=i,c=n._scopes.filter(h=>h!==l);i=[];for(let h of l){let d=$i(c,n,e,h);i.push(Nt(d,o,a&&a[e],r))}}return i}function yn(e,i,t){return mt(e)?e(i,t):e}var Xa=(e,i)=>e===!0?i:typeof e=="string"?xt(i,e):void 0;function qa(e,i,t,s,n){for(let o of i){let a=Xa(t,o);if(a){e.add(a);let r=yn(a._fallback,t,n);if(typeof r<"u"&&r!==t&&r!==s)return r}else if(a===!1&&typeof s<"u"&&t!==s)return null}return!1}function $i(e,i,t,s){let n=i._rootScopes,o=yn(i._fallback,t,s),a=[...e,...n],r=new Set;r.add(s);let l=Ks(r,a,t,o||t,s);return l===null||typeof o<"u"&&o!==t&&(l=Ks(r,a,o,l,s),l===null)?!1:Ge(Array.from(r),[""],n,o,()=>Ka(i,t,s))}function Ks(e,i,t,s,n){for(;t;)t=qa(e,i,t,s,n);return t}function Ka(e,i,t){let s=e._getTarget();i in s||(s[i]={});let n=s[i];return z(n)&&O(t)?t:n||{}}function Ga(e,i,t,s){let n;for(let o of i)if(n=vn(ja(o,e),t),typeof n<"u")return ji(e,n)?$i(t,s,e,n):n}function vn(e,i){for(let t of i){if(!t)continue;let s=t[e];if(typeof s<"u")return s}}function Gs(e){let i=e._keys;return i||(i=e._keys=Qa(e._scopes)),i}function Qa(e){let i=new Set;for(let t of e)for(let s of Object.keys(t).filter(n=>!n.startsWith("_")))i.add(s);return Array.from(i)}function Yi(e,i,t,s){let{iScale:n}=e,{key:o="r"}=this._parsing,a=new Array(s),r,l,c,h;for(r=0,l=s;rie==="x"?"y":"x";function Ja(e,i,t,s){let n=e.skip?i:e,o=i,a=t.skip?i:t,r=We(o,n),l=We(a,o),c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;let d=s*c,u=s*h;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function tr(e,i,t){let s=e.length,n,o,a,r,l,c=Gt(e,0);for(let h=0;h!c.skip)),i.cubicInterpolationMode==="monotone")ir(e,n);else{let c=s?e[e.length-1]:e[0];for(o=0,a=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function nr(e,i){return Je(e).getPropertyValue(i)}var or=["top","right","bottom","left"];function Bt(e,i,t){let s={};t=t?"-"+t:"";for(let n=0;n<4;n++){let o=or[n];s[o]=parseFloat(e[i+"-"+o+t])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}var ar=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function rr(e,i){let t=e.touches,s=t&&t.length?t[0]:e,{offsetX:n,offsetY:o}=s,a=!1,r,l;if(ar(n,o,e.target))r=n,l=o;else{let c=i.getBoundingClientRect();r=s.clientX-c.left,l=s.clientY-c.top,a=!0}return{x:r,y:l,box:a}}function Ot(e,i){if("native"in e)return e;let{canvas:t,currentDevicePixelRatio:s}=i,n=Je(t),o=n.boxSizing==="border-box",a=Bt(n,"padding"),r=Bt(n,"border","width"),{x:l,y:c,box:h}=rr(e,t),d=a.left+(h&&r.left),u=a.top+(h&&r.top),{width:f,height:p}=i;return o&&(f-=a.width+r.width,p-=a.height+r.height),{x:Math.round((l-d)/f*t.width/s),y:Math.round((c-u)/p*t.height/s)}}function lr(e,i,t){let s,n;if(i===void 0||t===void 0){let o=e&&Ze(e);if(!o)i=e.clientWidth,t=e.clientHeight;else{let a=o.getBoundingClientRect(),r=Je(o),l=Bt(r,"border","width"),c=Bt(r,"padding");i=a.width-c.width-l.width,t=a.height-c.height-l.height,s=He(r.maxWidth,o,"clientWidth"),n=He(r.maxHeight,o,"clientHeight")}}return{width:i,height:t,maxWidth:s||Ve,maxHeight:n||Ve}}var kt=e=>Math.round(e*10)/10;function wn(e,i,t,s){let n=Je(e),o=Bt(n,"margin"),a=He(n.maxWidth,e,"clientWidth")||Ve,r=He(n.maxHeight,e,"clientHeight")||Ve,l=lr(e,i,t),{width:c,height:h}=l;if(n.boxSizing==="content-box"){let u=Bt(n,"border","width"),f=Bt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=kt(Math.min(c,a,l.maxWidth)),h=kt(Math.min(h,r,l.maxHeight)),c&&!h&&(h=kt(c/2)),(i!==void 0||t!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=kt(Math.floor(h*s))),{width:c,height:h}}function Ui(e,i,t){let s=i||1,n=kt(e.height*s),o=kt(e.width*s);e.height=kt(e.height),e.width=kt(e.width);let a=e.canvas;return a.style&&(t||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==s||a.height!==n||a.width!==o?(e.currentDevicePixelRatio=s,a.height=n,a.width=o,e.ctx.setTransform(s,0,0,s,0,0),!0):!1}var kn=(function(){let e=!1;try{let i={get passive(){return e=!0,!1}};Qe()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e})();function Xi(e,i){let t=nr(e,i),s=t&&t.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function wt(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function Pn(e,i,t,s){return{x:e.x+t*(i.x-e.x),y:s==="middle"?t<.5?e.y:i.y:s==="after"?t<1?e.y:i.y:t>0?i.y:e.y}}function Cn(e,i,t,s){let n={x:e.cp2x,y:e.cp2y},o={x:i.cp1x,y:i.cp1y},a=wt(e,n,t),r=wt(n,o,t),l=wt(o,i,t),c=wt(a,r,t),h=wt(r,l,t);return wt(c,h,t)}var cr=function(e,i){return{x(t){return e+e+i-t},setWidth(t){i=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,s){return t-s},leftForLtr(t,s){return t-s}}},hr=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,i){return e+i},leftForLtr(e,i){return e}}};function Wt(e,i,t){return e?cr(i,t):hr()}function qi(e,i){let t,s;(i==="ltr"||i==="rtl")&&(t=e.canvas.style,s=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=s)}function Ki(e,i){i!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function Dn(e){return e==="angle"?{between:te,compare:Ca,normalize:X}:{between:dt,compare:(i,t)=>i-t,normalize:i=>i}}function Qs({start:e,end:i,count:t,loop:s,style:n}){return{start:e%t,end:i%t,loop:s&&(i-e+1)%t===0,style:n}}function dr(e,i,t){let{property:s,start:n,end:o}=t,{between:a,normalize:r}=Dn(s),l=i.length,{start:c,end:h,loop:d}=e,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,y,b)&&r(n,y)!==0,_=()=>r(o,b)===0||l(o,y,b),v=()=>g||S(),w=()=>!g||_();for(let M=h,k=h;M<=d;++M)x=i[M%a],!x.skip&&(b=c(x[s]),b!==y&&(g=l(b,n,o),m===null&&v()&&(m=r(b,n)===0?M:k),m!==null&&w()&&(p.push(Qs({start:m,end:M,loop:u,count:a,style:f})),m=null),k=M,y=b));return m!==null&&p.push(Qs({start:m,end:d,loop:u,count:a,style:f})),p}function Qi(e,i){let t=[],s=e.segments;for(let n=0;nn&&e[o%i].skip;)o--;return o%=i,{start:n,end:o}}function fr(e,i,t,s){let n=e.length,o=[],a=i,r=e[i],l;for(l=i+1;l<=t;++l){let c=e[l%n];c.skip||c.stop?r.skip||(s=!1,o.push({start:i%n,end:(l-1)%n,loop:s}),i=a=c.stop?l:null):(a=l,r.skip&&(i=l)),r=c}return a!==null&&o.push({start:i%n,end:a%n,loop:s}),o}function An(e,i){let t=e.points,s=e.options.spanGaps,n=t.length;if(!n)return[];let o=!!e._loop,{start:a,end:r}=ur(t,n,o,s);if(s===!0)return Zs(e,[{start:a,end:r,loop:o}],t,i);let l=rr({chart:i,initial:t.initial,numSteps:a,currentStep:Math.min(s-t.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Ei.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;let o=s.items,a=o.length-1,r=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(i),r=!0):(o[a]=o[o.length-1],o.pop());r&&(n.draw(),this._notify(n,s,i,"progress")),o.length||(s.running=!1,this._notify(n,s,i,"complete"),s.initial=!1),t+=o.length}),this._lastDate=i,t===0&&(this._running=!1)}_getAnims(i){let t=this._charts,s=t.get(i);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,s)),s}listen(i,t,s){this._getAnims(i).listeners[t].push(s)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){let t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(i){if(!this._running)return!1;let t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){let t=this._charts.get(i);if(!t||!t.items.length)return;let s=t.items,n=s.length-1;for(;n>=0;--n)s[n].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}},yt=new hs,On="transparent",br={boolean(e,i,t){return t>.5?i:e},color(e,i,t){let s=Bi(e||On),n=s.valid&&Bi(i||On);return n&&n.valid?n.mix(s,t).hexString():i},number(e,i,t){return e+(i-e)*t}},ds=class{constructor(i,t,s,n){let o=t[s];n=se([i.to,n,o,i.from]);let a=se([i.from,o,n]);this._active=!0,this._fn=i.fn||br[i.type||typeof a],this._easing=qt[i.easing]||qt.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=s,this._from=a,this._to=n,this._promises=void 0}active(){return this._active}update(i,t,s){if(this._active){this._notify(!1);let n=this._target[this._prop],o=s-this._start,a=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(a,i.duration)),this._total+=o,this._loop=!!i.loop,this._to=se([i.to,t,n,i.from]),this._from=se([i.from,n,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){let t=i-this._start,s=this._duration,n=this._prop,o=this._from,a=this._loop,r=this._to,l;if(this._active=o!==r&&(a||t1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,r,l)}wait(){let i=this._promises||(this._promises=[]);return new Promise((t,s)=>{i.push({res:t,rej:s})})}_notify(i){let t=i?"res":"rej",s=this._promises||[];for(let n=0;n{let o=i[n];if(!O(o))return;let a={};for(let r of t)a[r]=o[r];(z(o.properties)&&o.properties||[n]).forEach(r=>{(r===n||!s.has(r))&&s.set(r,a)})})}_animateOptions(i,t){let s=t.options,n=_r(i,s);if(!n)return[];let o=this._createAnimations(n,s);return s.$shared&&xr(i.options.$animations,s).then(()=>{i.options=s},()=>{}),o}_createAnimations(i,t){let s=this._properties,n=[],o=i.$animations||(i.$animations={}),a=Object.keys(t),r=Date.now(),l;for(l=a.length-1;l>=0;--l){let c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(i,t));continue}let h=t[c],d=o[c],u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,r);continue}else d.cancel();if(!u||!u.duration){i[c]=h;continue}o[c]=d=new ds(u,i,c,h),n.push(d)}return n}update(i,t){if(this._properties.size===0){Object.assign(i,t);return}let s=this._createAnimations(i,t);if(s.length)return yt.add(this._chart,s),!0}};function xr(e,i){let t=[],s=Object.keys(i);for(let n=0;n0||!t&&o<0)return n.index}return null}function Rn(e,i){let{chart:t,_cachedMeta:s}=e,n=t._stacks||(t._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,c=a.axis,h=Mr(o,a,s),d=i.length,u;for(let f=0;ft[s].axis===i).shift()}function Pr(e,i){return _t(e,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})}function Cr(e,i,t){return _t(e,{active:!1,dataIndex:i,parsed:void 0,raw:void 0,element:t,index:i,mode:"default",type:"data"})}function xe(e,i){let t=e.controller.index,s=e.vScale&&e.vScale.axis;if(s){i=i||e._parsed;for(let n of i){let o=n._stacks;if(!o||o[s]===void 0||o[s][t]===void 0)return;delete o[s][t],o[s]._visualValues!==void 0&&o[s]._visualValues[t]!==void 0&&delete o[s]._visualValues[t]}}}var es=e=>e==="reset"||e==="none",In=(e,i)=>i?e:Object.assign({},e),Dr=(e,i,t)=>e&&!i.hidden&&i._stacked&&{keys:To(t,!0),values:null},Lt=(()=>{class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,s){this.chart=t,this._ctx=t.ctx,this.index=s,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ji(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&xe(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,s=this._cachedMeta,n=this.getDataset(),o=(u,f,p,g)=>u==="x"?f:u==="r"?g:p,a=s.xAxisID=P(n.xAxisID,ts(t,"x")),r=s.yAxisID=P(n.yAxisID,ts(t,"y")),l=s.rAxisID=P(n.rAxisID,ts(t,"r")),c=s.indexAxis,h=s.iAxisID=o(c,a,r,l),d=s.vAxisID=o(c,r,a,l);s.xScale=this.getScaleForId(a),s.yScale=this.getScaleForId(r),s.rScale=this.getScaleForId(l),s.iScale=this.getScaleForId(h),s.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let s=this._cachedMeta;return t===s.iScale?s.vScale:s.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Ti(this._data,this),t._stacked&&xe(t)}_dataCheck(){let t=this.getDataset(),s=t.data||(t.data=[]),n=this._data;if(O(s)){let o=this._cachedMeta;this._data=Sr(s,o)}else if(n!==s){if(n){Ti(n,this);let o=this._cachedMeta;xe(o),o._parsed=[]}s&&Object.isExtensible(s)&&dn(s,this),this._syncList=[],this._data=s}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let s=this._cachedMeta,n=this.getDataset(),o=!1;this._dataCheck();let a=s._stacked;s._stacked=Ji(s.vScale,s),s.stack!==n.stack&&(o=!0,xe(s),s.stack=n.stack),this._resyncElements(t),(o||a!==s._stacked)&&(Rn(this,s._parsed),s._stacked=Ji(s.vScale,s))}configure(){let t=this.chart.config,s=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),s,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,s){let{_cachedMeta:n,_data:o}=this,{iScale:a,_stacked:r}=n,l=a.axis,c=t===0&&s===o.length?!0:n._sorted,h=t>0&&n._parsed[t-1],d,u,f;if(this._parsing===!1)n._parsed=o,n._sorted=!0,f=o;else{z(o[t])?f=this.parseArrayData(n,o,t,s):O(o[t])?f=this.parseObjectData(n,o,t,s):f=this.parsePrimitiveData(n,o,t,s);let p=()=>u[l]===null||h&&u[l]m||u=0;--f)if(!g()){this.updateRangeFromParsed(h,t,p,c);break}}return h}getAllParsedValues(t){let s=this._cachedMeta._parsed,n=[],o,a,r;for(o=0,a=s.length;o=0&&tthis.getContext(n,o,s),m=h.resolveNamedOptions(f,p,g,u);return m.$shared&&(m.$shared=c,a[r]=Object.freeze(In(m,c))),m}_resolveAnimations(t,s,n){let o=this.chart,a=this._cachedDataOpts,r=`animation-${s}`,l=a[r];if(l)return l;let c;if(o.options.animation!==!1){let d=this.chart.config,u=d.datasetAnimationScopeKeys(this._type,s),f=d.getOptionScopes(this.getDataset(),u);c=d.createResolver(f,this.getContext(t,n,s))}let h=new li(o,c&&c.animations);return c&&c._cacheable&&(a[r]=Object.freeze(h)),h}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,s){return!s||es(t)||this.chart._animationsDisabled}_getSharedOptions(t,s){let n=this.resolveDataElementOptions(t,s),o=this._sharedOptions,a=this.getSharedOptions(n),r=this.includeOptions(s,a)||a!==o;return this.updateSharedOptions(a,s,n),{sharedOptions:a,includeOptions:r}}updateElement(t,s,n,o){es(o)?Object.assign(t,n):this._resolveAnimations(s,o).update(t,n)}updateSharedOptions(t,s,n){t&&!es(s)&&this._resolveAnimations(void 0,s).update(t,n)}_setStyle(t,s,n,o){t.active=o;let a=this.getStyle(s,o);this._resolveAnimations(s,n,o).update(t,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(t,s,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,s,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let s=this._data,n=this._cachedMeta.data;for(let[l,c,h]of this._syncList)this[l](c,h);this._syncList=[];let o=n.length,a=s.length,r=Math.min(a,o);r&&this.parse(0,r),a>o?this._insertElements(o,a-o,t):a{for(h.length+=s,l=h.length-1;l>=r;l--)h[l]=h[l-s]};for(c(a),l=t;ln-o))}return e._cache.$bar}function Or(e){let i=e.iScale,t=Ar(i,e.type),s=i._length,n,o,a,r,l=()=>{a===32767||a===-32768||(Zt(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(n=0,o=t.length;n0?n[e-1]:null,r=eMath.abs(r)&&(l=r,c=a),i[t.axis]=c,i._custom={barStart:l,barEnd:c,start:n,end:o,min:a,max:r}}function Lo(e,i,t,s){return z(e)?Er(e,i,t,s):i[t.axis]=t.parse(e,s),i}function Fn(e,i,t,s){let n=e.iScale,o=e.vScale,a=n.getLabels(),r=n===o,l=[],c,h,d,u;for(c=t,h=t+s;c=t?1:-1)}function Ir(e){let i,t,s,n,o;return e.horizontal?(i=e.base>e.x,t="left",s="right"):(i=e.base{class e extends Lt{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,s,n,o){return Fn(t,s,n,o)}parseArrayData(t,s,n,o){return Fn(t,s,n,o)}parseObjectData(t,s,n,o){let{iScale:a,vScale:r}=t,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,h=a.axis==="x"?l:c,d=r.axis==="x"?l:c,u=[],f,p,g,m;for(f=n,p=n+o;fd.controller.options.grouped),a=n.options.stacked,r=[],l=this._cachedMeta.controller.getParsed(s),c=l&&l[n.axis],h=d=>{let u=d._parsed.find(p=>p[n.axis]===c),f=u&&u[d.vScale.axis];if(A(f)||isNaN(f))return!0};for(let d of o)if(!(s!==void 0&&h(d))&&((a===!1||r.indexOf(d.stack)===-1||a===void 0&&d.stack===void 0)&&r.push(d.stack),d.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,s=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===s).shift()}_getAxis(){let t={},s=this.getFirstScaleIdForIndexAxis();for(let n of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,s)]=!0;return Object.keys(t)}_getStackIndex(t,s,n){let o=this._getStacks(t,n),a=s!==void 0?o.indexOf(s):-1;return a===-1?o.length-1:a}_getRuler(){let t=this.options,s=this._cachedMeta,n=s.iScale,o=[],a,r;for(a=0,r=s.data.length;a{class e extends Lt{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,s,n,o){let a=super.parsePrimitiveData(t,s,n,o);for(let r=0;r=0;--n)s=Math.max(s,t[n].size(this.resolveDataElementOptions(n))/2);return s>0&&s}getLabelAndValue(t){let s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:o,yScale:a}=s,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y),h=r._custom;return{label:n[t]||"",value:"("+l+", "+c+(h?", "+h:"")+")"}}update(t){let s=this._cachedMeta.data;this.updateElements(s,0,s.length,t)}updateElements(t,s,n,o){let a=o==="reset",{iScale:r,vScale:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(s,o),d=r.axis,u=l.axis;for(let f=s;fte(y,r,l,!0)?1:Math.max(S,S*t,_,_*t),p=(y,S,_)=>te(y,r,l,!0)?-1:Math.min(S,S*t,_,_*t),g=f(0,c,d),m=f(H,h,u),b=p(E,c,d),x=p(E+H,h,u);s=(g-b)/2,n=(m-x)/2,o=-(g+b)/2,a=-(m+x)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}var Ts=(()=>{class e extends Lt{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let s=t.data,{labels:{pointStyle:n,textAlign:o,color:a,useBorderRadius:r,borderRadius:l}}=t.legend.options;return s.labels.length&&s.datasets.length?s.labels.map((c,h)=>{let u=t.getDatasetMeta(0).controller.getStyle(h);return{text:c,fillStyle:u.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(h),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:o,pointStyle:n,borderRadius:r&&(l||u.borderRadius),index:h}}):[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}}};constructor(t,s){super(t,s),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,s){let n=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=n;else{let a=c=>+n[c];if(O(n[t])){let{key:c="value"}=this._parsing;a=h=>+xt(n[h],c)}let r,l;for(r=t,l=t+s;r0&&!isNaN(t)?B*(Math.abs(t)/s):0}getLabelAndValue(t){let s=this._cachedMeta,n=this.chart,o=n.data.labels||[],a=ee(s._parsed[t],n.options.locale);return{label:o[t]||"",value:a}}getMaxBorderWidth(t){let s=0,n=this.chart,o,a,r,l,c;if(!t){for(o=0,a=n.data.datasets.length;o{class e extends Lt{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let s=this._cachedMeta,{dataset:n,data:o=[],_dataset:a}=s,r=this.chart._animationsDisabled,{start:l,count:c}=Ii(s,o,r);this._drawStart=l,this._drawCount=c,Fi(s)&&(l=0,c=o.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=o;let h=this.resolveDatasetElementOptions(t);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(n,void 0,{animated:!r,options:h},t),this.updateElements(o,l,c,t)}updateElements(t,s,n,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,{sharedOptions:d,includeOptions:u}=this._getSharedOptions(s,o),f=r.axis,p=l.axis,{spanGaps:g,segment:m}=this.options,b=Vt(g)?g:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||o==="none",y=s+n,S=t.length,_=s>0&&this.getParsed(s-1);for(let v=0;v=y){M.skip=!0;continue}let k=this.getParsed(v),D=A(k[p]),C=M[f]=r.getPixelForValue(k[f],v),T=M[p]=a||D?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,k,c):k[p],v);M.skip=isNaN(C)||isNaN(T)||D,M.stop=v>0&&Math.abs(k[f]-_[f])>b,m&&(M.parsed=k,M.raw=h.data[v]),u&&(M.options=d||this.resolveDataElementOptions(v,w.active?"active":o)),x||this.updateElement(w,v,M,o),_=k}}getMaxOverflow(){let t=this._cachedMeta,s=t.dataset,n=s.options&&s.options.borderWidth||0,o=t.data||[];if(!o.length)return n;let a=o[0].size(this.resolveDataElementOptions(0)),r=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(n,a,r)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}return e})(),Eo=(()=>{class e extends Lt{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let s=t.data;if(s.labels.length&&s.datasets.length){let{labels:{pointStyle:n,color:o}}=t.legend.options;return s.labels.map((a,r)=>{let c=t.getDatasetMeta(0).controller.getStyle(r);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,s,n){n.chart.toggleDataVisibility(s.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,s){super(t,s),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let s=this._cachedMeta,n=this.chart,o=n.data.labels||[],a=ee(s._parsed[t].r,n.options.locale);return{label:o[t]||"",value:a}}parseObjectData(t,s,n,o){return Yi.bind(this)(t,s,n,o)}update(t){let s=this._cachedMeta.data;this._updateRadius(),this.updateElements(s,0,s.length,t)}getMinMax(){let t=this._cachedMeta,s={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((n,o)=>{let a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(as.max&&(s.max=a))}),s}_updateRadius(){let t=this.chart,s=t.chartArea,n=t.options,o=Math.min(s.right-s.left,s.bottom-s.top),a=Math.max(o/2,0),r=Math.max(n.cutoutPercentage?a/100*n.cutoutPercentage:1,0),l=(a-r)/t.getVisibleDatasetCount();this.outerRadius=a-l*this.index,this.innerRadius=this.outerRadius-l}updateElements(t,s,n,o){let a=o==="reset",r=this.chart,c=r.options.animation,h=this._cachedMeta.rScale,d=h.xCenter,u=h.yCenter,f=h.getIndexAngle(0)-.5*E,p=f,g,m=360/this.countVisibleElements();for(g=0;g{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&s++}),s}_computeAngle(t,s,n){return this.chart.getDataVisibility(t)?st(this.resolveDataElementOptions(t,s).angle||n):0}}return e})(),jr=(()=>{class e extends Ts{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}return e})(),$r=(()=>{class e extends Lt{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let s=this._cachedMeta.vScale,n=this.getParsed(t);return{label:s.getLabels()[t],value:""+s.getLabelForValue(n[s.axis])}}parseObjectData(t,s,n,o){return Yi.bind(this)(t,s,n,o)}update(t){let s=this._cachedMeta,n=s.dataset,o=s.data||[],a=s.iScale.getLabels();if(n.points=o,t!=="resize"){let r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);let l={_loop:!0,_fullLoop:a.length===o.length,options:r};this.updateElement(n,void 0,l,t)}this.updateElements(o,0,o.length,t)}updateElements(t,s,n,o){let a=this._cachedMeta.rScale,r=o==="reset";for(let l=s;l{class e extends Lt{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){let s=this._cachedMeta,n=this.chart.data.labels||[],{xScale:o,yScale:a}=s,r=this.getParsed(t),l=o.getLabelForValue(r.x),c=a.getLabelForValue(r.y);return{label:n[t]||"",value:"("+l+", "+c+")"}}update(t){let s=this._cachedMeta,{data:n=[]}=s,o=this.chart._animationsDisabled,{start:a,count:r}=Ii(s,n,o);if(this._drawStart=a,this._drawCount=r,Fi(s)&&(a=0,r=n.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:l,_dataset:c}=s;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=n;let h=this.resolveDatasetElementOptions(t);h.segment=this.options.segment,this.updateElement(l,void 0,{animated:!o,options:h},t)}else this.datasetElementType&&(delete s.dataset,this.datasetElementType=!1);this.updateElements(n,a,r,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,s,n,o){let a=o==="reset",{iScale:r,vScale:l,_stacked:c,_dataset:h}=this._cachedMeta,d=this.resolveDataElementOptions(s,o),u=this.getSharedOptions(d),f=this.includeOptions(o,u),p=r.axis,g=l.axis,{spanGaps:m,segment:b}=this.options,x=Vt(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||o==="none",S=s>0&&this.getParsed(s-1);for(let _=s;_0&&Math.abs(w[p]-S[p])>x,b&&(M.parsed=w,M.raw=h.data[_]),f&&(M.options=u||this.resolveDataElementOptions(_,v.active?"active":o)),y||this.updateElement(v,_,M,o),S=w}this.updateSharedOptions(u,o,d)}getMaxOverflow(){let t=this._cachedMeta,s=t.data||[];if(!this.options.showLine){let l=0;for(let c=s.length-1;c>=0;--c)l=Math.max(l,s[c].size(this.resolveDataElementOptions(c))/2);return l>0&&l}let n=t.dataset,o=n.options&&n.options.borderWidth||0;if(!s.length)return o;let a=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(o,a,r)/2}}return e})(),Ur=Object.freeze({__proto__:null,BarController:Nr,BubbleController:Vr,DoughnutController:Ts,LineController:Hr,PieController:jr,PolarAreaController:Eo,RadarController:$r,ScatterController:Yr});function Ht(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var us=class e{static override(i){Object.assign(e.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Ht()}parse(){return Ht()}format(){return Ht()}add(){return Ht()}diff(){return Ht()}startOf(){return Ht()}endOf(){return Ht()}},Xr={_date:us};function qr(e,i,t,s){let{controller:n,data:o,_sorted:a}=e,r=n._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(r&&i===r.axis&&i!=="r"&&a&&o.length){let c=r._reversePixels?ln:lt;if(s){if(n._sharedOptions){let h=o[0],d=typeof h.getRange=="function"&&h.getRange(i);if(d){let u=c(o,i,t-d),f=c(o,i,t+d);return{lo:u.lo,hi:f.hi}}}}else{let h=c(o,i,t);if(l){let{vScale:d}=n._cachedMeta,{_parsed:u}=e,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!A(g[d.axis]));h.lo-=Math.max(0,f);let p=u.slice(h.hi).findIndex(g=>!A(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function De(e,i,t,s,n){let o=e.getSortedVisibleDatasetMetas(),a=t[i];for(let r=0,l=o.length;r{l[a]&&l[a](i[t],n)&&(o.push({element:l,datasetIndex:c,index:h}),r=r||l.inRange(i.x,i.y,n))}),s&&!r?[]:o}var Zr={evaluateInteractionItems:De,modes:{index(e,i,t,s){let n=Ot(i,e),o=t.axis||"x",a=t.includeInvisible||!1,r=t.intersect?ss(e,n,o,s,a):ns(e,n,o,!1,s,a),l=[];return r.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let h=r[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(e,i,t,s){let n=Ot(i,e),o=t.axis||"xy",a=t.includeInvisible||!1,r=t.intersect?ss(e,n,o,s,a):ns(e,n,o,!1,s,a);if(r.length>0){let l=r[0].datasetIndex,c=e.getDatasetMeta(l).data;r=[];for(let h=0;ht.pos===i)}function Vn(e,i){return e.filter(t=>Ro.indexOf(t.pos)===-1&&t.box.axis===i)}function ye(e,i){return e.sort((t,s)=>{let n=i?s:t,o=i?t:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Jr(e){let i=[],t,s,n,o,a,r;for(t=0,s=(e||[]).length;tc.box.fullSize),!0),s=ye(_e(i,"left"),!0),n=ye(_e(i,"right")),o=ye(_e(i,"top"),!0),a=ye(_e(i,"bottom")),r=Vn(i,"x"),l=Vn(i,"y");return{fullSize:t,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:_e(i,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}function Wn(e,i,t,s){return Math.max(e[t],i[t])+Math.max(e[s],i[s])}function Io(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function sl(e,i,t,s){let{pos:n,box:o}=t,a=e.maxPadding;if(!O(n)){t.size&&(e[n]-=t.size);let d=s[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?o.height:o.width),t.size=d.size/d.count,e[n]+=t.size}o.getPadding&&Io(a,o.getPadding());let r=Math.max(0,i.outerWidth-Wn(a,e,"left","right")),l=Math.max(0,i.outerHeight-Wn(a,e,"top","bottom")),c=r!==e.w,h=l!==e.h;return e.w=r,e.h=l,t.horizontal?{same:c,other:h}:{same:h,other:c}}function nl(e){let i=e.maxPadding;function t(s){let n=Math.max(i[s]-e[s],0);return e[s]+=n,n}e.y+=t("top"),e.x+=t("left"),t("right"),t("bottom")}function ol(e,i){let t=i.maxPadding;function s(n){let o={left:0,top:0,right:0,bottom:0};return n.forEach(a=>{o[a]=Math.max(i[a],t[a])}),o}return s(e?["left","right"]:["top","bottom"])}function Me(e,i,t,s){let n=[],o,a,r,l,c,h;for(o=0,a=e.length,c=0;o{typeof g.beforeLayout=="function"&&g.beforeLayout()});let h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:i,outerHeight:t,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},n);Io(u,K(s));let f=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),p=el(l.concat(c),d);Me(r.fullSize,f,d,p),Me(l,f,d,p),Me(c,f,d,p)&&Me(l,f,d,p),nl(f),Hn(r.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Hn(r.rightAndBottom,f,d,p),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(r.chartArea,g=>{let m=g.box;Object.assign(m,e.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}},ci=class{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,s){}removeEventListener(i,t,s){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,s,n){return t=Math.max(0,t||i.width),s=s||i.height,{width:t,height:Math.max(0,n?Math.floor(t/n):s)}}isAttached(i){return!0}updateConfig(i){}},fs=class extends ci{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}},ai="$chartjs",al={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jn=e=>e===null||e==="";function rl(e,i){let t=e.style,s=e.getAttribute("height"),n=e.getAttribute("width");if(e[ai]={initial:{height:s,width:n,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",jn(n)){let o=Xi(e,"width");o!==void 0&&(e.width=o)}if(jn(s))if(e.style.height==="")e.height=e.width/(i||2);else{let o=Xi(e,"height");o!==void 0&&(e.height=o)}return e}var Fo=kn?{passive:!0}:!1;function ll(e,i,t){e&&e.addEventListener(i,t,Fo)}function cl(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,Fo)}function hl(e,i){let t=al[e.type]||e.type,{x:s,y:n}=Ot(e,i);return{type:t,chart:i,native:e,x:s!==void 0?s:null,y:n!==void 0?n:null}}function hi(e,i){for(let t of e)if(t===i||t.contains(i))return!0}function dl(e,i,t){let s=e.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||hi(r.addedNodes,s),a=a&&!hi(r.removedNodes,s);a&&t()});return n.observe(document,{childList:!0,subtree:!0}),n}function ul(e,i,t){let s=e.canvas,n=new MutationObserver(o=>{let a=!1;for(let r of o)a=a||hi(r.removedNodes,s),a=a&&!hi(r.addedNodes,s);a&&t()});return n.observe(document,{childList:!0,subtree:!0}),n}var ke=new Map,$n=0;function zo(){let e=window.devicePixelRatio;e!==$n&&($n=e,ke.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function fl(e,i){ke.size||window.addEventListener("resize",zo),ke.set(e,i)}function gl(e){ke.delete(e),ke.size||window.removeEventListener("resize",zo)}function pl(e,i,t){let s=e.canvas,n=s&&Ze(s);if(!n)return;let o=Ri((r,l)=>{let c=n.clientWidth;t(r,l),c{let l=r[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return a.observe(n),fl(e,o),a}function os(e,i,t){t&&t.disconnect(),i==="resize"&&gl(e)}function ml(e,i,t){let s=e.canvas,n=Ri(o=>{e.ctx!==null&&t(hl(o,e))},e);return ll(s,i,n),n}var gs=class extends ci{acquireContext(i,t){let s=i&&i.getContext&&i.getContext("2d");return s&&s.canvas===i?(rl(i,t),s):null}releaseContext(i){let t=i.canvas;if(!t[ai])return!1;let s=t[ai].initial;["height","width"].forEach(o=>{let a=s[o];A(a)?t.removeAttribute(o):t.setAttribute(o,a)});let n=s.style||{};return Object.keys(n).forEach(o=>{t.style[o]=n[o]}),t.width=t.width,delete t[ai],!0}addEventListener(i,t,s){this.removeEventListener(i,t);let n=i.$proxies||(i.$proxies={}),a={attach:dl,detach:ul,resize:pl}[t]||ml;n[t]=a(i,t,s)}removeEventListener(i,t){let s=i.$proxies||(i.$proxies={}),n=s[t];if(!n)return;({attach:os,detach:os,resize:os}[t]||cl)(i,t,n),s[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,s,n){return wn(i,t,s,n)}isAttached(i){let t=i&&Ze(i);return!!(t&&t.isConnected)}};function bl(e){return!Qe()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?fs:gs}var at=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){let{x:t,y:s}=this.getProps(["x","y"],i);return{x:t,y:s}}hasValue(){return Vt(this.x)&&Vt(this.y)}getProps(i,t){let s=this.$animations;if(!t||!s)return this;let n={};return i.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};function xl(e,i){let t=e.options.ticks,s=_l(e),n=Math.min(t.maxTicksLimit||s,s),o=t.major.enabled?vl(i):[],a=o.length,r=o[0],l=o[a-1],c=[];if(a>n)return Sl(i,c,o,a/n),c;let h=yl(o,i,n);if(a>0){let d,u,f=a>1?Math.round((l-r)/(a-1)):null;for(ei(i,c,h,A(f)?0:r-f,r),d=0,u=a-1;dn)return l}return Math.max(n,1)}function vl(e){let i=[],t,s;for(t=0,s=e.length;te==="left"?"right":e==="right"?"left":e,Yn=(e,i,t)=>i==="top"||i==="left"?e[i]+t:e[i]-t,Un=(e,i)=>Math.min(i||e,e);function Xn(e,i){let t=[],s=e.length/i,n=e.length,o=0;for(;oa+r)))return l}function Pl(e,i){R(e,t=>{let s=t.gc,n=s.length/2,o;if(n>i){for(o=0;os?s:t,s=n&&t>s?t:s,{min:Z(t,Z(s,t)),max:Z(s,Z(t,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){F(this.options.beforeUpdate,[this])}update(i,t,s){let{beginAtZero:n,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=xn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=r=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}let h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);r=i.offset?this.maxWidth/s:f/(s-1),d+6>r&&(r=f/(s-(i.offset?.5:1)),l=this.maxHeight-ve(i.grid)-t.padding-qn(i.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),a=$e(Math.min(Math.asin(Y((h.highest.height+6)/r,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),a=Math.max(n,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){F(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){F(this.options.beforeFit,[this])}fit(){let i={width:0,height:0},{chart:t,options:{ticks:s,title:n,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){let l=qn(n,t.options.font);if(r?(i.width=this.maxWidth,i.height=ve(o)+l):(i.height=this.maxHeight,i.width=ve(o)+l),s.display&&this.ticks.length){let{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=st(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(r){let b=s.mirror?0:m*d.width+g*u.height;i.height=Math.min(this.maxHeight,i.height+b+f)}else{let b=s.mirror?0:g*d.width+m*u.height;i.width=Math.min(this.maxWidth,i.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,s,n){let{ticks:{align:o,padding:a},position:r}=this.options,l=this.labelRotation!==0,c=r!=="top"&&this.axis==="x";if(this.isHorizontal()){let h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),u=0,f=0;l?c?(u=n*i.width,f=s*t.height):(u=s*i.height,f=n*t.width):o==="start"?f=t.width:o==="end"?u=i.width:o!=="inner"&&(u=i.width/2,f=t.width/2),this.paddingLeft=Math.max((u-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+a)*this.width/(this.width-d),0)}else{let h=t.height/2,d=i.height/2;o==="start"?(h=0,d=i.height):o==="end"&&(h=t.height,d=0),this.paddingTop=h+a,this.paddingBottom=d+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){F(this.options.afterFit,[this])}isHorizontal(){let{axis:i,position:t}=this.options;return t==="top"||t==="bottom"||i==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){this.beforeTickToLabelConversion(),this.generateTickLabels(i);let t,s;for(t=0,s=i.length;t({width:a[k]||0,height:r[k]||0});return{first:M(0),last:M(t-1),widest:M(v),highest:M(w),widths:a,heights:r}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){let t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);let t=this._startPixel+i*this._length;return rn(this._alignToPixels?Ct(this.chart,t,0):t)}getDecimalForPixel(i){let t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){let t=this.ticks||[];if(i>=0&&ir*n?r/s:l/n:l*n0}_computeGridLineItems(i){let t=this.axis,s=this.chart,n=this.options,{grid:o,position:a,border:r}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=ve(o),f=[],p=r.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(V){return Ct(s,V,g)},x,y,S,_,v,w,M,k,D,C,T,U;if(a==="top")x=b(this.bottom),w=this.bottom-u,k=x-m,C=b(i.top)+m,U=i.bottom;else if(a==="bottom")x=b(this.top),C=i.top,U=b(i.bottom)-m,w=x+m,k=this.top+u;else if(a==="left")x=b(this.right),v=this.right-u,M=x-m,D=b(i.left)+m,T=i.right;else if(a==="right")x=b(this.left),D=i.left,T=b(i.right)-m,v=x+m,M=this.left+u;else if(t==="x"){if(a==="center")x=b((i.top+i.bottom)/2+.5);else if(O(a)){let V=Object.keys(a)[0],j=a[V];x=b(this.chart.scales[V].getPixelForValue(j))}C=i.top,U=i.bottom,w=x+m,k=w+u}else if(t==="y"){if(a==="center")x=b((i.left+i.right)/2);else if(O(a)){let V=Object.keys(a)[0],j=a[V];x=b(this.chart.scales[V].getPixelForValue(j))}v=x-m,M=v-u,D=i.left,T=i.right}let et=P(n.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/et));for(y=0;y0&&(Rt-=Et/2);break}Ae={left:Rt,top:le,width:Et+Ut.width,height:re+Ut.height,color:I.backdropColor}}m.push({label:S,font:k,textOffset:T,options:{rotation:g,color:j,strokeColor:nt,strokeWidth:G,textAlign:Yt,textBaseline:U,translation:[_,v],backdrop:Ae}})}return m}_getXAxisLabelAlignment(){let{position:i,ticks:t}=this.options;if(-st(this.labelRotation))return i==="top"?"left":"right";let n="center";return t.align==="start"?n="left":t.align==="end"?n="right":t.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(i){let{position:t,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,a=this._getLabelSizes(),r=i+o,l=a.widest.width,c,h;return t==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-r,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):t==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+r,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;let i=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:i.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:i.width}}drawBackground(){let{ctx:i,options:{backgroundColor:t},left:s,top:n,width:o,height:a}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(s,n,o,a),i.restore())}getLineWidthForValue(i){let t=this.options.grid;if(!this._isVisible()||!t.display)return 0;let n=this.ticks.findIndex(o=>o.value===i);return n>=0?t.setContext(this.getContext(n)).lineWidth:0}drawGrid(i){let t=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i)),o,a,r=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(t.display)for(o=0,a=n.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:t,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(i){let t=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[],o,a;for(o=0,a=t.length;o{let s=t.split("."),n=s.pop(),o=[e].concat(s).join("."),a=i[t].split("."),r=a.pop(),l=a.join(".");N.route(o,n,l,r)})}function El(e){return"id"in e&&"defaults"in e}var ps=class{constructor(){this.controllers=new oe(Lt,"datasets",!0),this.elements=new oe(at,"elements"),this.plugins=new oe(Object,"plugins"),this.scales=new oe($t,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,s){[...t].forEach(n=>{let o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(i,o,n):R(n,a=>{let r=s||this._getRegistryForType(a);this._exec(i,r,a)})})}_exec(i,t,s){let n=je(i);F(s["before"+n],[],s),t[i](s),F(s["after"+n],[],s)}_getRegistryForType(i){for(let t=0;to.filter(r=>!a.some(l=>r.plugin.id===l.plugin.id));this._notify(n(t,s),i,"stop"),this._notify(n(s,t),i,"start")}};function Rl(e){let i={},t=[],s=Object.keys(ft.plugins.items);for(let o=0;o1&&Kn(e[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Gn(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function Wl(e,i){if(i.data&&i.data.datasets){let t=i.data.datasets.filter(s=>s.xAxisID===e||s.yAxisID===e);if(t.length)return Gn(e,"x",t[0])||Gn(e,"y",t[0])}return{}}function Hl(e,i){let t=Pt[e.type]||{scales:{}},s=i.scales||{},n=bs(e.type,i),o=Object.create(null);return Object.keys(s).forEach(a=>{let r=s[a];if(!O(r))return console.error(`Invalid scale configuration for scale: ${a}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let l=xs(a,r,Wl(a,e),N.scales[r.type]),c=Nl(l,n),h=t.scales||{};o[a]=Qt(Object.create(null),[{axis:l},r,h[l],h[c]])}),e.data.datasets.forEach(a=>{let r=a.type||e.type,l=a.indexAxis||bs(r,i),h=(Pt[r]||{}).scales||{};Object.keys(h).forEach(d=>{let u=Bl(d,l),f=a[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Qt(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(a=>{let r=o[a];Qt(r,[N.scales[r.type],N.scale])}),o}function Bo(e){let i=e.options||(e.options={});i.plugins=P(i.plugins,{}),i.scales=Hl(e,i)}function No(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function jl(e){return e=e||{},e.data=No(e.data),Bo(e),e}var Qn=new Map,Vo=new Set;function ii(e,i){let t=Qn.get(e);return t||(t=i(),Qn.set(e,t),Vo.add(t)),t}var Se=(e,i,t)=>{let s=xt(i,t);s!==void 0&&e.add(s)},_s=class{constructor(i){this._config=jl(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=No(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){let i=this._config;this.clearCache(),Bo(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return ii(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return ii(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return ii(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){let t=i.id,s=this.type;return ii(`${s}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){let s=this._scopeCache,n=s.get(i);return(!n||t)&&(n=new Map,s.set(i,n)),n}getOptionScopes(i,t,s){let{options:n,type:o}=this,a=this._cachedScopes(i,s),r=a.get(t);if(r)return r;let l=new Set;t.forEach(h=>{i&&(l.add(i),h.forEach(d=>Se(l,i,d))),h.forEach(d=>Se(l,n,d)),h.forEach(d=>Se(l,Pt[o]||{},d)),h.forEach(d=>Se(l,N,d)),h.forEach(d=>Se(l,Xe,d))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Vo.has(t)&&a.set(t,c),c}chartOptionScopes(){let{options:i,type:t}=this;return[i,Pt[t]||{},N.datasets[t]||{},{type:t},N,Xe]}resolveNamedOptions(i,t,s,n=[""]){let o={$shared:!0},{resolver:a,subPrefixes:r}=Zn(this._resolverCache,i,n),l=a;if(Yl(a,t)){o.$shared=!1,s=mt(s)?s():s;let c=this.createResolver(i,s,r);l=Nt(a,s,c)}for(let c of t)o[c]=l[c];return o}createResolver(i,t,s=[""],n){let{resolver:o}=Zn(this._resolverCache,i,s);return O(t)?Nt(o,t,void 0,n):o}};function Zn(e,i,t){let s=e.get(i);s||(s=new Map,e.set(i,s));let n=t.join(),o=s.get(n);return o||(o={resolver:Ge(i,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},s.set(n,o)),o}var $l=e=>O(e)&&Object.getOwnPropertyNames(e).some(i=>mt(e[i]));function Yl(e,i){let{isScriptable:t,isIndexable:s}=Hi(e);for(let n of i){let o=t(n),a=s(n),r=(a||o)&&e[n];if(o&&(mt(r)||$l(r))||a&&z(r))return!0}return!1}var Ul="4.5.1",Xl=["top","bottom","left","right","chartArea"];function Jn(e,i){return e==="top"||e==="bottom"||Xl.indexOf(e)===-1&&i==="x"}function to(e,i){return function(t,s){return t[e]===s[e]?t[i]-s[i]:t[e]-s[e]}}function eo(e){let i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),F(t&&t.onComplete,[e],i)}function ql(e){let i=e.chart,t=i.options.animation;F(t&&t.onProgress,[e],i)}function Wo(e){return Qe()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var ri={},io=e=>{let i=Wo(e);return Object.values(ri).filter(t=>t.canvas===i).pop()};function Kl(e,i,t){let s=Object.keys(e);for(let n of s){let o=+n;if(o>=i){let a=e[n];delete e[n],(t>0||o>i)&&(e[o+t]=a)}}}function Gl(e,i,t,s){return!t||e.type==="mouseout"?null:s?i:e}var Ql=(()=>{class e{static defaults=N;static instances=ri;static overrides=Pt;static registry=ft;static version=Ul;static getChart=io;static register(...t){ft.add(...t),so()}static unregister(...t){ft.remove(...t),so()}constructor(t,s){let n=this.config=new _s(s),o=Wo(t),a=io(o);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");let r=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||bl(o)),this.platform.updateConfig(n);let l=this.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;if(this.id=tn(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ms,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=un(u=>this.update(u),r.resizeDelay||0),this._dataChanges=[],ri[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}yt.listen(this,"complete",eo),yt.listen(this,"progress",ql),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:s},width:n,height:o,_aspectRatio:a}=this;return A(t)?s&&a?a:o?n/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ft}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ui(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ni(this.canvas,this.ctx),this}stop(){return yt.stop(this),this}resize(t,s){yt.running(this)?this._resizeBeforeDraw={width:t,height:s}:this._resize(t,s)}_resize(t,s){let n=this.options,o=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(o,t,s,a),l=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ui(this,l,!0)&&(this.notifyPlugins("resize",{size:r}),F(n.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let s=this.options.scales||{};R(s,(n,o)=>{n.id=o})}buildOrUpdateScales(){let t=this.options,s=t.scales,n=this.scales,o=Object.keys(n).reduce((r,l)=>(r[l]=!1,r),{}),a=[];s&&(a=a.concat(Object.keys(s).map(r=>{let l=s[r],c=xs(r,l),h=c==="r",d=c==="x";return{options:l,dposition:h?"chartArea":d?"bottom":"left",dtype:h?"radialLinear":d?"category":"linear"}}))),R(a,r=>{let l=r.options,c=l.id,h=xs(c,l),d=P(l.type,r.dtype);(l.position===void 0||Jn(l.position,h)!==Jn(r.dposition))&&(l.position=r.dposition),o[c]=!0;let u=null;if(c in n&&n[c].type===d)u=n[c];else{let f=ft.getScale(d);u=new f({id:c,type:d,ctx:this.ctx,chart:this}),n[u.id]=u}u.init(l,t)}),R(o,(r,l)=>{r||delete n[l]}),R(n,r=>{Q.configure(this,r,r.options),Q.addBox(this,r)})}_updateMetasets(){let t=this._metasets,s=this.data.datasets.length,n=t.length;if(t.sort((o,a)=>o.index-a.index),n>s){for(let o=s;os.length&&delete this._stacks,t.forEach((n,o)=>{s.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(o)})}buildOrUpdateControllers(){let t=[],s=this.data.datasets,n,o;for(this._removeUnreferencedMetasets(),n=0,o=s.length;n{this.getDatasetMeta(s).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let s=this.config;s.update();let n=this._options=s.createResolver(s.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let h=0,d=this.data.datasets.length;h{h.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(to("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){R(this.scales,t=>{Q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,s=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!Pi(s,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,s=this._getUniformDataChanges()||[];for(let{method:n,start:o,count:a}of s){let r=n==="_removeElements"?-a:a;Kl(t,o,r)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let s=this.data.datasets.length,n=a=>new Set(t.filter(r=>r[0]===a).map((r,l)=>l+","+r.splice(1).join(","))),o=n(0);for(let a=1;aa.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Q.update(this,this.width,this.height,t);let s=this.chartArea,n=s.width<=0||s.height<=0;this._layers=[],R(this.boxes,o=>{n&&o.position==="chartArea"||(o.configure&&o.configure(),this._layers.push(...o._layers()))},this),this._layers.forEach((o,a)=>{o._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let s=0,n=this.data.datasets.length;s=0;--s)this._drawDataset(t[s]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let s=this.ctx,n={meta:t,index:t.index,cancelable:!0},o=Zi(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(o&&me(s,o),t.controller.draw(),o&&be(s),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return ct(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,s,n,o){let a=Zr.modes[s];return typeof a=="function"?a(this,t,n,o):[]}getDatasetMeta(t){let s=this.data.datasets[t],n=this._metasets,o=n.filter(a=>a&&a._dataset===s).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:s&&s.order||0,index:t,_dataset:s,_parsed:[],_sorted:!1},n.push(o)),o}getContext(){return this.$context||(this.$context=_t(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let s=this.data.datasets[t];if(!s)return!1;let n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!s.hidden}setDatasetVisibility(t,s){let n=this.getDatasetMeta(t);n.hidden=!s}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,s,n){let o=n?"show":"hide",a=this.getDatasetMeta(t),r=a.controller._resolveAnimations(void 0,o);Zt(s)?(a.data[s].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),r.update(a,{visible:n}),this.update(l=>l.datasetIndex===t?o:void 0))}hide(t,s){this._updateVisibility(t,s,!1)}show(t,s){this._updateVisibility(t,s,!0)}_destroyDatasetMeta(t){let s=this._metasets[t];s&&s.controller&&s.controller._destroy(),delete this._metasets[t]}_stop(){let t,s;for(this.stop(),yt.remove(this),t=0,s=this.data.datasets.length;t{s.addEventListener(this,a,r),t[a]=r},o=(a,r,l)=>{a.offsetX=r,a.offsetY=l,this._eventHandler(a)};R(this.options.events,a=>n(a,o))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,s=this.platform,n=(c,h)=>{s.addEventListener(this,c,h),t[c]=h},o=(c,h)=>{t[c]&&(s.removeEventListener(this,c,h),delete t[c])},a=(c,h)=>{this.canvas&&this.resize(c,h)},r,l=()=>{o("attach",l),this.attached=!0,this.resize(),n("resize",a),n("detach",r)};r=()=>{this.attached=!1,o("resize",a),this._stop(),this._resize(0,0),n("attach",l)},s.isAttached(this.canvas)?l():r()}unbindEvents(){R(this._listeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._listeners={},R(this._responsiveListeners,(t,s)=>{this.platform.removeEventListener(this,s,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,s,n){let o=n?"set":"remove",a,r,l,c;for(s==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+o+"DatasetHoverStyle"]()),l=0,c=t.length;l{let l=this.getDatasetMeta(a);if(!l)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:l.data[r],index:r}});!ge(n,s)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,s))}notifyPlugins(t,s,n){return this._plugins.notify(this,t,s,n)}isPluginEnabled(t){return this._plugins._cache.filter(s=>s.plugin.id===t).length===1}_updateHoverStyles(t,s,n){let o=this.options.hover,a=(c,h)=>c.filter(d=>!h.some(u=>d.datasetIndex===u.datasetIndex&&d.index===u.index)),r=a(s,t),l=n?t:a(t,s);r.length&&this.updateHoverStyle(r,o.mode,!1),l.length&&o.mode&&this.updateHoverStyle(l,o.mode,!0)}_eventHandler(t,s){let n={event:t,replay:s,cancelable:!0,inChartArea:this.isPointInArea(t)},o=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,o)===!1)return;let a=this._handleEvent(t,s,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,o),(a||n.changed)&&this.render(),this}_handleEvent(t,s,n){let{_active:o=[],options:a}=this,r=s,l=this._getActiveElements(t,o,n,r),c=nn(t),h=Gl(t,this._lastEvent,n,c);n&&(this._lastEvent=null,F(a.onHover,[t,l,this],this),c&&F(a.onClick,[t,l,this],this));let d=!ge(l,o);return(d||s)&&(this._active=l,this._updateHoverStyles(l,o,s)),this._lastEvent=h,d}_getActiveElements(t,s,n,o){if(t.type==="mouseout")return[];if(!n)return s;let a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,o)}}return e})();function so(){return R(Ql.instances,e=>e._plugins.invalidate())}function Zl(e,i,t){let{startAngle:s,x:n,y:o,outerRadius:a,innerRadius:r,options:l}=i,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/a,X(s-t));if(e.beginPath(),e.arc(n,o,a-c/2,s+d/2,t-d/2),r>0){let u=Math.min(c/r,X(s-t));e.arc(n,o,r+c/2,t-u/2,s+u/2,!0)}else{let u=Math.min(c/2,a*X(s-t));if(h==="round")e.arc(n,o,u,t-E/2,s+E/2,!0);else if(h==="bevel"){let f=2*u*u,p=-f*Math.cos(t+E/2)+n,g=-f*Math.sin(t+E/2)+o,m=f*Math.cos(s+E/2)+n,b=f*Math.sin(s+E/2)+o;e.lineTo(p,g),e.lineTo(m,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Jl(e,i,t){let{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=i,c=n/r;e.beginPath(),e.arc(o,a,r,s-c,t+c),l>n?(c=n/l,e.arc(o,a,l,t+c,s-c,!0)):e.arc(o,a,n,t+H,s-H),e.closePath(),e.clip()}function tc(e){return Ke(e,["outerStart","outerEnd","innerStart","innerEnd"])}function ec(e,i,t,s){let n=tc(e.options.borderRadius),o=(t-i)/2,a=Math.min(o,s*i/2),r=l=>{let c=(t-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Y(n.innerStart,0,a),innerEnd:Y(n.innerEnd,0,a)}}function ne(e,i,t,s){return{x:t+e*Math.cos(i),y:s+e*Math.sin(i)}}function di(e,i,t,s,n,o){let{x:a,y:r,startAngle:l,pixelMargin:c,innerRadius:h}=i,d=Math.max(i.outerRadius+s+t-c,0),u=h>0?h+s+t+c:0,f=0,p=n-l;if(s){let I=h>0?h-s:0,V=d>0?d-s:0,j=(I+V)/2,nt=j!==0?p*j/(j+s):p;f=(p-nt)/2}let g=Math.max(.001,p*d-t/E)/d,m=(p-g)/2,b=l+m+f,x=n-m-f,{outerStart:y,outerEnd:S,innerStart:_,innerEnd:v}=ec(i,u,d,x-b),w=d-y,M=d-S,k=b+y/w,D=x-S/M,C=u+_,T=u+v,U=b+_/C,et=x-v/T;if(e.beginPath(),o){let I=(k+D)/2;if(e.arc(a,r,d,k,I),e.arc(a,r,d,I,D),S>0){let G=ne(M,D,a,r);e.arc(G.x,G.y,S,D,x+H)}let V=ne(T,x,a,r);if(e.lineTo(V.x,V.y),v>0){let G=ne(T,et,a,r);e.arc(G.x,G.y,v,x+H,et+Math.PI)}let j=(x-v/u+(b+_/u))/2;if(e.arc(a,r,u,x-v/u,j,!0),e.arc(a,r,u,j,b+_/u,!0),_>0){let G=ne(C,U,a,r);e.arc(G.x,G.y,_,U+Math.PI,b-H)}let nt=ne(w,b,a,r);if(e.lineTo(nt.x,nt.y),y>0){let G=ne(w,k,a,r);e.arc(G.x,G.y,y,b-H,k)}}else{e.moveTo(a,r);let I=Math.cos(k)*d+a,V=Math.sin(k)*d+r;e.lineTo(I,V);let j=Math.cos(D)*d+a,nt=Math.sin(D)*d+r;e.lineTo(j,nt)}e.closePath()}function ic(e,i,t,s,n){let{fullCircles:o,startAngle:a,circumference:r}=i,l=i.endAngle;if(o){di(e,i,t,s,l,n);for(let c=0;c=E&&f===0&&h!=="miter"&&Zl(e,i,g),o||(di(e,i,t,s,g,n),e.stroke())}var ys=class extends at{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:i=>i!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,t,s){let n=this.getProps(["x","y"],s),{angle:o,distance:a}=Oi(n,{x:i,y:t}),{startAngle:r,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-r),p=te(o,r,l)&&r!==l,g=f>=B||p,m=dt(a,c+u,h+u);return g&&m}getCenterPoint(i){let{x:t,y:s,startAngle:n,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(a+r+c+l)/2;return{x:t+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){let{options:t,circumference:s}=this,n=(t.offset||0)/4,o=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=s>B?Math.floor(s/B):0,s===0||this.innerRadius<0||this.outerRadius<0)return;i.save();let r=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(r)*n,Math.sin(r)*n);let l=1-Math.sin(Math.min(E,s||0)),c=n*l;i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,ic(i,this,c,o,a),sc(i,this,c,o,a),i.restore()}};function Ho(e,i,t=i){e.lineCap=P(t.borderCapStyle,i.borderCapStyle),e.setLineDash(P(t.borderDash,i.borderDash)),e.lineDashOffset=P(t.borderDashOffset,i.borderDashOffset),e.lineJoin=P(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=P(t.borderWidth,i.borderWidth),e.strokeStyle=P(t.borderColor,i.borderColor)}function nc(e,i,t){e.lineTo(t.x,t.y)}function oc(e){return e.stepped?mn:e.tension||e.cubicInterpolationMode==="monotone"?bn:nc}function jo(e,i,t={}){let s=e.length,{start:n=0,end:o=s-1}=t,{start:a,end:r}=i,l=Math.max(n,a),c=Math.min(o,r),h=nr&&o>r;return{count:s,start:l,loop:i.loop,ilen:c(a+(c?r-S:S))%o,y=()=>{g!==m&&(e.lineTo(h,m),e.lineTo(h,g),e.lineTo(h,b))};for(l&&(f=n[x(0)],e.moveTo(f.x,f.y)),u=0;u<=r;++u){if(f=n[x(u)],f.skip)continue;let S=f.x,_=f.y,v=S|0;v===p?(_m&&(m=_),h=(d*h+S)/++d):(y(),e.lineTo(S,_),p=v,d=0,g=m=_),b=_}y()}function vs(e){let i=e.options,t=i.borderDash&&i.borderDash.length;return!e._decimated&&!e._loop&&!i.tension&&i.cubicInterpolationMode!=="monotone"&&!i.stepped&&!t?rc:ac}function lc(e){return e.stepped?Pn:e.tension||e.cubicInterpolationMode==="monotone"?Cn:wt}function cc(e,i,t,s){let n=i._path;n||(n=i._path=new Path2D,i.path(n,t,s)&&n.closePath()),Ho(e,i.options),e.stroke(n)}function hc(e,i,t,s){let{segments:n,options:o}=i,a=vs(i);for(let r of n)Ho(e,o,r.style),e.beginPath(),a(e,i,r,{start:t,end:t+s-1})&&e.closePath(),e.stroke()}var dc=typeof Path2D=="function";function uc(e,i,t,s){dc&&!i.options.segment?cc(e,i,t,s):hc(e,i,t,s)}var gi=(()=>{class e extends at{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,s){let n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){let o=n.spanGaps?this._loop:this._fullLoop;Mn(this._points,n,t,o,s),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=An(this,this.options.segment))}first(){let t=this.segments,s=this.points;return t.length&&s[t[0].start]}last(){let t=this.segments,s=this.points,n=t.length;return n&&s[t[n-1].end]}interpolate(t,s){let n=this.options,o=t[s],a=this.points,r=Qi(this,{property:s,start:o,end:o});if(!r.length)return;let l=[],c=lc(n),h,d;for(h=0,d=r.length;h{class e extends at{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,s,n){let o=this.options,{x:a,y:r}=this.getProps(["x","y"],n);return Math.pow(t-a,2)+Math.pow(s-r,2)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Yo(e){return Ms[e%Ms.length]}function Uo(e){return oo[e%oo.length]}function yc(e,i){return e.borderColor=Yo(i),e.backgroundColor=Uo(i),++i}function vc(e,i){return e.backgroundColor=e.data.map(()=>Yo(i++)),i}function Sc(e,i){return e.backgroundColor=e.data.map(()=>Uo(i++)),i}function Mc(e){let i=0;return(t,s)=>{let n=e.getDatasetMeta(s).controller;n instanceof Ts?i=vc(t,i):n instanceof Eo?i=Sc(t,i):n&&(i=yc(t,i))}}function ao(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}function wc(e){return e&&(e.borderColor||e.backgroundColor)}function kc(){return N.borderColor!=="rgba(0,0,0,0.1)"||N.backgroundColor!=="rgba(0,0,0,0.1)"}var Pc={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;let{data:{datasets:s},options:n}=e.config,{elements:o}=n,a=ao(s)||wc(n)||o&&ao(o)||kc();if(!t.forceOverride&&a)return;let r=Mc(e);s.forEach(r)}};function Cc(e,i,t,s,n){let o=n.samples||s;if(o>=t)return e.slice(i,i+t);let a=[],r=(t-2)/(o-2),l=0,c=i+t-1,h=i,d,u,f,p,g;for(a[l++]=e[h],d=0;df&&(f=p,u=e[x],g=x);a[l++]=u,h=g}return a[l++]=e[c],a}function Dc(e,i,t,s){let n=0,o=0,a,r,l,c,h,d,u,f,p,g,m=[],b=i+t-1,x=e[i].x,S=e[b].x-x;for(a=i;ag&&(g=c,u=a),n=(o*n+r.x)/++o;else{let v=a-1;if(!A(d)&&!A(u)){let w=Math.min(d,u),M=Math.max(d,u);w!==f&&w!==v&&m.push(Ft(It({},e[w]),{x:n})),M!==f&&M!==v&&m.push(Ft(It({},e[M]),{x:n}))}a>0&&v!==f&&m.push(e[v]),m.push(r),h=_,o=0,p=g=c,d=u=f=a}}return m}function Xo(e){if(e._decimated){let i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function ro(e){e.data.datasets.forEach(i=>{Xo(i)})}function Ac(e,i){let t=i.length,s=0,n,{iScale:o}=e,{min:a,max:r,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=Y(lt(i,o.axis,a).lo,0,t-1)),c?n=Y(lt(i,o.axis,r).hi+1,s,t)-s:n=t-s,{start:s,count:n}}var Oc={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled){ro(e);return}let s=e.width;e.data.datasets.forEach((n,o)=>{let{_data:a,indexAxis:r}=n,l=e.getDatasetMeta(o),c=a||n.data;if(se([r,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let h=e.scales[l.xAxisID];if(h.type!=="linear"&&h.type!=="time"||e.options.parsing)return;let{start:d,count:u}=Ac(l,c),f=t.threshold||4*s;if(u<=f){Xo(n);return}A(a)&&(n._data=c,delete n.data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(t.algorithm){case"lttb":p=Cc(c,d,u,s,t);break;case"min-max":p=Dc(c,d,u,s);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}n._decimated=p})},destroy(e){ro(e)}};function Tc(e,i,t){let s=e.segments,n=e.points,o=i.points,a=[];for(let r of s){let{start:l,end:c}=r;c=pi(l,c,n);let h=ws(t,n[l],n[c],r.loop);if(!i.segments){a.push({source:r,target:h,start:n[l],end:n[c]});continue}let d=Qi(i,h);for(let u of d){let f=ws(t,o[u.start],o[u.end],u.loop),p=Gi(r,n,f);for(let g of p)a.push({source:g,target:u,start:{[t]:lo(h,f,"start",Math.max)},end:{[t]:lo(h,f,"end",Math.min)}})}}return a}function ws(e,i,t,s){if(s)return;let n=i[e],o=t[e];return e==="angle"&&(n=X(n),o=X(o)),{property:e,start:n,end:o}}function Lc(e,i){let{x:t=null,y:s=null}=e||{},n=i.points,o=[];return i.segments.forEach(({start:a,end:r})=>{r=pi(a,r,n);let l=n[a],c=n[r];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):t!==null&&(o.push({x:t,y:l.y}),o.push({x:t,y:c.y}))}),o}function pi(e,i,t){for(;i>e;i--){let s=t[i];if(!isNaN(s.x)&&!isNaN(s.y))break}return i}function lo(e,i,t,s){return e&&i?s(e[t],i[t]):e?e[t]:i?i[t]:0}function qo(e,i){let t=[],s=!1;return z(e)?(s=!0,t=e):t=Lc(e,i),t.length?new gi({points:t,options:{tension:0},_loop:s,_fullLoop:s}):null}function co(e){return e&&e.fill!==!1}function Ec(e,i,t){let n=e[i].fill,o=[i],a;if(!t)return n;for(;n!==!1&&o.indexOf(n)===-1;){if(!W(n))return n;if(a=e[n],!a)return!1;if(a.visible)return n;o.push(n),n=a.fill}return!1}function Rc(e,i,t){let s=Bc(e);if(O(s))return isNaN(s.value)?!1:s;let n=parseFloat(s);return W(n)&&Math.floor(n)===n?Ic(s[0],i,n,t):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Ic(e,i,t,s){return(e==="-"||e==="+")&&(t=i+t),t===i||t<0||t>=s?!1:t}function Fc(e,i){let t=null;return e==="start"?t=i.bottom:e==="end"?t=i.top:O(e)?t=i.getPixelForValue(e.value):i.getBasePixel&&(t=i.getBasePixel()),t}function zc(e,i,t){let s;return e==="start"?s=t:e==="end"?s=i.options.reverse?i.min:i.max:O(e)?s=e.value:s=i.getBaseValue(),s}function Bc(e){let i=e.options,t=i.fill,s=P(t&&t.target,t);return s===void 0&&(s=!!i.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function Nc(e){let{scale:i,index:t,line:s}=e,n=[],o=s.segments,a=s.points,r=Vc(i,t);r.push(qo({x:null,y:i.bottom},s));for(let l=0;l=0;--a){let r=n[a].$filler;r&&(r.line.updateControlPoints(o,r.axis),s&&r.fill&&ls(e.ctx,r,o))}},beforeDatasetsDraw(e,i,t){if(t.drawTime!=="beforeDatasetsDraw")return;let s=e.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){let o=s[n].$filler;co(o)&&ls(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,i,t){let s=i.meta.$filler;!co(s)||t.drawTime!=="beforeDatasetDraw"||ls(e.ctx,s,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},go=(e,i)=>{let{boxHeight:t=i,boxWidth:s=i}=e;return e.usePointStyle&&(t=Math.min(t,i),s=e.pointStyleWidth||Math.min(s,i)),{boxWidth:s,boxHeight:t,itemHeight:Math.max(i,t)}},Qc=(e,i)=>e!==null&&i!==null&&e.datasetIndex===i.datasetIndex&&e.index===i.index,fi=class extends at{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t,s){this.maxWidth=i,this.maxHeight=t,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let i=this.options.labels||{},t=F(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(s=>i.filter(s,this.chart.data))),i.sort&&(t=t.sort((s,n)=>i.sort(s,n,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){let{options:i,ctx:t}=this;if(!i.display){this.width=this.height=0;return}let s=i.labels,n=$(s.font),o=n.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:l}=go(s,o),c,h;t.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(a,o,r,l)+10):(h=this.maxHeight,c=this._fitCols(a,n,r,l)+10),this.width=Math.min(c,i.maxWidth||this.maxWidth),this.height=Math.min(h,i.maxHeight||this.maxHeight)}_fitRows(i,t,s,n){let{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+r,d=i;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{let m=s+t/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*r>a)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+r}),d}_fitCols(i,t,s,n){let{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=a-i,d=r,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{let{itemWidth:x,itemHeight:y}=Zc(s,t,o,m,n);b>0&&f+y+2*r>h&&(d+=u+r,c.push({width:u,height:f}),p+=u+r,g++,u=f=0),l[b]={left:p,top:f,col:g,width:x,height:y},u=Math.max(u,x),f+=y+r}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;let i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:s,labels:{padding:n},rtl:o}}=this,a=Wt(o,this.left,this.width);if(this.isHorizontal()){let r=0,l=q(s,this.left+n,this.right-this.lineWidths[r]);for(let c of t)r!==c.row&&(r=c.row,l=q(s,this.left+n,this.right-this.lineWidths[r])),c.top+=this.top+i+n,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+n}else{let r=0,l=q(s,this.top+i+n,this.bottom-this.columnSizes[r].height);for(let c of t)c.col!==r&&(r=c.col,l=q(s,this.top+i+n,this.bottom-this.columnSizes[r].height)),c.top=l,c.left+=this.left+n,c.left=a.leftForLtr(a.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let i=this.ctx;me(i,this),this._draw(),be(i)}}_draw(){let{options:i,columnSizes:t,lineWidths:s,ctx:n}=this,{align:o,labels:a}=i,r=N.color,l=Wt(i.rtl,this.left,this.width),c=$(a.font),{padding:h}=a,d=c.size,u=d/2,f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;let{boxWidth:p,boxHeight:g,itemHeight:m}=go(a,d),b=function(v,w,M){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();let k=P(M.lineWidth,1);if(n.fillStyle=P(M.fillStyle,r),n.lineCap=P(M.lineCap,"butt"),n.lineDashOffset=P(M.lineDashOffset,0),n.lineJoin=P(M.lineJoin,"miter"),n.lineWidth=k,n.strokeStyle=P(M.strokeStyle,r),n.setLineDash(P(M.lineDash,[])),a.usePointStyle){let D={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:k},C=l.xPlus(v,p/2),T=w+u;Vi(n,D,C,T,a.pointStyleWidth&&p)}else{let D=w+Math.max((d-g)/2,0),C=l.leftForLtr(v,p),T=At(M.borderRadius);n.beginPath(),Object.values(T).some(U=>U!==0)?ie(n,{x:C,y:D,w:p,h:g,radius:T}):n.rect(C,D,p,g),n.fill(),k!==0&&n.stroke()}n.restore()},x=function(v,w,M){Dt(n,M.text,v,w+m/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),S=this._computeTitleHeight();y?f={x:q(o,this.left+h,this.right-s[0]),y:this.top+h+S,line:0}:f={x:this.left+h,y:q(o,this.top+S+h,this.bottom-t[0].height),line:0},qi(this.ctx,i.textDirection);let _=m+h;this.legendItems.forEach((v,w)=>{n.strokeStyle=v.fontColor,n.fillStyle=v.fontColor;let M=n.measureText(v.text).width,k=l.textAlign(v.textAlign||(v.textAlign=a.textAlign)),D=p+u+M,C=f.x,T=f.y;l.setWidth(this.width),y?w>0&&C+D+h>this.right&&(T=f.y+=_,f.line++,C=f.x=q(o,this.left+h,this.right-s[f.line])):w>0&&T+_>this.bottom&&(C=f.x=C+t[f.line].width+h,f.line++,T=f.y=q(o,this.top+S+h,this.bottom-t[f.line].height));let U=l.x(C);if(b(U,T,v),C=fn(k,C+p+u,y?C+D:this.right,i.rtl),x(l.x(C),T,v),y)f.x+=D+h;else if(typeof v.text!="string"){let et=c.lineHeight;f.y+=Ko(v,et)+h}else f.y+=_}),Ki(this.ctx,i.textDirection)}drawTitle(){let i=this.options,t=i.title,s=$(t.font),n=K(t.padding);if(!t.display)return;let o=Wt(i.rtl,this.left,this.width),a=this.ctx,r=t.position,l=s.size/2,c=n.top+l,h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=q(i.align,d,this.right-u);else{let p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+q(i.align,this.top,this.bottom-p-i.labels.padding-this._computeTitleHeight())}let f=q(r,d,d+u);a.textAlign=o.textAlign(Ue(r)),a.textBaseline="middle",a.strokeStyle=t.color,a.fillStyle=t.color,a.font=s.string,Dt(a,t.text,f,h,s)}_computeTitleHeight(){let i=this.options.title,t=$(i.font),s=K(i.padding);return i.display?t.lineHeight+s.height:0}_getLegendItemAt(i,t){let s,n,o;if(dt(i,this.left,this.right)&&dt(t,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>a.length?o:a)),i+t.size/2+s.measureText(n).width}function th(e,i,t){let s=e;return typeof i.text!="string"&&(s=Ko(i,t)),s}function Ko(e,i){let t=e.text?e.text.length:0;return i*t}function eh(e,i){return!!((e==="mousemove"||e==="mouseout")&&(i.onHover||i.onLeave)||i.onClick&&(e==="click"||e==="mouseup"))}var ih={id:"legend",_element:fi,start(e,i,t){let s=e.legend=new fi({ctx:e.ctx,options:t,chart:e});Q.configure(e,s,t),Q.addBox(e,s)},stop(e){Q.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){let s=e.legend;Q.configure(e,s,t),s.options=t},afterUpdate(e){let i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){let s=i.datasetIndex,n=t.chart;n.isDatasetVisible(s)?(n.hide(s),i.hidden=!0):(n.show(s),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:s,textAlign:n,color:o,useBorderRadius:a,borderRadius:r}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(t?0:void 0),h=K(c.borderWidth);return{text:i[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:a&&(r||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}},Pe=class extends at{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t){let s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=i,this.height=this.bottom=t;let n=z(s.text)?s.text.length:1;this._padding=K(s.padding);let o=n*$(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){let i=this.options.position;return i==="top"||i==="bottom"}_drawArgs(i){let{top:t,left:s,bottom:n,right:o,options:a}=this,r=a.align,l=0,c,h,d;return this.isHorizontal()?(h=q(r,s,o),d=t+i,c=o-s):(a.position==="left"?(h=s+i,d=q(r,n,t),l=E*-.5):(h=o-i,d=q(r,t,n),l=E*.5),c=n-t),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){let i=this.ctx,t=this.options;if(!t.display)return;let s=$(t.font),o=s.lineHeight/2+this._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=this._drawArgs(o);Dt(i,t.text,0,0,s,{color:t.color,maxWidth:l,rotation:c,textAlign:Ue(t.align),textBaseline:"middle",translation:[a,r]})}};function sh(e,i){let t=new Pe({ctx:e.ctx,options:i,chart:e});Q.configure(e,t,i),Q.addBox(e,t),e.titleBlock=t}var nh={id:"title",_element:Pe,start(e,i,t){sh(e,t)},stop(e){let i=e.titleBlock;Q.removeBox(e,i),delete e.titleBlock},beforeUpdate(e,i,t){let s=e.titleBlock;Q.configure(e,s,t),s.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},si=new WeakMap,oh={id:"subtitle",start(e,i,t){let s=new Pe({ctx:e.ctx,options:t,chart:e});Q.configure(e,s,t),Q.addBox(e,s),si.set(e,s)},stop(e){Q.removeBox(e,si.get(e)),si.delete(e)},beforeUpdate(e,i,t){let s=si.get(e);Q.configure(e,s,t),s.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},we={average(e){if(!e.length)return!1;let i,t,s=new Set,n=0,o=0;for(i=0,t=e.length;ir+l)/s.size,y:n/o}},nearest(e,i){if(!e.length)return!1;let t=i.x,s=i.y,n=Number.POSITIVE_INFINITY,o,a,r;for(o=0,a=e.length;o-1?e.split(` `):e}function ah(e,i){let{element:t,datasetIndex:s,index:n}=i,o=e.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:e,label:a,parsed:o.getParsed(n),raw:e.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:t}}function po(e,i){let t=e.chart.ctx,{body:s,footer:n,title:o}=e,{boxWidth:a,boxHeight:r}=i,l=$(i.bodyFont),c=$(i.titleFont),h=$(i.footerFont),d=o.length,u=n.length,f=s.length,p=K(i.padding),g=p.height,m=0,b=s.reduce((S,_)=>S+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*i.titleSpacing+i.titleMarginBottom),b){let S=i.displayColors?Math.max(r,l.lineHeight):l.lineHeight;g+=f*S+(b-f)*l.lineHeight+(b-1)*i.bodySpacing}u&&(g+=i.footerMarginTop+u*h.lineHeight+(u-1)*i.footerSpacing);let x=0,y=function(S){m=Math.max(m,t.measureText(S).width+x)};return t.save(),t.font=c.string,R(e.title,y),t.font=l.string,R(e.beforeBody.concat(e.afterBody),y),x=i.displayColors?a+2+i.boxPadding:0,R(s,S=>{R(S.before,y),R(S.lines,y),R(S.after,y)}),x=0,t.font=h.string,R(e.footer,y),t.restore(),m+=p.width,{width:m,height:g}}function rh(e,i){let{y:t,height:s}=i;return te.height-s/2?"bottom":"center"}function lh(e,i,t,s){let{x:n,width:o}=s,a=t.caretSize+t.caretPadding;if(e==="left"&&n+o+a>i.width||e==="right"&&n-o-a<0)return!0}function ch(e,i,t,s){let{x:n,width:o}=t,{width:a,chartArea:{left:r,right:l}}=e,c="center";return s==="center"?c=n<=(r+l)/2?"left":"right":n<=o/2?c="left":n>=a-o/2&&(c="right"),lh(c,e,i,t)&&(c="center"),c}function mo(e,i,t){let s=t.yAlign||i.yAlign||rh(e,t);return{xAlign:t.xAlign||i.xAlign||ch(e,i,t,s),yAlign:s}}function hh(e,i){let{x:t,width:s}=e;return i==="right"?t-=s:i==="center"&&(t-=s/2),t}function dh(e,i,t){let{y:s,height:n}=e;return i==="top"?s+=t:i==="bottom"?s-=n+t:s-=n/2,s}function bo(e,i,t,s){let{caretSize:n,caretPadding:o,cornerRadius:a}=e,{xAlign:r,yAlign:l}=t,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=At(a),p=hh(i,r),g=dh(i,l,c);return l==="center"?r==="left"?p+=c:r==="right"&&(p-=c):r==="left"?p-=Math.max(h,u)+n:r==="right"&&(p+=Math.max(d,f)+n),{x:Y(p,0,s.width-i.width),y:Y(g,0,s.height-i.height)}}function ni(e,i,t){let s=K(t.padding);return i==="center"?e.x+e.width/2:i==="right"?e.x+e.width-s.right:e.x+s.left}function xo(e){return ut([],vt(e))}function uh(e,i,t){return _t(e,{tooltip:i,tooltipItems:t,type:"tooltip"})}function _o(e,i){let t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}var Go={beforeTitle:ht,title(e){if(e.length>0){let i=e[0],t=i.chart.data.labels,s=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return i.dataset.label||"";if(i.label)return i.label;if(s>0&&i.dataIndex"u"?Go[i].call(t,s):n}var yo=(()=>{class e extends at{static positioners=we;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let t=this._cachedAnimations;if(t)return t;let s=this.chart,n=this.options.setContext(this.getContext()),o=n.enabled&&s.options.animation&&n.animations,a=new li(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=uh(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,s){let{callbacks:n}=s,o=J(n,"beforeTitle",this,t),a=J(n,"title",this,t),r=J(n,"afterTitle",this,t),l=[];return l=ut(l,vt(o)),l=ut(l,vt(a)),l=ut(l,vt(r)),l}getBeforeBody(t,s){return xo(J(s.callbacks,"beforeBody",this,t))}getBody(t,s){let{callbacks:n}=s,o=[];return R(t,a=>{let r={before:[],lines:[],after:[]},l=_o(n,a);ut(r.before,vt(J(l,"beforeLabel",this,a))),ut(r.lines,J(l,"label",this,a)),ut(r.after,vt(J(l,"afterLabel",this,a))),o.push(r)}),o}getAfterBody(t,s){return xo(J(s.callbacks,"afterBody",this,t))}getFooter(t,s){let{callbacks:n}=s,o=J(n,"beforeFooter",this,t),a=J(n,"footer",this,t),r=J(n,"afterFooter",this,t),l=[];return l=ut(l,vt(o)),l=ut(l,vt(a)),l=ut(l,vt(r)),l}_createItems(t){let s=this._active,n=this.chart.data,o=[],a=[],r=[],l=[],c,h;for(c=0,h=s.length;ct.filter(d,u,f,n))),t.itemSort&&(l=l.sort((d,u)=>t.itemSort(d,u,n))),R(l,d=>{let u=_o(t.callbacks,d);o.push(J(u,"labelColor",this,d)),a.push(J(u,"labelPointStyle",this,d)),r.push(J(u,"labelTextColor",this,d))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=r,this.dataPoints=l,l}update(t,s){let n=this.options.setContext(this.getContext()),o=this._active,a,r=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let l=we[n.position].call(this,o,this._eventPosition);r=this._createItems(n),this.title=this.getTitle(r,n),this.beforeBody=this.getBeforeBody(r,n),this.body=this.getBody(r,n),this.afterBody=this.getAfterBody(r,n),this.footer=this.getFooter(r,n);let c=this._size=po(this,n),h=Object.assign({},l,c),d=mo(this.chart,n,h),u=bo(n,h,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,a={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=r,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:s})}drawCaret(t,s,n,o){let a=this.getCaretPosition(t,n,o);s.lineTo(a.x1,a.y1),s.lineTo(a.x2,a.y2),s.lineTo(a.x3,a.y3)}getCaretPosition(t,s,n){let{xAlign:o,yAlign:a}=this,{caretSize:r,cornerRadius:l}=n,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:u}=At(l),{x:f,y:p}=t,{width:g,height:m}=s,b,x,y,S,_,v;return a==="center"?(_=p+m/2,o==="left"?(b=f,x=b-r,S=_+r,v=_-r):(b=f+g,x=b+r,S=_-r,v=_+r),y=b):(o==="left"?x=f+Math.max(c,d)+r:o==="right"?x=f+g-Math.max(h,u)-r:x=this.caretX,a==="top"?(S=p,_=S-r,b=x-r,y=x+r):(S=p+m,_=S+r,b=x+r,y=x-r),v=S),{x1:b,x2:x,x3:y,y1:S,y2:_,y3:v}}drawTitle(t,s,n){let o=this.title,a=o.length,r,l,c;if(a){let h=Wt(n.rtl,this.x,this.width);for(t.x=ni(this,n.titleAlign,n),s.textAlign=h.textAlign(n.titleAlign),s.textBaseline="middle",r=$(n.titleFont),l=n.titleSpacing,s.fillStyle=n.titleColor,s.font=r.string,c=0;cy!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,ie(t,{x:m,y:g,w:h,h:c,radius:x}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ie(t,{x:b,y:g+1,w:h-2,h:c-2,radius:x}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(m,g,h,c),t.strokeRect(m,g,h,c),t.fillStyle=r.backgroundColor,t.fillRect(b,g+1,h-2,c-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,s,n){let{body:o}=this,{bodySpacing:a,bodyAlign:r,displayColors:l,boxHeight:c,boxWidth:h,boxPadding:d}=n,u=$(n.bodyFont),f=u.lineHeight,p=0,g=Wt(n.rtl,this.x,this.width),m=function(k){s.fillText(k,g.x(t.x+p),t.y+f/2),t.y+=f+a},b=g.textAlign(r),x,y,S,_,v,w,M;for(s.textAlign=r,s.textBaseline="middle",s.font=u.string,t.x=ni(this,b,n),s.fillStyle=n.bodyColor,R(this.beforeBody,m),p=l&&b!=="right"?r==="center"?h/2+d:h+2+d:0,_=0,w=o.length;_0&&s.stroke()}_updateAnimationTarget(t){let s=this.chart,n=this.$animations,o=n&&n.x,a=n&&n.y;if(o||a){let r=we[t.position].call(this,this._active,this._eventPosition);if(!r)return;let l=this._size=po(this,t),c=Object.assign({},r,this._size),h=mo(s,t,c),d=bo(t,c,h,s);(o._to!==d.x||a._to!==d.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=l.width,this.height=l.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(t){let s=this.options.setContext(this.getContext()),n=this.opacity;if(!n)return;this._updateAnimationTarget(s);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;let r=K(s.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;s.enabled&&l&&(t.save(),t.globalAlpha=n,this.drawBackground(a,t,o,s),qi(t,s.textDirection),a.y+=r.top,this.drawTitle(a,t,s),this.drawBody(a,t,s),this.drawFooter(a,t,s),Ki(t,s.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,s){let n=this._active,o=t.map(({datasetIndex:l,index:c})=>{let h=this.chart.getDatasetMeta(l);if(!h)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:h.data[c],index:c}}),a=!ge(n,o),r=this._positionChanged(o,s);(a||r)&&(this._active=o,this._eventPosition=s,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,s,n=!0){if(s&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],r=this._getActiveElements(t,a,s,n),l=this._positionChanged(r,t),c=s||!ge(r,a)||l;return c&&(this._active=r,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,s))),c}_getActiveElements(t,s,n,o){let a=this.options;if(t.type==="mouseout")return[];if(!o)return s.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);let r=this.chart.getElementsAtEventForMode(t,a.mode,a,n);return a.reverse&&r.reverse(),r}_positionChanged(t,s){let{caretX:n,caretY:o,options:a}=this,r=we[a.position].call(this,t,s);return r!==!1&&(n!==r.x||o!==r.y)}}return e})(),fh={id:"tooltip",_element:yo,positioners:we,afterInit(e,i,t){t&&(e.tooltip=new yo({chart:e,options:t}))},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){let i=e.tooltip;if(i&&i._willRender()){let t={tooltip:i};if(e.notifyPlugins("beforeTooltipDraw",Ft(It({},t),{cancelable:!0}))===!1)return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,i){if(e.tooltip){let t=i.replay;e.tooltip.handleEvent(i.event,t,i.inChartArea)&&(i.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,i)=>i.bodyFont.size,boxWidth:(e,i)=>i.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Go},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},gh=Object.freeze({__proto__:null,Colors:Pc,Decimation:Oc,Filler:Gc,Legend:ih,SubTitle:oh,Title:nh,Tooltip:fh}),ph=(e,i,t,s)=>(typeof i=="string"?(t=e.push(i)-1,s.unshift({index:t,label:i})):isNaN(i)&&(t=null),t);function mh(e,i,t,s){let n=e.indexOf(i);if(n===-1)return ph(e,i,t,s);let o=e.lastIndexOf(i);return n!==o?t:n}var bh=(e,i)=>e===null?null:Y(Math.round(e),0,i);function vo(e){let i=this.getLabels();return e>=0&&e{class e extends $t{static id="category";static defaults={ticks:{callback:vo}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let s=this._addedLabels;if(s.length){let n=this.getLabels();for(let{index:o,label:a}of s)n[o]===a&&n.splice(o,1);this._addedLabels=[]}super.init(t)}parse(t,s){if(A(t))return null;let n=this.getLabels();return s=isFinite(s)&&n[s]===t?s:mh(n,t,P(s,t),this._addedLabels),bh(s,n.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:s}=this.getUserBounds(),{min:n,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),s||(o=this.getLabels().length-1)),this.min=n,this.max=o}buildTicks(){let t=this.min,s=this.max,n=this.options.offset,o=[],a=this.getLabels();a=t===0&&s===a.length-1?a:a.slice(t,s+1),this._valueRange=Math.max(a.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let r=t;r<=s;r++)o.push({value:r});return o}getLabelForValue(t){return vo.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){let s=this.ticks;return t<0||t>s.length-1?null:this.getPixelForValue(s[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}return e})();function _h(e,i){let t=[],{bounds:n,step:o,min:a,max:r,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=e,f=o||1,p=h-1,{min:g,max:m}=i,b=!A(a),x=!A(r),y=!A(c),S=(m-g)/(d+1),_=Ci((m-g)/p/f)*f,v,w,M,k;if(_<1e-14&&!b&&!x)return[{value:g},{value:m}];k=Math.ceil(m/_)-Math.floor(g/_),k>p&&(_=Ci(k*_/p/f)*f),A(l)||(v=Math.pow(10,l),_=Math.ceil(_*v)/v),n==="ticks"?(w=Math.floor(g/_)*_,M=Math.ceil(m/_)*_):(w=g,M=m),b&&x&&o&&an((r-a)/o,_/1e3)?(k=Math.round(Math.min((r-a)/_,h)),_=(r-a)/k,w=a,M=r):y?(w=b?a:w,M=x?r:M,k=c-1,_=(M-w)/k):(k=(M-w)/_,Jt(k,Math.round(k),_/1e3)?k=Math.round(k):k=Math.ceil(k));let D=Math.max(Ai(_),Ai(w));v=Math.pow(10,A(l)?D:l),w=Math.round(w*v)/v,M=Math.round(M*v)/v;let C=0;for(b&&(u&&w!==a?(t.push({value:a}),wr)break;t.push({value:T})}return x&&u&&M!==r?t.length&&Jt(t[t.length-1].value,r,So(r,S,e))?t[t.length-1].value=r:t.push({value:r}):(!x||M===r)&&t.push({value:M}),t}function So(e,i,{horizontal:t,minRotation:s}){let n=st(s),o=(t?Math.sin(n):Math.cos(n))||.001,a=.75*i*(""+e).length;return Math.min(i/o,a)}var ae=class extends $t{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return A(i)||(typeof i=="number"||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){let{beginAtZero:i}=this.options,{minDefined:t,maxDefined:s}=this.getUserBounds(),{min:n,max:o}=this,a=l=>n=t?n:l,r=l=>o=s?o:l;if(i){let l=ot(n),c=ot(o);l<0&&c<0?r(0):l>0&&c>0&&a(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);r(o+l),i||a(n-l)}this.min=n,this.max=o}getTickLimit(){let i=this.options.ticks,{maxTicksLimit:t,stepSize:s}=i,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),t=t||11),t&&(n=Math.min(t,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let i=this.options,t=i.ticks,s=this.getTickLimit();s=Math.max(2,s);let n={maxTicks:s,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},o=this._range||this,a=_h(n,o);return i.bounds==="ticks"&&Di(a,this,"value"),i.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){let i=this.ticks,t=this.min,s=this.max;if(super.configure(),this.options.offset&&i.length){let n=(s-t)/Math.max(i.length-1,1)/2;t-=n,s+=n}this._startValue=t,this._endValue=s,this._valueRange=s-t}getLabelForValue(i){return ee(i,this.chart.options.locale,this.options.ticks.format)}},ks=class extends ae{static id="linear";static defaults={ticks:{callback:pe.formatters.numeric}};determineDataLimits(){let{min:i,max:t}=this.getMinMax(!0);this.min=W(i)?i:0,this.max=W(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){let i=this.isHorizontal(),t=i?this.width:this.height,s=st(this.options.ticks.minRotation),n=(i?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,o.lineHeight/n))}getPixelForValue(i){return i===null?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},Ce=e=>Math.floor(bt(e)),jt=(e,i)=>Math.pow(10,Ce(e)+i);function Mo(e){return e/Math.pow(10,Ce(e))===1}function wo(e,i,t){let s=Math.pow(10,t),n=Math.floor(e/s);return Math.ceil(i/s)-n}function yh(e,i){let t=i-e,s=Ce(t);for(;wo(e,i,s)>10;)s++;for(;wo(e,i,s)<10;)s--;return Math.min(s,Ce(e))}function vh(e,{min:i,max:t}){i=Z(e.min,i);let s=[],n=Ce(i),o=yh(i,t),a=o<0?Math.pow(10,Math.abs(o)):1,r=Math.pow(10,o),l=n>o?Math.pow(10,n):0,c=Math.round((i-l)*a)/a,h=Math.floor((i-l)/r/10)*r*10,d=Math.floor((c-h)/Math.pow(10,o)),u=Z(e.min,Math.round((l+h+d*Math.pow(10,o))*a)/a);for(;u=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,a=o>=0?1:a),u=Math.round((l+h+d*Math.pow(10,o))*a)/a;let f=Z(e.max,u);return s.push({value:f,major:Mo(f),significand:d}),s}var Ps=class extends $t{static id="logarithmic";static defaults={ticks:{callback:pe.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){let s=ae.prototype.parse.apply(this,[i,t]);if(s===0){this._zero=!0;return}return W(s)&&s>0?s:null}determineDataLimits(){let{min:i,max:t}=this.getMinMax(!0);this.min=W(i)?Math.max(0,i):null,this.max=W(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!W(this._userMin)&&(this.min=i===jt(this.min,0)?jt(this.min,-1):jt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:i,maxDefined:t}=this.getUserBounds(),s=this.min,n=this.max,o=r=>s=i?s:r,a=r=>n=t?n:r;s===n&&(s<=0?(o(1),a(10)):(o(jt(s,-1)),a(jt(n,1)))),s<=0&&o(jt(n,-1)),n<=0&&a(jt(s,1)),this.min=s,this.max=n}buildTicks(){let i=this.options,t={min:this._userMin,max:this._userMax},s=vh(t,this);return i.bounds==="ticks"&&Di(s,this,"value"),i.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(i){return i===void 0?"0":ee(i,this.chart.options.locale,this.options.ticks.format)}configure(){let i=this.min;super.configure(),this._startValue=bt(i),this._valueRange=bt(this.max)-bt(i)}getPixelForValue(i){return(i===void 0||i===0)&&(i=this.min),i===null||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(bt(i)-this._startValue)/this._valueRange)}getValueForPixel(i){let t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}};function Cs(e){let i=e.ticks;if(i.display&&e.display){let t=K(i.backdropPadding);return P(i.font&&i.font.size,N.font.size)+t.height}return 0}function Sh(e,i,t){return t=z(t)?t:[t],{w:pn(e,i.string,t),h:t.length*i.lineHeight}}function ko(e,i,t,s,n){return e===s||e===n?{start:i-t/2,end:i+t/2}:en?{start:i-t,end:i}:{start:i,end:i+t}}function Mh(e){let i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),s=[],n=[],o=e._pointLabels.length,a=e.options.pointLabels,r=a.centerPointLabels?E/o:0;for(let l=0;li.r&&(r=(s.end-i.r)/o,e.r=Math.max(e.r,i.r+r)),n.starti.b&&(l=(n.end-i.b)/a,e.b=Math.max(e.b,i.b+l))}function kh(e,i,t){let s=e.drawingArea,{extra:n,additionalAngle:o,padding:a,size:r}=t,l=e.getPointPosition(i,s+n+a,o),c=Math.round($e(X(l.angle+H))),h=Oh(l.y,r.h,c),d=Dh(c),u=Ah(l.x,r.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+r.w,bottom:h+r.h}}function Ph(e,i){if(!i)return!0;let{left:t,top:s,right:n,bottom:o}=e;return!(ct({x:t,y:s},i)||ct({x:t,y:o},i)||ct({x:n,y:s},i)||ct({x:n,y:o},i))}function Ch(e,i,t){let s=[],n=e._pointLabels.length,o=e.options,{centerPointLabels:a,display:r}=o.pointLabels,l={extra:Cs(o)/2,additionalAngle:a?E/n:0},c;for(let h=0;h270||t<90)&&(e-=i),e}function Th(e,i,t){let{left:s,top:n,right:o,bottom:a}=t,{backdropColor:r}=i;if(!A(r)){let l=At(i.borderRadius),c=K(i.backdropPadding);e.fillStyle=r;let h=s-c.left,d=n-c.top,u=o-s+c.width,f=a-n+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),ie(e,{x:h,y:d,w:u,h:f,radius:l}),e.fill()):e.fillRect(h,d,u,f)}}function Lh(e,i){let{ctx:t,options:{pointLabels:s}}=e;for(let n=i-1;n>=0;n--){let o=e._pointLabelItems[n];if(!o.visible)continue;let a=s.setContext(e.getPointLabelContext(n));Th(t,a,o);let r=$(a.font),{x:l,y:c,textAlign:h}=o;Dt(t,e._pointLabels[n],l,c+r.lineHeight/2,r,{color:a.color,textAlign:h,textBaseline:"middle"})}}function Qo(e,i,t,s){let{ctx:n}=e;if(t)n.arc(e.xCenter,e.yCenter,i,0,B);else{let o=e.getPointPosition(0,i);n.moveTo(o.x,o.y);for(let a=1;a{let n=F(this.options.pointLabels.callback,[t,s],this);return n||n===0?n:""}).filter((t,s)=>this.chart.getDataVisibility(s))}fit(){let i=this.options;i.display&&i.pointLabels.display?Mh(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(i,t,s,n){this.xCenter+=Math.floor((i-t)/2),this.yCenter+=Math.floor((s-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(i,t,s,n))}getIndexAngle(i){let t=B/(this._pointLabels.length||1),s=this.options.startAngle||0;return X(i*t+st(s))}getDistanceFromCenterForValue(i){if(A(i))return NaN;let t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-i)*t:(i-this.min)*t}getValueForDistanceFromCenter(i){if(A(i))return NaN;let t=i/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(i){let t=this._pointLabels||[];if(i>=0&&i{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(h.value);let u=this.getContext(d),f=n.setContext(u),p=o.setContext(u);Eh(this,f,l,a,p)}}),s.display){for(i.save(),r=a-1;r>=0;r--){let h=s.setContext(this.getPointLabelContext(r)),{color:d,lineWidth:u}=h;!u||!d||(i.lineWidth=u,i.strokeStyle=d,i.setLineDash(h.borderDash),i.lineDashOffset=h.borderDashOffset,l=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),c=this.getPointPosition(r,l),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(c.x,c.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){let i=this.ctx,t=this.options,s=t.ticks;if(!s.display)return;let n=this.getIndexAngle(0),o,a;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(n),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((r,l)=>{if(l===0&&this.min>=0&&!t.reverse)return;let c=s.setContext(this.getContext(l)),h=$(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){i.font=h.string,a=i.measureText(r.label).width,i.fillStyle=c.backdropColor;let d=K(c.backdropPadding);i.fillRect(-a/2-d.left,-o-h.size/2-d.top,a+d.width,h.size+d.height)}Dt(i,r.label,0,-o,h,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),i.restore()}drawTitle(){}},mi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},tt=Object.keys(mi);function Po(e,i){return e-i}function Co(e,i){if(A(i))return null;let t=e._adapter,{parser:s,round:n,isoWeekday:o}=e._parseOpts,a=i;return typeof s=="function"&&(a=s(a)),W(a)||(a=typeof s=="string"?t.parse(a,s):t.parse(a)),a===null?null:(n&&(a=n==="week"&&(Vt(o)||o===!0)?t.startOf(a,"isoWeek",o):t.startOf(a,n)),+a)}function Do(e,i,t,s){let n=tt.length;for(let o=tt.indexOf(e);o=tt.indexOf(t);o--){let a=tt[o];if(mi[a].common&&e._adapter.diff(n,s,a)>=i-1)return a}return tt[t?tt.indexOf(t):0]}function Fh(e){for(let i=tt.indexOf(e)+1,t=tt.length;i=i?t[s]:t[n];e[o]=!0}}function zh(e,i,t,s){let n=e._adapter,o=+n.startOf(i[0].value,s),a=i[i.length-1].value,r,l;for(r=o;r<=a;r=+n.add(r,1,s))l=t[r],l>=0&&(i[l].major=!0);return i}function Oo(e,i,t){let s=[],n={},o=i.length,a,r;for(a=0;a{class e extends $t{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,s={}){let n=t.time||(t.time={}),o=this._adapter=new Xr._date(t.adapters.date);o.init(s),Qt(n.displayFormats,o.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=s.normalized}parse(t,s){return t===void 0?null:Co(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,s=this._adapter,n=t.time.unit||"day",{min:o,max:a,minDefined:r,maxDefined:l}=this.getUserBounds();function c(h){!r&&!isNaN(h.min)&&(o=Math.min(o,h.min)),!l&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!r||!l)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),o=W(o)&&!isNaN(o)?o:+s.startOf(Date.now(),n),a=W(a)&&!isNaN(a)?a:+s.endOf(Date.now(),n)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let t=this.getLabelTimestamps(),s=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(s=t[0],n=t[t.length-1]),{min:s,max:n}}buildTicks(){let t=this.options,s=t.time,n=t.ticks,o=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,r=this.max,l=cn(o,a,r);return this._unit=s.unit||(n.autoSkip?Do(s.minUnit,this.min,this.max,this._getLabelCapacity(a)):Ih(this,l.length,s.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:Fh(this._unit),this.initOffsets(o),t.reverse&&l.reverse(),Oo(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let s=0,n=0,o,a;this.options.offset&&t.length&&(o=this.getDecimalForValue(t[0]),t.length===1?s=1-o:s=(this.getDecimalForValue(t[1])-o)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?n=a:n=(a-this.getDecimalForValue(t[t.length-2]))/2);let r=t.length<3?.5:.25;s=Y(s,0,r),n=Y(n,0,r),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){let t=this._adapter,s=this.min,n=this.max,o=this.options,a=o.time,r=a.unit||Do(a.minUnit,s,n,this._getLabelCapacity(s)),l=P(o.ticks.stepSize,1),c=r==="week"?a.isoWeekday:!1,h=Vt(c)||c===!0,d={},u=s,f,p;if(h&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,h?"day":r),t.diff(n,s,r)>1e5*l)throw new Error(s+" and "+n+" are too far apart with stepSize of "+l+" "+r);let g=o.ticks.source==="data"&&this.getDataTimestamps();for(f=u,p=0;f+m)}getLabelForValue(t){let s=this._adapter,n=this.options.time;return n.tooltipFormat?s.format(t,n.tooltipFormat):s.format(t,n.displayFormats.datetime)}format(t,s){let o=this.options.time.displayFormats,a=this._unit,r=s||o[a];return this._adapter.format(t,r)}_tickFormatFunction(t,s,n,o){let a=this.options,r=a.ticks.callback;if(r)return F(r,[t,s,n],this);let l=a.time.displayFormats,c=this._unit,h=this._majorUnit,d=c&&l[c],u=h&&l[h],f=n[s],p=h&&u&&f&&f.major;return this._adapter.format(t,o||(p?u:d))}generateTickLabels(t){let s,n,o;for(s=0,n=t.length;s0?l:1}getDataTimestamps(){let t=this._cache.data||[],s,n;if(t.length)return t;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(s=0,n=o.length;s=e[s].pos&&i<=e[n].pos&&({lo:s,hi:n}=lt(e,"pos",i)),{pos:o,time:r}=e[s],{pos:a,time:l}=e[n]):(i>=e[s].time&&i<=e[n].time&&({lo:s,hi:n}=lt(e,"time",i)),{time:o,pos:r}=e[s],{time:a,pos:l}=e[n]);let c=a-o;return c?r+(l-r)*(i-o)/c:r}var Os=class extends As{static id="timeseries";static defaults=As.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=oi(t,this.min),this._tableRange=oi(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){let{min:t,max:s}=this,n=[],o=[],a,r,l,c,h;for(a=0,r=i.length;a=t&&c<=s&&n.push(c);if(n.length<2)return[{time:t,pos:0},{time:s,pos:1}];for(a=0,r=n.length;an-o)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;let t=this.getDataTimestamps(),s=this.getLabelTimestamps();return t.length&&s.length?i=this.normalize(t.concat(s)):i=t.length?t:s,i=this._cache.all=i,i}getDecimalForValue(i){return(oi(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){let t=this._offsets,s=this.getDecimalForPixel(i)/t.factor-t.end;return oi(this._table,s*this._tableRange+this._minPos,!0)}},Bh=Object.freeze({__proto__:null,CategoryScale:xh,LinearScale:ks,LogarithmicScale:Ps,RadialLinearScale:Ds,TimeScale:As,TimeSeriesScale:Os}),wd=[Ur,_c,gh,Bh];export{Vh as a,Ql as b,wd as c,Zh as d,nd as e,hd as f,md as g,xd as h}; diff --git a/browser/chunk-PZ5W5NMJ.js b/browser/chunk-FMTK7B7D.js similarity index 97% rename from browser/chunk-PZ5W5NMJ.js rename to browser/chunk-FMTK7B7D.js index b5d675fdc..5a92de1ac 100644 --- a/browser/chunk-PZ5W5NMJ.js +++ b/browser/chunk-FMTK7B7D.js @@ -1 +1 @@ -import{G as i,K as p,Nb as n,Qb as v,jg as c,k as u}from"./chunk-HZWIHY3V.js";var h=class{constructor(a){this.selectOptions=[],this.childParameters=[],this.name=a[0],this.variable=a[1],this.label=a[2],this.displayType=a[3],this.formatType=a[4],this.defaultVal=a[5],this.selectOne=a[6],this.selectAll=a[7],this.parentParameterName=a[8],this.inputName=`R_${a[1]}`}};var l=class{constructor(a){this.id=a[0],this.name=a[1]}};var f=class{constructor(a){this.keysLabel=a.columnHeaders[0].columnName,this.valuesLabel=a.columnHeaders[1].columnName,this.keys=a.data.map(e=>e.row[0]),this.values=a.data.map(e=>e.row[1])}};var F=(()=>{class t{constructor(){this.http=p(v)}getReports(){return this.http.get("/reports")}getReportParams(e){let r=new n().set("R_reportListing",`'${e}'`).set("parameterType","true");return this.http.get("/runreports/FullParameterList",{params:r}).pipe(u(s=>s.data.map(o=>new h(o.row))))}getSelectOptions(e){let r=new n().set("parameterType","true");return this.http.get(`/runreports/${e}`,{params:r}).pipe(u(s=>s.data.map(o=>new l(o.row))))}getPentahoParams(e){let r=new n().set("fields","reportParameters");return this.http.get(`/reports/${e}`,{params:r}).pipe(u(s=>s.reportParameters))}getRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s})}getChartRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s}).pipe(u(o=>new f(o)))}getPentahoRunReportData(e,r,s,o,m){let g=new n().set("tenantIdentifier",s).set("locale",o).set("dateFormat",m);for(let[y,b]of Object.entries(r))g=g.set(y,b);return this.http.get(`/runreports/${e}`,{responseType:"arraybuffer",observe:"response",params:g})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var L=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGroupAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var V=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGSIMAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var J=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.paramMap.get("groupId");return this.groupsService.getGroupData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{F as a,L as b,V as c,J as d}; +import{G as i,K as p,Nb as n,Qb as v,jg as c,k as u}from"./chunk-2XE77LT4.js";var h=class{constructor(a){this.selectOptions=[],this.childParameters=[],this.name=a[0],this.variable=a[1],this.label=a[2],this.displayType=a[3],this.formatType=a[4],this.defaultVal=a[5],this.selectOne=a[6],this.selectAll=a[7],this.parentParameterName=a[8],this.inputName=`R_${a[1]}`}};var l=class{constructor(a){this.id=a[0],this.name=a[1]}};var f=class{constructor(a){this.keysLabel=a.columnHeaders[0].columnName,this.valuesLabel=a.columnHeaders[1].columnName,this.keys=a.data.map(e=>e.row[0]),this.values=a.data.map(e=>e.row[1])}};var F=(()=>{class t{constructor(){this.http=p(v)}getReports(){return this.http.get("/reports")}getReportParams(e){let r=new n().set("R_reportListing",`'${e}'`).set("parameterType","true");return this.http.get("/runreports/FullParameterList",{params:r}).pipe(u(s=>s.data.map(o=>new h(o.row))))}getSelectOptions(e){let r=new n().set("parameterType","true");return this.http.get(`/runreports/${e}`,{params:r}).pipe(u(s=>s.data.map(o=>new l(o.row))))}getPentahoParams(e){let r=new n().set("fields","reportParameters");return this.http.get(`/reports/${e}`,{params:r}).pipe(u(s=>s.reportParameters))}getRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s})}getChartRunReportData(e,r){let s=new n;for(let[o,m]of Object.entries(r))s=s.set(o,m);return this.http.get(`/runreports/${e}`,{params:s}).pipe(u(o=>new f(o)))}getPentahoRunReportData(e,r,s,o,m){let g=new n().set("tenantIdentifier",s).set("locale",o).set("dateFormat",m);for(let[y,b]of Object.entries(r))g=g.set(y,b);return this.http.get(`/runreports/${e}`,{responseType:"arraybuffer",observe:"response",params:g})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var L=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGroupAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var V=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.parent.paramMap.get("groupId");return this.groupsService.getGSIMAccountsData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();var J=(()=>{class t{constructor(){this.groupsService=p(c)}resolve(e){let r=e.paramMap.get("groupId");return this.groupsService.getGroupData(r)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{F as a,L as b,V as c,J as d}; diff --git a/browser/chunk-Z3NF3G2N.js b/browser/chunk-GZ4W472E.js similarity index 97% rename from browser/chunk-Z3NF3G2N.js rename to browser/chunk-GZ4W472E.js index ad08d9392..73018f736 100644 --- a/browser/chunk-Z3NF3G2N.js +++ b/browser/chunk-GZ4W472E.js @@ -1 +1 @@ -import{B as h,G as g,K as l,Mb as m,Nb as o,Nc as i,Qb as I}from"./chunk-HZWIHY3V.js";import{a as u,b as d}from"./chunk-PHUH23IY.js";var P=(()=>{class c{constructor(){this.http=l(I)}getStandingInstructionsData(t){return this.http.get(`/standinginstructions/${t}`)}getStandingInstructionsDataAndTemplate(t){let n=new o().set("associations","template");return this.http.get(`/standinginstructions/${t}`,{params:n})}updateStandingInstructionsData(t,n){let s=new o().set("command","update");return this.http.put(`/standinginstructions/${t}`,n,{params:s})}getStandingInstructionsTemplate(t,n,s,e){let r=new o().set("fromAccountType",s).set("fromClientId",t).set("fromOfficeId",n);if(e){let a=Object.getOwnPropertyNames(e);for(let p=0;p{let a=JSON.stringify(d(u({},s),{ownerFspId:r.fspId}));return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/partyinfo`,a,{headers:e})}))}sendInterbankTransfer(t){let n=new m({"Content-Type":"application/json"});return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/executetransfer`,t,{headers:n})}static{this.\u0275fac=function(n){return new(n||c)}}static{this.\u0275prov=g({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();export{P as a}; +import{B as h,G as g,K as l,Mb as m,Nb as o,Nc as i,Qb as I}from"./chunk-2XE77LT4.js";import{a as u,b as d}from"./chunk-PHUH23IY.js";var P=(()=>{class c{constructor(){this.http=l(I)}getStandingInstructionsData(t){return this.http.get(`/standinginstructions/${t}`)}getStandingInstructionsDataAndTemplate(t){let n=new o().set("associations","template");return this.http.get(`/standinginstructions/${t}`,{params:n})}updateStandingInstructionsData(t,n){let s=new o().set("command","update");return this.http.put(`/standinginstructions/${t}`,n,{params:s})}getStandingInstructionsTemplate(t,n,s,e){let r=new o().set("fromAccountType",s).set("fromClientId",t).set("fromOfficeId",n);if(e){let a=Object.getOwnPropertyNames(e);for(let p=0;p{let a=JSON.stringify(d(u({},s),{ownerFspId:r.fspId}));return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/partyinfo`,a,{headers:e})}))}sendInterbankTransfer(t){let n=new m({"Content-Type":"application/json"});return this.http.post(`${i.mifosInterbankTransfersApiUrl}${i.mifosInterbankTransfersApiVersion}${i.mifosInterbankTransfersApiProvider}/executetransfer`,t,{headers:n})}static{this.\u0275fac=function(n){return new(n||c)}}static{this.\u0275prov=g({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();export{P as a}; diff --git a/browser/chunk-55OSB4IK.js b/browser/chunk-HV33S2D3.js similarity index 89% rename from browser/chunk-55OSB4IK.js rename to browser/chunk-HV33S2D3.js index 2a0bcced4..29deda91f 100644 --- a/browser/chunk-55OSB4IK.js +++ b/browser/chunk-HV33S2D3.js @@ -1 +1 @@ -import{Ac as x,Dc as b,Eb as f,Ec as v,Fc as D,Gc as M,K as m,Lc as C,Ua as o,Va as s,Wa as c,ca as t,eb as u,hb as n,ib as a,ja as p,qc as g,td as S,wa as d,xa as e,ya as i}from"./chunk-HZWIHY3V.js";var h=()=>({confirm:!0}),O=(()=>{class l{constructor(){this.dialogRef=m(x)}static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275cmp=p({type:l,selectors:[["mifosx-undo-transaction-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(r,y){r&1&&(e(0,"h1",0),o(1),n(2,"translate"),i(),e(3,"div",1)(4,"p"),o(5),n(6,"translate"),i()(),e(7,"mat-dialog-actions",2)(8,"button",3),o(9),n(10,"translate"),i(),e(11,"button",4),o(12),n(13,"translate"),i()()),r&2&&(t(),s(a(2,5,"labels.heading.Undo Transaction")),t(4),s(a(6,7,"labels.text.Are you sure you want to undo this transaction")),t(4),s(a(10,9,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",u(13,h)),t(),c(" ",a(13,11,"labels.buttons.Confirm")," "))},dependencies:[f,S,g,v,D,M,b,C],encapsulation:2})}}return l})();export{O as a}; +import{Ac as x,Dc as b,Eb as f,Ec as v,Fc as D,Gc as M,K as m,Lc as C,Ua as o,Va as s,Wa as c,ca as t,eb as u,hb as n,ib as a,ja as p,qc as g,td as S,wa as d,xa as e,ya as i}from"./chunk-2XE77LT4.js";var h=()=>({confirm:!0}),O=(()=>{class l{constructor(){this.dialogRef=m(x)}static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275cmp=p({type:l,selectors:[["mifosx-undo-transaction-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","warn",3,"mat-dialog-close"]],template:function(r,y){r&1&&(e(0,"h1",0),o(1),n(2,"translate"),i(),e(3,"div",1)(4,"p"),o(5),n(6,"translate"),i()(),e(7,"mat-dialog-actions",2)(8,"button",3),o(9),n(10,"translate"),i(),e(11,"button",4),o(12),n(13,"translate"),i()()),r&2&&(t(),s(a(2,5,"labels.heading.Undo Transaction")),t(4),s(a(6,7,"labels.text.Are you sure you want to undo this transaction")),t(4),s(a(10,9,"labels.buttons.Cancel")),t(2),d("mat-dialog-close",u(13,h)),t(),c(" ",a(13,11,"labels.buttons.Confirm")," "))},dependencies:[f,S,g,v,D,M,b,C],encapsulation:2})}}return l})();export{O as a}; diff --git a/browser/chunk-T44Z3XQ3.js b/browser/chunk-M5465R2R.js similarity index 81% rename from browser/chunk-T44Z3XQ3.js rename to browser/chunk-M5465R2R.js index 88cfb2089..4ddb7d53e 100644 --- a/browser/chunk-T44Z3XQ3.js +++ b/browser/chunk-M5465R2R.js @@ -1 +1 @@ -import{G as i,K as r,lg as n}from"./chunk-HZWIHY3V.js";var f=(()=>{class t{constructor(){this.savingsService=r(n)}resolve(c){let e=c.paramMap.get("savingAccountId");return this.savingsService.getSavingsAccountData(e)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{f as a}; +import{G as i,K as r,lg as n}from"./chunk-2XE77LT4.js";var f=(()=>{class t{constructor(){this.savingsService=r(n)}resolve(c){let e=c.paramMap.get("savingAccountId");return this.savingsService.getSavingsAccountData(e)}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{f as a}; diff --git a/browser/chunk-6SG2PADU.js b/browser/chunk-NCNV2LOX.js similarity index 91% rename from browser/chunk-6SG2PADU.js rename to browser/chunk-NCNV2LOX.js index 61536a594..9ef00c117 100644 --- a/browser/chunk-6SG2PADU.js +++ b/browser/chunk-NCNV2LOX.js @@ -1 +1 @@ -import{G as r,K as i,lg as n}from"./chunk-HZWIHY3V.js";var m=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(e){let a=e.parent.parent.paramMap.get("savingAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("recurringDepositAccountId"),c=e.paramMap.get("datatableName");return this.savingsService.getSavingsDatatable(a,c)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();var S=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(){return this.savingsService.getSavingsDatatables()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();export{m as a,S as b}; +import{G as r,K as i,lg as n}from"./chunk-2XE77LT4.js";var m=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(e){let a=e.parent.parent.paramMap.get("savingAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("recurringDepositAccountId"),c=e.paramMap.get("datatableName");return this.savingsService.getSavingsDatatable(a,c)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();var S=(()=>{class t{constructor(){this.savingsService=i(n)}resolve(){return this.savingsService.getSavingsDatatables()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=r({token:t,factory:t.\u0275fac})}}return t})();export{m as a,S as b}; diff --git a/browser/collaterals.module-2J6C627E.js b/browser/collaterals.module-YC4RGJJR.js similarity index 99% rename from browser/collaterals.module-2J6C627E.js rename to browser/collaterals.module-YC4RGJJR.js index 98a4831b6..4ffb0955b 100644 --- a/browser/collaterals.module-2J6C627E.js +++ b/browser/collaterals.module-YC4RGJJR.js @@ -1 +1 @@ -import{$c as at,$d as ht,Af as wt,Cc as Y,Da as _,Dd as st,Ea as x,Eb as v,Ed as ct,G as y,Ga as J,H as S,Ia as E,Id as dt,Ja as K,K as d,Kd as ut,L as G,Lc as F,M as U,Nb as W,Qb as X,Rg as Tt,Tc as Z,Ua as o,Ud as Ct,Va as c,Wa as h,Xa as b,Xd as ft,Yc as tt,Zc as et,_c as it,ca as i,de as bt,eb as R,ed as nt,eg as Et,gc as P,hb as r,hd as lt,hg as Rt,ib as m,ja as I,jc as T,ka as w,kc as B,kd as ot,mc as j,na as f,nd as rt,nf as vt,of as gt,pf as _t,qc as O,ra as Q,rd as mt,rf as xt,sa as z,sf as Dt,td as V,ud as L,uf as Mt,vf as yt,vg as Pt,wa as C,xa as l,xd as N,xf as St,ya as n,yf as It,za as u,zd as pt}from"./chunk-HZWIHY3V.js";import"./chunk-PHUH23IY.js";var g=(()=>{class t{constructor(){this.http=d(X)}getFilteredClients(e,a,p,M,$){let k=new W().set("displayName",M).set("orphansOnly",p.toString()).set("sortOrder",a).set("orderBy",e);return $&&(k=k.set("officeId",$)),this.http.get("/clients",{params:k})}getClientCollateral(e,a){return this.http.get(`/clients/${e}/collaterals/${a}`)}updateClientCollateral(e,a,p){return this.http.put(`/clients/${e}/collaterals/${a}`,p)}deleteCollateral(e,a){return this.http.delete(`/clients/${e}/collaterals/${a}`)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qt=()=>["edit"];function Ht(t,s){t&1&&(l(0,"button",16),u(1,"fa-icon",17),o(2),r(3,"translate"),n()),t&2&&(C("routerLink",R(4,qt)),i(2),h(" ",m(3,2,"labels.buttons.Edit")," "))}function kt(t,s){if(t&1){let e=J();l(0,"button",18),E("click",function(){G(e);let p=K();return U(p.deleteCollateral())}),u(1,"fa-icon",19),o(2),r(3,"translate"),n()}t&2&&(i(2),h(" ",m(3,1,"labels.buttons.Delete")," "))}function jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.ID")))}function $t(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),h(" ",e.loanId," ")}}function Gt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment")))}function Ut(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),c(e.lastRepayment)}}function Qt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Remaining Amount")))}function zt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"formatNumber"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.remainingAmount))}}function Jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment Date")))}function Kt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"dateFormat"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.lastRepaymentDate))}}function Wt(t,s){t&1&&u(0,"tr",22)}function Xt(t,s){t&1&&u(0,"tr",23)}var A=(()=>{class t{constructor(){this.route=d(P),this.collateralsService=d(g),this.router=d(T),this.dialog=d(Y),this.collateralColumns=["ID","Last Repayment","Remaining Amount","Last Repayment Date"],this.route.data.subscribe(e=>{this.clientCollateralData=e.clientCollateralData})}deleteCollateral(){this.dialog.open(bt,{data:{deleteContext:`collateral ${this.clientCollateralData.id}`}}).afterClosed().subscribe(a=>{a.delete&&this.collateralsService.deleteCollateral(this.clientCollateralData.clientId,this.clientCollateralData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-view-collateral"]],decls:42,vars:27,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"client-collateral-card"],[1,"content"],[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","group-details-container","m-b-30"],["mat-table","",1,"mat-elevation-z1","m-b-30",3,"dataSource"],["matColumnDef","ID"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Last Repayment"],["matColumnDef","Remaining Amount"],["matColumnDef","Last Repayment Date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(a,p){a&1&&(l(0,"div",0),f(1,Ht,4,5,"button",1)(2,kt,4,3,"button",2),n(),l(3,"mat-card",3)(4,"mat-card-content",4),o(5,"\\ "),l(6,"div",5)(7,"h3"),o(8),r(9,"translate"),n(),l(10,"div",6)(11,"p"),o(12),r(13,"translate"),u(14,"br"),o(15),r(16,"translate"),u(17,"br"),o(18),r(19,"translate"),u(20,"br"),o(21),r(22,"translate"),u(23,"br"),n()(),l(24,"h3"),o(25),r(26,"translate"),n(),l(27,"table",7),_(28,8),f(29,jt,3,3,"th",9)(30,$t,2,1,"td",10),x(),_(31,11),f(32,Gt,3,3,"th",9)(33,Ut,2,1,"td",10),x(),_(34,12),f(35,Qt,3,3,"th",9)(36,zt,3,3,"td",10),x(),_(37,13),f(38,Jt,3,3,"th",9)(39,Kt,3,3,"td",10),x(),f(40,Wt,1,0,"tr",14)(41,Xt,1,0,"tr",15),n()()()()),a&2&&(i(),C("mifosxHasPermission","UPDATE_CLIENT_COLLATERAL_PRODUCT"),i(),C("mifosxHasPermission","DELETE_CLIENT_COLLATERAL_PRODUCT"),i(6),c(m(9,15,"labels.heading.Client Collateral Details")),i(4),b(" ",m(13,17,"labels.inputs.name"),": ",p.clientCollateralData.name),i(3),b(" ",m(16,19,"labels.inputs.Quantity"),": ",p.clientCollateralData.quantity),i(3),b(" ",m(19,21,"labels.inputs.Total Value"),": ",p.clientCollateralData.total),i(3),b(" ",m(22,23,"labels.inputs.Total Collateral Value"),": ",p.clientCollateralData.totalCollateral),i(4),c(m(26,25,"labels.heading.Transaction Details")),i(2),C("dataSource",p.clientCollateralData.loanTransactionData),i(13),C("matHeaderRowDef",p.collateralColumns),i(),C("matRowDefColumns",p.collateralColumns))},dependencies:[v,V,B,L,N,O,ft,ht,vt,xt,_t,Dt,gt,Mt,yt,It,St,wt,Ct,F,Et],styles:[".client-collateral-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var q=(()=>{class t{constructor(){this.collateralsService=d(g)}resolve(e){let a=e.parent.paramMap.get("clientId"),p=e.parent.paramMap.get("collateralId");return this.collateralsService.getClientCollateral(a,p)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac})}}return t})();var Yt=()=>["../../"];function Zt(t,s){t&1&&(l(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),l(4,"strong"),o(5),r(6,"translate"),n()()),t&2&&(i(),b(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),i(4),c(m(6,7,"labels.commons.required")))}var H=(()=>{class t{constructor(){this.formBuilder=d(mt),this.route=d(P),this.router=d(T),this.settingsService=d(Z),this.collateralService=d(g),this.route.data.subscribe(e=>{this.collateralDetails=e.clientCollateralData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientCollateralForm()}createClientCollateralForm(){this.clientCollateralForm=this.formBuilder.group({quantity:["",et.required],name:[{value:"",disabled:!0}],total:[{value:"",disabled:!0}],totalCollateral:[{value:"",disabled:!0}]}),this.clientCollateralForm.patchValue({name:this.collateralDetails.name,quantity:this.collateralDetails.quantity,total:this.collateralDetails.total,totalCollateral:this.collateralDetails.totalCollateral})}submit(){let e=this.collateralDetails.id,a=this.clientCollateralForm.value.quantity,p=this.settingsService.language.code,M={quantity:a,locale:p};this.collateralService.updateClientCollateral(this.clientId,e,M).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-edit-collateral"]],decls:34,vars:23,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","quantity"],["matInput","","required","","formControlName","total"],["matInput","","required","","formControlName","totalCollateral"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(a,p){a&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),E("ngSubmit",function(){return p.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),o(8),r(9,"translate"),n(),u(10,"input",3),n(),l(11,"mat-form-field")(12,"mat-label"),o(13),r(14,"translate"),n(),u(15,"input",4),Q(16,Zt,7,9,"mat-error"),n(),l(17,"mat-form-field")(18,"mat-label"),o(19),r(20,"translate"),n(),u(21,"input",5),n(),l(22,"mat-form-field")(23,"mat-label"),o(24),r(25,"translate"),n(),u(26,"input",6),n()()()(),l(27,"mat-card-actions",7)(28,"button",8),o(29),r(30,"translate"),n(),l(31,"button",9),o(32),r(33,"translate"),n()()()()()),a&2&&(i(2),C("formGroup",p.clientCollateralForm),i(6),c(m(9,10,"labels.inputs.name")),i(5),c(m(14,12,"labels.inputs.Quantity")),i(3),z(p.clientCollateralForm.controls.quantity.hasError("required")?16:-1),i(3),c(m(20,14,"labels.inputs.Total")),i(5),c(m(25,16,"labels.inputs.Total Collateral Value")),i(4),C("routerLink",R(22,Yt)),i(),h(" ",m(30,18,"labels.buttons.Cancel")," "),i(2),C("disabled",!p.clientCollateralForm.valid),i(),h(" ",m(33,20,"labels.buttons.Submit")," "))},dependencies:[v,V,nt,tt,it,at,rt,lt,ot,B,L,N,pt,dt,st,ct,ut,O,F],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var te=[{path:"",data:{title:"Collateral",breadcrumb:"Collateral",routeParamBreadcrumb:!1},children:[{path:":collateralId",data:{title:"Collateral View",routeParamBreadcrumb:"collateralId"},children:[{path:"",component:A,resolve:{clientCollateralData:q}},{path:"edit",data:{title:"edit",routeParamBreadcrumb:"edit"},component:H,resolve:{clientCollateralData:q}}]}]}],Bt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({providers:[q],imports:[j.forChild(te),j]})}}return t})();var Je=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({imports:[v,Bt,Tt,Pt,Rt,A,H]})}}return t})();export{Je as CollateralsModule}; +import{$c as at,$d as ht,Af as wt,Cc as Y,Da as _,Dd as st,Ea as x,Eb as v,Ed as ct,G as y,Ga as J,H as S,Ia as E,Id as dt,Ja as K,K as d,Kd as ut,L as G,Lc as F,M as U,Nb as W,Qb as X,Rg as Tt,Tc as Z,Ua as o,Ud as Ct,Va as c,Wa as h,Xa as b,Xd as ft,Yc as tt,Zc as et,_c as it,ca as i,de as bt,eb as R,ed as nt,eg as Et,gc as P,hb as r,hd as lt,hg as Rt,ib as m,ja as I,jc as T,ka as w,kc as B,kd as ot,mc as j,na as f,nd as rt,nf as vt,of as gt,pf as _t,qc as O,ra as Q,rd as mt,rf as xt,sa as z,sf as Dt,td as V,ud as L,uf as Mt,vf as yt,vg as Pt,wa as C,xa as l,xd as N,xf as St,ya as n,yf as It,za as u,zd as pt}from"./chunk-2XE77LT4.js";import"./chunk-PHUH23IY.js";var g=(()=>{class t{constructor(){this.http=d(X)}getFilteredClients(e,a,p,M,$){let k=new W().set("displayName",M).set("orphansOnly",p.toString()).set("sortOrder",a).set("orderBy",e);return $&&(k=k.set("officeId",$)),this.http.get("/clients",{params:k})}getClientCollateral(e,a){return this.http.get(`/clients/${e}/collaterals/${a}`)}updateClientCollateral(e,a,p){return this.http.put(`/clients/${e}/collaterals/${a}`,p)}deleteCollateral(e,a){return this.http.delete(`/clients/${e}/collaterals/${a}`)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var qt=()=>["edit"];function Ht(t,s){t&1&&(l(0,"button",16),u(1,"fa-icon",17),o(2),r(3,"translate"),n()),t&2&&(C("routerLink",R(4,qt)),i(2),h(" ",m(3,2,"labels.buttons.Edit")," "))}function kt(t,s){if(t&1){let e=J();l(0,"button",18),E("click",function(){G(e);let p=K();return U(p.deleteCollateral())}),u(1,"fa-icon",19),o(2),r(3,"translate"),n()}t&2&&(i(2),h(" ",m(3,1,"labels.buttons.Delete")," "))}function jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.ID")))}function $t(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),h(" ",e.loanId," ")}}function Gt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment")))}function Ut(t,s){if(t&1&&(l(0,"td",21),o(1),n()),t&2){let e=s.$implicit;i(),c(e.lastRepayment)}}function Qt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Remaining Amount")))}function zt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"formatNumber"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.remainingAmount))}}function Jt(t,s){t&1&&(l(0,"th",20),o(1),r(2,"translate"),n()),t&2&&(i(),c(m(2,1,"labels.inputs.Last Repayment Date")))}function Kt(t,s){if(t&1&&(l(0,"td",21),o(1),r(2,"dateFormat"),n()),t&2){let e=s.$implicit;i(),c(m(2,1,e.lastRepaymentDate))}}function Wt(t,s){t&1&&u(0,"tr",22)}function Xt(t,s){t&1&&u(0,"tr",23)}var A=(()=>{class t{constructor(){this.route=d(P),this.collateralsService=d(g),this.router=d(T),this.dialog=d(Y),this.collateralColumns=["ID","Last Repayment","Remaining Amount","Last Repayment Date"],this.route.data.subscribe(e=>{this.clientCollateralData=e.clientCollateralData})}deleteCollateral(){this.dialog.open(bt,{data:{deleteContext:`collateral ${this.clientCollateralData.id}`}}).afterClosed().subscribe(a=>{a.delete&&this.collateralsService.deleteCollateral(this.clientCollateralData.clientId,this.clientCollateralData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-view-collateral"]],decls:42,vars:27,consts:[[1,"layout-row","align-end","gap-2px","responsive-column","container","m-b-20"],["mat-raised-button","","color","primary",3,"routerLink",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],[1,"client-collateral-card"],[1,"content"],[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","group-details-container","m-b-30"],["mat-table","",1,"mat-elevation-z1","m-b-30",3,"dataSource"],["matColumnDef","ID"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Last Repayment"],["matColumnDef","Remaining Amount"],["matColumnDef","Last Repayment Date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"routerLink"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(a,p){a&1&&(l(0,"div",0),f(1,Ht,4,5,"button",1)(2,kt,4,3,"button",2),n(),l(3,"mat-card",3)(4,"mat-card-content",4),o(5,"\\ "),l(6,"div",5)(7,"h3"),o(8),r(9,"translate"),n(),l(10,"div",6)(11,"p"),o(12),r(13,"translate"),u(14,"br"),o(15),r(16,"translate"),u(17,"br"),o(18),r(19,"translate"),u(20,"br"),o(21),r(22,"translate"),u(23,"br"),n()(),l(24,"h3"),o(25),r(26,"translate"),n(),l(27,"table",7),_(28,8),f(29,jt,3,3,"th",9)(30,$t,2,1,"td",10),x(),_(31,11),f(32,Gt,3,3,"th",9)(33,Ut,2,1,"td",10),x(),_(34,12),f(35,Qt,3,3,"th",9)(36,zt,3,3,"td",10),x(),_(37,13),f(38,Jt,3,3,"th",9)(39,Kt,3,3,"td",10),x(),f(40,Wt,1,0,"tr",14)(41,Xt,1,0,"tr",15),n()()()()),a&2&&(i(),C("mifosxHasPermission","UPDATE_CLIENT_COLLATERAL_PRODUCT"),i(),C("mifosxHasPermission","DELETE_CLIENT_COLLATERAL_PRODUCT"),i(6),c(m(9,15,"labels.heading.Client Collateral Details")),i(4),b(" ",m(13,17,"labels.inputs.name"),": ",p.clientCollateralData.name),i(3),b(" ",m(16,19,"labels.inputs.Quantity"),": ",p.clientCollateralData.quantity),i(3),b(" ",m(19,21,"labels.inputs.Total Value"),": ",p.clientCollateralData.total),i(3),b(" ",m(22,23,"labels.inputs.Total Collateral Value"),": ",p.clientCollateralData.totalCollateral),i(4),c(m(26,25,"labels.heading.Transaction Details")),i(2),C("dataSource",p.clientCollateralData.loanTransactionData),i(13),C("matHeaderRowDef",p.collateralColumns),i(),C("matRowDefColumns",p.collateralColumns))},dependencies:[v,V,B,L,N,O,ft,ht,vt,xt,_t,Dt,gt,Mt,yt,It,St,wt,Ct,F,Et],styles:[".client-collateral-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .group-details-container[_ngcontent-%COMP%]{border:1px solid;padding:1%}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.select-row[_ngcontent-%COMP%]:hover, .tab-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var q=(()=>{class t{constructor(){this.collateralsService=d(g)}resolve(e){let a=e.parent.paramMap.get("clientId"),p=e.parent.paramMap.get("collateralId");return this.collateralsService.getClientCollateral(a,p)}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275prov=y({token:t,factory:t.\u0275fac})}}return t})();var Yt=()=>["../../"];function Zt(t,s){t&1&&(l(0,"mat-error"),o(1),r(2,"translate"),r(3,"translate"),l(4,"strong"),o(5),r(6,"translate"),n()()),t&2&&(i(),b(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),i(4),c(m(6,7,"labels.commons.required")))}var H=(()=>{class t{constructor(){this.formBuilder=d(mt),this.route=d(P),this.router=d(T),this.settingsService=d(Z),this.collateralService=d(g),this.route.data.subscribe(e=>{this.collateralDetails=e.clientCollateralData}),this.clientId=this.route.parent.snapshot.params.clientId}ngOnInit(){this.createClientCollateralForm()}createClientCollateralForm(){this.clientCollateralForm=this.formBuilder.group({quantity:["",et.required],name:[{value:"",disabled:!0}],total:[{value:"",disabled:!0}],totalCollateral:[{value:"",disabled:!0}]}),this.clientCollateralForm.patchValue({name:this.collateralDetails.name,quantity:this.collateralDetails.quantity,total:this.collateralDetails.total,totalCollateral:this.collateralDetails.totalCollateral})}submit(){let e=this.collateralDetails.id,a=this.clientCollateralForm.value.quantity,p=this.settingsService.language.code,M={quantity:a,locale:p};this.collateralService.updateClientCollateral(this.clientId,e,M).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=I({type:t,selectors:[["mifosx-edit-collateral"]],decls:34,vars:23,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["matInput","","required","","formControlName","name"],["matInput","","required","","formControlName","quantity"],["matInput","","required","","formControlName","total"],["matInput","","required","","formControlName","totalCollateral"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(a,p){a&1&&(l(0,"div",0)(1,"mat-card")(2,"form",1),E("ngSubmit",function(){return p.submit()}),l(3,"mat-card-content")(4,"div",2)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),o(8),r(9,"translate"),n(),u(10,"input",3),n(),l(11,"mat-form-field")(12,"mat-label"),o(13),r(14,"translate"),n(),u(15,"input",4),Q(16,Zt,7,9,"mat-error"),n(),l(17,"mat-form-field")(18,"mat-label"),o(19),r(20,"translate"),n(),u(21,"input",5),n(),l(22,"mat-form-field")(23,"mat-label"),o(24),r(25,"translate"),n(),u(26,"input",6),n()()()(),l(27,"mat-card-actions",7)(28,"button",8),o(29),r(30,"translate"),n(),l(31,"button",9),o(32),r(33,"translate"),n()()()()()),a&2&&(i(2),C("formGroup",p.clientCollateralForm),i(6),c(m(9,10,"labels.inputs.name")),i(5),c(m(14,12,"labels.inputs.Quantity")),i(3),z(p.clientCollateralForm.controls.quantity.hasError("required")?16:-1),i(3),c(m(20,14,"labels.inputs.Total")),i(5),c(m(25,16,"labels.inputs.Total Collateral Value")),i(4),C("routerLink",R(22,Yt)),i(),h(" ",m(30,18,"labels.buttons.Cancel")," "),i(2),C("disabled",!p.clientCollateralForm.valid),i(),h(" ",m(33,20,"labels.buttons.Submit")," "))},dependencies:[v,V,nt,tt,it,at,rt,lt,ot,B,L,N,pt,dt,st,ct,ut,O,F],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var te=[{path:"",data:{title:"Collateral",breadcrumb:"Collateral",routeParamBreadcrumb:!1},children:[{path:":collateralId",data:{title:"Collateral View",routeParamBreadcrumb:"collateralId"},children:[{path:"",component:A,resolve:{clientCollateralData:q}},{path:"edit",data:{title:"edit",routeParamBreadcrumb:"edit"},component:H,resolve:{clientCollateralData:q}}]}]}],Bt=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({providers:[q],imports:[j.forChild(te),j]})}}return t})();var Je=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=S({imports:[v,Bt,Tt,Pt,Rt,A,H]})}}return t})();export{Je as CollateralsModule}; diff --git a/browser/fixed-deposits.module-HW4KMBSS.js b/browser/fixed-deposits.module-74SYSHH3.js similarity index 99% rename from browser/fixed-deposits.module-HW4KMBSS.js rename to browser/fixed-deposits.module-74SYSHH3.js index e866a7a6d..ab6c4ff59 100644 --- a/browser/fixed-deposits.module-HW4KMBSS.js +++ b/browser/fixed-deposits.module-74SYSHH3.js @@ -1,2 +1,2 @@ -import{a as sn}from"./chunk-55OSB4IK.js";import{a as yi,b as Ii}from"./chunk-6SG2PADU.js";import{a as cn}from"./chunk-Z3NF3G2N.js";import{$b as oe,$c as pt,$d as ut,Ac as Xt,Ad as Li,Ae as Re,Af as Ht,Bc as Be,Bg as on,Cc as Ut,Cd as Gi,Da as b,Db as se,Dc as Zt,Dd as nt,Df as ve,Ea as P,Eb as y,Ec as te,Ed as Ct,Fc as ee,G as Gt,Ga as F,Gc as ie,Gg as an,H as He,Hd as Pt,Ia as M,Id as ot,If as Ki,Ig as rn,Ja as _,Jd as Ft,Jf as Qi,K as x,Kd as dt,Kf as Yi,L as S,Lc as w,Ld as At,M as A,Na as ht,Nb as le,Nd as Ot,Oa as vt,Pa as Dt,Pd as me,Qa as k,Qb as Ni,Qd as Mt,Qg as ei,Rd as Tt,Rg as pn,Sc as et,Sd as St,T as Jt,Tc as U,Td as Ue,Ua as a,Ud as yt,Va as m,Wa as u,Wd as It,We as Ui,Xa as T,Xd as de,Ya as ce,Yb as Ie,Yc as rt,Zb as Fe,Zc as V,_ as Ri,_c as it,_f as Ji,ac as ae,bb as _t,bc as we,ca as i,cd as Z,ce as he,da as $e,de as ke,df as ji,dg as Xi,eb as R,ed as ct,ef as Wi,eg as ue,fb as Ge,fd as jt,fg as Zi,gc as N,gd as zi,gg as tn,hb as r,hc as Vi,hd as st,hf as Ye,hg as en,ib as c,if as Je,ja as O,jb as E,jc as W,jf as Xe,ka as Le,kc as tt,kd as lt,ke as je,kf as Ze,lb as at,lc as qi,le as We,lf as ne,lg as $t,mc as Oi,me as Ke,mf as Wt,na as C,nd as gt,nf as wt,of as Et,pa as Te,pc as Ee,pf as Bt,qb as Se,qc as B,ra as h,rd as mt,re as Qe,rf as kt,sa as v,sb as Ae,sf as Rt,ta as $,tb as Oe,td as I,ua as L,ud as Y,uf as Nt,va as G,vd as Hi,vf as Vt,vg as nn,wa as d,wd as $i,xa as n,xd as xt,xf as qt,xg as ti,ya as o,yf as zt,yg as Ne,za as g,zb as ye,zd as bt}from"./chunk-HZWIHY3V.js";import{a as H,b as X}from"./chunk-PHUH23IY.js";var mn=()=>({confirm:!0}),ii=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-calculate-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Calculate Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to calculate interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,mn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var dn=()=>({confirm:!0}),ni=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-post-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Post Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to post interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,dn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var un=()=>({confirm:!0}),ze=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-toggle-withhold-tax-dialog"]],decls:17,vars:25,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","",3,"color","mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),r(3,"translate"),o(),n(4,"div",1)(5,"p"),a(6),r(7,"translate"),r(8,"translate"),r(9,"translate"),o()(),n(10,"mat-dialog-actions",2)(11,"button",3),a(12),r(13,"translate"),o(),n(14,"button",4),a(15),r(16,"translate"),o()()),l&2&&(i(),T(" ",c(2,10,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(3,12,"labels.heading.Withhold Tax"),` -`),i(5),ce(" ",c(7,14,"labels.text.Are you sure you want to")," ",c(8,16,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(9,18,"labels.text.withhold tax for this account")," ? "),i(6),m(c(13,20,"labels.buttons.Cancel")),i(2),d("color",_t(p.data.isEnable?"accent":"warn"))("mat-dialog-close",R(24,un)),i(),u(" ",c(16,22,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var oi=class{constructor(s){this.setOptions(s),this.setButtons(s)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(s){switch(s){case"Active":this.buttonsArray=[{name:"Premature Close",icon:"fa fa-arrow-left"},{name:"Calculate Interest",icon:"fa fa-table"},{name:"Undo Activation",icon:"fa fa-undo"}];break;case"Matured":this.buttonsArray=[{name:"Close",icon:"fa fa-arrow-right"},{name:"Calculate Interest",icon:"fa fa-table"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"fa fa-pencil "},{name:"Approve",icon:"fa fa-check"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"fa fa-undo"},{name:"Activate",icon:"fa fa-check"}];break;default:this.buttonsArray=[]}}setOptions(s){switch(s){case"Active":case"Matured":this.optionArray=[{name:"Post Interest"},{name:"Add Charge"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject"},{name:"Withdrawn by Client"},{name:"Add Charge"},{name:"Delete"}];break;case"Approved":default:this.optionArray=[]}}addOption(s){this.optionArray.push(s)}};var j=(()=>{class t{constructor(){this.http=x(Ni)}getFixedDepositsAccountData(e){let l=new le().set("associations","all");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}deleteFixedDepositsAccount(e){return this.http.delete(`/fixeddepositaccounts/${e}`)}executeFixedDepositsAccountCommand(e,l,p){let f=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}`,p,{params:f})}getFixedDepositsAccountTransaction(e,l){return this.http.get(`/fixeddepositaccounts/${e}/transactions/${l}`)}executeFixedDepositsAccountTransactionsCommand(e,l,p,f){let D=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}/transactions/${f}`,p,{params:D})}getFixedDepositsAccountClosureTemplate(e){let l=new le().set("command","close");return this.http.get(`/fixeddepositaccounts/${e}/template`,{params:l})}getFixedDepositsAccountTransactionTemplate(e){return this.http.get(`/fixeddepositaccounts/${e}/transactions/template`)}getFixedDepositsAccountTemplate(e,l){let p=new le().set("clientId",e);return p=l?p.set("productId",l):p,this.http.get("/fixeddepositaccounts/template",{params:p})}getFixedDepositsAccountAndTemplate(e){let l=new le().set("associations","charges,+linkedAccount").set("template","true");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}createFixedDepositAccount(e){return this.http.post("/fixeddepositaccounts",e)}updateFixedDepositAccount(e,l){return this.http.put(`/fixeddepositaccounts/${e}`,l)}getStandingInstructions(e,l,p,f,D){let q=new le().set("clientId",e).set("clientName",l).set("fromAccountId",p).set("fromAccountType","2").set("locale",f).set("dateFormat",D);return this.http.get("/standinginstructions",{params:q})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fn=()=>["./general"],gn=()=>["./interest-rate-chart"],xn=()=>["./charges"],Cn=()=>["./transactions"],_n=()=>["./standing-instructions"],hn=t=>["./datatables",t];function vn(t,s){if(t&1&&(n(0,"span",21),g(1,"mifosx-account-number",18),o()),t&2){let e=_();i(),d("accountNo",_t(e.fixedDepositsAccountData.clientAccountNo))}}function Dn(t,s){if(t&1&&(n(0,"div",22)(1,"h3",31),a(2),r(3,"translate"),o(),n(4,"table",32)(5,"tbody")(6,"tr")(7,"td",33),a(8),r(9,"translate"),o(),n(10,"td",34),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td",33),a(15),r(16,"translate"),o(),n(17,"td",34),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Account Overview")),i(6),m(c(9,7,"labels.inputs.Current Balance")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Deposit Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function bn(t,s){if(t&1){let e=F();n(0,"button",35),M("click",function(){let p=S(e).$implicit,f=_();return A(f.doAction(p.name))}),g(1,"i",36),a(2),r(3,"translateKey"),o()}if(t&2){let e=s.$implicit;i(),d("ngClass",_t(e.icon)),i(),u(" ",E(3,3,e.name,"menus")," ")}}function Pn(t,s){if(t&1){let e=F();n(0,"span")(1,"button",35),M("click",function(){let p=S(e).$implicit,f=_(2);return A(f.doAction(p.name))}),a(2),r(3,"translateKey"),o()()}if(t&2){let e=s.$implicit;i(2),m(E(3,1,e.name,"menus"))}}function Mn(t,s){if(t&1&&(n(0,"button",37),a(1),r(2,"translateKey"),o(),n(3,"mat-menu",null,5),L(5,Pn,4,4,"span",null,$),o()),t&2){let e=k(4),l=_();d("matMenuTriggerFor",e),i(),m(E(2,2,"More","menus")),i(4),G(l.buttonConfig.options)}}function Tn(t,s){if(t&1&&(n(0,"span")(1,"a",30,6),a(3),r(4,"translate"),o()()),t&2){let e=k(2);i(),d("routerLink",R(5,Cn))("active",e.isActive),i(2),u(" ",c(4,3,"labels.inputs.Transactions")," ")}}function Sn(t,s){if(t&1&&(n(0,"a",30,7),a(2),r(3,"translate"),o()),t&2){let e=k(1);d("routerLink",R(5,_n))("active",e.isActive),i(2),u(" ",c(3,3,"labels.inputs.Standing Instructions")," ")}}function An(t,s){if(t&1&&(n(0,"a",30,8),a(2),o()),t&2){let e=k(1),l=_().$implicit;d("routerLink",Ge(3,hn,l.registeredTableName))("active",e.isActive),i(2),u(" ",l.registeredTableName," ")}}function On(t,s){if(t&1&&C(0,An,3,5,"a",38),t&2){let e=s.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.fixedDepositsService=x(j),this.savingsService=x($t),this.dialog=x(Ut),this.showTransactions=!1,this.route.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.savingsDatatables=e.savingsDatatables,this.currency=this.fixedDepositsAccountData.currency;let l=e.fixedDepositsAccountData.status;this.showTransactions=l.id>=300}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.fixedDepositsAccountData.status.value;this.buttonConfig=new oi(e),this.fixedDepositsAccountData.taxGroup&&e==="Active"&&(this.fixedDepositsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax"}):this.buttonConfig.addOption({name:"Enable Withhold Tax"}))}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}doAction(e){switch(e){case"Approve":case"Reject":case"Activate":case"Close":case"Undo Approval":case"Undo Activation":case"Add Charge":case"Withdrawn by Client":case"Premature Close":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteFixedDepositsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break}}deleteFixedDepositsAccount(){this.dialog.open(ke,{data:{deleteContext:`fixed deposit account with id: ${this.fixedDepositsAccountData.id}`}}).afterClosed().subscribe(l=>{l.delete&&this.fixedDepositsService.deleteFixedDepositsAccount(this.fixedDepositsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(ii).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(ni).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!0}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!1}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-view"]],decls:54,vars:44,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["IRC","routerLinkActive"],["charges","routerLinkActive"],["tabPanel",""],["More","matMenu"],["transactions","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"accountNo"],[1,"account-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Fixed Deposit account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],[1,"flex-100"],[1,"account-overview","flex-100"],[1,"flex-70"],[1,"r-amount","flex-30"],["mat-menu-item","",3,"click"],[3,"ngClass"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(l,p){if(l&1&&(n(0,"mat-card",9)(1,"mat-card-header",10)(2,"mat-card-title-group",11)(3,"div",12)(4,"div"),g(5,"img",13),r(6,"translate"),o()(),n(7,"div",14)(8,"mat-card-title")(9,"div",15)(10,"div",16)(11,"h3"),g(12,"i",17),r(13,"statusLookup"),a(14),r(15,"translate"),g(16,"mifosx-account-number",18),o(),n(17,"span",19)(18,"span",20),a(19),r(20,"translate"),o(),a(21),h(22,vn,2,2,"span",21),o()(),h(23,Dn,20,21,"div",22),n(24,"div",23)(25,"button",24)(26,"mat-icon",25),g(27,"fa-icon",26),o()()()()()(),n(28,"mat-menu",null,0),L(30,bn,4,6,"button",27,$),h(32,Mn,7,5),o()()(),n(33,"mat-card-content",28)(34,"nav",29)(35,"a",30,1),a(37),r(38,"translate"),o(),n(39,"a",30,2),a(41),r(42,"translate"),o(),h(43,Tn,5,6,"span"),n(44,"a",30,3),a(46),r(47,"translate"),o(),h(48,Sn,4,6,"a",30),L(49,On,1,1,"a",30,$),o(),n(51,"mat-tab-nav-panel",null,4),g(53,"router-outlet"),o()()()),l&2){let f=k(29),D=k(36),q=k(40),re=k(45),pe=k(52);i(5),d("matTooltip",_t(c(6,27,"tooltips.Fixed Deposits Account")))("src","assets/images/fd_account_placeholder.png",Ri),i(7),d("ngClass",c(13,29,p.fixedDepositsAccountData.status.code))("matTooltip",p.fixedDepositsAccountData.status.value),i(2),T(" ",c(15,31,"labels.inputs.Fixed Deposit Product")," : ",p.fixedDepositsAccountData.depositProductName," "),i(2),d("accountNo",_t(p.fixedDepositsAccountData.accountNo)),i(3),u("",c(20,33,"labels.text."+p.entityType)," :"),i(2),u(" ",p.fixedDepositsAccountData.clientName||p.fixedDepositsAccountData.groupName," "),i(),v(p.fixedDepositsAccountData.clientAccountNo?22:-1),i(),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?23:-1),i(2),d("matMenuTriggerFor",f),i(5),G(p.buttonConfig.singleButtons),i(2),v(p.buttonConfig.options.length?32:-1),i(2),d("tabPanel",pe),i(),d("routerLink",R(41,fn))("active",D.isActive),i(2),u(" ",c(38,35,"labels.inputs.General")," "),i(2),d("routerLink",R(42,gn))("active",q.isActive),i(2),u(" ",c(42,37,"labels.inputs.Interest Rate Chart")," "),i(2),v(p.showTransactions?43:-1),i(),d("routerLink",R(43,xn))("active",re.isActive),i(2),u(" ",c(47,39,"labels.inputs.Charges")," "),i(2),v(p.fixedDepositsAccountData.clientId?48:-1),i(),G(p.savingsDatatables)}},dependencies:[y,Se,I,tt,Y,xt,de,Li,$i,Gi,me,Hi,an,Ee,Ke,Qe,ut,We,je,Ki,Qi,qi,Yi,Vi,se,w,It,Zi],encapsulation:2})}}return t})();function yn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function In(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function Fn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function wn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function En(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Bn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function kn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Rn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Nn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Vn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",21),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function qn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",22),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function zn(t,s){if(t&1){let e=F();n(0,"td",18)(1,"button",19),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Vn,4,3,"span",20)(3,qn,4,3,"span",20),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Hn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function $n(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Ln(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Gn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function Un(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function jn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Wn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Kn(t,s){if(t&1&&(n(0,"td",35),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Qn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Yn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Jn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Xn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function Zn(t,s){t&1&&g(0,"tr",36)}function to(t,s){t&1&&g(0,"tr",37)}function eo(t,s){if(t&1&&(n(0,"table",27),b(1,28),C(2,Hn,3,3,"th",7)(3,$n,2,1,"td",8),P(),b(4,29),C(5,Ln,3,3,"th",7)(6,Gn,2,1,"td",8),P(),b(7,30),C(8,Un,3,3,"th",7)(9,jn,3,3,"td",8),P(),b(10,31),C(11,Wn,3,3,"th",7)(12,Kn,2,2,"td",32),P(),b(13,33),C(14,Qn,3,3,"th",7)(15,Yn,2,1,"td",8),P(),b(16,34),C(17,Jn,3,3,"th",7)(18,Xn,3,3,"td",8),P(),C(19,Zn,1,0,"tr",14)(20,to,1,0,"tr",15),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function io(t,s){if(t&1&&(n(0,"td",18)(1,"div",23)(2,"mat-card",24)(3,"h4",25),a(4),r(5,"translate"),o(),C(6,eo,21,3,"table",26),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives==null?null:e.incentives.length)}}function no(t,s){t&1&&g(0,"tr",36)}function oo(t,s){t&1&&g(0,"tr",37)}function ao(t,s){t&1&&g(0,"tr",38)}var ri=(()=>{class t{constructor(){this.route=x(N),this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.route.parent.data.subscribe(e=>{this.interestRateChartData=e.fixedDepositsAccountData.accountChart.chartSlabs})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-interest-rate-chart-tab"]],decls:29,vars:7,consts:[["chartsTable",""],[1,"tab-container","mat-typography"],[1,"align-start-center"],[1,"m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-fill","incentives"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()()(),n(6,"div",4)(7,"table",5,0),b(9,6),C(10,yn,3,3,"th",7)(11,In,3,6,"td",8),P(),b(12,9),C(13,Fn,3,3,"th",7)(14,wn,4,6,"td",8),P(),b(15,10),C(16,En,3,3,"th",7)(17,Bn,3,3,"td",8),P(),b(18,11),C(19,kn,3,3,"th",7)(20,Rn,2,1,"td",8),P(),b(21,12),C(22,Nn,3,3,"th",7)(23,zn,4,2,"td",8),P(),b(24,13),C(25,io,7,6,"td",8),P(),C(26,no,1,0,"tr",14)(27,oo,1,0,"tr",15)(28,ao,1,0,"tr",16),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Interest Rates")),i(3),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,ye,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var po=t=>["/","journal-entry","view",t];function co(t,s){if(t&1){let e=F();n(0,"div",5)(1,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideReversed())}),a(2),r(3,"translate"),o(),n(4,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideAccruals())}),a(5),r(6,"translate"),o()()}if(t&2){let e=_();i(),d("formControl",e.hideReversedParam),i(),u(" ",c(3,4,"labels.inputs.Hide Reversed")),i(2),d("formControl",e.hideAccrualsParam),i(),u(" ",c(6,6,"labels.inputs.Hide Accruals"))}}function so(t,s){t&1&&(n(0,"th",22),a(1,"#"),o())}function lo(t,s){if(t&1){let e=F();n(0,"td",23),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.index;i(),u(" ",e+1," ")}}function mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.ID")))}function uo(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",e.id," ")}}function fo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Date")))}function go(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"dateFormat"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.date)," ")}}function xo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Type")))}function Co(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"translateKey"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",E(2,2,e.transactionType.value,"catalogs")," ")}}function _o(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Debit")))}function ho(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?c(2,2,e.amount):"N/A"," ")}}function vo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Credit")))}function Do(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?"N/A":c(2,2,e.amount)," ")}}function bo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Balance")))}function Po(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.runningBalance)," ")}}function Mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function To(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",26)(2,"mat-icon"),a(3,"more_vert"),o()(),n(4,"mat-menu",null,0)(6,"button",27),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),n(7,"mat-icon"),g(8,"fa-icon",28),o(),n(9,"span"),a(10),r(11,"translate"),o()(),n(12,"button",29),M("click",function(p){S(e);let f=_();return A(f.routeEdit(p))}),n(13,"mat-icon"),g(14,"fa-icon",30),o(),n(15,"span"),a(16),r(17,"translate"),o()()()()}if(t&2){let e=s.$implicit,l=k(5);i(),d("matMenuTriggerFor",l),i(9),m(c(11,4,"labels.text.View Transaction")),i(2),d("routerLink",Ge(8,po,"S"+e.id)),i(4),m(c(17,6,"tooltips.View Journal Entries"))}}function So(t,s){t&1&&g(0,"tr",31)}function Ao(t,s){t&1&&g(0,"tr",32)}var pi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dialog=x(Ut),this.displayedColumns=["row","id","transactionDate","transactionType","debit","credit","balance","actions"],this.route.parent.data.subscribe(e=>{this.transactionsData=e.fixedDepositsAccountData.transactions,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.status=e.fixedDepositsAccountData.status.value})}ngOnInit(){this.hideAccrualsParam=new Z(!1),this.hideReversedParam=new Z(!1),this.dataSource=new ve(this.transactionsData)}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}showTransactions(e){e.transfer?this.router.navigate([`account-transfers/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id],{relativeTo:this.route})}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,!this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(!this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,l){let p=this.transactionsData;(l||e)&&(p=this.transactionsData.filter(f=>!(e&&f.reversed)&&!(l&&f.transactionType.accrual))),this.dataSource=new ve(p),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}routeEdit(e){e.stopPropagation()}undoTransaction(e){}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(l,p){if(l&1&&(ht(Ui,7),ht(Wi,7)),l&2){let f;vt(f=Dt())&&(p.paginator=f.first),vt(f=Dt())&&(p.sort=f.first)}},decls:35,vars:7,consts:[["transactionMenu","matMenu"],[1,"tab-container","mat-typography"],[1,"mat-elevation-z1","m-b-25"],[1,"layout-row","align-start"],[1,"m-b-20"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","transactionDate"],["matColumnDef","transactionType"],["matColumnDef","debit"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],[1,"accruals",3,"click","formControl"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-cell","",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),a(5),r(6,"translate"),o()(),h(7,co,7,8,"div",5),o(),n(8,"table",6),b(9,7),C(10,so,2,0,"th",8)(11,lo,2,1,"td",9),P(),b(12,10),C(13,mo,3,3,"th",8)(14,uo,2,2,"td",11),P(),b(15,12),C(16,fo,3,3,"th",8)(17,go,3,4,"td",11),P(),b(18,13),C(19,xo,3,3,"th",8)(20,Co,3,5,"td",11),P(),b(21,14),C(22,_o,3,3,"th",8)(23,ho,3,4,"td",11),P(),b(24,15),C(25,vo,3,3,"th",8)(26,Do,3,4,"td",11),P(),b(27,16),C(28,bo,3,3,"th",8)(29,Po,3,4,"td",11),P(),b(30,17),C(31,Mo,3,3,"th",8)(32,To,18,10,"td",18),P(),C(33,So,1,0,"tr",19)(34,Ao,1,0,"tr",20),o()()()),l&2&&(i(5),m(c(6,5,"labels.heading.All Transactions")),i(2),v(p.checkStatus()?7:-1),i(),d("dataSource",p.dataSource),i(25),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,Se,I,it,zi,tt,Ue,wt,kt,Bt,Rt,Et,Nt,Ee,Ke,Qe,We,je,ut,Vt,zt,qt,Ht,yt,w,It,ue],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;color:#000}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .linked[_ngcontent-%COMP%]{color:#4461e2}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .accrual[_ngcontent-%COMP%]{color:#999}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var Oo=()=>({confirm:!0}),ci=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-waive-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Waive Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to waive charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,Oo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var yo=()=>({confirm:!0}),si=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-inactivate-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Inactivate Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to inactivate charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,yo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var Io=["chargesTable"],Fo=()=>[2e3];function wo(t,s){if(t&1){let e=F();n(0,"div",4)(1,"button",22),M("click",function(){S(e);let p=_();return A(p.toggleCharges())}),a(2),o()()}if(t&2){let e=_();i(2),u(" ",e.showInactiveCharges?"View Active Charges":"View Inactive Charges"," ")}}function Eo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function Bo(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.name)}}function ko(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Fee/Penalty")))}function Ro(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.penalty===!0?E(2,1,"Penalty","catalogs"):E(3,4,"Fee","catalogs")," ")}}function No(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Payment Due At")))}function Vo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeTimeType.value,"catalogs"))}}function qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due As Of")))}function zo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),o()),t&2){let e=s.$implicit;i(),m(c(2,1,e.dueDate))}}function Ho(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repeats On")))}function $o(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(7,Fo).concat(e.feeOnMonthDay),"dd MMMM"):E(3,4,"Unassigned","inputs")," ")}}function Lo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Calculation Type")))}function Go(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeCalculationType.value,"catalogs"))}}function Uo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due")))}function jo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amount)," ")}}function Wo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Paid")))}function Ko(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountPaid)," ")}}function Qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Waived")))}function Yo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountWaived)," ")}}function Jo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Outstanding")))}function Xo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountOutstanding)," ")}}function Zo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function ta(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.editCharge(f))}),g(2,"i",28),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Charge")))}function ea(t,s){if(t&1){let e=F();n(0,"button",29),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.deleteCharge(f.id))}),g(2,"i",30),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Charge")))}function ia(t,s){t&1&&(n(0,"span"),C(1,ta,3,4,"button",25)(2,ea,3,4,"button",26),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function na(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.payCharge(f.id))}),g(2,"i",32),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Pay Charge")))}function oa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.waiveCharge(f.id))}),g(2,"i",33),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Waive Charge")))}function aa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(3).$implicit,D=_();return D.routeEdit(p),A(D.inactivateCharge(f.id))}),g(2,"i",34),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Inactivate Charge")))}function ra(t,s){t&1&&C(0,aa,3,4,"button",25),t&2&&d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE")}function pa(t,s){if(t&1&&(n(0,"span"),C(1,na,3,4,"button",25)(2,oa,3,4,"button",25),h(3,ra,1,1,"button",31),o()),t&2){let e=_().$implicit,l=_();i(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),i(),v(l.isRecurringCharge(e)?3:-1)}}function ca(t,s){if(t&1&&(n(0,"td",24),h(1,ia,3,2,"span"),h(2,pa,4,3,"span"),o()),t&2){let e=s.$implicit,l=_();i(),v(l.fixedDepositsAccountData.status.value==="Submitted and pending approval"?1:-1),i(),v(l.fixedDepositsAccountData.status.value==="Active"&&e.amountOutstanding!==0?2:-1)}}function sa(t,s){t&1&&g(0,"tr",35)}function la(t,s){t&1&&g(0,"tr",36)}var li=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.chargesData=this.fixedDepositsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(l=>l.isActive):[];this.dataSource=new ve(e)}toggleCharges(){if(this.showInactiveCharges=!this.showInactiveCharges,this.showInactiveCharges){let e=this.chargesData.filter(l=>!l.isActive);this.dataSource.data=e}else{let e=this.chargesData.filter(l=>l.isActive);this.dataSource.data=e}this.chargesTableRef.renderRows()}payCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new ti({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],p={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dueDate:this.dateUtils.formatDate(D.data.value.dueDate,re),dateFormat:re,locale:q});this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"paycharge",pe,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(ci,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}inactivateCharge(e){this.dialog.open(si,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"inactivate",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],p={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dateFormat:re,locale:q});this.savingsService.editSavingsAccountCharge(this.fixedDepositsAccountData.id,pe,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ke,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.savingsService.deleteSavingsAccountCharge(this.fixedDepositsAccountData.id,e).subscribe(()=>{this.reload()})})}isRecurringCharge(e){return e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Weekly Fee"}routeEdit(e){e.stopPropagation()}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(l,p){if(l&1&&ht(Io,7),l&2){let f;vt(f=Dt())&&(p.chargesTableRef=f.first)}},decls:45,vars:7,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],[1,"fa","fa-ban"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()(),h(6,wo,3,1,"div",4),o(),n(7,"div",5)(8,"table",6,0),b(10,7),C(11,Eo,3,3,"th",8)(12,Bo,2,1,"td",9),P(),b(13,10),C(14,ko,3,3,"th",8)(15,Ro,4,7,"td",9),P(),b(16,11),C(17,No,3,3,"th",8)(18,Vo,3,4,"td",9),P(),b(19,12),C(20,qo,3,3,"th",8)(21,zo,3,3,"td",9),P(),b(22,13),C(23,Ho,3,3,"th",8)(24,$o,4,8,"td",9),P(),b(25,14),C(26,Lo,3,3,"th",8)(27,Go,3,4,"td",9),P(),b(28,15),C(29,Uo,3,3,"th",8)(30,jo,3,4,"td",9),P(),b(31,16),C(32,Wo,3,3,"th",8)(33,Ko,3,4,"td",9),P(),b(34,17),C(35,Qo,3,3,"th",8)(36,Yo,3,4,"td",9),P(),b(37,18),C(38,Jo,3,3,"th",8)(39,Xo,3,4,"td",9),P(),b(40,19),C(41,Zo,3,3,"th",8)(42,ca,3,2,"td",9),P(),C(43,sa,1,0,"tr",20)(44,la,1,0,"tr",21),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Charges")),i(2),v(p.chargesData?6:-1),i(2),d("dataSource",p.dataSource),i(35),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var ma=["instructionsTable"];function da(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Client")))}function ua(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function fa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.From Account")))}function ga(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function xa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Beneficiary")))}function Ca(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),m(e.toClient.displayName)}}function _a(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.To Account")))}function ha(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function va(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function Da(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.instructionType.value,"/",e.amount)}}function ba(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Validity")))}function Pa(t,s){if(t&1&&(n(0,"td",17),a(1),r(2,"dateFormat"),r(3,"dateFormat"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.validFrom)," to ",c(3,4,e.validTill)," ")}}function Ma(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Ta(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",20),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Standing Instruction")))}function Sa(t,s){t&1&&(n(0,"span"),C(1,Ta,3,4,"button",18),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Aa(t,s){if(t&1){let e=F();n(0,"button",22),r(1,"translate"),M("click",function(){S(e);let p=_(2).$implicit,f=_();return A(f.deleteStandingInstruction(p.id))}),g(2,"i",23),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Standing Instruction")))}function Oa(t,s){t&1&&(n(0,"span"),C(1,Aa,3,4,"button",21),o()),t&2&&(i(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ya(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",24),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.View Standing Instruction")))}function Ia(t,s){if(t&1&&(n(0,"td",17),h(1,Sa,2,1,"span"),h(2,Oa,2,1,"span"),C(3,ya,3,4,"button",18),o()),t&2){let e=s.$implicit;i(),v(e.status.value!=="Deleted"?1:-1),i(),v(e.status.value!=="Deleted"?2:-1),i(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Fa(t,s){t&1&&g(0,"tr",25)}function wa(t,s){t&1&&g(0,"tr",26)}var mi=(()=>{class t{constructor(){this.route=x(N),this.fixedDepositsService=x(j),this.dialog=x(Ut),this.accountTransfersService=x(cn),this.settingsService=x(U),this.dataSource=new ve,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsData=e.fixedDepositsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.fixedDepositsData.clientId,l=this.fixedDepositsData.clientName,p=this.fixedDepositsData.id,f=this.settingsService.language.code,D=this.settingsService.dateFormat;this.fixedDepositsService.getStandingInstructions(e,l,p,f,D).subscribe(q=>{this.instructionsData=q.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ke,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(l,p){if(l&1&&ht(ma,7),l&2){let f;vt(f=Dt())&&(p.instructionTableRef=f.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"h3"),a(3),r(4,"translate"),o()(),n(5,"div",3)(6,"table",4,0),b(8,5),C(9,da,3,3,"th",6)(10,ua,2,2,"td",7),P(),b(11,8),C(12,fa,3,3,"th",6)(13,ga,2,2,"td",7),P(),b(14,9),C(15,xa,3,3,"th",6)(16,Ca,2,1,"td",7),P(),b(17,10),C(18,_a,3,3,"th",6)(19,ha,2,2,"td",7),P(),b(20,11),C(21,va,3,3,"th",6)(22,Da,2,2,"td",7),P(),b(23,12),C(24,ba,3,3,"th",6)(25,Pa,4,6,"td",7),P(),b(26,13),C(27,Ma,3,3,"th",6)(28,Ia,4,3,"td",7),P(),C(29,Fa,1,0,"tr",14)(30,wa,1,0,"tr",15),o()()()),l&2&&(i(3),m(c(4,4,"labels.heading.All Standing Instructions")),i(3),d("dataSource",p.dataSource),i(23),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var di=(()=>{class t{constructor(){this.route=x(N),this.entityId=this.route.parent.parent.snapshot.paramMap.get("fixedDepositAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Fixed Deposit",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(l,p){l&1&&(n(0,"div",0),g(1,"mifosx-entity-datatable-tab",1),o()),l&2&&(i(),d("entityId",p.entityId)("multiRowDatatableFlag",p.multiRowDatatableFlag)("entityDatatable",p.entityDatatable))},dependencies:[y,I,on],encapsulation:2})}}return t})();var Ea=()=>["../../"];function Ba(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var ui=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveFixedDepositsAccountForm()}createApproveFixedDepositsAccountForm(){this.approveFixedDepositsAccountForm=this.formBuilder.group({approvedOnDate:["",V.required],note:[""]})}submit(){let e=this.approveFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.approveFixedDepositsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"approve",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-approve-fixed-deposits-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ba,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.approveFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Approved On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.approveFixedDepositsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,Ea)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.approveFixedDepositsAccountForm),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ka=()=>["../../"];function Ra(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var fi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectFixedDepositsAccountForm()}createRejectFixedDepositsAccountForm(){this.rejectFixedDepositsAccountForm=this.formBuilder.group({rejectedOnDate:["",V.required],note:[""]})}submit(){let e=this.rejectFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.rejectFixedDepositsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"reject",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-reject-fixed-deposits-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ra,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.rejectFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Rejected On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.rejectFixedDepositsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,ka)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.rejectFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Na=()=>["../../"];function Va(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var gi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateFixedDepositsAccountForm()}createActivateFixedDepositsAccountForm(){this.activateFixedDepositsAccountForm=this.formBuilder.group({activatedOnDate:["",V.required]})}submit(){let e=this.activateFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.activateFixedDepositsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.savingsService.executeSavingsAccountCommand(this.accountId,"activate",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-activate-fixed-deposits-account"]],decls:20,vars:18,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"mat-form-field",3),M("click",function(){S(f);let q=k(11);return A(q.open())}),n(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),h(12,Va,7,9,"mat-error"),o()(),n(13,"mat-card-actions",6)(14,"button",7),a(15),r(16,"translate"),o(),n(17,"button",8),a(18),r(19,"translate"),o()()()()()}if(l&2){let f=k(11);i(2),d("formGroup",p.activateFixedDepositsAccountForm),i(4),m(c(7,11,"labels.inputs.Activated On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.activateFixedDepositsAccountForm.controls.activatedOnDate.hasError("required")?12:-1),i(2),d("routerLink",R(17,Na)),i(),u(" ",c(16,13,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.activateFixedDepositsAccountForm.valid),i(),u(" ",c(19,15,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qa=()=>["../../"],xi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.fixedDepositsService=x(j),this.route=x(N),this.router=x(W),this.undoCommand="undoapproval",this.undoAction=this.route.snapshot.params.name,this.undoAction==="Undo Activation"&&(this.undoCommand="undoactivate"),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.createUndoApprovalFixedDepositsAccountForm()}createUndoApprovalFixedDepositsAccountForm(){this.undoApprovalFixedDepositsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=H({},this.undoApprovalFixedDepositsAccountForm.value);this.undoAction==="Undo Activation"?this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})}):this.savingsService.executeSavingsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-undo-approval-fixed-deposits-account"]],decls:16,vars:13,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"mat-card")(2,"form",1),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"textarea",3),o()(),n(9,"mat-card-actions",4)(10,"button",5),a(11),r(12,"translate"),o(),n(13,"button",6),a(14),r(15,"translate"),o()()()()()),l&2&&(i(2),d("formGroup",p.undoApprovalFixedDepositsAccountForm),i(4),m(c(7,6,"labels.inputs.Note")),i(4),d("routerLink",R(12,qa)),i(),u(" ",c(12,8,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.undoApprovalFixedDepositsAccountForm.valid),i(),u(" ",c(15,10,"labels.buttons.Confirm")," "))},dependencies:[y,I,ct,rt,it,pt,st,lt,tt,Y,xt,bt,ot,nt,dt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var za=()=>["../../"];function Ha(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Withdrawn On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var Ci=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawFixedDepositsAccountForm()}createWithdrawFixedDepositsAccountForm(){this.withdrawFixedDepositsAccountForm=this.formBuilder.group({withdrawnOnDate:["",V.required],note:[""]})}submit(){let e=this.withdrawFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.withdrawFixedDepositsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"withdrawnByApplicant",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-withdraw-by-client-fixed-deposits-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ha,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.withdrawFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Withdrawn On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.withdrawFixedDepositsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,za)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.withdrawFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var $a=()=>["../../"];function La(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name+" ("+e.currency.name+")"," ")}}function Ga(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Charge")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ua(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Amount")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ja(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Wa(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Ka(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due for collection on")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Qa(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),h(8,Ka,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due for collection on")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function Ya(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ja(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),h(8,Ya,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Xa(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",17),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Repeats Every")))}function Za(t,s){if(t&1&&(n(0,"div",4)(1,"mat-form-field")(2,"mat-label"),a(3),r(4,"translate"),o(),g(5,"input",10),h(6,Ua,7,9,"mat-error"),o(),n(7,"mat-form-field")(8,"mat-label"),a(9),r(10,"translate"),o(),n(11,"mat-select",11),L(12,ja,2,2,"mat-option",6,$),o()(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),n(18,"mat-select",12),L(19,Wa,2,2,"mat-option",6,$),o()(),h(21,Qa,9,8,"mat-form-field"),h(22,Ja,9,8,"mat-form-field"),h(23,Xa,5,3,"mat-form-field"),o()),t&2){let e=_();i(3),m(c(4,7,"labels.inputs.Amount")),i(3),v(e.fixedDepositsChargeForm.controls.amount.hasError("required")?6:-1),i(3),m(c(10,9,"labels.inputs.Charge Calculation")),i(3),G(e.chargeDetails.chargeCalculationTypeOptions),i(4),m(c(17,11,"labels.inputs.Charge time type")),i(3),G(e.chargeDetails.chargeTimeTypeOptions),i(2),v(e.fixedDepositsChargeForm.contains("dueDate")?21:-1),i(),v(e.fixedDepositsChargeForm.contains("feeOnMonthDay")?22:-1),i(),v(e.fixedDepositsChargeForm.contains("feeInterval")?23:-1)}}var _i=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.savingsService=x($t),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.fixedDepositsAccountActionData.chargeOptions}),this.fixedDepositAccountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFixedDepositsChargeForm(),this.buildDependencies()}buildDependencies(){this.fixedDepositsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(l=>{this.chargeDetails=l;let p=l.chargeTimeType.id;(l.chargeTimeType.value==="Withdrawal Fee"||l.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(l.chargeTimeType.value==="Annual Fee"||l.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("dueDate",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("feeOnMonthDay",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("feeOnMonthDay"),p.value==="Monthly Fee"?this.fixedDepositsChargeForm.addControl("feeInterval",new Z(l.feeInterval,V.required)):this.fixedDepositsChargeForm.removeControl("feeInterval"),this.fixedDepositsChargeForm.patchValue({amount:l.amount,chargeCalculationType:l.chargeCalculationType.id,chargeTimeType:l.chargeTimeType.id})})})}createFixedDepositsChargeForm(){this.fixedDepositsChargeForm=this.formBuilder.group({chargeId:["",V.required],amount:["",V.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.fixedDepositsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth){let l="MMMM-dd";if(e.monthDayFormat=l,e.feeOnMonthDay){let p=this.fixedDepositsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(p,l)}}else{let l=this.settingsService.dateFormat;if(e.dateFormat=l,e.dueDate){let p=this.fixedDepositsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(p,l)}}this.savingsService.createSavingsCharge(this.fixedDepositAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-add-charge-fixed-deposits-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(l,p){l&1&&(n(0,"div",2)(1,"mat-card")(2,"form",3),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),a(7),r(8,"translate"),o(),n(9,"mat-select",5),L(10,La,2,2,"mat-option",6,$),o(),h(12,Ga,7,9,"mat-error"),o(),h(13,Za,24,13,"div",4),o(),n(14,"mat-card-actions",7)(15,"button",8),a(16),r(17,"translate"),o(),n(18,"button",9),a(19),r(20,"translate"),o()()()()()()),l&2&&(i(2),d("formGroup",p.fixedDepositsChargeForm),i(5),m(c(8,8,"labels.inputs.Charge")),i(3),G(p.savingsChargeOptions),i(2),v(p.fixedDepositsChargeForm.controls.chargeId.hasError("required")?12:-1),i(),v(p.chargeDetails?13:-1),i(2),d("routerLink",R(14,$a)),i(),u(" ",c(17,10,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.fixedDepositsChargeForm.valid),i(),u(" ",c(20,12,"labels.buttons.Submit")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var tr=()=>["../../"];function er(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Premature Close Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ir(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",10),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Maturity Amount")))}function nr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function or(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ar(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",11),L(5,nr,2,2,"mat-option",12,$),o(),h(7,or,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Action")),i(3),G(e.onAccountClosureOptions),i(2),v(e.prematureCloseAccountForm.controls.onAccountClosureId.hasError("required")?7:-1)}}function rr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function pr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",13),L(5,rr,2,2,"mat-option",12,$),o(),h(7,pr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.prematureCloseAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}function lr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"textarea",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Note")))}var hi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSubmitted=!1,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPrematureCloseAccountForm(),this.buildDependencies()}createPrematureCloseAccountForm(){this.prematureCloseAccountForm=this.formBuilder.group({closedOnDate:["",V.required]})}buildDependencies(){this.prematureCloseAccountForm.get("closedOnDate").valueChanges.subscribe(e=>{this.isSubmitted||this.calculatePrematureAmount(e)})}calculatePrematureAmount(e){let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f={closedOnDate:this.dateUtils.formatDate(e,p),dateFormat:p,locale:l};this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"calculatePrematureAmount",f).subscribe(D=>{this.savingsAccountsData=D.savingsAccounts,this.onAccountClosureOptions=D.onAccountClosureOptions,this.prematureCloseAccountForm.addControl("maturityAmount",new Z({value:"",disabled:!0})),this.prematureCloseAccountForm.addControl("onAccountClosureId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("note",new Z("")),this.prematureCloseAccountForm.get("maturityAmount").patchValue(D.maturityAmount),this.addTransferDetails()})}addTransferDetails(){this.prematureCloseAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.prematureCloseAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("transferDescription",new Z(""))):(this.prematureCloseAccountForm.removeControl("toSavingsAccountId"),this.prematureCloseAccountForm.removeControl("transferDescription"))})}submit(){let e=this.prematureCloseAccountForm.value;this.isSubmitted=!0;let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.prematureCloseAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"prematureClose",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-premature-close-fixed-deposits-account"]],decls:26,vars:23,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,er,7,9,"mat-error"),o(),h(14,ir,5,3,"mat-form-field"),h(15,ar,8,4,"mat-form-field"),h(16,cr,8,4,"mat-form-field"),h(17,sr,5,3,"mat-form-field"),h(18,lr,5,3,"mat-form-field"),o()(),n(19,"mat-card-actions",7)(20,"button",8),a(21),r(22,"translate"),o(),n(23,"button",9),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.prematureCloseAccountForm),i(5),m(c(8,16,"labels.inputs.Premature Close Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.prematureCloseAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(),v(p.prematureCloseAccountForm.controls.maturityAmount?14:-1),i(),v(p.prematureCloseAccountForm.contains("onAccountClosureId")?15:-1),i(),v(p.prematureCloseAccountForm.contains("toSavingsAccountId")?16:-1),i(),v(p.prematureCloseAccountForm.contains("transferDescription")?17:-1),i(),v(p.prematureCloseAccountForm.contains("note")?18:-1),i(2),d("routerLink",R(22,tr)),i(),u(" ",c(22,18,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.prematureCloseAccountForm.valid),i(),u(" ",c(25,20,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var mr=()=>["../../"];function dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ur(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function fr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function gr(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function xr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,gr,2,2,"mat-option",9,$),o(),h(7,xr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.closeOnMaturityAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function _r(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}var vi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsAccountsData=e.fixedDepositsAccountActionData.savingsAccounts,this.onAccountClosureOptions=e.fixedDepositsAccountActionData.onAccountClosureOptions,this.maturityAmount=e.fixedDepositsAccountActionData.maturityAmount}),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseOnMaturityAccountForm(),this.addTransferDetails()}createCloseOnMaturityAccountForm(){this.closeOnMaturityAccountForm=this.formBuilder.group({closedOnDate:["",V.required],maturityAmount:[{value:this.maturityAmount,disabled:!0}],onAccountClosureId:["",V.required],note:[""]})}addTransferDetails(){this.closeOnMaturityAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.closeOnMaturityAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.closeOnMaturityAccountForm.addControl("transferDescription",new Z(""))):(this.closeOnMaturityAccountForm.removeControl("toSavingsAccountId"),this.closeOnMaturityAccountForm.removeControl("transferDescription"))})}submit(){let e=this.closeOnMaturityAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.closeOnMaturityAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"close",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-close-fixed-deposits-account"]],decls:41,vars:30,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,dr,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"input",7),o(),n(19,"mat-form-field")(20,"mat-label"),a(21),r(22,"translate"),o(),n(23,"mat-select",8),L(24,ur,2,2,"mat-option",9,$),o(),h(26,fr,7,9,"mat-error"),o(),h(27,Cr,8,4,"mat-form-field"),h(28,_r,5,3,"mat-form-field"),n(29,"mat-form-field")(30,"mat-label"),a(31),r(32,"translate"),o(),g(33,"textarea",10),o()()(),n(34,"mat-card-actions",11)(35,"button",12),a(36),r(37,"translate"),o(),n(38,"button",13),a(39),r(40,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.closeOnMaturityAccountForm),i(5),m(c(8,17,"labels.inputs.Closed On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.closeOnMaturityAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(3),m(c(17,19,"labels.inputs.Maturity Amount")),i(5),m(c(22,21,"labels.inputs.Action")),i(3),G(p.onAccountClosureOptions),i(2),v(p.closeOnMaturityAccountForm.controls.onAccountClosureId.hasError("required")?26:-1),i(),v(p.closeOnMaturityAccountForm.contains("toSavingsAccountId")?27:-1),i(),v(p.closeOnMaturityAccountForm.contains("transferDescription")?28:-1),i(3),m(c(32,23,"labels.inputs.Note")),i(4),d("routerLink",R(29,mr)),i(),u(" ",c(37,25,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.closeOnMaturityAccountForm.valid),i(),u(" ",c(40,27,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hr=()=>["../../transactions"];function vr(t,s){if(t&1&&(n(0,"h2",2),a(1),r(2,"translate"),r(3,"translate"),o()),t&2){let e=_();i(),T(" ",c(2,2,"labels.menus."+e.actionName)," ",c(3,4,"labels.heading.Fixed Deposit Transactions")," ")}}function Dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function br(t,s){if(t&1&&(n(0,"mat-option",10),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Pr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",19),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Account Number")))}function Mr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",20),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Cheque")))}function Tr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",21),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Routing Code")))}function Sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",22),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Receipt Number")))}function Ar(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",23),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Bank")))}var Di=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.paymentTypeOptions=[],this.addPaymentDetailsFlag=!1,this.transactionType={deposit:!1,withdrawal:!1},this.route.data.subscribe(l=>{this.currency=l.fixedDepositsAccountActionData.currency,this.paymentTypeOptions=l.fixedDepositsAccountActionData.paymentTypeOptions}),this.actionName=this.route.snapshot.params.name;let e=this.actionName.toLowerCase();if(e==="deposit"||e==="withdrawal")this.transactionCommand=e,this.transactionType[this.transactionCommand]=!0;else throw new Error(`Invalid transaction action: ${this.actionName}`);this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingAccountTransactionForm()}createSavingAccountTransactionForm(){this.accountTransactionForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,V.required],transactionAmount:[0,V.required],paymentTypeId:[""],note:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.accountTransactionForm.addControl("accountNumber",new Z("")),this.accountTransactionForm.addControl("checkNumber",new Z("")),this.accountTransactionForm.addControl("routingCode",new Z("")),this.accountTransactionForm.addControl("receiptNumber",new Z("")),this.accountTransactionForm.addControl("bankNumber",new Z(""))):(this.accountTransactionForm.removeControl("accountNumber"),this.accountTransactionForm.removeControl("checkNumber"),this.accountTransactionForm.removeControl("routingCode"),this.accountTransactionForm.removeControl("receiptNumber"),this.accountTransactionForm.removeControl("bankNumber"))}submit(){let e=this.accountTransactionForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.accountTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});delete D.note,D.transactionAmount=D.transactionAmount*1,this.fixedDepositsService.executeFixedDepositsAccountTransactionsCommand(this.accountId,this.transactionCommand,D).subscribe(q=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-cash-transaction"]],decls:46,vars:38,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],["mat-title",""],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["required","","formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["formControlName","note","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card"),h(2,vr,4,6,"h2",2),n(3,"form",3),M("ngSubmit",function(){return S(f),A(p.submit())}),n(4,"mat-card-content",4)(5,"mat-form-field",5),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),h(13,Dr,7,9,"mat-error"),o(),g(14,"mifosx-input-amount",8),n(15,"mat-form-field")(16,"mat-label"),a(17),r(18,"translate"),o(),n(19,"mat-select",9),L(20,br,2,2,"mat-option",10,$),o()(),n(22,"div",11)(23,"span",12),M("click",function(){return S(f),A(p.addPaymentDetails())}),n(24,"mat-slide-toggle")(25,"div",13)(26,"span",14),a(27),r(28,"translate"),o()()()()(),h(29,Pr,5,3,"mat-form-field"),h(30,Mr,5,3,"mat-form-field"),h(31,Tr,5,3,"mat-form-field"),h(32,Sr,5,3,"mat-form-field"),h(33,Ar,5,3,"mat-form-field"),n(34,"mat-form-field")(35,"mat-label"),a(36),r(37,"translate"),o(),g(38,"textarea",15),o(),n(39,"mat-card-actions",16)(40,"button",17),a(41),r(42,"translate"),o(),n(43,"button",18),a(44),r(45,"translate"),o()()()()()()}if(l&2){let f=k(12);i(2),v(p.transactionType.withdrawal?2:-1),i(),d("formGroup",p.accountTransactionForm),i(4),m(c(8,25,"labels.inputs.Transaction Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.accountTransactionForm.controls.transactionDate.hasError("required")?13:-1),i(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.accountTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),i(3),m(c(18,27,"labels.inputs.Payment Type")),i(3),G(p.paymentTypeOptions),i(5),d("className",p.addPaymentDetailsFlag?"enabled":"disabled"),i(2),m(c(28,29,"labels.inputs.Show Payment Details")),i(2),v(p.addPaymentDetailsFlag?29:-1),i(),v(p.addPaymentDetailsFlag?30:-1),i(),v(p.addPaymentDetailsFlag?31:-1),i(),v(p.addPaymentDetailsFlag?32:-1),i(),v(p.addPaymentDetailsFlag?33:-1),i(3),m(c(37,31,"labels.inputs.Notes")),i(4),d("routerLink",R(37,hr)),i(),u(" ",c(42,33,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.accountTransactionForm.valid),i(),u(" ",c(45,35,"labels.buttons.Submit")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,ei,ji,Ft,w],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();function Or(t,s){t&1&&g(0,"mifosx-approve-fixed-deposits-account")}function yr(t,s){t&1&&g(0,"mifosx-reject-fixed-deposits-account")}function Ir(t,s){t&1&&g(0,"mifosx-activate-fixed-deposits-account")}function Fr(t,s){t&1&&g(0,"mifosx-undo-approval-fixed-deposits-account")}function wr(t,s){t&1&&g(0,"mifosx-withdraw-by-client-fixed-deposits-account")}function Er(t,s){t&1&&g(0,"mifosx-add-charge-fixed-deposits-account")}function Br(t,s){t&1&&g(0,"mifosx-premature-close-fixed-deposits-account")}function kr(t,s){t&1&&g(0,"mifosx-close-fixed-deposits-account")}function Rr(t,s){t&1&&g(0,"mifosx-fixed-deposits-cash-transaction")}var bi=(()=>{class t{constructor(){this.route=x(N),this.actions={Approve:!1,Reject:!1,Activate:!1,Close:!1,"Undo Approval":!1,"Undo Activation":!1,"Add Charge":!1,"Premature Close":!1,"Withdrawn by Client":!1,Withdrawal:!1};let e=this.route.snapshot.params.name;e&&e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-account-actions"]],decls:9,vars:9,template:function(l,p){l&1&&(h(0,Or,1,0,"mifosx-approve-fixed-deposits-account"),h(1,yr,1,0,"mifosx-reject-fixed-deposits-account"),h(2,Ir,1,0,"mifosx-activate-fixed-deposits-account"),h(3,Fr,1,0,"mifosx-undo-approval-fixed-deposits-account"),h(4,wr,1,0,"mifosx-withdraw-by-client-fixed-deposits-account"),h(5,Er,1,0,"mifosx-add-charge-fixed-deposits-account"),h(6,Br,1,0,"mifosx-premature-close-fixed-deposits-account"),h(7,kr,1,0,"mifosx-close-fixed-deposits-account"),h(8,Rr,1,0,"mifosx-fixed-deposits-cash-transaction")),l&2&&(v(p.actions.Approve?0:-1),i(),v(p.actions.Reject?1:-1),i(),v(p.actions.Activate?2:-1),i(),v(p.actions["Undo Approval"]||p.actions["Undo Activation"]?3:-1),i(),v(p.actions["Withdrawn by Client"]?4:-1),i(),v(p.actions["Add Charge"]?5:-1),i(),v(p.actions["Premature Close"]?6:-1),i(),v(p.actions.Close?7:-1),i(),v(p.actions.Withdrawal?8:-1))},dependencies:[y,I,ui,fi,gi,xi,Ci,_i,hi,vi,Di],encapsulation:2})}}return t})();var Nr=()=>["../"];function Vr(t,s){if(t&1){let e=F();n(0,"button",10),M("click",function(){S(e);let p=_(2);return A(p.undoTransaction())}),g(1,"fa-icon",11),a(2,"Undo "),o()}}function qr(t,s){t&1&&(n(0,"span"),C(1,Vr,3,0,"button",9),o()),t&2&&(i(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function zr(t,s){t&1&&(n(0,"div",4),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Note")," "))}function Hr(t,s){if(t&1&&(n(0,"div",5),a(1),o()),t&2){let e=_();i(),u(" ",e.transactionData.note," ")}}function $r(t,s){if(t&1&&g(0,"mifosx-transaction-payment-detail",6),t&2){let e=_();d("paymentDetailData",e.transactionData.paymentDetailData)}}var Pi=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.route.data.subscribe(e=>{this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.transactionData=e.fixedDepositsAccountTransaction})}transactionColor(){return this.transactionData.manuallyReversed?"undo":"active"}allowUndo(){return!1}undoTransaction(){this.dialog.open(sn).afterClosed().subscribe(l=>{if(l.confirm){let p=this.settingsService.language.code,f=this.settingsService.dateFormat,D={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),f),transactionAmount:0,dateFormat:f,locale:p};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",D,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-transaction"]],decls:41,vars:37,consts:[[1,"container","m-b-20","align-end-center","gap-2percent"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(l,p){l&1&&(n(0,"div",0),h(1,qr,2,1,"span"),o(),n(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),g(6,"div",3),n(7,"div",4),a(8),r(9,"translate"),o(),n(10,"div",5),a(11),o(),n(12,"div",4),a(13),r(14,"translate"),o(),n(15,"div",5),a(16),o(),n(17,"div",4),a(18),r(19,"translate"),o(),n(20,"div",5),a(21),r(22,"dateFormat"),o(),n(23,"div",4),a(24),r(25,"translate"),o(),n(26,"div",5),a(27),o(),n(28,"div",4),a(29),r(30,"translate"),o(),n(31,"div",5),a(32),r(33,"currency"),o(),h(34,zr,3,3,"div",4),h(35,Hr,2,1,"div",5),h(36,$r,1,1,"mifosx-transaction-payment-detail",6),o(),n(37,"div",7)(38,"button",8),a(39),r(40,"translate"),o()()()()()),l&2&&(i(),v(p.allowUndo()?1:-1),i(5),d("ngClass",p.transactionColor()),i(2),u(" ",c(9,17,"labels.inputs.Transaction Id")," "),i(3),u(" ",p.transactionData.id," "),i(2),u(" ",c(14,19,"labels.inputs.Type")," "),i(3),u(" ",p.transactionData.transactionType.value," "),i(2),u(" ",c(19,21,"labels.inputs.Transaction Date")," "),i(3),u(" ",c(22,23,p.transactionData.date)," "),i(3),u(" ",c(25,25,"labels.inputs.Currency")," "),i(3),u(" ",p.transactionData.currency.displayLabel," "),i(2),u(" ",c(30,27,"labels.inputs.Amount")," "),i(3),u(" ",at(33,29,p.transactionData.amount,p.transactionData.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(p.transactionData.note?34:-1),i(),v(p.transactionData.note?35:-1),i(),v(p.transactionData.paymentDetailData?36:-1),i(2),d("routerLink",R(36,Nr)),i(),u(" ",c(40,34,"labels.buttons.Back")," "))},dependencies:[y,Se,I,tt,Y,xt,B,de,ut,rn,se,yt,w],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.transaction-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();function Lr(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Gr(t,s){if(t&1){let e=F();n(0,"mat-form-field",11),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),n(8,"mat-error"),a(9),r(10,"translate"),r(11,"translate"),n(12,"strong"),a(13),r(14,"translate"),o()()()}if(t&2){let e=k(7),l=_();i(2),m(c(3,8,"labels.inputs.Submitted On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(4),T(" ",c(10,10,"labels.inputs.Submission Date")," ",c(11,12,"labels.commons.is")," "),i(4),m(c(14,14,"labels.commons.required"))}}function Ur(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.displayName," ")}}function jr(t,s){if(t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,Ur,2,2,"mat-option",5,$),o()()),t&2){let e=_();i(2),m(c(3,1,"labels.inputs.Field Officer")),i(3),G(e.fieldOfficerData)}}function Wr(t,s){t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),r(5,"translate"),o()),t&2&&(i(2),m(c(3,3,"labels.inputs.External id")),i(2),d("matTooltip",_t(c(5,5,"tooltips.Provides an external id"))))}var ge=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.isProductSelected=!1,this.fixedDepositsAccountProductTemplate=new $e,this.createFixedDepositsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.fixedDepositsAccountTemplate&&(this.productData=this.fixedDepositsAccountTemplate.productOptions,this.fixedDepositsAccountTemplate.depositProductId&&this.fixedDepositAccountDetailsForm.patchValue({productId:this.fixedDepositsAccountTemplate.depositProductId,submittedOnDate:this.fixedDepositsAccountTemplate.timeline.submittedOnDate&&new Date(this.fixedDepositsAccountTemplate.timeline.submittedOnDate),externalId:this.fixedDepositsAccountTemplate.externalId||""}))}createFixedDepositsAccountDetailsForm(){this.fixedDepositAccountDetailsForm=this.formBuilder.group({productId:["",V.required],submittedOnDate:["",V.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.fixedDepositsAccountTemplate.clientId;this.fixedDepositAccountDetailsForm.get("productId").valueChanges.subscribe(l=>{this.fixedDepositsService.getFixedDepositsAccountTemplate(e,l).subscribe(p=>{this.fixedDepositsAccountProductTemplate.emit(p),this.isProductSelected=!0,this.fieldOfficerData=p.fieldOfficerOptions,!this.isFieldOfficerPatched&&this.fixedDepositsAccountTemplate.fieldOfficerId?(this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue(this.fixedDepositsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get fixedDepositAccountDetails(){let e=this.fixedDepositAccountDetailsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-details-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate"},outputs:{fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId",3,"matTooltip"]],template:function(l,p){if(l&1&&(n(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),a(4),r(5,"translate"),o(),n(6,"mat-select",4),L(7,Lr,2,2,"mat-option",5,$),o(),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),h(16,Gr,15,16,"mat-form-field",3),h(17,jr,7,3,"mat-form-field",3),h(18,Wr,6,7,"mat-form-field",3),o(),n(19,"div",6)(20,"button",7),g(21,"fa-icon",8),a(22),r(23,"translate"),o(),n(24,"button",9),a(25),r(26,"translate"),g(27,"fa-icon",10),o()()()),l&2){let f;d("formGroup",p.fixedDepositAccountDetailsForm),i(4),m(c(5,11,"labels.inputs.Product Name")),i(3),G(p.productData),i(3),T(" ",c(11,13,"labels.inputs.Product Name")," ",c(12,15,"labels.commons.is")," "),i(4),m(c(15,17,"labels.commons.required")),i(2),v(p.isProductSelected?16:-1),i(),v(p.isProductSelected?17:-1),i(),v(p.isProductSelected?18:-1),i(4),u(" ",c(23,19,"labels.buttons.Previous")," "),i(2),d("disabled",!((f=p.fixedDepositAccountDetailsForm.get("productId"))!=null&&f.value)||!((f=p.fixedDepositAccountDetailsForm.get("submittedOnDate"))!=null&&f.value)),i(),u(" ",c(26,21,"labels.buttons.Next")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,me,Wt,ut,ne,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Kr(t,s){if(t&1&&g(0,"mifosx-input-amount",2),t&2){let e=_();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.fixedDepositAccountTermsForm.controls.depositAmount)("inputLabel","Deposit Amount")}}function Qr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Yr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Jr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Xr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Zr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}var xe=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.createFixedDepositsAccountTermsForm()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.currency=this.fixedDepositsAccountProductTemplate.currency,this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate.id&&this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountTemplate.depositAmount?this.fixedDepositsAccountTemplate.depositAmount:0,depositPeriod:this.fixedDepositsAccountTemplate.depositPeriod,depositPeriodFrequencyId:this.fixedDepositsAccountTemplate.depositPeriodFrequency.id})}createFixedDepositsAccountTermsForm(){this.fixedDepositAccountTermsForm=this.formBuilder.group({interestCompoundingPeriodType:["",V.required],interestPostingPeriodType:["",V.required],interestCalculationType:["",V.required],interestCalculationDaysInYearType:["",V.required],depositAmount:[0,V.required],depositPeriod:["",V.required],depositPeriodFrequencyId:["",V.required]})}setOptions(){this.interestCompoundingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.fixedDepositsAccountTemplate.id||this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountProductTemplate.depositAmount,depositPeriod:this.fixedDepositsAccountProductTemplate.minDepositTerm,depositPeriodFrequencyId:this.fixedDepositsAccountProductTemplate.minDepositTermType.id})}get fixedDepositAccountTerms(){let e=this.fixedDepositAccountTermsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-terms-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:96,vars:80,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"flex-48","hide-lt-md"],[1,"flex-48"],["type","number","matInput","","formControlName","depositPeriod","required",""],["formControlName","depositPeriodFrequencyId","required",""],[3,"value"],[1,"flex-98"],["formControlName","interestCompoundingPeriodType","required",""],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1),h(2,Kr,1,4,"mifosx-input-amount",2),g(3,"span",3),n(4,"mat-form-field",4)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",5),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),n(16,"mat-form-field",4)(17,"mat-label"),a(18),r(19,"translate"),o(),n(20,"mat-select",6),L(21,Qr,3,5,"mat-option",7,$),o(),n(23,"mat-error"),a(24),r(25,"translate"),r(26,"translate"),n(27,"strong"),a(28),r(29,"translate"),o()()(),g(30,"mat-divider",8),n(31,"mat-form-field",4)(32,"mat-label"),a(33),r(34,"translate"),o(),n(35,"mat-select",9),L(36,Yr,3,5,"mat-option",7,$),o(),n(38,"mat-error"),a(39),r(40,"translate"),r(41,"translate"),n(42,"strong"),a(43),r(44,"translate"),o()()(),n(45,"mat-form-field",4)(46,"mat-label"),a(47),r(48,"translate"),o(),n(49,"mat-select",10),L(50,Jr,3,5,"mat-option",7,$),o(),n(52,"mat-error"),a(53),r(54,"translate"),r(55,"translate"),n(56,"strong"),a(57),r(58,"translate"),o()()(),n(59,"mat-form-field",4)(60,"mat-label"),a(61),r(62,"translate"),o(),n(63,"mat-select",11),L(64,Xr,3,5,"mat-option",7,$),o(),n(66,"mat-error"),a(67),r(68,"translate"),r(69,"translate"),n(70,"strong"),a(71),r(72,"translate"),o()()(),n(73,"mat-form-field",4)(74,"mat-label"),a(75),r(76,"translate"),o(),n(77,"mat-select",12),L(78,Zr,3,5,"mat-option",7,$),o(),n(80,"mat-error"),a(81),r(82,"translate"),r(83,"translate"),n(84,"strong"),a(85),r(86,"translate"),o()()()(),n(87,"div",13)(88,"button",14),g(89,"fa-icon",15),a(90),r(91,"translate"),o(),n(92,"button",16),a(93),r(94,"translate"),g(95,"fa-icon",17),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountTermsForm),i(2),v(p.currency?2:-1),i(4),m(c(7,28,"labels.inputs.Deposit Period")),i(4),T(" ",c(11,30,"labels.inputs.Deposit Period")," ",c(12,32,"labels.commons.is")," "),i(4),m(c(15,34,"labels.commons.required")),i(4),m(c(19,36,"labels.inputs.Deposit Period Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(25,38,"labels.inputs.Deposit Period Type")," ",c(26,40,"labels.commons.is")," "),i(4),m(c(29,42,"labels.commons.required")),i(5),m(c(34,44,"labels.inputs.Interest Compounding Period")),i(3),G(p.interestCompoundingPeriodTypeData),i(3),T(" ",c(40,46,"labels.inputs.Interest Compounding Period")," ",c(41,48,"labels.commons.is")," "),i(4),m(c(44,50,"labels.commons.required")),i(4),m(c(48,52,"labels.inputs.Interest Posting Period")),i(3),G(p.interestPostingPeriodTypeData),i(3),T(" ",c(54,54,"labels.inputs.Interest Posting Period")," ",c(55,56,"labels.commons.is")," "),i(4),m(c(58,58,"labels.commons.required")),i(4),m(c(62,60,"labels.inputs.Interest Calculated using")),i(3),G(p.interestCalculationTypeData),i(3),T(" ",c(68,62,"labels.inputs.Interest Calculated using")," ",c(69,64,"labels.commons.is")," "),i(4),m(c(72,66,"labels.commons.required")),i(4),m(c(76,68,"labels.inputs.Days in Year")),i(3),G(p.interestCalculationDaysInYearTypeData),i(3),T(" ",c(82,70,"labels.inputs.Days in Year")," ",c(83,72,"labels.commons.is")," "),i(4),m(c(86,74,"labels.commons.required")),i(5),u(" ",c(91,76,"labels.buttons.Previous")," "),i(3),u(" ",c(94,78,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,ei,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function tp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ep(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ip(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function np(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function op(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function ap(t,s){if(t&1&&(n(0,"mat-form-field",16)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",28),L(5,op,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Linked Savings Account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Linked Savings Account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function rp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function pp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function cp(t,s){if(t&1&&(n(0,"mat-form-field",18)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",29),L(5,pp,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Transfer to savings account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Transfer to savings account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function sp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function lp(t,s){t&1&&(n(0,"mat-form-field",31)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",32),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Tax Group")))}function mp(t,s){if(t&1&&(g(0,"mat-divider",13),n(1,"mat-checkbox",30),a(2),r(3,"translate"),o(),h(4,lp,5,3,"mat-form-field",31)),t&2){let e=_();i(2),u(" ",c(3,2,"labels.inputs.Is Withhold Tax Applicable"),"? "),i(2),v(e.fixedDepositAccountSettingsForm.controls.taxGroupId?4:-1)}}var Ce=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createFixedDepositAccountSettingsForm(),this.buildDependencies()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.fixedDepositAccountSettingsForm.patchValue({minDepositTerm:this.fixedDepositsAccountProductTemplate.minDepositTerm,minDepositTermTypeId:this.fixedDepositsAccountProductTemplate.minDepositTermType?this.fixedDepositsAccountProductTemplate.minDepositTermType.id:"",inMultiplesOfDepositTerm:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm,inMultiplesOfDepositTermTypeId:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType?this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.id:"",maxDepositTerm:this.fixedDepositsAccountProductTemplate.maxDepositTerm,maxDepositTermTypeId:this.fixedDepositsAccountProductTemplate.maxDepositTermType?this.fixedDepositsAccountProductTemplate.maxDepositTermType.id:"",preClosurePenalApplicable:this.fixedDepositsAccountProductTemplate.preClosurePenalApplicable,preClosurePenalInterest:this.fixedDepositsAccountProductTemplate.preClosurePenalInterest,preClosurePenalInterestOnTypeId:this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType?this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id:"",maturityInstructionId:this.fixedDepositsAccountProductTemplate.maturityInstructionId}),this.fixedDepositsAccountProductTemplate.withHoldTax?(this.fixedDepositAccountSettingsForm.addControl("withHoldTax",new Z(!1)),this.fixedDepositAccountSettingsForm.get("withHoldTax").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("taxGroupId",new Z({value:"",disabled:!0})),this.fixedDepositAccountSettingsForm.get("taxGroupId").patchValue(this.fixedDepositsAccountProductTemplate.taxGroup&&this.fixedDepositsAccountProductTemplate.taxGroup.name)):this.fixedDepositAccountSettingsForm.removeControl("taxGroupId")}),this.fixedDepositAccountSettingsForm.get("withHoldTax").patchValue(this.fixedDepositsAccountTemplate.withHoldTax)):this.fixedDepositAccountSettingsForm.removeControl("withHoldTax"),this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate&&this.fixedDepositAccountSettingsForm.patchValue({lockinPeriodFrequency:this.fixedDepositsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType&&this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType.id,transferInterestToSavings:this.fixedDepositsAccountTemplate.transferInterestToSavings})}createFixedDepositAccountSettingsForm(){this.fixedDepositAccountSettingsForm=this.formBuilder.group({lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],minDepositTerm:[{value:"",disabled:!0}],minDepositTermTypeId:[{value:"",disabled:!0}],inMultiplesOfDepositTerm:[{value:"",disabled:!0}],inMultiplesOfDepositTermTypeId:[{value:"",disabled:!0}],maxDepositTerm:[{value:"",disabled:!0}],maxDepositTermTypeId:[{value:"",disabled:!0}],transferInterestToSavings:[!1],preClosurePenalApplicable:[{value:"",disabled:!0}],preClosurePenalInterest:[{value:"",disabled:!0}],preClosurePenalInterestOnTypeId:[{value:"",disabled:!0}],maturityInstructionId:[""]})}buildDependencies(){this.fixedDepositAccountSettingsForm.get("transferInterestToSavings").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("linkAccountId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("linkAccountId").patchValue(this.fixedDepositsAccountTemplate.linkedAccount&&this.fixedDepositsAccountTemplate.linkedAccount.id)):this.fixedDepositAccountSettingsForm.removeControl("linkAccountId")}),this.fixedDepositAccountSettingsForm.get("maturityInstructionId").valueChanges.subscribe(e=>{e>100?(this.fixedDepositAccountSettingsForm.addControl("transferToSavingsId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("transferToSavingsId").patchValue(this.fixedDepositsAccountTemplate.transferToSavingsId&&this.fixedDepositsAccountTemplate.transferToSavingsId.id)):this.fixedDepositAccountSettingsForm.removeControl("transferToSavingsId")})}setOptions(){this.lockinPeriodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.savingsAccountsData=this.fixedDepositsAccountProductTemplate.savingsAccounts,this.preClosurePenalInterestOnTypeData=this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnTypeOptions,this.maturityInstructionOptions=this.fixedDepositsAccountProductTemplate.maturityInstructionOptions}get fixedDepositAccountSettings(){let e=this.fixedDepositAccountSettingsForm.getRawValue();for(let l in e)(e[l]===""||l==="taxGroupId")&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-settings-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:122,vars:85,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"mat-h4","flex-98"],[1,"flex-48"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[3,"value"],["type","number","matInput","","formControlName","minDepositTerm","required",""],["formControlName","minDepositTermTypeId","required",""],["type","number","matInput","","formControlName","inMultiplesOfDepositTerm"],["formControlName","inMultiplesOfDepositTermTypeId"],["type","number","matInput","","formControlName","maxDepositTerm"],["formControlName","maxDepositTermTypeId"],[1,"flex-98"],[1,"mat-h3","flex-23"],["labelPosition","before","formControlName","transferInterestToSavings",1,"flex-32","margin-b"],[1,"margin-b","flex-48"],["formControlName","maturityInstructionId"],[1,"flex-48","margin-b"],[1,"mat-h4","flex-23"],["labelPosition","before","formControlName","preClosurePenalApplicable",1,"flex-73","margin-v"],["type","number","matInput","","formControlName","preClosurePenalInterest"],["formControlName","preClosurePenalInterestOnTypeId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["formControlName","linkAccountId","required",""],["formControlName","transferToSavingsId","required",""],["labelPosition","before","formControlName","withHoldTax",1,"margin-p","flex-48"],[1,"p-b-25","flex-48"],["matInput","","formControlName","taxGroupId"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1)(2,"h4",2),a(3),r(4,"translate"),o(),n(5,"mat-form-field",3)(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",4),o(),n(10,"mat-form-field",3)(11,"mat-label"),a(12),r(13,"translate"),o(),n(14,"mat-select",5),L(15,tp,3,5,"mat-option",6,$),o()(),n(17,"h4",2),a(18),r(19,"translate"),o(),n(20,"mat-form-field",3)(21,"mat-label"),a(22),r(23,"translate"),o(),g(24,"input",7),n(25,"mat-error"),a(26),r(27,"translate"),r(28,"translate"),n(29,"strong"),a(30),r(31,"translate"),o()()(),n(32,"mat-form-field",3)(33,"mat-label"),a(34),r(35,"translate"),o(),n(36,"mat-select",8),L(37,ep,3,5,"mat-option",6,$),o(),n(39,"mat-error"),a(40),r(41,"translate"),r(42,"translate"),n(43,"strong"),a(44),r(45,"translate"),o()()(),n(46,"h4",2),a(47),r(48,"translate"),o(),n(49,"mat-form-field",3)(50,"mat-label"),a(51),r(52,"translate"),o(),g(53,"input",9),o(),n(54,"mat-form-field",3)(55,"mat-label"),a(56),r(57,"translate"),o(),n(58,"mat-select",10),L(59,ip,3,5,"mat-option",6,$),o()(),n(61,"h4",2),a(62),r(63,"translate"),o(),n(64,"mat-form-field",3)(65,"mat-label"),a(66),r(67,"translate"),o(),g(68,"input",11),o(),n(69,"mat-form-field",3)(70,"mat-label"),a(71),r(72,"translate"),o(),n(73,"mat-select",12),L(74,np,3,5,"mat-option",6,$),o()(),g(76,"mat-divider",13),n(77,"h3",14),a(78),r(79,"translate"),o(),n(80,"mat-checkbox",15),a(81),r(82,"translate"),o(),h(83,ap,14,12,"mat-form-field",16),g(84,"mat-divider",13),n(85,"mat-form-field",3)(86,"mat-label"),a(87),r(88,"translate"),o(),n(89,"mat-select",17),L(90,rp,3,5,"mat-option",6,$),o()(),h(92,cp,14,12,"mat-form-field",18),g(93,"mat-divider",13),n(94,"h4",19),a(95),r(96,"translate"),o(),n(97,"mat-checkbox",20),a(98),r(99,"translate"),o(),n(100,"mat-form-field",3)(101,"mat-label"),a(102),r(103,"translate"),o(),g(104,"input",21),o(),n(105,"mat-form-field",3)(106,"mat-label"),a(107),r(108,"translate"),o(),n(109,"mat-select",22),L(110,sp,3,5,"mat-option",6,$),o()(),h(112,mp,5,4),o(),n(113,"div",23)(114,"button",24),g(115,"fa-icon",25),a(116),r(117,"translate"),o(),n(118,"button",26),a(119),r(120,"translate"),g(121,"fa-icon",27),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountSettingsForm),i(3),m(c(4,31,"labels.heading.Lock-in Period")),i(4),m(c(8,33,"labels.inputs.Frequency")),i(5),m(c(13,35,"labels.inputs.Type")),i(3),G(p.lockinPeriodFrequencyTypeData),i(3),m(c(19,37,"labels.heading.Minimum Deposit Term")),i(4),m(c(23,39,"labels.inputs.Frequency")),i(4),T(" ",c(27,41,"labels.inputs.Minimum Deposit Term Frequency")," ",c(28,43,"labels.commons.is")," "),i(4),m(c(31,45,"labels.commons.required")),i(4),m(c(35,47,"labels.inputs.Frequency Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(41,49,"labels.inputs.Minimum Deposit Term Frequency Type")," ",c(42,51,"labels.commons.is")," "),i(4),m(c(45,53,"labels.commons.required")),i(3),m(c(48,55,"labels.heading.And thereafter, in Multiples of")),i(4),m(c(52,57,"labels.inputs.Frequency")),i(5),m(c(57,59,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(3),m(c(63,61,"labels.heading.Maximum Deposit Term")),i(4),m(c(67,63,"labels.inputs.Frequency")),i(5),m(c(72,65,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(4),m(c(79,67,"labels.heading.Interest Transfer")),i(3),u(" ",c(82,69,"labels.inputs.Transfer Interest to Linked Savings Account"),"? "),i(2),v(p.fixedDepositAccountSettingsForm.contains("linkAccountId")?83:-1),i(4),m(c(88,71,"labels.inputs.Maturity Instructions")),i(3),G(p.maturityInstructionOptions),i(2),v(p.fixedDepositAccountSettingsForm.contains("transferToSavingsId")?92:-1),i(3),m(c(96,73,"labels.heading.For Pre-mature closure")),i(3),u(" ",c(99,75,"labels.inputs.Apply Penal Interest (less)")," "),i(4),u("",c(103,77,"labels.inputs.Penal Interest")," (%)"),i(5),m(c(108,79,"labels.inputs.Period")),i(3),G(p.preClosurePenalInterestOnTypeData),i(2),v(p.fixedDepositAccountSettingsForm.controls.withHoldTax?112:-1),i(4),u(" ",c(117,81,"labels.buttons.Previous")," "),i(3),u(" ",c(120,83,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,Ue,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-p[_ngcontent-%COMP%]{margin-top:1.7em}"]})}}return t})();var dp=()=>[2e3];function up(t,s){if(t&1&&(n(0,"mat-option",3),a(1),o()),t&2){let e=s.$implicit;d("value",e),i(),u(" ",e.name," ")}}function fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function gp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function xp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function Cp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function _p(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function hp(t,s){if(t&1){let e=F();n(0,"td",25),a(1),n(2,"button",26),M("click",function(){let p=S(e).$implicit,f=_();return A(f.editChargeAmount(p))}),g(3,"fa-icon",27),o()()}if(t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function vp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Dp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function Pp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned*"," ")}}function Mp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,dp).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function Tp(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Sp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeDate(p))}),g(1,"fa-icon",27),o()}}function Ap(t,s){if(t&1&&(n(0,"td",25),h(1,Pp,3,3,"span"),h(2,Mp,3,5,"span"),h(3,Tp,3,3,"span"),h(4,Sp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),v(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function Op(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function yp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeFeeInterval(p))}),g(1,"fa-icon",27),o()}}function Ip(t,s){if(t&1&&(n(0,"td",25),a(1),h(2,yp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," "),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?2:-1)}}function Fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function wp(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",29),M("click",function(){let p=S(e).$implicit,f=_();return A(f.deleteCharge(p))}),g(2,"fa-icon",30),o()()}}function Ep(t,s){t&1&&g(0,"tr",31)}function Bp(t,s){t&1&&g(0,"tr",32)}var _e=(()=>{class t{constructor(){this.dialog=x(Ut),this.dateUtils=x(et),this.settingsService=x(U),this.currency=null,this.chargesDataSource=[],this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.isChargesPatched=!1,this.pristine=!0}ngOnInit(){this.chargesDataSource=[],this.fixedDepositsAccountTemplate.id&&this.fixedDepositsAccountTemplate.charges&&(this.chargesDataSource=this.fixedDepositsAccountTemplate.charges.map(e=>X(H({},e),{id:e.chargeId}))||[])}ngOnChanges(){this.currency==null&&(this.fixedDepositsAccountTemplate.currency?this.currency=this.fixedDepositsAccountTemplate.currency:this.fixedDepositsAccountProductTemplate&&this.fixedDepositsAccountProductTemplate.currency&&(this.currency=this.fixedDepositsAccountProductTemplate.currency)),this.fixedDepositsAccountProductTemplate&&(this.chargeData=this.fixedDepositsAccountProductTemplate.chargeOptions.filter(e=>e.currency.code===this.currency.code))}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],p={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{amount:D.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let l=[new ti({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],p={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q,re=this.settingsService.dateFormat,pe=this.dateUtils.formatDate(D.data.value.date,re);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":q=X(H({},e),{dueDate:pe});break;case"Annual Fee":q=X(H({},e),{feeOnMonthDay:pe});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let l=[new Ne({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],p={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{feeInterval:D.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1}get fixedDepositAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-charges-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountFormValid:"fixedDepositAccountFormValid"},features:[Jt],decls:47,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),a(3),r(4,"translate"),o(),n(5,"mat-select",null,0),L(7,up,2,2,"mat-option",3,$),o()(),n(9,"div",4)(10,"button",5),M("click",function(){S(f);let q=k(6);return A(p.addCharge(q))}),g(11,"fa-icon",6),a(12),r(13,"translate"),o()(),n(14,"table",7),b(15,8),C(16,fp,3,3,"th",9)(17,gp,2,1,"td",10),P(),b(18,11),C(19,xp,3,3,"th",9)(20,Cp,2,1,"td",10),P(),b(21,12),C(22,_p,3,3,"th",9)(23,hp,4,1,"td",10),P(),b(24,13),C(25,vp,3,3,"th",9)(26,Dp,2,1,"td",10),P(),b(27,14),C(28,bp,3,3,"th",9)(29,Ap,5,4,"td",10),P(),b(30,15),C(31,Op,3,3,"th",9)(32,Ip,3,2,"td",10),P(),b(33,16),C(34,Fp,3,3,"th",9)(35,wp,3,0,"td",10),P(),C(36,Ep,1,0,"tr",17)(37,Bp,1,0,"tr",18),o()(),n(38,"div",19)(39,"button",20),g(40,"fa-icon",21),a(41),r(42,"translate"),o(),n(43,"button",22),a(44),r(45,"translate"),g(46,"fa-icon",23),o()()}if(l&2){let f=k(6);i(3),m(c(4,10,"labels.inputs.Charge")),i(4),G(p.chargeData),i(3),d("disabled",!f.value),i(2),u(" ",c(13,12,"labels.buttons.Add")," "),i(2),d("dataSource",p.chargesDataSource)("hidden",p.chargesDataSource.length===0),i(22),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns),i(4),u(" ",c(42,14,"labels.buttons.Previous")," "),i(2),d("disabled",!p.fixedDepositAccountFormValid),i(),u(" ",c(45,16,"labels.buttons.Next")," ")}},dependencies:[y,I,ot,nt,Ot,At,B,ut,wt,kt,Bt,Rt,Et,Nt,Ee,Vt,zt,qt,Ht,Wt,ne,yt,w],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var kp=["chartsTable"];function Rp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Np(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function Vp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function qp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function zp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod,"-",e.toPeriod,"\xA0",e.periodType.value," ")}}function Hp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function $p(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.amountRangeFrom,"-",e.amountRangeTo)}}function Lp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Gp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.annualInterestRate)}}function Up(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function jp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Wp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Kp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",27),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Qp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",28),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Yp(t,s){if(t&1){let e=F();n(0,"td",24)(1,"button",25),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Kp,4,3,"span",26)(3,Qp,4,3,"span",26),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Jp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Xp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Zp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function tc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function ec(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function ic(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function nc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function oc(t,s){if(t&1&&(n(0,"td",41),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function ac(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function rc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function pc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function cc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function sc(t,s){t&1&&g(0,"tr",42)}function lc(t,s){t&1&&g(0,"tr",43)}function mc(t,s){if(t&1&&(n(0,"table",33),b(1,34),C(2,Jp,3,3,"th",8)(3,Xp,2,1,"td",9),P(),b(4,35),C(5,Zp,3,3,"th",8)(6,tc,2,1,"td",9),P(),b(7,36),C(8,ec,3,3,"th",8)(9,ic,3,3,"td",9),P(),b(10,37),C(11,nc,3,3,"th",8)(12,oc,2,2,"td",38),P(),b(13,39),C(14,ac,3,3,"th",8)(15,rc,2,1,"td",9),P(),b(16,40),C(17,pc,3,3,"th",8)(18,cc,2,1,"td",9),P(),C(19,sc,1,0,"tr",15)(20,lc,1,0,"tr",16),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function dc(t,s){if(t&1&&(n(0,"td",24)(1,"div",29)(2,"mat-card",30)(3,"h4",31),a(4),r(5,"translate"),o(),C(6,mc,21,3,"table",32),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function uc(t,s){t&1&&g(0,"tr",42)}function fc(t,s){t&1&&g(0,"tr",43)}function gc(t,s){t&1&&g(0,"tr",44)}var Ve=(()=>{class t{constructor(){this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs,this.chartsTableRef.renderRows())}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-interest-rate-chart-step"]],viewQuery:function(l,p){if(l&1&&ht(kp,7),l&2){let f;vt(f=Dt())&&(p.chartsTableRef=f.first)}},inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:48,vars:23,consts:[["chartsTable",""],[1,"layout-column","gap-2px"],["class","flex-fill",4,"ngIf"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"incentives","layout-row-wrap","flex-fill"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1),C(1,Rp,6,4,"div",2),n(2,"div",3)(3,"span",4),a(4),r(5,"translate"),o(),n(6,"span",5),a(7),r(8,"dateFormat"),o()(),C(9,Np,7,6,"div",2)(10,Vp,6,4,"div",2),n(11,"div",3)(12,"span",4),a(13),r(14,"translate"),o(),n(15,"span",5),a(16),o()(),n(17,"table",6,0),b(19,7),C(20,qp,3,3,"th",8)(21,zp,2,3,"td",9),P(),b(22,10),C(23,Hp,3,3,"th",8)(24,$p,2,2,"td",9),P(),b(25,11),C(26,Lp,3,3,"th",8)(27,Gp,2,1,"td",9),P(),b(28,12),C(29,Up,3,3,"th",8)(30,jp,2,1,"td",9),P(),b(31,13),C(32,Wp,3,3,"th",8)(33,Yp,4,2,"td",9),P(),b(34,14),C(35,dc,7,6,"td",9),P(),C(36,uc,1,0,"tr",15)(37,fc,1,0,"tr",16)(38,gc,1,0,"tr",17),o()(),n(39,"div",18)(40,"button",19),g(41,"fa-icon",20),a(42),r(43,"translate"),o(),n(44,"button",21),a(45),r(46,"translate"),g(47,"fa-icon",22),o()()),l&2&&(i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(5,13,"labels.inputs.Valid from Date"),":"),i(3),m(c(8,15,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(14,17,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(p.fixedDepositsAccountProductTemplate!=null&&p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount?"Yes":"No"),i(),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(4),u(" ",c(43,19,"labels.buttons.Previous")," "),i(3),u(" ",c(46,21,"labels.buttons.Next")," "))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ne,ye,yt,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:2em}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var xc=()=>["../.."],Cc=()=>[2e3];function _c(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.External Id")),i(3),m(e.fixedDepositAccountData.externalId)}}function hc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Lock-in Period"),":"),i(3),T("",e.fixedDepositAccountData.lockinPeriodFrequency," ",E(7,10,at(6,5,e.fixedDepositAccountData.lockinPeriodFrequencyType,e.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function vc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Minimum Deposit Term"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.minDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.minDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.minDepositTermType.value,"catalogs"))}}function Dc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.In Multiples Of"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value,"catalogs"))}}function bc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Maximum Deposit Term")),i(3),T("",e.fixedDepositsAccountProductTemplate.maxDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.maxDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.maxDepositTermType.value,"catalogs"))}}function Pc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Linked Savings Account")),i(3),m(at(6,4,e.fixedDepositAccountData.linkAccountId,e.fixedDepositsAccountProductTemplate.savingsAccounts,"id","accountNo"))}}function Mc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(7,9,at(6,4,e.fixedDepositAccountData.maturityInstructionId,e.fixedDepositsAccountProductTemplate.maturityInstructionOptions,"id","value"),"catalogs"))}}function Tc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Penal Interest")," (%):"),i(3),m(e.fixedDepositsAccountProductTemplate.preClosurePenalInterest+"% ("+(e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType==null?null:e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id)+")")}}function Sc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"yesNo"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Withhold Tax is Applicable"),":"),i(3),m(c(6,4,e.fixedDepositAccountData.withHoldTax))}}function Ac(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Oc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function yc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function Ic(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function Fc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function wc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function Ec(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function Bc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function kc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function Rc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Nc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Vc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function qc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",29),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function zc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",30),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Hc(t,s){if(t&1){let e=F();n(0,"td",26)(1,"button",27),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,qc,4,3,"span",28)(3,zc,4,3,"span",28),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function $c(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Lc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Gc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Uc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function jc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function Wc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Kc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Qc(t,s){if(t&1&&(n(0,"td",43),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Yc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Jc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Xc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Zc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function ts(t,s){t&1&&g(0,"tr",44)}function es(t,s){t&1&&g(0,"tr",45)}function is(t,s){if(t&1&&(n(0,"table",35),b(1,36),C(2,$c,3,3,"th",9)(3,Lc,2,1,"td",10),P(),b(4,37),C(5,Gc,3,3,"th",9)(6,Uc,2,1,"td",10),P(),b(7,38),C(8,jc,3,3,"th",9)(9,Wc,3,3,"td",10),P(),b(10,39),C(11,Kc,3,3,"th",9)(12,Qc,2,2,"td",40),P(),b(13,41),C(14,Yc,3,3,"th",9)(15,Jc,2,1,"td",10),P(),b(16,42),C(17,Xc,3,3,"th",9)(18,Zc,3,3,"td",10),P(),C(19,ts,1,0,"tr",16)(20,es,1,0,"tr",17),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function ns(t,s){if(t&1&&(n(0,"td",26)(1,"div",31)(2,"mat-card",32)(3,"h4",33),a(4),r(5,"translate"),o(),C(6,is,21,3,"table",34),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function os(t,s){t&1&&g(0,"tr",44)}function as(t,s){t&1&&g(0,"tr",45)}function rs(t,s){t&1&&g(0,"tr",46)}function ps(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function cs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function ss(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function ls(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function ms(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function us(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function fs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function gs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,Cc).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function xs(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Cs(t,s){if(t&1&&(n(0,"td",26),C(1,fs,3,3,"span",28)(2,gs,3,5,"span",28)(3,xs,3,3,"span",28),o()),t&2){let e=s.$implicit;i(),d("ngIf",e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"),i(),d("ngIf",e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"),i(),d("ngIf",!(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"))}}function _s(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function hs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," ")}}function vs(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bs(t,s){t&1&&g(0,"tr",44)}function Ps(t,s){t&1&&g(0,"tr",45)}function Ms(t,s){if(t&1&&(n(0,"div",47)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"table",35),b(6,48),C(7,ps,3,3,"th",9)(8,cs,2,1,"td",10),P(),b(9,49),C(10,ss,3,3,"th",9)(11,ls,2,1,"td",10),P(),b(12,42),C(13,ms,3,3,"th",9)(14,ds,2,1,"td",10),P(),b(15,50),C(16,us,3,3,"th",9)(17,Cs,4,3,"td",10),P(),b(18,51),C(19,_s,3,3,"th",9)(20,hs,2,1,"td",10),P(),b(21,52),C(22,vs,3,3,"th",9)(23,Ds,2,1,"td",10),P(),C(24,bs,1,0,"tr",16)(25,Ps,1,0,"tr",17),o()()),t&2){let e=_();i(2),m(c(3,4,"labels.heading.Charges")),i(3),d("dataSource",e.fixedDepositAccountData.charges),i(19),d("matHeaderRowDef",e.chargesDisplayedColumns),i(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var qe=(()=>{class t{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.submitEvent=new $e}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-preview-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountData:"fixedDepositAccountData"},outputs:{submitEvent:"submitEvent"},features:[Jt],decls:181,vars:176,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-100"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-40"],[1,"flex-60"],["class","layout-row flex-100",4,"ngIf"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1","irc-table",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["class","layout-row-wrap responsive-column flex-100",4,"ngIf"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-100","incentives"],[1,"layout-row-wrap","flex-100"],[1,"m-b-10","flex-13"],["class","flex-100 mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-100","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"],[1,"layout-row-wrap","responsive-column","flex-100"],["matColumnDef","name"],["matColumnDef","chargeCalculationType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"div",3)(6,"span",4),a(7),r(8,"translate"),o(),n(9,"span",5),a(10),r(11,"find"),o()(),n(12,"div",3)(13,"span",4),a(14),r(15,"translate"),o(),n(16,"span",5),a(17),r(18,"dateFormat"),o()(),C(19,_c,6,4,"div",6),n(20,"div",3)(21,"span",4),a(22),r(23,"translate"),o(),n(24,"span",5),a(25),r(26,"find"),r(27,"translateKey"),o()(),n(28,"h3",1),a(29),r(30,"translate"),o(),g(31,"mat-divider",2),n(32,"div",3)(33,"span",4),a(34),r(35,"translate"),o(),n(36,"span",5),a(37),o()(),n(38,"div",3)(39,"span",4),a(40),r(41,"translate"),o(),n(42,"span",5),a(43),o()(),n(44,"div",3)(45,"span",4),a(46),r(47,"translate"),o(),n(48,"span",5),a(49),o()(),n(50,"h3",1),a(51),r(52,"translate"),o(),g(53,"mat-divider",2),n(54,"div",3)(55,"span",4),a(56),r(57,"translate"),o(),n(58,"span",5),a(59),r(60,"currency"),o()(),n(61,"div",3)(62,"span",4),a(63),r(64,"translate"),o(),n(65,"span",5),a(66),r(67,"find"),r(68,"translateKey"),o()(),n(69,"div",3)(70,"span",4),a(71),r(72,"translate"),o(),n(73,"span",5),a(74),r(75,"find"),r(76,"translateKey"),o()(),n(77,"div",3)(78,"span",4),a(79),r(80,"translate"),o(),n(81,"span",5),a(82),r(83,"find"),r(84,"translateKey"),o()(),n(85,"div",3)(86,"span",4),a(87),r(88,"translate"),o(),n(89,"span",5),a(90),r(91,"find"),r(92,"translateKey"),o()(),n(93,"div",3)(94,"span",4),a(95),r(96,"translate"),o(),n(97,"span",5),a(98),r(99,"find"),r(100,"translateKey"),o()(),n(101,"h3",1),a(102),r(103,"translate"),o(),g(104,"mat-divider",2),C(105,hc,8,13,"div",6)(106,vc,7,8,"div",6)(107,Dc,7,8,"div",6)(108,bc,7,8,"div",6),n(109,"div",3)(110,"span",4),a(111),r(112,"translate"),o(),n(113,"span",5),a(114),r(115,"yesNo"),o()(),C(116,Pc,7,9,"div",6)(117,Mc,8,12,"div",6),n(118,"div",3)(119,"span",4),a(120),r(121,"translate"),o(),n(122,"span",5),a(123),r(124,"yesNo"),o()(),C(125,Tc,6,4,"div",6)(126,Sc,7,6,"div",6),n(127,"h3",1),a(128),r(129,"translate"),o(),g(130,"mat-divider",2),C(131,Ac,6,4,"div",6),n(132,"div",3)(133,"span",4),a(134),r(135,"translate"),o(),n(136,"span",5),a(137),r(138,"dateFormat"),o()(),C(139,Oc,7,6,"div",6)(140,yc,6,4,"div",6),n(141,"div",3)(142,"span",4),a(143),r(144,"translate"),o(),n(145,"span",5),a(146),r(147,"yesNo"),o()(),n(148,"table",7),b(149,8),C(150,Ic,3,3,"th",9)(151,Fc,3,6,"td",10),P(),b(152,11),C(153,wc,3,3,"th",9)(154,Ec,4,6,"td",10),P(),b(155,12),C(156,Bc,3,3,"th",9)(157,kc,3,3,"td",10),P(),b(158,13),C(159,Rc,3,3,"th",9)(160,Nc,2,1,"td",10),P(),b(161,14),C(162,Vc,3,3,"th",9)(163,Hc,4,2,"td",10),P(),b(164,15),C(165,ns,7,6,"td",10),P(),C(166,os,1,0,"tr",16)(167,as,1,0,"tr",17)(168,rs,1,0,"tr",18),o(),C(169,Ms,26,6,"div",19),o(),n(170,"div",20)(171,"button",21),g(172,"fa-icon",22),a(173),r(174,"translate"),o(),n(175,"button",23),a(176),r(177,"translate"),o(),n(178,"button",24),M("click",function(){return p.submitEvent.emit()}),a(179),r(180,"translate"),o()()),l&2&&(i(2),m(c(3,59,"labels.heading.Details")),i(5),m(c(8,61,"labels.inputs.Product")),i(3),m(at(11,63,p.fixedDepositAccountData.productId,p.fixedDepositsAccountTemplate.productOptions,"id","name")),i(4),m(c(15,68,"labels.inputs.Submitted On")),i(3),m(c(18,70,p.fixedDepositAccountData.submittedOnDate)),i(2),d("ngIf",p.fixedDepositAccountData.externalId),i(3),m(c(23,72,"labels.inputs.Field Officer")),i(3),m(E(27,79,at(26,74,p.fixedDepositAccountData.fieldOfficerId,p.fixedDepositsAccountProductTemplate.fieldOfficerOptions,"id","displayName")||"Unassigned","inputs")),i(4),m(c(30,82,"labels.heading.Currency")),i(5),m(c(35,84,"labels.inputs.Currency")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.code),i(3),m(c(41,86,"labels.inputs.Currency Multiple")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.inMultiplesOf),i(3),m(c(47,88,"labels.inputs.Decimal Places")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.decimalPlaces),i(2),m(c(52,90,"labels.heading.Terms")),i(5),u("",c(57,92,"labels.inputs.Fixed Deposit Amount"),":"),i(3),m(at(60,94,p.fixedDepositAccountData.depositAmount,p.fixedDepositsAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")),i(4),u("",c(64,99,"labels.inputs.Deposit Period"),":"),i(3),T("",p.fixedDepositAccountData.depositPeriod," ",E(68,106,at(67,101,p.fixedDepositAccountData.depositPeriodFrequencyId,p.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs")),i(5),u("",c(72,109,"labels.inputs.Interest Compounding Period"),":"),i(3),m(E(76,116,at(75,111,p.fixedDepositAccountData.interestCompoundingPeriodType,p.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(80,119,"labels.inputs.Interest Posting Period"),":"),i(3),m(E(84,126,at(83,121,p.fixedDepositAccountData.interestPostingPeriodType,p.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(88,129,"labels.inputs.Interest Calculated using"),":"),i(3),m(E(92,136,at(91,131,p.fixedDepositAccountData.interestCalculationType,p.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,"id","value"),"catalogs")),i(5),u("",c(96,139,"labels.inputs.Days in Year"),":"),i(3),m(E(100,146,at(99,141,p.fixedDepositAccountData.interestCalculationDaysInYearType,p.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"),"catalogs")),i(4),m(c(103,149,"labels.heading.Settings")),i(3),d("ngIf",p.fixedDepositAccountData.lockinPeriodFrequency),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.minDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.maxDepositTerm),i(3),u("",c(112,151,"labels.inputs.Transfer Interest to Savings Account"),"?"),i(3),m(c(115,153,p.fixedDepositAccountData.transferInterestToSavings)),i(2),d("ngIf",p.fixedDepositAccountData.transferInterestToSavings),i(),d("ngIf",p.fixedDepositAccountData.maturityInstructionId),i(3),u("",c(121,155,"labels.inputs.Apply Penal Interest (less)"),":"),i(3),m(c(124,157,p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.withHoldTax),i(2),m(c(129,159,"labels.heading.Interest Rate Chart")),i(3),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(135,161,"labels.inputs.Valid from Date"),":"),i(3),m(c(138,163,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(144,165,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(c(147,167,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),i(2),d("dataSource",p.interestRateChartData),i(18),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(),d("ngIf",p.fixedDepositAccountData.charges.length),i(4),u(" ",c(174,169,"labels.buttons.Previous")," "),i(2),d("routerLink",R(175,xc)),i(),u(" ",c(177,171,"labels.buttons.Cancel")," "),i(3),u(" ",c(180,173,"labels.buttons.Submit")," "))},dependencies:[y,Ae,Oe,I,tt,Y,B,Re,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ye,se,yt,w,It,Xi,ue,tn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-b[_ngcontent-%COMP%]{margin-bottom:.25em}.irc-table[_ngcontent-%COMP%]{width:100%}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();function Ts(t,s){t&1&&g(0,"fa-icon",14)}function Ss(t,s){t&1&&g(0,"fa-icon",14)}function As(t,s){t&1&&g(0,"fa-icon",15)}function Os(t,s){t&1&&g(0,"fa-icon",16)}function ys(t,s){t&1&&g(0,"fa-icon",17)}function Is(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Fs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Es(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function Bs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function ks(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Rs(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,ks,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Mi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountTemplate=e.fixedDepositsAccountTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValid(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.createFixedDepositAccount(f).subscribe(D=>{this.router.navigate(["../",D.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ts,1,0,"ng-template",3)(4,Ss,1,0,"ng-template",4)(5,As,1,0,"ng-template",5)(6,Os,1,0,"ng-template",6)(7,ys,1,0,"ng-template",7),n(8,"mat-step",8),C(9,Is,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Fs,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,ws,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Es,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,Bs,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Rs,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValid),i(),v(p.fixedDepositAccountFormValid?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();function Ns(t,s){t&1&&g(0,"fa-icon",14)}function Vs(t,s){t&1&&g(0,"fa-icon",14)}function qs(t,s){t&1&&g(0,"fa-icon",15)}function zs(t,s){t&1&&g(0,"fa-icon",16)}function Hs(t,s){t&1&&g(0,"fa-icon",17)}function $s(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Ls(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function Gs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Us(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function js(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function Ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Ks(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,Ws,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Ti=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountAndTemplate=e.fixedDepositsAccountAndTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e,this.currency=this.fixedDepositsAccountAndTemplate.currency}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValidAndNotPristine(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid&&(!this.fixedDepositAccountDetailsForm.pristine||!this.fixedDepositAccountTermsForm.pristine||!this.fixedDepositAccountSettingsForm.pristine||!this.fixedDepositAccountChargesStep.pristine)}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep?.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountAndTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.updateFixedDepositAccount(this.fixedDepositsAccountAndTemplate.id,f).subscribe(D=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ns,1,0,"ng-template",3)(4,Vs,1,0,"ng-template",4)(5,qs,1,0,"ng-template",5)(6,zs,1,0,"ng-template",6)(7,Hs,1,0,"ng-template",7),n(8,"mat-step",8),C(9,$s,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Ls,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,Gs,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Us,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,js,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Ks,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValidAndNotPristine),i(),v(p.fixedDepositAccountFormValidAndNotPristine?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();var Si=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var wi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.paramMap.get("fixedDepositAccountId"),p=e.paramMap.get("id");return this.fixedDepositsService.getFixedDepositsAccountTransaction(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Ei=(()=>{class t{constructor(){this.savingsService=x($t),this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("name"),p=e.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId");switch(l){case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(p);case"Close":return this.fixedDepositsService.getFixedDepositsAccountClosureTemplate(p);case"Withdrawal":return this.fixedDepositsService.getFixedDepositsAccountTransactionTemplate(p);default:return}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Bi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.parent.paramMap.get("clientId");return this.fixedDepositsService.getFixedDepositsAccountTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var ki=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountAndTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();function Qs(t,s){if(t&1&&(n(0,"span"),g(1,"mifosx-external-identifier",4),o()),t&2){let e=_();i(),d("externalId",_t(e.fixedDepositsAccountData.externalId))}}function Ys(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function Js(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Closed On")),i(3),m(c(6,4,e.fixedDepositsAccountData.timeline.closedOnDate))}}function Xs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Tax Group")),i(3),m(e.fixedDepositsAccountData.taxGroup.name)}}function Zs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(6,4,e.fixedDepositsAccountData.onAccountClosure.value,"catalogs"))}}function tl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Pre-cloure Penal")),i(3),T(" ",e.fixedDepositsAccountData.preClosurePenalInterest," % on ",E(6,5,e.fixedDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs")," ")}}function el(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Deposits")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2")," ")}}function il(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Withdrawals")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2")," ")}}function nl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Interest Earned")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function ol(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()(),h(20,el,7,9,"tr"),h(21,il,7,9,"tr"),h(22,nl,7,9,"tr"),o()()()),t&2){let e=_();i(2),m(c(3,8,"labels.heading.Performance History")),i(6),m(c(9,10,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,12,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,17,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,19,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(e.fixedDepositsAccountData.summary.totalDeposits?20:-1),i(),v(e.fixedDepositsAccountData.summary.totalWithdrawals?21:-1),i(),v(e.fixedDepositsAccountData.summary.totalInterestEarned>=0?22:-1)}}function al(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Other Details")),i(6),m(c(9,7,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}var Ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.currency=this.fixedDepositsAccountData.currency}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-general-tab"]],decls:91,vars:77,consts:[[1,"fixed-deposits-account-tables","layout-row","gap-2percent"],[1,"flex-49","layout-column","gap-4percent"],[1,"table-headers"],[1,"flex-49"],["completed","true",3,"externalId"],[1,"r-amount"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h4",2),a(4),r(5,"translate"),o(),n(6,"table")(7,"tbody")(8,"tr")(9,"td"),a(10),r(11,"translate"),o(),n(12,"td"),h(13,Qs,2,2,"span"),h(14,Ys,3,3,"span"),o()(),n(15,"tr")(16,"td"),a(17),r(18,"translate"),o(),n(19,"td"),a(20),r(21,"dateFormat"),r(22,"translate"),o()(),h(23,Js,7,6,"tr"),n(24,"tr")(25,"td"),a(26),r(27,"translate"),o(),n(28,"td"),a(29),r(30,"translateKey"),o()(),n(31,"tr")(32,"td"),a(33),r(34,"translate"),o(),n(35,"td"),a(36),r(37,"dateFormat"),o()(),n(38,"tr")(39,"td"),a(40),r(41,"translate"),o(),n(42,"td"),a(43),r(44,"translateKey"),o()(),h(45,Xs,6,4,"tr"),h(46,Zs,7,7,"tr"),o()()(),n(47,"div")(48,"h4",2),a(49),r(50,"translate"),o(),n(51,"table")(52,"tbody")(53,"tr")(54,"td"),a(55),r(56,"translate"),o(),n(57,"td"),a(58),o()(),n(59,"tr")(60,"td"),a(61),r(62,"translate"),o(),n(63,"td"),a(64),r(65,"translateKey"),o()(),n(66,"tr")(67,"td"),a(68),r(69,"translate"),o(),n(70,"td"),a(71),r(72,"translateKey"),o()(),n(73,"tr")(74,"td"),a(75),r(76,"translate"),o(),n(77,"td"),a(78),r(79,"translateKey"),o()(),n(80,"tr")(81,"td"),a(82),r(83,"translate"),o(),n(84,"td"),a(85),r(86,"translateKey"),o()(),h(87,tl,7,8,"tr"),o()()()(),n(88,"div",3),h(89,ol,23,24,"div")(90,al,20,21,"div"),o()()),l&2&&(i(4),m(c(5,29,"labels.heading.Fixed Deposit Details")),i(6),m(c(11,31,"labels.inputs.External Id")),i(3),v(p.fixedDepositsAccountData.externalId?13:-1),i(),v(p.fixedDepositsAccountData.externalId?-1:14),i(3),m(c(18,33,"labels.inputs.Activated On")),i(3),u(" ",p.fixedDepositsAccountData.timeline.activatedOnDate?c(21,35,p.fixedDepositsAccountData.timeline.activatedOnDate):c(22,37,"labels.text.Not Activated")," "),i(3),v(p.fixedDepositsAccountData.timeline.closedOnDate?23:-1),i(3),m(c(27,39,"labels.inputs.Field Officer")),i(3),u(" ",p.fixedDepositsAccountData.fieldOfficerName?p.fixedDepositsAccountData.fieldOfficerName:E(30,41,"Unassigned","inputs")," "),i(4),m(c(34,44,"labels.inputs.Maturity Date")),i(3),u(" ",p.fixedDepositsAccountData.maturityDate?c(37,46,p.fixedDepositsAccountData.maturityDate):"N/A"," "),i(4),m(c(41,48,"labels.inputs.Deposit Period")),i(3),T(" ",p.fixedDepositsAccountData.depositPeriod,"\xA0",E(44,50,p.fixedDepositsAccountData.depositPeriodFrequency.value,"catalogs")," "),i(2),v(p.fixedDepositsAccountData.withHoldTax?45:-1),i(),v(p.fixedDepositsAccountData.onAccountClosure?46:-1),i(3),m(c(50,53,"labels.heading.Interest Details")),i(6),m(c(56,55,"labels.inputs.Interest Rate")),i(3),u("",p.fixedDepositsAccountData.nominalAnnualInterestRate," %"),i(3),m(c(62,57,"labels.inputs.Interest Compounding Period")),i(3),m(E(65,59,p.fixedDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),i(4),m(c(69,62,"labels.inputs.Interest Posting Period")),i(3),m(E(72,64,p.fixedDepositsAccountData.interestPostingPeriodType.value,"catalogs")),i(4),m(c(76,67,"labels.inputs.Interest Calculated Using")),i(3),m(E(79,69,p.fixedDepositsAccountData.interestCalculationType.value,"catalogs")),i(4),m(c(83,72,"labels.inputs.No. of Days in Year")),i(3),m(E(86,74,p.fixedDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),i(2),v(p.fixedDepositsAccountData.preClosurePenalApplicable?87:-1),i(2),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?89:90))},dependencies:[y,I,Ji,se,yt,w,It],styles:[".fixed-deposits-account-tables[_ngcontent-%COMP%]{padding:1%}"]})}}return t})();var rl=[{path:"",data:{title:"All Fixed Deposits",breadcrumb:"Fixed Deposits",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Fixed Deposit Account",breadcrumb:"Create Fixed Deposit Account"},component:Mi,resolve:{fixedDepositsAccountTemplate:Bi}},{path:":fixedDepositAccountId",data:{title:"Fixed Deposit Account View",routeParamBreadcrumb:"fixedDepositAccountId"},resolve:{fixedDepositsAccountData:Si},children:[{path:"",component:ai,resolve:{fixedDepositsAccountData:Si,savingsDatatables:Ii},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Ai,data:{title:"Fixed Deposit Account Details",breadcrumb:"General",routeParamBreadcrumb:!1}},{path:"interest-rate-chart",component:ri,data:{title:"Fixed Deposit Account Interest Rate Chart",breadcrumb:"Interest Rate Chart",routeParamBreadcrumb:!1}},{path:"transactions",component:pi,data:{title:"Fixed Deposit Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:li,data:{title:"Fixed Deposit Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions",component:mi,data:{title:"Fixed Deposit Account Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:di,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:yi}}]}]},{path:"edit",data:{title:"Edit Fixed Deposit Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ti,resolve:{fixedDepositsAccountAndTemplate:ki}},{path:"transactions",data:{title:"Fixed Deposits Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../transactions",pathMatch:"prefix"},{path:"account-transfers",loadChildren:()=>import("./account-transfers.module-HM5KQJMK.js").then(t=>t.AccountTransfersModule)},{path:":id",data:{routeParamBreadcrumb:"id"},children:[{path:"",component:Pi,resolve:{fixedDepositsAccountTransaction:wi}}]}]},{path:"actions/:name",data:{title:"Fixed Deposits Account Actions",routeParamBreadcrumb:"name"},component:bi,resolve:{fixedDepositsAccountActionData:Ei}}]}]}],ln=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({providers:[Si,yi,Ii,wi,Ei,Bi,ki],imports:[Oi.forChild(rl),Oi]})}}return t})();var Qx=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({imports:[pn,en,nn,ln,ai,pi,li,mi,ri,di,bi,ui,fi,ni,ii,ze,gi,xi,Ci,Pi,ci,si,_i,hi,vi,Mi,ge,xe,_e,Ce,Ve,qe,Ti,Ai,Di]})}}return t})();export{Qx as FixedDepositsModule}; +import{a as sn}from"./chunk-HV33S2D3.js";import{a as yi,b as Ii}from"./chunk-NCNV2LOX.js";import{a as cn}from"./chunk-GZ4W472E.js";import{$b as oe,$c as pt,$d as ut,Ac as Xt,Ad as Li,Ae as Re,Af as Ht,Bc as Be,Bg as on,Cc as Ut,Cd as Gi,Da as b,Db as se,Dc as Zt,Dd as nt,Df as ve,Ea as P,Eb as y,Ec as te,Ed as Ct,Fc as ee,G as Gt,Ga as F,Gc as ie,Gg as an,H as He,Hd as Pt,Ia as M,Id as ot,If as Ki,Ig as rn,Ja as _,Jd as Ft,Jf as Qi,K as x,Kd as dt,Kf as Yi,L as S,Lc as w,Ld as At,M as A,Na as ht,Nb as le,Nd as Ot,Oa as vt,Pa as Dt,Pd as me,Qa as k,Qb as Ni,Qd as Mt,Qg as ei,Rd as Tt,Rg as pn,Sc as et,Sd as St,T as Jt,Tc as U,Td as Ue,Ua as a,Ud as yt,Va as m,Wa as u,Wd as It,We as Ui,Xa as T,Xd as de,Ya as ce,Yb as Ie,Yc as rt,Zb as Fe,Zc as V,_ as Ri,_c as it,_f as Ji,ac as ae,bb as _t,bc as we,ca as i,cd as Z,ce as he,da as $e,de as ke,df as ji,dg as Xi,eb as R,ed as ct,ef as Wi,eg as ue,fb as Ge,fd as jt,fg as Zi,gc as N,gd as zi,gg as tn,hb as r,hc as Vi,hd as st,hf as Ye,hg as en,ib as c,if as Je,ja as O,jb as E,jc as W,jf as Xe,ka as Le,kc as tt,kd as lt,ke as je,kf as Ze,lb as at,lc as qi,le as We,lf as ne,lg as $t,mc as Oi,me as Ke,mf as Wt,na as C,nd as gt,nf as wt,of as Et,pa as Te,pc as Ee,pf as Bt,qb as Se,qc as B,ra as h,rd as mt,re as Qe,rf as kt,sa as v,sb as Ae,sf as Rt,ta as $,tb as Oe,td as I,ua as L,ud as Y,uf as Nt,va as G,vd as Hi,vf as Vt,vg as nn,wa as d,wd as $i,xa as n,xd as xt,xf as qt,xg as ti,ya as o,yf as zt,yg as Ne,za as g,zb as ye,zd as bt}from"./chunk-2XE77LT4.js";import{a as H,b as X}from"./chunk-PHUH23IY.js";var mn=()=>({confirm:!0}),ii=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-calculate-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Calculate Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to calculate interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,mn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var dn=()=>({confirm:!0}),ni=(()=>{class t{constructor(){this.dialogRef=x(Xt)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-post-interest-dialog"]],decls:14,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,5,"labels.heading.Post Interest")),i(4),u("",c(6,7,"labels.text.Are you sure you want to post interest")," ?"),i(4),m(c(10,9,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(13,dn)),i(),u(" ",c(13,11,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var un=()=>({confirm:!0}),ze=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-toggle-withhold-tax-dialog"]],decls:17,vars:25,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","",3,"color","mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),r(3,"translate"),o(),n(4,"div",1)(5,"p"),a(6),r(7,"translate"),r(8,"translate"),r(9,"translate"),o()(),n(10,"mat-dialog-actions",2)(11,"button",3),a(12),r(13,"translate"),o(),n(14,"button",4),a(15),r(16,"translate"),o()()),l&2&&(i(),T(" ",c(2,10,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(3,12,"labels.heading.Withhold Tax"),` +`),i(5),ce(" ",c(7,14,"labels.text.Are you sure you want to")," ",c(8,16,p.data.isEnable?"labels.heading.Enable":"labels.heading.Disable")," ",c(9,18,"labels.text.withhold tax for this account")," ? "),i(6),m(c(13,20,"labels.buttons.Cancel")),i(2),d("color",_t(p.data.isEnable?"accent":"warn"))("mat-dialog-close",R(24,un)),i(),u(" ",c(16,22,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var oi=class{constructor(s){this.setOptions(s),this.setButtons(s)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}setButtons(s){switch(s){case"Active":this.buttonsArray=[{name:"Premature Close",icon:"fa fa-arrow-left"},{name:"Calculate Interest",icon:"fa fa-table"},{name:"Undo Activation",icon:"fa fa-undo"}];break;case"Matured":this.buttonsArray=[{name:"Close",icon:"fa fa-arrow-right"},{name:"Calculate Interest",icon:"fa fa-table"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Modify Application",icon:"fa fa-pencil "},{name:"Approve",icon:"fa fa-check"}];break;case"Approved":this.buttonsArray=[{name:"Undo Approval",icon:"fa fa-undo"},{name:"Activate",icon:"fa fa-check"}];break;default:this.buttonsArray=[]}}setOptions(s){switch(s){case"Active":case"Matured":this.optionArray=[{name:"Post Interest"},{name:"Add Charge"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Reject"},{name:"Withdrawn by Client"},{name:"Add Charge"},{name:"Delete"}];break;case"Approved":default:this.optionArray=[]}}addOption(s){this.optionArray.push(s)}};var j=(()=>{class t{constructor(){this.http=x(Ni)}getFixedDepositsAccountData(e){let l=new le().set("associations","all");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}deleteFixedDepositsAccount(e){return this.http.delete(`/fixeddepositaccounts/${e}`)}executeFixedDepositsAccountCommand(e,l,p){let f=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}`,p,{params:f})}getFixedDepositsAccountTransaction(e,l){return this.http.get(`/fixeddepositaccounts/${e}/transactions/${l}`)}executeFixedDepositsAccountTransactionsCommand(e,l,p,f){let D=new le().set("command",l);return this.http.post(`/fixeddepositaccounts/${e}/transactions/${f}`,p,{params:D})}getFixedDepositsAccountClosureTemplate(e){let l=new le().set("command","close");return this.http.get(`/fixeddepositaccounts/${e}/template`,{params:l})}getFixedDepositsAccountTransactionTemplate(e){return this.http.get(`/fixeddepositaccounts/${e}/transactions/template`)}getFixedDepositsAccountTemplate(e,l){let p=new le().set("clientId",e);return p=l?p.set("productId",l):p,this.http.get("/fixeddepositaccounts/template",{params:p})}getFixedDepositsAccountAndTemplate(e){let l=new le().set("associations","charges,+linkedAccount").set("template","true");return this.http.get(`/fixeddepositaccounts/${e}`,{params:l})}createFixedDepositAccount(e){return this.http.post("/fixeddepositaccounts",e)}updateFixedDepositAccount(e,l){return this.http.put(`/fixeddepositaccounts/${e}`,l)}getStandingInstructions(e,l,p,f,D){let q=new le().set("clientId",e).set("clientName",l).set("fromAccountId",p).set("fromAccountType","2").set("locale",f).set("dateFormat",D);return this.http.get("/standinginstructions",{params:q})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fn=()=>["./general"],gn=()=>["./interest-rate-chart"],xn=()=>["./charges"],Cn=()=>["./transactions"],_n=()=>["./standing-instructions"],hn=t=>["./datatables",t];function vn(t,s){if(t&1&&(n(0,"span",21),g(1,"mifosx-account-number",18),o()),t&2){let e=_();i(),d("accountNo",_t(e.fixedDepositsAccountData.clientAccountNo))}}function Dn(t,s){if(t&1&&(n(0,"div",22)(1,"h3",31),a(2),r(3,"translate"),o(),n(4,"table",32)(5,"tbody")(6,"tr")(7,"td",33),a(8),r(9,"translate"),o(),n(10,"td",34),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td",33),a(15),r(16,"translate"),o(),n(17,"td",34),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Account Overview")),i(6),m(c(9,7,"labels.inputs.Current Balance")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.summary.accountBalance,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Deposit Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function bn(t,s){if(t&1){let e=F();n(0,"button",35),M("click",function(){let p=S(e).$implicit,f=_();return A(f.doAction(p.name))}),g(1,"i",36),a(2),r(3,"translateKey"),o()}if(t&2){let e=s.$implicit;i(),d("ngClass",_t(e.icon)),i(),u(" ",E(3,3,e.name,"menus")," ")}}function Pn(t,s){if(t&1){let e=F();n(0,"span")(1,"button",35),M("click",function(){let p=S(e).$implicit,f=_(2);return A(f.doAction(p.name))}),a(2),r(3,"translateKey"),o()()}if(t&2){let e=s.$implicit;i(2),m(E(3,1,e.name,"menus"))}}function Mn(t,s){if(t&1&&(n(0,"button",37),a(1),r(2,"translateKey"),o(),n(3,"mat-menu",null,5),L(5,Pn,4,4,"span",null,$),o()),t&2){let e=k(4),l=_();d("matMenuTriggerFor",e),i(),m(E(2,2,"More","menus")),i(4),G(l.buttonConfig.options)}}function Tn(t,s){if(t&1&&(n(0,"span")(1,"a",30,6),a(3),r(4,"translate"),o()()),t&2){let e=k(2);i(),d("routerLink",R(5,Cn))("active",e.isActive),i(2),u(" ",c(4,3,"labels.inputs.Transactions")," ")}}function Sn(t,s){if(t&1&&(n(0,"a",30,7),a(2),r(3,"translate"),o()),t&2){let e=k(1);d("routerLink",R(5,_n))("active",e.isActive),i(2),u(" ",c(3,3,"labels.inputs.Standing Instructions")," ")}}function An(t,s){if(t&1&&(n(0,"a",30,8),a(2),o()),t&2){let e=k(1),l=_().$implicit;d("routerLink",Ge(3,hn,l.registeredTableName))("active",e.isActive),i(2),u(" ",l.registeredTableName," ")}}function On(t,s){if(t&1&&C(0,An,3,5,"a",38),t&2){let e=s.$implicit;d("mifosxHasPermission","READ_"+e.registeredTableName)}}var ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.fixedDepositsService=x(j),this.savingsService=x($t),this.dialog=x(Ut),this.showTransactions=!1,this.route.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.savingsDatatables=e.savingsDatatables,this.currency=this.fixedDepositsAccountData.currency;let l=e.fixedDepositsAccountData.status;this.showTransactions=l.id>=300}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}ngOnInit(){this.setConditionalButtons()}setConditionalButtons(){let e=this.fixedDepositsAccountData.status.value;this.buttonConfig=new oi(e),this.fixedDepositsAccountData.taxGroup&&e==="Active"&&(this.fixedDepositsAccountData.withHoldTax?this.buttonConfig.addOption({name:"Disable Withhold Tax"}):this.buttonConfig.addOption({name:"Enable Withhold Tax"}))}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}doAction(e){switch(e){case"Approve":case"Reject":case"Activate":case"Close":case"Undo Approval":case"Undo Activation":case"Add Charge":case"Withdrawn by Client":case"Premature Close":this.router.navigate([`actions/${e}`],{relativeTo:this.route});break;case"Modify Application":this.router.navigate(["edit"],{relativeTo:this.route});break;case"Delete":this.deleteFixedDepositsAccount();break;case"Calculate Interest":this.calculateInterest();break;case"Post Interest":this.postInterest();break;case"Enable Withhold Tax":this.enableWithHoldTax();break;case"Disable Withhold Tax":this.disableWithHoldTax();break}}deleteFixedDepositsAccount(){this.dialog.open(ke,{data:{deleteContext:`fixed deposit account with id: ${this.fixedDepositsAccountData.id}`}}).afterClosed().subscribe(l=>{l.delete&&this.fixedDepositsService.deleteFixedDepositsAccount(this.fixedDepositsAccountData.id).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}calculateInterest(){this.dialog.open(ii).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"calculateInterest",{}).subscribe(()=>{this.reload()})})}postInterest(){this.dialog.open(ni).afterClosed().subscribe(l=>{l.confirm&&this.fixedDepositsService.executeFixedDepositsAccountCommand(this.fixedDepositsAccountData.id,"postInterest",{}).subscribe(()=>{this.reload()})})}enableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!0}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!0}).subscribe(()=>{this.reload()})})}disableWithHoldTax(){this.dialog.open(ze,{data:{isEnable:!1}}).afterClosed().subscribe(l=>{l.confirm&&this.savingsService.executeSavingsAccountUpdateCommand(this.fixedDepositsAccountData.id,"updateWithHoldTax",{withHoldTax:!1}).subscribe(()=>{this.reload()})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-view"]],decls:54,vars:44,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["IRC","routerLinkActive"],["charges","routerLinkActive"],["tabPanel",""],["More","matMenu"],["transactions","routerLinkActive"],["standingInstructions","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["mat-card-md-image","",1,"profile-image",3,"matTooltip","src"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"ngClass","matTooltip"],[3,"accountNo"],[1,"account-overview"],[1,"m-r-10"],[1,"m-l-10"],[1,"flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Fixed Deposit account actions","yPosition","below",3,"matMenuTriggerFor"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item",""],[1,"content"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],[1,"flex-100"],[1,"account-overview","flex-100"],[1,"flex-70"],[1,"r-amount","flex-30"],["mat-menu-item","",3,"click"],[3,"ngClass"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"]],template:function(l,p){if(l&1&&(n(0,"mat-card",9)(1,"mat-card-header",10)(2,"mat-card-title-group",11)(3,"div",12)(4,"div"),g(5,"img",13),r(6,"translate"),o()(),n(7,"div",14)(8,"mat-card-title")(9,"div",15)(10,"div",16)(11,"h3"),g(12,"i",17),r(13,"statusLookup"),a(14),r(15,"translate"),g(16,"mifosx-account-number",18),o(),n(17,"span",19)(18,"span",20),a(19),r(20,"translate"),o(),a(21),h(22,vn,2,2,"span",21),o()(),h(23,Dn,20,21,"div",22),n(24,"div",23)(25,"button",24)(26,"mat-icon",25),g(27,"fa-icon",26),o()()()()()(),n(28,"mat-menu",null,0),L(30,bn,4,6,"button",27,$),h(32,Mn,7,5),o()()(),n(33,"mat-card-content",28)(34,"nav",29)(35,"a",30,1),a(37),r(38,"translate"),o(),n(39,"a",30,2),a(41),r(42,"translate"),o(),h(43,Tn,5,6,"span"),n(44,"a",30,3),a(46),r(47,"translate"),o(),h(48,Sn,4,6,"a",30),L(49,On,1,1,"a",30,$),o(),n(51,"mat-tab-nav-panel",null,4),g(53,"router-outlet"),o()()()),l&2){let f=k(29),D=k(36),q=k(40),re=k(45),pe=k(52);i(5),d("matTooltip",_t(c(6,27,"tooltips.Fixed Deposits Account")))("src","assets/images/fd_account_placeholder.png",Ri),i(7),d("ngClass",c(13,29,p.fixedDepositsAccountData.status.code))("matTooltip",p.fixedDepositsAccountData.status.value),i(2),T(" ",c(15,31,"labels.inputs.Fixed Deposit Product")," : ",p.fixedDepositsAccountData.depositProductName," "),i(2),d("accountNo",_t(p.fixedDepositsAccountData.accountNo)),i(3),u("",c(20,33,"labels.text."+p.entityType)," :"),i(2),u(" ",p.fixedDepositsAccountData.clientName||p.fixedDepositsAccountData.groupName," "),i(),v(p.fixedDepositsAccountData.clientAccountNo?22:-1),i(),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?23:-1),i(2),d("matMenuTriggerFor",f),i(5),G(p.buttonConfig.singleButtons),i(2),v(p.buttonConfig.options.length?32:-1),i(2),d("tabPanel",pe),i(),d("routerLink",R(41,fn))("active",D.isActive),i(2),u(" ",c(38,35,"labels.inputs.General")," "),i(2),d("routerLink",R(42,gn))("active",q.isActive),i(2),u(" ",c(42,37,"labels.inputs.Interest Rate Chart")," "),i(2),v(p.showTransactions?43:-1),i(),d("routerLink",R(43,xn))("active",re.isActive),i(2),u(" ",c(47,39,"labels.inputs.Charges")," "),i(2),v(p.fixedDepositsAccountData.clientId?48:-1),i(),G(p.savingsDatatables)}},dependencies:[y,Se,I,tt,Y,xt,de,Li,$i,Gi,me,Hi,an,Ee,Ke,Qe,ut,We,je,Ki,Qi,qi,Yi,Vi,se,w,It,Zi],encapsulation:2})}}return t})();function yn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function In(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function Fn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function wn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function En(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Bn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function kn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Rn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Nn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Vn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",21),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function qn(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",22),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function zn(t,s){if(t&1){let e=F();n(0,"td",18)(1,"button",19),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Vn,4,3,"span",20)(3,qn,4,3,"span",20),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Hn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function $n(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Ln(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Gn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function Un(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function jn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Wn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Kn(t,s){if(t&1&&(n(0,"td",35),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Qn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Yn(t,s){if(t&1&&(n(0,"td",18),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Jn(t,s){t&1&&(n(0,"th",17),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Xn(t,s){if(t&1&&(n(0,"td",18),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function Zn(t,s){t&1&&g(0,"tr",36)}function to(t,s){t&1&&g(0,"tr",37)}function eo(t,s){if(t&1&&(n(0,"table",27),b(1,28),C(2,Hn,3,3,"th",7)(3,$n,2,1,"td",8),P(),b(4,29),C(5,Ln,3,3,"th",7)(6,Gn,2,1,"td",8),P(),b(7,30),C(8,Un,3,3,"th",7)(9,jn,3,3,"td",8),P(),b(10,31),C(11,Wn,3,3,"th",7)(12,Kn,2,2,"td",32),P(),b(13,33),C(14,Qn,3,3,"th",7)(15,Yn,2,1,"td",8),P(),b(16,34),C(17,Jn,3,3,"th",7)(18,Xn,3,3,"td",8),P(),C(19,Zn,1,0,"tr",14)(20,to,1,0,"tr",15),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function io(t,s){if(t&1&&(n(0,"td",18)(1,"div",23)(2,"mat-card",24)(3,"h4",25),a(4),r(5,"translate"),o(),C(6,eo,21,3,"table",26),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives==null?null:e.incentives.length)}}function no(t,s){t&1&&g(0,"tr",36)}function oo(t,s){t&1&&g(0,"tr",37)}function ao(t,s){t&1&&g(0,"tr",38)}var ri=(()=>{class t{constructor(){this.route=x(N),this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.route.parent.data.subscribe(e=>{this.interestRateChartData=e.fixedDepositsAccountData.accountChart.chartSlabs})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-interest-rate-chart-tab"]],decls:29,vars:7,consts:[["chartsTable",""],[1,"tab-container","mat-typography"],[1,"align-start-center"],[1,"m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-fill","incentives"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()()(),n(6,"div",4)(7,"table",5,0),b(9,6),C(10,yn,3,3,"th",7)(11,In,3,6,"td",8),P(),b(12,9),C(13,Fn,3,3,"th",7)(14,wn,4,6,"td",8),P(),b(15,10),C(16,En,3,3,"th",7)(17,Bn,3,3,"td",8),P(),b(18,11),C(19,kn,3,3,"th",7)(20,Rn,2,1,"td",8),P(),b(21,12),C(22,Nn,3,3,"th",7)(23,zn,4,2,"td",8),P(),b(24,13),C(25,io,7,6,"td",8),P(),C(26,no,1,0,"tr",14)(27,oo,1,0,"tr",15)(28,ao,1,0,"tr",16),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Interest Rates")),i(3),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,ye,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var po=t=>["/","journal-entry","view",t];function co(t,s){if(t&1){let e=F();n(0,"div",5)(1,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideReversed())}),a(2),r(3,"translate"),o(),n(4,"mat-checkbox",21),M("click",function(){S(e);let p=_();return A(p.hideAccruals())}),a(5),r(6,"translate"),o()()}if(t&2){let e=_();i(),d("formControl",e.hideReversedParam),i(),u(" ",c(3,4,"labels.inputs.Hide Reversed")),i(2),d("formControl",e.hideAccrualsParam),i(),u(" ",c(6,6,"labels.inputs.Hide Accruals"))}}function so(t,s){t&1&&(n(0,"th",22),a(1,"#"),o())}function lo(t,s){if(t&1){let e=F();n(0,"td",23),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.index;i(),u(" ",e+1," ")}}function mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.ID")))}function uo(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",e.id," ")}}function fo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Date")))}function go(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"dateFormat"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.date)," ")}}function xo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Transaction Type")))}function Co(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"translateKey"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",E(2,2,e.transactionType.value,"catalogs")," ")}}function _o(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Debit")))}function ho(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?c(2,2,e.amount):"N/A"," ")}}function vo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Credit")))}function Do(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",l.isDebit(e.transactionType)?"N/A":c(2,2,e.amount)," ")}}function bo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Balance")))}function Po(t,s){if(t&1){let e=F();n(0,"td",24),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),a(1),r(2,"formatNumber"),o()}if(t&2){let e=s.$implicit,l=_();d("ngClass",l.savingsTransactionColor(e)),i(),u(" ",c(2,2,e.runningBalance)," ")}}function Mo(t,s){t&1&&(n(0,"th",22),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function To(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",26)(2,"mat-icon"),a(3,"more_vert"),o()(),n(4,"mat-menu",null,0)(6,"button",27),M("click",function(){let p=S(e).$implicit,f=_();return A(f.showTransactions(p))}),n(7,"mat-icon"),g(8,"fa-icon",28),o(),n(9,"span"),a(10),r(11,"translate"),o()(),n(12,"button",29),M("click",function(p){S(e);let f=_();return A(f.routeEdit(p))}),n(13,"mat-icon"),g(14,"fa-icon",30),o(),n(15,"span"),a(16),r(17,"translate"),o()()()()}if(t&2){let e=s.$implicit,l=k(5);i(),d("matMenuTriggerFor",l),i(9),m(c(11,4,"labels.text.View Transaction")),i(2),d("routerLink",Ge(8,po,"S"+e.id)),i(4),m(c(17,6,"tooltips.View Journal Entries"))}}function So(t,s){t&1&&g(0,"tr",31)}function Ao(t,s){t&1&&g(0,"tr",32)}var pi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dialog=x(Ut),this.displayedColumns=["row","id","transactionDate","transactionType","debit","credit","balance","actions"],this.route.parent.data.subscribe(e=>{this.transactionsData=e.fixedDepositsAccountData.transactions,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.status=e.fixedDepositsAccountData.status.value})}ngOnInit(){this.hideAccrualsParam=new Z(!1),this.hideReversedParam=new Z(!1),this.dataSource=new ve(this.transactionsData)}checkStatus(){return this.status==="Active"||this.status==="Closed"||this.status==="Transfer in progress"||this.status==="Transfer on hold"||this.status==="Premature Closed"||this.status==="Matured"}isDebit(e){return e.withdrawal===!0||e.feeDeduction===!0||e.overdraftInterest===!0||e.withholdTax===!0}showTransactions(e){e.transfer?this.router.navigate([`account-transfers/account-transfers/${e.transfer.id}`],{relativeTo:this.route}):this.router.navigate([e.id],{relativeTo:this.route})}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,!this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(!this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,l){let p=this.transactionsData;(l||e)&&(p=this.transactionsData.filter(f=>!(e&&f.reversed)&&!(l&&f.transactionType.accrual))),this.dataSource=new ve(p),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}savingsTransactionColor(e){return e.reversed?"strike":e.transfer?"transfer":e.transactionType.accrual?"accrual":""}routeEdit(e){e.stopPropagation()}undoTransaction(e){}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(l,p){if(l&1&&(ht(Ui,7),ht(Wi,7)),l&2){let f;vt(f=Dt())&&(p.paginator=f.first),vt(f=Dt())&&(p.sort=f.first)}},decls:35,vars:7,consts:[["transactionMenu","matMenu"],[1,"tab-container","mat-typography"],[1,"mat-elevation-z1","m-b-25"],[1,"layout-row","align-start"],[1,"m-b-20"],[1,"action-button","m-b-20","layout-row","gap-20px"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","transactionDate"],["matColumnDef","transactionType"],["matColumnDef","debit"],["matColumnDef","credit"],["matColumnDef","balance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],[1,"accruals",3,"click","formControl"],["mat-header-cell",""],["mat-cell","",3,"click"],["mat-cell","",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h3"),a(5),r(6,"translate"),o()(),h(7,co,7,8,"div",5),o(),n(8,"table",6),b(9,7),C(10,so,2,0,"th",8)(11,lo,2,1,"td",9),P(),b(12,10),C(13,mo,3,3,"th",8)(14,uo,2,2,"td",11),P(),b(15,12),C(16,fo,3,3,"th",8)(17,go,3,4,"td",11),P(),b(18,13),C(19,xo,3,3,"th",8)(20,Co,3,5,"td",11),P(),b(21,14),C(22,_o,3,3,"th",8)(23,ho,3,4,"td",11),P(),b(24,15),C(25,vo,3,3,"th",8)(26,Do,3,4,"td",11),P(),b(27,16),C(28,bo,3,3,"th",8)(29,Po,3,4,"td",11),P(),b(30,17),C(31,Mo,3,3,"th",8)(32,To,18,10,"td",18),P(),C(33,So,1,0,"tr",19)(34,Ao,1,0,"tr",20),o()()()),l&2&&(i(5),m(c(6,5,"labels.heading.All Transactions")),i(2),v(p.checkStatus()?7:-1),i(),d("dataSource",p.dataSource),i(25),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,Se,I,it,zi,tt,Ue,wt,kt,Bt,Rt,Et,Nt,Ee,Ke,Qe,We,je,ut,Vt,zt,qt,Ht,yt,w,It,ue],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;color:#000}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .linked[_ngcontent-%COMP%]{color:#4461e2}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .accrual[_ngcontent-%COMP%]{color:#999}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}"]})}}return t})();var Oo=()=>({confirm:!0}),ci=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-waive-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Waive Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to waive charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,Oo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var yo=()=>({confirm:!0}),si=(()=>{class t{constructor(){this.dialogRef=x(Xt),this.data=x(Be)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-inactivate-charge-dialog"]],decls:14,vars:15,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["align","end"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close"]],template:function(l,p){l&1&&(n(0,"h1",0),a(1),r(2,"translate"),o(),n(3,"div",1)(4,"p"),a(5),r(6,"translate"),o()(),n(7,"mat-dialog-actions",2)(8,"button",3),a(9),r(10,"translate"),o(),n(11,"button",4),a(12),r(13,"translate"),o()()),l&2&&(i(),m(c(2,6,"labels.heading.Inactivate Charge")),i(4),T("",c(6,8,"labels.text.Are you sure you want to inactivate charge with id"),": ",p.data.id," ?"),i(4),m(c(10,10,"labels.buttons.Cancel")),i(2),d("mat-dialog-close",R(14,yo)),i(),u(" ",c(13,12,"labels.buttons.Confirm")," "))},dependencies:[y,I,B,te,ee,ie,Zt,w],encapsulation:2})}}return t})();var Io=["chargesTable"],Fo=()=>[2e3];function wo(t,s){if(t&1){let e=F();n(0,"div",4)(1,"button",22),M("click",function(){S(e);let p=_();return A(p.toggleCharges())}),a(2),o()()}if(t&2){let e=_();i(2),u(" ",e.showInactiveCharges?"View Active Charges":"View Inactive Charges"," ")}}function Eo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function Bo(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.name)}}function ko(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Fee/Penalty")))}function Ro(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.penalty===!0?E(2,1,"Penalty","catalogs"):E(3,4,"Fee","catalogs")," ")}}function No(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Payment Due At")))}function Vo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeTimeType.value,"catalogs"))}}function qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due As Of")))}function zo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),o()),t&2){let e=s.$implicit;i(),m(c(2,1,e.dueDate))}}function Ho(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repeats On")))}function $o(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"dateFormat"),r(3,"translateKey"),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(7,Fo).concat(e.feeOnMonthDay),"dd MMMM"):E(3,4,"Unassigned","inputs")," ")}}function Lo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Calculation Type")))}function Go(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),m(E(2,1,e.chargeCalculationType.value,"catalogs"))}}function Uo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Due")))}function jo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amount)," ")}}function Wo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Paid")))}function Ko(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountPaid)," ")}}function Qo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Waived")))}function Yo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountWaived)," ")}}function Jo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Outstanding")))}function Xo(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",e.currency.displaySymbol,"\xA0",c(2,2,e.amountOutstanding)," ")}}function Zo(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function ta(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.editCharge(f))}),g(2,"i",28),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Charge")))}function ea(t,s){if(t&1){let e=F();n(0,"button",29),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.deleteCharge(f.id))}),g(2,"i",30),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Charge")))}function ia(t,s){t&1&&(n(0,"span"),C(1,ta,3,4,"button",25)(2,ea,3,4,"button",26),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}function na(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.payCharge(f.id))}),g(2,"i",32),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Pay Charge")))}function oa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(2).$implicit,D=_();return D.routeEdit(p),A(D.waiveCharge(f.id))}),g(2,"i",33),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Waive Charge")))}function aa(t,s){if(t&1){let e=F();n(0,"button",27),r(1,"translate"),M("click",function(p){S(e);let f=_(3).$implicit,D=_();return D.routeEdit(p),A(D.inactivateCharge(f.id))}),g(2,"i",34),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Inactivate Charge")))}function ra(t,s){t&1&&C(0,aa,3,4,"button",25),t&2&&d("mifosxHasPermission","INACTIVATE_SAVINGSACCOUNTCHARGE")}function pa(t,s){if(t&1&&(n(0,"span"),C(1,na,3,4,"button",25)(2,oa,3,4,"button",25),h(3,ra,1,1,"button",31),o()),t&2){let e=_().$implicit,l=_();i(),d("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"),i(),d("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),i(),v(l.isRecurringCharge(e)?3:-1)}}function ca(t,s){if(t&1&&(n(0,"td",24),h(1,ia,3,2,"span"),h(2,pa,4,3,"span"),o()),t&2){let e=s.$implicit,l=_();i(),v(l.fixedDepositsAccountData.status.value==="Submitted and pending approval"?1:-1),i(),v(l.fixedDepositsAccountData.status.value==="Active"&&e.amountOutstanding!==0?2:-1)}}function sa(t,s){t&1&&g(0,"tr",35)}function la(t,s){t&1&&g(0,"tr",36)}var li=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.showInactiveCharges=!1,this.displayedColumns=["name","feeOrPenalty","paymentDueAt","dueAsOf","repeatsOn","calculationType","due","paid","waived","outstanding","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.chargesData=this.fixedDepositsAccountData.charges})}ngOnInit(){let e=this.chargesData?this.chargesData.filter(l=>l.isActive):[];this.dataSource=new ve(e)}toggleCharges(){if(this.showInactiveCharges=!this.showInactiveCharges,this.showInactiveCharges){let e=this.chargesData.filter(l=>!l.isActive);this.dataSource.data=e}else{let e=this.chargesData.filter(l=>l.isActive);this.dataSource.data=e}this.chargesTableRef.renderRows()}payCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:"",type:"number",required:!0}),new ti({controlName:"dueDate",label:"Payment Date",value:"",type:"date",required:!0})],p={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dueDate:this.dateUtils.formatDate(D.data.value.dueDate,re),dateFormat:re,locale:q});this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"paycharge",pe,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(ci,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"waive",{},e).subscribe(()=>{this.reload()})})}inactivateCharge(e){this.dialog.open(si,{data:{id:e}}).afterClosed().subscribe(p=>{p.confirm&&this.savingsService.executeSavingsAccountChargesCommand(this.fixedDepositsAccountData.id,"inactivate",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],p={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=this.settingsService.language.code,re=this.settingsService.dateFormat,pe=X(H({},D.data.value),{dateFormat:re,locale:q});this.savingsService.editSavingsAccountCharge(this.fixedDepositsAccountData.id,pe,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(ke,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.savingsService.deleteSavingsAccountCharge(this.fixedDepositsAccountData.id,e).subscribe(()=>{this.reload()})})}isRecurringCharge(e){return e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Weekly Fee"}routeEdit(e){e.stopPropagation()}reload(){let e=this.fixedDepositsAccountData.clientId,l=this.router.url;this.router.navigateByUrl(`/clients/${e}/fixed-deposits-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([l]))}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(l,p){if(l&1&&ht(Io,7),l&2){let f;vt(f=Dt())&&(p.chargesTableRef=f.first)}},decls:45,vars:7,consts:[["chargesTable",""],[1,"tab-container","mat-typography"],[1,"layout-row","align-start"],[1,"m-b-10"],[1,"action-button","m-b-20"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feeOrPenalty"],["matColumnDef","paymentDueAt"],["matColumnDef","dueAsOf"],["matColumnDef","repeatsOn"],["matColumnDef","calculationType"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],[1,"fa","fa-ban"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"div",3)(3,"h3"),a(4),r(5,"translate"),o()(),h(6,wo,3,1,"div",4),o(),n(7,"div",5)(8,"table",6,0),b(10,7),C(11,Eo,3,3,"th",8)(12,Bo,2,1,"td",9),P(),b(13,10),C(14,ko,3,3,"th",8)(15,Ro,4,7,"td",9),P(),b(16,11),C(17,No,3,3,"th",8)(18,Vo,3,4,"td",9),P(),b(19,12),C(20,qo,3,3,"th",8)(21,zo,3,3,"td",9),P(),b(22,13),C(23,Ho,3,3,"th",8)(24,$o,4,8,"td",9),P(),b(25,14),C(26,Lo,3,3,"th",8)(27,Go,3,4,"td",9),P(),b(28,15),C(29,Uo,3,3,"th",8)(30,jo,3,4,"td",9),P(),b(31,16),C(32,Wo,3,3,"th",8)(33,Ko,3,4,"td",9),P(),b(34,17),C(35,Qo,3,3,"th",8)(36,Yo,3,4,"td",9),P(),b(37,18),C(38,Jo,3,3,"th",8)(39,Xo,3,4,"td",9),P(),b(40,19),C(41,Zo,3,3,"th",8)(42,ca,3,2,"td",9),P(),C(43,sa,1,0,"tr",20)(44,la,1,0,"tr",21),o()()()),l&2&&(i(4),m(c(5,5,"labels.heading.All Charges")),i(2),v(p.chargesData?6:-1),i(2),d("dataSource",p.dataSource),i(35),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w,It,ue],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var ma=["instructionsTable"];function da(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Client")))}function ua(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function fa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.From Account")))}function ga(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function xa(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Beneficiary")))}function Ca(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),m(e.toClient.displayName)}}function _a(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.To Account")))}function ha(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function va(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function Da(t,s){if(t&1&&(n(0,"td",17),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.instructionType.value,"/",e.amount)}}function ba(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Validity")))}function Pa(t,s){if(t&1&&(n(0,"td",17),a(1),r(2,"dateFormat"),r(3,"dateFormat"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.validFrom)," to ",c(3,4,e.validTill)," ")}}function Ma(t,s){t&1&&(n(0,"th",16),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Ta(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",20),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.Edit Standing Instruction")))}function Sa(t,s){t&1&&(n(0,"span"),C(1,Ta,3,4,"button",18),o()),t&2&&(i(),d("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Aa(t,s){if(t&1){let e=F();n(0,"button",22),r(1,"translate"),M("click",function(){S(e);let p=_(2).$implicit,f=_();return A(f.deleteStandingInstruction(p.id))}),g(2,"i",23),o()}t&2&&d("matTooltip",_t(c(1,2,"tooltips.Delete Standing Instruction")))}function Oa(t,s){t&1&&(n(0,"span"),C(1,Aa,3,4,"button",21),o()),t&2&&(i(),d("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function ya(t,s){t&1&&(n(0,"button",19),r(1,"translate"),g(2,"i",24),o()),t&2&&d("matTooltip",_t(c(1,2,"tooltips.View Standing Instruction")))}function Ia(t,s){if(t&1&&(n(0,"td",17),h(1,Sa,2,1,"span"),h(2,Oa,2,1,"span"),C(3,ya,3,4,"button",18),o()),t&2){let e=s.$implicit;i(),v(e.status.value!=="Deleted"?1:-1),i(),v(e.status.value!=="Deleted"?2:-1),i(),d("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function Fa(t,s){t&1&&g(0,"tr",25)}function wa(t,s){t&1&&g(0,"tr",26)}var mi=(()=>{class t{constructor(){this.route=x(N),this.fixedDepositsService=x(j),this.dialog=x(Ut),this.accountTransfersService=x(cn),this.settingsService=x(U),this.dataSource=new ve,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.fixedDepositsData=e.fixedDepositsAccountData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.fixedDepositsData.clientId,l=this.fixedDepositsData.clientName,p=this.fixedDepositsData.id,f=this.settingsService.language.code,D=this.settingsService.dateFormat;this.fixedDepositsService.getStandingInstructions(e,l,p,f,D).subscribe(q=>{this.instructionsData=q.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(ke,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(p=>{p.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(l,p){if(l&1&&ht(ma,7),l&2){let f;vt(f=Dt())&&(p.instructionTableRef=f.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(l,p){l&1&&(n(0,"div",1)(1,"div",2)(2,"h3"),a(3),r(4,"translate"),o()(),n(5,"div",3)(6,"table",4,0),b(8,5),C(9,da,3,3,"th",6)(10,ua,2,2,"td",7),P(),b(11,8),C(12,fa,3,3,"th",6)(13,ga,2,2,"td",7),P(),b(14,9),C(15,xa,3,3,"th",6)(16,Ca,2,1,"td",7),P(),b(17,10),C(18,_a,3,3,"th",6)(19,ha,2,2,"td",7),P(),b(20,11),C(21,va,3,3,"th",6)(22,Da,2,2,"td",7),P(),b(23,12),C(24,ba,3,3,"th",6)(25,Pa,4,6,"td",7),P(),b(26,13),C(27,Ma,3,3,"th",6)(28,Ia,4,3,"td",7),P(),C(29,Fa,1,0,"tr",14)(30,wa,1,0,"tr",15),o()()()),l&2&&(i(3),m(c(4,4,"labels.heading.All Standing Instructions")),i(3),d("dataSource",p.dataSource),i(23),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns))},dependencies:[y,I,B,de,wt,kt,Bt,Rt,Et,Nt,me,Vt,zt,qt,Ht,yt,w],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();var di=(()=>{class t{constructor(){this.route=x(N),this.entityId=this.route.parent.parent.snapshot.paramMap.get("fixedDepositAccountId"),this.route.data.subscribe(e=>{this.entityDatatable=e.savingsDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-datatable-tabs"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Fixed Deposit",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(l,p){l&1&&(n(0,"div",0),g(1,"mifosx-entity-datatable-tab",1),o()),l&2&&(i(),d("entityId",p.entityId)("multiRowDatatableFlag",p.multiRowDatatableFlag)("entityDatatable",p.entityDatatable))},dependencies:[y,I,on],encapsulation:2})}}return t})();var Ea=()=>["../../"];function Ba(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Approved On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var ui=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createApproveFixedDepositsAccountForm()}createApproveFixedDepositsAccountForm(){this.approveFixedDepositsAccountForm=this.formBuilder.group({approvedOnDate:["",V.required],note:[""]})}submit(){let e=this.approveFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.approveFixedDepositsAccountForm.value.approvedOnDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"approve",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-approve-fixed-deposits-account"]],decls:26,vars:21,consts:[["approvedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ba,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.approveFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Approved On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.approveFixedDepositsAccountForm.controls.approvedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,Ea)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.approveFixedDepositsAccountForm),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var ka=()=>["../../"];function Ra(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Rejected On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var fi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRejectFixedDepositsAccountForm()}createRejectFixedDepositsAccountForm(){this.rejectFixedDepositsAccountForm=this.formBuilder.group({rejectedOnDate:["",V.required],note:[""]})}submit(){let e=this.rejectFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.rejectFixedDepositsAccountForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"reject",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-reject-fixed-deposits-account"]],decls:26,vars:21,consts:[["rejectedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ra,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.rejectFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Rejected On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.rejectFixedDepositsAccountForm.controls.rejectedOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,ka)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.rejectFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Na=()=>["../../"];function Va(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Activated On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var gi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createActivateFixedDepositsAccountForm()}createActivateFixedDepositsAccountForm(){this.activateFixedDepositsAccountForm=this.formBuilder.group({activatedOnDate:["",V.required]})}submit(){let e=this.activateFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.activateFixedDepositsAccountForm.value.activatedOnDate;e.activatedOnDate instanceof Date&&(e.activatedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.savingsService.executeSavingsAccountCommand(this.accountId,"activate",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-activate-fixed-deposits-account"]],decls:20,vars:18,consts:[["activatedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100",3,"click"],["matInput","","required","","formControlName","activatedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"mat-form-field",3),M("click",function(){S(f);let q=k(11);return A(q.open())}),n(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",4)(9,"mat-datepicker-toggle",5)(10,"mat-datepicker",null,0),h(12,Va,7,9,"mat-error"),o()(),n(13,"mat-card-actions",6)(14,"button",7),a(15),r(16,"translate"),o(),n(17,"button",8),a(18),r(19,"translate"),o()()()()()}if(l&2){let f=k(11);i(2),d("formGroup",p.activateFixedDepositsAccountForm),i(4),m(c(7,11,"labels.inputs.Activated On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.activateFixedDepositsAccountForm.controls.activatedOnDate.hasError("required")?12:-1),i(2),d("routerLink",R(17,Na)),i(),u(" ",c(16,13,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.activateFixedDepositsAccountForm.valid),i(),u(" ",c(19,15,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var qa=()=>["../../"],xi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.savingsService=x($t),this.fixedDepositsService=x(j),this.route=x(N),this.router=x(W),this.undoCommand="undoapproval",this.undoAction=this.route.snapshot.params.name,this.undoAction==="Undo Activation"&&(this.undoCommand="undoactivate"),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.createUndoApprovalFixedDepositsAccountForm()}createUndoApprovalFixedDepositsAccountForm(){this.undoApprovalFixedDepositsAccountForm=this.formBuilder.group({note:[""]})}submit(){let e=H({},this.undoApprovalFixedDepositsAccountForm.value);this.undoAction==="Undo Activation"?this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})}):this.savingsService.executeSavingsAccountCommand(this.accountId,this.undoCommand,e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-undo-approval-fixed-deposits-account"]],decls:16,vars:13,consts:[[1,"container"],[3,"ngSubmit","formGroup"],[1,"flex-100"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"mat-card")(2,"form",1),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"mat-form-field",2)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"textarea",3),o()(),n(9,"mat-card-actions",4)(10,"button",5),a(11),r(12,"translate"),o(),n(13,"button",6),a(14),r(15,"translate"),o()()()()()),l&2&&(i(2),d("formGroup",p.undoApprovalFixedDepositsAccountForm),i(4),m(c(7,6,"labels.inputs.Note")),i(4),d("routerLink",R(12,qa)),i(),u(" ",c(12,8,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.undoApprovalFixedDepositsAccountForm.valid),i(),u(" ",c(15,10,"labels.buttons.Confirm")," "))},dependencies:[y,I,ct,rt,it,pt,st,lt,tt,Y,xt,bt,ot,nt,dt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var za=()=>["../../"];function Ha(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Withdrawn On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}var Ci=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawFixedDepositsAccountForm()}createWithdrawFixedDepositsAccountForm(){this.withdrawFixedDepositsAccountForm=this.formBuilder.group({withdrawnOnDate:["",V.required],note:[""]})}submit(){let e=this.withdrawFixedDepositsAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.withdrawFixedDepositsAccountForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"withdrawnByApplicant",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-withdraw-by-client-fixed-deposits-account"]],decls:26,vars:21,consts:[["withdrawnOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,Ha,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"textarea",7),o()()(),n(19,"mat-card-actions",8)(20,"button",9),a(21),r(22,"translate"),o(),n(23,"button",10),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.withdrawFixedDepositsAccountForm),i(5),m(c(8,12,"labels.inputs.Withdrawn On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.withdrawFixedDepositsAccountForm.controls.withdrawnOnDate.hasError("required")?13:-1),i(3),m(c(17,14,"labels.inputs.Note")),i(4),d("routerLink",R(20,za)),i(),u(" ",c(22,16,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.withdrawFixedDepositsAccountForm.valid),i(),u(" ",c(25,18,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var $a=()=>["../../"];function La(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name+" ("+e.currency.name+")"," ")}}function Ga(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Charge")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ua(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Amount")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ja(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Wa(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function Ka(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due for collection on")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Qa(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,0),h(8,Ka,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due for collection on")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.dueDate.hasError("required")?8:-1)}}function Ya(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Due Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Ja(t,s){if(t&1){let e=F();n(0,"mat-form-field",13),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",16)(5,"mat-datepicker-toggle",15)(6,"mat-datepicker",null,1),h(8,Ya,7,9,"mat-error"),o()}if(t&2){let e=k(7),l=_(2);i(2),m(c(3,6,"labels.inputs.Due On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(3),v(l.fixedDepositsChargeForm.controls.feeOnMonthDay.hasError("required")?8:-1)}}function Xa(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",17),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Repeats Every")))}function Za(t,s){if(t&1&&(n(0,"div",4)(1,"mat-form-field")(2,"mat-label"),a(3),r(4,"translate"),o(),g(5,"input",10),h(6,Ua,7,9,"mat-error"),o(),n(7,"mat-form-field")(8,"mat-label"),a(9),r(10,"translate"),o(),n(11,"mat-select",11),L(12,ja,2,2,"mat-option",6,$),o()(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),n(18,"mat-select",12),L(19,Wa,2,2,"mat-option",6,$),o()(),h(21,Qa,9,8,"mat-form-field"),h(22,Ja,9,8,"mat-form-field"),h(23,Xa,5,3,"mat-form-field"),o()),t&2){let e=_();i(3),m(c(4,7,"labels.inputs.Amount")),i(3),v(e.fixedDepositsChargeForm.controls.amount.hasError("required")?6:-1),i(3),m(c(10,9,"labels.inputs.Charge Calculation")),i(3),G(e.chargeDetails.chargeCalculationTypeOptions),i(4),m(c(17,11,"labels.inputs.Charge time type")),i(3),G(e.chargeDetails.chargeTimeTypeOptions),i(2),v(e.fixedDepositsChargeForm.contains("dueDate")?21:-1),i(),v(e.fixedDepositsChargeForm.contains("feeOnMonthDay")?22:-1),i(),v(e.fixedDepositsChargeForm.contains("feeInterval")?23:-1)}}var _i=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.savingsService=x($t),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsChargeOptions=e.fixedDepositsAccountActionData.chargeOptions}),this.fixedDepositAccountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createFixedDepositsChargeForm(),this.buildDependencies()}buildDependencies(){this.fixedDepositsChargeForm.controls.chargeId.valueChanges.subscribe(e=>{this.savingsService.getChargeTemplate(e).subscribe(l=>{this.chargeDetails=l;let p=l.chargeTimeType.id;(l.chargeTimeType.value==="Withdrawal Fee"||l.chargeTimeType.value==="Saving No Activity Fee")&&(this.chargeDetails.dueDateNotRequired=!0),(l.chargeTimeType.value==="Annual Fee"||l.chargeTimeType.value==="Monthly Fee")&&(this.chargeDetails.chargeTimeTypeAnnualOrMonth=!0),!this.chargeDetails.dueDateNotRequired&&!this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("dueDate",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("dueDate"),!this.chargeDetails.dueDateNotRequired&&this.chargeDetails.chargeTimeTypeAnnualOrMonth?this.fixedDepositsChargeForm.addControl("feeOnMonthDay",new Z("",V.required)):this.fixedDepositsChargeForm.removeControl("feeOnMonthDay"),p.value==="Monthly Fee"?this.fixedDepositsChargeForm.addControl("feeInterval",new Z(l.feeInterval,V.required)):this.fixedDepositsChargeForm.removeControl("feeInterval"),this.fixedDepositsChargeForm.patchValue({amount:l.amount,chargeCalculationType:l.chargeCalculationType.id,chargeTimeType:l.chargeTimeType.id})})})}createFixedDepositsChargeForm(){this.fixedDepositsChargeForm=this.formBuilder.group({chargeId:["",V.required],amount:["",V.required],chargeCalculationType:[{value:"",disabled:!0}],chargeTimeType:[{value:"",disabled:!0}]})}submit(){let e=this.fixedDepositsChargeForm.value;if(e.locale=this.settingsService.language.code,e.feeInterval||(e.feeInterval=this.chargeDetails.feeInterval),this.chargeDetails.dueDateNotRequired!==!0)if(this.chargeDetails.chargeTimeTypeAnnualOrMonth){let l="MMMM-dd";if(e.monthDayFormat=l,e.feeOnMonthDay){let p=this.fixedDepositsChargeForm.value.feeOnMonthDay;e.feeOnMonthDay=this.dateUtils.formatDate(p,l)}}else{let l=this.settingsService.dateFormat;if(e.dateFormat=l,e.dueDate){let p=this.fixedDepositsChargeForm.value.dueDate;e.dueDate=this.dateUtils.formatDate(p,l)}}this.savingsService.createSavingsCharge(this.fixedDepositAccountId,"charges",e).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-add-charge-fixed-deposits-account"]],decls:21,vars:15,consts:[["dueDatePicker",""],["feeOnMonthDayPicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","required","","matInput","","formControlName","amount"],["formControlName","chargeCalculationType"],["formControlName","chargeTimeType"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","feeOnMonthDay",3,"min","max","matDatepicker"],["matInput","","formControlName","feeInterval"]],template:function(l,p){l&1&&(n(0,"div",2)(1,"mat-card")(2,"form",3),M("ngSubmit",function(){return p.submit()}),n(3,"mat-card-content")(4,"div",4)(5,"mat-form-field")(6,"mat-label"),a(7),r(8,"translate"),o(),n(9,"mat-select",5),L(10,La,2,2,"mat-option",6,$),o(),h(12,Ga,7,9,"mat-error"),o(),h(13,Za,24,13,"div",4),o(),n(14,"mat-card-actions",7)(15,"button",8),a(16),r(17,"translate"),o(),n(18,"button",9),a(19),r(20,"translate"),o()()()()()()),l&2&&(i(2),d("formGroup",p.fixedDepositsChargeForm),i(5),m(c(8,8,"labels.inputs.Charge")),i(3),G(p.savingsChargeOptions),i(2),v(p.fixedDepositsChargeForm.controls.chargeId.hasError("required")?12:-1),i(),v(p.chargeDetails?13:-1),i(2),d("routerLink",R(14,$a)),i(),u(" ",c(17,10,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.fixedDepositsChargeForm.valid),i(),u(" ",c(20,12,"labels.buttons.Submit")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,w],styles:[".container[_ngcontent-%COMP%]{width:37rem}"]})}}return t})();var tr=()=>["../../"];function er(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Premature Close Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ir(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",10),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Maturity Amount")))}function nr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function or(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ar(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",11),L(5,nr,2,2,"mat-option",12,$),o(),h(7,or,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Action")),i(3),G(e.onAccountClosureOptions),i(2),v(e.prematureCloseAccountForm.controls.onAccountClosureId.hasError("required")?7:-1)}}function rr(t,s){if(t&1&&(n(0,"mat-option",12),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function pr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",13),L(5,rr,2,2,"mat-option",12,$),o(),h(7,pr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.prematureCloseAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",14),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}function lr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"textarea",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Note")))}var hi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isSubmitted=!1,this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createPrematureCloseAccountForm(),this.buildDependencies()}createPrematureCloseAccountForm(){this.prematureCloseAccountForm=this.formBuilder.group({closedOnDate:["",V.required]})}buildDependencies(){this.prematureCloseAccountForm.get("closedOnDate").valueChanges.subscribe(e=>{this.isSubmitted||this.calculatePrematureAmount(e)})}calculatePrematureAmount(e){let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f={closedOnDate:this.dateUtils.formatDate(e,p),dateFormat:p,locale:l};this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"calculatePrematureAmount",f).subscribe(D=>{this.savingsAccountsData=D.savingsAccounts,this.onAccountClosureOptions=D.onAccountClosureOptions,this.prematureCloseAccountForm.addControl("maturityAmount",new Z({value:"",disabled:!0})),this.prematureCloseAccountForm.addControl("onAccountClosureId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("note",new Z("")),this.prematureCloseAccountForm.get("maturityAmount").patchValue(D.maturityAmount),this.addTransferDetails()})}addTransferDetails(){this.prematureCloseAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.prematureCloseAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.prematureCloseAccountForm.addControl("transferDescription",new Z(""))):(this.prematureCloseAccountForm.removeControl("toSavingsAccountId"),this.prematureCloseAccountForm.removeControl("transferDescription"))})}submit(){let e=this.prematureCloseAccountForm.value;this.isSubmitted=!0;let l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.prematureCloseAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"prematureClose",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-premature-close-fixed-deposits-account"]],decls:26,vars:23,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,er,7,9,"mat-error"),o(),h(14,ir,5,3,"mat-form-field"),h(15,ar,8,4,"mat-form-field"),h(16,cr,8,4,"mat-form-field"),h(17,sr,5,3,"mat-form-field"),h(18,lr,5,3,"mat-form-field"),o()(),n(19,"mat-card-actions",7)(20,"button",8),a(21),r(22,"translate"),o(),n(23,"button",9),a(24),r(25,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.prematureCloseAccountForm),i(5),m(c(8,16,"labels.inputs.Premature Close Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.prematureCloseAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(),v(p.prematureCloseAccountForm.controls.maturityAmount?14:-1),i(),v(p.prematureCloseAccountForm.contains("onAccountClosureId")?15:-1),i(),v(p.prematureCloseAccountForm.contains("toSavingsAccountId")?16:-1),i(),v(p.prematureCloseAccountForm.contains("transferDescription")?17:-1),i(),v(p.prematureCloseAccountForm.contains("note")?18:-1),i(2),d("routerLink",R(22,tr)),i(),u(" ",c(22,18,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.prematureCloseAccountForm.valid),i(),u(" ",c(25,20,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var mr=()=>["../../"];function dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Closed On Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function ur(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.value," ")}}function fr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Account action")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function gr(t,s){if(t&1&&(n(0,"mat-option",9),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.accountNo," ")}}function xr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transfer to savings account")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function Cr(t,s){if(t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,gr,2,2,"mat-option",9,$),o(),h(7,xr,7,9,"mat-error"),o()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Transfer to Savings")),i(3),G(e.savingsAccountsData),i(2),v(e.closeOnMaturityAccountForm.controls.toSavingsAccountId.hasError("required")?7:-1)}}function _r(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Transfer Description")))}var vi=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.dateUtils=x(et),this.route=x(N),this.router=x(W),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.savingsAccountsData=e.fixedDepositsAccountActionData.savingsAccounts,this.onAccountClosureOptions=e.fixedDepositsAccountActionData.onAccountClosureOptions,this.maturityAmount=e.fixedDepositsAccountActionData.maturityAmount}),this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseOnMaturityAccountForm(),this.addTransferDetails()}createCloseOnMaturityAccountForm(){this.closeOnMaturityAccountForm=this.formBuilder.group({closedOnDate:["",V.required],maturityAmount:[{value:this.maturityAmount,disabled:!0}],onAccountClosureId:["",V.required],note:[""]})}addTransferDetails(){this.closeOnMaturityAccountForm.get("onAccountClosureId").valueChanges.subscribe(e=>{e===200?(this.closeOnMaturityAccountForm.addControl("toSavingsAccountId",new Z("",V.required)),this.closeOnMaturityAccountForm.addControl("transferDescription",new Z(""))):(this.closeOnMaturityAccountForm.removeControl("toSavingsAccountId"),this.closeOnMaturityAccountForm.removeControl("transferDescription"))})}submit(){let e=this.closeOnMaturityAccountForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.closeOnMaturityAccountForm.value.closedOnDate;e.closedOnDate instanceof Date&&(e.closedOnDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});this.fixedDepositsService.executeFixedDepositsAccountCommand(this.accountId,"close",D).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-close-fixed-deposits-account"]],decls:41,vars:30,consts:[["closedOnDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","closedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["type","number","matInput","","formControlName","maturityAmount"],["required","","formControlName","onAccountClosureId"],[3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","warn",3,"disabled"],["required","","formControlName","toSavingsAccountId"],["matInput","","formControlName","transferDescription"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card")(2,"form",2),M("ngSubmit",function(){return S(f),A(p.submit())}),n(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),h(13,dr,7,9,"mat-error"),o(),n(14,"mat-form-field")(15,"mat-label"),a(16),r(17,"translate"),o(),g(18,"input",7),o(),n(19,"mat-form-field")(20,"mat-label"),a(21),r(22,"translate"),o(),n(23,"mat-select",8),L(24,ur,2,2,"mat-option",9,$),o(),h(26,fr,7,9,"mat-error"),o(),h(27,Cr,8,4,"mat-form-field"),h(28,_r,5,3,"mat-form-field"),n(29,"mat-form-field")(30,"mat-label"),a(31),r(32,"translate"),o(),g(33,"textarea",10),o()()(),n(34,"mat-card-actions",11)(35,"button",12),a(36),r(37,"translate"),o(),n(38,"button",13),a(39),r(40,"translate"),o()()()()()}if(l&2){let f=k(12);i(2),d("formGroup",p.closeOnMaturityAccountForm),i(5),m(c(8,17,"labels.inputs.Closed On Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.closeOnMaturityAccountForm.controls.closedOnDate.hasError("required")?13:-1),i(3),m(c(17,19,"labels.inputs.Maturity Amount")),i(5),m(c(22,21,"labels.inputs.Action")),i(3),G(p.onAccountClosureOptions),i(2),v(p.closeOnMaturityAccountForm.controls.onAccountClosureId.hasError("required")?26:-1),i(),v(p.closeOnMaturityAccountForm.contains("toSavingsAccountId")?27:-1),i(),v(p.closeOnMaturityAccountForm.contains("transferDescription")?28:-1),i(3),m(c(32,23,"labels.inputs.Note")),i(4),d("routerLink",R(29,mr)),i(),u(" ",c(37,25,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.closeOnMaturityAccountForm.valid),i(),u(" ",c(40,27,"labels.buttons.Confirm")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,Ft,w],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hr=()=>["../../transactions"];function vr(t,s){if(t&1&&(n(0,"h2",2),a(1),r(2,"translate"),r(3,"translate"),o()),t&2){let e=_();i(),T(" ",c(2,2,"labels.menus."+e.actionName)," ",c(3,4,"labels.heading.Fixed Deposit Transactions")," ")}}function Dr(t,s){t&1&&(n(0,"mat-error"),a(1),r(2,"translate"),r(3,"translate"),n(4,"strong"),a(5),r(6,"translate"),o()()),t&2&&(i(),T(" ",c(2,3,"labels.inputs.Transaction Date")," ",c(3,5,"labels.commons.is")," "),i(4),m(c(6,7,"labels.commons.required")))}function br(t,s){if(t&1&&(n(0,"mat-option",10),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Pr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",19),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Account Number")))}function Mr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",20),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Cheque")))}function Tr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",21),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Routing Code")))}function Sr(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",22),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Receipt Number")))}function Ar(t,s){t&1&&(n(0,"mat-form-field")(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",23),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Bank")))}var Di=(()=>{class t{constructor(){this.formBuilder=x(mt),this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.paymentTypeOptions=[],this.addPaymentDetailsFlag=!1,this.transactionType={deposit:!1,withdrawal:!1},this.route.data.subscribe(l=>{this.currency=l.fixedDepositsAccountActionData.currency,this.paymentTypeOptions=l.fixedDepositsAccountActionData.paymentTypeOptions}),this.actionName=this.route.snapshot.params.name;let e=this.actionName.toLowerCase();if(e==="deposit"||e==="withdrawal")this.transactionCommand=e,this.transactionType[this.transactionCommand]=!0;else throw new Error(`Invalid transaction action: ${this.actionName}`);this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createSavingAccountTransactionForm()}createSavingAccountTransactionForm(){this.accountTransactionForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,V.required],transactionAmount:[0,V.required],paymentTypeId:[""],note:[""]})}addPaymentDetails(){this.addPaymentDetailsFlag=!this.addPaymentDetailsFlag,this.addPaymentDetailsFlag?(this.accountTransactionForm.addControl("accountNumber",new Z("")),this.accountTransactionForm.addControl("checkNumber",new Z("")),this.accountTransactionForm.addControl("routingCode",new Z("")),this.accountTransactionForm.addControl("receiptNumber",new Z("")),this.accountTransactionForm.addControl("bankNumber",new Z(""))):(this.accountTransactionForm.removeControl("accountNumber"),this.accountTransactionForm.removeControl("checkNumber"),this.accountTransactionForm.removeControl("routingCode"),this.accountTransactionForm.removeControl("receiptNumber"),this.accountTransactionForm.removeControl("bankNumber"))}submit(){let e=this.accountTransactionForm.value,l=this.settingsService.language.code,p=this.settingsService.dateFormat,f=this.accountTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(f,p));let D=X(H({},e),{dateFormat:p,locale:l});delete D.note,D.transactionAmount=D.transactionAmount*1,this.fixedDepositsService.executeFixedDepositsAccountTransactionsCommand(this.accountId,this.transactionCommand,D).subscribe(q=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-cash-transaction"]],decls:46,vars:38,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],["mat-title",""],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["required","","formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["formControlName","note","matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-card"),h(2,vr,4,6,"h2",2),n(3,"form",3),M("ngSubmit",function(){return S(f),A(p.submit())}),n(4,"mat-card-content",4)(5,"mat-form-field",5),M("click",function(){S(f);let q=k(12);return A(q.open())}),n(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),h(13,Dr,7,9,"mat-error"),o(),g(14,"mifosx-input-amount",8),n(15,"mat-form-field")(16,"mat-label"),a(17),r(18,"translate"),o(),n(19,"mat-select",9),L(20,br,2,2,"mat-option",10,$),o()(),n(22,"div",11)(23,"span",12),M("click",function(){return S(f),A(p.addPaymentDetails())}),n(24,"mat-slide-toggle")(25,"div",13)(26,"span",14),a(27),r(28,"translate"),o()()()()(),h(29,Pr,5,3,"mat-form-field"),h(30,Mr,5,3,"mat-form-field"),h(31,Tr,5,3,"mat-form-field"),h(32,Sr,5,3,"mat-form-field"),h(33,Ar,5,3,"mat-form-field"),n(34,"mat-form-field")(35,"mat-label"),a(36),r(37,"translate"),o(),g(38,"textarea",15),o(),n(39,"mat-card-actions",16)(40,"button",17),a(41),r(42,"translate"),o(),n(43,"button",18),a(44),r(45,"translate"),o()()()()()()}if(l&2){let f=k(12);i(2),v(p.transactionType.withdrawal?2:-1),i(),d("formGroup",p.accountTransactionForm),i(4),m(c(8,25,"labels.inputs.Transaction Date")),i(2),d("min",p.minDate)("max",p.maxDate)("matDatepicker",f),i(),d("for",f),i(3),v(p.accountTransactionForm.controls.transactionDate.hasError("required")?13:-1),i(),d("currency",p.currency)("isRequired",!0)("inputFormControl",p.accountTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),i(3),m(c(18,27,"labels.inputs.Payment Type")),i(3),G(p.paymentTypeOptions),i(5),d("className",p.addPaymentDetailsFlag?"enabled":"disabled"),i(2),m(c(28,29,"labels.inputs.Show Payment Details")),i(2),v(p.addPaymentDetailsFlag?29:-1),i(),v(p.addPaymentDetailsFlag?30:-1),i(),v(p.addPaymentDetailsFlag?31:-1),i(),v(p.addPaymentDetailsFlag?32:-1),i(),v(p.addPaymentDetailsFlag?33:-1),i(3),m(c(37,31,"labels.inputs.Notes")),i(4),d("routerLink",R(37,hr)),i(),u(" ",c(42,33,"labels.buttons.Cancel")," "),i(2),d("disabled",!p.accountTransactionForm.valid),i(),u(" ",c(45,35,"labels.buttons.Submit")," ")}},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,tt,Y,xt,bt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,ei,ji,Ft,w],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();function Or(t,s){t&1&&g(0,"mifosx-approve-fixed-deposits-account")}function yr(t,s){t&1&&g(0,"mifosx-reject-fixed-deposits-account")}function Ir(t,s){t&1&&g(0,"mifosx-activate-fixed-deposits-account")}function Fr(t,s){t&1&&g(0,"mifosx-undo-approval-fixed-deposits-account")}function wr(t,s){t&1&&g(0,"mifosx-withdraw-by-client-fixed-deposits-account")}function Er(t,s){t&1&&g(0,"mifosx-add-charge-fixed-deposits-account")}function Br(t,s){t&1&&g(0,"mifosx-premature-close-fixed-deposits-account")}function kr(t,s){t&1&&g(0,"mifosx-close-fixed-deposits-account")}function Rr(t,s){t&1&&g(0,"mifosx-fixed-deposits-cash-transaction")}var bi=(()=>{class t{constructor(){this.route=x(N),this.actions={Approve:!1,Reject:!1,Activate:!1,Close:!1,"Undo Approval":!1,"Undo Activation":!1,"Add Charge":!1,"Premature Close":!1,"Withdrawn by Client":!1,Withdrawal:!1};let e=this.route.snapshot.params.name;e&&e in this.actions&&(this.actions[e]=!0)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposits-account-actions"]],decls:9,vars:9,template:function(l,p){l&1&&(h(0,Or,1,0,"mifosx-approve-fixed-deposits-account"),h(1,yr,1,0,"mifosx-reject-fixed-deposits-account"),h(2,Ir,1,0,"mifosx-activate-fixed-deposits-account"),h(3,Fr,1,0,"mifosx-undo-approval-fixed-deposits-account"),h(4,wr,1,0,"mifosx-withdraw-by-client-fixed-deposits-account"),h(5,Er,1,0,"mifosx-add-charge-fixed-deposits-account"),h(6,Br,1,0,"mifosx-premature-close-fixed-deposits-account"),h(7,kr,1,0,"mifosx-close-fixed-deposits-account"),h(8,Rr,1,0,"mifosx-fixed-deposits-cash-transaction")),l&2&&(v(p.actions.Approve?0:-1),i(),v(p.actions.Reject?1:-1),i(),v(p.actions.Activate?2:-1),i(),v(p.actions["Undo Approval"]||p.actions["Undo Activation"]?3:-1),i(),v(p.actions["Withdrawn by Client"]?4:-1),i(),v(p.actions["Add Charge"]?5:-1),i(),v(p.actions["Premature Close"]?6:-1),i(),v(p.actions.Close?7:-1),i(),v(p.actions.Withdrawal?8:-1))},dependencies:[y,I,ui,fi,gi,xi,Ci,_i,hi,vi,Di],encapsulation:2})}}return t})();var Nr=()=>["../"];function Vr(t,s){if(t&1){let e=F();n(0,"button",10),M("click",function(){S(e);let p=_(2);return A(p.undoTransaction())}),g(1,"fa-icon",11),a(2,"Undo "),o()}}function qr(t,s){t&1&&(n(0,"span"),C(1,Vr,3,0,"button",9),o()),t&2&&(i(),d("mifosxHasPermission","UNDOTRANSACTION_SAVINGSACCOUNT"))}function zr(t,s){t&1&&(n(0,"div",4),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Note")," "))}function Hr(t,s){if(t&1&&(n(0,"div",5),a(1),o()),t&2){let e=_();i(),u(" ",e.transactionData.note," ")}}function $r(t,s){if(t&1&&g(0,"mifosx-transaction-payment-detail",6),t&2){let e=_();d("paymentDetailData",e.transactionData.paymentDetailData)}}var Pi=(()=>{class t{constructor(){this.savingsService=x($t),this.route=x(N),this.dateUtils=x(et),this.router=x(W),this.dialog=x(Ut),this.settingsService=x(U),this.route.data.subscribe(e=>{this.accountId=this.route.parent.snapshot.params.fixedDepositAccountId,this.transactionData=e.fixedDepositsAccountTransaction})}transactionColor(){return this.transactionData.manuallyReversed?"undo":"active"}allowUndo(){return!1}undoTransaction(){this.dialog.open(sn).afterClosed().subscribe(l=>{if(l.confirm){let p=this.settingsService.language.code,f=this.settingsService.dateFormat,D={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),f),transactionAmount:0,dateFormat:f,locale:p};this.savingsService.executeSavingsAccountTransactionsCommand(this.accountId,"undo",D,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-view-transaction"]],decls:41,vars:37,consts:[[1,"container","m-b-20","align-end-center","gap-2percent"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",3,"click"],["icon","undo",1,"m-r-10"]],template:function(l,p){l&1&&(n(0,"div",0),h(1,qr,2,1,"span"),o(),n(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),g(6,"div",3),n(7,"div",4),a(8),r(9,"translate"),o(),n(10,"div",5),a(11),o(),n(12,"div",4),a(13),r(14,"translate"),o(),n(15,"div",5),a(16),o(),n(17,"div",4),a(18),r(19,"translate"),o(),n(20,"div",5),a(21),r(22,"dateFormat"),o(),n(23,"div",4),a(24),r(25,"translate"),o(),n(26,"div",5),a(27),o(),n(28,"div",4),a(29),r(30,"translate"),o(),n(31,"div",5),a(32),r(33,"currency"),o(),h(34,zr,3,3,"div",4),h(35,Hr,2,1,"div",5),h(36,$r,1,1,"mifosx-transaction-payment-detail",6),o(),n(37,"div",7)(38,"button",8),a(39),r(40,"translate"),o()()()()()),l&2&&(i(),v(p.allowUndo()?1:-1),i(5),d("ngClass",p.transactionColor()),i(2),u(" ",c(9,17,"labels.inputs.Transaction Id")," "),i(3),u(" ",p.transactionData.id," "),i(2),u(" ",c(14,19,"labels.inputs.Type")," "),i(3),u(" ",p.transactionData.transactionType.value," "),i(2),u(" ",c(19,21,"labels.inputs.Transaction Date")," "),i(3),u(" ",c(22,23,p.transactionData.date)," "),i(3),u(" ",c(25,25,"labels.inputs.Currency")," "),i(3),u(" ",p.transactionData.currency.displayLabel," "),i(2),u(" ",c(30,27,"labels.inputs.Amount")," "),i(3),u(" ",at(33,29,p.transactionData.amount,p.transactionData.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(p.transactionData.note?34:-1),i(),v(p.transactionData.note?35:-1),i(),v(p.transactionData.paymentDetailData?36:-1),i(2),d("routerLink",R(36,Nr)),i(),u(" ",c(40,34,"labels.buttons.Back")," "))},dependencies:[y,Se,I,tt,Y,xt,B,de,ut,rn,se,yt,w],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.transaction-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();function Lr(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.name," ")}}function Gr(t,s){if(t&1){let e=F();n(0,"mat-form-field",11),M("click",function(){S(e);let p=k(7);return A(p.open())}),n(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",12)(5,"mat-datepicker-toggle",13)(6,"mat-datepicker",null,0),n(8,"mat-error"),a(9),r(10,"translate"),r(11,"translate"),n(12,"strong"),a(13),r(14,"translate"),o()()()}if(t&2){let e=k(7),l=_();i(2),m(c(3,8,"labels.inputs.Submitted On")),i(2),d("min",l.minDate)("max",l.maxDate)("matDatepicker",e),i(),d("for",e),i(4),T(" ",c(10,10,"labels.inputs.Submission Date")," ",c(11,12,"labels.commons.is")," "),i(4),m(c(14,14,"labels.commons.required"))}}function Ur(t,s){if(t&1&&(n(0,"mat-option",5),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",e.displayName," ")}}function jr(t,s){if(t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",14),L(5,Ur,2,2,"mat-option",5,$),o()()),t&2){let e=_();i(2),m(c(3,1,"labels.inputs.Field Officer")),i(3),G(e.fieldOfficerData)}}function Wr(t,s){t&1&&(n(0,"mat-form-field",3)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",15),r(5,"translate"),o()),t&2&&(i(2),m(c(3,3,"labels.inputs.External id")),i(2),d("matTooltip",_t(c(5,5,"tooltips.Provides an external id"))))}var ge=(()=>{class t{constructor(){this.formBuilder=x(mt),this.fixedDepositsService=x(j),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.isFieldOfficerPatched=!1,this.isProductSelected=!1,this.fixedDepositsAccountProductTemplate=new $e,this.createFixedDepositsAccountDetailsForm()}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.buildDependencies(),this.fixedDepositsAccountTemplate&&(this.productData=this.fixedDepositsAccountTemplate.productOptions,this.fixedDepositsAccountTemplate.depositProductId&&this.fixedDepositAccountDetailsForm.patchValue({productId:this.fixedDepositsAccountTemplate.depositProductId,submittedOnDate:this.fixedDepositsAccountTemplate.timeline.submittedOnDate&&new Date(this.fixedDepositsAccountTemplate.timeline.submittedOnDate),externalId:this.fixedDepositsAccountTemplate.externalId||""}))}createFixedDepositsAccountDetailsForm(){this.fixedDepositAccountDetailsForm=this.formBuilder.group({productId:["",V.required],submittedOnDate:["",V.required],fieldOfficerId:[""],externalId:[""]})}buildDependencies(){let e=this.fixedDepositsAccountTemplate.clientId;this.fixedDepositAccountDetailsForm.get("productId").valueChanges.subscribe(l=>{this.fixedDepositsService.getFixedDepositsAccountTemplate(e,l).subscribe(p=>{this.fixedDepositsAccountProductTemplate.emit(p),this.isProductSelected=!0,this.fieldOfficerData=p.fieldOfficerOptions,!this.isFieldOfficerPatched&&this.fixedDepositsAccountTemplate.fieldOfficerId?(this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue(this.fixedDepositsAccountTemplate.fieldOfficerId),this.isFieldOfficerPatched=!0):this.fixedDepositAccountDetailsForm.get("fieldOfficerId").patchValue("")})})}get fixedDepositAccountDetails(){let e=this.fixedDepositAccountDetailsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-details-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate"},outputs:{fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},decls:28,vars:23,consts:[["submittedOnDatePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],["formControlName","productId","required",""],[3,"value"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],[1,"flex-48",3,"click"],["matInput","","formControlName","submittedOnDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","fieldOfficerId"],["matInput","","formControlName","externalId",3,"matTooltip"]],template:function(l,p){if(l&1&&(n(0,"form",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),a(4),r(5,"translate"),o(),n(6,"mat-select",4),L(7,Lr,2,2,"mat-option",5,$),o(),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),h(16,Gr,15,16,"mat-form-field",3),h(17,jr,7,3,"mat-form-field",3),h(18,Wr,6,7,"mat-form-field",3),o(),n(19,"div",6)(20,"button",7),g(21,"fa-icon",8),a(22),r(23,"translate"),o(),n(24,"button",9),a(25),r(26,"translate"),g(27,"fa-icon",10),o()()()),l&2){let f;d("formGroup",p.fixedDepositAccountDetailsForm),i(4),m(c(5,11,"labels.inputs.Product Name")),i(3),G(p.productData),i(3),T(" ",c(11,13,"labels.inputs.Product Name")," ",c(12,15,"labels.commons.is")," "),i(4),m(c(15,17,"labels.commons.required")),i(2),v(p.isProductSelected?16:-1),i(),v(p.isProductSelected?17:-1),i(),v(p.isProductSelected?18:-1),i(4),u(" ",c(23,19,"labels.buttons.Previous")," "),i(2),d("disabled",!((f=p.fixedDepositAccountDetailsForm.get("productId"))!=null&&f.value)||!((f=p.fixedDepositAccountDetailsForm.get("submittedOnDate"))!=null&&f.value)),i(),u(" ",c(26,21,"labels.buttons.Next")," ")}},dependencies:[y,I,ct,rt,it,pt,gt,st,lt,ot,nt,Ct,Pt,dt,Ot,At,Tt,St,Mt,B,me,Wt,ut,ne,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function Kr(t,s){if(t&1&&g(0,"mifosx-input-amount",2),t&2){let e=_();d("currency",e.currency)("isRequired",!0)("inputFormControl",e.fixedDepositAccountTermsForm.controls.depositAmount)("inputLabel","Deposit Amount")}}function Qr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Yr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Jr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Xr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function Zr(t,s){if(t&1&&(n(0,"mat-option",7),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}var xe=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.createFixedDepositsAccountTermsForm()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.currency=this.fixedDepositsAccountProductTemplate.currency,this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate.id&&this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountTemplate.depositAmount?this.fixedDepositsAccountTemplate.depositAmount:0,depositPeriod:this.fixedDepositsAccountTemplate.depositPeriod,depositPeriodFrequencyId:this.fixedDepositsAccountTemplate.depositPeriodFrequency.id})}createFixedDepositsAccountTermsForm(){this.fixedDepositAccountTermsForm=this.formBuilder.group({interestCompoundingPeriodType:["",V.required],interestPostingPeriodType:["",V.required],interestCalculationType:["",V.required],interestCalculationDaysInYearType:["",V.required],depositAmount:[0,V.required],depositPeriod:["",V.required],depositPeriodFrequencyId:["",V.required]})}setOptions(){this.interestCompoundingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,this.interestPostingPeriodTypeData=this.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,this.interestCalculationTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,this.interestCalculationDaysInYearTypeData=this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.fixedDepositsAccountTemplate.id||this.fixedDepositAccountTermsForm.patchValue({interestCompoundingPeriodType:this.fixedDepositsAccountProductTemplate.interestCompoundingPeriodType.id,interestPostingPeriodType:this.fixedDepositsAccountProductTemplate.interestPostingPeriodType.id,interestCalculationType:this.fixedDepositsAccountProductTemplate.interestCalculationType.id,interestCalculationDaysInYearType:this.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearType.id,depositAmount:this.fixedDepositsAccountProductTemplate.depositAmount,depositPeriod:this.fixedDepositsAccountProductTemplate.minDepositTerm,depositPeriodFrequencyId:this.fixedDepositsAccountProductTemplate.minDepositTermType.id})}get fixedDepositAccountTerms(){let e=this.fixedDepositAccountTermsForm.value;for(let l in e)e[l]===""&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-terms-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:96,vars:80,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"flex-48","hide-lt-md"],[1,"flex-48"],["type","number","matInput","","formControlName","depositPeriod","required",""],["formControlName","depositPeriodFrequencyId","required",""],[3,"value"],[1,"flex-98"],["formControlName","interestCompoundingPeriodType","required",""],["formControlName","interestPostingPeriodType","required",""],["formControlName","interestCalculationType","required",""],["formControlName","interestCalculationDaysInYearType","required",""],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1),h(2,Kr,1,4,"mifosx-input-amount",2),g(3,"span",3),n(4,"mat-form-field",4)(5,"mat-label"),a(6),r(7,"translate"),o(),g(8,"input",5),n(9,"mat-error"),a(10),r(11,"translate"),r(12,"translate"),n(13,"strong"),a(14),r(15,"translate"),o()()(),n(16,"mat-form-field",4)(17,"mat-label"),a(18),r(19,"translate"),o(),n(20,"mat-select",6),L(21,Qr,3,5,"mat-option",7,$),o(),n(23,"mat-error"),a(24),r(25,"translate"),r(26,"translate"),n(27,"strong"),a(28),r(29,"translate"),o()()(),g(30,"mat-divider",8),n(31,"mat-form-field",4)(32,"mat-label"),a(33),r(34,"translate"),o(),n(35,"mat-select",9),L(36,Yr,3,5,"mat-option",7,$),o(),n(38,"mat-error"),a(39),r(40,"translate"),r(41,"translate"),n(42,"strong"),a(43),r(44,"translate"),o()()(),n(45,"mat-form-field",4)(46,"mat-label"),a(47),r(48,"translate"),o(),n(49,"mat-select",10),L(50,Jr,3,5,"mat-option",7,$),o(),n(52,"mat-error"),a(53),r(54,"translate"),r(55,"translate"),n(56,"strong"),a(57),r(58,"translate"),o()()(),n(59,"mat-form-field",4)(60,"mat-label"),a(61),r(62,"translate"),o(),n(63,"mat-select",11),L(64,Xr,3,5,"mat-option",7,$),o(),n(66,"mat-error"),a(67),r(68,"translate"),r(69,"translate"),n(70,"strong"),a(71),r(72,"translate"),o()()(),n(73,"mat-form-field",4)(74,"mat-label"),a(75),r(76,"translate"),o(),n(77,"mat-select",12),L(78,Zr,3,5,"mat-option",7,$),o(),n(80,"mat-error"),a(81),r(82,"translate"),r(83,"translate"),n(84,"strong"),a(85),r(86,"translate"),o()()()(),n(87,"div",13)(88,"button",14),g(89,"fa-icon",15),a(90),r(91,"translate"),o(),n(92,"button",16),a(93),r(94,"translate"),g(95,"fa-icon",17),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountTermsForm),i(2),v(p.currency?2:-1),i(4),m(c(7,28,"labels.inputs.Deposit Period")),i(4),T(" ",c(11,30,"labels.inputs.Deposit Period")," ",c(12,32,"labels.commons.is")," "),i(4),m(c(15,34,"labels.commons.required")),i(4),m(c(19,36,"labels.inputs.Deposit Period Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(25,38,"labels.inputs.Deposit Period Type")," ",c(26,40,"labels.commons.is")," "),i(4),m(c(29,42,"labels.commons.required")),i(5),m(c(34,44,"labels.inputs.Interest Compounding Period")),i(3),G(p.interestCompoundingPeriodTypeData),i(3),T(" ",c(40,46,"labels.inputs.Interest Compounding Period")," ",c(41,48,"labels.commons.is")," "),i(4),m(c(44,50,"labels.commons.required")),i(4),m(c(48,52,"labels.inputs.Interest Posting Period")),i(3),G(p.interestPostingPeriodTypeData),i(3),T(" ",c(54,54,"labels.inputs.Interest Posting Period")," ",c(55,56,"labels.commons.is")," "),i(4),m(c(58,58,"labels.commons.required")),i(4),m(c(62,60,"labels.inputs.Interest Calculated using")),i(3),G(p.interestCalculationTypeData),i(3),T(" ",c(68,62,"labels.inputs.Interest Calculated using")," ",c(69,64,"labels.commons.is")," "),i(4),m(c(72,66,"labels.commons.required")),i(4),m(c(76,68,"labels.inputs.Days in Year")),i(3),G(p.interestCalculationDaysInYearTypeData),i(3),T(" ",c(82,70,"labels.inputs.Days in Year")," ",c(83,72,"labels.commons.is")," "),i(4),m(c(86,74,"labels.commons.required")),i(5),u(" ",c(91,76,"labels.buttons.Previous")," "),i(3),u(" ",c(94,78,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,ei,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();function tp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ep(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function ip(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function np(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function op(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function ap(t,s){if(t&1&&(n(0,"mat-form-field",16)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",28),L(5,op,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Linked Savings Account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Linked Savings Account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function rp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function pp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),o()),t&2){let e=s.$implicit;d("value",e.id),i(),T(" (",e.accountNo,") ",e.savingsProductName," ")}}function cp(t,s){if(t&1&&(n(0,"mat-form-field",18)(1,"mat-label"),a(2),r(3,"translate"),o(),n(4,"mat-select",29),L(5,pp,2,3,"mat-option",6,$),o(),n(7,"mat-error"),a(8),r(9,"translate"),r(10,"translate"),n(11,"strong"),a(12),r(13,"translate"),o()()()),t&2){let e=_();i(2),m(c(3,4,"labels.inputs.Transfer to savings account")),i(3),G(e.savingsAccountsData),i(3),T(" ",c(9,6,"labels.inputs.Transfer to savings account")," ",c(10,8,"labels.commons.is")," "),i(4),m(c(13,10,"labels.commons.required"))}}function sp(t,s){if(t&1&&(n(0,"mat-option",6),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;d("value",e.id),i(),u(" ",E(2,2,e.value,"catalogs")," ")}}function lp(t,s){t&1&&(n(0,"mat-form-field",31)(1,"mat-label"),a(2),r(3,"translate"),o(),g(4,"input",32),o()),t&2&&(i(2),m(c(3,1,"labels.inputs.Tax Group")))}function mp(t,s){if(t&1&&(g(0,"mat-divider",13),n(1,"mat-checkbox",30),a(2),r(3,"translate"),o(),h(4,lp,5,3,"mat-form-field",31)),t&2){let e=_();i(2),u(" ",c(3,2,"labels.inputs.Is Withhold Tax Applicable"),"? "),i(2),v(e.fixedDepositAccountSettingsForm.controls.taxGroupId?4:-1)}}var Ce=(()=>{class t{constructor(){this.formBuilder=x(mt),this.settingsService=x(U),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.createFixedDepositAccountSettingsForm(),this.buildDependencies()}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.fixedDepositAccountSettingsForm.patchValue({minDepositTerm:this.fixedDepositsAccountProductTemplate.minDepositTerm,minDepositTermTypeId:this.fixedDepositsAccountProductTemplate.minDepositTermType?this.fixedDepositsAccountProductTemplate.minDepositTermType.id:"",inMultiplesOfDepositTerm:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm,inMultiplesOfDepositTermTypeId:this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType?this.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.id:"",maxDepositTerm:this.fixedDepositsAccountProductTemplate.maxDepositTerm,maxDepositTermTypeId:this.fixedDepositsAccountProductTemplate.maxDepositTermType?this.fixedDepositsAccountProductTemplate.maxDepositTermType.id:"",preClosurePenalApplicable:this.fixedDepositsAccountProductTemplate.preClosurePenalApplicable,preClosurePenalInterest:this.fixedDepositsAccountProductTemplate.preClosurePenalInterest,preClosurePenalInterestOnTypeId:this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType?this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id:"",maturityInstructionId:this.fixedDepositsAccountProductTemplate.maturityInstructionId}),this.fixedDepositsAccountProductTemplate.withHoldTax?(this.fixedDepositAccountSettingsForm.addControl("withHoldTax",new Z(!1)),this.fixedDepositAccountSettingsForm.get("withHoldTax").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("taxGroupId",new Z({value:"",disabled:!0})),this.fixedDepositAccountSettingsForm.get("taxGroupId").patchValue(this.fixedDepositsAccountProductTemplate.taxGroup&&this.fixedDepositsAccountProductTemplate.taxGroup.name)):this.fixedDepositAccountSettingsForm.removeControl("taxGroupId")}),this.fixedDepositAccountSettingsForm.get("withHoldTax").patchValue(this.fixedDepositsAccountTemplate.withHoldTax)):this.fixedDepositAccountSettingsForm.removeControl("withHoldTax"),this.setOptions())}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.fixedDepositsAccountTemplate&&this.fixedDepositAccountSettingsForm.patchValue({lockinPeriodFrequency:this.fixedDepositsAccountTemplate.lockinPeriodFrequency,lockinPeriodFrequencyType:this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType&&this.fixedDepositsAccountTemplate.lockinPeriodFrequencyType.id,transferInterestToSavings:this.fixedDepositsAccountTemplate.transferInterestToSavings})}createFixedDepositAccountSettingsForm(){this.fixedDepositAccountSettingsForm=this.formBuilder.group({lockinPeriodFrequency:[""],lockinPeriodFrequencyType:[""],minDepositTerm:[{value:"",disabled:!0}],minDepositTermTypeId:[{value:"",disabled:!0}],inMultiplesOfDepositTerm:[{value:"",disabled:!0}],inMultiplesOfDepositTermTypeId:[{value:"",disabled:!0}],maxDepositTerm:[{value:"",disabled:!0}],maxDepositTermTypeId:[{value:"",disabled:!0}],transferInterestToSavings:[!1],preClosurePenalApplicable:[{value:"",disabled:!0}],preClosurePenalInterest:[{value:"",disabled:!0}],preClosurePenalInterestOnTypeId:[{value:"",disabled:!0}],maturityInstructionId:[""]})}buildDependencies(){this.fixedDepositAccountSettingsForm.get("transferInterestToSavings").valueChanges.subscribe(e=>{e?(this.fixedDepositAccountSettingsForm.addControl("linkAccountId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("linkAccountId").patchValue(this.fixedDepositsAccountTemplate.linkedAccount&&this.fixedDepositsAccountTemplate.linkedAccount.id)):this.fixedDepositAccountSettingsForm.removeControl("linkAccountId")}),this.fixedDepositAccountSettingsForm.get("maturityInstructionId").valueChanges.subscribe(e=>{e>100?(this.fixedDepositAccountSettingsForm.addControl("transferToSavingsId",new Z("",V.required)),this.fixedDepositAccountSettingsForm.get("transferToSavingsId").patchValue(this.fixedDepositsAccountTemplate.transferToSavingsId&&this.fixedDepositsAccountTemplate.transferToSavingsId.id)):this.fixedDepositAccountSettingsForm.removeControl("transferToSavingsId")})}setOptions(){this.lockinPeriodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,this.periodFrequencyTypeData=this.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,this.savingsAccountsData=this.fixedDepositsAccountProductTemplate.savingsAccounts,this.preClosurePenalInterestOnTypeData=this.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnTypeOptions,this.maturityInstructionOptions=this.fixedDepositsAccountProductTemplate.maturityInstructionOptions}get fixedDepositAccountSettings(){let e=this.fixedDepositAccountSettingsForm.getRawValue();for(let l in e)(e[l]===""||l==="taxGroupId")&&delete e[l];return e}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-settings-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:122,vars:85,consts:[[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"mat-h4","flex-98"],[1,"flex-48"],["type","number","matInput","","formControlName","lockinPeriodFrequency"],["formControlName","lockinPeriodFrequencyType"],[3,"value"],["type","number","matInput","","formControlName","minDepositTerm","required",""],["formControlName","minDepositTermTypeId","required",""],["type","number","matInput","","formControlName","inMultiplesOfDepositTerm"],["formControlName","inMultiplesOfDepositTermTypeId"],["type","number","matInput","","formControlName","maxDepositTerm"],["formControlName","maxDepositTermTypeId"],[1,"flex-98"],[1,"mat-h3","flex-23"],["labelPosition","before","formControlName","transferInterestToSavings",1,"flex-32","margin-b"],[1,"margin-b","flex-48"],["formControlName","maturityInstructionId"],[1,"flex-48","margin-b"],[1,"mat-h4","flex-23"],["labelPosition","before","formControlName","preClosurePenalApplicable",1,"flex-73","margin-v"],["type","number","matInput","","formControlName","preClosurePenalInterest"],["formControlName","preClosurePenalInterestOnTypeId"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["formControlName","linkAccountId","required",""],["formControlName","transferToSavingsId","required",""],["labelPosition","before","formControlName","withHoldTax",1,"margin-p","flex-48"],[1,"p-b-25","flex-48"],["matInput","","formControlName","taxGroupId"]],template:function(l,p){l&1&&(n(0,"form",0)(1,"div",1)(2,"h4",2),a(3),r(4,"translate"),o(),n(5,"mat-form-field",3)(6,"mat-label"),a(7),r(8,"translate"),o(),g(9,"input",4),o(),n(10,"mat-form-field",3)(11,"mat-label"),a(12),r(13,"translate"),o(),n(14,"mat-select",5),L(15,tp,3,5,"mat-option",6,$),o()(),n(17,"h4",2),a(18),r(19,"translate"),o(),n(20,"mat-form-field",3)(21,"mat-label"),a(22),r(23,"translate"),o(),g(24,"input",7),n(25,"mat-error"),a(26),r(27,"translate"),r(28,"translate"),n(29,"strong"),a(30),r(31,"translate"),o()()(),n(32,"mat-form-field",3)(33,"mat-label"),a(34),r(35,"translate"),o(),n(36,"mat-select",8),L(37,ep,3,5,"mat-option",6,$),o(),n(39,"mat-error"),a(40),r(41,"translate"),r(42,"translate"),n(43,"strong"),a(44),r(45,"translate"),o()()(),n(46,"h4",2),a(47),r(48,"translate"),o(),n(49,"mat-form-field",3)(50,"mat-label"),a(51),r(52,"translate"),o(),g(53,"input",9),o(),n(54,"mat-form-field",3)(55,"mat-label"),a(56),r(57,"translate"),o(),n(58,"mat-select",10),L(59,ip,3,5,"mat-option",6,$),o()(),n(61,"h4",2),a(62),r(63,"translate"),o(),n(64,"mat-form-field",3)(65,"mat-label"),a(66),r(67,"translate"),o(),g(68,"input",11),o(),n(69,"mat-form-field",3)(70,"mat-label"),a(71),r(72,"translate"),o(),n(73,"mat-select",12),L(74,np,3,5,"mat-option",6,$),o()(),g(76,"mat-divider",13),n(77,"h3",14),a(78),r(79,"translate"),o(),n(80,"mat-checkbox",15),a(81),r(82,"translate"),o(),h(83,ap,14,12,"mat-form-field",16),g(84,"mat-divider",13),n(85,"mat-form-field",3)(86,"mat-label"),a(87),r(88,"translate"),o(),n(89,"mat-select",17),L(90,rp,3,5,"mat-option",6,$),o()(),h(92,cp,14,12,"mat-form-field",18),g(93,"mat-divider",13),n(94,"h4",19),a(95),r(96,"translate"),o(),n(97,"mat-checkbox",20),a(98),r(99,"translate"),o(),n(100,"mat-form-field",3)(101,"mat-label"),a(102),r(103,"translate"),o(),g(104,"input",21),o(),n(105,"mat-form-field",3)(106,"mat-label"),a(107),r(108,"translate"),o(),n(109,"mat-select",22),L(110,sp,3,5,"mat-option",6,$),o()(),h(112,mp,5,4),o(),n(113,"div",23)(114,"button",24),g(115,"fa-icon",25),a(116),r(117,"translate"),o(),n(118,"button",26),a(119),r(120,"translate"),g(121,"fa-icon",27),o()()()),l&2&&(d("formGroup",p.fixedDepositAccountSettingsForm),i(3),m(c(4,31,"labels.heading.Lock-in Period")),i(4),m(c(8,33,"labels.inputs.Frequency")),i(5),m(c(13,35,"labels.inputs.Type")),i(3),G(p.lockinPeriodFrequencyTypeData),i(3),m(c(19,37,"labels.heading.Minimum Deposit Term")),i(4),m(c(23,39,"labels.inputs.Frequency")),i(4),T(" ",c(27,41,"labels.inputs.Minimum Deposit Term Frequency")," ",c(28,43,"labels.commons.is")," "),i(4),m(c(31,45,"labels.commons.required")),i(4),m(c(35,47,"labels.inputs.Frequency Type")),i(3),G(p.periodFrequencyTypeData),i(3),T(" ",c(41,49,"labels.inputs.Minimum Deposit Term Frequency Type")," ",c(42,51,"labels.commons.is")," "),i(4),m(c(45,53,"labels.commons.required")),i(3),m(c(48,55,"labels.heading.And thereafter, in Multiples of")),i(4),m(c(52,57,"labels.inputs.Frequency")),i(5),m(c(57,59,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(3),m(c(63,61,"labels.heading.Maximum Deposit Term")),i(4),m(c(67,63,"labels.inputs.Frequency")),i(5),m(c(72,65,"labels.inputs.Type")),i(3),G(p.periodFrequencyTypeData),i(4),m(c(79,67,"labels.heading.Interest Transfer")),i(3),u(" ",c(82,69,"labels.inputs.Transfer Interest to Linked Savings Account"),"? "),i(2),v(p.fixedDepositAccountSettingsForm.contains("linkAccountId")?83:-1),i(4),m(c(88,71,"labels.inputs.Maturity Instructions")),i(3),G(p.maturityInstructionOptions),i(2),v(p.fixedDepositAccountSettingsForm.contains("transferToSavingsId")?92:-1),i(3),m(c(96,73,"labels.heading.For Pre-mature closure")),i(3),u(" ",c(99,75,"labels.inputs.Apply Penal Interest (less)")," "),i(4),u("",c(103,77,"labels.inputs.Penal Interest")," (%)"),i(5),m(c(108,79,"labels.inputs.Period")),i(3),G(p.preClosurePenalInterestOnTypeData),i(2),v(p.fixedDepositAccountSettingsForm.controls.withHoldTax?112:-1),i(4),u(" ",c(117,81,"labels.buttons.Previous")," "),i(3),u(" ",c(120,83,"labels.buttons.Next")," "))},dependencies:[y,I,ct,rt,jt,it,pt,gt,st,lt,ot,nt,Ct,dt,Ot,At,B,Ue,Re,Wt,ut,ne,w,It],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-p[_ngcontent-%COMP%]{margin-top:1.7em}"]})}}return t})();var dp=()=>[2e3];function up(t,s){if(t&1&&(n(0,"mat-option",3),a(1),o()),t&2){let e=s.$implicit;d("value",e),i(),u(" ",e.name," ")}}function fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function gp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function xp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function Cp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function _p(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function hp(t,s){if(t&1){let e=F();n(0,"td",25),a(1),n(2,"button",26),M("click",function(){let p=S(e).$implicit,f=_();return A(f.editChargeAmount(p))}),g(3,"fa-icon",27),o()()}if(t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function vp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Dp(t,s){if(t&1&&(n(0,"td",25),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function Pp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned*"," ")}}function Mp(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,dp).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function Tp(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Sp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeDate(p))}),g(1,"fa-icon",27),o()}}function Ap(t,s){if(t&1&&(n(0,"td",25),h(1,Pp,3,3,"span"),h(2,Mp,3,5,"span"),h(3,Tp,3,3,"span"),h(4,Sp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),v(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),i(),v(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function Op(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function yp(t,s){if(t&1){let e=F();n(0,"button",26),M("click",function(){S(e);let p=_().$implicit,f=_();return A(f.editChargeFeeInterval(p))}),g(1,"fa-icon",27),o()}}function Ip(t,s){if(t&1&&(n(0,"td",25),a(1),h(2,yp,2,0,"button",28),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," "),i(),v(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Monthly Fee"?2:-1)}}function Fp(t,s){t&1&&(n(0,"th",24),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function wp(t,s){if(t&1){let e=F();n(0,"td",25)(1,"button",29),M("click",function(){let p=S(e).$implicit,f=_();return A(f.deleteCharge(p))}),g(2,"fa-icon",30),o()()}}function Ep(t,s){t&1&&g(0,"tr",31)}function Bp(t,s){t&1&&g(0,"tr",32)}var _e=(()=>{class t{constructor(){this.dialog=x(Ut),this.dateUtils=x(et),this.settingsService=x(U),this.currency=null,this.chargesDataSource=[],this.displayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery","action"],this.isChargesPatched=!1,this.pristine=!0}ngOnInit(){this.chargesDataSource=[],this.fixedDepositsAccountTemplate.id&&this.fixedDepositsAccountTemplate.charges&&(this.chargesDataSource=this.fixedDepositsAccountTemplate.charges.map(e=>X(H({},e),{id:e.chargeId}))||[])}ngOnChanges(){this.currency==null&&(this.fixedDepositsAccountTemplate.currency?this.currency=this.fixedDepositsAccountTemplate.currency:this.fixedDepositsAccountProductTemplate&&this.fixedDepositsAccountProductTemplate.currency&&(this.currency=this.fixedDepositsAccountProductTemplate.currency)),this.fixedDepositsAccountProductTemplate&&(this.chargeData=this.fixedDepositsAccountProductTemplate.chargeOptions.filter(e=>e.currency.code===this.currency.code))}addCharge(e){this.chargesDataSource=this.chargesDataSource.concat([e.value]),e.value="",this.pristine=!1}editChargeAmount(e){let l=[new Ne({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],p={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{amount:D.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let l=[new ti({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],p={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q,re=this.settingsService.dateFormat,pe=this.dateUtils.formatDate(D.data.value.date,re);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":q=X(H({},e),{dueDate:pe});break;case"Annual Fee":q=X(H({},e),{feeOnMonthDay:pe});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let l=[new Ne({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],p={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:l};this.dialog.open(he,{data:p}).afterClosed().subscribe(D=>{if(D.data){let q=X(H({},e),{feeInterval:D.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,q),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1}get fixedDepositAccountCharges(){return{charges:this.chargesDataSource}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-charges-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountFormValid:"fixedDepositAccountFormValid"},features:[Jt],decls:47,vars:18,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),a(3),r(4,"translate"),o(),n(5,"mat-select",null,0),L(7,up,2,2,"mat-option",3,$),o()(),n(9,"div",4)(10,"button",5),M("click",function(){S(f);let q=k(6);return A(p.addCharge(q))}),g(11,"fa-icon",6),a(12),r(13,"translate"),o()(),n(14,"table",7),b(15,8),C(16,fp,3,3,"th",9)(17,gp,2,1,"td",10),P(),b(18,11),C(19,xp,3,3,"th",9)(20,Cp,2,1,"td",10),P(),b(21,12),C(22,_p,3,3,"th",9)(23,hp,4,1,"td",10),P(),b(24,13),C(25,vp,3,3,"th",9)(26,Dp,2,1,"td",10),P(),b(27,14),C(28,bp,3,3,"th",9)(29,Ap,5,4,"td",10),P(),b(30,15),C(31,Op,3,3,"th",9)(32,Ip,3,2,"td",10),P(),b(33,16),C(34,Fp,3,3,"th",9)(35,wp,3,0,"td",10),P(),C(36,Ep,1,0,"tr",17)(37,Bp,1,0,"tr",18),o()(),n(38,"div",19)(39,"button",20),g(40,"fa-icon",21),a(41),r(42,"translate"),o(),n(43,"button",22),a(44),r(45,"translate"),g(46,"fa-icon",23),o()()}if(l&2){let f=k(6);i(3),m(c(4,10,"labels.inputs.Charge")),i(4),G(p.chargeData),i(3),d("disabled",!f.value),i(2),u(" ",c(13,12,"labels.buttons.Add")," "),i(2),d("dataSource",p.chargesDataSource)("hidden",p.chargesDataSource.length===0),i(22),d("matHeaderRowDef",p.displayedColumns),i(),d("matRowDefColumns",p.displayedColumns),i(4),u(" ",c(42,14,"labels.buttons.Previous")," "),i(2),d("disabled",!p.fixedDepositAccountFormValid),i(),u(" ",c(45,16,"labels.buttons.Next")," ")}},dependencies:[y,I,ot,nt,Ot,At,B,ut,wt,kt,Bt,Rt,Et,Nt,Ee,Vt,zt,qt,Ht,Wt,ne,yt,w],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var kp=["chartsTable"];function Rp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Np(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function Vp(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function qp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function zp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod,"-",e.toPeriod,"\xA0",e.periodType.value," ")}}function Hp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function $p(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),T("",e.amountRangeFrom,"-",e.amountRangeTo)}}function Lp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Gp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.annualInterestRate)}}function Up(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function jp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Wp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function Kp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",27),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function Qp(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",28),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Yp(t,s){if(t&1){let e=F();n(0,"td",24)(1,"button",25),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,Kp,4,3,"span",26)(3,Qp,4,3,"span",26),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function Jp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Xp(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Zp(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function tc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function ec(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function ic(t,s){if(t&1&&(n(0,"td",24),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function nc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function oc(t,s){if(t&1&&(n(0,"td",41),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function ac(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function rc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function pc(t,s){t&1&&(n(0,"th",23),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function cc(t,s){if(t&1&&(n(0,"td",24),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function sc(t,s){t&1&&g(0,"tr",42)}function lc(t,s){t&1&&g(0,"tr",43)}function mc(t,s){if(t&1&&(n(0,"table",33),b(1,34),C(2,Jp,3,3,"th",8)(3,Xp,2,1,"td",9),P(),b(4,35),C(5,Zp,3,3,"th",8)(6,tc,2,1,"td",9),P(),b(7,36),C(8,ec,3,3,"th",8)(9,ic,3,3,"td",9),P(),b(10,37),C(11,nc,3,3,"th",8)(12,oc,2,2,"td",38),P(),b(13,39),C(14,ac,3,3,"th",8)(15,rc,2,1,"td",9),P(),b(16,40),C(17,pc,3,3,"th",8)(18,cc,2,1,"td",9),P(),C(19,sc,1,0,"tr",15)(20,lc,1,0,"tr",16),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function dc(t,s){if(t&1&&(n(0,"td",24)(1,"div",29)(2,"mat-card",30)(3,"h4",31),a(4),r(5,"translate"),o(),C(6,mc,21,3,"table",32),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function uc(t,s){t&1&&g(0,"tr",42)}function fc(t,s){t&1&&g(0,"tr",43)}function gc(t,s){t&1&&g(0,"tr",44)}var Ve=(()=>{class t{constructor(){this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"]}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs,this.chartsTableRef.renderRows())}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-interest-rate-chart-step"]],viewQuery:function(l,p){if(l&1&&ht(kp,7),l&2){let f;vt(f=Dt())&&(p.chartsTableRef=f.first)}},inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate"},features:[Jt],decls:48,vars:23,consts:[["chartsTable",""],[1,"layout-column","gap-2px"],["class","flex-fill",4,"ngIf"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"incentives","layout-row-wrap","flex-fill"],[1,"layout-row-wrap","flex-fill"],[1,"m-b-10","flex-13"],["class","flex-fill mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"]],template:function(l,p){l&1&&(n(0,"div",1),C(1,Rp,6,4,"div",2),n(2,"div",3)(3,"span",4),a(4),r(5,"translate"),o(),n(6,"span",5),a(7),r(8,"dateFormat"),o()(),C(9,Np,7,6,"div",2)(10,Vp,6,4,"div",2),n(11,"div",3)(12,"span",4),a(13),r(14,"translate"),o(),n(15,"span",5),a(16),o()(),n(17,"table",6,0),b(19,7),C(20,qp,3,3,"th",8)(21,zp,2,3,"td",9),P(),b(22,10),C(23,Hp,3,3,"th",8)(24,$p,2,2,"td",9),P(),b(25,11),C(26,Lp,3,3,"th",8)(27,Gp,2,1,"td",9),P(),b(28,12),C(29,Up,3,3,"th",8)(30,jp,2,1,"td",9),P(),b(31,13),C(32,Wp,3,3,"th",8)(33,Yp,4,2,"td",9),P(),b(34,14),C(35,dc,7,6,"td",9),P(),C(36,uc,1,0,"tr",15)(37,fc,1,0,"tr",16)(38,gc,1,0,"tr",17),o()(),n(39,"div",18)(40,"button",19),g(41,"fa-icon",20),a(42),r(43,"translate"),o(),n(44,"button",21),a(45),r(46,"translate"),g(47,"fa-icon",22),o()()),l&2&&(i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(5,13,"labels.inputs.Valid from Date"),":"),i(3),m(c(8,15,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(14,17,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(p.fixedDepositsAccountProductTemplate!=null&&p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount?"Yes":"No"),i(),d("dataSource",p.interestRateChartData),i(19),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(4),u(" ",c(43,19,"labels.buttons.Previous")," "),i(3),u(" ",c(46,21,"labels.buttons.Next")," "))},dependencies:[y,Ae,Oe,I,Y,B,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ne,ye,yt,w],styles:[".margin-t[_ngcontent-%COMP%]{margin-top:2em}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();var xc=()=>["../.."],Cc=()=>[2e3];function _c(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.External Id")),i(3),m(e.fixedDepositAccountData.externalId)}}function hc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Lock-in Period"),":"),i(3),T("",e.fixedDepositAccountData.lockinPeriodFrequency," ",E(7,10,at(6,5,e.fixedDepositAccountData.lockinPeriodFrequencyType,e.fixedDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions,"id","value"),"catalogs"))}}function vc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.Minimum Deposit Term"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.minDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.minDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.minDepositTermType.value,"catalogs"))}}function Dc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),u("",c(3,3,"labels.inputs.In Multiples Of"),":"),i(3),T("",e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value,"catalogs"))}}function bc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Maximum Deposit Term")),i(3),T("",e.fixedDepositsAccountProductTemplate.maxDepositTerm," ",E(6,5,e.fixedDepositsAccountProductTemplate.maxDepositTermType==null?null:e.fixedDepositsAccountProductTemplate.maxDepositTermType.value,"catalogs"))}}function Pc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Linked Savings Account")),i(3),m(at(6,4,e.fixedDepositAccountData.linkAccountId,e.fixedDepositsAccountProductTemplate.savingsAccounts,"id","accountNo"))}}function Mc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"find"),r(7,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(7,9,at(6,4,e.fixedDepositAccountData.maturityInstructionId,e.fixedDepositsAccountProductTemplate.maturityInstructionOptions,"id","value"),"catalogs"))}}function Tc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Penal Interest")," (%):"),i(3),m(e.fixedDepositsAccountProductTemplate.preClosurePenalInterest+"% ("+(e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType==null?null:e.fixedDepositsAccountProductTemplate.preClosurePenalInterestOnType.id)+")")}}function Sc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"yesNo"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Withhold Tax is Applicable"),":"),i(3),m(c(6,4,e.fixedDepositAccountData.withHoldTax))}}function Ac(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.name"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.name)}}function Oc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.End Date"),":"),i(3),m(c(6,4,e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.endDate))}}function yc(t,s){if(t&1&&(n(0,"div",3)(1,"span",4),a(2),r(3,"translate"),o(),n(4,"span",5),a(5),o()()),t&2){let e=_();i(2),u("",c(3,2,"labels.inputs.Description"),":"),i(3),m(e.fixedDepositsAccountProductTemplate==null?null:e.fixedDepositsAccountProductTemplate.accountChart.description)}}function Ic(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Period")))}function Fc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"translateKey"),o()),t&2){let e=s.$implicit;i(),ce(" ",e.fromPeriod," - ",e.toPeriod,"\xA0",E(2,3,e.periodType.value,"catalogs")," ")}}function wc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount Range")))}function Ec(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),r(3,"formatNumber"),o()),t&2){let e=s.$implicit;i(),T(" ",c(2,2,e.amountRangeFrom)," - ",c(3,4,e.amountRangeTo)," ")}}function Bc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function kc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u("",c(2,1,e.annualInterestRate)," %")}}function Rc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Description")))}function Nc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),m(e.description)}}function Vc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Actions")))}function qc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",29),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.View Incentives")," "))}function zc(t,s){t&1&&(n(0,"span"),g(1,"fa-icon",30),a(2),r(3,"translate"),o()),t&2&&(i(2),u(" ",c(3,1,"labels.buttons.Hide Incentives")," "))}function Hc(t,s){if(t&1){let e=F();n(0,"td",26)(1,"button",27),M("click",function(){let p=S(e).dataIndex,f=_();return A(f.expandChartSlabIndex=f.expandChartSlabIndex===p?null:p)}),C(2,qc,4,3,"span",28)(3,zc,4,3,"span",28),o()()}if(t&2){let e=s.dataIndex,l=_();i(2),d("ngIf",l.expandChartSlabIndex!==e),i(),d("ngIf",l.expandChartSlabIndex===e)}}function $c(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Entity Type")))}function Lc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.entityType.value," ")}}function Gc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Name")))}function Uc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.attributeName.value," ")}}function jc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Condition Type")))}function Wc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"titlecase"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.conditionType.value)," ")}}function Kc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Attribute Value")))}function Qc(t,s){if(t&1&&(n(0,"td",43),a(1),o()),t&2){let e=s.$implicit;d("ngSwitch",e.attributeName),i(),u(" ",e.attributeValueDesc," ")}}function Yc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Incentive Type")))}function Jc(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.incentiveType.value," ")}}function Xc(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Interest")))}function Zc(t,s){if(t&1&&(n(0,"td",26),a(1),r(2,"formatNumber"),o()),t&2){let e=s.$implicit;i(),u(" ",c(2,1,e.amount)," ")}}function ts(t,s){t&1&&g(0,"tr",44)}function es(t,s){t&1&&g(0,"tr",45)}function is(t,s){if(t&1&&(n(0,"table",35),b(1,36),C(2,$c,3,3,"th",9)(3,Lc,2,1,"td",10),P(),b(4,37),C(5,Gc,3,3,"th",9)(6,Uc,2,1,"td",10),P(),b(7,38),C(8,jc,3,3,"th",9)(9,Wc,3,3,"td",10),P(),b(10,39),C(11,Kc,3,3,"th",9)(12,Qc,2,2,"td",40),P(),b(13,41),C(14,Yc,3,3,"th",9)(15,Jc,2,1,"td",10),P(),b(16,42),C(17,Xc,3,3,"th",9)(18,Zc,3,3,"td",10),P(),C(19,ts,1,0,"tr",16)(20,es,1,0,"tr",17),o()),t&2){let e=_().$implicit,l=_();d("dataSource",e.incentives),i(19),d("matHeaderRowDef",l.incentivesDisplayedColumns),i(),d("matRowDefColumns",l.incentivesDisplayedColumns)}}function ns(t,s){if(t&1&&(n(0,"td",26)(1,"div",31)(2,"mat-card",32)(3,"h4",33),a(4),r(5,"translate"),o(),C(6,is,21,3,"table",34),o()()()),t&2){let e=s.$implicit,l=s.dataIndex,p=_();Te("colspan",p.chartSlabsDisplayedColumns.length),i(),d("@expandChartSlab",l===p.expandChartSlabIndex?"expanded":"collapsed"),i(3),u(" ",c(5,4,"labels.heading.Incentives")," "),i(2),d("ngIf",e.incentives.length)}}function os(t,s){t&1&&g(0,"tr",44)}function as(t,s){t&1&&g(0,"tr",45)}function rs(t,s){t&1&&g(0,"tr",46)}function ps(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.name")))}function cs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.name+", "+e.currency.displaySymbol," ")}}function ss(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Type")))}function ls(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeCalculationType.value," ")}}function ms(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Amount")))}function ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.amount," ")}}function us(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Date")))}function fs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",c(2,1,e.dueDate)||"Unassigned"," ")}}function gs(t,s){if(t&1&&(n(0,"span"),a(1),r(2,"dateFormat"),o()),t&2){let e=_().$implicit;i(),u(" ",e.feeOnMonthDay?E(2,1,R(4,Cc).concat(e.feeOnMonthDay),"dd MMMM"):"Unassigned"," ")}}function xs(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.N/A")," "))}function Cs(t,s){if(t&1&&(n(0,"td",26),C(1,fs,3,3,"span",28)(2,gs,3,5,"span",28)(3,xs,3,3,"span",28),o()),t&2){let e=s.$implicit;i(),d("ngIf",e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"),i(),d("ngIf",e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"),i(),d("ngIf",!(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"))}}function _s(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Repayments Every")))}function hs(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.feeInterval||"Not Provided"," ")}}function vs(t,s){t&1&&(n(0,"th",25),a(1),r(2,"translate"),o()),t&2&&(i(),m(c(2,1,"labels.inputs.Collected On")))}function Ds(t,s){if(t&1&&(n(0,"td",26),a(1),o()),t&2){let e=s.$implicit;i(),u(" ",e.chargeTimeType.value," ")}}function bs(t,s){t&1&&g(0,"tr",44)}function Ps(t,s){t&1&&g(0,"tr",45)}function Ms(t,s){if(t&1&&(n(0,"div",47)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"table",35),b(6,48),C(7,ps,3,3,"th",9)(8,cs,2,1,"td",10),P(),b(9,49),C(10,ss,3,3,"th",9)(11,ls,2,1,"td",10),P(),b(12,42),C(13,ms,3,3,"th",9)(14,ds,2,1,"td",10),P(),b(15,50),C(16,us,3,3,"th",9)(17,Cs,4,3,"td",10),P(),b(18,51),C(19,_s,3,3,"th",9)(20,hs,2,1,"td",10),P(),b(21,52),C(22,vs,3,3,"th",9)(23,Ds,2,1,"td",10),P(),C(24,bs,1,0,"tr",16)(25,Ps,1,0,"tr",17),o()()),t&2){let e=_();i(2),m(c(3,4,"labels.heading.Charges")),i(3),d("dataSource",e.fixedDepositAccountData.charges),i(19),d("matHeaderRowDef",e.chargesDisplayedColumns),i(),d("matRowDefColumns",e.chargesDisplayedColumns)}}var qe=(()=>{class t{constructor(){this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","repaymentsEvery"],this.interestRateChartData=[],this.chartSlabsDisplayedColumns=["period","amountRange","interest","description","actions"],this.incentivesDisplayedColumns=["entityType","attributeName","conditionType","attributeValue","incentiveType","amount"],this.chartSlabsIncentivesDisplayedColumns=["incentives"],this.submitEvent=new $e}ngOnChanges(){this.fixedDepositsAccountProductTemplate&&(this.interestRateChartData=this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-fixed-deposit-account-preview-step"]],inputs:{fixedDepositsAccountTemplate:"fixedDepositsAccountTemplate",fixedDepositsAccountProductTemplate:"fixedDepositsAccountProductTemplate",fixedDepositAccountData:"fixedDepositAccountData"},outputs:{submitEvent:"submitEvent"},features:[Jt],decls:181,vars:176,consts:[[1,"layout-row-wrap","responsive-column"],[1,"mat-h3","flex-100"],[1,"flex-100"],[1,"layout-row","flex-100"],[1,"flex-40"],[1,"flex-60"],["class","layout-row flex-100",4,"ngIf"],["mat-table","","multiTemplateDataRows","",1,"mat-elevation-z1","irc-table",3,"dataSource"],["matColumnDef","period"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amountRange"],["matColumnDef","interest"],["matColumnDef","description"],["matColumnDef","actions"],["matColumnDef","incentives"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-row","","class","incentives-row",4,"matRowDef","matRowDefColumns"],["class","layout-row-wrap responsive-column flex-100",4,"ngIf"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],["mat-header-cell",""],["mat-cell",""],["mat-button","","color","primary",3,"click"],[4,"ngIf"],["icon","eye",1,"m-r-10"],["icon","eye-slash",1,"m-r-10"],[1,"layout-row-wrap","flex-100","incentives"],[1,"layout-row-wrap","flex-100"],[1,"m-b-10","flex-13"],["class","flex-100 mat-elevation-z1","mat-table","",3,"dataSource",4,"ngIf"],["mat-table","",1,"flex-100","mat-elevation-z1",3,"dataSource"],["matColumnDef","entityType"],["matColumnDef","attributeName"],["matColumnDef","conditionType"],["matColumnDef","attributeValue"],["mat-cell","",3,"ngSwitch",4,"matCellDef"],["matColumnDef","incentiveType"],["matColumnDef","amount"],["mat-cell","",3,"ngSwitch"],["mat-header-row",""],["mat-row",""],["mat-row","",1,"incentives-row"],[1,"layout-row-wrap","responsive-column","flex-100"],["matColumnDef","name"],["matColumnDef","chargeCalculationType"],["matColumnDef","date"],["matColumnDef","repaymentsEvery"],["matColumnDef","chargeTimeType"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"h3",1),a(2),r(3,"translate"),o(),g(4,"mat-divider",2),n(5,"div",3)(6,"span",4),a(7),r(8,"translate"),o(),n(9,"span",5),a(10),r(11,"find"),o()(),n(12,"div",3)(13,"span",4),a(14),r(15,"translate"),o(),n(16,"span",5),a(17),r(18,"dateFormat"),o()(),C(19,_c,6,4,"div",6),n(20,"div",3)(21,"span",4),a(22),r(23,"translate"),o(),n(24,"span",5),a(25),r(26,"find"),r(27,"translateKey"),o()(),n(28,"h3",1),a(29),r(30,"translate"),o(),g(31,"mat-divider",2),n(32,"div",3)(33,"span",4),a(34),r(35,"translate"),o(),n(36,"span",5),a(37),o()(),n(38,"div",3)(39,"span",4),a(40),r(41,"translate"),o(),n(42,"span",5),a(43),o()(),n(44,"div",3)(45,"span",4),a(46),r(47,"translate"),o(),n(48,"span",5),a(49),o()(),n(50,"h3",1),a(51),r(52,"translate"),o(),g(53,"mat-divider",2),n(54,"div",3)(55,"span",4),a(56),r(57,"translate"),o(),n(58,"span",5),a(59),r(60,"currency"),o()(),n(61,"div",3)(62,"span",4),a(63),r(64,"translate"),o(),n(65,"span",5),a(66),r(67,"find"),r(68,"translateKey"),o()(),n(69,"div",3)(70,"span",4),a(71),r(72,"translate"),o(),n(73,"span",5),a(74),r(75,"find"),r(76,"translateKey"),o()(),n(77,"div",3)(78,"span",4),a(79),r(80,"translate"),o(),n(81,"span",5),a(82),r(83,"find"),r(84,"translateKey"),o()(),n(85,"div",3)(86,"span",4),a(87),r(88,"translate"),o(),n(89,"span",5),a(90),r(91,"find"),r(92,"translateKey"),o()(),n(93,"div",3)(94,"span",4),a(95),r(96,"translate"),o(),n(97,"span",5),a(98),r(99,"find"),r(100,"translateKey"),o()(),n(101,"h3",1),a(102),r(103,"translate"),o(),g(104,"mat-divider",2),C(105,hc,8,13,"div",6)(106,vc,7,8,"div",6)(107,Dc,7,8,"div",6)(108,bc,7,8,"div",6),n(109,"div",3)(110,"span",4),a(111),r(112,"translate"),o(),n(113,"span",5),a(114),r(115,"yesNo"),o()(),C(116,Pc,7,9,"div",6)(117,Mc,8,12,"div",6),n(118,"div",3)(119,"span",4),a(120),r(121,"translate"),o(),n(122,"span",5),a(123),r(124,"yesNo"),o()(),C(125,Tc,6,4,"div",6)(126,Sc,7,6,"div",6),n(127,"h3",1),a(128),r(129,"translate"),o(),g(130,"mat-divider",2),C(131,Ac,6,4,"div",6),n(132,"div",3)(133,"span",4),a(134),r(135,"translate"),o(),n(136,"span",5),a(137),r(138,"dateFormat"),o()(),C(139,Oc,7,6,"div",6)(140,yc,6,4,"div",6),n(141,"div",3)(142,"span",4),a(143),r(144,"translate"),o(),n(145,"span",5),a(146),r(147,"yesNo"),o()(),n(148,"table",7),b(149,8),C(150,Ic,3,3,"th",9)(151,Fc,3,6,"td",10),P(),b(152,11),C(153,wc,3,3,"th",9)(154,Ec,4,6,"td",10),P(),b(155,12),C(156,Bc,3,3,"th",9)(157,kc,3,3,"td",10),P(),b(158,13),C(159,Rc,3,3,"th",9)(160,Nc,2,1,"td",10),P(),b(161,14),C(162,Vc,3,3,"th",9)(163,Hc,4,2,"td",10),P(),b(164,15),C(165,ns,7,6,"td",10),P(),C(166,os,1,0,"tr",16)(167,as,1,0,"tr",17)(168,rs,1,0,"tr",18),o(),C(169,Ms,26,6,"div",19),o(),n(170,"div",20)(171,"button",21),g(172,"fa-icon",22),a(173),r(174,"translate"),o(),n(175,"button",23),a(176),r(177,"translate"),o(),n(178,"button",24),M("click",function(){return p.submitEvent.emit()}),a(179),r(180,"translate"),o()()),l&2&&(i(2),m(c(3,59,"labels.heading.Details")),i(5),m(c(8,61,"labels.inputs.Product")),i(3),m(at(11,63,p.fixedDepositAccountData.productId,p.fixedDepositsAccountTemplate.productOptions,"id","name")),i(4),m(c(15,68,"labels.inputs.Submitted On")),i(3),m(c(18,70,p.fixedDepositAccountData.submittedOnDate)),i(2),d("ngIf",p.fixedDepositAccountData.externalId),i(3),m(c(23,72,"labels.inputs.Field Officer")),i(3),m(E(27,79,at(26,74,p.fixedDepositAccountData.fieldOfficerId,p.fixedDepositsAccountProductTemplate.fieldOfficerOptions,"id","displayName")||"Unassigned","inputs")),i(4),m(c(30,82,"labels.heading.Currency")),i(5),m(c(35,84,"labels.inputs.Currency")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.code),i(3),m(c(41,86,"labels.inputs.Currency Multiple")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.inMultiplesOf),i(3),m(c(47,88,"labels.inputs.Decimal Places")),i(3),m(p.fixedDepositsAccountProductTemplate.currency.decimalPlaces),i(2),m(c(52,90,"labels.heading.Terms")),i(5),u("",c(57,92,"labels.inputs.Fixed Deposit Amount"),":"),i(3),m(at(60,94,p.fixedDepositAccountData.depositAmount,p.fixedDepositsAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")),i(4),u("",c(64,99,"labels.inputs.Deposit Period"),":"),i(3),T("",p.fixedDepositAccountData.depositPeriod," ",E(68,106,at(67,101,p.fixedDepositAccountData.depositPeriodFrequencyId,p.fixedDepositsAccountProductTemplate.periodFrequencyTypeOptions,"id","value"),"catalogs")),i(5),u("",c(72,109,"labels.inputs.Interest Compounding Period"),":"),i(3),m(E(76,116,at(75,111,p.fixedDepositAccountData.interestCompoundingPeriodType,p.fixedDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(80,119,"labels.inputs.Interest Posting Period"),":"),i(3),m(E(84,126,at(83,121,p.fixedDepositAccountData.interestPostingPeriodType,p.fixedDepositsAccountProductTemplate.interestPostingPeriodTypeOptions,"id","value"),"catalogs")),i(5),u("",c(88,129,"labels.inputs.Interest Calculated using"),":"),i(3),m(E(92,136,at(91,131,p.fixedDepositAccountData.interestCalculationType,p.fixedDepositsAccountProductTemplate.interestCalculationTypeOptions,"id","value"),"catalogs")),i(5),u("",c(96,139,"labels.inputs.Days in Year"),":"),i(3),m(E(100,146,at(99,141,p.fixedDepositAccountData.interestCalculationDaysInYearType,p.fixedDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions,"id","value"),"catalogs")),i(4),m(c(103,149,"labels.heading.Settings")),i(3),d("ngIf",p.fixedDepositAccountData.lockinPeriodFrequency),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.minDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.inMultiplesOfDepositTerm),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.maxDepositTerm),i(3),u("",c(112,151,"labels.inputs.Transfer Interest to Savings Account"),"?"),i(3),m(c(115,153,p.fixedDepositAccountData.transferInterestToSavings)),i(2),d("ngIf",p.fixedDepositAccountData.transferInterestToSavings),i(),d("ngIf",p.fixedDepositAccountData.maturityInstructionId),i(3),u("",c(121,155,"labels.inputs.Apply Penal Interest (less)"),":"),i(3),m(c(124,157,p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate.preClosurePenalApplicable),i(),d("ngIf",p.fixedDepositsAccountProductTemplate.withHoldTax),i(2),m(c(129,159,"labels.heading.Interest Rate Chart")),i(3),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.name),i(3),u("",c(135,161,"labels.inputs.Valid from Date"),":"),i(3),m(c(138,163,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.fromDate)),i(2),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.endDate),i(),d("ngIf",p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.description),i(3),u("",c(144,165,"labels.inputs.Primary Grouping by Amount"),":"),i(3),m(c(147,167,p.fixedDepositsAccountProductTemplate==null?null:p.fixedDepositsAccountProductTemplate.accountChart.isPrimaryGroupingByAmount)),i(2),d("dataSource",p.interestRateChartData),i(18),d("matHeaderRowDef",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsDisplayedColumns),i(),d("matRowDefColumns",p.chartSlabsIncentivesDisplayedColumns),i(),d("ngIf",p.fixedDepositAccountData.charges.length),i(4),u(" ",c(174,169,"labels.buttons.Previous")," "),i(2),d("routerLink",R(175,xc)),i(),u(" ",c(177,171,"labels.buttons.Cancel")," "),i(3),u(" ",c(180,173,"labels.buttons.Submit")," "))},dependencies:[y,Ae,Oe,I,tt,Y,B,Re,wt,kt,Bt,Rt,Et,Nt,ut,Vt,zt,qt,Ht,Wt,ye,se,yt,w,It,Xi,ue,tn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}.margin-b[_ngcontent-%COMP%]{margin-bottom:.25em}.irc-table[_ngcontent-%COMP%]{width:100%}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%]{height:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:0}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .incentives[_ngcontent-%COMP%]{overflow:hidden}.irc-table[_ngcontent-%COMP%] tr.incentives-row[_ngcontent-%COMP%] .mat-card[_ngcontent-%COMP%]{border-radius:0}"],data:{animation:[Ie("expandChartSlab",[ae("collapsed",oe({height:"0px",minHeight:"0"})),ae("expanded",oe({height:"*"})),we("expanded <=> collapsed",Fe("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}}return t})();function Ts(t,s){t&1&&g(0,"fa-icon",14)}function Ss(t,s){t&1&&g(0,"fa-icon",14)}function As(t,s){t&1&&g(0,"fa-icon",15)}function Os(t,s){t&1&&g(0,"fa-icon",16)}function ys(t,s){t&1&&g(0,"fa-icon",17)}function Is(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Fs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Es(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function Bs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function ks(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Rs(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,ks,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Mi=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountTemplate=e.fixedDepositsAccountTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValid(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.createFixedDepositAccount(f).subscribe(D=>{this.router.navigate(["../",D.resourceId],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-create-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ts,1,0,"ng-template",3)(4,Ss,1,0,"ng-template",4)(5,As,1,0,"ng-template",5)(6,Os,1,0,"ng-template",6)(7,ys,1,0,"ng-template",7),n(8,"mat-step",8),C(9,Is,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Fs,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,ws,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Es,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,Bs,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Rs,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValid),i(),v(p.fixedDepositAccountFormValid?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();function Ns(t,s){t&1&&g(0,"fa-icon",14)}function Vs(t,s){t&1&&g(0,"fa-icon",14)}function qs(t,s){t&1&&g(0,"fa-icon",15)}function zs(t,s){t&1&&g(0,"fa-icon",16)}function Hs(t,s){t&1&&g(0,"fa-icon",17)}function $s(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.DETAILS"))}function Ls(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.TERMS"))}function Gs(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.SETTINGS"))}function Us(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.INTEREST RATE CHART"))}function js(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.CHARGES"))}function Ws(t,s){t&1&&(a(0),r(1,"translate")),t&2&&m(c(1,1,"labels.inputs.PREVIEW"))}function Ks(t,s){if(t&1){let e=F();n(0,"mat-step",13),C(1,Ws,2,3,"ng-template",9),n(2,"mifosx-fixed-deposit-account-preview-step",18),M("submitEvent",function(){S(e);let p=_();return A(p.submit())}),o()()}if(t&2){let e=_();i(2),d("fixedDepositsAccountTemplate",e.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",e.fixedDepositsAccountProductTemplate)("fixedDepositAccountData",e.fixedDepositAccount)}}var Ti=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.dateUtils=x(et),this.fixedDepositsService=x(j),this.settingsService=x(U),this.route.data.subscribe(e=>{this.fixedDepositsAccountAndTemplate=e.fixedDepositsAccountAndTemplate})}setTemplate(e){this.fixedDepositsAccountProductTemplate=e,this.currency=this.fixedDepositsAccountAndTemplate.currency}get fixedDepositAccountDetailsForm(){return this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetailsForm}get fixedDepositAccountTermsForm(){return this.fixedDepositAccountTermsStep.fixedDepositAccountTermsForm}get fixedDepositAccountSettingsForm(){return this.fixedDepositAccountSettingsStep.fixedDepositAccountSettingsForm}get fixedDepositAccountFormValidAndNotPristine(){return this.fixedDepositAccountDetailsForm.valid&&this.fixedDepositAccountTermsForm.valid&&this.fixedDepositAccountSettingsForm.valid&&(!this.fixedDepositAccountDetailsForm.pristine||!this.fixedDepositAccountTermsForm.pristine||!this.fixedDepositAccountSettingsForm.pristine||!this.fixedDepositAccountChargesStep.pristine)}get fixedDepositAccount(){return H(H(H(H({},this.fixedDepositsAccountDetailsStep.fixedDepositAccountDetails),this.fixedDepositAccountTermsStep.fixedDepositAccountTerms),this.fixedDepositAccountSettingsStep.fixedDepositAccountSettings),this.fixedDepositAccountChargesStep?.fixedDepositAccountCharges)}submit(){let e=this.settingsService.language.code,l=this.settingsService.dateFormat,p="dd MMMM",f=X(H({},this.fixedDepositAccount),{clientId:this.fixedDepositsAccountAndTemplate.clientId,charges:this.fixedDepositAccount.charges.map(D=>({chargeId:D.id,amount:D.amount,dueDate:D.dueDate&&this.dateUtils.formatDate(D.dueDate,l),feeOnMonthDay:D.feeOnMonthDay&&this.dateUtils.formatDate([2e3].concat(D.feeOnMonthDay),p),feeInterval:D.feeInterval})),submittedOnDate:this.dateUtils.formatDate(this.fixedDepositAccount.submittedOnDate,l),charts:[{chartSlabs:this.fixedDepositsAccountProductTemplate.accountChart.chartSlabs}],dateFormat:l,monthDayFormat:p,locale:e});this.fixedDepositsService.updateFixedDepositAccount(this.fixedDepositsAccountAndTemplate.id,f).subscribe(D=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-edit-fixed-deposit-account"]],viewQuery:function(l,p){if(l&1&&(ht(ge,7),ht(xe,7),ht(Ce,7),ht(_e,7)),l&2){let f;vt(f=Dt())&&(p.fixedDepositsAccountDetailsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountTermsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountSettingsStep=f.first),vt(f=Dt())&&(p.fixedDepositAccountChargesStep=f.first)}},decls:24,vars:15,consts:[["fixedDepositAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"fixedDepositsAccountProductTemplate","fixedDepositsAccountTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate"],[3,"fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountFormValid"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","fixedDepositsAccountTemplate","fixedDepositsAccountProductTemplate","fixedDepositAccountData"]],template:function(l,p){if(l&1){let f=F();n(0,"div",1)(1,"mat-stepper",2,0),C(3,Ns,1,0,"ng-template",3)(4,Vs,1,0,"ng-template",4)(5,qs,1,0,"ng-template",5)(6,zs,1,0,"ng-template",6)(7,Hs,1,0,"ng-template",7),n(8,"mat-step",8),C(9,$s,2,3,"ng-template",9),n(10,"mifosx-fixed-deposit-account-details-step",10),M("fixedDepositsAccountProductTemplate",function(q){return S(f),A(p.setTemplate(q))}),o()(),n(11,"mat-step",8),C(12,Ls,2,3,"ng-template",9),g(13,"mifosx-fixed-deposit-account-terms-step",11),o(),n(14,"mat-step",8),C(15,Gs,2,3,"ng-template",9),g(16,"mifosx-fixed-deposit-account-settings-step",11),o(),n(17,"mat-step"),C(18,Us,2,3,"ng-template",9),g(19,"mifosx-fixed-deposit-account-interest-rate-chart-step",11),o(),n(20,"mat-step"),C(21,js,2,3,"ng-template",9),g(22,"mifosx-fixed-deposit-account-charges-step",12),o(),h(23,Ks,3,3,"mat-step",13),o()()}l&2&&(i(),d("linear",!1),i(7),d("stepControl",p.fixedDepositAccountDetailsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate),i(),d("stepControl",p.fixedDepositAccountTermsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(),d("stepControl",p.fixedDepositAccountSettingsForm),i(2),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate),i(3),d("fixedDepositsAccountTemplate",p.fixedDepositsAccountAndTemplate)("fixedDepositsAccountProductTemplate",p.fixedDepositsAccountProductTemplate)("fixedDepositAccountFormValid",p.fixedDepositAccountFormValidAndNotPristine),i(),v(p.fixedDepositAccountFormValidAndNotPristine?23:-1))},dependencies:[y,I,Ze,Je,ut,Xe,Ye,ge,xe,Ce,Ve,_e,qe,w],encapsulation:2})}}return t})();var Si=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountData(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var wi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.paramMap.get("fixedDepositAccountId"),p=e.paramMap.get("id");return this.fixedDepositsService.getFixedDepositsAccountTransaction(l,p)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Ei=(()=>{class t{constructor(){this.savingsService=x($t),this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("name"),p=e.paramMap.get("fixedDepositAccountId")||e.parent.parent.paramMap.get("fixedDepositAccountId");switch(l){case"Add Charge":return this.savingsService.getSavingsChargeTemplateResource(p);case"Close":return this.fixedDepositsService.getFixedDepositsAccountClosureTemplate(p);case"Withdrawal":return this.fixedDepositsService.getFixedDepositsAccountTransactionTemplate(p);default:return}}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var Bi=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.parent.parent.paramMap.get("clientId");return this.fixedDepositsService.getFixedDepositsAccountTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();var ki=(()=>{class t{constructor(){this.fixedDepositsService=x(j)}resolve(e){let l=e.paramMap.get("fixedDepositAccountId");return this.fixedDepositsService.getFixedDepositsAccountAndTemplate(l)}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275prov=Gt({token:t,factory:t.\u0275fac})}}return t})();function Qs(t,s){if(t&1&&(n(0,"span"),g(1,"mifosx-external-identifier",4),o()),t&2){let e=_();i(),d("externalId",_t(e.fixedDepositsAccountData.externalId))}}function Ys(t,s){t&1&&(n(0,"span"),a(1),r(2,"translate"),o()),t&2&&(i(),u(" ",c(2,1,"labels.inputs.Not Available")," "))}function Js(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"dateFormat"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Closed On")),i(3),m(c(6,4,e.fixedDepositsAccountData.timeline.closedOnDate))}}function Xs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Tax Group")),i(3),m(e.fixedDepositsAccountData.taxGroup.name)}}function Zs(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,2,"labels.inputs.Maturity Instructions")),i(3),m(E(6,4,e.fixedDepositsAccountData.onAccountClosure.value,"catalogs"))}}function tl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td"),a(5),r(6,"translateKey"),o()()),t&2){let e=_();i(2),m(c(3,3,"labels.inputs.Pre-cloure Penal")),i(3),T(" ",e.fixedDepositsAccountData.preClosurePenalInterest," % on ",E(6,5,e.fixedDepositsAccountData.preClosurePenalInterestOnType.value,"catalogs")," ")}}function el(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Deposits")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalDeposits,e.currency.code,"symbol-narrow","1.2-2")," ")}}function il(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Withdrawals")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalWithdrawals,e.currency.code,"symbol-narrow","1.2-2")," ")}}function nl(t,s){if(t&1&&(n(0,"tr")(1,"td"),a(2),r(3,"translate"),o(),n(4,"td",5),a(5),r(6,"currency"),o()()),t&2){let e=_(2);i(2),m(c(3,2,"labels.inputs.Total Interest Earned")),i(3),u(" ",at(6,4,e.fixedDepositsAccountData.summary.totalInterestEarned,e.currency.code,"symbol-narrow","1.2-2")," ")}}function ol(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()(),h(20,el,7,9,"tr"),h(21,il,7,9,"tr"),h(22,nl,7,9,"tr"),o()()()),t&2){let e=_();i(2),m(c(3,8,"labels.heading.Performance History")),i(6),m(c(9,10,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,12,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,17,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,19,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(2),v(e.fixedDepositsAccountData.summary.totalDeposits?20:-1),i(),v(e.fixedDepositsAccountData.summary.totalWithdrawals?21:-1),i(),v(e.fixedDepositsAccountData.summary.totalInterestEarned>=0?22:-1)}}function al(t,s){if(t&1&&(n(0,"div")(1,"h4",2),a(2),r(3,"translate"),o(),n(4,"table")(5,"tbody")(6,"tr")(7,"td"),a(8),r(9,"translate"),o(),n(10,"td",5),a(11),r(12,"currency"),o()(),n(13,"tr")(14,"td"),a(15),r(16,"translate"),o(),n(17,"td",5),a(18),r(19,"currency"),o()()()()()),t&2){let e=_();i(2),m(c(3,5,"labels.heading.Other Details")),i(6),m(c(9,7,"labels.inputs.Principal Amount")),i(3),u(" ",at(12,9,e.fixedDepositsAccountData.depositAmount,e.currency.code,"symbol-narrow","1.2-2")," "),i(4),m(c(16,14,"labels.inputs.Maturity Amount")),i(3),u(" ",at(19,16,e.fixedDepositsAccountData.maturityAmount,e.currency.code,"symbol-narrow","1.2-2")," ")}}var Ai=(()=>{class t{constructor(){this.route=x(N),this.router=x(W),this.route.parent.data.subscribe(e=>{this.fixedDepositsAccountData=e.fixedDepositsAccountData,this.currency=this.fixedDepositsAccountData.currency}),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center")}static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275cmp=O({type:t,selectors:[["mifosx-general-tab"]],decls:91,vars:77,consts:[[1,"fixed-deposits-account-tables","layout-row","gap-2percent"],[1,"flex-49","layout-column","gap-4percent"],[1,"table-headers"],[1,"flex-49"],["completed","true",3,"externalId"],[1,"r-amount"]],template:function(l,p){l&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h4",2),a(4),r(5,"translate"),o(),n(6,"table")(7,"tbody")(8,"tr")(9,"td"),a(10),r(11,"translate"),o(),n(12,"td"),h(13,Qs,2,2,"span"),h(14,Ys,3,3,"span"),o()(),n(15,"tr")(16,"td"),a(17),r(18,"translate"),o(),n(19,"td"),a(20),r(21,"dateFormat"),r(22,"translate"),o()(),h(23,Js,7,6,"tr"),n(24,"tr")(25,"td"),a(26),r(27,"translate"),o(),n(28,"td"),a(29),r(30,"translateKey"),o()(),n(31,"tr")(32,"td"),a(33),r(34,"translate"),o(),n(35,"td"),a(36),r(37,"dateFormat"),o()(),n(38,"tr")(39,"td"),a(40),r(41,"translate"),o(),n(42,"td"),a(43),r(44,"translateKey"),o()(),h(45,Xs,6,4,"tr"),h(46,Zs,7,7,"tr"),o()()(),n(47,"div")(48,"h4",2),a(49),r(50,"translate"),o(),n(51,"table")(52,"tbody")(53,"tr")(54,"td"),a(55),r(56,"translate"),o(),n(57,"td"),a(58),o()(),n(59,"tr")(60,"td"),a(61),r(62,"translate"),o(),n(63,"td"),a(64),r(65,"translateKey"),o()(),n(66,"tr")(67,"td"),a(68),r(69,"translate"),o(),n(70,"td"),a(71),r(72,"translateKey"),o()(),n(73,"tr")(74,"td"),a(75),r(76,"translate"),o(),n(77,"td"),a(78),r(79,"translateKey"),o()(),n(80,"tr")(81,"td"),a(82),r(83,"translate"),o(),n(84,"td"),a(85),r(86,"translateKey"),o()(),h(87,tl,7,8,"tr"),o()()()(),n(88,"div",3),h(89,ol,23,24,"div")(90,al,20,21,"div"),o()()),l&2&&(i(4),m(c(5,29,"labels.heading.Fixed Deposit Details")),i(6),m(c(11,31,"labels.inputs.External Id")),i(3),v(p.fixedDepositsAccountData.externalId?13:-1),i(),v(p.fixedDepositsAccountData.externalId?-1:14),i(3),m(c(18,33,"labels.inputs.Activated On")),i(3),u(" ",p.fixedDepositsAccountData.timeline.activatedOnDate?c(21,35,p.fixedDepositsAccountData.timeline.activatedOnDate):c(22,37,"labels.text.Not Activated")," "),i(3),v(p.fixedDepositsAccountData.timeline.closedOnDate?23:-1),i(3),m(c(27,39,"labels.inputs.Field Officer")),i(3),u(" ",p.fixedDepositsAccountData.fieldOfficerName?p.fixedDepositsAccountData.fieldOfficerName:E(30,41,"Unassigned","inputs")," "),i(4),m(c(34,44,"labels.inputs.Maturity Date")),i(3),u(" ",p.fixedDepositsAccountData.maturityDate?c(37,46,p.fixedDepositsAccountData.maturityDate):"N/A"," "),i(4),m(c(41,48,"labels.inputs.Deposit Period")),i(3),T(" ",p.fixedDepositsAccountData.depositPeriod,"\xA0",E(44,50,p.fixedDepositsAccountData.depositPeriodFrequency.value,"catalogs")," "),i(2),v(p.fixedDepositsAccountData.withHoldTax?45:-1),i(),v(p.fixedDepositsAccountData.onAccountClosure?46:-1),i(3),m(c(50,53,"labels.heading.Interest Details")),i(6),m(c(56,55,"labels.inputs.Interest Rate")),i(3),u("",p.fixedDepositsAccountData.nominalAnnualInterestRate," %"),i(3),m(c(62,57,"labels.inputs.Interest Compounding Period")),i(3),m(E(65,59,p.fixedDepositsAccountData.interestCompoundingPeriodType.value,"catalogs")),i(4),m(c(69,62,"labels.inputs.Interest Posting Period")),i(3),m(E(72,64,p.fixedDepositsAccountData.interestPostingPeriodType.value,"catalogs")),i(4),m(c(76,67,"labels.inputs.Interest Calculated Using")),i(3),m(E(79,69,p.fixedDepositsAccountData.interestCalculationType.value,"catalogs")),i(4),m(c(83,72,"labels.inputs.No. of Days in Year")),i(3),m(E(86,74,p.fixedDepositsAccountData.interestCalculationDaysInYearType.value,"catalogs")),i(2),v(p.fixedDepositsAccountData.preClosurePenalApplicable?87:-1),i(2),v(!p.fixedDepositsAccountData.status.rejected&&!p.fixedDepositsAccountData.status.submittedAndPendingApproval?89:90))},dependencies:[y,I,Ji,se,yt,w,It],styles:[".fixed-deposits-account-tables[_ngcontent-%COMP%]{padding:1%}"]})}}return t})();var rl=[{path:"",data:{title:"All Fixed Deposits",breadcrumb:"Fixed Deposits",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Fixed Deposit Account",breadcrumb:"Create Fixed Deposit Account"},component:Mi,resolve:{fixedDepositsAccountTemplate:Bi}},{path:":fixedDepositAccountId",data:{title:"Fixed Deposit Account View",routeParamBreadcrumb:"fixedDepositAccountId"},resolve:{fixedDepositsAccountData:Si},children:[{path:"",component:ai,resolve:{fixedDepositsAccountData:Si,savingsDatatables:Ii},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:Ai,data:{title:"Fixed Deposit Account Details",breadcrumb:"General",routeParamBreadcrumb:!1}},{path:"interest-rate-chart",component:ri,data:{title:"Fixed Deposit Account Interest Rate Chart",breadcrumb:"Interest Rate Chart",routeParamBreadcrumb:!1}},{path:"transactions",component:pi,data:{title:"Fixed Deposit Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1}},{path:"charges",component:li,data:{title:"Fixed Deposit Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1}},{path:"standing-instructions",component:mi,data:{title:"Fixed Deposit Account Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"datatables",children:[{path:":datatableName",component:di,data:{title:"View Data Table",routeParamBreadcrumb:"datatableName"},resolve:{savingsDatatable:yi}}]}]},{path:"edit",data:{title:"Edit Fixed Deposit Account",breadcrumb:"Edit",routeParamBreadcrumb:!1},component:Ti,resolve:{fixedDepositsAccountAndTemplate:ki}},{path:"transactions",data:{title:"Fixed Deposits Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../transactions",pathMatch:"prefix"},{path:"account-transfers",loadChildren:()=>import("./account-transfers.module-O4CHVKRL.js").then(t=>t.AccountTransfersModule)},{path:":id",data:{routeParamBreadcrumb:"id"},children:[{path:"",component:Pi,resolve:{fixedDepositsAccountTransaction:wi}}]}]},{path:"actions/:name",data:{title:"Fixed Deposits Account Actions",routeParamBreadcrumb:"name"},component:bi,resolve:{fixedDepositsAccountActionData:Ei}}]}]}],ln=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({providers:[Si,yi,Ii,wi,Ei,Bi,ki],imports:[Oi.forChild(rl),Oi]})}}return t})();var Qx=(()=>{class t{static{this.\u0275fac=function(l){return new(l||t)}}static{this.\u0275mod=Le({type:t})}static{this.\u0275inj=He({imports:[pn,en,nn,ln,ai,pi,li,mi,ri,di,bi,ui,fi,ni,ii,ze,gi,xi,Ci,Pi,ci,si,_i,hi,vi,Mi,ge,xe,_e,Ce,Ve,qe,Ti,Ai,Di]})}}return t})();export{Qx as FixedDepositsModule}; diff --git a/browser/index.html b/browser/index.html index d19e0abe6..34a7c8d4c 100644 --- a/browser/index.html +++ b/browser/index.html @@ -109,5 +109,5 @@
- + diff --git a/browser/loans.module-ONPRIXEC.js b/browser/loans.module-EJII47NQ.js similarity index 99% rename from browser/loans.module-ONPRIXEC.js rename to browser/loans.module-EJII47NQ.js index 0d17f8261..468d72278 100644 --- a/browser/loans.module-ONPRIXEC.js +++ b/browser/loans.module-EJII47NQ.js @@ -1,4 +1,4 @@ -import{a as P1}from"./chunk-T44Z3XQ3.js";import{a as i1,b as Lp,c as D1,d as Fp,e as Gr,f as Wr,g as Np,h as Rp}from"./chunk-NJEDRF32.js";import{a as kp,b as fd,c as T1,d as A1}from"./chunk-PZ5W5NMJ.js";import{a as _i}from"./chunk-FK6H3RFT.js";import{a as w1}from"./chunk-Z3NF3G2N.js";import{$ as hp,$a as tc,$c as Le,$d as un,$f as u1,Aa as ee,Ac as Vo,Ad as bp,Ae as $o,Af as Pn,Ba as te,Bc as Uo,Bg as b1,C as qf,Cb as _p,Cc as Gn,Cg as v1,Da as X,Db as Sa,Dc as Xl,Dd as _e,Df as Li,Ea as Q,Eb as wt,Ec as Ur,Ed as Ue,Fc as Ho,G as Qe,Ga as Ct,Gc as Go,Gg as x1,H as up,Hd as Je,Ia as it,Id as Ce,If as s1,Ig as y1,Ja as T,Jd as Wn,Je as r1,Jf as c1,K as A,Kc as Qi,Kd as Ae,Ke as l1,Kf as p1,L as lt,Lc as Tt,Ld as In,M as st,Mc as Kf,Na as ri,Nc as Zf,Nd as En,Oa as li,Pa as si,Pc as Ql,Pd as Oi,Pg as Ep,Qa as Et,Qd as tn,Qg as Bi,R as fp,Ra as Vf,Rd as en,Rg as S1,Sc as me,Sd as nn,T as Vr,Tc as oe,Td as Da,Ua as c,Ud as gn,Va as C,Vb as Jl,Vc as Jf,Wa as b,Wd as wa,We as Do,Xa as $t,Xd as Me,Y as zf,Ya as dd,Yc as we,Yf as m1,Za as Zl,Zc as Wt,Zf as d1,_ as md,_a as Qs,_c as he,_f as Va,ab as ec,b as Ef,bb as ce,be as a1,c as Lf,ca as o,cb as Uf,cd as pe,ce as gi,cg as f1,da as Kl,dd as Xf,de as la,df as za,dg as Op,e as kf,eb as Ut,ed as Ne,ee as o1,ef as wo,eg as fn,fb as ka,fd as Mi,ff as wp,fg as Ip,gc as It,gd as Wo,ge as vp,gg as Hr,ha as jf,hb as p,hc as $f,hd as ke,hf as ts,hg as h1,i as pd,ib as m,if as es,ig as as,j as Ff,ja as Dt,jb as Ee,jc as le,jf as ns,k as Nf,ka as gp,kb as Hf,kc as ae,kd as Fe,ke as xp,kf as is,kg as At,lb as Ye,lc as Yf,ld as Qf,le as yp,lf as mo,mc as ud,md as t1,me as Sp,mf as ja,mg as g1,n as Rf,na as F,nd as je,nf as _n,of as Cn,pa as ra,pc as qa,pf as bn,qb as pa,qc as Gt,qf as Pp,ra as M,rd as Pe,re as Dp,rf as vn,s as Bf,sa as O,sb as Gf,sd as e1,sf as xn,ta as xe,td as Pt,tf as Tp,tg as _1,ua as de,ud as ge,uf as yn,va as ue,vd as Cp,ve as ma,vf as Sn,vg as C1,wa as x,wd as n1,wf as Ap,xa as s,xb as Wf,xd as Te,xf as Dn,xg as sa,ya as l,yf as wn,yg as Pi,za as P,zd as Ve,zf as Mp,zg as nc}from"./chunk-HZWIHY3V.js";import{a as ie,b as Se,d as If}from"./chunk-PHUH23IY.js";var Bp=class{constructor(n,e){this.setOptions(n,e),this.setButtons(n)}get singleButtons(){return this.buttonsArray}get options(){return this.optionArray}get optionsPayment(){return this.optionPaymentArray}setButtons(n){switch(n){case"Active":this.buttonsArray=[{name:"Add Loan Charge",icon:"plus",taskPermissionName:"CREATE_LOANCHARGE"},{name:"Foreclosure",icon:"heart-broken",taskPermissionName:"FORECLOSURE_LOAN"},{name:"Make Repayment",icon:"coins",taskPermissionName:"REPAYMENT_LOAN"},{name:"Undo Disbursal",icon:"undo",taskPermissionName:"DISBURSALUNDO_LOAN"}];break;case"Submitted and pending approval":this.buttonsArray=[{name:"Add Loan Charge",icon:"plus",taskPermissionName:"CREATE_LOANCHARGE"},{name:"Approve",icon:"check",taskPermissionName:"APPROVE_LOAN"},{name:"Modify Application",icon:"edit",taskPermissionName:"UPDATE_LOAN"},{name:"Reject",icon:"times",taskPermissionName:"REJECT_LOAN"}];break;case"Approved":this.buttonsArray=[{name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"},{name:"Disburse to Savings",icon:"piggy-bank",taskPermissionName:"DISBURSETOSAVINGS_LOAN"},{name:"Undo Approval",icon:"undo",taskPermissionName:"APPROVALUNDO_LOAN"}];break;case"Overpaid":this.buttonsArray=[{name:"Add Loan Charge",icon:"plus",taskPermissionName:"CREATE_LOANCHARGE"},{name:"Transfer Funds",icon:"exchange",taskPermissionName:"CREATE_ACCOUNTTRANSFER"},{name:"Credit Balance Refund",icon:"coins",taskPermissionName:"CREATE_CREDIT_BALANCE_REFUND"}];break;case"Closed (written off)":this.buttonsArray=[{name:"Recovery Payment",icon:"briefcase",taskPermissionName:"RECOVERYPAYMENT_LOAN"},{name:"Undo Write-off",icon:"undo",taskPermissionName:"UNDOWRITEOFF_LOAN"}];break;case"Closed (obligations met)":this.buttonsArray=[{name:"Goodwill Credit",icon:"coins",taskPermissionName:"CREATE_GOODWILL_TRANSACTION"},{name:"Interest Payment Waiver",icon:"coins",taskPermissionName:"CREATE_INTERESTPAYMENTWAIVER_TRANSACTION"},{name:"Payout Refund",icon:"coins",taskPermissionName:"CREATE_PAYOUT_REFUND"},{name:"Merchant Issued Refund",icon:"coins",taskPermissionName:"CREATE_MERCHANT_ISSUED_REFUND"}];break;default:this.buttonsArray=[]}}setOptions(n,e){switch(n){case"Active":this.optionArray=[{name:"Waive Interest",taskPermissionName:"WAIVEINTERESTPORTION_LOAN"},{name:"Reschedule",taskPermissionName:"CREATE_RESCHEDULELOAN"},{name:"Write Off",taskPermissionName:"WRITEOFF_LOAN"},{name:"Close (as Rescheduled)",taskPermissionName:"CLOSEASRESCHEDULED_LOAN"},{name:"Close",taskPermissionName:"CLOSE_LOAN"},{name:"Loan Screen Report",taskPermissionName:"READ_LOAN"},{name:"View Guarantors",taskPermissionName:"READ_GUARANTOR"},{name:"Create Guarantor",taskPermissionName:"CREATE_GUARANTOR"},{name:"Recover From Guarantor",taskPermissionName:"RECOVERGUARANTEES_LOAN"},{name:"Sell Loan",taskPermissionName:"SALE_LOAN"}],this.isContractTermination(e)||this.optionArray.push({name:"Contract Termination",taskPermissionName:"CONTRACT_TERMINATION_LOAN"}),this.optionPaymentArray=[{name:"Goodwill Credit",taskPermissionName:"CREATE_GOODWILL_TRANSACTION"},{name:"Interest Payment Waiver",taskPermissionName:"CREATE_INTERESTPAYMENTWAIVER_TRANSACTION"},{name:"Payout Refund",taskPermissionName:"CREATE_PAYOUT_REFUND"},{name:"Merchant Issued Refund",taskPermissionName:"CREATE_MERCHANT_ISSUED_REFUND"}];break;case"Submitted and pending approval":this.optionArray=[{name:"Withdrawn by Client",taskPermissionName:"WITHDRAW_LOAN"},{name:"Delete",taskPermissionName:"DELETE_LOAN"},{name:"Add Collateral",taskPermissionName:"CREATE_COLLATERAL"},{name:"View Guarantors",taskPermissionName:"READ_GUARANTOR"},{name:"Create Guarantor",taskPermissionName:"CREATE_GUARANTOR"},{name:"Loan Screen Reports",taskPermissionName:"READ_LOAN"}],this.optionPaymentArray=[];break;case"Approved":this.optionArray=[{name:"Add Loan Charge",taskPermissionName:"CREATE_LOANCHARGE"},{name:"View Guarantors",taskPermissionName:"READ_GUARANTOR"},{name:"Create Guarantor",taskPermissionName:"CREATE_GUARANTOR"},{name:"Loan Screen Report",taskPermissionName:"READ_LOAN"}],this.optionPaymentArray=[];break;default:this.optionArray=[],this.optionPaymentArray=[]}}addOption(n){this.optionArray.push(n)}addButton(n){this.buttonsArray.push(n)}isContractTermination(n){return n==null?!1:n.code==="loanSubStatus.loanSubStatusType.contractTermination"}};var D_=()=>["./general"],w_=()=>["./dashboard"],P_=()=>["./accountdetail"],T_=()=>["./repayment-schedule"],A_=()=>["./originators"],M_=()=>["./loan-documents"],O_=()=>["./original-schedule"],I_=()=>["./transactions"],E_=()=>["./deferred-income"],L_=()=>["./buy-down-fees"],k_=()=>["./delinquencytags"],F_=()=>["./loan-collateral"],N_=()=>["./loan-tranche-details"],R_=()=>["./term-variations"],B_=()=>["./overdue-charges"],q_=()=>["./floating-interest-rates"],z_=()=>["./charges"],j_=()=>["./loan-reschedules"],V_=()=>["./notes"],U_=()=>["./standing-instruction"],H_=()=>["./external-asset-owner"],G_=t=>["./datatables",t];function W_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td")(5,"span",50),P(6,"i",51),l(),c(7),l()()),t&2){let e=T(2);o(2),b("",m(3,3,"labels.inputs.Delinquency Classification")," :"),o(4),x("ngClass",e.loanDelinquencyClassificationStyle),o(),b(" ",e.loanDetailsData==null?null:e.loanDetailsData.delinquencyRange.classification," ")}}function $_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Past Due Days")," :"),o(3),C(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.pastDueDays))}}function Y_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Delinquent Days")," :"),o(3),C(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.delinquentDays))}}function K_(t,n){if(t&1&&(s(0,"div")(1,"table",49)(2,"tbody"),M(3,W_,8,5,"tr"),M(4,$_,7,6,"tr"),M(5,Y_,7,6,"tr"),l()()()),t&2){let e=T();o(3),O(e.loanDetailsData.delinquencyRange?3:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.pastDueDays>0?4:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.delinquentDays>0&&e.loanDetailsData.delinquent.pastDueDays!==e.loanDetailsData.delinquent.delinquentDays?5:-1)}}function Z_(t,n){if(t&1&&(s(0,"td",52),c(1),p(2,"currency"),l()),t&2){let e=T(3);o(),b(" ",Ye(2,1,e.loanDetailsData.summary.totalOverdue,e.currency.code,"symbol-narrow","1.2-2")," ")}}function J_(t,n){t&1&&(s(0,"td"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Provided")," "))}function X_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),M(4,Z_,3,6,"td",52),M(5,J_,3,3,"td"),l()),t&2){let e=T(2);o(2),C(m(3,3,"labels.inputs.Arrears By")),o(2),O(e.loanDetailsData.summary.totalOverdue>=0?4:-1),o(),O(e.loanDetailsData.summary.totalOverdue>=0?-1:5)}}function Q_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"dateFormat"),l()()),t&2){let e=T(2);o(2),C(m(3,2,"labels.inputs.Arrears Since")),o(3),C(m(6,4,e.loanDetailsData.summary.overdueSinceDate))}}function tC(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td",52),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),C(m(3,2,"labels.inputs.Overpaid By")),o(3),b(" ",Ye(6,4,e.loanDetailsData.totalOverpaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function eC(t,n){if(t&1&&(s(0,"div",41)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",49)(5,"tbody")(6,"tr")(7,"td"),c(8),p(9,"translate"),l(),s(10,"td",52),c(11),p(12,"currency"),l()(),M(13,X_,6,5,"tr"),M(14,Q_,7,6,"tr"),M(15,tC,7,9,"tr"),l()()()),t&2){let e=T();o(2),C(m(3,6,"labels.heading.Account Overview")),o(6),C(m(9,8,"labels.inputs.Current Balance")),o(3),b(" ",Ye(12,10,e.loanDetailsData.summary.totalOutstanding,e.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(e.loanDisplayArrearsDelinquency<2?13:-1),o(),O(e.loanDetailsData.inArrears?14:-1),o(),O(e.loanDetailsData.totalOverpaid&&e.loanDetailsData.totalOverpaid>0?15:-1)}}function nC(t,n){if(t&1&&(s(0,"button",43)(1,"mat-icon",53),P(2,"fa-icon",54),l()()),t&2){T();let e=Et(35);x("matMenuTriggerFor",e)}}function iC(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.loanAction(a.name))}),s(1,"mat-icon",57),P(2,"fa-icon",58),l(),s(3,"span"),c(4),p(5,"translate"),l()()}if(t&2){let e=T().$implicit;o(2),x("icon",ce(e.icon)),o(2),C(m(5,3,"labels.menus."+e.name))}}function aC(t,n){if(t&1&&F(0,iC,6,5,"button",55),t&2){let e=n.$implicit;x("mifosxHasPermission",e.taskPermissionName)}}function oC(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),b(" ",m(2,1,"labels.menus."+e.name)," ")}}function rC(t,n){if(t&1&&(s(0,"span"),F(1,oC,3,3,"button",55),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function lC(t,n){if(t&1&&(X(0,45),s(1,"button",59),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,8),de(6,rC,2,1,"span",null,xe),l(),Q()),t&2){let e=Et(5),i=T();o(),x("matMenuTriggerFor",e),o(),C(m(3,2,"labels.menus.Payments")),o(4),ue(i.buttonConfig.optionsPayment)}}function sC(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),b(" ",m(2,1,"labels.menus."+e.name)," ")}}function cC(t,n){if(t&1&&(s(0,"span"),F(1,sC,3,3,"button",55),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function pC(t,n){if(t&1&&(X(0,45),s(1,"button",59),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,9),de(6,cC,2,1,"span",null,xe),l(),Q()),t&2){let e=Et(5),i=T();o(),x("matMenuTriggerFor",e),o(),C(m(3,2,"labels.menus.More")),o(4),ue(i.buttonConfig.options)}}function mC(t,n){if(t&1&&(s(0,"a",47,10),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,O_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Original Schedule")," ")}}function dC(t,n){if(t&1&&(s(0,"a",47,11),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,I_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Transactions")," ")}}function uC(t,n){if(t&1&&(s(0,"a",47,12),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,E_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Deferred income")," ")}}function fC(t,n){if(t&1&&(s(0,"a",47,13),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,L_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.heading.Buy Down Fees")," ")}}function hC(t,n){if(t&1&&(s(0,"a",47,14),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,k_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Delinquency Tags")," ")}}function gC(t,n){if(t&1&&(s(0,"a",47,15),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,F_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Loan Collateral Details")," ")}}function _C(t,n){if(t&1&&(s(0,"a",47,16),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,N_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Loan Tranche Details")," ")}}function CC(t,n){if(t&1&&(s(0,"a",47,17),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,R_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Term Variations")," ")}}function bC(t,n){if(t&1&&(s(0,"a",47,18),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,B_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Overdue Charges")," ")}}function vC(t,n){if(t&1&&(s(0,"a",47,19),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,q_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Floating Interest Rates")," ")}}function xC(t,n){if(t&1&&(s(0,"a",47,20),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,z_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Charges")," ")}}function yC(t,n){if(t&1&&(s(0,"a",47,21),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,j_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Loan Reschedules")," ")}}function SC(t,n){if(t&1&&(s(0,"a",47,22),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,V_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Notes")," ")}}function DC(t,n){if(t&1&&(s(0,"a",47,23),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,U_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Standing Instruction")," ")}}function wC(t,n){if(t&1&&(s(0,"a",47,24),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,H_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.External Asset Owner")," ")}}function PC(t,n){if(t&1&&(s(0,"a",47,25),c(2),l()),t&2){let e=Et(1),i=T().$implicit;x("routerLink",ka(3,G_,i.registeredTableName))("active",e.isActive),o(2),b(" ",i.registeredTableName," ")}}function TC(t,n){if(t&1&&F(0,PC,3,5,"a",48),t&2){let e=n.$implicit;x("mifosxHasPermission","READ_"+e.registeredTableName)}}var qp=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansService=A(At),this.translateService=A(Qi),this.dialog=A(Gn),this.disburseTransactionNo=0,this.loanDelinquencyClassificationStyle="",this.loanSubStatus=null,this.loanReAged=!1,this.loanReAmortized=!1;let e=this.loansService;this.route.data.subscribe(i=>{this.loanDetailsData=i.loanDetailsData,this.loanDatatables=i.loanDatatables,this.loanDisplayArrearsDelinquency=i.loanArrearsDelinquencyConfig.value||0,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.currency=this.loanDetailsData.currency,e.saveLoanDisbursementDetailsData(this.loanDetailsData.disbursementDetails),this.loanStatus.active&&this.loanDetailsData.transactions.forEach(a=>{a.manuallyReversed||(a.type.reAge?this.loanReAged=!0:a.type.reAmortize&&(this.loanReAmortized=!0))}),this.setConditionalButtons()}),this.loanId=this.route.snapshot.params.loanId,this.clientId=this.loanDetailsData.clientId}ngOnInit(){this.route.params.subscribe(e=>{this.loanId!=e.loanId&&(this.loanId=e.loanId,this.reload())}),this.recalculateInterest=this.loanDetailsData.recalculateInterest||!0,this.status=this.loanDetailsData.status.value,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.loanStatus.active&&this.loanDetailsData.multiDisburseLoan&&this.loanDetailsData&&this.loanDetailsData.transactions&&this.loanDetailsData.transactions.forEach(e=>{e.type.disbursement&&this.disburseTransactionNo++}),this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center"),this.loanDelinquencyClassification()}setConditionalButtons(){this.buttonConfig=new Bp(this.status,this.loanSubStatus),this.status==="Submitted and pending approval"?(this.buttonConfig.addOption({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.isVariableInstallmentsAllowed&&this.buttonConfig.addOption({name:"Edit Repayment Schedule",icon:"edit",taskPermissionName:"ADJUST_REPAYMENT_SCHEDULE"})):this.status==="Approved"?this.buttonConfig.addButton({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}):this.status==="Active"?(this.loanDetailsData.enableBuyDownFee&&this.buttonConfig.addButton({name:"Buy Down Fee",icon:"plus",taskPermissionName:"BUYDOWNFEE_LOAN"}),this.loanDetailsData.enableIncomeCapitalization&&this.buttonConfig.addButton({name:"Capitalized Income",icon:"coins",taskPermissionName:"CAPITALIZEDINCOME_LOAN"}),(this.loanDetailsData.canDisburse||this.loanDetailsData.multiDisburseLoan)&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.canDisburse&&this.buttonConfig.addButton({name:"Disburse to Savings",icon:"piggy-bank",taskPermissionName:"DISBURSETOSAVINGS_LOAN"}),this.loanDetailsData.multiDisburseLoan&&this.disburseTransactionNo>1&&this.buttonConfig.addButton({name:"Undo Last Disbursal",icon:"undo",taskPermissionName:"DISBURSALLASTUNDO_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Add Interest Pause",icon:"calendar",taskPermissionName:"CREATE_INTEREST_PAUSE"}),this.loanDetailsData.loanOfficerName||this.buttonConfig.addButton({name:"Assign Loan Officer",icon:"user-tie",taskPermissionName:"UPDATELOANOFFICER_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Prepay Loan",icon:"coins",taskPermissionName:"REPAYMENT_LOAN"}),this.loanDetailsData.chargedOff?this.buttonConfig.addButton({name:"Undo Charge-Off",icon:"undo",taskPermissionName:"UNDOCHARGEOFF_LOAN"}):this.buttonConfig.addButton({name:"Charge-Off",icon:"coins",taskPermissionName:"CHARGEOFF_LOAN"}),this.loanReAged?this.buttonConfig.addButton({name:"Undo Re-Age",icon:"undo",taskPermissionName:"UNDO_REAGE_LOAN"}):this.buttonConfig.addButton({name:"Re-Age",icon:"calendar",taskPermissionName:"REAGE_LOAN"}),this.loanReAmortized?this.buttonConfig.addButton({name:"Undo Re-Amortize",icon:"undo",taskPermissionName:"UNDO_REAMORTIZE_LOAN"}):this.buttonConfig.addButton({name:"Re-Amortize",icon:"calendar-alt",taskPermissionName:"REAMORTIZE_LOAN"})):(this.status==="Closed (obligations met)"||this.status==="Overpaid")&&(this.loanDetailsData.multiDisburseLoan&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),Gr.isAdvancedPaymentAllocationStrategy(this.loanDetailsData.transactionProcessingStrategyCode)&&this.buttonConfig.addButton({name:"Reschedule",icon:"calendar",taskPermissionName:"CREATE_RESCHEDULELOAN"}))}loanAction(e){switch(e){case"Recover From Guarantor":this.recoverFromGuarantor();break;case"Delete":this.deleteLoanAccount();break;case"Modify Application":this.router.navigate(["edit-loans-account"],{relativeTo:this.route});break;case"Transfer Funds":let i={loanId:this.loanId,accountType:"fromloans"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:i});break;case"Undo Re-Age":case"Undo Re-Amortize":case"Undo Charge-Off":this.undoLoanAction(e);break;default:let a={relativeTo:this.route,state:{data:this.loanDetailsData}};this.router.navigate(["actions",e],a);break}}recoverFromGuarantor(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Recover from Guarantor"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want recover from Guarantor"),type:"Mild"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.loanActionButtons(this.loanId,"recoverGuarantees").subscribe(()=>{this.reload()})})}loanDelinquencyClassification(){this.loanDelinquencyClassificationStyle="",this.loanDetailsData.delinquent&&this.loanDetailsData.delinquent.delinquencyPausePeriods&&this.loanDetailsData.delinquent.delinquencyPausePeriods.some(e=>{e.active&&(this.loanDelinquencyClassificationStyle="fa fa-stop status-pending")})}undoLoanAction(e){e=e.replace("Undo ",""),this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+" "+this.translateService.instant("labels.menus."+e)}}).afterClosed().subscribe(a=>{if(a.confirm){let r="";switch(e){case"Re-Age":r="undoReAge";break;case"Re-Amortize":r="undoReAmortize";break;case"Charge-Off":r="undo-charge-off";break}this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId),r,{}).subscribe(()=>{this.reload()})}})}iconLoanStatusColor(){return this.loanDetailsData.chargedOff?"loanStatusType.chargeoff":this.isContractTermination(this.loanSubStatus)?"loanSubStatusType.contractTermination":this.loanDetailsData.inArrears?"loanStatusType.activeOverdue":this.loanDetailsData.status.code}loanStatusTooltip(){return this.loanDetailsData.chargedOff?"Chargeoff":this.loanDetailsData.inArrears?"activeOverdue":this.loanDetailsData.status.code}loanSubStatusTooltip(){return this.isContractTermination(this.loanSubStatus)?"contractTermination":""}deleteLoanAccount(){this.dialog.open(la,{data:{deleteContext:`with loan id: ${this.loanId}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoanAccount(this.loanId).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}reload(){let e=this.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}isContractTermination(e){return e==null?!1:e.code==="loanSubStatus.loanSubStatusType.contractTermination"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-view"]],decls:86,vars:83,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["dashboard","routerLinkActive"],["accountdetail","routerLinkActive"],["repaymentSchedule","routerLinkActive"],["originators","routerLinkActive"],["loanDocuments","routerLinkActive"],["tabPanel",""],["Payments","matMenu"],["More","matMenu"],["originalSchedule","routerLinkActive"],["transactions","routerLinkActive"],["deferredIncome","routerLinkActive"],["buyDownFees","routerLinkActive"],["delinquencytags","routerLinkActive"],["loanCollateralDetails","routerLinkActive"],["loanTrancheDetails","routerLinkActive"],["termVariations","routerLinkActive"],["overduecharges","routerLinkActive"],["floatingInterestRates","routerLinkActive"],["charges","routerLinkActive"],["loanReschedules","routerLinkActive"],["notes","routerLinkActive"],["standingInstruction","routerLinkActive"],["externalAssetOwner","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["iconFile","account_placeholder","iconName","LOAN_ACCOUNT","iconWidth","210",3,"iconClass","matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"matTooltip","ngClass"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"loans-overview"],[1,"m-r-10"],[1,"m-l-5"],[1,"loans-overview","mat-typography","flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"loan-span"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[1,"account-overview"],[1,"m-r-3"],[3,"ngClass"],[1,"r-amount"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"]],template:function(i,a){if(i&1&&(s(0,"mat-card",26)(1,"mat-card-header",27)(2,"mat-card-title-group",28)(3,"div",29)(4,"div"),P(5,"mifosx-svg-icon",30),p(6,"translate"),l()(),s(7,"div",31)(8,"mat-card-title")(9,"div",32)(10,"div",33)(11,"h3"),P(12,"i",34),p(13,"translate"),p(14,"statusLookup"),s(15,"span",35),c(16),p(17,"translate"),l(),s(18,"span",35),P(19,"mifosx-long-text",36),l(),P(20,"mifosx-account-number",37),l(),s(21,"span",38)(22,"span",39),c(23),p(24,"translate"),p(25,"translate"),l(),c(26),s(27,"span",40),c(28),l(),P(29,"br"),l(),M(30,K_,6,3,"div"),l(),M(31,eC,16,15,"div",41),s(32,"div",42),M(33,nC,3,1,"button",43),l()()()(),s(34,"mat-menu",null,0),de(36,aC,1,1,"button",44,xe),M(38,lC,8,4,"ng-container",45),M(39,pC,8,4,"ng-container",45),l()()(),s(40,"mat-card-content")(41,"nav",46)(42,"a",47,1),c(44),p(45,"translate"),l(),s(46,"a",47,2),c(48),p(49,"translate"),l(),s(50,"a",47,3),c(52),p(53,"translate"),l(),M(54,mC,4,6,"a",47),s(55,"a",47,4),c(57),p(58,"translate"),l(),M(59,dC,4,6,"a",47),M(60,uC,4,6,"a",47),M(61,fC,4,6,"a",47),M(62,hC,4,6,"a",47),s(63,"a",47,5),c(65),p(66,"translate"),l(),M(67,gC,4,6,"a",47),M(68,_C,4,6,"a",47),M(69,CC,4,6,"a",47),M(70,bC,4,6,"a",47),M(71,vC,4,6,"a",47),M(72,xC,4,6,"a",47),M(73,yC,4,6,"a",47),s(74,"a",47,6),c(76),p(77,"translate"),l(),F(78,SC,4,6,"a",48),M(79,DC,4,6,"a",47),M(80,wC,4,6,"a",47),de(81,TC,1,1,"a",47,xe),l(),s(83,"mat-tab-nav-panel",null,7),P(85,"router-outlet"),l()()()),i&2){let r=Et(43),u=Et(47),d=Et(51),g=Et(56),_=Et(64),y=Et(75),I=Et(84);o(5),x("matTooltip",ce(m(6,53,"tooltips.Loan Account"))),o(7),x("matTooltip",ce(m(13,55,"labels.status."+a.loanDetailsData.status.value)))("ngClass",m(14,57,a.iconLoanStatusColor())),o(4),b("",m(17,59,"labels.heading.Loan Product")," :"),o(3),x("textValue",ce(a.loanDetailsData.loanProductName)),o(),x("accountNo",ce(a.loanDetailsData.accountNo)),o(3),$t("",m(24,61,"labels.text."+a.entityType)," ",m(25,63,"labels.inputs.name")," :"),o(3),b(" ",a.loanDetailsData.clientName||a.loanDetailsData.group.name),o(2),b("(",a.loanDetailsData.clientAccountNo||a.loanDetailsData.group.accountNo,")"),o(2),O(a.loanDisplayArrearsDelinquency!==1?30:-1),o(),O(a.loanDetailsData.summary?31:-1),o(2),O(a.buttonConfig.singleButtons.length>0?33:-1),o(3),ue(a.buttonConfig.singleButtons),o(2),O(a.buttonConfig.optionsPayment.length?38:-1),o(),O(a.buttonConfig.options.length?39:-1),o(2),x("tabPanel",I),o(),x("routerLink",Ut(77,D_))("active",r.isActive),o(2),b(" ",m(45,65,"labels.inputs.General")," "),o(2),x("routerLink",Ut(78,w_))("active",u.isActive),o(2),b(" ",m(49,67,"labels.inputs.Dashboard")," "),o(2),x("routerLink",Ut(79,P_))("active",d.isActive),o(2),b(" ",m(53,69,"labels.inputs.Account Details")," "),o(2),O(a.loanDetailsData.originalSchedule?54:-1),o(),x("routerLink",Ut(80,T_))("active",g.isActive),o(2),b(" ",m(58,71,"labels.inputs.Repayment Schedule")," "),o(2),O(a.loanDetailsData.transactions?59:-1),o(),O(a.loanDetailsData.enableIncomeCapitalization?60:-1),o(),O(a.loanDetailsData.enableBuyDownFee?61:-1),o(),O(a.loanDetailsData.status.active?62:-1),o(),x("routerLink",Ut(81,A_))("active",_.isActive),o(2),b(" ",m(66,73,"labels.inputs.Originators")," "),o(2),O(a.loanDetailsData.collateral?67:-1),o(),O(a.loanDetailsData.multiDisburseLoan?68:-1),o(),O(a.loanDetailsData.loanTermVariations?69:-1),o(),O(a.loanDetailsData.overdueCharges.length>0?70:-1),o(),O(a.loanDetailsData.isLoanProductLinkedToFloatingRate?71:-1),o(),O(a.loanDetailsData.charges?72:-1),o(),O(a.loanDetailsData.status.active||a.loanDetailsData.status.closed||a.loanDetailsData.status.overpaid?73:-1),o(),x("routerLink",Ut(82,M_))("active",y.isActive),o(2),b(" ",m(77,75,"labels.inputs.Loan Documents")," "),o(2),x("mifosxHasPermission","READ_LOANNOTE"),o(),O(a.loanDetailsData.clientId?79:-1),o(),O(a.loanDetailsData.status.active?80:-1),o(),ue(a.loanDatatables)}},dependencies:[wt,pa,Pt,ae,ge,Te,Me,bp,n1,v1,Oi,Cp,Ep,x1,qa,Sp,Dp,un,yp,xp,s1,c1,Yf,p1,$f,Sa,gn,Tt,Ip,fn],styles:[".loans-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:80%;font-weight:400}"]})}}return t})();function AC(t,n){if(t&1&&(s(0,"h3"),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"table")(5,"tbody")(6,"tr")(7,"td",2)(8,"b"),c(9),p(10,"translate"),l()(),s(11,"td",3),c(12),p(13,"formatNumber"),l(),s(14,"td",2)(15,"b"),c(16),p(17,"translate"),l()(),s(18,"td",3),c(19),p(20,"dateFormat"),l()()()()()),t&2){let e=T();o(),C(m(2,5,"labels.heading.Performance History")),o(8),b("",m(10,7,"labels.inputs.Number of Repayments")," :"),o(3),b(" ",m(13,9,e.loanDetails==null?null:e.loanDetails.numberOfRepayments)," "),o(4),b("",m(17,11,"labels.inputs.Maturity Date")," :"),o(3),b(" ",m(20,13,e.loanDetails==null?null:e.loanDetails.timeline.expectedMaturityDate)," ")}}function MC(t,n){t&1&&P(0,"th",21)}function OC(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,"labels.inputs."+e.property))}}function IC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Original")))}function EC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.original,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function LC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Paid")))}function kC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.paid,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function FC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Credit Adjustments")," "))}function NC(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.adjustment,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function RC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Waived")))}function BC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.waived,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function qC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Written Off")))}function zC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.writtenOff,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function jC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Outstanding")))}function VC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.outstanding,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function UC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Over Due")))}function HC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.overdue,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function GC(t,n){t&1&&P(0,"tr",27)}function WC(t,n){t&1&&P(0,"tr",28)}function $C(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,5),F(6,MC,1,0,"th",6)(7,OC,3,3,"td",7),Q(),X(8,8),F(9,IC,3,3,"th",9)(10,EC,3,6,"td",10),Q(),X(11,11),F(12,LC,3,3,"th",9)(13,kC,3,6,"td",12),Q(),X(14,13),F(15,FC,3,3,"th",9)(16,NC,3,6,"td",14),Q(),X(17,15),F(18,RC,3,3,"th",9)(19,BC,3,6,"td",12),Q(),X(20,16),F(21,qC,3,3,"th",9)(22,zC,3,6,"td",12),Q(),X(23,17),F(24,jC,3,3,"th",9)(25,VC,3,6,"td",10),Q(),X(26,18),F(27,UC,3,3,"th",9)(28,HC,3,6,"td",10),Q(),F(29,GC,1,0,"tr",19)(30,WC,1,0,"tr",20),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Loan Summary")),o(2),x("dataSource",e.dataSource),o(25),x("matHeaderRowDef",e.loanSummaryColumns),o(),x("matRowDefColumns",e.loanSummaryColumns)}}function YC(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,"labels.inputs."+e.key))}}function KC(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),b(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function ZC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function JC(t,n){if(t&1&&(M(0,KC,3,3,"span"),M(1,ZC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function XC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(4);o(),b(" ",e.loanDetails.loanPurposeName," ")}}function QC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function tb(t,n){if(t&1&&(M(0,XC,2,1,"span"),M(1,QC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.loanPurposeName?0:-1),o(),O(e.loanDetails.loanPurposeName?-1:1)}}function eb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Unassigned")," "))}function nb(t,n){t&1&&P(0,"span")}function ib(t,n){if(t&1&&(s(0,"span"),c(1),M(2,nb,1,0,"span"),l()),t&2){let e=T(4);o(),b(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function ab(t,n){if(t&1&&(M(0,eb,3,3,"span"),M(1,ib,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function ob(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function rb(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function lb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function sb(t,n){if(t&1&&(M(0,rb,2,2,"span"),M(1,lb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function cb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2).$implicit;o(),C(e.value)}}function pb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Not Available")))}function mb(t,n){if(t&1&&(M(0,cb,2,1,"span"),M(1,pb,3,3,"span")),t&2){let e=T().$implicit;O(e.value?0:-1),o(),O(e.value?-1:1)}}function db(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;b(" ",e.value," ")}}function ub(t,n){if(t&1&&(s(0,"td",22),M(1,JC,2,2),M(2,tb,2,2),M(3,ab,2,2),M(4,ob,2,2,"span"),M(5,sb,2,2),M(6,mb,2,2),M(7,db,1,1),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Purpose"?2:-1),o(),O(e.key==="Loan Officer"?3:-1),o(),O(e.key==="Currency"?4:-1),o(),O(e.key==="External Id"?5:-1),o(),O(e.key==="Write-off Reason"?6:-1),o(),O(e.key==="Proposed Amount"||e.key==="Approved Amount"||e.key==="Disburse Amount"?7:-1)}}function fb(t,n){t&1&&P(0,"tr",28)}function hb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),F(6,YC,3,3,"td",7),Q(),X(7,30),F(8,ub,8,7,"td",7),Q(),F(9,fb,1,0,"tr",20),l()()),t&2){let e=T();o(2),C(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function gb(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,"labels.inputs."+e.key))}}function _b(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),b(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function Cb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function bb(t,n){if(t&1&&(M(0,_b,3,3,"span"),M(1,Cb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function vb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Unassigned")," "))}function xb(t,n){t&1&&P(0,"span")}function yb(t,n){if(t&1&&(s(0,"span"),c(1),M(2,xb,1,0,"span"),l()),t&2){let e=T(4);o(),b(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function Sb(t,n){if(t&1&&(M(0,vb,3,3,"span"),M(1,yb,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function Db(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function wb(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function Pb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function Tb(t,n){if(t&1&&(M(0,wb,2,2,"span"),M(1,Pb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function Ab(t,n){if(t&1&&(s(0,"td",22),M(1,bb,2,2),M(2,Sb,2,2),M(3,Db,2,2,"span"),M(4,Tb,2,2),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Officer"?2:-1),o(),O(e.key==="Currency"?3:-1),o(),O(e.key==="External Id"?4:-1)}}function Mb(t,n){t&1&&P(0,"tr",28)}function Ob(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),F(6,gb,3,3,"td",7),Q(),X(7,30),F(8,Ab,5,4,"td",7),Q(),F(9,Mb,1,0,"tr",20),l()()),t&2){let e=T();o(2),C(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function Ib(t,n){if(t&1&&(s(0,"span",35),c(1),l()),t&2){let e=T(2);o(),b(" ",e.loanDetails.loanPurposeName," ")}}function Eb(t,n){t&1&&(s(0,"span",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Provided")," "))}function Lb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Approved Amount"),":"),o(3),C(Ye(6,4,e.loanDetails.approvedPrincipal,e.currencyCode,"symbol-narrow","1.2-2"))}}function kb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Disburse Amount"),":"),o(3),C(Ye(6,4,e.loanDetails.principal,e.currencyCode,"symbol-narrow","1.2-2"))}}function Fb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Balloon Repayment Amount"),":"),o(3),C(Ye(6,4,e.loanDetails.balloonRepaymentAmount,e.currencyCode,"symbol-narrow","1.2-2"))}}function Nb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",32)(5,"div",33)(6,"div",34)(7,"span",35),c(8),p(9,"translate"),l(),M(10,Ib,2,1,"span",35),M(11,Eb,3,3,"span",35),l(),s(12,"div",34)(13,"span",35),c(14),p(15,"translate"),l(),s(16,"span",35),c(17),p(18,"currency"),l()(),M(19,Lb,7,9,"div",34),M(20,kb,7,9,"div",34),M(21,Fb,7,9,"div",34),s(22,"div",34)(23,"span",35),c(24),p(25,"translate"),l(),s(26,"span",35),c(27),p(28,"translate"),l()()()()()),t&2){let e=T();o(2),C(m(3,11,"labels.heading.Loan Purpose")),o(6),b("",m(9,13,"labels.inputs.Loan Purpose"),":"),o(2),O(e.loanDetails.loanPurposeName?10:-1),o(),O(e.loanDetails.loanPurposeName?-1:11),o(3),b("",m(15,15,"labels.inputs.Proposed Amount"),":"),o(3),C(Ye(18,17,e.loanDetails.proposedPrincipal,e.currencyCode,"symbol-narrow","1.2-2")),o(2),O(e.showApprovedAmountBasedOnStatus()?19:-1),o(),O(e.showDisbursedAmountBasedOnStatus()?20:-1),o(),O(e.loanDetails.balloonRepaymentAmount>0?21:-1),o(3),b("",m(25,22,"labels.inputs.Arrears By"),":"),o(3),C(m(28,24,"labels.inputs.Not Provided"))}}var zp=(()=>{class t{constructor(){this.route=A(It),this.loanSummaryColumns=["Empty","Original","Paid","Waived","Written Off","Outstanding","Over Due"],this.loanDetailsColumns=["Key","Value"],this.showDisbursedAmountBasedOnStatus=function(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected"||this.status==="Approved")},this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData,this.currencyCode=this.loanDetails.currency.code,this.loanDetails.transactions&&this.loanDetails.transactions.some(i=>{if(i.type.code==="loanTransactionType.chargeback"){this.loanSummaryColumns=["Empty","Original","Adjustments","Paid","Waived","Written Off","Outstanding","Over Due"];return}})})}ngOnInit(){this.status=this.loanDetails.value,this.loanDetails.summary?(this.setloanSummaryTableData(),this.setloanDetailsTableData()):this.setloanNonDetailsTableData()}setloanSummaryTableData(){this.loanSummaryTableData=[{property:"Principal",original:this.loanDetails.summary.totalPrincipal,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.principalPaid,waived:this.loanDetails.summary.principalWaived||0,writtenOff:this.loanDetails.summary.principalWrittenOff,outstanding:this.loanDetails.summary.principalOutstanding,overdue:this.loanDetails.summary.principalOverdue},{property:"Interest",original:this.loanDetails.summary.interestCharged,adjustment:0,paid:this.loanDetails.summary.interestPaid,waived:this.loanDetails.summary.interestWaived,writtenOff:this.loanDetails.summary.interestWrittenOff,outstanding:this.loanDetails.summary.interestOutstanding,overdue:this.loanDetails.summary.interestOverdue},{property:"Fees",original:this.loanDetails.summary.feeChargesCharged,adjustment:0,paid:this.loanDetails.summary.feeChargesPaid,waived:this.loanDetails.summary.feeChargesWaived,writtenOff:this.loanDetails.summary.feeChargesWrittenOff,outstanding:this.loanDetails.summary.feeChargesOutstanding,overdue:this.loanDetails.summary.feeChargesOverdue},{property:"Penalties",original:this.loanDetails.summary.penaltyChargesCharged,adjustment:0,paid:this.loanDetails.summary.penaltyChargesPaid,waived:this.loanDetails.summary.penaltyChargesWaived,writtenOff:this.loanDetails.summary.penaltyChargesWrittenOff,outstanding:this.loanDetails.summary.penaltyChargesOutstanding,overdue:this.loanDetails.summary.penaltyChargesOverdue},{property:"Total",original:this.loanDetails.summary.totalExpectedRepayment,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.totalRepayment,waived:this.loanDetails.summary.totalWaived,writtenOff:this.loanDetails.summary.totalWrittenOff,outstanding:this.loanDetails.summary.totalOutstanding,overdue:this.loanDetails.summary.totalOverdue}],this.dataSource=new Li(this.loanSummaryTableData)}setloanDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Loan Purpose"},{key:"Loan Officer"},{key:"Currency"},{key:"External Id"},{key:"Proposed Amount",value:this.loanDetails.proposedPrincipal},{key:"Approved Amount",value:this.loanDetails.approvedPrincipal},{key:"Disburse Amount",value:this.loanDetails.principal}],this.loanDetails.writeOffReason&&this.loanDetailsTableData.push({key:"Write-off Reason",value:this.loanDetails.writeOffReason}),this.detailsDataSource=new Li(this.loanDetailsTableData)}setloanNonDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Currency"},{key:"Loan Officer"},{key:"External Id"}],this.detailsDataSource=new Li(this.loanDetailsTableData)}showApprovedAmountBasedOnStatus(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-general-tab"]],decls:6,vars:5,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","performance-history-container"],[1,"flex-25"],[1,"flex-25","left"],["mat-table","",3,"dataSource"],["matColumnDef","Empty"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Original"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","Paid"],["mat-cell","","class","r-amount amount-minus",4,"matCellDef"],["matColumnDef","Adjustments"],["mat-cell","","class","r-amount amount-plus",4,"matCellDef"],["matColumnDef","Waived"],["matColumnDef","Written Off"],["matColumnDef","Outstanding"],["matColumnDef","Over Due"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-cell","",1,"r-amount","amount-minus"],["mat-cell","",1,"r-amount","amount-plus"],["mat-header-row",""],["mat-row",""],["matColumnDef","Key"],["matColumnDef","Value"],["completed","true",3,"externalId"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"flex-contents"],[1,"flex-50"]],template:function(i,a){i&1&&(s(0,"div",0),M(1,AC,21,15),M(2,$C,31,6,"div"),M(3,hb,10,5,"div"),M(4,Ob,10,5,"div"),M(5,Nb,29,26,"div"),l()),i&2&&(o(),O(a.loanDetails.summary?1:-1),o(),O(a.loanDetails.summary?2:-1),o(),O(a.loanDetails.summary?3:-1),o(),O(a.loanDetails.summary?-1:4),o(),O(a.loanDetails.summary?-1:5))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Va,Sa,gn,Tt,fn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();function Rb(t,n){if(t&1&&(ee(0,"span")(1,"span",4),c(2),p(3,"translate"),te(),c(4),ee(5,"span",4),c(6),p(7,"translateKey"),te()()),t&2){let e=T(2);o(2),C(m(3,3,"labels.commons.on")),o(2),b("",e.loanDetails.repaymentFrequencyNthDayType==null?null:e.loanDetails.repaymentFrequencyNthDayType.value," "),o(2),C(Ee(7,5,e.loanDetails.repaymentFrequencyDayOfWeekType==null?null:e.loanDetails.repaymentFrequencyDayOfWeekType.value,"catalogs"))}}function Bb(t,n){if(t&1&&(ee(0,"span",4),M(1,Rb,8,8,"span"),te()),t&2){let e=T();o(),O(e.loanDetails.repaymentFrequencyDayOfWeekType?1:-1)}}function qb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,3,"labels.inputs.Fixed Length")," "),o(3),$t(" ",e.loanDetails.fixedLength," ",Ee(6,5,e.loanDetails.repaymentFrequencyType.value,"catalogs"))}}function zb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Principal Percentage Per Installment")," "),o(3),b(" ",m(6,4,e.loanDetails.fixedPrincipalPercentagePerInstallment)," %")}}function jb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Income capitalization calculation type")),o(3),b(" ",Ee(6,4,e.loanDetails.capitalizedIncomeCalculationType==null?null:e.loanDetails.capitalizedIncomeCalculationType.value,"catalogs")," ")}}function Vb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Income capitalization strategy")),o(3),b(" ",Ee(6,4,e.loanDetails.capitalizedIncomeStrategy==null?null:e.loanDetails.capitalizedIncomeStrategy.value,"catalogs")," ")}}function Ub(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Income capitalization type")),o(3),b(" ",Ee(6,4,e.loanDetails.capitalizedIncomeType==null?null:e.loanDetails.capitalizedIncomeType.value,"catalogs")," ")}}function Hb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Buy down fee calculation type")),o(3),b(" ",Ee(6,4,e.loanDetails.buyDownFeeCalculationType==null?null:e.loanDetails.buyDownFeeCalculationType.value,"catalogs")," ")}}function Gb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Buy down fee strategy")),o(3),b(" ",Ee(6,4,e.loanDetails.buyDownFeeStrategy==null?null:e.loanDetails.buyDownFeeStrategy.value,"catalogs")," ")}}function Wb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Buy down fee income type")),o(3),b(" ",Ee(6,4,e.loanDetails.buyDownFeeIncomeType==null?null:e.loanDetails.buyDownFeeIncomeType.value,"catalogs")," ")}}function $b(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Merchant Buy down fee")),o(3),b(" ",m(6,4,e.loanDetails.merchantBuyDownFee)," ")}}function Yb(t,n){if(t&1&&(ee(0,"span",3),c(1),te()),t&2){let e=T();o(),b(" ",e.loanDetails.fundName," ")}}function Kb(t,n){t&1&&(ee(0,"span",3),c(1),p(2,"translate"),te()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Unassigned")," "))}function Zb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Fixed EMI amount")),o(3),b(" ",m(6,4,e.loanDetails.fixedEmiAmount)," ")}}function Jb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Is Topup Loan"),"?"),o(3),b(" ",m(6,4,e.loanDetails.isTopup)," ")}}function Xb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3)(5,"a",5),c(6),te()()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Loan closed with Topup")," "),o(4),C(e.loanDetails.closureLoanAccountNo)}}function Qb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Topup closure amount")),o(3),b(" ",m(6,4,e.loanDetails.topupAmount)," ")}}function tv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Interest recalculation compounding on")),o(3),b(" ",Ee(6,4,e.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")," ")}}function ev(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),b(" ",Ee(6,4,e.loanDetails.interestRecalculationData.rescheduleStrategyType.value,"catalogs")," ")}}function nv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Frequency for recalculate Outstanding Principal")),o(3),b(" ",e.loanDetails.interestRecalculationData.calendarData.humanReadable," ")}}function iv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Frequency for compounding")),o(3),b(" ",e.loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable," ")}}function av(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Variable Installments Allowed")),o(3),b(" ",m(6,4,e.loanDetails.isVariableInstallmentsAllowed)," ")}}function ov(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),p(7,"translate"),p(8,"formatNumber"),p(9,"translate"),te()()),t&2){let e=T();o(2),b(" ",m(3,5,"labels.inputs.Gap between Installments")),o(3),Zl(" ",m(6,7,e.loanDetails.minimumGap),"\xA0",m(7,9,"labels.text.Days"),"\xA0, Max:",m(8,11,e.loanDetails.maximumGap),"\xA0",m(9,13,"labels.text.Days")," ")}}function rv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(3),C(m(6,4,e.loanDetails.delinquent.availableDisbursementAmountWithOverApplied))}}var jp=(()=>{class t{constructor(){this.route=A(It),this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-account-details"]],decls:206,vars:191,consts:[[1,"container","p-b-20"],[1,"responsive-column"],[1,"flex-fill","layout-row"],[1,"flex-50"],[1,"m-l-10"],["href","#"]],template:function(i,a){i&1&&(ee(0,"div",0)(1,"h3"),c(2),p(3,"translate"),te(),ee(4,"div",1)(5,"div",2)(6,"span",3),c(7),p(8,"translate"),te(),ee(9,"span",3),c(10),p(11,"translateKey"),te()(),ee(12,"div",2)(13,"span",3),c(14),p(15,"translate"),te(),ee(16,"span",3),c(17),p(18,"translate"),p(19,"translateKey"),M(20,Bb,2,1,"span",4),te()(),M(21,qb,7,8,"div",2),ee(22,"div",2)(23,"span",3),c(24),p(25,"translate"),te(),ee(26,"span",3),c(27),p(28,"translateKey"),te()(),M(29,zb,7,6,"div",2),ee(30,"div",2)(31,"span",3),c(32),p(33,"translate"),te(),ee(34,"span",3),c(35),p(36,"yesNo"),te()(),ee(37,"div",2)(38,"span",3),c(39),p(40,"translate"),te(),ee(41,"span",3),c(42),p(43,"formatNumber"),p(44,"translate"),p(45,"translateKey"),te()(),ee(46,"div",2)(47,"span",3),c(48),p(49,"translate"),te(),ee(50,"span",3),c(51),p(52,"translate"),te()(),ee(53,"div",2)(54,"span",3),c(55),p(56,"translate"),te(),ee(57,"span",3),c(58),p(59,"yesNo"),te()(),ee(60,"div",2)(61,"span",3),c(62),p(63,"translate"),te(),ee(64,"span",3),c(65),p(66,"translateKey"),te()(),ee(67,"div",2)(68,"span",3),c(69),p(70,"translate"),te(),ee(71,"span",3),c(72),p(73,"yesNo"),te()(),M(74,jb,7,7,"div",2),M(75,Vb,7,7,"div",2),M(76,Ub,7,7,"div",2),ee(77,"div",2)(78,"span",3),c(79),p(80,"translate"),te(),ee(81,"span",3),c(82),p(83,"yesNo"),te()(),M(84,Hb,7,7,"div",2),M(85,Gb,7,7,"div",2),M(86,Wb,7,7,"div",2),M(87,$b,7,6,"div",2),ee(88,"div",2)(89,"span",3),c(90),p(91,"translate"),te(),ee(92,"span",3),c(93),te()(),ee(94,"div",2)(95,"span",3),c(96),p(97,"translate"),te(),ee(98,"span",3),c(99),te()(),ee(100,"div",2)(101,"span",3),c(102),p(103,"translate"),te(),ee(104,"span",3),c(105),te()(),ee(106,"div",2)(107,"span",3),c(108),p(109,"translate"),te(),ee(110,"span",3),c(111),p(112,"yesNo"),te()(),ee(113,"div",2)(114,"span",3),c(115),p(116,"translate"),te(),M(117,Yb,2,1,"span",3),M(118,Kb,3,3,"span",3),te(),ee(119,"div",2)(120,"span",3),c(121),p(122,"translate"),te(),ee(123,"span",3),c(124),te()(),ee(125,"div",2)(126,"span",3),c(127),p(128,"translate"),te(),ee(129,"span",3),c(130),p(131,"translateKey"),te()(),ee(132,"div",2)(133,"span",3),c(134),p(135,"translate"),te(),ee(136,"span",3),c(137),p(138,"yesNo"),te()(),ee(139,"div",2)(140,"span",3),c(141),p(142,"translate"),te(),ee(143,"span",3),c(144),p(145,"yesNo"),te()(),ee(146,"div",2)(147,"span",3),c(148),p(149,"translate"),te(),ee(150,"span",3),c(151),p(152,"dateFormat"),te()(),ee(153,"div",2)(154,"span",3),c(155),p(156,"translate"),te(),ee(157,"span",3),c(158),p(159,"dateFormat"),te()(),ee(160,"div",2)(161,"span",3),c(162),p(163,"translate"),te(),ee(164,"span",3),c(165),p(166,"dateFormat"),te()(),ee(167,"div",2)(168,"span",3),c(169),p(170,"translate"),te(),ee(171,"span",3),c(172),p(173,"dateFormat"),te()(),M(174,Zb,7,6,"div",2),M(175,Jb,7,6,"div",2),M(176,Xb,7,4,"div",2),M(177,Qb,7,6,"div",2),ee(178,"div",2)(179,"span",3),c(180),p(181,"translate"),te(),ee(182,"span",3),c(183),p(184,"yesNo"),te()(),ee(185,"div",2)(186,"span",3),c(187),p(188,"translate"),te(),ee(189,"span",3),c(190),p(191,"translateKey"),te()(),ee(192,"div",2)(193,"span",3),c(194),p(195,"translate"),te(),ee(196,"span",3),c(197),p(198,"translateKey"),te()(),M(199,tv,7,7,"div",2),M(200,ev,7,7,"div",2),M(201,nv,6,4,"div",2),M(202,iv,6,4,"div",2),M(203,av,7,6,"div",2),M(204,ov,10,15,"div",2),M(205,rv,7,6,"div",2),te()()),i&2&&(o(2),C(m(3,81,"labels.heading.Loan Details")),o(5),C(m(8,83,"labels.inputs.Repayment Strategy")),o(3),C(Ee(11,85,a.loanDetails.transactionProcessingStrategyName,"catalogs")),o(4),C(m(15,88,"labels.inputs.Repayments")),o(3),Zl("",a.loanDetails.numberOfRepayments," ",m(18,90,"labels.commons.every")," ",a.loanDetails.repaymentEvery,"\xA0",Ee(19,92,a.loanDetails.repaymentFrequencyType.value,"catalogs")," "),o(3),O((a.loanDetails.repaymentFrequencyType==null?null:a.loanDetails.repaymentFrequencyType.id)===2&&(a.loanDetails.repaymentFrequencyNthDayType==null?null:a.loanDetails.repaymentFrequencyNthDayType.id)!==0&&(a.loanDetails.repaymentFrequencyDayOfWeekType==null?null:a.loanDetails.repaymentFrequencyDayOfWeekType.id)!==0?20:-1),o(),O(a.loanDetails.fixedLength?21:-1),o(3),b(" ",m(25,95,"labels.inputs.Amortization")," "),o(3),b(" ",Ee(28,97,a.loanDetails.amortizationType.value,"catalogs")," "),o(2),O(a.loanDetails.fixedPrincipalPercentagePerInstallment?29:-1),o(3),b(" ",m(33,100,"labels.inputs.Equal Amortization")," "),o(3),b(" ",m(36,102,a.loanDetails.isEqualAmortization)," "),o(4),b(" ",m(40,104,"labels.inputs.Interest")," "),o(3),Zl(" ",m(43,106,a.loanDetails.annualInterestRate)," % ",m(44,108,"labels.text.per annum")," (",a.loanDetails.interestRatePerPeriod," %\xA0 ",Ee(45,110,a.loanDetails.interestRateFrequencyType.value,"catalogs"),") "),o(6),b(" ",m(49,113,"labels.inputs.Interest Type")," "),o(3),b(" ",m(52,115,"labels.text."+a.loanDetails.interestType.value)," "),o(4),b("",m(56,117,"labels.inputs.Enable Down Payments"),":"),o(3),C(m(59,119,a.loanDetails.enableDownPayment)),o(4),b("",m(63,121,"labels.inputs.Loan Charge-off behaviour"),":"),o(3),C(Ee(66,123,a.loanDetails.chargeOffBehaviour.value,"catalogs")),o(4),b(" ",m(70,126,"labels.inputs.Enable income capitalization")),o(3),b(" ",m(73,128,a.loanDetails.enableIncomeCapitalization)," "),o(2),O(a.loanDetails.enableIncomeCapitalization?74:-1),o(),O(a.loanDetails.enableIncomeCapitalization?75:-1),o(),O(a.loanDetails.enableIncomeCapitalization?76:-1),o(3),b(" ",m(80,130,"labels.inputs.Enable Buy down fee")),o(3),b(" ",m(83,132,a.loanDetails.enableBuyDownFee)," "),o(2),O(a.loanDetails.enableBuyDownFee?84:-1),o(),O(a.loanDetails.enableBuyDownFee?85:-1),o(),O(a.loanDetails.enableBuyDownFee?86:-1),o(),O(a.loanDetails.enableBuyDownFee?87:-1),o(3),b(" ",m(91,134,"labels.inputs.Grace: On Principal Payment")),o(3),b(" ",a.loanDetails.graceOnPrincipalPayment," "),o(3),b(" ",m(97,136,"labels.inputs.Grace: On Interest Payment")),o(3),b(" ",a.loanDetails.graceOnInterestPayment," "),o(3),b(" ",m(103,138,"labels.inputs.Grace on Arrears Ageing")),o(3),b(" ",a.loanDetails.graceOnArrearsAgeing," "),o(3),b(" ",m(109,140,"labels.inputs.Enable installment level Delinquency")," "),o(3),b(" ",m(112,142,a.loanDetails.enableInstallmentLevelDelinquency)," "),o(4),b(" ",m(116,144,"labels.inputs.Fund Source")," "),o(2),O(a.loanDetails.fundName?117:-1),o(),O(a.loanDetails.fundName?-1:118),o(3),b(" ",m(122,146,"labels.inputs.Interest Free Period")),o(3),b(" ",a.loanDetails.graceOnInterestCharged," "),o(3),b(" ",m(128,148,"labels.inputs.Interest Calculation Period")),o(3),b(" ",Ee(131,150,a.loanDetails.interestCalculationPeriodType.value,"catalogs")," "),o(4),b(" ",m(135,153,"labels.inputs.Allow Partial Interest Calculation with same as repayment")),o(3),b(" ",m(138,155,a.loanDetails.allowPartialPeriodInterestCalculation)," "),o(4),b("",m(142,157,"labels.inputs.Is interest recognition on disbursement date?"),":"),o(3),C(m(145,159,a.loanDetails.interestRecognitionOnDisbursementDate)),o(4),b(" ",m(149,161,"labels.inputs.Submitted on")),o(3),b(" ",m(152,163,a.loanDetails.timeline.submittedOnDate)," "),o(4),b(" ",m(156,165,"labels.inputs.Approved on")),o(3),b(" ",m(159,167,a.loanDetails.timeline.approvedOnDate)," "),o(4),b(" ",m(163,169,"labels.inputs.Disbursed on")),o(3),b(" ",m(166,171,a.loanDetails.timeline.actualDisbursementDate)," "),o(4),b(" ",m(170,173,"labels.inputs.Matures on")),o(3),b(" ",m(173,175,a.loanDetails.timeline.expectedMaturityDate)," "),o(2),O(a.loanDetails.canDefineInstallmentAmount?174:-1),o(),O(a.loanDetails.isTopup?175:-1),o(),O(a.loanDetails.isTopup?176:-1),o(),O(a.loanDetails.isTopup?177:-1),o(3),b(" ",m(181,177,"labels.inputs.Recalculate Interest based on new terms")),o(3),b(" ",m(184,179,a.loanDetails.isInterestRecalculationEnabled)," "),o(4),b(" ",m(188,181,"labels.inputs.Days in year")),o(3),b(" ",Ee(191,183,a.loanDetails.daysInYearType.value,"catalogs")," "),o(4),b(" ",m(195,186,"labels.inputs.Days in month")),o(3),b(" ",Ee(198,188,a.loanDetails.daysInMonthType.value,"catalogs")," "),o(2),O(a.loanDetails.isInterestRecalculationEnabled?199:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?200:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?201:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled&&a.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id!==0?202:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?203:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?204:-1),o(),O(a.loanDetails&&a.loanDetails.delinquent&&a.loanDetails.delinquent.availableDisbursementAmountWithOverApplied!==void 0?205:-1))},dependencies:[wt,Pt,gn,Tt,wa,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();var Vp=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.authenticationService=A(Jf);let e=this.authenticationService.getCredentials();this.username=e.username,this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(i=>{this.entityNotes=i.loanNotes})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}addNote(e){this.loansService.createLoanNote(this.entityId,e).subscribe(i=>{this.entityNotes.push({id:i.resourceId,createdByUsername:this.username,createdOn:new Date,note:e.note})})}editNote(e,i,a){this.loansService.editLoanNote(this.entityId,e,i).subscribe(()=>{this.entityNotes[a].note=i.note})}deleteNote(e,i){this.loansService.deleteLoanNote(this.entityId,e).subscribe(()=>{this.entityNotes.splice(i,1)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(i,a){i&1&&P(0,"mifosx-entity-notes-tab",0),i&2&&x("entityId",a.entityId)("entityNotes",a.entityNotes)("callbackAdd",a.addNote)("callbackEdit",a.editNote)("callbackDelete",a.deleteNote)},dependencies:[wt,Pt,g1],encapsulation:2})}}return t})();var Po=Uint8Array,Qa=Uint16Array,bd=Int32Array,vd=new Po([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xd=new Po([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),M1=new Po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),L1=function(t,n){for(var e=new Qa(31),i=0;i<31;++i)e[i]=n+=1<>1|(ci&21845)<<1,br=(br&52428)>>2|(br&13107)<<2,br=(br&61680)>>4|(br&3855)<<4,_d[ci]=((br&65280)>>8|(br&255)<<8)>>1;var br,ci,oc=function(t,n,e){for(var i=t.length,a=0,r=new Qa(n);a>g]=_}else for(d=new Qa(i),a=0;a>15-t[a]);return d},yl=new Po(288);for(ci=0;ci<144;++ci)yl[ci]=8;var ci;for(ci=144;ci<256;++ci)yl[ci]=9;var ci;for(ci=256;ci<280;++ci)yl[ci]=7;var ci;for(ci=280;ci<288;++ci)yl[ci]=8;var ci,Up=new Po(32);for(ci=0;ci<32;++ci)Up[ci]=5;var ci,sv=oc(yl,9,0);var cv=oc(Up,5,0);var N1=function(t){return(t+7)/8|0},pv=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new Po(t.subarray(n,e))};var vr=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8},ic=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8,t[i+2]|=e>>16},hd=function(t,n){for(var e=[],i=0;ik&&(k=r[i].s);var D=new Qa(k+1),U=Cd(e[y-1],D,0);if(U>n){var i=0,H=0,Z=U-n,j=1<n)H+=j-(1<>=Z;H>0;){var dt=r[i].s;D[dt]=0&&H;--i){var nt=r[i].s;D[nt]==n&&(--D[nt],++H)}U=n}return{t:new Po(D),l:U}},Cd=function(t,n,e){return t.s==-1?Math.max(Cd(t.l,n,e+1),Cd(t.r,n,e+1)):n[t.s]=e},I1=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Qa(++n),i=0,a=t[0],r=1,u=function(g){e[i++]=g},d=1;d<=n;++d)if(t[d]==a&&d!=n)++r;else{if(!a&&r>2){for(;r>138;r-=138)u(32754);r>2&&(u(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(u(a),--r;r>6;r-=6)u(8304);r>2&&(u(r-3<<5|8208),r=0)}for(;r--;)u(a);r=1,a=t[d]}return{c:e.subarray(0,i),n}},ac=function(t,n){for(var e=0,i=0;i>8,t[a+2]=t[a]^255,t[a+3]=t[a+1]^255;for(var r=0;r4&&!xt[M1[Y-1]];--Y);var rt=_+5<<3,ot=ac(a,yl)+ac(r,Up)+u,Mt=ac(a,k)+ac(r,H)+u+14+3*Y+ac(zt,xt)+2*zt[16]+3*zt[17]+7*zt[18];if(g>=0&&rt<=ot&&rt<=Mt)return R1(n,y,t.subarray(g,g+_));var Ft,Rt,St,qt;if(vr(n,y,1+(Mt15&&(vr(n,y,J[ht]>>5&127),y+=J[ht]>>12)}}else Ft=sv,Rt=yl,St=cv,qt=Up;for(var ht=0;ht255){var et=ct>>18&31;ic(n,y,Ft[et+257]),y+=Rt[et+257],et>7&&(vr(n,y,ct>>23&31),y+=vd[et]);var ft=ct&31;ic(n,y,St[ft]),y+=qt[ft],ft>3&&(ic(n,y,ct>>5&8191),y+=xd[ft])}else ic(n,y,Ft[ct]),y+=Rt[ct]}return ic(n,y,Ft[256]),y+Rt[256]},mv=new bd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),B1=new Po(0),dv=function(t,n,e,i,a,r){var u=r.z||t.length,d=new Po(i+u+5*(1+Math.ceil(u/7e3))+a),g=d.subarray(i,d.length-a),_=r.l,y=(r.r||0)&7;if(n){y&&(g[0]=r.r>>3);for(var I=mv[n-1],k=I>>13,D=I&8191,U=(1<7e3||xt>24576)&&(Ft>423||!_)){y=E1(t,g,0,nt,Ot,Yt,ht,xt,Y,tt-Y,y),xt=zt=ht=0,Y=tt;for(var Rt=0;Rt<286;++Rt)Ot[Rt]=0;for(var Rt=0;Rt<30;++Rt)Yt[Rt]=0}var St=2,qt=0,se=D,Xt=ot-Mt&32767;if(Ft>2&&rt==dt(tt-Xt))for(var B=Math.min(k,Ft)-1,J=Math.min(32767,tt),et=Math.min(258,Ft);Xt<=J&&--se&&ot!=Mt;){if(t[tt+St]==t[tt+St-Xt]){for(var ct=0;ctSt){if(St=ct,qt=Xt,ct>B)break;for(var ft=Math.min(Xt,ct-2),bt=0,Rt=0;Rtbt&&(bt=Ht,Mt=Lt)}}}ot=Mt,Mt=H[ot],Xt+=ot-Mt&32767}if(qt){nt[xt++]=268435456|gd[St]<<18|O1[qt];var re=gd[St]&31,Ie=O1[qt]&31;ht+=vd[re]+xd[Ie],++Ot[257+re],++Yt[Ie],z=tt+St,++zt}else nt[xt++]=t[tt],++Ot[t[tt]]}}for(tt=Math.max(tt,z);tt=u&&(g[y/8|0]=_,De=u),y=R1(g,y+1,t.subarray(tt,De))}r.i=u}return pv(d,0,i+N1(y)+a)};var q1=function(){var t=1,n=0;return{p:function(e){for(var i=t,a=n,r=e.length|0,u=0;u!=r;){for(var d=Math.min(u+2655,r);u>16),a=(a&65535)+15*(a>>16)}t=i,n=a},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},uv=function(t,n,e,i,a){if(!a&&(a={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),u=new Po(r.length+t.length);u.set(r),u.set(t,r.length),t=u,a.w=r.length}return dv(t,n.level==null?6:n.level,n.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,i,a)};var z1=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var fv=function(t,n){var e=n.level,i=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=i<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var a=q1();a.p(n.dictionary),z1(t,2,a.d())}};function Hp(t,n){n||(n={});var e=q1();e.p(t);var i=uv(t,n,n.dictionary?6:2,4);return fv(i,n),z1(i,i.length-4,e.d()),i}var hv=typeof TextDecoder<"u"&&new TextDecoder,gv=0;try{hv.decode(B1,{stream:!0}),gv=1}catch{}function j1(t){if(Array.isArray(t))return t}function V1(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var i,a,r,u,d=[],g=!0,_=!1;try{if(r=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;g=!1}else for(;!(g=(i=r.call(e)).done)&&(d.push(i.value),d.length!==n);g=!0);}catch(y){_=!0,a=y}finally{try{if(!g&&e.return!=null&&(u=e.return(),Object(u)!==u))return}finally{if(_)throw a}}return d}}function yd(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e["./general"],w_=()=>["./dashboard"],P_=()=>["./accountdetail"],T_=()=>["./repayment-schedule"],A_=()=>["./originators"],M_=()=>["./loan-documents"],O_=()=>["./original-schedule"],I_=()=>["./transactions"],E_=()=>["./deferred-income"],L_=()=>["./buy-down-fees"],k_=()=>["./delinquencytags"],F_=()=>["./loan-collateral"],N_=()=>["./loan-tranche-details"],R_=()=>["./term-variations"],B_=()=>["./overdue-charges"],q_=()=>["./floating-interest-rates"],z_=()=>["./charges"],j_=()=>["./loan-reschedules"],V_=()=>["./notes"],U_=()=>["./standing-instruction"],H_=()=>["./external-asset-owner"],G_=t=>["./datatables",t];function W_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td")(5,"span",50),P(6,"i",51),l(),c(7),l()()),t&2){let e=T(2);o(2),b("",m(3,3,"labels.inputs.Delinquency Classification")," :"),o(4),x("ngClass",e.loanDelinquencyClassificationStyle),o(),b(" ",e.loanDetailsData==null?null:e.loanDetailsData.delinquencyRange.classification," ")}}function $_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Past Due Days")," :"),o(3),C(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.pastDueDays))}}function Y_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"formatNumber"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Delinquent Days")," :"),o(3),C(m(6,4,e.loanDetailsData==null?null:e.loanDetailsData.delinquent.delinquentDays))}}function K_(t,n){if(t&1&&(s(0,"div")(1,"table",49)(2,"tbody"),M(3,W_,8,5,"tr"),M(4,$_,7,6,"tr"),M(5,Y_,7,6,"tr"),l()()()),t&2){let e=T();o(3),O(e.loanDetailsData.delinquencyRange?3:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.pastDueDays>0?4:-1),o(),O(e.loanDetailsData.delinquent&&e.loanDetailsData.delinquent.delinquentDays>0&&e.loanDetailsData.delinquent.pastDueDays!==e.loanDetailsData.delinquent.delinquentDays?5:-1)}}function Z_(t,n){if(t&1&&(s(0,"td",52),c(1),p(2,"currency"),l()),t&2){let e=T(3);o(),b(" ",Ye(2,1,e.loanDetailsData.summary.totalOverdue,e.currency.code,"symbol-narrow","1.2-2")," ")}}function J_(t,n){t&1&&(s(0,"td"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Provided")," "))}function X_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),M(4,Z_,3,6,"td",52),M(5,J_,3,3,"td"),l()),t&2){let e=T(2);o(2),C(m(3,3,"labels.inputs.Arrears By")),o(2),O(e.loanDetailsData.summary.totalOverdue>=0?4:-1),o(),O(e.loanDetailsData.summary.totalOverdue>=0?-1:5)}}function Q_(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td"),c(5),p(6,"dateFormat"),l()()),t&2){let e=T(2);o(2),C(m(3,2,"labels.inputs.Arrears Since")),o(3),C(m(6,4,e.loanDetailsData.summary.overdueSinceDate))}}function tC(t,n){if(t&1&&(s(0,"tr")(1,"td"),c(2),p(3,"translate"),l(),s(4,"td",52),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),C(m(3,2,"labels.inputs.Overpaid By")),o(3),b(" ",Ye(6,4,e.loanDetailsData.totalOverpaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function eC(t,n){if(t&1&&(s(0,"div",41)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",49)(5,"tbody")(6,"tr")(7,"td"),c(8),p(9,"translate"),l(),s(10,"td",52),c(11),p(12,"currency"),l()(),M(13,X_,6,5,"tr"),M(14,Q_,7,6,"tr"),M(15,tC,7,9,"tr"),l()()()),t&2){let e=T();o(2),C(m(3,6,"labels.heading.Account Overview")),o(6),C(m(9,8,"labels.inputs.Current Balance")),o(3),b(" ",Ye(12,10,e.loanDetailsData.summary.totalOutstanding,e.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(e.loanDisplayArrearsDelinquency<2?13:-1),o(),O(e.loanDetailsData.inArrears?14:-1),o(),O(e.loanDetailsData.totalOverpaid&&e.loanDetailsData.totalOverpaid>0?15:-1)}}function nC(t,n){if(t&1&&(s(0,"button",43)(1,"mat-icon",53),P(2,"fa-icon",54),l()()),t&2){T();let e=Et(35);x("matMenuTriggerFor",e)}}function iC(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.loanAction(a.name))}),s(1,"mat-icon",57),P(2,"fa-icon",58),l(),s(3,"span"),c(4),p(5,"translate"),l()()}if(t&2){let e=T().$implicit;o(2),x("icon",ce(e.icon)),o(2),C(m(5,3,"labels.menus."+e.name))}}function aC(t,n){if(t&1&&F(0,iC,6,5,"button",55),t&2){let e=n.$implicit;x("mifosxHasPermission",e.taskPermissionName)}}function oC(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),b(" ",m(2,1,"labels.menus."+e.name)," ")}}function rC(t,n){if(t&1&&(s(0,"span"),F(1,oC,3,3,"button",55),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function lC(t,n){if(t&1&&(X(0,45),s(1,"button",59),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,8),de(6,rC,2,1,"span",null,xe),l(),Q()),t&2){let e=Et(5),i=T();o(),x("matMenuTriggerFor",e),o(),C(m(3,2,"labels.menus.Payments")),o(4),ue(i.buttonConfig.optionsPayment)}}function sC(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.loanAction(a.name))}),c(1),p(2,"translate"),l()}if(t&2){let e=T().$implicit;o(),b(" ",m(2,1,"labels.menus."+e.name)," ")}}function cC(t,n){if(t&1&&(s(0,"span"),F(1,sC,3,3,"button",55),l()),t&2){let e=n.$implicit;o(),x("mifosxHasPermission",e.taskPermissionName)}}function pC(t,n){if(t&1&&(X(0,45),s(1,"button",59),c(2),p(3,"translate"),l(),s(4,"mat-menu",null,9),de(6,cC,2,1,"span",null,xe),l(),Q()),t&2){let e=Et(5),i=T();o(),x("matMenuTriggerFor",e),o(),C(m(3,2,"labels.menus.More")),o(4),ue(i.buttonConfig.options)}}function mC(t,n){if(t&1&&(s(0,"a",47,10),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,O_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Original Schedule")," ")}}function dC(t,n){if(t&1&&(s(0,"a",47,11),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,I_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Transactions")," ")}}function uC(t,n){if(t&1&&(s(0,"a",47,12),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,E_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Deferred income")," ")}}function fC(t,n){if(t&1&&(s(0,"a",47,13),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,L_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.heading.Buy Down Fees")," ")}}function hC(t,n){if(t&1&&(s(0,"a",47,14),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,k_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Delinquency Tags")," ")}}function gC(t,n){if(t&1&&(s(0,"a",47,15),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,F_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Loan Collateral Details")," ")}}function _C(t,n){if(t&1&&(s(0,"a",47,16),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,N_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Loan Tranche Details")," ")}}function CC(t,n){if(t&1&&(s(0,"a",47,17),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,R_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Term Variations")," ")}}function bC(t,n){if(t&1&&(s(0,"a",47,18),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,B_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Overdue Charges")," ")}}function vC(t,n){if(t&1&&(s(0,"a",47,19),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,q_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Floating Interest Rates")," ")}}function xC(t,n){if(t&1&&(s(0,"a",47,20),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,z_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Charges")," ")}}function yC(t,n){if(t&1&&(s(0,"a",47,21),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,j_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Loan Reschedules")," ")}}function SC(t,n){if(t&1&&(s(0,"a",47,22),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,V_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Notes")," ")}}function DC(t,n){if(t&1&&(s(0,"a",47,23),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,U_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.Standing Instruction")," ")}}function wC(t,n){if(t&1&&(s(0,"a",47,24),c(2),p(3,"translate"),l()),t&2){let e=Et(1);x("routerLink",Ut(5,H_))("active",e.isActive),o(2),b(" ",m(3,3,"labels.inputs.External Asset Owner")," ")}}function PC(t,n){if(t&1&&(s(0,"a",47,25),c(2),l()),t&2){let e=Et(1),i=T().$implicit;x("routerLink",ka(3,G_,i.registeredTableName))("active",e.isActive),o(2),b(" ",i.registeredTableName," ")}}function TC(t,n){if(t&1&&F(0,PC,3,5,"a",48),t&2){let e=n.$implicit;x("mifosxHasPermission","READ_"+e.registeredTableName)}}var qp=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansService=A(At),this.translateService=A(Qi),this.dialog=A(Gn),this.disburseTransactionNo=0,this.loanDelinquencyClassificationStyle="",this.loanSubStatus=null,this.loanReAged=!1,this.loanReAmortized=!1;let e=this.loansService;this.route.data.subscribe(i=>{this.loanDetailsData=i.loanDetailsData,this.loanDatatables=i.loanDatatables,this.loanDisplayArrearsDelinquency=i.loanArrearsDelinquencyConfig.value||0,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.currency=this.loanDetailsData.currency,e.saveLoanDisbursementDetailsData(this.loanDetailsData.disbursementDetails),this.loanStatus.active&&this.loanDetailsData.transactions.forEach(a=>{a.manuallyReversed||(a.type.reAge?this.loanReAged=!0:a.type.reAmortize&&(this.loanReAmortized=!0))}),this.setConditionalButtons()}),this.loanId=this.route.snapshot.params.loanId,this.clientId=this.loanDetailsData.clientId}ngOnInit(){this.route.params.subscribe(e=>{this.loanId!=e.loanId&&(this.loanId=e.loanId,this.reload())}),this.recalculateInterest=this.loanDetailsData.recalculateInterest||!0,this.status=this.loanDetailsData.status.value,this.loanStatus=this.loanDetailsData.status,this.loanSubStatus=this.loanDetailsData.subStatus===void 0?null:this.loanDetailsData.subStatus,this.loanStatus.active&&this.loanDetailsData.multiDisburseLoan&&this.loanDetailsData&&this.loanDetailsData.transactions&&this.loanDetailsData.transactions.forEach(e=>{e.type.disbursement&&this.disburseTransactionNo++}),this.setConditionalButtons(),this.router.url.includes("clients")?this.entityType="Client":this.router.url.includes("groups")?this.entityType="Group":this.router.url.includes("centers")&&(this.entityType="Center"),this.loanDelinquencyClassification()}setConditionalButtons(){this.buttonConfig=new Bp(this.status,this.loanSubStatus),this.status==="Submitted and pending approval"?(this.buttonConfig.addOption({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.isVariableInstallmentsAllowed&&this.buttonConfig.addOption({name:"Edit Repayment Schedule",icon:"edit",taskPermissionName:"ADJUST_REPAYMENT_SCHEDULE"})):this.status==="Approved"?this.buttonConfig.addButton({name:this.loanDetailsData.loanOfficerName?"Change Loan Officer":"Assign Loan Officer",icon:"user-tie",taskPermissionName:"DISBURSE_LOAN"}):this.status==="Active"?(this.loanDetailsData.enableBuyDownFee&&this.buttonConfig.addButton({name:"Buy Down Fee",icon:"plus",taskPermissionName:"BUYDOWNFEE_LOAN"}),this.loanDetailsData.enableIncomeCapitalization&&this.buttonConfig.addButton({name:"Capitalized Income",icon:"coins",taskPermissionName:"CAPITALIZEDINCOME_LOAN"}),(this.loanDetailsData.canDisburse||this.loanDetailsData.multiDisburseLoan)&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),this.loanDetailsData.canDisburse&&this.buttonConfig.addButton({name:"Disburse to Savings",icon:"piggy-bank",taskPermissionName:"DISBURSETOSAVINGS_LOAN"}),this.loanDetailsData.multiDisburseLoan&&this.disburseTransactionNo>1&&this.buttonConfig.addButton({name:"Undo Last Disbursal",icon:"undo",taskPermissionName:"DISBURSALLASTUNDO_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Add Interest Pause",icon:"calendar",taskPermissionName:"CREATE_INTEREST_PAUSE"}),this.loanDetailsData.loanOfficerName||this.buttonConfig.addButton({name:"Assign Loan Officer",icon:"user-tie",taskPermissionName:"UPDATELOANOFFICER_LOAN"}),this.recalculateInterest&&this.buttonConfig.addButton({name:"Prepay Loan",icon:"coins",taskPermissionName:"REPAYMENT_LOAN"}),this.loanDetailsData.chargedOff?this.buttonConfig.addButton({name:"Undo Charge-Off",icon:"undo",taskPermissionName:"UNDOCHARGEOFF_LOAN"}):this.buttonConfig.addButton({name:"Charge-Off",icon:"coins",taskPermissionName:"CHARGEOFF_LOAN"}),this.loanReAged?this.buttonConfig.addButton({name:"Undo Re-Age",icon:"undo",taskPermissionName:"UNDO_REAGE_LOAN"}):this.buttonConfig.addButton({name:"Re-Age",icon:"calendar",taskPermissionName:"REAGE_LOAN"}),this.loanReAmortized?this.buttonConfig.addButton({name:"Undo Re-Amortize",icon:"undo",taskPermissionName:"UNDO_REAMORTIZE_LOAN"}):this.buttonConfig.addButton({name:"Re-Amortize",icon:"calendar-alt",taskPermissionName:"REAMORTIZE_LOAN"})):(this.status==="Closed (obligations met)"||this.status==="Overpaid")&&(this.loanDetailsData.multiDisburseLoan&&this.buttonConfig.addButton({name:"Disburse",icon:"hand-holding-usd",taskPermissionName:"DISBURSE_LOAN"}),Gr.isAdvancedPaymentAllocationStrategy(this.loanDetailsData.transactionProcessingStrategyCode)&&this.buttonConfig.addButton({name:"Reschedule",icon:"calendar",taskPermissionName:"CREATE_RESCHEDULELOAN"}))}loanAction(e){switch(e){case"Recover From Guarantor":this.recoverFromGuarantor();break;case"Delete":this.deleteLoanAccount();break;case"Modify Application":this.router.navigate(["edit-loans-account"],{relativeTo:this.route});break;case"Transfer Funds":let i={loanId:this.loanId,accountType:"fromloans"};this.router.navigate(["transfer-funds/make-account-transfer"],{relativeTo:this.route,queryParams:i});break;case"Undo Re-Age":case"Undo Re-Amortize":case"Undo Charge-Off":this.undoLoanAction(e);break;default:let a={relativeTo:this.route,state:{data:this.loanDetailsData}};this.router.navigate(["actions",e],a);break}}recoverFromGuarantor(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Recover from Guarantor"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want recover from Guarantor"),type:"Mild"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.loanActionButtons(this.loanId,"recoverGuarantees").subscribe(()=>{this.reload()})})}loanDelinquencyClassification(){this.loanDelinquencyClassificationStyle="",this.loanDetailsData.delinquent&&this.loanDetailsData.delinquent.delinquencyPausePeriods&&this.loanDetailsData.delinquent.delinquencyPausePeriods.some(e=>{e.active&&(this.loanDelinquencyClassificationStyle="fa fa-stop status-pending")})}undoLoanAction(e){e=e.replace("Undo ",""),this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+" "+this.translateService.instant("labels.menus."+e)}}).afterClosed().subscribe(a=>{if(a.confirm){let r="";switch(e){case"Re-Age":r="undoReAge";break;case"Re-Amortize":r="undoReAmortize";break;case"Charge-Off":r="undo-charge-off";break}this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId),r,{}).subscribe(()=>{this.reload()})}})}iconLoanStatusColor(){return this.loanDetailsData.chargedOff?"loanStatusType.chargeoff":this.isContractTermination(this.loanSubStatus)?"loanSubStatusType.contractTermination":this.loanDetailsData.inArrears?"loanStatusType.activeOverdue":this.loanDetailsData.status.code}loanStatusTooltip(){return this.loanDetailsData.chargedOff?"Chargeoff":this.loanDetailsData.inArrears?"activeOverdue":this.loanDetailsData.status.code}loanSubStatusTooltip(){return this.isContractTermination(this.loanSubStatus)?"contractTermination":""}deleteLoanAccount(){this.dialog.open(la,{data:{deleteContext:`with loan id: ${this.loanId}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoanAccount(this.loanId).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.route})})})}reload(){let e=this.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}isContractTermination(e){return e==null?!1:e.code==="loanSubStatus.loanSubStatusType.contractTermination"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-view"]],decls:86,vars:83,consts:[["accountMenu","matMenu"],["general","routerLinkActive"],["dashboard","routerLinkActive"],["accountdetail","routerLinkActive"],["repaymentSchedule","routerLinkActive"],["originators","routerLinkActive"],["loanDocuments","routerLinkActive"],["tabPanel",""],["Payments","matMenu"],["More","matMenu"],["originalSchedule","routerLinkActive"],["transactions","routerLinkActive"],["deferredIncome","routerLinkActive"],["buyDownFees","routerLinkActive"],["delinquencytags","routerLinkActive"],["loanCollateralDetails","routerLinkActive"],["loanTrancheDetails","routerLinkActive"],["termVariations","routerLinkActive"],["overduecharges","routerLinkActive"],["floatingInterestRates","routerLinkActive"],["charges","routerLinkActive"],["loanReschedules","routerLinkActive"],["notes","routerLinkActive"],["standingInstruction","routerLinkActive"],["externalAssetOwner","routerLinkActive"],["datatable","routerLinkActive"],[1,"account-card"],[1,"header","layout-column"],[1,"header-title-group"],[1,"profile-image-container"],["iconFile","account_placeholder","iconName","LOAN_ACCOUNT","iconWidth","210",3,"iconClass","matTooltip"],[1,"mat-typography","account-card-title"],[1,"layout-row","responsive-column"],[1,"flex-60"],[1,"fa","fa-stop",3,"matTooltip","ngClass"],[1,"m-r-5"],[3,"textValue"],["display","left",3,"accountNo"],[1,"loans-overview"],[1,"m-r-10"],[1,"m-l-5"],[1,"loans-overview","mat-typography","flex-30"],[1,"flex-5"],["mat-icon-button","","aria-label","Loan account actions","yPosition","below",3,"matMenuTriggerFor"],["mat-menu-item",""],[1,"loan-span"],["mat-tab-nav-bar","",1,"navigation-tabs",3,"tabPanel"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active"],["mat-tab-link","","routerLinkActive","",3,"routerLink","active",4,"mifosxHasPermission"],[1,"account-overview"],[1,"m-r-3"],[3,"ngClass"],[1,"r-amount"],["matListIcon","",1,"actions-menu"],["icon","bars","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",3,"click"],["matListIcon",""],["size","sm",3,"icon"],["mat-menu-item","",3,"matMenuTriggerFor"]],template:function(i,a){if(i&1&&(s(0,"mat-card",26)(1,"mat-card-header",27)(2,"mat-card-title-group",28)(3,"div",29)(4,"div"),P(5,"mifosx-svg-icon",30),p(6,"translate"),l()(),s(7,"div",31)(8,"mat-card-title")(9,"div",32)(10,"div",33)(11,"h3"),P(12,"i",34),p(13,"translate"),p(14,"statusLookup"),s(15,"span",35),c(16),p(17,"translate"),l(),s(18,"span",35),P(19,"mifosx-long-text",36),l(),P(20,"mifosx-account-number",37),l(),s(21,"span",38)(22,"span",39),c(23),p(24,"translate"),p(25,"translate"),l(),c(26),s(27,"span",40),c(28),l(),P(29,"br"),l(),M(30,K_,6,3,"div"),l(),M(31,eC,16,15,"div",41),s(32,"div",42),M(33,nC,3,1,"button",43),l()()()(),s(34,"mat-menu",null,0),de(36,aC,1,1,"button",44,xe),M(38,lC,8,4,"ng-container",45),M(39,pC,8,4,"ng-container",45),l()()(),s(40,"mat-card-content")(41,"nav",46)(42,"a",47,1),c(44),p(45,"translate"),l(),s(46,"a",47,2),c(48),p(49,"translate"),l(),s(50,"a",47,3),c(52),p(53,"translate"),l(),M(54,mC,4,6,"a",47),s(55,"a",47,4),c(57),p(58,"translate"),l(),M(59,dC,4,6,"a",47),M(60,uC,4,6,"a",47),M(61,fC,4,6,"a",47),M(62,hC,4,6,"a",47),s(63,"a",47,5),c(65),p(66,"translate"),l(),M(67,gC,4,6,"a",47),M(68,_C,4,6,"a",47),M(69,CC,4,6,"a",47),M(70,bC,4,6,"a",47),M(71,vC,4,6,"a",47),M(72,xC,4,6,"a",47),M(73,yC,4,6,"a",47),s(74,"a",47,6),c(76),p(77,"translate"),l(),F(78,SC,4,6,"a",48),M(79,DC,4,6,"a",47),M(80,wC,4,6,"a",47),de(81,TC,1,1,"a",47,xe),l(),s(83,"mat-tab-nav-panel",null,7),P(85,"router-outlet"),l()()()),i&2){let r=Et(43),u=Et(47),d=Et(51),g=Et(56),_=Et(64),y=Et(75),I=Et(84);o(5),x("matTooltip",ce(m(6,53,"tooltips.Loan Account"))),o(7),x("matTooltip",ce(m(13,55,"labels.status."+a.loanDetailsData.status.value)))("ngClass",m(14,57,a.iconLoanStatusColor())),o(4),b("",m(17,59,"labels.heading.Loan Product")," :"),o(3),x("textValue",ce(a.loanDetailsData.loanProductName)),o(),x("accountNo",ce(a.loanDetailsData.accountNo)),o(3),$t("",m(24,61,"labels.text."+a.entityType)," ",m(25,63,"labels.inputs.name")," :"),o(3),b(" ",a.loanDetailsData.clientName||a.loanDetailsData.group.name),o(2),b("(",a.loanDetailsData.clientAccountNo||a.loanDetailsData.group.accountNo,")"),o(2),O(a.loanDisplayArrearsDelinquency!==1?30:-1),o(),O(a.loanDetailsData.summary?31:-1),o(2),O(a.buttonConfig.singleButtons.length>0?33:-1),o(3),ue(a.buttonConfig.singleButtons),o(2),O(a.buttonConfig.optionsPayment.length?38:-1),o(),O(a.buttonConfig.options.length?39:-1),o(2),x("tabPanel",I),o(),x("routerLink",Ut(77,D_))("active",r.isActive),o(2),b(" ",m(45,65,"labels.inputs.General")," "),o(2),x("routerLink",Ut(78,w_))("active",u.isActive),o(2),b(" ",m(49,67,"labels.inputs.Dashboard")," "),o(2),x("routerLink",Ut(79,P_))("active",d.isActive),o(2),b(" ",m(53,69,"labels.inputs.Account Details")," "),o(2),O(a.loanDetailsData.originalSchedule?54:-1),o(),x("routerLink",Ut(80,T_))("active",g.isActive),o(2),b(" ",m(58,71,"labels.inputs.Repayment Schedule")," "),o(2),O(a.loanDetailsData.transactions?59:-1),o(),O(a.loanDetailsData.enableIncomeCapitalization?60:-1),o(),O(a.loanDetailsData.enableBuyDownFee?61:-1),o(),O(a.loanDetailsData.status.active?62:-1),o(),x("routerLink",Ut(81,A_))("active",_.isActive),o(2),b(" ",m(66,73,"labels.inputs.Originators")," "),o(2),O(a.loanDetailsData.collateral?67:-1),o(),O(a.loanDetailsData.multiDisburseLoan?68:-1),o(),O(a.loanDetailsData.loanTermVariations?69:-1),o(),O(a.loanDetailsData.overdueCharges.length>0?70:-1),o(),O(a.loanDetailsData.isLoanProductLinkedToFloatingRate?71:-1),o(),O(a.loanDetailsData.charges?72:-1),o(),O(a.loanDetailsData.status.active||a.loanDetailsData.status.closed||a.loanDetailsData.status.overpaid?73:-1),o(),x("routerLink",Ut(82,M_))("active",y.isActive),o(2),b(" ",m(77,75,"labels.inputs.Loan Documents")," "),o(2),x("mifosxHasPermission","READ_LOANNOTE"),o(),O(a.loanDetailsData.clientId?79:-1),o(),O(a.loanDetailsData.status.active?80:-1),o(),ue(a.loanDatatables)}},dependencies:[wt,pa,Pt,ae,ge,Te,Me,bp,n1,v1,Oi,Cp,Ep,x1,qa,Sp,Dp,un,yp,xp,s1,c1,Yf,p1,$f,Sa,gn,Tt,Ip,fn],styles:[".loans-overview[_ngcontent-%COMP%]{font-size:14px}.account-overview[_ngcontent-%COMP%]{min-width:80%;font-weight:400}"]})}}return t})();function AC(t,n){if(t&1&&(s(0,"h3"),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"table")(5,"tbody")(6,"tr")(7,"td",2)(8,"b"),c(9),p(10,"translate"),l()(),s(11,"td",3),c(12),p(13,"formatNumber"),l(),s(14,"td",2)(15,"b"),c(16),p(17,"translate"),l()(),s(18,"td",3),c(19),p(20,"dateFormat"),l()()()()()),t&2){let e=T();o(),C(m(2,5,"labels.heading.Performance History")),o(8),b("",m(10,7,"labels.inputs.Number of Repayments")," :"),o(3),b(" ",m(13,9,e.loanDetails==null?null:e.loanDetails.numberOfRepayments)," "),o(4),b("",m(17,11,"labels.inputs.Maturity Date")," :"),o(3),b(" ",m(20,13,e.loanDetails==null?null:e.loanDetails.timeline.expectedMaturityDate)," ")}}function MC(t,n){t&1&&P(0,"th",21)}function OC(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,"labels.inputs."+e.property))}}function IC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Original")))}function EC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.original,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function LC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Paid")))}function kC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.paid,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function FC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Credit Adjustments")," "))}function NC(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.adjustment,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function RC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Waived")))}function BC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.waived,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function qC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Written Off")))}function zC(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.writtenOff,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function jC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Outstanding")))}function VC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.outstanding,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function UC(t,n){t&1&&(s(0,"th",23),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Over Due")))}function HC(t,n){if(t&1&&(s(0,"td",24),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.overdue,i.currencyCode,"symbol-narrow","1.2-2")," ")}}function GC(t,n){t&1&&P(0,"tr",27)}function WC(t,n){t&1&&P(0,"tr",28)}function $C(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,5),F(6,MC,1,0,"th",6)(7,OC,3,3,"td",7),Q(),X(8,8),F(9,IC,3,3,"th",9)(10,EC,3,6,"td",10),Q(),X(11,11),F(12,LC,3,3,"th",9)(13,kC,3,6,"td",12),Q(),X(14,13),F(15,FC,3,3,"th",9)(16,NC,3,6,"td",14),Q(),X(17,15),F(18,RC,3,3,"th",9)(19,BC,3,6,"td",12),Q(),X(20,16),F(21,qC,3,3,"th",9)(22,zC,3,6,"td",12),Q(),X(23,17),F(24,jC,3,3,"th",9)(25,VC,3,6,"td",10),Q(),X(26,18),F(27,UC,3,3,"th",9)(28,HC,3,6,"td",10),Q(),F(29,GC,1,0,"tr",19)(30,WC,1,0,"tr",20),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Loan Summary")),o(2),x("dataSource",e.dataSource),o(25),x("matHeaderRowDef",e.loanSummaryColumns),o(),x("matRowDefColumns",e.loanSummaryColumns)}}function YC(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,"labels.inputs."+e.key))}}function KC(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),b(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function ZC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function JC(t,n){if(t&1&&(M(0,KC,3,3,"span"),M(1,ZC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function XC(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(4);o(),b(" ",e.loanDetails.loanPurposeName," ")}}function QC(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function tb(t,n){if(t&1&&(M(0,XC,2,1,"span"),M(1,QC,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.loanPurposeName?0:-1),o(),O(e.loanDetails.loanPurposeName?-1:1)}}function eb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Unassigned")," "))}function nb(t,n){t&1&&P(0,"span")}function ib(t,n){if(t&1&&(s(0,"span"),c(1),M(2,nb,1,0,"span"),l()),t&2){let e=T(4);o(),b(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function ab(t,n){if(t&1&&(M(0,eb,3,3,"span"),M(1,ib,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function ob(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function rb(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function lb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function sb(t,n){if(t&1&&(M(0,rb,2,2,"span"),M(1,lb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function cb(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2).$implicit;o(),C(e.value)}}function pb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Not Available")))}function mb(t,n){if(t&1&&(M(0,cb,2,1,"span"),M(1,pb,3,3,"span")),t&2){let e=T().$implicit;O(e.value?0:-1),o(),O(e.value?-1:1)}}function db(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;b(" ",e.value," ")}}function ub(t,n){if(t&1&&(s(0,"td",22),M(1,JC,2,2),M(2,tb,2,2),M(3,ab,2,2),M(4,ob,2,2,"span"),M(5,sb,2,2),M(6,mb,2,2),M(7,db,1,1),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Purpose"?2:-1),o(),O(e.key==="Loan Officer"?3:-1),o(),O(e.key==="Currency"?4:-1),o(),O(e.key==="External Id"?5:-1),o(),O(e.key==="Write-off Reason"?6:-1),o(),O(e.key==="Proposed Amount"||e.key==="Approved Amount"||e.key==="Disburse Amount"?7:-1)}}function fb(t,n){t&1&&P(0,"tr",28)}function hb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),F(6,YC,3,3,"td",7),Q(),X(7,30),F(8,ub,8,7,"td",7),Q(),F(9,fb,1,0,"tr",20),l()()),t&2){let e=T();o(2),C(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function gb(t,n){if(t&1&&(s(0,"td",22),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,"labels.inputs."+e.key))}}function _b(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T(4);o(),b(" ",m(2,1,e.loanDetails.timeline.actualDisbursementDate)," ")}}function Cb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function bb(t,n){if(t&1&&(M(0,_b,3,3,"span"),M(1,Cb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.timeline.actualDisbursementDate?0:-1),o(),O(e.loanDetails.timeline.actualDisbursementDate?-1:1)}}function vb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Unassigned")," "))}function xb(t,n){t&1&&P(0,"span")}function yb(t,n){if(t&1&&(s(0,"span"),c(1),M(2,xb,1,0,"span"),l()),t&2){let e=T(4);o(),b(" ",e.loanDetails.loanOfficerName," \xA0 "),o(),O(e.loanDetails.loanOfficerName?2:-1)}}function Sb(t,n){if(t&1&&(M(0,vb,3,3,"span"),M(1,yb,3,2,"span")),t&2){let e=T(3);O(e.loanDetails.loanOfficerName?-1:0),o(),O(e.loanDetails.loanOfficerName?1:-1)}}function Db(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(3);o(),$t(" ",e.loanDetails.currency.name," ",e.loanDetails.currency.code," ")}}function wb(t,n){if(t&1&&(s(0,"span"),P(1,"mifosx-external-identifier",31),l()),t&2){let e=T(4);o(),x("externalId",ce(e.loanDetails.externalId))}}function Pb(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Available")," "))}function Tb(t,n){if(t&1&&(M(0,wb,2,2,"span"),M(1,Pb,3,3,"span")),t&2){let e=T(3);O(e.loanDetails.externalId?0:-1),o(),O(e.loanDetails.externalId?-1:1)}}function Ab(t,n){if(t&1&&(s(0,"td",22),M(1,bb,2,2),M(2,Sb,2,2),M(3,Db,2,2,"span"),M(4,Tb,2,2),l()),t&2){let e=n.$implicit;o(),O(e.key==="Disbursement Date"?1:-1),o(),O(e.key==="Loan Officer"?2:-1),o(),O(e.key==="Currency"?3:-1),o(),O(e.key==="External Id"?4:-1)}}function Mb(t,n){t&1&&P(0,"tr",28)}function Ob(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",4),X(5,29),F(6,gb,3,3,"td",7),Q(),X(7,30),F(8,Ab,5,4,"td",7),Q(),F(9,Mb,1,0,"tr",20),l()()),t&2){let e=T();o(2),C(m(3,3,"labels.heading.Loan Details")),o(2),x("dataSource",e.detailsDataSource),o(5),x("matRowDefColumns",e.loanDetailsColumns)}}function Ib(t,n){if(t&1&&(s(0,"span",35),c(1),l()),t&2){let e=T(2);o(),b(" ",e.loanDetails.loanPurposeName," ")}}function Eb(t,n){t&1&&(s(0,"span",35),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Provided")," "))}function Lb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Approved Amount"),":"),o(3),C(Ye(6,4,e.loanDetails.approvedPrincipal,e.currencyCode,"symbol-narrow","1.2-2"))}}function kb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Disburse Amount"),":"),o(3),C(Ye(6,4,e.loanDetails.principal,e.currencyCode,"symbol-narrow","1.2-2"))}}function Fb(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",35),c(5),p(6,"currency"),l()()),t&2){let e=T(2);o(2),b("",m(3,2,"labels.inputs.Balloon Repayment Amount"),":"),o(3),C(Ye(6,4,e.loanDetails.balloonRepaymentAmount,e.currencyCode,"symbol-narrow","1.2-2"))}}function Nb(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",32)(5,"div",33)(6,"div",34)(7,"span",35),c(8),p(9,"translate"),l(),M(10,Ib,2,1,"span",35),M(11,Eb,3,3,"span",35),l(),s(12,"div",34)(13,"span",35),c(14),p(15,"translate"),l(),s(16,"span",35),c(17),p(18,"currency"),l()(),M(19,Lb,7,9,"div",34),M(20,kb,7,9,"div",34),M(21,Fb,7,9,"div",34),s(22,"div",34)(23,"span",35),c(24),p(25,"translate"),l(),s(26,"span",35),c(27),p(28,"translate"),l()()()()()),t&2){let e=T();o(2),C(m(3,11,"labels.heading.Loan Purpose")),o(6),b("",m(9,13,"labels.inputs.Loan Purpose"),":"),o(2),O(e.loanDetails.loanPurposeName?10:-1),o(),O(e.loanDetails.loanPurposeName?-1:11),o(3),b("",m(15,15,"labels.inputs.Proposed Amount"),":"),o(3),C(Ye(18,17,e.loanDetails.proposedPrincipal,e.currencyCode,"symbol-narrow","1.2-2")),o(2),O(e.showApprovedAmountBasedOnStatus()?19:-1),o(),O(e.showDisbursedAmountBasedOnStatus()?20:-1),o(),O(e.loanDetails.balloonRepaymentAmount>0?21:-1),o(3),b("",m(25,22,"labels.inputs.Arrears By"),":"),o(3),C(m(28,24,"labels.inputs.Not Provided"))}}var zp=(()=>{class t{constructor(){this.route=A(It),this.loanSummaryColumns=["Empty","Original","Paid","Waived","Written Off","Outstanding","Over Due"],this.loanDetailsColumns=["Key","Value"],this.showDisbursedAmountBasedOnStatus=function(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected"||this.status==="Approved")},this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData,this.currencyCode=this.loanDetails.currency.code,this.loanDetails.transactions&&this.loanDetails.transactions.some(i=>{if(i.type.code==="loanTransactionType.chargeback"){this.loanSummaryColumns=["Empty","Original","Adjustments","Paid","Waived","Written Off","Outstanding","Over Due"];return}})})}ngOnInit(){this.status=this.loanDetails.value,this.loanDetails.summary?(this.setloanSummaryTableData(),this.setloanDetailsTableData()):this.setloanNonDetailsTableData()}setloanSummaryTableData(){this.loanSummaryTableData=[{property:"Principal",original:this.loanDetails.summary.totalPrincipal,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.principalPaid,waived:this.loanDetails.summary.principalWaived||0,writtenOff:this.loanDetails.summary.principalWrittenOff,outstanding:this.loanDetails.summary.principalOutstanding,overdue:this.loanDetails.summary.principalOverdue},{property:"Interest",original:this.loanDetails.summary.interestCharged,adjustment:0,paid:this.loanDetails.summary.interestPaid,waived:this.loanDetails.summary.interestWaived,writtenOff:this.loanDetails.summary.interestWrittenOff,outstanding:this.loanDetails.summary.interestOutstanding,overdue:this.loanDetails.summary.interestOverdue},{property:"Fees",original:this.loanDetails.summary.feeChargesCharged,adjustment:0,paid:this.loanDetails.summary.feeChargesPaid,waived:this.loanDetails.summary.feeChargesWaived,writtenOff:this.loanDetails.summary.feeChargesWrittenOff,outstanding:this.loanDetails.summary.feeChargesOutstanding,overdue:this.loanDetails.summary.feeChargesOverdue},{property:"Penalties",original:this.loanDetails.summary.penaltyChargesCharged,adjustment:0,paid:this.loanDetails.summary.penaltyChargesPaid,waived:this.loanDetails.summary.penaltyChargesWaived,writtenOff:this.loanDetails.summary.penaltyChargesWrittenOff,outstanding:this.loanDetails.summary.penaltyChargesOutstanding,overdue:this.loanDetails.summary.penaltyChargesOverdue},{property:"Total",original:this.loanDetails.summary.totalExpectedRepayment,adjustment:this.loanDetails.summary.principalAdjustments||0,paid:this.loanDetails.summary.totalRepayment,waived:this.loanDetails.summary.totalWaived,writtenOff:this.loanDetails.summary.totalWrittenOff,outstanding:this.loanDetails.summary.totalOutstanding,overdue:this.loanDetails.summary.totalOverdue}],this.dataSource=new Li(this.loanSummaryTableData)}setloanDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Loan Purpose"},{key:"Loan Officer"},{key:"Currency"},{key:"External Id"},{key:"Proposed Amount",value:this.loanDetails.proposedPrincipal},{key:"Approved Amount",value:this.loanDetails.approvedPrincipal},{key:"Disburse Amount",value:this.loanDetails.principal}],this.loanDetails.writeOffReason&&this.loanDetailsTableData.push({key:"Write-off Reason",value:this.loanDetails.writeOffReason}),this.detailsDataSource=new Li(this.loanDetailsTableData)}setloanNonDetailsTableData(){this.loanDetailsTableData=[{key:"Disbursement Date"},{key:"Currency"},{key:"Loan Officer"},{key:"External Id"}],this.detailsDataSource=new Li(this.loanDetailsTableData)}showApprovedAmountBasedOnStatus(){return!(this.status==="Submitted and pending approval"||this.status==="Withdrawn by applicant"||this.status==="Rejected")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-general-tab"]],decls:6,vars:5,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","gap-32px","performance-history-container"],[1,"flex-25"],[1,"flex-25","left"],["mat-table","",3,"dataSource"],["matColumnDef","Empty"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Original"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","Paid"],["mat-cell","","class","r-amount amount-minus",4,"matCellDef"],["matColumnDef","Adjustments"],["mat-cell","","class","r-amount amount-plus",4,"matCellDef"],["matColumnDef","Waived"],["matColumnDef","Written Off"],["matColumnDef","Outstanding"],["matColumnDef","Over Due"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-cell","",1,"r-amount","amount-minus"],["mat-cell","",1,"r-amount","amount-plus"],["mat-header-row",""],["mat-row",""],["matColumnDef","Key"],["matColumnDef","Value"],["completed","true",3,"externalId"],[1,"container"],[1,"layout-row-wrap","responsive-column"],[1,"flex-contents"],[1,"flex-50"]],template:function(i,a){i&1&&(s(0,"div",0),M(1,AC,21,15),M(2,$C,31,6,"div"),M(3,hb,10,5,"div"),M(4,Ob,10,5,"div"),M(5,Nb,29,26,"div"),l()),i&2&&(o(),O(a.loanDetails.summary?1:-1),o(),O(a.loanDetails.summary?2:-1),o(),O(a.loanDetails.summary?3:-1),o(),O(a.loanDetails.summary?-1:4),o(),O(a.loanDetails.summary?-1:5))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Va,Sa,gn,Tt,fn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .performance-history-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();function Rb(t,n){if(t&1&&(ee(0,"span")(1,"span",4),c(2),p(3,"translate"),te(),c(4),ee(5,"span",4),c(6),p(7,"translateKey"),te()()),t&2){let e=T(2);o(2),C(m(3,3,"labels.commons.on")),o(2),b("",e.loanDetails.repaymentFrequencyNthDayType==null?null:e.loanDetails.repaymentFrequencyNthDayType.value," "),o(2),C(Ee(7,5,e.loanDetails.repaymentFrequencyDayOfWeekType==null?null:e.loanDetails.repaymentFrequencyDayOfWeekType.value,"catalogs"))}}function Bb(t,n){if(t&1&&(ee(0,"span",4),M(1,Rb,8,8,"span"),te()),t&2){let e=T();o(),O(e.loanDetails.repaymentFrequencyDayOfWeekType?1:-1)}}function qb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,3,"labels.inputs.Fixed Length")," "),o(3),$t(" ",e.loanDetails.fixedLength," ",Ee(6,5,e.loanDetails.repaymentFrequencyType.value,"catalogs"))}}function zb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Principal Percentage Per Installment")," "),o(3),b(" ",m(6,4,e.loanDetails.fixedPrincipalPercentagePerInstallment)," %")}}function jb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Income capitalization calculation type")),o(3),b(" ",Ee(6,4,e.loanDetails.capitalizedIncomeCalculationType==null?null:e.loanDetails.capitalizedIncomeCalculationType.value,"catalogs")," ")}}function Vb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Income capitalization strategy")),o(3),b(" ",Ee(6,4,e.loanDetails.capitalizedIncomeStrategy==null?null:e.loanDetails.capitalizedIncomeStrategy.value,"catalogs")," ")}}function Ub(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Income capitalization type")),o(3),b(" ",Ee(6,4,e.loanDetails.capitalizedIncomeType==null?null:e.loanDetails.capitalizedIncomeType.value,"catalogs")," ")}}function Hb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Buy down fee calculation type")),o(3),b(" ",Ee(6,4,e.loanDetails.buyDownFeeCalculationType==null?null:e.loanDetails.buyDownFeeCalculationType.value,"catalogs")," ")}}function Gb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Buy down fee strategy")),o(3),b(" ",Ee(6,4,e.loanDetails.buyDownFeeStrategy==null?null:e.loanDetails.buyDownFeeStrategy.value,"catalogs")," ")}}function Wb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Buy down fee income type")),o(3),b(" ",Ee(6,4,e.loanDetails.buyDownFeeIncomeType==null?null:e.loanDetails.buyDownFeeIncomeType.value,"catalogs")," ")}}function $b(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Merchant Buy down fee")),o(3),b(" ",m(6,4,e.loanDetails.merchantBuyDownFee)," ")}}function Yb(t,n){if(t&1&&(ee(0,"span",3),c(1),te()),t&2){let e=T();o(),b(" ",e.loanDetails.fundName," ")}}function Kb(t,n){t&1&&(ee(0,"span",3),c(1),p(2,"translate"),te()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Unassigned")," "))}function Zb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Fixed EMI amount")),o(3),b(" ",m(6,4,e.loanDetails.fixedEmiAmount)," ")}}function Jb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Is Topup Loan"),"?"),o(3),b(" ",m(6,4,e.loanDetails.isTopup)," ")}}function Xb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3)(5,"a",5),c(6),te()()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Loan closed with Topup")," "),o(4),C(e.loanDetails.closureLoanAccountNo)}}function Qb(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Topup closure amount")),o(3),b(" ",m(6,4,e.loanDetails.topupAmount)," ")}}function tv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Interest recalculation compounding on")),o(3),b(" ",Ee(6,4,e.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")," ")}}function ev(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"translateKey"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),b(" ",Ee(6,4,e.loanDetails.interestRecalculationData.rescheduleStrategyType.value,"catalogs")," ")}}function nv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Frequency for recalculate Outstanding Principal")),o(3),b(" ",e.loanDetails.interestRecalculationData.calendarData.humanReadable," ")}}function iv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Frequency for compounding")),o(3),b(" ",e.loanDetails.interestRecalculationData.compoundingCalendarData.humanReadable," ")}}function av(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"yesNo"),te()()),t&2){let e=T();o(2),b(" ",m(3,2,"labels.inputs.Variable Installments Allowed")),o(3),b(" ",m(6,4,e.loanDetails.isVariableInstallmentsAllowed)," ")}}function ov(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),p(7,"translate"),p(8,"formatNumber"),p(9,"translate"),te()()),t&2){let e=T();o(2),b(" ",m(3,5,"labels.inputs.Gap between Installments")),o(3),Zl(" ",m(6,7,e.loanDetails.minimumGap),"\xA0",m(7,9,"labels.text.Days"),"\xA0, Max:",m(8,11,e.loanDetails.maximumGap),"\xA0",m(9,13,"labels.text.Days")," ")}}function rv(t,n){if(t&1&&(ee(0,"div",2)(1,"span",3),c(2),p(3,"translate"),te(),ee(4,"span",3),c(5),p(6,"formatNumber"),te()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(3),C(m(6,4,e.loanDetails.delinquent.availableDisbursementAmountWithOverApplied))}}var jp=(()=>{class t{constructor(){this.route=A(It),this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-account-details"]],decls:206,vars:191,consts:[[1,"container","p-b-20"],[1,"responsive-column"],[1,"flex-fill","layout-row"],[1,"flex-50"],[1,"m-l-10"],["href","#"]],template:function(i,a){i&1&&(ee(0,"div",0)(1,"h3"),c(2),p(3,"translate"),te(),ee(4,"div",1)(5,"div",2)(6,"span",3),c(7),p(8,"translate"),te(),ee(9,"span",3),c(10),p(11,"translateKey"),te()(),ee(12,"div",2)(13,"span",3),c(14),p(15,"translate"),te(),ee(16,"span",3),c(17),p(18,"translate"),p(19,"translateKey"),M(20,Bb,2,1,"span",4),te()(),M(21,qb,7,8,"div",2),ee(22,"div",2)(23,"span",3),c(24),p(25,"translate"),te(),ee(26,"span",3),c(27),p(28,"translateKey"),te()(),M(29,zb,7,6,"div",2),ee(30,"div",2)(31,"span",3),c(32),p(33,"translate"),te(),ee(34,"span",3),c(35),p(36,"yesNo"),te()(),ee(37,"div",2)(38,"span",3),c(39),p(40,"translate"),te(),ee(41,"span",3),c(42),p(43,"formatNumber"),p(44,"translate"),p(45,"translateKey"),te()(),ee(46,"div",2)(47,"span",3),c(48),p(49,"translate"),te(),ee(50,"span",3),c(51),p(52,"translate"),te()(),ee(53,"div",2)(54,"span",3),c(55),p(56,"translate"),te(),ee(57,"span",3),c(58),p(59,"yesNo"),te()(),ee(60,"div",2)(61,"span",3),c(62),p(63,"translate"),te(),ee(64,"span",3),c(65),p(66,"translateKey"),te()(),ee(67,"div",2)(68,"span",3),c(69),p(70,"translate"),te(),ee(71,"span",3),c(72),p(73,"yesNo"),te()(),M(74,jb,7,7,"div",2),M(75,Vb,7,7,"div",2),M(76,Ub,7,7,"div",2),ee(77,"div",2)(78,"span",3),c(79),p(80,"translate"),te(),ee(81,"span",3),c(82),p(83,"yesNo"),te()(),M(84,Hb,7,7,"div",2),M(85,Gb,7,7,"div",2),M(86,Wb,7,7,"div",2),M(87,$b,7,6,"div",2),ee(88,"div",2)(89,"span",3),c(90),p(91,"translate"),te(),ee(92,"span",3),c(93),te()(),ee(94,"div",2)(95,"span",3),c(96),p(97,"translate"),te(),ee(98,"span",3),c(99),te()(),ee(100,"div",2)(101,"span",3),c(102),p(103,"translate"),te(),ee(104,"span",3),c(105),te()(),ee(106,"div",2)(107,"span",3),c(108),p(109,"translate"),te(),ee(110,"span",3),c(111),p(112,"yesNo"),te()(),ee(113,"div",2)(114,"span",3),c(115),p(116,"translate"),te(),M(117,Yb,2,1,"span",3),M(118,Kb,3,3,"span",3),te(),ee(119,"div",2)(120,"span",3),c(121),p(122,"translate"),te(),ee(123,"span",3),c(124),te()(),ee(125,"div",2)(126,"span",3),c(127),p(128,"translate"),te(),ee(129,"span",3),c(130),p(131,"translateKey"),te()(),ee(132,"div",2)(133,"span",3),c(134),p(135,"translate"),te(),ee(136,"span",3),c(137),p(138,"yesNo"),te()(),ee(139,"div",2)(140,"span",3),c(141),p(142,"translate"),te(),ee(143,"span",3),c(144),p(145,"yesNo"),te()(),ee(146,"div",2)(147,"span",3),c(148),p(149,"translate"),te(),ee(150,"span",3),c(151),p(152,"dateFormat"),te()(),ee(153,"div",2)(154,"span",3),c(155),p(156,"translate"),te(),ee(157,"span",3),c(158),p(159,"dateFormat"),te()(),ee(160,"div",2)(161,"span",3),c(162),p(163,"translate"),te(),ee(164,"span",3),c(165),p(166,"dateFormat"),te()(),ee(167,"div",2)(168,"span",3),c(169),p(170,"translate"),te(),ee(171,"span",3),c(172),p(173,"dateFormat"),te()(),M(174,Zb,7,6,"div",2),M(175,Jb,7,6,"div",2),M(176,Xb,7,4,"div",2),M(177,Qb,7,6,"div",2),ee(178,"div",2)(179,"span",3),c(180),p(181,"translate"),te(),ee(182,"span",3),c(183),p(184,"yesNo"),te()(),ee(185,"div",2)(186,"span",3),c(187),p(188,"translate"),te(),ee(189,"span",3),c(190),p(191,"translateKey"),te()(),ee(192,"div",2)(193,"span",3),c(194),p(195,"translate"),te(),ee(196,"span",3),c(197),p(198,"translateKey"),te()(),M(199,tv,7,7,"div",2),M(200,ev,7,7,"div",2),M(201,nv,6,4,"div",2),M(202,iv,6,4,"div",2),M(203,av,7,6,"div",2),M(204,ov,10,15,"div",2),M(205,rv,7,6,"div",2),te()()),i&2&&(o(2),C(m(3,81,"labels.heading.Loan Details")),o(5),C(m(8,83,"labels.inputs.Repayment Strategy")),o(3),C(Ee(11,85,a.loanDetails.transactionProcessingStrategyName,"catalogs")),o(4),C(m(15,88,"labels.inputs.Repayments")),o(3),Zl("",a.loanDetails.numberOfRepayments," ",m(18,90,"labels.commons.every")," ",a.loanDetails.repaymentEvery,"\xA0",Ee(19,92,a.loanDetails.repaymentFrequencyType.value,"catalogs")," "),o(3),O((a.loanDetails.repaymentFrequencyType==null?null:a.loanDetails.repaymentFrequencyType.id)===2&&(a.loanDetails.repaymentFrequencyNthDayType==null?null:a.loanDetails.repaymentFrequencyNthDayType.id)!==0&&(a.loanDetails.repaymentFrequencyDayOfWeekType==null?null:a.loanDetails.repaymentFrequencyDayOfWeekType.id)!==0?20:-1),o(),O(a.loanDetails.fixedLength?21:-1),o(3),b(" ",m(25,95,"labels.inputs.Amortization")," "),o(3),b(" ",Ee(28,97,a.loanDetails.amortizationType.value,"catalogs")," "),o(2),O(a.loanDetails.fixedPrincipalPercentagePerInstallment?29:-1),o(3),b(" ",m(33,100,"labels.inputs.Equal Amortization")," "),o(3),b(" ",m(36,102,a.loanDetails.isEqualAmortization)," "),o(4),b(" ",m(40,104,"labels.inputs.Interest")," "),o(3),Zl(" ",m(43,106,a.loanDetails.annualInterestRate)," % ",m(44,108,"labels.text.per annum")," (",a.loanDetails.interestRatePerPeriod," %\xA0 ",Ee(45,110,a.loanDetails.interestRateFrequencyType.value,"catalogs"),") "),o(6),b(" ",m(49,113,"labels.inputs.Interest Type")," "),o(3),b(" ",m(52,115,"labels.text."+a.loanDetails.interestType.value)," "),o(4),b("",m(56,117,"labels.inputs.Enable Down Payments"),":"),o(3),C(m(59,119,a.loanDetails.enableDownPayment)),o(4),b("",m(63,121,"labels.inputs.Loan Charge-off behaviour"),":"),o(3),C(Ee(66,123,a.loanDetails.chargeOffBehaviour.value,"catalogs")),o(4),b(" ",m(70,126,"labels.inputs.Enable income capitalization")),o(3),b(" ",m(73,128,a.loanDetails.enableIncomeCapitalization)," "),o(2),O(a.loanDetails.enableIncomeCapitalization?74:-1),o(),O(a.loanDetails.enableIncomeCapitalization?75:-1),o(),O(a.loanDetails.enableIncomeCapitalization?76:-1),o(3),b(" ",m(80,130,"labels.inputs.Enable Buy down fee")),o(3),b(" ",m(83,132,a.loanDetails.enableBuyDownFee)," "),o(2),O(a.loanDetails.enableBuyDownFee?84:-1),o(),O(a.loanDetails.enableBuyDownFee?85:-1),o(),O(a.loanDetails.enableBuyDownFee?86:-1),o(),O(a.loanDetails.enableBuyDownFee?87:-1),o(3),b(" ",m(91,134,"labels.inputs.Grace: On Principal Payment")),o(3),b(" ",a.loanDetails.graceOnPrincipalPayment," "),o(3),b(" ",m(97,136,"labels.inputs.Grace: On Interest Payment")),o(3),b(" ",a.loanDetails.graceOnInterestPayment," "),o(3),b(" ",m(103,138,"labels.inputs.Grace on Arrears Ageing")),o(3),b(" ",a.loanDetails.graceOnArrearsAgeing," "),o(3),b(" ",m(109,140,"labels.inputs.Enable installment level Delinquency")," "),o(3),b(" ",m(112,142,a.loanDetails.enableInstallmentLevelDelinquency)," "),o(4),b(" ",m(116,144,"labels.inputs.Fund Source")," "),o(2),O(a.loanDetails.fundName?117:-1),o(),O(a.loanDetails.fundName?-1:118),o(3),b(" ",m(122,146,"labels.inputs.Interest Free Period")),o(3),b(" ",a.loanDetails.graceOnInterestCharged," "),o(3),b(" ",m(128,148,"labels.inputs.Interest Calculation Period")),o(3),b(" ",Ee(131,150,a.loanDetails.interestCalculationPeriodType.value,"catalogs")," "),o(4),b(" ",m(135,153,"labels.inputs.Allow Partial Interest Calculation with same as repayment")),o(3),b(" ",m(138,155,a.loanDetails.allowPartialPeriodInterestCalculation)," "),o(4),b("",m(142,157,"labels.inputs.Is interest recognition on disbursement date?"),":"),o(3),C(m(145,159,a.loanDetails.interestRecognitionOnDisbursementDate)),o(4),b(" ",m(149,161,"labels.inputs.Submitted on")),o(3),b(" ",m(152,163,a.loanDetails.timeline.submittedOnDate)," "),o(4),b(" ",m(156,165,"labels.inputs.Approved on")),o(3),b(" ",m(159,167,a.loanDetails.timeline.approvedOnDate)," "),o(4),b(" ",m(163,169,"labels.inputs.Disbursed on")),o(3),b(" ",m(166,171,a.loanDetails.timeline.actualDisbursementDate)," "),o(4),b(" ",m(170,173,"labels.inputs.Matures on")),o(3),b(" ",m(173,175,a.loanDetails.timeline.expectedMaturityDate)," "),o(2),O(a.loanDetails.canDefineInstallmentAmount?174:-1),o(),O(a.loanDetails.isTopup?175:-1),o(),O(a.loanDetails.isTopup?176:-1),o(),O(a.loanDetails.isTopup?177:-1),o(3),b(" ",m(181,177,"labels.inputs.Recalculate Interest based on new terms")),o(3),b(" ",m(184,179,a.loanDetails.isInterestRecalculationEnabled)," "),o(4),b(" ",m(188,181,"labels.inputs.Days in year")),o(3),b(" ",Ee(191,183,a.loanDetails.daysInYearType.value,"catalogs")," "),o(4),b(" ",m(195,186,"labels.inputs.Days in month")),o(3),b(" ",Ee(198,188,a.loanDetails.daysInMonthType.value,"catalogs")," "),o(2),O(a.loanDetails.isInterestRecalculationEnabled?199:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?200:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled?201:-1),o(),O(a.loanDetails.isInterestRecalculationEnabled&&a.loanDetails.interestRecalculationData.interestRecalculationCompoundingType.id!==0?202:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?203:-1),o(),O(a.loanDetails.isVariableInstallmentsAllowed?204:-1),o(),O(a.loanDetails&&a.loanDetails.delinquent&&a.loanDetails.delinquent.availableDisbursementAmountWithOverApplied!==void 0?205:-1))},dependencies:[wt,Pt,gn,Tt,wa,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}span[_ngcontent-%COMP%]{margin:.5em 0}"]})}}return t})();var Vp=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.authenticationService=A(Jf);let e=this.authenticationService.getCredentials();this.username=e.username,this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(i=>{this.entityNotes=i.loanNotes})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}addNote(e){this.loansService.createLoanNote(this.entityId,e).subscribe(i=>{this.entityNotes.push({id:i.resourceId,createdByUsername:this.username,createdOn:new Date,note:e.note})})}editNote(e,i,a){this.loansService.editLoanNote(this.entityId,e,i).subscribe(()=>{this.entityNotes[a].note=i.note})}deleteNote(e,i){this.loansService.deleteLoanNote(this.entityId,e).subscribe(()=>{this.entityNotes.splice(i,1)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-notes-tab"]],decls:1,vars:5,consts:[[3,"entityId","entityNotes","callbackAdd","callbackEdit","callbackDelete"]],template:function(i,a){i&1&&P(0,"mifosx-entity-notes-tab",0),i&2&&x("entityId",a.entityId)("entityNotes",a.entityNotes)("callbackAdd",a.addNote)("callbackEdit",a.editNote)("callbackDelete",a.deleteNote)},dependencies:[wt,Pt,g1],encapsulation:2})}}return t})();var Po=Uint8Array,Qa=Uint16Array,bd=Int32Array,vd=new Po([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xd=new Po([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),M1=new Po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),L1=function(t,n){for(var e=new Qa(31),i=0;i<31;++i)e[i]=n+=1<>1|(ci&21845)<<1,br=(br&52428)>>2|(br&13107)<<2,br=(br&61680)>>4|(br&3855)<<4,_d[ci]=((br&65280)>>8|(br&255)<<8)>>1;var br,ci,oc=function(t,n,e){for(var i=t.length,a=0,r=new Qa(n);a>g]=_}else for(d=new Qa(i),a=0;a>15-t[a]);return d},yl=new Po(288);for(ci=0;ci<144;++ci)yl[ci]=8;var ci;for(ci=144;ci<256;++ci)yl[ci]=9;var ci;for(ci=256;ci<280;++ci)yl[ci]=7;var ci;for(ci=280;ci<288;++ci)yl[ci]=8;var ci,Up=new Po(32);for(ci=0;ci<32;++ci)Up[ci]=5;var ci,sv=oc(yl,9,0);var cv=oc(Up,5,0);var N1=function(t){return(t+7)/8|0},pv=function(t,n,e){return(n==null||n<0)&&(n=0),(e==null||e>t.length)&&(e=t.length),new Po(t.subarray(n,e))};var vr=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8},ic=function(t,n,e){e<<=n&7;var i=n/8|0;t[i]|=e,t[i+1]|=e>>8,t[i+2]|=e>>16},hd=function(t,n){for(var e=[],i=0;ik&&(k=r[i].s);var D=new Qa(k+1),U=Cd(e[y-1],D,0);if(U>n){var i=0,H=0,Z=U-n,j=1<n)H+=j-(1<>=Z;H>0;){var dt=r[i].s;D[dt]=0&&H;--i){var nt=r[i].s;D[nt]==n&&(--D[nt],++H)}U=n}return{t:new Po(D),l:U}},Cd=function(t,n,e){return t.s==-1?Math.max(Cd(t.l,n,e+1),Cd(t.r,n,e+1)):n[t.s]=e},I1=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new Qa(++n),i=0,a=t[0],r=1,u=function(g){e[i++]=g},d=1;d<=n;++d)if(t[d]==a&&d!=n)++r;else{if(!a&&r>2){for(;r>138;r-=138)u(32754);r>2&&(u(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(u(a),--r;r>6;r-=6)u(8304);r>2&&(u(r-3<<5|8208),r=0)}for(;r--;)u(a);r=1,a=t[d]}return{c:e.subarray(0,i),n}},ac=function(t,n){for(var e=0,i=0;i>8,t[a+2]=t[a]^255,t[a+3]=t[a+1]^255;for(var r=0;r4&&!xt[M1[Y-1]];--Y);var rt=_+5<<3,ot=ac(a,yl)+ac(r,Up)+u,Mt=ac(a,k)+ac(r,H)+u+14+3*Y+ac(zt,xt)+2*zt[16]+3*zt[17]+7*zt[18];if(g>=0&&rt<=ot&&rt<=Mt)return R1(n,y,t.subarray(g,g+_));var Ft,Rt,St,qt;if(vr(n,y,1+(Mt15&&(vr(n,y,J[ht]>>5&127),y+=J[ht]>>12)}}else Ft=sv,Rt=yl,St=cv,qt=Up;for(var ht=0;ht255){var et=ct>>18&31;ic(n,y,Ft[et+257]),y+=Rt[et+257],et>7&&(vr(n,y,ct>>23&31),y+=vd[et]);var ft=ct&31;ic(n,y,St[ft]),y+=qt[ft],ft>3&&(ic(n,y,ct>>5&8191),y+=xd[ft])}else ic(n,y,Ft[ct]),y+=Rt[ct]}return ic(n,y,Ft[256]),y+Rt[256]},mv=new bd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),B1=new Po(0),dv=function(t,n,e,i,a,r){var u=r.z||t.length,d=new Po(i+u+5*(1+Math.ceil(u/7e3))+a),g=d.subarray(i,d.length-a),_=r.l,y=(r.r||0)&7;if(n){y&&(g[0]=r.r>>3);for(var I=mv[n-1],k=I>>13,D=I&8191,U=(1<7e3||xt>24576)&&(Ft>423||!_)){y=E1(t,g,0,nt,Ot,Yt,ht,xt,Y,tt-Y,y),xt=zt=ht=0,Y=tt;for(var Rt=0;Rt<286;++Rt)Ot[Rt]=0;for(var Rt=0;Rt<30;++Rt)Yt[Rt]=0}var St=2,qt=0,se=D,Xt=ot-Mt&32767;if(Ft>2&&rt==dt(tt-Xt))for(var B=Math.min(k,Ft)-1,J=Math.min(32767,tt),et=Math.min(258,Ft);Xt<=J&&--se&&ot!=Mt;){if(t[tt+St]==t[tt+St-Xt]){for(var ct=0;ctSt){if(St=ct,qt=Xt,ct>B)break;for(var ft=Math.min(Xt,ct-2),bt=0,Rt=0;Rtbt&&(bt=Ht,Mt=Lt)}}}ot=Mt,Mt=H[ot],Xt+=ot-Mt&32767}if(qt){nt[xt++]=268435456|gd[St]<<18|O1[qt];var re=gd[St]&31,Ie=O1[qt]&31;ht+=vd[re]+xd[Ie],++Ot[257+re],++Yt[Ie],z=tt+St,++zt}else nt[xt++]=t[tt],++Ot[t[tt]]}}for(tt=Math.max(tt,z);tt=u&&(g[y/8|0]=_,De=u),y=R1(g,y+1,t.subarray(tt,De))}r.i=u}return pv(d,0,i+N1(y)+a)};var q1=function(){var t=1,n=0;return{p:function(e){for(var i=t,a=n,r=e.length|0,u=0;u!=r;){for(var d=Math.min(u+2655,r);u>16),a=(a&65535)+15*(a>>16)}t=i,n=a},d:function(){return t%=65521,n%=65521,(t&255)<<24|(t&65280)<<8|(n&255)<<8|n>>8}}},uv=function(t,n,e,i,a){if(!a&&(a={l:1},n.dictionary)){var r=n.dictionary.subarray(-32768),u=new Po(r.length+t.length);u.set(r),u.set(t,r.length),t=u,a.w=r.length}return dv(t,n.level==null?6:n.level,n.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+n.mem,e,i,a)};var z1=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8};var fv=function(t,n){var e=n.level,i=e==0?0:e<6?1:e==9?3:2;if(t[0]=120,t[1]=i<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var a=q1();a.p(n.dictionary),z1(t,2,a.d())}};function Hp(t,n){n||(n={});var e=q1();e.p(t);var i=uv(t,n,n.dictionary?6:2,4);return fv(i,n),z1(i,i.length-4,e.d()),i}var hv=typeof TextDecoder<"u"&&new TextDecoder,gv=0;try{hv.decode(B1,{stream:!0}),gv=1}catch{}function j1(t){if(Array.isArray(t))return t}function V1(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var i,a,r,u,d=[],g=!0,_=!1;try{if(r=(e=e.call(t)).next,n===0){if(Object(e)!==e)return;g=!1}else for(;!(g=(i=r.call(e)).done)&&(d.push(i.value),d.length!==n);g=!0);}catch(y){_=!0,a=y}finally{try{if(!g&&e.return!=null&&(u=e.return(),Object(u)!==u))return}finally{if(_)throw a}}return d}}function yd(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,i=Array(n);e{let t=new Uint8Array(4),n=new Uint32Array(t.buffer);return!((n[0]=1)&t[0])})(),wd={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},rc=class t{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(n=Cv,e={}){let i=!1;typeof n=="number"?n=new ArrayBuffer(n):(i=!0,this.lastWrittenByte=n.byteLength);let a=e.offset?e.offset>>>0:0,r=n.byteLength-a,u=a;(ArrayBuffer.isView(n)||n instanceof t)&&(n.byteLength!==n.buffer.byteLength&&(u=n.byteOffset+a),n=n.buffer),i?this.lastWrittenByte=r:this.lastWrittenByte=0,this.buffer=n,this.length=r,this.byteLength=r,this.byteOffset=u,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,u,r),this._mark=0,this._marks=[]}available(n=1){return this.offset+n<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(n=1){return this.offset+=n,this}back(n=1){return this.offset-=n,this}seek(n){return this.offset=n,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let n=this._marks.pop();if(n===void 0)throw new Error("Mark stack empty");return this.seek(n),this}rewind(){return this.offset=0,this}ensureAvailable(n=1){if(!this.available(n)){let i=(this.offset+n)*2,a=new Uint8Array(i);a.set(new Uint8Array(this.buffer)),this.buffer=a.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(n=1){return this.readArray(n,"uint8")}readArray(n,e){let i=wd[e].BYTES_PER_ELEMENT*n,a=this.byteOffset+this.offset,r=this.buffer.slice(a,a+i);if(this.littleEndian===bv&&e!=="uint8"&&e!=="int8"){let d=new Uint8Array(this.buffer.slice(a,a+i));d.reverse();let g=new wd[e](d.buffer);return this.offset+=i,g.reverse(),g}let u=new wd[e](r);return this.offset+=i,u}readInt16(){let n=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,n}readUint16(){let n=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,n}readInt32(){let n=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,n}readUint32(){let n=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat32(){let n=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,n}readFloat64(){let n=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,n}readBigInt64(){let n=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,n}readBigUint64(){let n=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,n}readChar(){return String.fromCharCode(this.readInt8())}readChars(n=1){let e="";for(let i=0;ithis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}};function ps(t){let n=t.length;for(;--n>=0;)t[n]=0}var vv=0,Oh=1,xv=2,yv=3,Sv=258,Kd=29,xc=256,uc=xc+1+Kd,ls=30,Zd=19,Ih=2*uc+1,Sl=15,Pd=16,Dv=7,Jd=256,Eh=16,Lh=17,kh=18,zd=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Zp=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),wv=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Fh=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Pv=512,yr=new Array((uc+2)*2);ps(yr);var pc=new Array(ls*2);ps(pc);var fc=new Array(Pv);ps(fc);var hc=new Array(Sv-yv+1);ps(hc);var Xd=new Array(Kd);ps(Xd);var Jp=new Array(ls);ps(Jp);function Td(t,n,e,i,a){this.static_tree=t,this.extra_bits=n,this.extra_base=e,this.elems=i,this.max_length=a,this.has_stree=t&&t.length}var Nh,Rh,Bh;function Ad(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}var qh=t=>t<256?fc[t]:fc[256+(t>>>7)],gc=(t,n)=>{t.pending_buf[t.pending++]=n&255,t.pending_buf[t.pending++]=n>>>8&255},Ua=(t,n,e)=>{t.bi_valid>Pd-e?(t.bi_buf|=n<>Pd-t.bi_valid,t.bi_valid+=e-Pd):(t.bi_buf|=n<{Ua(t,e[n*2],e[n*2+1])},zh=(t,n)=>{let e=0;do e|=t&1,t>>>=1,e<<=1;while(--n>0);return e>>>1},Tv=t=>{t.bi_valid===16?(gc(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},Av=(t,n)=>{let e=n.dyn_tree,i=n.max_code,a=n.stat_desc.static_tree,r=n.stat_desc.has_stree,u=n.stat_desc.extra_bits,d=n.stat_desc.extra_base,g=n.stat_desc.max_length,_,y,I,k,D,U,H=0;for(k=0;k<=Sl;k++)t.bl_count[k]=0;for(e[t.heap[t.heap_max]*2+1]=0,_=t.heap_max+1;_g&&(k=g,H++),e[y*2+1]=k,!(y>i)&&(t.bl_count[k]++,D=0,y>=d&&(D=u[y-d]),U=e[y*2],t.opt_len+=U*(k+D),r&&(t.static_len+=U*(a[y*2+1]+D)));if(H!==0){do{for(k=g-1;t.bl_count[k]===0;)k--;t.bl_count[k]--,t.bl_count[k+1]+=2,t.bl_count[g]--,H-=2}while(H>0);for(k=g;k!==0;k--)for(y=t.bl_count[k];y!==0;)I=t.heap[--_],!(I>i)&&(e[I*2+1]!==k&&(t.opt_len+=(k-e[I*2+1])*e[I*2],e[I*2+1]=k),y--)}},jh=(t,n,e)=>{let i=new Array(Sl+1),a=0,r,u;for(r=1;r<=Sl;r++)a=a+e[r-1]<<1,i[r]=a;for(u=0;u<=n;u++){let d=t[u*2+1];d!==0&&(t[u*2]=zh(i[d]++,d))}},Mv=()=>{let t,n,e,i,a,r=new Array(Sl+1);for(e=0,i=0;i>=7;i{let n;for(n=0;n{t.bi_valid>8?gc(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},W1=(t,n,e,i)=>{let a=n*2,r=e*2;return t[a]{let i=t.heap[e],a=e<<1;for(;a<=t.heap_len&&(a{let i,a,r=0,u,d;if(t.sym_next!==0)do i=t.pending_buf[t.sym_buf+r++]&255,i+=(t.pending_buf[t.sym_buf+r++]&255)<<8,a=t.pending_buf[t.sym_buf+r++],i===0?Ko(t,a,n):(u=hc[a],Ko(t,u+xc+1,n),d=zd[u],d!==0&&(a-=Xd[u],Ua(t,a,d)),i--,u=qh(i),Ko(t,u,e),d=Zp[u],d!==0&&(i-=Jp[u],Ua(t,i,d)));while(r{let e=n.dyn_tree,i=n.stat_desc.static_tree,a=n.stat_desc.has_stree,r=n.stat_desc.elems,u,d,g=-1,_;for(t.heap_len=0,t.heap_max=Ih,u=0;u>1;u>=1;u--)Md(t,e,u);_=r;do u=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Md(t,e,1),d=t.heap[1],t.heap[--t.heap_max]=u,t.heap[--t.heap_max]=d,e[_*2]=e[u*2]+e[d*2],t.depth[_]=(t.depth[u]>=t.depth[d]?t.depth[u]:t.depth[d])+1,e[u*2+1]=e[d*2+1]=_,t.heap[1]=_++,Md(t,e,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],Av(t,n),jh(e,g,t.bl_count)},Y1=(t,n,e)=>{let i,a=-1,r,u=n[1],d=0,g=7,_=4;for(u===0&&(g=138,_=3),n[(e+1)*2+1]=65535,i=0;i<=e;i++)r=u,u=n[(i+1)*2+1],!(++d{let i,a=-1,r,u=n[1],d=0,g=7,_=4;for(u===0&&(g=138,_=3),i=0;i<=e;i++)if(r=u,u=n[(i+1)*2+1],!(++d{let n;for(Y1(t,t.dyn_ltree,t.l_desc.max_code),Y1(t,t.dyn_dtree,t.d_desc.max_code),jd(t,t.bl_desc),n=Zd-1;n>=3&&t.bl_tree[Fh[n]*2+1]===0;n--);return t.opt_len+=3*(n+1)+5+5+4,n},Iv=(t,n,e,i)=>{let a;for(Ua(t,n-257,5),Ua(t,e-1,5),Ua(t,i-4,4),a=0;a{let n=4093624447,e;for(e=0;e<=31;e++,n>>>=1)if(n&1&&t.dyn_ltree[e*2]!==0)return 0;if(t.dyn_ltree[18]!==0||t.dyn_ltree[20]!==0||t.dyn_ltree[26]!==0)return 1;for(e=32;e{Z1||(Mv(),Z1=!0),t.l_desc=new Ad(t.dyn_ltree,Nh),t.d_desc=new Ad(t.dyn_dtree,Rh),t.bl_desc=new Ad(t.bl_tree,Bh),t.bi_buf=0,t.bi_valid=0,Vh(t)},Hh=(t,n,e,i)=>{Ua(t,(vv<<1)+(i?1:0),3),Uh(t),gc(t,e),gc(t,~e),e&&t.pending_buf.set(t.window.subarray(n,n+e),t.pending),t.pending+=e},kv=t=>{Ua(t,Oh<<1,3),Ko(t,Jd,yr),Tv(t)},Fv=(t,n,e,i)=>{let a,r,u=0;t.level>0?(t.strm.data_type===2&&(t.strm.data_type=Ev(t)),jd(t,t.l_desc),jd(t,t.d_desc),u=Ov(t),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=e+5,e+4<=a&&n!==-1?Hh(t,n,e,i):t.strategy===4||r===a?(Ua(t,(Oh<<1)+(i?1:0),3),$1(t,yr,pc)):(Ua(t,(xv<<1)+(i?1:0),3),Iv(t,t.l_desc.max_code+1,t.d_desc.max_code+1,u+1),$1(t,t.dyn_ltree,t.dyn_dtree)),Vh(t),i&&Uh(t)},Nv=(t,n,e)=>(t.pending_buf[t.sym_buf+t.sym_next++]=n,t.pending_buf[t.sym_buf+t.sym_next++]=n>>8,t.pending_buf[t.sym_buf+t.sym_next++]=e,n===0?t.dyn_ltree[e*2]++:(t.matches++,n--,t.dyn_ltree[(hc[e]+xc+1)*2]++,t.dyn_dtree[qh(n)*2]++),t.sym_next===t.sym_end),Rv=Lv,Bv=Hh,qv=Fv,zv=Nv,jv=kv,Vv={_tr_init:Rv,_tr_stored_block:Bv,_tr_flush_block:qv,_tr_tally:zv,_tr_align:jv},Uv=(t,n,e,i)=>{let a=t&65535|0,r=t>>>16&65535|0,u=0;for(;e!==0;){u=e>2e3?2e3:e,e-=u;do a=a+n[i++]|0,r=r+a|0;while(--u);a%=65521,r%=65521}return a|r<<16|0},_c=Uv,Hv=()=>{let t,n=[];for(var e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=t&1?3988292384^t>>>1:t>>>1;n[e]=t}return n},Gv=new Uint32Array(Hv()),Wv=(t,n,e,i)=>{let a=Gv,r=i+e;t^=-1;for(let u=i;u>>8^a[(t^n[u])&255];return t^-1},da=Wv,Pl={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ms={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:$v,_tr_stored_block:Vd,_tr_flush_block:Yv,_tr_tally:Kr,_tr_align:Kv}=Vv,{Z_NO_FLUSH:Zr,Z_PARTIAL_FLUSH:Zv,Z_FULL_FLUSH:Jv,Z_FINISH:uo,Z_BLOCK:J1,Z_OK:va,Z_STREAM_END:X1,Z_STREAM_ERROR:Zo,Z_DATA_ERROR:Xv,Z_BUF_ERROR:Od,Z_DEFAULT_COMPRESSION:Qv,Z_FILTERED:tx,Z_HUFFMAN_ONLY:Gp,Z_RLE:ex,Z_FIXED:nx,Z_DEFAULT_STRATEGY:ix,Z_UNKNOWN:ax,Z_DEFLATED:tm}=ms,ox=9,rx=15,lx=8,sx=29,cx=256,Ud=cx+1+sx,px=30,mx=19,dx=2*Ud+1,ux=15,ti=3,Yr=258,Jo=Yr+ti+1,fx=32,ss=42,Qd=57,Hd=69,Gd=73,Wd=91,$d=103,Dl=113,sc=666,Fa=1,ds=2,Tl=3,us=4,hx=3,wl=(t,n)=>(t.msg=Pl[n],n),Q1=t=>t*2-(t>4?9:0),$r=t=>{let n=t.length;for(;--n>=0;)t[n]=0},gx=t=>{let n,e,i,a=t.w_size;n=t.hash_size,i=n;do e=t.head[--i],t.head[i]=e>=a?e-a:0;while(--n);n=a,i=n;do e=t.prev[--i],t.prev[i]=e>=a?e-a:0;while(--n)},_x=(t,n,e)=>(n<{let n=t.state,e=n.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.output.set(n.pending_buf.subarray(n.pending_out,n.pending_out+e),t.next_out),t.next_out+=e,n.pending_out+=e,t.total_out+=e,t.avail_out-=e,n.pending-=e,n.pending===0&&(n.pending_out=0))},eo=(t,n)=>{Yv(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,n),t.block_start=t.strstart,to(t.strm)},pi=(t,n)=>{t.pending_buf[t.pending++]=n},lc=(t,n)=>{t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=n&255},Yd=(t,n,e,i)=>{let a=t.avail_in;return a>i&&(a=i),a===0?0:(t.avail_in-=a,n.set(t.input.subarray(t.next_in,t.next_in+a),e),t.state.wrap===1?t.adler=_c(t.adler,n,a,e):t.state.wrap===2&&(t.adler=da(t.adler,n,a,e)),t.next_in+=a,t.total_in+=a,a)},Gh=(t,n)=>{let e=t.max_chain_length,i=t.strstart,a,r,u=t.prev_length,d=t.nice_match,g=t.strstart>t.w_size-Jo?t.strstart-(t.w_size-Jo):0,_=t.window,y=t.w_mask,I=t.prev,k=t.strstart+Yr,D=_[i+u-1],U=_[i+u];t.prev_length>=t.good_match&&(e>>=2),d>t.lookahead&&(d=t.lookahead);do if(a=n,!(_[a+u]!==U||_[a+u-1]!==D||_[a]!==_[i]||_[++a]!==_[i+1])){i+=2,a++;do;while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&iu){if(t.match_start=n,u=r,r>=d)break;D=_[i+u-1],U=_[i+u]}}while((n=I[n&y])>g&&--e!==0);return u<=t.lookahead?u:t.lookahead},cs=t=>{let n=t.w_size,e,i,a;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=n+(n-Jo)&&(t.window.set(t.window.subarray(n,n+n-i),0),t.match_start-=n,t.strstart-=n,t.block_start-=n,t.insert>t.strstart&&(t.insert=t.strstart),gx(t),i+=n),t.strm.avail_in===0)break;if(e=Yd(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=e,t.lookahead+t.insert>=ti)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=Jr(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=Jr(t,t.ins_h,t.window[a+ti-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert{let e=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i,a,r,u=0,d=t.strm.avail_in;do{if(i=65535,r=t.bi_valid+42>>3,t.strm.avail_outa+t.strm.avail_in&&(i=a+t.strm.avail_in),i>r&&(i=r),i>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,to(t.strm),a&&(a>i&&(a=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+a),t.strm.next_out),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a,t.block_start+=a,i-=a),i&&(Yd(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(u===0);return d-=t.strm.avail_in,d&&(d>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=d&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-d,t.strm.next_in),t.strstart),t.strstart+=d,t.insert+=d>t.w_size-t.insert?t.w_size-t.insert:d),t.block_start=t.strstart),t.high_waterr&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(Yd(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water>3,r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r,e=r>t.w_size?t.w_size:r,a=t.strstart-t.block_start,(a>=e||(a||n===uo)&&n!==Zr&&t.strm.avail_in===0&&a<=r)&&(i=a>r?r:a,u=n===uo&&t.strm.avail_in===0&&i===a?1:0,Vd(t,t.block_start,i,u),t.block_start+=i,to(t.strm)),u?Tl:Fa)},Id=(t,n)=>{let e,i;for(;;){if(t.lookahead=ti&&(t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),e!==0&&t.strstart-e<=t.w_size-Jo&&(t.match_length=Gh(t,e)),t.match_length>=ti)if(i=Kr(t,t.strstart-t.match_start,t.match_length-ti),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ti){t.match_length--;do t.strstart++,t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+1]);else i=Kr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(eo(t,!1),t.strm.avail_out===0))return Fa}return t.insert=t.strstart{let e,i,a;for(;;){if(t.lookahead=ti&&(t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=ti-1,e!==0&&t.prev_length4096)&&(t.match_length=ti-1)),t.prev_length>=ti&&t.match_length<=t.prev_length){a=t.strstart+t.lookahead-ti,i=Kr(t,t.strstart-1-t.prev_match,t.prev_length-ti),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=a&&(t.ins_h=Jr(t,t.ins_h,t.window[t.strstart+ti-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(--t.prev_length!==0);if(t.match_available=0,t.match_length=ti-1,t.strstart++,i&&(eo(t,!1),t.strm.avail_out===0))return Fa}else if(t.match_available){if(i=Kr(t,0,t.window[t.strstart-1]),i&&eo(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Fa}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=Kr(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart{let e,i,a,r,u=t.window;for(;;){if(t.lookahead<=Yr){if(cs(t),t.lookahead<=Yr&&n===Zr)return Fa;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=ti&&t.strstart>0&&(a=t.strstart-1,i=u[a],i===u[++a]&&i===u[++a]&&i===u[++a])){r=t.strstart+Yr;do;while(i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&at.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ti?(e=Kr(t,1,t.match_length-ti),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=Kr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(eo(t,!1),t.strm.avail_out===0))return Fa}return t.insert=0,n===uo?(eo(t,!0),t.strm.avail_out===0?Tl:us):t.sym_next&&(eo(t,!1),t.strm.avail_out===0)?Fa:ds},bx=(t,n)=>{let e;for(;;){if(t.lookahead===0&&(cs(t),t.lookahead===0)){if(n===Zr)return Fa;break}if(t.match_length=0,e=Kr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(eo(t,!1),t.strm.avail_out===0))return Fa}return t.insert=0,n===uo?(eo(t,!0),t.strm.avail_out===0?Tl:us):t.sym_next&&(eo(t,!1),t.strm.avail_out===0)?Fa:ds};function Yo(t,n,e,i,a){this.good_length=t,this.max_lazy=n,this.nice_length=e,this.max_chain=i,this.func=a}var cc=[new Yo(0,0,0,0,Wh),new Yo(4,4,8,4,Id),new Yo(4,5,16,8,Id),new Yo(4,6,32,32,Id),new Yo(4,4,16,16,os),new Yo(8,16,32,32,os),new Yo(8,16,128,128,os),new Yo(8,32,128,256,os),new Yo(32,128,258,1024,os),new Yo(32,258,258,4096,os)],vx=t=>{t.window_size=2*t.w_size,$r(t.head),t.max_lazy_match=cc[t.level].max_lazy,t.good_match=cc[t.level].good_length,t.nice_match=cc[t.level].nice_length,t.max_chain_length=cc[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ti-1,t.match_available=0,t.ins_h=0};function xx(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=tm,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(dx*2),this.dyn_dtree=new Uint16Array((2*px+1)*2),this.bl_tree=new Uint16Array((2*mx+1)*2),$r(this.dyn_ltree),$r(this.dyn_dtree),$r(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(ux+1),this.heap=new Uint16Array(2*Ud+1),$r(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Ud+1),$r(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var yc=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.status!==ss&&n.status!==Qd&&n.status!==Hd&&n.status!==Gd&&n.status!==Wd&&n.status!==$d&&n.status!==Dl&&n.status!==sc?1:0},$h=t=>{if(yc(t))return wl(t,Zo);t.total_in=t.total_out=0,t.data_type=ax;let n=t.state;return n.pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap===2?Qd:n.wrap?ss:Dl,t.adler=n.wrap===2?0:1,n.last_flush=-2,$v(n),va},Yh=t=>{let n=$h(t);return n===va&&vx(t.state),n},yx=(t,n)=>yc(t)||t.state.wrap!==2?Zo:(t.state.gzhead=n,va),Kh=(t,n,e,i,a,r)=>{if(!t)return Zo;let u=1;if(n===Qv&&(n=6),i<0?(u=0,i=-i):i>15&&(u=2,i-=16),a<1||a>ox||e!==tm||i<8||i>15||n<0||n>9||r<0||r>nx||i===8&&u!==1)return wl(t,Zo);i===8&&(i=9);let d=new xx;return t.state=d,d.strm=t,d.status=ss,d.wrap=u,d.gzhead=null,d.w_bits=i,d.w_size=1<Kh(t,n,tm,rx,lx,ix),Dx=(t,n)=>{if(yc(t)||n>J1||n<0)return t?wl(t,Zo):Zo;let e=t.state;if(!t.output||t.avail_in!==0&&!t.input||e.status===sc&&n!==uo)return wl(t,t.avail_out===0?Od:Zo);let i=e.last_flush;if(e.last_flush=n,e.pending!==0){if(to(t),t.avail_out===0)return e.last_flush=-1,va}else if(t.avail_in===0&&Q1(n)<=Q1(i)&&n!==uo)return wl(t,Od);if(e.status===sc&&t.avail_in!==0)return wl(t,Od);if(e.status===ss&&e.wrap===0&&(e.status=Dl),e.status===ss){let a=tm+(e.w_bits-8<<4)<<8,r=-1;if(e.strategy>=Gp||e.level<2?r=0:e.level<6?r=1:e.level===6?r=2:r=3,a|=r<<6,e.strstart!==0&&(a|=fx),a+=31-a%31,lc(e,a),e.strstart!==0&&(lc(e,t.adler>>>16),lc(e,t.adler&65535)),t.adler=1,e.status=Dl,to(t),e.pending!==0)return e.last_flush=-1,va}if(e.status===Qd){if(t.adler=0,pi(e,31),pi(e,139),pi(e,8),e.gzhead)pi(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),pi(e,e.gzhead.time&255),pi(e,e.gzhead.time>>8&255),pi(e,e.gzhead.time>>16&255),pi(e,e.gzhead.time>>24&255),pi(e,e.level===9?2:e.strategy>=Gp||e.level<2?4:0),pi(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(pi(e,e.gzhead.extra.length&255),pi(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(t.adler=da(t.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=Hd;else if(pi(e,0),pi(e,0),pi(e,0),pi(e,0),pi(e,0),pi(e,e.level===9?2:e.strategy>=Gp||e.level<2?4:0),pi(e,hx),e.status=Dl,to(t),e.pending!==0)return e.last_flush=-1,va}if(e.status===Hd){if(e.gzhead.extra){let a=e.pending,r=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+r>e.pending_buf_size;){let d=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+d),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex+=d,to(t),e.pending!==0)return e.last_flush=-1,va;a=0,r-=d}let u=new Uint8Array(e.gzhead.extra);e.pending_buf.set(u.subarray(e.gzindex,e.gzindex+r),e.pending),e.pending+=r,e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex=0}e.status=Gd}if(e.status===Gd){if(e.gzhead.name){let a=e.pending,r;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),to(t),e.pending!==0)return e.last_flush=-1,va;a=0}e.gzindexa&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),e.gzindex=0}e.status=Wd}if(e.status===Wd){if(e.gzhead.comment){let a=e.pending,r;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>a&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a)),to(t),e.pending!==0)return e.last_flush=-1,va;a=0}e.gzindexa&&(t.adler=da(t.adler,e.pending_buf,e.pending-a,a))}e.status=$d}if(e.status===$d){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(to(t),e.pending!==0))return e.last_flush=-1,va;pi(e,t.adler&255),pi(e,t.adler>>8&255),t.adler=0}if(e.status=Dl,to(t),e.pending!==0)return e.last_flush=-1,va}if(t.avail_in!==0||e.lookahead!==0||n!==Zr&&e.status!==sc){let a=e.level===0?Wh(e,n):e.strategy===Gp?bx(e,n):e.strategy===ex?Cx(e,n):cc[e.level].func(e,n);if((a===Tl||a===us)&&(e.status=sc),a===Fa||a===Tl)return t.avail_out===0&&(e.last_flush=-1),va;if(a===ds&&(n===Zv?Kv(e):n!==J1&&(Vd(e,0,0,!1),n===Jv&&($r(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),to(t),t.avail_out===0))return e.last_flush=-1,va}return n!==uo?va:e.wrap<=0?X1:(e.wrap===2?(pi(e,t.adler&255),pi(e,t.adler>>8&255),pi(e,t.adler>>16&255),pi(e,t.adler>>24&255),pi(e,t.total_in&255),pi(e,t.total_in>>8&255),pi(e,t.total_in>>16&255),pi(e,t.total_in>>24&255)):(lc(e,t.adler>>>16),lc(e,t.adler&65535)),to(t),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?va:X1)},wx=t=>{if(yc(t))return Zo;let n=t.state.status;return t.state=null,n===Dl?wl(t,Xv):va},Px=(t,n)=>{let e=n.length;if(yc(t))return Zo;let i=t.state,a=i.wrap;if(a===2||a===1&&i.status!==ss||i.lookahead)return Zo;if(a===1&&(t.adler=_c(t.adler,n,e,0)),i.wrap=0,e>=i.w_size){a===0&&($r(i.head),i.strstart=0,i.block_start=0,i.insert=0);let g=new Uint8Array(i.w_size);g.set(n.subarray(e-i.w_size,e),0),n=g,e=i.w_size}let r=t.avail_in,u=t.next_in,d=t.input;for(t.avail_in=e,t.next_in=0,t.input=n,cs(i);i.lookahead>=ti;){let g=i.strstart,_=i.lookahead-(ti-1);do i.ins_h=Jr(i,i.ins_h,i.window[g+ti-1]),i.prev[g&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=g,g++;while(--_);i.strstart=g,i.lookahead=ti-1,cs(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=ti-1,i.match_available=0,t.next_in=u,t.input=d,t.avail_in=r,i.wrap=a,va},Tx=Sx,Ax=Kh,Mx=Yh,Ox=$h,Ix=yx,Ex=Dx,Lx=wx,kx=Px,Fx="pako deflate (from Nodeca project)",mc={deflateInit:Tx,deflateInit2:Ax,deflateReset:Mx,deflateResetKeep:Ox,deflateSetHeader:Ix,deflate:Ex,deflateEnd:Lx,deflateSetDictionary:kx,deflateInfo:Fx},Nx=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),Rx=function(t){let n=Array.prototype.slice.call(arguments,1);for(;n.length;){let e=n.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let i in e)Nx(e,i)&&(t[i]=e[i])}}return t},Bx=t=>{let n=0;for(let i=0,a=t.length;i=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Cc[254]=Cc[254]=1;var qx=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let n,e,i,a,r,u=t.length,d=0;for(a=0;a>>6,n[r++]=128|e&63):e<65536?(n[r++]=224|e>>>12,n[r++]=128|e>>>6&63,n[r++]=128|e&63):(n[r++]=240|e>>>18,n[r++]=128|e>>>12&63,n[r++]=128|e>>>6&63,n[r++]=128|e&63);return n},zx=(t,n)=>{if(n<65534&&t.subarray&&Zh)return String.fromCharCode.apply(null,t.length===n?t:t.subarray(0,n));let e="";for(let i=0;i{let e=n||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,n));let i,a,r=new Array(e*2);for(a=0,i=0;i4){r[a++]=65533,i+=d-1;continue}for(u&=d===2?31:d===3?15:7;d>1&&i1){r[a++]=65533;continue}u<65536?r[a++]=u:(u-=65536,r[a++]=55296|u>>10&1023,r[a++]=56320|u&1023)}return zx(r,a)},Vx=(t,n)=>{n=n||t.length,n>t.length&&(n=t.length);let e=n-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?n:e+Cc[t[e]]>n?e:n},bc={string2buf:qx,buf2string:jx,utf8border:Vx};function Ux(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Jh=Ux,Xh=Object.prototype.toString,{Z_NO_FLUSH:Hx,Z_SYNC_FLUSH:Gx,Z_FULL_FLUSH:Wx,Z_FINISH:$x,Z_OK:Xp,Z_STREAM_END:Yx,Z_DEFAULT_COMPRESSION:Kx,Z_DEFAULT_STRATEGY:Zx,Z_DEFLATED:Jx}=ms;function Sc(t){this.options=em.assign({level:Kx,method:Jx,chunkSize:16384,windowBits:15,memLevel:8,strategy:Zx},t||{});let n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jh,this.strm.avail_out=0;let e=mc.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(e!==Xp)throw new Error(Pl[e]);if(n.header&&mc.deflateSetHeader(this.strm,n.header),n.dictionary){let i;if(typeof n.dictionary=="string"?i=bc.string2buf(n.dictionary):Xh.call(n.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(n.dictionary):i=n.dictionary,e=mc.deflateSetDictionary(this.strm,i),e!==Xp)throw new Error(Pl[e]);this._dict_set=!0}}Sc.prototype.push=function(t,n){let e=this.strm,i=this.options.chunkSize,a,r;if(this.ended)return!1;for(n===~~n?r=n:r=n===!0?$x:Hx,typeof t=="string"?e.input=bc.string2buf(t):Xh.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),(r===Gx||r===Wx)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(a=mc.deflate(e,r),a===Yx)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),a=mc.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Xp;if(e.avail_out===0){this.onData(e.output);continue}if(r>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};Sc.prototype.onData=function(t){this.chunks.push(t)};Sc.prototype.onEnd=function(t){t===Xp&&(this.result=em.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function tu(t,n){let e=new Sc(n);if(e.push(t,!0),e.err)throw e.msg||Pl[e.err];return e.result}function Xx(t,n){return n=n||{},n.raw=!0,tu(t,n)}function Qx(t,n){return n=n||{},n.gzip=!0,tu(t,n)}var t5=Sc,e5=tu,n5=Xx,i5=Qx,a5=ms,o5={Deflate:t5,deflate:e5,deflateRaw:n5,gzip:i5,constants:a5},Wp=16209,r5=16191,l5=function(n,e){let i,a,r,u,d,g,_,y,I,k,D,U,H,Z,j,mt,dt,nt,Ot,Yt,zt,ht,tt,xt,z=n.state;i=n.next_in,tt=n.input,a=i+(n.avail_in-5),r=n.next_out,xt=n.output,u=r-(e-n.avail_out),d=r+(n.avail_out-257),g=z.dmax,_=z.wsize,y=z.whave,I=z.wnext,k=z.window,D=z.hold,U=z.bits,H=z.lencode,Z=z.distcode,j=(1<>>24,D>>>=nt,U-=nt,nt=dt>>>16&255,nt===0)xt[r++]=dt&65535;else if(nt&16){Ot=dt&65535,nt&=15,nt&&(U>>=nt,U-=nt),U<15&&(D+=tt[i++]<>>24,D>>>=nt,U-=nt,nt=dt>>>16&255,nt&16){if(Yt=dt&65535,nt&=15,Ug){n.msg="invalid distance too far back",z.mode=Wp;break t}if(D>>>=nt,U-=nt,nt=r-u,Yt>nt){if(nt=Yt-nt,nt>y&&z.sane){n.msg="invalid distance too far back",z.mode=Wp;break t}if(zt=0,ht=k,I===0){if(zt+=_-nt,nt2;)xt[r++]=ht[zt++],xt[r++]=ht[zt++],xt[r++]=ht[zt++],Ot-=3;Ot&&(xt[r++]=ht[zt++],Ot>1&&(xt[r++]=ht[zt++]))}else{zt=r-Yt;do xt[r++]=xt[zt++],xt[r++]=xt[zt++],xt[r++]=xt[zt++],Ot-=3;while(Ot>2);Ot&&(xt[r++]=xt[zt++],Ot>1&&(xt[r++]=xt[zt++]))}}else if((nt&64)===0){dt=Z[(dt&65535)+(D&(1<>3,i-=Ot,U-=Ot<<3,D&=(1<{let g=d.bits,_=0,y=0,I=0,k=0,D=0,U=0,H=0,Z=0,j=0,mt=0,dt,nt,Ot,Yt,zt,ht=null,tt,xt=new Uint16Array(rs+1),z=new Uint16Array(rs+1),Y=null,rt,ot,Mt;for(_=0;_<=rs;_++)xt[_]=0;for(y=0;y=1&&xt[k]===0;k--);if(D>k&&(D=k),k===0)return a[r++]=1<<24|64<<16|0,a[r++]=1<<24|64<<16|0,d.bits=1,0;for(I=1;I0&&(t===nh||k!==1))return-1;for(z[1]=0,_=1;_th||t===ih&&j>eh)return 1;for(;;){rt=_-H,u[y]+1=tt?(ot=Y[u[y]-tt],Mt=ht[u[y]-tt]):(ot=96,Mt=0),dt=1<<_-H,nt=1<>H)+nt]=rt<<24|ot<<16|Mt|0;while(nt!==0);for(dt=1<<_-1;mt&dt;)dt>>=1;if(dt!==0?(mt&=dt-1,mt+=dt):mt=0,y++,--xt[_]===0){if(_===k)break;_=n[e+u[y]]}if(_>D&&(mt&Yt)!==Ot){for(H===0&&(H=D),zt+=I,U=_-H,Z=1<th||t===ih&&j>eh)return 1;Ot=mt&Yt,a[Ot]=D<<24|U<<16|zt-r|0}}return mt!==0&&(a[zt+mt]=_-H<<24|64<<16|0),d.bits=D,0},dc=d5,u5=0,Qh=1,t2=2,{Z_FINISH:ah,Z_BLOCK:f5,Z_TREES:$p,Z_OK:Al,Z_STREAM_END:h5,Z_NEED_DICT:g5,Z_STREAM_ERROR:fo,Z_DATA_ERROR:e2,Z_MEM_ERROR:n2,Z_BUF_ERROR:_5,Z_DEFLATED:oh}=ms,nm=16180,rh=16181,lh=16182,sh=16183,ch=16184,ph=16185,mh=16186,dh=16187,uh=16188,fh=16189,Qp=16190,xr=16191,Ld=16192,hh=16193,kd=16194,gh=16195,_h=16196,Ch=16197,bh=16198,Yp=16199,Kp=16200,vh=16201,xh=16202,yh=16203,Sh=16204,Dh=16205,Fd=16206,wh=16207,Ph=16208,Ii=16209,i2=16210,a2=16211,C5=852,b5=592,v5=15,x5=v5,Th=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function y5(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Ml=t=>{if(!t)return 1;let n=t.state;return!n||n.strm!==t||n.modea2?1:0},o2=t=>{if(Ml(t))return fo;let n=t.state;return t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=n.wrap&1),n.mode=nm,n.last=0,n.havedict=0,n.flags=-1,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new Int32Array(C5),n.distcode=n.distdyn=new Int32Array(b5),n.sane=1,n.back=-1,Al},r2=t=>{if(Ml(t))return fo;let n=t.state;return n.wsize=0,n.whave=0,n.wnext=0,o2(t)},l2=(t,n)=>{let e;if(Ml(t))return fo;let i=t.state;return n<0?(e=0,n=-n):(e=(n>>4)+5,n<48&&(n&=15)),n&&(n<8||n>15)?fo:(i.window!==null&&i.wbits!==n&&(i.window=null),i.wrap=e,i.wbits=n,r2(t))},s2=(t,n)=>{if(!t)return fo;let e=new y5;t.state=e,e.strm=t,e.window=null,e.mode=nm;let i=l2(t,n);return i!==Al&&(t.state=null),i},S5=t=>s2(t,x5),Ah=!0,Nd,Rd,D5=t=>{if(Ah){Nd=new Int32Array(512),Rd=new Int32Array(32);let n=0;for(;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(dc(Qh,t.lens,0,288,Nd,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;dc(t2,t.lens,0,32,Rd,0,t.work,{bits:5}),Ah=!1}t.lencode=Nd,t.lenbits=9,t.distcode=Rd,t.distbits=5},c2=(t,n,e,i)=>{let a,r=t.state;return r.window===null&&(r.wsize=1<=r.wsize?(r.window.set(n.subarray(e-r.wsize,e),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>i&&(a=i),r.window.set(n.subarray(e-i,e-i+a),r.wnext),i-=a,i?(r.window.set(n.subarray(e-i,e),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave{let e,i,a,r,u,d,g,_,y,I,k,D,U,H,Z=0,j,mt,dt,nt,Ot,Yt,zt,ht,tt=new Uint8Array(4),xt,z,Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ml(t)||!t.output||!t.input&&t.avail_in!==0)return fo;e=t.state,e.mode===xr&&(e.mode=Ld),u=t.next_out,a=t.output,g=t.avail_out,r=t.next_in,i=t.input,d=t.avail_in,_=e.hold,y=e.bits,I=d,k=g,ht=Al;t:for(;;)switch(e.mode){case nm:if(e.wrap===0){e.mode=Ld;break}for(;y<16;){if(d===0)break t;d--,_+=i[r++]<>>8&255,e.check=da(e.check,tt,2,0),_=0,y=0,e.mode=rh;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((_&255)<<8)+(_>>8))%31){t.msg="incorrect header check",e.mode=Ii;break}if((_&15)!==oh){t.msg="unknown compression method",e.mode=Ii;break}if(_>>>=4,y-=4,zt=(_&15)+8,e.wbits===0&&(e.wbits=zt),zt>15||zt>e.wbits){t.msg="invalid window size",e.mode=Ii;break}e.dmax=1<>8&1),e.flags&512&&e.wrap&4&&(tt[0]=_&255,tt[1]=_>>>8&255,e.check=da(e.check,tt,2,0)),_=0,y=0,e.mode=lh;case lh:for(;y<32;){if(d===0)break t;d--,_+=i[r++]<>>8&255,tt[2]=_>>>16&255,tt[3]=_>>>24&255,e.check=da(e.check,tt,4,0)),_=0,y=0,e.mode=sh;case sh:for(;y<16;){if(d===0)break t;d--,_+=i[r++]<>8),e.flags&512&&e.wrap&4&&(tt[0]=_&255,tt[1]=_>>>8&255,e.check=da(e.check,tt,2,0)),_=0,y=0,e.mode=ch;case ch:if(e.flags&1024){for(;y<16;){if(d===0)break t;d--,_+=i[r++]<>>8&255,e.check=da(e.check,tt,2,0)),_=0,y=0}else e.head&&(e.head.extra=null);e.mode=ph;case ph:if(e.flags&1024&&(D=e.length,D>d&&(D=d),D&&(e.head&&(zt=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(i.subarray(r,r+D),zt)),e.flags&512&&e.wrap&4&&(e.check=da(e.check,i,D,r)),d-=D,r+=D,e.length-=D),e.length))break t;e.length=0,e.mode=mh;case mh:if(e.flags&2048){if(d===0)break t;D=0;do zt=i[r+D++],e.head&&zt&&e.length<65536&&(e.head.name+=String.fromCharCode(zt));while(zt&&D>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=xr;break;case fh:for(;y<32;){if(d===0)break t;d--,_+=i[r++]<>>=y&7,y-=y&7,e.mode=Fd;break}for(;y<3;){if(d===0)break t;d--,_+=i[r++]<>>=1,y-=1,_&3){case 0:e.mode=hh;break;case 1:if(D5(e),e.mode=Yp,n===$p){_>>>=2,y-=2;break t}break;case 2:e.mode=_h;break;case 3:t.msg="invalid block type",e.mode=Ii}_>>>=2,y-=2;break;case hh:for(_>>>=y&7,y-=y&7;y<32;){if(d===0)break t;d--,_+=i[r++]<>>16^65535)){t.msg="invalid stored block lengths",e.mode=Ii;break}if(e.length=_&65535,_=0,y=0,e.mode=kd,n===$p)break t;case kd:e.mode=gh;case gh:if(D=e.length,D){if(D>d&&(D=d),D>g&&(D=g),D===0)break t;a.set(i.subarray(r,r+D),u),d-=D,r+=D,g-=D,u+=D,e.length-=D;break}e.mode=xr;break;case _h:for(;y<14;){if(d===0)break t;d--,_+=i[r++]<>>=5,y-=5,e.ndist=(_&31)+1,_>>>=5,y-=5,e.ncode=(_&15)+4,_>>>=4,y-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=Ii;break}e.have=0,e.mode=Ch;case Ch:for(;e.have>>=3,y-=3}for(;e.have<19;)e.lens[Y[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,xt={bits:e.lenbits},ht=dc(u5,e.lens,0,19,e.lencode,0,e.work,xt),e.lenbits=xt.bits,ht){t.msg="invalid code lengths set",e.mode=Ii;break}e.have=0,e.mode=bh;case bh:for(;e.have>>24,mt=Z>>>16&255,dt=Z&65535,!(j<=y);){if(d===0)break t;d--,_+=i[r++]<>>=j,y-=j,e.lens[e.have++]=dt;else{if(dt===16){for(z=j+2;y>>=j,y-=j,e.have===0){t.msg="invalid bit length repeat",e.mode=Ii;break}zt=e.lens[e.have-1],D=3+(_&3),_>>>=2,y-=2}else if(dt===17){for(z=j+3;y>>=j,y-=j,zt=0,D=3+(_&7),_>>>=3,y-=3}else{for(z=j+7;y>>=j,y-=j,zt=0,D=11+(_&127),_>>>=7,y-=7}if(e.have+D>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=Ii;break}for(;D--;)e.lens[e.have++]=zt}}if(e.mode===Ii)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=Ii;break}if(e.lenbits=9,xt={bits:e.lenbits},ht=dc(Qh,e.lens,0,e.nlen,e.lencode,0,e.work,xt),e.lenbits=xt.bits,ht){t.msg="invalid literal/lengths set",e.mode=Ii;break}if(e.distbits=6,e.distcode=e.distdyn,xt={bits:e.distbits},ht=dc(t2,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,xt),e.distbits=xt.bits,ht){t.msg="invalid distances set",e.mode=Ii;break}if(e.mode=Yp,n===$p)break t;case Yp:e.mode=Kp;case Kp:if(d>=6&&g>=258){t.next_out=u,t.avail_out=g,t.next_in=r,t.avail_in=d,e.hold=_,e.bits=y,l5(t,k),u=t.next_out,a=t.output,g=t.avail_out,r=t.next_in,i=t.input,d=t.avail_in,_=e.hold,y=e.bits,e.mode===xr&&(e.back=-1);break}for(e.back=0;Z=e.lencode[_&(1<>>24,mt=Z>>>16&255,dt=Z&65535,!(j<=y);){if(d===0)break t;d--,_+=i[r++]<>nt)],j=Z>>>24,mt=Z>>>16&255,dt=Z&65535,!(nt+j<=y);){if(d===0)break t;d--,_+=i[r++]<>>=nt,y-=nt,e.back+=nt}if(_>>>=j,y-=j,e.back+=j,e.length=dt,mt===0){e.mode=Dh;break}if(mt&32){e.back=-1,e.mode=xr;break}if(mt&64){t.msg="invalid literal/length code",e.mode=Ii;break}e.extra=mt&15,e.mode=vh;case vh:if(e.extra){for(z=e.extra;y>>=e.extra,y-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=xh;case xh:for(;Z=e.distcode[_&(1<>>24,mt=Z>>>16&255,dt=Z&65535,!(j<=y);){if(d===0)break t;d--,_+=i[r++]<>nt)],j=Z>>>24,mt=Z>>>16&255,dt=Z&65535,!(nt+j<=y);){if(d===0)break t;d--,_+=i[r++]<>>=nt,y-=nt,e.back+=nt}if(_>>>=j,y-=j,e.back+=j,mt&64){t.msg="invalid distance code",e.mode=Ii;break}e.offset=dt,e.extra=mt&15,e.mode=yh;case yh:if(e.extra){for(z=e.extra;y>>=e.extra,y-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=Ii;break}e.mode=Sh;case Sh:if(g===0)break t;if(D=k-g,e.offset>D){if(D=e.offset-D,D>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=Ii;break}D>e.wnext?(D-=e.wnext,U=e.wsize-D):U=e.wnext-D,D>e.length&&(D=e.length),H=e.window}else H=a,U=u-e.offset,D=e.length;D>g&&(D=g),g-=D,e.length-=D;do a[u++]=H[U++];while(--D);e.length===0&&(e.mode=Kp);break;case Dh:if(g===0)break t;a[u++]=e.length,g--,e.mode=Kp;break;case Fd:if(e.wrap){for(;y<32;){if(d===0)break t;d--,_|=i[r++]<{if(Ml(t))return fo;let n=t.state;return n.window&&(n.window=null),t.state=null,Al},T5=(t,n)=>{if(Ml(t))return fo;let e=t.state;return(e.wrap&2)===0?fo:(e.head=n,n.done=!1,Al)},A5=(t,n)=>{let e=n.length,i,a,r;return Ml(t)||(i=t.state,i.wrap!==0&&i.mode!==Qp)?fo:i.mode===Qp&&(a=1,a=_c(a,n,e,0),a!==i.check)?e2:(r=c2(t,n,e,e),r?(i.mode=i2,n2):(i.havedict=1,Al))},M5=r2,O5=l2,I5=o2,E5=S5,L5=s2,k5=w5,F5=P5,N5=T5,R5=A5,B5="pako inflate (from Nodeca project)",Sr={inflateReset:M5,inflateReset2:O5,inflateResetKeep:I5,inflateInit:E5,inflateInit2:L5,inflate:k5,inflateEnd:F5,inflateGetHeader:N5,inflateSetDictionary:R5,inflateInfo:B5};function q5(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var z5=q5,p2=Object.prototype.toString,{Z_NO_FLUSH:j5,Z_FINISH:V5,Z_OK:vc,Z_STREAM_END:Bd,Z_NEED_DICT:qd,Z_STREAM_ERROR:U5,Z_DATA_ERROR:Mh,Z_MEM_ERROR:H5}=ms;function Dc(t){this.options=em.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(t&&t.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15)===0&&(n.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jh,this.strm.avail_out=0;let e=Sr.inflateInit2(this.strm,n.windowBits);if(e!==vc)throw new Error(Pl[e]);if(this.header=new z5,Sr.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary=="string"?n.dictionary=bc.string2buf(n.dictionary):p2.call(n.dictionary)==="[object ArrayBuffer]"&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(e=Sr.inflateSetDictionary(this.strm,n.dictionary),e!==vc)))throw new Error(Pl[e])}Dc.prototype.push=function(t,n){let e=this.strm,i=this.options.chunkSize,a=this.options.dictionary,r,u,d;if(this.ended)return!1;for(n===~~n?u=n:u=n===!0?V5:j5,p2.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),r=Sr.inflate(e,u),r===qd&&a&&(r=Sr.inflateSetDictionary(e,a),r===vc?r=Sr.inflate(e,u):r===Mh&&(r=qd));e.avail_in>0&&r===Bd&&e.state.wrap>0&&t[e.next_in]!==0;)Sr.inflateReset(e),r=Sr.inflate(e,u);switch(r){case U5:case Mh:case qd:case H5:return this.onEnd(r),this.ended=!0,!1}if(d=e.avail_out,e.next_out&&(e.avail_out===0||r===Bd))if(this.options.to==="string"){let g=bc.utf8border(e.output,e.next_out),_=e.next_out-g,y=bc.buf2string(e.output,g);e.next_out=_,e.avail_out=i-_,_&&e.output.set(e.output.subarray(g,g+_),0),this.onData(y)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(r===vc&&d===0)){if(r===Bd)return r=Sr.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};Dc.prototype.onData=function(t){this.chunks.push(t)};Dc.prototype.onEnd=function(t){t===vc&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=em.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function eu(t,n){let e=new Dc(n);if(e.push(t),e.err)throw e.msg||Pl[e.err];return e.result}function G5(t,n){return n=n||{},n.raw=!0,eu(t,n)}var W5=Dc,$5=eu,Y5=G5,K5=eu,Z5=ms,J5={Inflate:W5,inflate:$5,inflateRaw:Y5,ungzip:K5,constants:Z5},{Deflate:sB,deflate:cB,deflateRaw:pB,gzip:mB}=o5,{Inflate:X5,inflate:Q5,inflateRaw:dB,ungzip:uB}=J5;var nu=X5,m2=Q5;var u2=[];for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)n&1?n=3988292384^n>>>1:n=n>>>1;u2[t]=n}var d2=4294967295;function t3(t,n,e){let i=t;for(let a=0;a>>8;return i}function e3(t,n){return(t3(d2,t,n)^d2)>>>0}function iu(t,n,e){let i=t.readUint32(),a=e3(new Uint8Array(t.buffer,t.byteOffset+t.offset-n-4,n),n);if(a!==i)throw new Error(`CRC mismatch for chunk ${e}. Expected ${i}, found ${a}`)}function im(t,n,e){for(let i=0;i>1)&255}else{for(;r>1)&255;for(;r>1)&255}}function lm(t,n,e,i,a){let r=0;if(e.length===0){for(;r=e||Yt>=i))for(let zt=0;zt>8&255}var l3=new Uint16Array([255]),s3=new Uint8Array(l3.buffer),c3=s3[0]===255,p3=new Uint8Array(0);function au(t){let{data:n,width:e,height:i,channels:a,depth:r}=t,u=Math.ceil(r/8)*a,d=Math.ceil(r/8*a*e),g=new Uint8Array(i*d),_=p3,y=0,I,k;for(let D=0;D>8&255}var sm=Uint8Array.of(137,80,78,71,13,10,26,10);function ou(t){if(!g2(t.readBytes(sm.length)))throw new Error("wrong PNG signature")}function g2(t){if(t.length79)throw new Error("keyword length must be between 1 and 79")}var h3=/^[\u0000-\u00FF]*$/;function g3(t){if(!h3.test(t))throw new Error("invalid latin1 text")}function b2(t,n,e){let i=ru(n);t[i]=_3(n,e-i.length-1)}function ru(t){for(t.mark();t.readByte()!==u3;);let n=t.offset;t.reset();let e=C2.decode(t.readBytes(n-t.offset-1));return t.skip(1),f3(e),e}function _3(t,n){return C2.decode(t.readBytes(n))}var Na={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},wc={UNKNOWN:-1,DEFLATE:0},cm={UNKNOWN:-1,ADAPTIVE:0},Pc={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Tc={NONE:0,BACKGROUND:1,PREVIOUS:2},pm={SOURCE:0,OVER:1};var mm=class extends rc{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(n,e={}){super(n);let{checkCrc:i=!1}=e;this._checkCrc=i,this._inflator=new nu,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=wc.UNKNOWN,this._filterMethod=cm.UNKNOWN,this._interlaceMethod=Pc.UNKNOWN,this._colorType=Na.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(ou(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeChunk(n,e)}return this.decodeImage(),this._png}decodeApng(){for(ou(this);!this._end;){let n=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(n,e)}return this.decodeApngImage(),this._apng}decodeChunk(n,e){let i=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case _2:b2(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?iu(this,n+4,e):this.skip(4)}decodeApngChunk(n,e){let i=this.offset;switch(e!=="fdAT"&&e!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,e),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?iu(this,n+4,e):this.skip(4)}decodeIHDR(){let n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=C3(this.readUint8());let e=this.readUint8();this._colorType=e;let i;switch(e){case Na.GREYSCALE:i=1;break;case Na.TRUECOLOUR:i=3;break;case Na.INDEXED_COLOUR:i=1;break;case Na.GREYSCALE_ALPHA:i=2;break;case Na.TRUECOLOUR_ALPHA:i=4;break;case Na.UNKNOWN:default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==wc.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);let e=n/3;this._hasPalette=!0;let i=[];this._palette=i;for(let a=0;athis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let e=0;ethis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${n} vs ${this._palette.length})`);let e=0;for(;e{let d=((r+e.yOffset)*this._png.width+e.xOffset+u)*this._png.channels,g=(r*e.width+u)*this._png.channels;return{index:d,frameIndex:g}};switch(e.blendOp){case pm.SOURCE:for(let r=0;r=200&&n.status<=299}function dm(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var Ol=An.saveAs||((typeof window>"u"?"undefined":_i(window))!=="object"||window!==An?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,n,e){var i=An.URL||An.webkitURL,a=document.createElement("a");n=n||t.name||"download",a.download=n,a.rel="noopener",typeof t=="string"?(a.href=t,a.origin!==location.origin?x2(a.href)?su(t,n,e):dm(a,a.target="_blank"):dm(a)):(a.href=i.createObjectURL(t),setTimeout(function(){i.revokeObjectURL(a.href)},4e4),setTimeout(function(){dm(a)},0))}:"msSaveOrOpenBlob"in navigator?function(t,n,e){if(n=n||t.name||"download",typeof t=="string")if(x2(t))su(t,n,e);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){dm(i)})}else navigator.msSaveOrOpenBlob((function(a,r){return r===void 0?r={autoBom:!1}:_i(r)!=="object"&&(vi.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a})(t,e),n)}:function(t,n,e,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof t=="string")return su(t,n,e);var a=t.type==="application/octet-stream",r=/constructor/i.test(An.HTMLElement)||An.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&r)&&(typeof FileReader>"u"?"undefined":_i(FileReader))==="object"){var d=new FileReader;d.onloadend=function(){var y=d.result;y=u?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=y:location=y,i=null},d.readAsDataURL(t)}else{var g=An.URL||An.webkitURL,_=g.createObjectURL(t);i?i.location=_:location.href=_,i=null,setTimeout(function(){g.revokeObjectURL(_)},4e4)}});function G2(t){var n;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(d){return[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(d){return[parseInt(d[1],16),parseInt(d[2],16),parseInt(d[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(d){return[parseInt(d[1]+d[1],16),parseInt(d[2]+d[2],16),parseInt(d[3]+d[3],16)]}}],i=0;i255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var d=this.r.toString(16),g=this.g.toString(16),_=this.b.toString(16);return d.length==1&&(d="0"+d),g.length==1&&(g="0"+g),_.length==1&&(_="0"+_),"#"+d+g+_}}var gm=An.atob.bind(An),y2=An.btoa.bind(An);function cu(t,n){var e=t[0],i=t[1],a=t[2],r=t[3];e=Pa(e,i,a,r,n[0],7,-680876936),r=Pa(r,e,i,a,n[1],12,-389564586),a=Pa(a,r,e,i,n[2],17,606105819),i=Pa(i,a,r,e,n[3],22,-1044525330),e=Pa(e,i,a,r,n[4],7,-176418897),r=Pa(r,e,i,a,n[5],12,1200080426),a=Pa(a,r,e,i,n[6],17,-1473231341),i=Pa(i,a,r,e,n[7],22,-45705983),e=Pa(e,i,a,r,n[8],7,1770035416),r=Pa(r,e,i,a,n[9],12,-1958414417),a=Pa(a,r,e,i,n[10],17,-42063),i=Pa(i,a,r,e,n[11],22,-1990404162),e=Pa(e,i,a,r,n[12],7,1804603682),r=Pa(r,e,i,a,n[13],12,-40341101),a=Pa(a,r,e,i,n[14],17,-1502002290),e=Ta(e,i=Pa(i,a,r,e,n[15],22,1236535329),a,r,n[1],5,-165796510),r=Ta(r,e,i,a,n[6],9,-1069501632),a=Ta(a,r,e,i,n[11],14,643717713),i=Ta(i,a,r,e,n[0],20,-373897302),e=Ta(e,i,a,r,n[5],5,-701558691),r=Ta(r,e,i,a,n[10],9,38016083),a=Ta(a,r,e,i,n[15],14,-660478335),i=Ta(i,a,r,e,n[4],20,-405537848),e=Ta(e,i,a,r,n[9],5,568446438),r=Ta(r,e,i,a,n[14],9,-1019803690),a=Ta(a,r,e,i,n[3],14,-187363961),i=Ta(i,a,r,e,n[8],20,1163531501),e=Ta(e,i,a,r,n[13],5,-1444681467),r=Ta(r,e,i,a,n[2],9,-51403784),a=Ta(a,r,e,i,n[7],14,1735328473),e=Aa(e,i=Ta(i,a,r,e,n[12],20,-1926607734),a,r,n[5],4,-378558),r=Aa(r,e,i,a,n[8],11,-2022574463),a=Aa(a,r,e,i,n[11],16,1839030562),i=Aa(i,a,r,e,n[14],23,-35309556),e=Aa(e,i,a,r,n[1],4,-1530992060),r=Aa(r,e,i,a,n[4],11,1272893353),a=Aa(a,r,e,i,n[7],16,-155497632),i=Aa(i,a,r,e,n[10],23,-1094730640),e=Aa(e,i,a,r,n[13],4,681279174),r=Aa(r,e,i,a,n[0],11,-358537222),a=Aa(a,r,e,i,n[3],16,-722521979),i=Aa(i,a,r,e,n[6],23,76029189),e=Aa(e,i,a,r,n[9],4,-640364487),r=Aa(r,e,i,a,n[12],11,-421815835),a=Aa(a,r,e,i,n[15],16,530742520),e=Ma(e,i=Aa(i,a,r,e,n[2],23,-995338651),a,r,n[0],6,-198630844),r=Ma(r,e,i,a,n[7],10,1126891415),a=Ma(a,r,e,i,n[14],15,-1416354905),i=Ma(i,a,r,e,n[5],21,-57434055),e=Ma(e,i,a,r,n[12],6,1700485571),r=Ma(r,e,i,a,n[3],10,-1894986606),a=Ma(a,r,e,i,n[10],15,-1051523),i=Ma(i,a,r,e,n[1],21,-2054922799),e=Ma(e,i,a,r,n[8],6,1873313359),r=Ma(r,e,i,a,n[15],10,-30611744),a=Ma(a,r,e,i,n[6],15,-1560198380),i=Ma(i,a,r,e,n[13],21,1309151649),e=Ma(e,i,a,r,n[4],6,-145523070),r=Ma(r,e,i,a,n[11],10,-1120210379),a=Ma(a,r,e,i,n[2],15,718787259),i=Ma(i,a,r,e,n[9],21,-343485551),t[0]=Qr(e,t[0]),t[1]=Qr(i,t[1]),t[2]=Qr(a,t[2]),t[3]=Qr(r,t[3])}function Sm(t,n,e,i,a,r){return n=Qr(Qr(n,t),Qr(i,r)),Qr(n<>>32-a,e)}function Pa(t,n,e,i,a,r,u){return Sm(n&e|~n&i,t,n,a,r,u)}function Ta(t,n,e,i,a,r,u){return Sm(n&i|e&~i,t,n,a,r,u)}function Aa(t,n,e,i,a,r,u){return Sm(n^e^i,t,n,a,r,u)}function Ma(t,n,e,i,a,r,u){return Sm(e^(n|~i),t,n,a,r,u)}function W2(t){var n,e=t.length,i=[1732584193,-271733879,-1732584194,271733878];for(n=64;n<=t.length;n+=64)cu(i,b3(t.substring(n-64,n)));t=t.substring(n-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(n=0;n>2]|=t.charCodeAt(n)<<(n%4<<3);if(a[n>>2]|=128<<(n%4<<3),n>55)for(cu(i,a),n=0;n<16;n++)a[n]=0;return a[14]=8*e,cu(i,a),i}function b3(t){var n,e=[];for(n=0;n<64;n+=4)e[n>>2]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24);return e}var S2="0123456789abcdef".split("");function v3(t){for(var n="",e=0;e<4;e++)n+=S2[t>>8*e+4&15]+S2[t>>8*e&15];return n}function x3(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function hu(t){return W2(t).map(x3).join("")}var y3=(function(t){for(var n=0;n>16)+(n>>16)+(e>>16)<<16|65535&e}return t+n&4294967295}function gu(t,n){var e,i,a,r;if(t!==e){for(var u=(a=t,r=1+(256/t.length|0),new Array(r+1).join(a)),d=[],g=0;g<256;g++)d[g]=g;var _=0;for(g=0;g<256;g++){var y=d[g];_=(_+y+u.charCodeAt(g))%256,d[g]=d[_],d[_]=y}e=t,i=d}else d=i;var I=n.length,k=0,D=0,U="";for(g=0;g\x80/\f\xA9\xFEdSiz";var r=(n+this.padding).substr(0,32),u=(e+this.padding).substr(0,32);this.O=this.processOwnerPassword(r,u),this.P=-(1+(255^a)),this.encryptionKey=hu(r+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=gu(this.encryptionKey,this.padding)}function _s(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var n="",e=t.length,i=0;i126?"#"+("0"+a.toString(16)).slice(-2):t[i]}return n}function w2(t){if(_i(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(e,i,a){if(a=a||!1,typeof e!="string"||typeof i!="function"||typeof a!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(e)||(n[e]={});var r=Math.random().toString(35);return n[e][r]=[i,!!a],r},this.unsubscribe=function(e){for(var i in n)if(n[i][e])return delete n[i][e],Object.keys(n[i]).length===0&&delete n[i],!0;return!1},this.publish=function(e){if(n.hasOwnProperty(e)){var i=Array.prototype.slice.call(arguments,1),a=[];for(var r in n[e]){var u=n[e][r];try{u[0].apply(t,i)}catch(d){An.console&&vi.error("jsPDF PubSub Error",d.message,d)}u[1]&&a.push(r)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function xm(t){if(!(this instanceof xm))return new xm(t);var n="opacity,stroke-opacity".split(",");for(var e in t)t.hasOwnProperty(e)&&n.indexOf(e)>=0&&(this[e]=t[e]);this.id="",this.objectNumber=-1}function $2(t,n){this.gState=t,this.matrix=n,this.id="",this.objectNumber=-1}function Il(t,n,e,i,a){if(!(this instanceof Il))return new Il(t,n,e,i,a);this.type=t==="axial"?2:3,this.coords=n,this.colors=e,$2.call(this,i,a)}function Cs(t,n,e,i,a){if(!(this instanceof Cs))return new Cs(t,n,e,i,a);this.boundingBox=t,this.xStep=n,this.yStep=e,this.stream="",this.cloneIndex=0,$2.call(this,i,a)}function Ke(t){var n,e=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],a=arguments[2],r=arguments[3],u=[],d=1,g=16,_="S",y=null;_i(t=t||{})==="object"&&(e=t.orientation,i=t.unit||i,a=t.format||a,r=t.compress||t.compressPdf||r,(y=t.encryption||null)!==null&&(y.userPassword=y.userPassword||"",y.ownerPassword=y.ownerPassword||"",y.userPermissions=y.userPermissions||[]),d=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(n=t.precision),t.floatPrecision!==void 0&&(g=t.floatPrecision),_=t.defaultPathOperation||"S"),u=t.filters||(r===!0?["FlateEncode"]:u),i=i||"mm",e=(""+(e||"P")).toLowerCase();var I=t.putOnlyUsedFonts||!1,k={},D={internal:{},__private__:{}};D.__private__.PubSub=w2;var U="1.3",H=D.__private__.getPdfVersion=function(){return U};D.__private__.setPdfVersion=function(v){U=v};var Z={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};D.__private__.getPageFormats=function(){return Z};var j=D.__private__.getPageFormat=function(v){return Z[v]};a=a||"a4";var mt="compat",dt="advanced",nt=mt;function Ot(){this.saveGraphicsState(),G(new dn(Rn,0,0,-Rn,0,ml()*Rn).toString()+" cm"),this.setFontSize(this.getFontSize()/Rn),_="n",nt=dt}function Yt(){this.restoreGraphicsState(),_="S",nt=mt}var zt=D.__private__.combineFontStyleAndFontWeight=function(v,E){if(v=="bold"&&E=="normal"||v=="bold"&&E==400||v=="normal"&&E=="italic"||v=="bold"&&E=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return E&&(v=E==400||E==="normal"?v==="italic"?"italic":"normal":E!=700&&E!=="bold"||v!=="normal"?(E==700?"bold":E)+""+v:"bold"),v};D.advancedAPI=function(v){var E=nt===mt;return E&&Ot.call(this),typeof v!="function"||(v(this),E&&Yt.call(this)),this},D.compatAPI=function(v){var E=nt===dt;return E&&Yt.call(this),typeof v!="function"||(v(this),E&&Ot.call(this)),this},D.isAdvancedAPI=function(){return nt===dt};var ht,tt=function(v){if(nt!==dt)throw new Error(v+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},xt=D.roundToPrecision=D.__private__.roundToPrecision=function(v,E){var K=n||E;if(isNaN(v)||isNaN(K))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return v.toFixed(K).replace(/0+$/,"")};ht=D.hpf=D.__private__.hpf=typeof g=="number"?function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.hpf");return xt(v,g)}:g==="smart"?function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.hpf");return xt(v,v>-1&&v<1?16:5)}:function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.hpf");return xt(v,16)};var z=D.f2=D.__private__.f2=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.f2");return xt(v,2)},Y=D.__private__.f3=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.f3");return xt(v,3)},rt=D.scale=D.__private__.scale=function(v){if(isNaN(v))throw new Error("Invalid argument passed to jsPDF.scale");return nt===mt?v*Rn:nt===dt?v:void 0},ot=function(v){return rt((function(E){return nt===mt?ml()-E:nt===dt?E:void 0})(v))};D.__private__.setPrecision=D.setPrecision=function(v){typeof parseInt(v,10)=="number"&&(n=parseInt(v,10))};var Mt,Ft="00000000000000000000000000000000",Rt=D.__private__.getFileId=function(){return Ft},St=D.__private__.setFileId=function(v){return Ft=v!==void 0&&/^[a-fA-F0-9]{32}$/.test(v)?v.toUpperCase():Ft.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),y!==null&&(ta=new gs(y.userPermissions,y.userPassword,y.ownerPassword,Ft)),Ft};D.setFileId=function(v){return St(v),this},D.getFileId=function(){return Rt()};var qt=D.__private__.convertDateToPDFDate=function(v){var E=v.getTimezoneOffset(),K=E<0?"+":"-",at=Math.floor(Math.abs(E/60)),gt=Math.abs(E%60),jt=[K,et(at),"'",et(gt),"'"].join("");return["D:",v.getFullYear(),et(v.getMonth()+1),et(v.getDate()),et(v.getHours()),et(v.getMinutes()),et(v.getSeconds()),jt].join("")},se=D.__private__.convertPDFDateToDate=function(v){var E=parseInt(v.substr(2,4),10),K=parseInt(v.substr(6,2),10)-1,at=parseInt(v.substr(8,2),10),gt=parseInt(v.substr(10,2),10),jt=parseInt(v.substr(12,2),10),Kt=parseInt(v.substr(14,2),10);return new Date(E,K,at,gt,jt,Kt,0)},Xt=D.__private__.setCreationDate=function(v){var E;if(v===void 0&&(v=new Date),v instanceof Date)E=qt(v);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(v))throw new Error("Invalid argument passed to jsPDF.setCreationDate");E=v}return Mt=E},B=D.__private__.getCreationDate=function(v){var E=Mt;return v==="jsDate"&&(E=se(Mt)),E};D.setCreationDate=function(v){return Xt(v),this},D.getCreationDate=function(v){return B(v)};var J,et=D.__private__.padd2=function(v){return("0"+parseInt(v)).slice(-2)},ct=D.__private__.padd2Hex=function(v){return("00"+(v=v.toString())).substr(v.length)},ft=0,bt=[],Lt=[],kt=0,Ht=[],re=[],Ie=!1,De=Lt;D.__private__.setCustomOutputDestination=function(v){Ie=!0,De=v};var on=function(v){Ie||(De=v)};D.__private__.resetCustomOutputDestination=function(){Ie=!1,De=Lt};var G=D.__private__.out=function(v){return v=v.toString(),kt+=v.length+1,De.push(v),De},ye=D.__private__.write=function(v){return G(arguments.length===1?v.toString():Array.prototype.join.call(arguments," "))},jn=D.__private__.getArrayBuffer=function(v){for(var E=v.length,K=new ArrayBuffer(E),at=new Uint8Array(K);E--;)at[E]=v.charCodeAt(E);return K},cn=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];D.__private__.getStandardFonts=function(){return cn};var Qt=t.fontSize||16;D.__private__.setFontSize=D.setFontSize=function(v){return Qt=nt===dt?v/Rn:v,this};var pn,Be=D.__private__.getFontSize=D.getFontSize=function(){return nt===mt?Qt:Qt*Rn},sn=t.R2L||!1;D.__private__.setR2L=D.setR2L=function(v){return sn=v,this},D.__private__.getR2L=D.getR2L=function(){return sn};var rn,mi=D.__private__.setZoomMode=function(v){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(v))pn=v;else if(isNaN(v)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(v)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+v+'" is not recognized.');pn=v}else pn=parseInt(v,10)};D.__private__.getZoomMode=function(){return pn};var Kn,kn=D.__private__.setPageMode=function(v){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(v)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+v+'" is not recognized.');rn=v};D.__private__.getPageMode=function(){return rn};var Jn=D.__private__.setLayoutMode=function(v){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(v)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+v+'" is not recognized.');Kn=v};D.__private__.getLayoutMode=function(){return Kn},D.__private__.setDisplayMode=D.setDisplayMode=function(v,E,K){return mi(v),Jn(E),kn(K),this};var Zn={title:"",subject:"",author:"",keywords:"",creator:""};D.__private__.getDocumentProperty=function(v){if(Object.keys(Zn).indexOf(v)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Zn[v]},D.__private__.getDocumentProperties=function(){return Zn},D.__private__.setDocumentProperties=D.setProperties=D.setDocumentProperties=function(v){for(var E in Zn)Zn.hasOwnProperty(E)&&v[E]&&(Zn[E]=v[E]);return this},D.__private__.setDocumentProperty=function(v,E){if(Object.keys(Zn).indexOf(v)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Zn[v]=E};var We,Rn,Xe,zi,ii,Vn={},Un={},Ti=[],ln={},yi={},hn={},Fn={},Ai=null,Hn=0,mn=[],di=new w2(D),il=t.hotfixes||[],xa={},er={},Lo=[],dn=function v(E,K,at,gt,jt,Kt){if(!(this instanceof v))return new v(E,K,at,gt,jt,Kt);isNaN(E)&&(E=1),isNaN(K)&&(K=0),isNaN(at)&&(at=0),isNaN(gt)&&(gt=1),isNaN(jt)&&(jt=0),isNaN(Kt)&&(Kt=0),this._matrix=[E,K,at,gt,jt,Kt]};Object.defineProperty(dn.prototype,"sx",{get:function(){return this._matrix[0]},set:function(v){this._matrix[0]=v}}),Object.defineProperty(dn.prototype,"shy",{get:function(){return this._matrix[1]},set:function(v){this._matrix[1]=v}}),Object.defineProperty(dn.prototype,"shx",{get:function(){return this._matrix[2]},set:function(v){this._matrix[2]=v}}),Object.defineProperty(dn.prototype,"sy",{get:function(){return this._matrix[3]},set:function(v){this._matrix[3]=v}}),Object.defineProperty(dn.prototype,"tx",{get:function(){return this._matrix[4]},set:function(v){this._matrix[4]=v}}),Object.defineProperty(dn.prototype,"ty",{get:function(){return this._matrix[5]},set:function(v){this._matrix[5]=v}}),Object.defineProperty(dn.prototype,"a",{get:function(){return this._matrix[0]},set:function(v){this._matrix[0]=v}}),Object.defineProperty(dn.prototype,"b",{get:function(){return this._matrix[1]},set:function(v){this._matrix[1]=v}}),Object.defineProperty(dn.prototype,"c",{get:function(){return this._matrix[2]},set:function(v){this._matrix[2]=v}}),Object.defineProperty(dn.prototype,"d",{get:function(){return this._matrix[3]},set:function(v){this._matrix[3]=v}}),Object.defineProperty(dn.prototype,"e",{get:function(){return this._matrix[4]},set:function(v){this._matrix[4]=v}}),Object.defineProperty(dn.prototype,"f",{get:function(){return this._matrix[5]},set:function(v){this._matrix[5]=v}}),Object.defineProperty(dn.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(dn.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(dn.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(dn.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),dn.prototype.join=function(v){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(ht).join(v)},dn.prototype.multiply=function(v){var E=v.sx*this.sx+v.shy*this.shx,K=v.sx*this.shy+v.shy*this.sy,at=v.shx*this.sx+v.sy*this.shx,gt=v.shx*this.shy+v.sy*this.sy,jt=v.tx*this.sx+v.ty*this.shx+this.tx,Kt=v.tx*this.shy+v.ty*this.sy+this.ty;return new dn(E,K,at,gt,jt,Kt)},dn.prototype.decompose=function(){var v=this.sx,E=this.shy,K=this.shx,at=this.sy,gt=this.tx,jt=this.ty,Kt=Math.sqrt(v*v+E*E),ze=(v/=Kt)*K+(E/=Kt)*at;K-=v*ze,at-=E*ze;var $e=Math.sqrt(K*K+at*at);return ze/=$e,v*(at/=$e)>16&255,at=$e>>8&255,gt=255&$e}if(at===void 0||jt===void 0&&K===at&&at===gt)E=typeof K=="string"?K+" "+Kt[0]:v.precision===2?z(K/255)+" "+Kt[0]:Y(K/255)+" "+Kt[0];else if(jt===void 0||_i(jt)==="object"){if(jt&&!isNaN(jt.a)&&jt.a===0)return["1.","1.","1.",Kt[1]].join(" ");E=typeof K=="string"?[K,at,gt,Kt[1]].join(" "):v.precision===2?[z(K/255),z(at/255),z(gt/255),Kt[1]].join(" "):[Y(K/255),Y(at/255),Y(gt/255),Kt[1]].join(" ")}else E=typeof K=="string"?[K,at,gt,jt,Kt[2]].join(" "):v.precision===2?[z(K),z(at),z(gt),z(jt),Kt[2]].join(" "):[Y(K),Y(at),Y(gt),Y(jt),Kt[2]].join(" ");return E},Co=D.__private__.getFilters=function(){return u},ao=D.__private__.putStream=function(v){var E=(v=v||{}).data||"",K=v.filters||Co(),at=v.alreadyAppliedFilters||[],gt=v.addLength1||!1,jt=E.length,Kt=v.objectId,ze=function(ea){return ea};if(y!==null&&Kt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");y!==null&&(ze=ta.encryptor(Kt,0));var $e={};K===!0&&(K=["FlateEncode"]);var Mn=v.additionalKeyValues||[],Bn=($e=Ke.API.processDataByFilters!==void 0?Ke.API.processDataByFilters(E,K):{data:E,reverseChain:[]}).reverseChain+(Array.isArray(at)?at.join(" "):at.toString());if($e.data.length!==0&&(Mn.push({key:"Length",value:$e.data.length}),gt===!0&&Mn.push({key:"Length1",value:jt})),Bn.length!=0)if(Bn.split("/").length-1==1)Mn.push({key:"Filter",value:Bn});else{Mn.push({key:"Filter",value:"["+Bn+"]"});for(var ai=0;ai>"),$e.data.length!==0&&(G("stream"),G(ze($e.data)),G("endstream"))},ol=D.__private__.putPage=function(v){var E=v.number,K=v.data,at=v.objId,gt=v.contentsObjId;fa(at,!0),G("<>"),G("endobj");var jt=K.join(` `);return nt===dt&&(jt+=` @@ -77,4 +77,4 @@ end end`};n.events.push(["putFont",function(r){(function(u){var d=u.font,g=u.out,_=u.newObject,y=u.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="Identity-H"){for(var I=d.metadata.Unicode.widths,k=d.metadata.subset.encode(d.metadata.glyIdsUsed,1),D="",U=0;U>"),g("endobj");var mt=_();g("<<"),g("/Type /Font"),g("/BaseFont /"+_s(d.fontName)),g("/FontDescriptor "+j+" 0 R"),g("/W "+t.API.PDFObject.convert(I)),g("/CIDToGIDMap /Identity"),g("/DW 1000"),g("/Subtype /CIDFontType2"),g("/CIDSystemInfo"),g("<<"),g("/Supplement 0"),g("/Registry (Adobe)"),g("/Ordering ("+d.encoding+")"),g(">>"),g(">>"),g("endobj"),d.objectNumber=_(),g("<<"),g("/Type /Font"),g("/Subtype /Type0"),g("/ToUnicode "+Z+" 0 R"),g("/BaseFont /"+_s(d.fontName)),g("/Encoding /"+d.encoding),g("/DescendantFonts ["+mt+" 0 R]"),g(">>"),g("endobj"),d.isAlreadyPutted=!0}})(r)}]),n.events.push(["putFont",function(r){(function(u){var d=u.font,g=u.out,_=u.newObject,y=u.putStream;if(d.metadata instanceof t.API.TTFFont&&d.encoding==="WinAnsiEncoding"){for(var I=d.metadata.rawData,k="",D=0;D>"),g("endobj"),d.objectNumber=_();for(var j=0;j>"),g("endobj"),d.isAlreadyPutted=!0}})(r)}]);var a=function(r){var u,d=r.text||"",g=r.x,_=r.y,y=r.options||{},I=r.mutex||{},k=I.pdfEscape,D=I.activeFontKey,U=I.fonts,H=D,Z="",j=0,mt="",dt=U[H].encoding;if(U[H].encoding!=="Identity-H")return{text:d,x:g,y:_,options:y,mutex:I};for(mt=d,H=D,Array.isArray(d)&&(mt=d[0]),j=0;j","<","[","]","[","{","}","{","\xAB","\xBB","\xAB","\u2039","\u203A","\u2039","\u2045","\u2046","\u2045","\u207D","\u207E","\u207D","\u208D","\u208E","\u208D","\u2264","\u2265","\u2264","\u2329","\u232A","\u2329","\uFE59","\uFE5A","\uFE59","\uFE5B","\uFE5C","\uFE5B","\uFE5D","\uFE5E","\uFE5D","\uFE64","\uFE65","\uFE64"],j=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),mt=!1,dt=0;this.__bidiEngine__={};var nt=function(z){var Y=z.charCodeAt(),rt=Y>>8,ot=H[rt];return ot!==void 0?I[256*ot+(255&Y)]:rt===252||rt===253?"AL":j.test(rt)?"L":rt===8?"R":"N"},Ot=function(z){for(var Y,rt=0;rt=Y.length||(Mt=rt[ot-1])!=="EN"&&Mt!=="AN"||(Ft=Y[ot+1])!=="EN"&&Ft!=="AN"?qt="N":mt&&(Ft="AN"),qt=Ft===Mt?Ft:"N";break;case"ES":qt=(Mt=ot>0?rt[ot-1]:"B")==="EN"&&ot+10&&rt[ot-1]==="EN"){qt="EN";break}if(mt){qt="N";break}for(Rt=ot+1,St=Y.length;Rt=1425&&se<=2303||se===64286;if(Mt=Y[Rt],Xt&&(Mt==="R"||Mt==="AL")){qt="R";break}}}qt=ot<1||(Mt=Y[ot-1])==="B"?"N":rt[ot-1];break;case"B":mt=!1,a=!0,qt=dt;break;case"S":r=!0,qt="N"}return qt},zt=function(z,Y,rt){var ot=z.split("");return rt&&ht(ot,rt,{hiLevel:dt}),ot.reverse(),Y&&Y.reverse(),ot.join("")},ht=function(z,Y,rt){var ot,Mt,Ft,Rt,St,qt=-1,se=z.length,Xt=0,B=[],J=dt?D:k,et=[];for(mt=!1,a=!1,r=!1,Mt=0;Mt0)if(ot===16){for(Mt=qt;Mt-1){for(Mt=qt;Mt=0&&ct[kt]==="WS";kt--)ft[kt]=dt}})(et,Y,se)},tt=function(z,Y,rt,ot,Mt){if(!(Mt.hiLevel=z){for(St=Xt+1;St=z;)St++;for(qt=Xt,Rt=St-1;qt=0&&(Ft[se]=Z[qt+1])})(ot,rt,Mt),tt(2,ot,Y,rt,Mt),tt(1,ot,Y,rt,Mt),ot.join("")};return this.__bidiEngine__.doBidiReorder=function(z,Y,rt){if((function(Mt,Ft){if(Ft)for(var Rt=0;Rt>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(r=this.familyClass)===1||r===2||r===3||r===4||r===5||r===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(n){var e;return((e=this.cmap.unicode)!=null?e.codeMap[n]:void 0)||0},t.prototype.widthOfGlyph=function(n){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(n).advance*e},t.prototype.widthOfString=function(n,e,i){var a,r,u,d;for(u=0,r=0,d=(n=""+n).length;0<=d?rd;r=0<=d?++r:--r)a=n.charCodeAt(r),u+=this.widthOfGlyph(this.characterToGlyph(a))+i*(1e3/e)||0;return u*(e/1e3)},t.prototype.lineHeight=function(n,e){var i;return e==null&&(e=!1),i=e?this.lineGap:0,(this.ascender+i-this.decender)/1e3*n},t})();var Mo,tl=(function(){function t(n){this.data=n??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(n){return this.data[this.pos++]=n},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(n){return this.writeByte(n>>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt32=function(){var n;return(n=this.readUInt32())>=2147483648?n-4294967296:n},t.prototype.writeInt32=function(n){return n<0&&(n+=4294967296),this.writeUInt32(n)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(n){return this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt16=function(){var n;return(n=this.readUInt16())>=32768?n-65536:n},t.prototype.writeInt16=function(n){return n<0&&(n+=65536),this.writeUInt16(n)},t.prototype.readString=function(n){var e,i;for(i=[],e=0;0<=n?en;e=0<=n?++e:--e)i[e]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(n){var e,i,a;for(a=[],e=0,i=n.length;0<=i?ei;e=0<=i?++e:--e)a.push(this.writeByte(n.charCodeAt(e)));return a},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(n){return this.writeInt16(n)},t.prototype.readLongLong=function(){var n,e,i,a,r,u,d,g;return n=this.readByte(),e=this.readByte(),i=this.readByte(),a=this.readByte(),r=this.readByte(),u=this.readByte(),d=this.readByte(),g=this.readByte(),128&n?-1*(72057594037927940*(255^n)+281474976710656*(255^e)+1099511627776*(255^i)+4294967296*(255^a)+16777216*(255^r)+65536*(255^u)+256*(255^d)+(255^g)+1):72057594037927940*n+281474976710656*e+1099511627776*i+4294967296*a+16777216*r+65536*u+256*d+g},t.prototype.writeLongLong=function(n){var e,i;return e=Math.floor(n/4294967296),i=4294967295&n,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(n){return this.writeInt32(n)},t.prototype.read=function(n){var e,i;for(e=[],i=0;0<=n?in;i=0<=n?++i:--i)e.push(this.readByte());return e},t.prototype.write=function(n){var e,i,a,r;for(r=[],i=0,a=n.length;ir;a=0<=r?++a:--a)i={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[i.tag]=i}return n.prototype.encode=function(e){var i,a,r,u,d,g,_,y,I,k,D,U,H;for(H in D=Object.keys(e).length,g=Math.log(2),I=16*Math.floor(Math.log(D)/g),u=Math.floor(I/g),y=16*D-I,(a=new tl).writeInt(this.scalarType),a.writeShort(D),a.writeShort(I),a.writeShort(u),a.writeShort(y),r=16*D,_=a.pos+r,d=null,U=[],e)for(k=e[H],a.writeString(H),a.writeInt(t(k)),a.writeInt(_),a.writeInt(k.length),U=U.concat(k),H==="head"&&(d=_),_+=k.length;_%4;)U.push(0),_++;return a.write(U),i=2981146554-t(a.data),a.pos=d+8,a.writeUInt32(i),a.data},t=function(e){var i,a,r,u;for(e=ig.call(e);e.length%4;)e.push(0);for(r=new tl(e),a=0,i=0,u=e.length;ik;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),n.pos+=2,H=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=k?ntk;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),_=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=k?ntk;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),y=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=k?ntk;g=0<=k?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),a=(this.length-n.pos+this.offset)/2,d=(function(){var nt,Ot;for(Ot=[],g=nt=0;0<=a?nta;g=0<=a?++nt:--nt)Ot.push(n.readUInt16());return Ot})(),g=j=0,dt=r.length;j=Z;i=U<=Z?++mt:--mt)y[g]===0?u=i+_[g]:(u=d[y[g]/2+(i-U)-(k-g)]||0)!==0&&(u+=_[g]),this.codeMap[i]=65535&u}n.pos=I}return t.encode=function(n,e){var i,a,r,u,d,g,_,y,I,k,D,U,H,Z,j,mt,dt,nt,Ot,Yt,zt,ht,tt,xt,z,Y,rt,ot,Mt,Ft,Rt,St,qt,se,Xt,B,J,et,ct,ft,bt,Lt,kt,Ht,re,Ie;switch(ot=new tl,u=Object.keys(n).sort(function(De,on){return De-on}),e){case"macroman":for(H=0,Z=(function(){var De=[];for(U=0;U<256;++U)De.push(0);return De})(),mt={0:0},r={},Mt=0,qt=u.length;Mt=32768)for(g.push(0),Yt.push(2*(D.length+tt-U)),a=St=z;z<=y?St<=y:St>=y;a=z<=y?++St:--St)D.push(i[a].new);else g.push(rt-z),Yt.push(0)}for(ot.writeUInt16(3),ot.writeUInt16(1),ot.writeUInt32(12),ot.writeUInt16(4),ot.writeUInt16(16+8*tt+2*D.length),ot.writeUInt16(0),ot.writeUInt16(xt),ot.writeUInt16(ht),ot.writeUInt16(k),ot.writeUInt16(zt),bt=0,B=I.length;bta;i=0<=a?++i:--i)e=new H2(n,this.offset),this.tables.push(e),e.isUnicode&&this.unicode==null&&(this.unicode=e);return!0},t.encode=function(n,e){var i,a;return e==null&&(e="macroman"),i=H2.encode(n,e),(a=new tl).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},t})(),U3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="hhea",t.prototype.parse=function(n){return n.pos=this.offset,this.version=n.readInt(),this.ascender=n.readShort(),this.decender=n.readShort(),this.lineGap=n.readShort(),this.advanceWidthMax=n.readShort(),this.minLeftSideBearing=n.readShort(),this.minRightSideBearing=n.readShort(),this.xMaxExtent=n.readShort(),this.caretSlopeRise=n.readShort(),this.caretSlopeRun=n.readShort(),this.caretOffset=n.readShort(),n.pos+=8,this.metricDataFormat=n.readShort(),this.numberOfMetrics=n.readUInt16()},t})(),H3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="OS/2",t.prototype.parse=function(n){if(n.pos=this.offset,this.version=n.readUInt16(),this.averageCharWidth=n.readShort(),this.weightClass=n.readUInt16(),this.widthClass=n.readUInt16(),this.type=n.readShort(),this.ySubscriptXSize=n.readShort(),this.ySubscriptYSize=n.readShort(),this.ySubscriptXOffset=n.readShort(),this.ySubscriptYOffset=n.readShort(),this.ySuperscriptXSize=n.readShort(),this.ySuperscriptYSize=n.readShort(),this.ySuperscriptXOffset=n.readShort(),this.ySuperscriptYOffset=n.readShort(),this.yStrikeoutSize=n.readShort(),this.yStrikeoutPosition=n.readShort(),this.familyClass=n.readShort(),this.panose=(function(){var e,i;for(i=[],e=0;e<10;++e)i.push(n.readByte());return i})(),this.charRange=(function(){var e,i;for(i=[],e=0;e<4;++e)i.push(n.readInt());return i})(),this.vendorID=n.readString(4),this.selection=n.readShort(),this.firstCharIndex=n.readShort(),this.lastCharIndex=n.readShort(),this.version>0&&(this.ascent=n.readShort(),this.descent=n.readShort(),this.lineGap=n.readShort(),this.winAscent=n.readShort(),this.winDescent=n.readShort(),this.codePageRange=(function(){var e,i;for(i=[],e=0;e<2;e=++e)i.push(n.readInt());return i})(),this.version>1))return this.xHeight=n.readShort(),this.capHeight=n.readShort(),this.defaultChar=n.readShort(),this.breakChar=n.readShort(),this.maxContext=n.readShort()},t})(),G3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="post",t.prototype.parse=function(n){var e,i,a;switch(n.pos=this.offset,this.format=n.readInt(),this.italicAngle=n.readInt(),this.underlinePosition=n.readShort(),this.underlineThickness=n.readShort(),this.isFixedPitch=n.readInt(),this.minMemType42=n.readInt(),this.maxMemType42=n.readInt(),this.minMemType1=n.readInt(),this.maxMemType1=n.readInt(),this.format){case 65536:case 196608:break;case 131072:var r;for(i=n.readUInt16(),this.glyphNameIndex=[],r=0;0<=i?ri;r=0<=i?++r:--r)this.glyphNameIndex.push(n.readUInt16());for(this.names=[],a=[];n.posd;r=0<=d?++u:--u)g.push(n.readUInt32());return g}.call(this)}},t})(),W3=function(t,n){this.raw=t,this.length=t.length,this.platformID=n.platformID,this.encodingID=n.encodingID,this.languageID=n.languageID},$3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="name",t.prototype.parse=function(n){var e,i,a,r,u,d,g,_,y,I,k;for(n.pos=this.offset,n.readShort(),e=n.readShort(),d=n.readShort(),i=[],r=0;0<=e?re;r=0<=e?++r:--r)i.push({platformID:n.readShort(),encodingID:n.readShort(),languageID:n.readShort(),nameID:n.readShort(),length:n.readShort(),offset:this.offset+d+n.readShort()});for(g={},r=y=0,I=i.length;yd;e=0<=d?++e:--e)this.metrics.push({advance:n.readUInt16(),lsb:n.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var _,y;for(y=[],e=_=0;0<=a?_a;e=0<=a?++_:--_)y.push(n.readInt16());return y})(),this.widths=function(){var _,y,I,k;for(k=[],_=0,y=(I=this.metrics).length;_a;e=0<=a?++u:--u)g.push(this.widths.push(i));return g},t.prototype.forGlyph=function(n){return n in this.metrics?this.metrics[n]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[n-this.metrics.length]}},t})(),ig=[].slice,Z3=(function(){function t(){return t.__super__.constructor.apply(this,arguments)}return tr(t,Mo),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(n){var e,i,a,r,u,d,g,_,y,I;return n in this.cache?this.cache[n]:(r=this.file.loca,e=this.file.contents,i=r.indexOf(n),(a=r.lengthOf(n))===0?this.cache[n]=null:(e.pos=this.offset+i,u=(d=new tl(e.read(a))).readShort(),_=d.readShort(),I=d.readShort(),g=d.readShort(),y=d.readShort(),this.cache[n]=u===-1?new X3(d,_,I,g,y):new J3(d,u,_,I,g,y),this.cache[n]))},t.prototype.encode=function(n,e,i){var a,r,u,d,g;for(u=[],r=[],d=0,g=e.length;d0&&(a+=g)}for(var _=new Array(4*i.length),y=0;y>8,_[4*y+1]=(16711680&i[y])>>16,_[4*y]=(4278190080&i[y])>>24;return _},t})(),ty=(function(){function t(n){this.font=n,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var n,e,i,a,r;for(e in a=this.font.cmap.tables[0].codeMap,n={},r=this.subset)i=r[e],n[e]=a[i];return n},t.prototype.glyphsFor=function(n){var e,i,a,r,u,d,g;for(a={},u=0,d=n.length;u0)for(r in g=this.glyphsFor(e))i=g[r],a[r]=i;return a},t.prototype.encode=function(n,e){var i,a,r,u,d,g,_,y,I,k,D,U,H,Z,j;for(a in i=ng.encode(this.generateCmap(),"unicode"),u=this.glyphsFor(n),D={0:0},j=i.charMap)D[(g=j[a]).old]=g.new;for(U in k=i.maxGlyphID,u)U in D||(D[U]=k++);return y=(function(mt){var dt,nt;for(dt in nt={},mt)nt[mt[dt]]=dt;return nt})(D),I=Object.keys(y).sort(function(mt,dt){return mt-dt}),H=(function(){var mt,dt,nt;for(nt=[],mt=0,dt=I.length;mt>"),r.join(` `)}return""+e},n})();function cg(t,n,e,i,a){i=i||{};var r=1.15,u=a.internal.scaleFactor,d=a.internal.getFontSize()/u,g=a.getLineHeightFactor?a.getLineHeightFactor():r,_=d*g,y=/\r\n|\r|\n/g,I="",k=1;if((i.valign==="middle"||i.valign==="bottom"||i.halign==="center"||i.halign==="right")&&(I=typeof t=="string"?t.split(y):t,k=I.length||1),e+=d*(2-r),i.valign==="middle"?e-=k/2*_:i.valign==="bottom"&&(e-=k*_),i.halign==="center"||i.halign==="right"){var D=d;if(i.halign==="center"&&(D*=.5),I&&k>=1){for(var U=0;U0,i=n||n===0;return e&&i?"DF":e?"S":i?"F":null}function Pm(t,n){var e,i,a,r;if(t=t||n,Array.isArray(t)){if(t.length>=4)return{top:t[0],right:t[1],bottom:t[2],left:t[3]};if(t.length===3)return{top:t[0],right:t[1],bottom:t[2],left:t[1]};if(t.length===2)return{top:t[0],right:t[1],bottom:t[0],left:t[1]};t.length===1?t=t[0]:t=n}return typeof t=="object"?(typeof t.vertical=="number"&&(t.top=t.vertical,t.bottom=t.vertical),typeof t.horizontal=="number"&&(t.right=t.horizontal,t.left=t.horizontal),{left:(e=t.left)!==null&&e!==void 0?e:n,top:(i=t.top)!==null&&i!==void 0?i:n,right:(a=t.right)!==null&&a!==void 0?a:n,bottom:(r=t.bottom)!==null&&r!==void 0?r:n}):(typeof t!="number"&&(t=n),{top:t,right:t,bottom:t,left:t})}function fg(t,n){var e=Pm(n.settings.margin,0);return t.pageSize().width-(e.left+e.right)}function iy(t,n,e,i,a){var r={},u=1.3333333333333333,d=vu(n,function(dt){return a.getComputedStyle(dt).backgroundColor});d!=null&&(r.fillColor=d);var g=vu(n,function(dt){return a.getComputedStyle(dt).color});g!=null&&(r.textColor=g);var _=oy(i,e);_&&(r.cellPadding=_);var y="borderTopColor",I=u*e,k=i.borderTopWidth;if(i.borderBottomWidth===k&&i.borderRightWidth===k&&i.borderLeftWidth===k){var D=(parseFloat(k)||0)/I;D&&(r.lineWidth=D)}else r.lineWidth={top:(parseFloat(i.borderTopWidth)||0)/I,right:(parseFloat(i.borderRightWidth)||0)/I,bottom:(parseFloat(i.borderBottomWidth)||0)/I,left:(parseFloat(i.borderLeftWidth)||0)/I},r.lineWidth.top||(r.lineWidth.right?y="borderRightColor":r.lineWidth.bottom?y="borderBottomColor":r.lineWidth.left&&(y="borderLeftColor"));var U=vu(n,function(dt){return a.getComputedStyle(dt)[y]});U!=null&&(r.lineColor=U);var H=["left","right","center","justify"];H.indexOf(i.textAlign)!==-1&&(r.halign=i.textAlign),H=["middle","bottom","top"],H.indexOf(i.verticalAlign)!==-1&&(r.valign=i.verticalAlign);var Z=parseInt(i.fontSize||"");isNaN(Z)||(r.fontSize=Z/u);var j=ay(i);j&&(r.fontStyle=j);var mt=(i.fontFamily||"").toLowerCase();return t.indexOf(mt)!==-1&&(r.font=mt),r}function ay(t){var n="";return(t.fontWeight==="bold"||t.fontWeight==="bolder"||parseInt(t.fontWeight)>=700)&&(n="bold"),(t.fontStyle==="italic"||t.fontStyle==="oblique")&&(n+="italic"),n}function vu(t,n){var e=hg(t,n);if(!e)return null;var i=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!i||!Array.isArray(i))return null;var a=[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])],r=parseInt(i[4]);return r===0||isNaN(a[0])||isNaN(a[1])||isNaN(a[2])?null:a}function hg(t,n){var e=n(t);return e==="rgba(0, 0, 0, 0)"||e==="transparent"||e==="initial"||e==="inherit"?t.parentElement==null?null:hg(t.parentElement,n):e}function oy(t,n){var e=[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft],i=96/(72/n),a=(parseInt(t.lineHeight)-parseInt(t.fontSize))/n/2,r=e.map(function(d){return parseInt(d||"0")/i}),u=Pm(r,0);return a>u.top&&(u.top=a),a>u.bottom&&(u.bottom=a),u}function gg(t,n,e,i,a){var r,u;i===void 0&&(i=!1),a===void 0&&(a=!1);var d;typeof n=="string"?d=e.document.querySelector(n):d=n;var g=Object.keys(t.getFontList()),_=t.scaleFactor(),y=[],I=[],k=[];if(!d)return console.error("Html table could not be found with input: ",n),{head:y,body:I,foot:k};for(var D=0;D0&&(a||I.display!=="none"))return u}function ly(t){var n=t.cloneNode(!0);return n.innerHTML=n.innerHTML.replace(/\n/g,"").replace(/ +/g," "),n.innerHTML=n.innerHTML.split(//).map(function(e){return e.trim()}).join(` `),n.innerText||n.textContent||""}function sy(t,n,e){for(var i=0,a=[t,n,e];i0?"_".concat(g):"");var y={dataKey:_};a.push(y)}}),a}var Tu=(function(){function t(n,e,i){this.table=e,this.pageNumber=e.pageNumber,this.settings=e.settings,this.cursor=i,this.doc=n.getDocument()}return t})(),hy=(function(t){pg(n,t);function n(e,i,a,r,u,d){var g=t.call(this,e,i,d)||this;return g.cell=a,g.row=r,g.column=u,g.section=r.section,g}return n})(Tu),gy=(function(){function t(n,e){this.pageNumber=1,this.id=n.id,this.settings=n.settings,this.styles=n.styles,this.hooks=n.hooks,this.columns=e.columns,this.head=e.head,this.body=e.body,this.foot=e.foot}return t.prototype.getHeadHeight=function(n){return this.head.reduce(function(e,i){return e+i.getMaxCellHeight(n)},0)},t.prototype.getFootHeight=function(n){return this.foot.reduce(function(e,i){return e+i.getMaxCellHeight(n)},0)},t.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},t.prototype.callCellHooks=function(n,e,i,a,r,u){for(var d=0,g=e;d1:!1}).length>0},t.prototype.canEntireRowFit=function(n,e){return this.getMaxCellHeight(e)<=n},t.prototype.getMinimumRowHeight=function(n,e){var i=this;return n.reduce(function(a,r){var u=i.cells[r.index];if(!u)return 0;var d=e.getLineHeight(u.styles.fontSize),g=u.padding("vertical"),_=g+d;return _>a?_:a},0)},t})(),bg=(function(){function t(n,e,i){var a;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=e,this.section=i,this.raw=n;var r=n;n!=null&&typeof n=="object"&&!Array.isArray(n)?(this.rowSpan=n.rowSpan||1,this.colSpan=n.colSpan||1,r=(a=n.content)!==null&&a!==void 0?a:n,n._element&&(this.raw=n._element)):(this.rowSpan=1,this.colSpan=1);var u=r!=null?""+r:"",d=/\r\n|\r|\n/g;this.text=u.split(d)}return t.prototype.getTextPos=function(){var n;if(this.styles.valign==="top")n=this.y+this.padding("top");else if(this.styles.valign==="bottom")n=this.y+this.height-this.padding("bottom");else{var e=this.height-this.padding("vertical");n=this.y+e/2+this.padding("top")}var i;if(this.styles.halign==="right")i=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var a=this.width-this.padding("horizontal");i=this.x+a/2+this.padding("left")}else i=this.x+this.padding("left");return{x:i,y:n}},t.prototype.getContentHeight=function(n,e){e===void 0&&(e=1.15);var i=Array.isArray(this.text)?this.text.length:1,a=this.styles.fontSize/n*e,r=i*a+this.padding("vertical");return Math.max(r,this.styles.minCellHeight)},t.prototype.padding=function(n){var e=Pm(this.styles.cellPadding,0);return n==="vertical"?e.top+e.bottom:n==="horizontal"?e.left+e.right:e[n]},t})(),_y=(function(){function t(n,e,i){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=n,this.raw=e,this.index=i}return t.prototype.getMaxCustomCellWidth=function(n){for(var e=0,i=0,a=n.allRows();i.1/t.scaleFactor()&&(a=a<1?a:Math.round(a),console.log("Of the table content, ".concat(a," units width could not fit page"))),xy(n),yy(n,t),vy(n)}function by(t,n){var e=t.scaleFactor(),i=n.settings.horizontalPageBreak,a=fg(t,n);n.allRows().forEach(function(r){for(var u=0,d=n.columns;ua?(_.minWidth=a,_.wrappedWidth=a):(_.minWidth=_.contentWidth,_.wrappedWidth=_.contentWidth);else{var D=10/e;_.minWidth=_.styles.minCellWidth||D,_.wrappedWidth=_.contentWidth,_.minWidth>_.wrappedWidth&&(_.wrappedWidth=_.minWidth)}}}}),n.allRows().forEach(function(r){for(var u=0,d=n.columns;u1&&!g.minWidth&&(g.minWidth=_.minWidth),_.colSpan>1&&!g.wrappedWidth&&(g.wrappedWidth=_.minWidth))}})}function Au(t,n,e){for(var i=n,a=t.reduce(function(D,U){return D+U.wrappedWidth},0),r=0;re(D):!0});k.length&&(n=Au(k,n,e))}return n}function vy(t){for(var n={},e=1,i=t.allRows(),a=0;a1)e--,delete r.cells[g.index];else if(_)_.cell.height+=r.height,e=_.cell.colSpan,delete r.cells[g.index],_.left--,_.left<=1&&delete n[g.index];else{var y=r.cells[g.index];if(!y)continue;if(y.height=r.height,y.rowSpan>1){var I=i.length-a,k=y.rowSpan>I?I:y.rowSpan;n[g.index]={cell:y,left:k,row:r}}}}}function xy(t){for(var n=t.allRows(),e=0;e1&&t.columns[d+1])r+=g.width,delete i.cells[g.index];else if(a){var _=a;delete i.cells[g.index],a=null,_.width=g.width+r}else{var _=i.cells[g.index];if(!_)continue;if(u=_.colSpan,r=0,_.colSpan>1){a=_,r+=g.width;continue}_.width=g.width+r}}}function yy(t,n){for(var e={count:0,height:0},i=0,a=t.allRows();i1&&e.count*e.height0&&e.height>k&&(k=e.height),k>r.height&&(r.height=k)}}e.count--}}function og(t,n,e,i,a){return t.map(function(r){return Sy(r,n,e,i,a)})}function Sy(t,n,e,i,a){var r=1e4*i.scaleFactor();if(n=Math.ceil(n*r)/r,n>=Dm(t,e,i))return t;for(;n0?e:null}function wy(t,n){if(t==="head"){if(typeof n=="object")return n.header||null;if(typeof n=="string"||typeof n=="number")return n}else if(t==="foot"&&typeof n=="object")return n.footer;return null}function Py(t){return t.map(function(n,e){var i,a;return typeof n=="object"?a=(i=n.dataKey)!==null&&i!==void 0?i:e:a=e,new _y(a,n,e)})}function Ty(t,n,e,i,a,r,u){var d=ny(i),g;t==="head"?g=a.headStyles:t==="body"?g=a.bodyStyles:t==="foot"&&(g=a.footStyles);var _=Dr({},d.table,d[t],a.styles,g),y=a.columnStyles[n.dataKey]||a.columnStyles[n.index]||{},I=t==="body"?y:{},k=t==="body"&&e%2===0?Dr({},d.alternateRow,a.alternateRowStyles):{},D=ey(r),U=Dr({},D,_,k,I);return Dr(U,u)}function Ay(t,n,e){var i;e===void 0&&(e={});var a=fg(t,n),r=new Map,u=[],d=[],g=[];Array.isArray(n.settings.horizontalPageBreakRepeat)?g=n.settings.horizontalPageBreakRepeat:(typeof n.settings.horizontalPageBreakRepeat=="string"||typeof n.settings.horizontalPageBreakRepeat=="number")&&(g=[n.settings.horizontalPageBreakRepeat]),g.forEach(function(k){var D=n.columns.find(function(U){return U.dataKey===k||U.index===k});D&&!r.has(D.index)&&(r.set(D.index,!0),u.push(D.index),d.push(n.columns[D.index]),a-=D.wrappedWidth)});for(var _=!0,y=(i=e?.start)!==null&&i!==void 0?i:0;y=I)_=!1,u.push(y),d.push(n.columns[y]),a-=I;else break;y++}return{colIndexes:u,columns:d,lastIndex:y-1}}function My(t,n){for(var e=[],i=0;iy.pageSize().height)&&(Sg(y),r.y=a.top),n.callWillDrawPageHooks(y,r);var I=Dr({},r);n.startPageNumber=y.pageNumber(),e.horizontalPageBreak?Oy(y,n,I,r):(y.applyStyles(y.userStyles),(e.showHead==="firstPage"||e.showHead==="everyPage")&&n.head.forEach(function(k){return wr(y,n,k,r,n.columns)}),y.applyStyles(y.userStyles),n.body.forEach(function(k,D){var U=D===n.body.length-1;wm(y,n,k,U,I,r,n.columns)}),y.applyStyles(y.userStyles),(e.showFoot==="lastPage"||e.showFoot==="everyPage")&&n.foot.forEach(function(k){return wr(y,n,k,r,n.columns)})),dg(y,n,I,r),n.callEndPageHooks(y,r),n.finalY=r.y,t.lastAutoTable=n,y.applyStyles(y.userStyles)}function Oy(t,n,e,i){var a=My(t,n),r=n.settings;if(r.horizontalPageBreakBehaviour==="afterAllRows")a.forEach(function(_,y){t.applyStyles(t.userStyles),y>0?Ac(t,n,e,i,_.columns,!0):lg(t,n,i,_.columns),Iy(t,n,e,i,_.columns),yu(t,n,i,_.columns)});else for(var u=-1,d=a[0],g=function(){var _=u;if(d){t.applyStyles(t.userStyles);var y=d.columns;u>=0?Ac(t,n,e,i,y,!0):lg(t,n,i,y),_=sg(t,n,u+1,i,y),yu(t,n,i,y)}var I=_-u;a.slice(1).forEach(function(k){t.applyStyles(t.userStyles),Ac(t,n,e,i,k.columns,!0),sg(t,n,u+1,i,k.columns,I),yu(t,n,i,k.columns)}),u=_};uI&&(y.text=_.text.splice(I,_.text.length));var k=i.scaleFactor(),D=i.getLineHeightFactor();_.contentHeight=_.getContentHeight(k,D),_.contentHeight>=n&&(_.contentHeight=n,y.styles.minCellHeight-=n),_.contentHeight>t.height&&(t.height=_.contentHeight),y.contentHeight=y.getContentHeight(k,D),y.contentHeight>r&&(r=y.contentHeight),a[g.index]=y}}var U=new Cg(t.raw,-1,t.section,a,!0);U.height=r;for(var H=0,Z=e.columns;Hd)return console.log("Will not be able to print row ".concat(n.index," correctly since it's minimum height is larger than page height")),!0;if(!_)return!1;var y=n.hasRowSpan(i.columns),I=n.getMaxCellHeight(i.columns)>d;return I?(y&&console.log("The content of row ".concat(n.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(y||i.settings.rowPageBreak==="avoid")}function wm(t,n,e,i,a,r,u){var d=yg(t,n,i,r);if(e.canEntireRowFit(d,u))wr(t,n,e,r,u);else if(ky(t,e,d,n)){var g=Ly(e,d,n,t);wr(t,n,e,r,u),Ac(t,n,a,r,u),wm(t,n,g,i,a,r,u)}else Ac(t,n,a,r,u),wm(t,n,e,i,a,r,u)}function wr(t,n,e,i,a){i.x=n.settings.margin.left;for(var r=0,u=a;r"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var a=new Ss(this),r=gg(a,n,window,e,!1),u=r.head,d=r.body,g=((i=u[0])===null||i===void 0?void 0:i.map(function(_){return _.content}))||[];return{columns:g,rows:d,data:d}}}var Su;function Dg(t,n){var e=_g(t,n),i=vg(t,e);xg(t,i)}try{typeof window<"u"&&window&&(Du=window,wu=Du.jsPDF||((Su=Du.jspdf)===null||Su===void 0?void 0:Su.jsPDF),wu&&Ry(wu))}catch(t){console.error("Could not apply autoTable plugin",t)}var Du,wu;var By=()=>["header","header-amount","header-total-cost","header-installment-totals"];function qy(t,n){if(t&1){let e=Ct();s(0,"div",1)(1,"button",4),it("click",function(){lt(e);let a=T();return st(a.exportToPDF())}),P(2,"fa-icon",5),c(3,"Export to PDF "),l()()}}function zy(t,n){t&1&&(s(0,"th",42),c(1,"#"),l())}function jy(t,n){if(t&1&&(s(0,"td",43),c(1),l()),t&2){let e=n.$implicit;o(),C(e.period)}}function Vy(t,n){t&1&&(s(0,"td",44),c(1,"\xA0"),l())}function Uy(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Days")))}function Hy(t,n){if(t&1&&(s(0,"td",45),c(1),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",e.daysInPeriod," ")}}function Gy(t,n){t&1&&(s(0,"td",46)(1,"b"),c(2," Total"),l()())}function Wy(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Date")))}function $y(t,n){if(t&1&&(s(0,"td",47),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.dueDate)," ")}}function Yy(t,n){t&1&&P(0,"td",44)}function Ky(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Paid Date")," "))}function Zy(t,n){if(t&1&&(s(0,"td",45),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.obligationsMetOnDate)," ")}}function Jy(t,n){t&1&&P(0,"td",44)}function Xy(t,n){t&1&&(s(0,"th",48),c(1,"\xA0"),l())}function Qy(t,n){t&1&&(s(0,"span"),P(1,"i",49),l())}function t4(t,n){if(t&1&&(s(0,"td",45),M(1,Qy,2,0,"span"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),O(e.obligationsMetOnDate?1:-1)}}function e4(t,n){t&1&&P(0,"td",44)}function n4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Balance Of Loan")," "))}function i4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.principalLoanBalanceOutstanding)," ")}}function a4(t,n){t&1&&(s(0,"td",52),c(1,"\xA0"),l())}function o4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Principal Due")," "))}function r4(t,n){if(t&1&&(s(0,"td",53),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.principalDue)," ")}}function l4(t,n){if(t&1&&(s(0,"td",54)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPrincipalExpected,e.currencyCode,"symbol-narrow","1.2-2"))}}function s4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Interest")," "))}function c4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.interestOriginalDue)," ")}}function p4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalInterestCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function m4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Fees")," "))}function d4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.feeChargesDue)," ")}}function u4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalFeeChargesCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function f4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Penalties")," "))}function h4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.penaltyChargesDue)," ")}}function g4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPenaltyChargesCharged,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function _4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Due")," "))}function C4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.totalDueForPeriod)," ")}}function b4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalRepaymentExpected,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function v4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Paid")," "))}function x4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.totalPaidForPeriod)," ")}}function y4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalRepayment,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function S4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.In advance")," "))}function D4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.totalPaidInAdvanceForPeriod)," ")}}function w4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPaidInAdvance,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function P4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Late")," "))}function T4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.totalPaidLateForPeriod)," ")}}function A4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalPaidLate,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function M4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Waived")," "))}function O4(t,n){if(t&1&&(s(0,"td",51),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit,i=T(3);x("ngClass",i.installmentStyle(e)),o(),b(" ",m(2,2,e.totalWaivedForPeriod)," ")}}function I4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(3);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalWaived,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function E4(t,n){t&1&&(X(0,32),F(1,M4,3,3,"th",19)(2,O4,3,4,"td",20)(3,I4,4,6,"td",21),Q())}function L4(t,n){t&1&&P(0,"th",48)}function k4(t,n){t&1&&P(0,"td",56)}function F4(t,n){t&1&&(s(0,"td",44),P(1,"b"),l())}function N4(t,n){t&1&&(X(0,32),F(1,L4,1,0,"th",17)(2,k4,1,0,"td",55)(3,F4,2,0,"td",9),Q())}function R4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Outstanding")," "))}function B4(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.totalOutstandingForPeriod))}}function q4(t,n){if(t&1&&(s(0,"td",52)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T(2);o(2),b(" ",Ye(3,1,e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.totalOutstanding,e.currencyCode,"symbol-narrow","1.2-2")," ")}}function z4(t,n){t&1&&P(0,"th",48),t&2&&ra("colspan",5)}function j4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",2),o(),b(" ",m(2,2,"labels.inputs.Loan Amount and Balance")," "))}function V4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",3),o(),b(" ",m(2,2,"labels.inputs.Total Cost of Loan")," "))}function U4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",6),o(),b(" ",m(2,2,"labels.inputs.Installment Totals")," "))}function H4(t,n){t&1&&P(0,"tr",58)}function G4(t,n){t&1&&P(0,"tr",58)}function W4(t,n){t&1&&P(0,"tr",59)}function $4(t,n){t&1&&P(0,"tr",60)}function Y4(t,n){if(t&1&&(s(0,"table",2),X(1,6),F(2,zy,2,0,"th",7)(3,jy,2,1,"td",8)(4,Vy,2,0,"td",9),Q(),X(5,10),F(6,Uy,3,3,"th",7)(7,Hy,2,2,"td",11)(8,Gy,3,0,"td",12),Q(),X(9,13),F(10,Wy,3,3,"th",7)(11,$y,3,4,"td",14)(12,Yy,1,0,"td",9),Q(),X(13,15),F(14,Ky,3,3,"th",7)(15,Zy,3,4,"td",11)(16,Jy,1,0,"td",9),Q(),X(17,16),F(18,Xy,2,0,"th",17)(19,t4,2,2,"td",11)(20,e4,1,0,"td",9),Q(),X(21,18),F(22,n4,3,3,"th",19)(23,i4,3,4,"td",20)(24,a4,2,0,"td",21),Q(),X(25,22),F(26,o4,3,3,"th",19)(27,r4,3,4,"td",23)(28,l4,4,6,"td",24),Q(),X(29,25),F(30,s4,3,3,"th",19)(31,c4,3,4,"td",20)(32,p4,4,6,"td",21),Q(),X(33,26),F(34,m4,3,3,"th",19)(35,d4,3,4,"td",20)(36,u4,4,6,"td",21),Q(),X(37,27),F(38,f4,3,3,"th",19)(39,h4,3,4,"td",20)(40,g4,4,6,"td",21),Q(),X(41,28),F(42,_4,3,3,"th",19)(43,C4,3,4,"td",20)(44,b4,4,6,"td",21),Q(),X(45,29),F(46,v4,3,3,"th",19)(47,x4,3,4,"td",20)(48,y4,4,6,"td",21),Q(),X(49,30),F(50,S4,3,3,"th",19)(51,D4,3,4,"td",20)(52,w4,4,6,"td",21),Q(),X(53,31),F(54,P4,3,3,"th",19)(55,T4,3,4,"td",20)(56,A4,4,6,"td",21),Q(),M(57,E4,4,0,"ng-container",32),M(58,N4,4,0,"ng-container",32),X(59,33),F(60,R4,3,3,"th",19)(61,B4,3,3,"td",34)(62,q4,4,6,"td",21),Q(),X(63,35),F(64,z4,1,1,"th",17),Q(),X(65,36),F(66,j4,3,4,"th",7),Q(),X(67,37),F(68,V4,3,4,"th",7),Q(),X(69,38),F(70,U4,3,4,"th",7),Q(),F(71,H4,1,0,"tr",39)(72,G4,1,0,"tr",39)(73,W4,1,0,"tr",40)(74,$4,1,0,"tr",41),l()),t&2){let e=T();x("dataSource",e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.periods),o(57),O(e.isWaived?57:-1),o(),O(e.isWaived?-1:58),o(13),x("matHeaderRowDef",Ut(7,By)),o(),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns),o(),x("matFooterRowDef",e.displayedColumns)}}function K4(t,n){t&1&&(s(0,"th",42),c(1,"#"),l())}function Z4(t,n){if(t&1&&(s(0,"td",56),c(1),l()),t&2){let e=n.$implicit;o(),C(e.period)}}function J4(t,n){t&1&&(s(0,"th",42),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Date")))}function X4(t,n){if(t&1&&(s(0,"td",65),X(1),c(2),p(3,"dateFormat"),Q(),l()),t&2){let e=n.$implicit;o(2),b(" ",m(3,1,e.dueDate)," ")}}function Q4(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Balance Of Loan")," "))}function tS(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.principalLoanBalanceOutstanding)," ")}}function eS(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Principal Due")," "))}function nS(t,n){if(t&1&&(s(0,"td",57),X(1),c(2),p(3,"formatNumber"),Q(),l()),t&2){let e=n.$implicit;o(2),b(" ",m(3,1,e.principalDue)," ")}}function iS(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Interest")," "))}function aS(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.interestOriginalDue))}}function oS(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Fees")," "))}function rS(t,n){if(t&1&&(s(0,"td",57),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.feeChargesDue))}}function lS(t,n){t&1&&(s(0,"th",50),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Installment Amount")," "))}function sS(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"formatNumber"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.totalDueForPeriod)," ")}}function cS(t,n){if(t&1&&(s(0,"span",66)(1,"b"),c(2),p(3,"formatNumber"),l()()),t&2){let e=T().$implicit;o(2),C(m(3,1,e.totalDueForPeriod))}}function pS(t,n){if(t&1&&(s(0,"td",57),M(1,sS,3,3,"span"),M(2,cS,4,3,"span",66),l()),t&2){let e=n.$implicit;o(),O(e.changed?-1:1),o(),O(e.changed?2:-1)}}function mS(t,n){t&1&&(s(0,"th",48),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function dS(t,n){if(t&1){let e=Ct();s(0,"span"),X(1),s(2,"button",68),p(3,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.editInstallment(a))}),P(4,"fa-icon",69),l(),s(5,"button",70),p(6,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.startEdit(a.period))}),P(7,"fa-icon",71),l(),Q(),l()}t&2&&(o(2),x("matTooltip",ce(m(3,4,"tooltips.Edit"))),o(3),x("matTooltip",ce(m(6,6,"tooltips.Delete"))))}function uS(t,n){if(t&1&&(s(0,"td",67),M(1,dS,8,8,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(e.period&&e.period+1<(i.repaymentScheduleDetails==null||i.repaymentScheduleDetails.periods==null?null:i.repaymentScheduleDetails.periods.length)?1:-1)}}function fS(t,n){t&1&&P(0,"td",44)}function hS(t,n){t&1&&P(0,"tr",58)}function gS(t,n){t&1&&P(0,"tr",72)}function _S(t,n){if(t&1&&(s(0,"table",3),X(1,6),F(2,K4,2,0,"th",7)(3,Z4,2,1,"td",55),Q(),X(4,13),F(5,J4,3,3,"th",7)(6,X4,4,3,"td",61),Q(),X(7,18),F(8,Q4,3,3,"th",19)(9,tS,3,3,"td",34),Q(),X(10,22),F(11,eS,3,3,"th",19)(12,nS,4,3,"td",34),Q(),X(13,25),F(14,iS,3,3,"th",19)(15,aS,3,3,"td",34),Q(),X(16,26),F(17,oS,3,3,"th",19)(18,rS,3,3,"td",34),Q(),X(19,28),F(20,lS,3,3,"th",19)(21,pS,3,2,"td",34),Q(),X(22,62),F(23,mS,3,3,"th",17)(24,uS,2,1,"td",63)(25,fS,1,0,"td",9),Q(),F(26,hS,1,0,"tr",39)(27,gS,1,0,"tr",64),l()),t&2){let e=T();x("dataSource",e.repaymentScheduleDetails==null?null:e.repaymentScheduleDetails.periods),o(26),x("matHeaderRowDef",e.displayedColumnsEdit),o(),x("matRowDefColumns",e.displayedColumnsEdit)}}var ho=(()=>{class t{constructor(){this.route=A(It),this.settingsService=A(oe),this.dateUtils=A(me),this.dialog=A(Gn),this.forEditing=!1,this.repaymentScheduleDetails=null,this.loanDetailsDataRepaymentSchedule=null,this.editCache={},this.listOfData=[],this.repaymentSchedulePeriods=[],this.totalRepaymentExpected=0,this.displayedColumns=["number","days","date","paiddate","check","balanceOfLoan","principalDue","interest","fees","penalties","due","paid","inadvance","late","waived","outstanding"],this.displayedColumnsEdit=["number","date","balanceOfLoan","principalDue","interest","fees","due","actions"],this.editPeriod=new Kl,this.businessDate=new Date,this.destroyRef=A(fp),this.businessDate=this.settingsService.businessDate}ngOnInit(){this.route.parent?this.route.parent.data.pipe(Fp(this.destroyRef)).subscribe({next:e=>{this.loanDetailsDataRepaymentSchedule=e.loanDetailsData?.repaymentSchedule??this.getDefaultRepaymentSchedule(),e.loanDetailsData?.currency?.code&&(this.currencyCode=e.loanDetailsData.currency.code),this.initializeRepaymentSchedule()},error:e=>{console.error("Failed to load loan repayment schedule data:",e),this.loanDetailsDataRepaymentSchedule=this.getDefaultRepaymentSchedule(),this.initializeRepaymentSchedule()}}):(this.loanDetailsDataRepaymentSchedule=this.getDefaultRepaymentSchedule(),this.initializeRepaymentSchedule())}initializeRepaymentSchedule(){this.repaymentScheduleDetails?(this.repaymentScheduleDetails.periods??=[],this.repaymentScheduleDetails.totalWaived??=0):this.repaymentScheduleDetails=this.loanDetailsDataRepaymentSchedule??this.getDefaultRepaymentSchedule(),this.isWaived=(this.repaymentScheduleDetails.totalWaived??0)>0,this.updateEditCache()}getDefaultRepaymentSchedule(){return{periods:[],totalWaived:0,currency:{},loanTermInDays:0,totalPrincipalDisbursed:0,totalPrincipalExpected:0,totalPrincipalPaid:0,totalInterestCharged:0,totalFeeChargesCharged:0,totalPenaltyChargesCharged:0,totalWrittenOff:0,totalRepaymentExpected:0,totalRepayment:0,totalPaidInAdvance:0,totalPaidLate:0,totalOutstanding:0,totalCredits:0}}ngOnChanges(e){e.repaymentScheduleDetails&&!e.repaymentScheduleDetails.firstChange&&this.initializeRepaymentSchedule(),this.totalRepaymentExpected=0,this.listOfData.forEach(i=>{this.totalRepaymentExpected=this.totalRepaymentExpected+i.totalDueForPeriod})}installmentStyle(e){if(e.complete)return"paid";let i=this.isCurrent(e);return i!==""?i:e.isAdditional?"additional":e.downPaymentPeriod?"downpayment":""}isCurrent(e){if(e.fromDate){this.businessDate=this.settingsService.businessDate;let i=this.dateUtils.parseDate(e.fromDate),a=this.dateUtils.parseDate(e.dueDate);if(i<=this.businessDate&&this.businessDatea)return"overdued"}else return"";return""}exportToPDF(){let i=`repaymentschedule-${this.dateUtils.formatDate(this.settingsService.businessDate,me.DEFAULT_DATEFORMAT)}.pdf`,a={orientation:"l",unit:"in",format:"letter",precision:2,compress:!0,putOnlyUsedFonts:!0},r=new Ke(a);Dg(r,{html:"#repaymentSchedule",bodyStyles:{lineColor:[0,0,0]},styles:{fontSize:8,cellWidth:"auto",halign:"center"}}),r.save(i)}editInstallment(e){if(!e.period)return;this.editCache[e.period].edit=!0;let a={title:"Period",formfields:[new sa({controlName:"dueDate",label:"Due Date",value:this.dateUtils.parseDate(e.dueDate),type:"date",required:!0}),new Pi({controlName:"principalDue",label:"Amount",value:e.principalDue,type:"number",required:!0})]};this.dialog.open(gi,{data:a,width:"50rem"}).afterClosed().subscribe(u=>{u.data})}cancelEdit(e){let i=this.listOfData.findIndex(a=>a.period?.toString()===e);i!==-1&&(this.editCache[e]={data:ie({},this.listOfData[i]),edit:!1})}saveEdit(e){let i=this.listOfData.findIndex(a=>a.period?.toString()===e);i!==-1&&(Object.assign(this.listOfData[i],this.editCache[e].data),this.editCache[e].edit=!1,this.editPeriod.emit(e))}updateEditCache(){this.repaymentScheduleDetails?.periods&&(this.listOfData=this.repaymentScheduleDetails.periods,this.totalRepaymentExpected=0,this.listOfData.forEach(e=>{this.editCache[e.period]={edit:!1,data:ie({},e)},this.totalRepaymentExpected=this.totalRepaymentExpected+e.totalDueForPeriod}))}numberOnly(e,i){let a=i.which?i.which:i.keyCode;return a===46?!(e.value.indexOf(".")>-1):!(a>31&&(a<48||a>57))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-repayment-schedule-tab"]],inputs:{currencyCode:"currencyCode",forEditing:"forEditing",repaymentScheduleDetails:"repaymentScheduleDetails"},outputs:{editPeriod:"editPeriod"},features:[Vr],decls:4,vars:3,consts:[[1,"container"],[1,"layout-row","m-t-20","align-end","align-items-center"],["mat-table","","id","repaymentSchedule",3,"dataSource"],["mat-table","","id","repaymentScheduleEdit",3,"dataSource"],["mat-raised-button","","color","primary",3,"click"],["icon","download",1,"m-r-10"],["matColumnDef","number"],["mat-header-cell","","class","center mat-header-cell",4,"matHeaderCellDef"],["mat-cell","","class","right",4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["matColumnDef","days"],["mat-cell","","class","center",3,"ngClass",4,"matCellDef"],["mat-footer-cell","","class","center",4,"matFooterCellDef"],["matColumnDef","date"],["mat-cell","","class","m-r-5",3,"ngClass",4,"matCellDef"],["matColumnDef","paiddate"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","balanceOfLoan"],["mat-header-cell","","class","r-amount mat-header-cell",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",3,"ngClass",4,"matCellDef"],["mat-footer-cell","","class","r-amount",4,"matFooterCellDef"],["matColumnDef","principalDue"],["mat-cell","","class","check r-amount",3,"ngClass",4,"matCellDef"],["mat-footer-cell","","class","check r-amount",4,"matFooterCellDef"],["matColumnDef","interest"],["matColumnDef","fees"],["matColumnDef","penalties"],["matColumnDef","due"],["matColumnDef","paid"],["matColumnDef","inadvance"],["matColumnDef","late"],["matColumnDef","waived"],["matColumnDef","outstanding"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","header"],["matColumnDef","header-amount"],["matColumnDef","header-total-cost"],["matColumnDef","header-installment-totals"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","table-row",4,"matRowDef","matRowDefColumns"],["mat-footer-row","",4,"matFooterRowDef"],["mat-header-cell","",1,"center","mat-header-cell"],["mat-cell","",1,"right"],["mat-footer-cell",""],["mat-cell","",1,"center",3,"ngClass"],["mat-footer-cell","",1,"center"],["mat-cell","",1,"m-r-5",3,"ngClass"],["mat-header-cell",""],[1,"fa","fa-check"],["mat-header-cell","",1,"r-amount","mat-header-cell"],["mat-cell","",1,"r-amount",3,"ngClass"],["mat-footer-cell","",1,"r-amount"],["mat-cell","",1,"check","r-amount",3,"ngClass"],["mat-footer-cell","",1,"check","r-amount"],["mat-cell","",4,"matCellDef"],["mat-cell",""],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row","",1,"table-row"],["mat-footer-row",""],["mat-cell","","class","m-r-10",4,"matCellDef"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-cell","",1,"m-r-10"],[1,"amount-changed"],["mat-cell","",1,"center"],["type","button","color","primary","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","edit","size","lg"],["type","button","color","warn","mat-icon-button","","matTooltipPosition","above",3,"click","matTooltip"],["icon","trash","size","lg"],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),M(1,qy,4,0,"div",1),M(2,Y4,75,8,"table",2),M(3,_S,28,3,"table",3),l()),i&2&&(o(),O(a.forEditing?-1:1),o(),O(a.forEditing?-1:2),o(),O(a.forEditing&&(a.repaymentScheduleDetails==null||a.repaymentScheduleDetails.periods==null?null:a.repaymentScheduleDetails.periods.length)>0?3:-1))},dependencies:[wt,pa,Pt,Gt,un,_n,vn,bn,xn,Cn,yn,Pp,Tp,Sn,wn,Dn,Pn,Ap,Mp,qa,Oi,Sa,gn,Tt,fn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}table[_ngcontent-%COMP%]{width:100%;margin:2% 0%}.table-row[_ngcontent-%COMP%]{font-size:small}.container[_ngcontent-%COMP%]{padding-bottom:2%;width:98%}.check[_ngcontent-%COMP%]{padding-left:15px}.amount-changed[_ngcontent-%COMP%], .additional[_ngcontent-%COMP%]{color:#4461e2}.downpayment[_ngcontent-%COMP%]{color:#16a085}.paid[_ngcontent-%COMP%]{color:#666f73}.current[_ngcontent-%COMP%]{color:#5cb85c}.overdued[_ngcontent-%COMP%]{color:#ff4000}#repaymentSchedule[_ngcontent-%COMP%], #repaymentScheduleEdit[_ngcontent-%COMP%]{width:100%}.mat-header-cell[_ngcontent-%COMP%]{color:#0000008a;font-size:12px;font-weight:500}.dark-theme[_nghost-%COMP%] .mat-header-cell[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{color:#ffffffb3}div.container[_ngcontent-%COMP%]{overflow:auto;max-width:100%}"]})}}return t})();var CS=()=>[50,100,200],bS=()=>["export"],vS=t=>[t,"reciept"],xS=t=>["/","journal-entry","view",t];function yS(t,n){if(t&1){let e=Ct();s(0,"div",2)(1,"mat-checkbox",46),it("click",function(){lt(e);let a=T();return st(a.hideReversed())}),c(2),p(3,"translate"),l(),s(4,"mat-checkbox",46),it("click",function(){lt(e);let a=T();return st(a.hideAccruals())}),c(5),p(6,"translate"),l(),s(7,"button",47),c(8),p(9,"translate"),l()()}if(t&2){let e=T();o(),x("formControl",e.hideReversedParam),o(),b(" ",m(3,6,"labels.inputs.Hide Reversed")),o(2),x("formControl",e.hideAccrualsParam),o(),b(" ",m(6,8,"labels.inputs.Hide Accruals")),o(2),x("routerLink",Ut(12,bS)),o(),b(" ",m(9,10,"labels.buttons.Export")," ")}}function SS(t,n){if(t&1){let e=Ct();s(0,"td",48),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.index;o(),b(" ",e+1," ")}}function DS(t,n){if(t&1){let e=Ct();s(0,"td",49),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",e.id," ")}}function wS(t,n){if(t&1){let e=Ct();s(0,"td",50),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",e.officeName," ")}}function PS(t,n){if(t&1&&(s(0,"td",51),P(1,"mifosx-external-identifier",52),l()),t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),x("externalId",ce(e.externalId))}}function TS(t,n){if(t&1){let e=Ct();s(0,"td",50),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"dateFormat"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.date)," ")}}function AS(t,n){if(t&1){let e=Ct();s(0,"td",50),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"translateKey"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",Ee(2,2,e.type.value,"catalogs")," ")}}function MS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.amount)," ")}}function OS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.principalPortion)," ")}}function IS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.interestPortion)," ")}}function ES(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.feeChargesPortion)," ")}}function LS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.penaltyChargesPortion)," ")}}function kS(t,n){if(t&1){let e=Ct();s(0,"td",53),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.showTransactions(a))}),c(1),p(2,"formatNumber"),l()}if(t&2){let e=n.$implicit,i=T();x("ngClass",i.loanTransactionColor(e)),o(),b(" ",m(2,2,e.outstandingLoanBalance)," ")}}function FS(t,n){if(t&1&&(s(0,"button",55)(1,"mat-icon"),c(2,"more_vert"),l()()),t&2){T();let e=Et(3);x("matMenuTriggerFor",e)}}function NS(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.showTransactions(a))}),s(2,"mat-icon"),P(3,"fa-icon",57),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}t&2&&(o(5),C(m(6,1,"labels.text.View Transaction")))}function RS(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",56),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.openInterestRefundDialog(a))}),s(2,"mat-icon"),P(3,"fa-icon",58),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}t&2&&(o(5),C(m(6,1,"tooltips.Create Interest Refund")))}function BS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.undoTransaction(r,a))}),s(1,"mat-icon"),P(2,"fa-icon",62),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),C(m(5,1,"tooltips.Undo Transaction")))}function qS(t,n){if(t&1){let e=Ct();s(0,"span"),F(1,BS,6,3,"button",59),s(2,"button",60),it("click",function(a){lt(e);let r=T(2);return st(r.routeEdit(a))}),s(3,"mat-icon"),P(4,"fa-icon",61),l(),s(5,"span"),c(6),p(7,"translate"),l()()()}if(t&2){let e=T().$implicit;o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("routerLink",ka(5,vS,e.id)),o(4),C(m(7,3,"tooltips.View Receipts"))}}function zS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.undoReAgeOrReAmortize(r,a))}),s(1,"mat-icon"),P(2,"fa-icon",62),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),C(m(5,1,"labels.menus.Undo Re-Age")))}function jS(t,n){t&1&&(s(0,"span"),F(1,zS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","UNDO_REAGE_LOAN"))}function VS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.undoReAgeOrReAmortize(r,a))}),s(1,"mat-icon"),P(2,"fa-icon",62),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),C(m(5,1,"labels.menus.Undo Re-Amortize")))}function US(t,n){t&1&&(s(0,"span"),F(1,VS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","UNDO_REAMORTIZE_LOAN"))}function HS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.capitalizedIncomeAdjustmentTransaction(r,a))}),s(1,"mat-icon"),P(2,"fa-icon",63),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),C(m(5,1,"labels.menus.Capitalized Income Adjustment")))}function GS(t,n){t&1&&(s(0,"span"),F(1,HS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","CAPITALIZEDINCOME_LOAN"))}function WS(t,n){if(t&1){let e=Ct();s(0,"button",56),it("click",function(a){lt(e);let r=T(2).$implicit,u=T();return st(u.buyDownFeeAdjustmentTransaction(r,a))}),s(1,"mat-icon"),P(2,"fa-icon",63),l(),s(3,"span"),c(4),p(5,"translate"),l()()}t&2&&(o(4),C(m(5,1,"labels.menus.Buy Down Fee Adjustment")))}function $S(t,n){t&1&&(s(0,"span"),F(1,WS,6,3,"button",59),l()),t&2&&(o(),x("mifosxHasPermission","BUYDOWNFEE_LOAN"))}function YS(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",64),it("click",function(a){lt(e);let r=T(2);return st(r.routeEdit(a))}),s(2,"mat-icon"),P(3,"fa-icon",65),l(),s(4,"span"),c(5),p(6,"translate"),l()()()}if(t&2){let e=T().$implicit;o(),x("routerLink",ka(4,xS,"L"+e.id)),o(4),C(m(6,2,"tooltips.View Journal Entries"))}}function KS(t,n){if(t&1&&(s(0,"td",54),M(1,FS,3,1,"button",55),s(2,"mat-menu",null,0),M(4,NS,7,3,"span"),M(5,RS,7,3,"span"),M(6,qS,8,7,"span"),M(7,jS,2,1,"span"),M(8,US,2,1,"span"),M(9,GS,2,1,"span"),M(10,$S,2,1,"span"),M(11,YS,7,6,"span"),l()()),t&2){let e=n.$implicit,i=T();o(),O(i.displaySubMenu(e)?1:-1),o(3),O(i.showTransaction(e)?4:-1),o(),O(i.canCreateInterestRefund(e)?5:-1),o(),O(i.allowUndoTransaction(e)?6:-1),o(),O(i.isReAge(e.type)&&!e.manuallyReversed?7:-1),o(),O(i.isReAmortize(e.type)&&!e.manuallyReversed?8:-1),o(),O(i.isCapitalizedIncome(e.type)&&!e.manuallyReversed?9:-1),o(),O(i.isBuyDownFee(e.type)&&!e.manuallyReversed?10:-1),o(),O(i.viewJournalEntry(e.type)?11:-1)}}function ZS(t,n){t&1&&(s(0,"th",66),c(1,"#"),l())}function JS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Id")))}function XS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Office")))}function QS(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.External Id")))}function tD(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Transaction Date")))}function eD(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Transaction Type")))}function nD(t,n){t&1&&P(0,"th",66)}function iD(t,n){t&1&&(s(0,"th",67),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",4),o(),b(" ",m(2,2,"labels.inputs.Breakdown")," "))}function aD(t,n){t&1&&(s(0,"th",66),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Balance")))}function oD(t,n){t&1&&(s(0,"th",67),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function rD(t,n){t&1&&P(0,"th",66),t&2&&ra("colspan",6)}function lD(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",1),o(),b(" ",m(2,2,"labels.inputs.Amount")," "))}function sD(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",1),o(),b(" ",m(2,2,"labels.inputs.Principal")," "))}function cD(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",1),o(),b(" ",m(2,2,"labels.inputs.Interest")," "))}function pD(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",1),o(),b(" ",m(2,2,"labels.inputs.Fees")," "))}function mD(t,n){t&1&&(s(0,"th",68),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",1),o(),b(" ",m(2,2,"labels.inputs.Penalties")," "))}function dD(t,n){t&1&&P(0,"th",66),t&2&&ra("colspan",2)}function uD(t,n){t&1&&P(0,"tr",69)}function fD(t,n){t&1&&P(0,"tr",69)}function hD(t,n){t&1&&P(0,"tr",70)}var Tm=(()=>{class t{constructor(){this.route=A(It),this.dateUtils=A(me),this.router=A(le),this.dialog=A(Gn),this.loansService=A(At),this.translateService=A(Qi),this.settingsService=A(oe),this.alertService=A(Ql),this.transactionsData=[],this.displayedColumns=["row","id","office","externalId","date","transactionType","amount","principal","interest","fee","penalties","loanBalance","actions"],this.displayedHeader1Columns=["h1-row","h1-id","h1-office","h1-external-id","h1-transaction-date","h1-transaction-type","h1-space","h1-breakdown","h1-loan-balance","h1-actions"],this.displayedHeader2Columns=["h2-space","h2-amount","h2-principal","h2-interest","h2-fees","h2-penalties","h2-action"],this.route.parent.parent.data.subscribe(e=>{this.loanDetailsData=e.loanDetailsData,this.status=e.loanDetailsData.status.value}),this.loanId=this.route.parent.parent.snapshot.params.loanId}ngOnInit(){this.transactionsData=this.loanDetailsData.transactions,this.hideAccrualsParam=new pe(!1),this.hideReversedParam=new pe(!1),this.setLoanTransactions()}setLoanTransactions(){this.transactionsData.forEach(e=>{e.date=this.dateUtils.parseDate(e.date)}),this.dataSource=new Li(this.transactionsData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}checkStatus(){return this.status==="Active"||this.status==="Closed (obligations met)"||this.status==="Overpaid"||this.status==="Closed (rescheduled)"||this.status==="Closed (written off)"}hideAccruals(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}hideReversed(){this.filterTransactions(this.hideReversedParam.value,this.hideAccrualsParam.value)}filterTransactions(e,i){let a=this.transactionsData;(i||e)&&(a=this.transactionsData.filter(r=>!(e&&r.manuallyReversed)&&!(i&&this.isAccrualKindOf(r.type)))),this.dataSource=new Li(a),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}applyFilter(e=""){this.dataSource.filter=e.trim().toLowerCase()}removeItem(e,i){return e.filter(a=>a!==i)}showTransactions(e){this.showTransaction(e)&&this.router.navigate([e.id],{relativeTo:this.route})}showTransaction(e){return[1,2,4,9,20,21,22,23,26,28,29,30,31,32,33,35,36,37,38,40,41,42].includes(e.type.id)}allowUndoTransaction(e){return e.manuallyReversed?!1:!(e.type.disbursement||e.type.chargeoff||this.isReAgoeOrReAmortize(e.type)||e.type.interestRefund||e.type.contractTermination)}loanTransactionColor(e){return e.manuallyReversed?"strike":e.transactionRelations&&e.transactionRelations.length>0?"linked":this.isAccrualKindOf(e.type)?"accrual":this.isChargeOff(e.type)?"chargeoff":this.isDownPayment(e.type)?"down-payment":this.isReAge(e.type)?"reage":this.isReAmortize(e.type)?"reamortize":""}routeEdit(e){e.stopPropagation()}undoTransaction(e,i){i.stopPropagation();let a=this.settingsService.language.code,r=this.settingsService.dateFormat,u=this.route.parent.parent.snapshot.params.loanId,d="undo",g=this.dateUtils.parseDate(e.date),_={};this.isChargeOff(e.type)?(d="undo-charge-off",g=this.settingsService.businessDate,_={}):this.isWriteOff(e.type)?(d="undowriteoff",_={transactionDate:this.dateUtils.formatDate(g&&new Date(g),r),transactionAmount:0,dateFormat:r,locale:a}):_={transactionDate:this.dateUtils.formatDate(g&&new Date(g),r),transactionAmount:0,dateFormat:r,locale:a},this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+`${e.type.value}`+this.translateService.instant("labels.dialogContext.with id")+`${e.id}`}}).afterClosed().subscribe(I=>{if(I.confirm){let k=e.id;(this.isChargeOff(e.type)||d==="undowriteoff"||this.isWriteOff(e.type))&&(k=null),this.loansService.executeLoansAccountTransactionsCommand(u,d,_,k).subscribe(D=>{e.manuallyReversed=!0,this.reload()})}})}undoReAgeOrReAmortize(e){let i=e.type.reAmortize?"Re-Amortize":"Re-Age";this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction type")+" "+this.translateService.instant("labels.menus."+i)}}).afterClosed().subscribe(r=>{if(r.confirm){let u=i==="Re-Age"?"undoReAge":"undoReAmortize";this.loansService.executeLoansAccountTransactionsCommand(String(this.loanId),u,{}).subscribe(()=>{this.reload()})}})}isAccrual(e){return e.accrual||e.code==="loanTransactionType.overdueCharge"}isChargeOff(e){return e.chargeoff||e.code==="loanTransactionType.chargeOff"}isWriteOff(e){return e.writeOff||e.code==="loanTransactionType.writeOff"}isDownPayment(e){return e.downPayment||e.code==="loanTransactionType.downPayment"}isReAge(e){return e.reAge||e.code==="loanTransactionType.reAge"}isReAmortize(e){return e.reAmortize||e.code==="loanTransactionType.reAmortize"}isCapitalizedIncome(e){return e.capitalizedIncome||e.code==="loanTransactionType.capitalizedIncome"}isBuyDownFeeAmortization(e){return e.buyDownFeeAmortizationAdjustment||e.code==="loanTransactionType.buyDownFeeAmortizationAdjustment"}isAccrualKindOf(e){return this.isAccrual(e)||this.isCapitalizedIncomeAmortization(e)||this.isBuyDownFeeAmortization(e)}isCapitalizedIncomeAmortization(e){return e.capitalizedIncomeAmortization||e.code==="loanTransactionType.capitalizedIncomeAmortization"}isReAgoeOrReAmortize(e){return this.isReAmortize(e)||this.isReAge(e)}isBuyDownFee(e){return e.buyDownFee||e.code==="loanTransactionType.buyDownFee"}viewJournalEntry(e){return!(this.isReAmortize(e)||this.isReAge(e))}canCreateInterestRefund(e){let i=e?.type?.code?.toLowerCase()||"";return!(!(i.includes("payoutrefund")||i.includes("merchantissuedrefund"))||e.manuallyReversed||e.transactionRelations&&e.transactionRelations.some(r=>r.relationType==="INTEREST_REFUND"))}openInterestRefundDialog(e){let i=this.loanId;this.loansService.getLoanTransactionActionTemplate(String(i),"interest-refund",String(e.id)).subscribe(a=>{let r=new a1({controlType:"select",controlName:"paymentTypeId",label:this.translateService.instant("labels.inputs.Payment Type"),value:a.paymentTypeId||"",required:!0,order:2});r.options={data:a.paymentTypeOptions||[],value:"id",label:"name"};let u=[new Pi({controlName:"amount",label:this.translateService.instant("labels.inputs.Amount"),value:a.amount,type:"number",required:!0,readonly:!0,order:1}),r,new Pi({controlName:"externalId",label:this.translateService.instant("labels.inputs.External Id"),value:"",type:"text",required:!1,order:3}),new Pi({controlName:"note",label:this.translateService.instant("labels.inputs.Note"),value:"",type:"text",required:!1,order:4})],d={title:this.translateService.instant("labels.buttons.Create Interest Refund"),layout:{addButtonText:this.translateService.instant("labels.buttons.Create Interest Refund")},formfields:u};this.dialog.open(gi,{data:d}).afterClosed().subscribe(_=>{if(_?.data){let y=_.data.value,{amount:I,transactionDate:k}=y,D=If(y,["amount","transactionDate"]),U=Se(ie({},D),{transactionAmount:I,locale:this.settingsService.language.code,dateFormat:this.settingsService.dateFormat});this.loansService.executeLoansAccountTransactionsCommand(String(i),"interest-refund",U,String(e.id)).subscribe(()=>{this.reload()})}})})}reload(){let e=this.route.parent.parent.snapshot.params.clientId,i=this.router.url;this.router.navigateByUrl("/clients",{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}displaySubMenu(e){return!(this.isReAgoeOrReAmortize(e.type)&&e.manuallyReversed)}capitalizedIncomeAdjustmentTransaction(e){let i=`${this.loanId}`;this.loansService.getLoanTransactionActionTemplate(i,"capitalizedIncomeAdjustment",`${e.id}`).subscribe(a=>{let r=a.date||e.date;if(a.amount==0)this.displayAlertMessage("Capitalized Income amount adjusted already adjusted",e.amount);else{let u=a.amount||e.amount,d=[new sa({controlName:"transactionDate",label:"Date",value:this.dateUtils.parseDate(r),type:"datetime-local",required:!0,minDate:this.dateUtils.parseDate(e.date),order:1}),new Pi({controlName:"amount",label:"Amount",value:u,type:"number",required:!0,min:.001,max:u,validators:[Wt.min(.001),Wt.max(u)],order:2})],g={title:`Adjustment ${e.type.value} Transaction`,layout:{addButtonText:"Adjustment"},formfields:d,pristine:!1};this.dialog.open(gi,{data:g}).afterClosed().subscribe(y=>{if(y.data){let I=this.settingsService.dateFormat;if(y.data.value.amount<=u){let k=this.settingsService.language.code,D={transactionDate:this.dateUtils.formatDate(y.data.value.transactionDate,I),transactionAmount:y.data.value.amount,locale:k,dateFormat:I};this.loansService.executeLoansAccountTransactionsCommand(i,"capitalizedIncomeAdjustment",D,e.id).subscribe(()=>{this.reload()})}else this.displayAlertMessage("Capitalized Income Adjustment amount must be lower or equal to",u)}})}})}buyDownFeeAdjustmentTransaction(e){let i=`${this.loanId}`;this.loansService.getLoanTransactionActionTemplate(i,"buyDownFeeAdjustment",`${e.id}`).subscribe(a=>{let r=a.date||e.date;if(a.amount==0)this.displayAlertMessage("Buy Down Fee amount already adjusted",e.amount);else{let u=a.amount||e.amount,d=[new sa({controlName:"transactionDate",label:"Date",value:this.dateUtils.parseDate(r),type:"datetime-local",required:!0,minDate:this.dateUtils.parseDate(e.date),order:1}),new Pi({controlName:"amount",label:"Amount",value:u,type:"number",required:!0,min:.001,max:u,validators:[Wt.min(.001),Wt.max(u)],order:2})],g={title:`Adjustment ${e.type.value} Transaction`,layout:{addButtonText:"Adjustment"},formfields:d,pristine:!1};this.dialog.open(gi,{data:g}).afterClosed().subscribe(y=>{if(y.data){let I=this.settingsService.dateFormat;if(y.data.value.amount<=u){let k=this.settingsService.language.code,D={transactionDate:this.dateUtils.formatDate(y.data.value.transactionDate,I),transactionAmount:y.data.value.amount,locale:k,dateFormat:I};this.loansService.executeLoansAccountTransactionsCommand(i,"buyDownFeeAdjustment",D,e.id).subscribe(()=>{this.reload()})}else this.displayAlertMessage("Buy Down Fee Adjustment amount must be lower or equal to",u)}})}})}displayAlertMessage(e,i){let a=this.translateService.instant("errors."+e);i&&(a=a+": "+i),this.alertService.alert({type:"BusinessRule",message:a})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-transactions-tab"]],viewQuery:function(i,a){if(i&1&&(ri(Do,7),ri(wo,7)),i&2){let r;li(r=si())&&(a.paginator=r.first),li(r=si())&&(a.sort=r.first)}},decls:67,vars:8,consts:[["transactionMenu","matMenu"],[1,"container"],[1,"layout-row","transaction-buttons","align-end","gap-20px"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","row"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","id"],["mat-cell","","class","td-select",3,"ngClass","click",4,"matCellDef"],["matColumnDef","office"],["mat-cell","",3,"ngClass","click",4,"matCellDef"],["matColumnDef","externalId"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","date"],["matColumnDef","transactionType"],["matColumnDef","amount"],["mat-cell","","class","r-amount td-min-space",3,"ngClass","click",4,"matCellDef"],["matColumnDef","principal"],["matColumnDef","interest"],["matColumnDef","fee"],["matColumnDef","penalties"],["matColumnDef","loanBalance"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["matColumnDef","h1-row"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","h1-id"],["matColumnDef","h1-office"],["matColumnDef","h1-external-id"],["matColumnDef","h1-transaction-date"],["matColumnDef","h1-transaction-type"],["matColumnDef","h1-space"],["matColumnDef","h1-breakdown"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["matColumnDef","h1-loan-balance"],["matColumnDef","h1-actions"],["matColumnDef","h2-space"],["matColumnDef","h2-amount"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["matColumnDef","h2-principal"],["matColumnDef","h2-interest"],["matColumnDef","h2-fees"],["matColumnDef","h2-penalties"],["matColumnDef","h2-action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSize","pageSizeOptions"],[1,"accruals",3,"click","formControl"],["mat-raised-button","","color","primary",1,"transaction-button",3,"routerLink"],["mat-cell","",3,"click"],["mat-cell","",1,"td-select",3,"click","ngClass"],["mat-cell","",3,"click","ngClass"],["mat-cell","",3,"ngClass"],[3,"externalId"],["mat-cell","",1,"r-amount","td-min-space",3,"click","ngClass"],["mat-cell","",1,"center"],["mat-icon-button","","aria-label","",1,"action-button",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],["icon","eye","size","sm"],["icon","plus","size","sm"],["mat-menu-item","",3,"click",4,"mifosxHasPermission"],["mat-menu-item","",1,"account-action-button",3,"click","routerLink"],["icon","receipt","size","sm"],["icon","undo","size","sm"],["icon","coins","size","sm"],["mat-menu-item","",3,"click","routerLink"],["icon","table-cells","size","sm"],["mat-header-cell",""],["mat-header-cell","",1,"center"],["mat-header-cell","",1,"r-amount"],["mat-header-row",""],["mat-row","",1,"select-row"]],template:function(i,a){i&1&&(s(0,"div",1),M(1,yS,10,13,"div",2),s(2,"table",3),X(3,4),F(4,SS,2,1,"td",5),Q(),X(5,6),F(6,DS,2,2,"td",7),Q(),X(7,8),F(8,wS,2,2,"td",9),Q(),X(9,10),F(10,PS,2,3,"td",11),Q(),X(11,12),F(12,TS,3,4,"td",9),Q(),X(13,13),F(14,AS,3,5,"td",9),Q(),X(15,14),F(16,MS,3,4,"td",15),Q(),X(17,16),F(18,OS,3,4,"td",15),Q(),X(19,17),F(20,IS,3,4,"td",15),Q(),X(21,18),F(22,ES,3,4,"td",15),Q(),X(23,19),F(24,LS,3,4,"td",15),Q(),X(25,20),F(26,kS,3,4,"td",15),Q(),X(27,21),F(28,KS,12,9,"td",22),Q(),X(29,23),F(30,ZS,2,0,"th",24),Q(),X(31,25),F(32,JS,3,3,"th",24),Q(),X(33,26),F(34,XS,3,3,"th",24),Q(),X(35,27),F(36,QS,3,3,"th",24),Q(),X(37,28),F(38,tD,3,3,"th",24),Q(),X(39,29),F(40,eD,3,3,"th",24),Q(),X(41,30),F(42,nD,1,0,"th",24),Q(),X(43,31),F(44,iD,3,4,"th",32),Q(),X(45,33),F(46,aD,3,3,"th",24),Q(),X(47,34),F(48,oD,3,3,"th",32),Q(),X(49,35),F(50,rD,1,1,"th",24),Q(),X(51,36),F(52,lD,3,4,"th",37),Q(),X(53,38),F(54,sD,3,4,"th",37),Q(),X(55,39),F(56,cD,3,4,"th",37),Q(),X(57,40),F(58,pD,3,4,"th",37),Q(),X(59,41),F(60,mD,3,4,"th",37),Q(),X(61,42),F(62,dD,1,1,"th",24),Q(),F(63,uD,1,0,"tr",43)(64,fD,1,0,"tr",43)(65,hD,1,0,"tr",44),l(),P(66,"mat-paginator",45),l()),i&2&&(o(),O(a.checkStatus()?1:-1),o(),x("dataSource",a.dataSource),o(61),x("matHeaderRowDef",a.displayedHeader1Columns),o(),x("matHeaderRowDef",a.displayedHeader2Columns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("pageSize",100)("pageSizeOptions",Ut(7,CS)))},dependencies:[wt,pa,Pt,he,Wo,ae,Gt,Da,Me,_n,wo,vn,Cn,yn,Va,qa,Sp,Dp,yp,xp,un,bn,xn,Sn,wn,Dn,Pn,Do,gn,Tt,wa,fn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{padding-bottom:2%;max-width:100%}.container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}.container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .linked[_ngcontent-%COMP%]{color:#4461e2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .accrual[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .down-payment[_ngcontent-%COMP%]{color:#16a085}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .chargeoff[_ngcontent-%COMP%]{color:#f39c12}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .reage[_ngcontent-%COMP%]{color:#e08e0b}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .reamortize[_ngcontent-%COMP%]{color:#4461e2}.select-row[_ngcontent-%COMP%]:hover{cursor:pointer;font-weight:800}.td-min-space[_ngcontent-%COMP%]{min-width:60px}.filter-box[_ngcontent-%COMP%]{min-width:280px}.transaction-button[_ngcontent-%COMP%]{min-width:180px}.action-button[_ngcontent-%COMP%]{width:100%;height:100%}"]})}}return t})();var gD=()=>["header","header-amount","header-total-cost","header-installment-totals"];function _D(t,n){t&1&&(s(0,"th",24),c(1,"#"),l())}function CD(t,n){if(t&1&&(s(0,"td",25),c(1),l()),t&2){let e=n.index;o(),C(e+1)}}function bD(t,n){t&1&&(s(0,"td",26),c(1,"\xA0"),l())}function vD(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Date")))}function xD(t,n){if(t&1&&(s(0,"td",25),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.dueDate))}}function yD(t,n){t&1&&(s(0,"td",26)(1,"b"),c(2),p(3,"translate"),l()()),t&2&&(o(2),b(" ",m(3,1,"labels.inputs.Total")))}function SD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Balance Of Loan")))}function DD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.principalLoanBalanceOutstanding))}}function wD(t,n){t&1&&(s(0,"td",26),c(1,"\xA0"),l())}function PD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Principal Due")))}function TD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.principalDue))}}function AD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),b(" ",Ye(3,1,e.originalScheduleDetails.totalPrincipalExpected,e.currency.code,"symbol-narrow","1.2-2")," ")}}function MD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Interest")))}function OD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.interestOriginalDue))}}function ID(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),b(" ",Ye(3,1,e.originalScheduleDetails.totalInterestCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function ED(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Fees")))}function LD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.feeChargesDue))}}function kD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),b(" ",Ye(3,1,e.originalScheduleDetails.totalFeeChargesCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function FD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Penalties")))}function ND(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.penaltyChargesDue))}}function RD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),b(" ",Ye(3,1,e.originalScheduleDetails.totalPenaltyChargesCharged,e.currency.code,"symbol-narrow","1.2-2")," ")}}function BD(t,n){t&1&&(s(0,"th",27),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Outstanding")))}function qD(t,n){if(t&1&&(s(0,"td",28),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.totalOutstandingForPeriod))}}function zD(t,n){if(t&1&&(s(0,"td",29)(1,"b"),c(2),p(3,"currency"),l()()),t&2){let e=T();o(2),b(" ",Ye(3,1,e.originalScheduleDetails.totalRepaymentExpected,e.currency.code,"symbol-narrow","1.2-2")," ")}}function jD(t,n){t&1&&P(0,"th",30),t&2&&ra("colspan",2)}function VD(t,n){t&1&&(s(0,"th",30),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",2),o(),b(" ",m(2,2,"labels.inputs.Loan Amount and Balance")," "))}function UD(t,n){t&1&&(s(0,"th",30),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",3),o(),b(" ",m(2,2,"labels.inputs.Total Cost of Loan")," "))}function HD(t,n){t&1&&(s(0,"th",30),c(1),p(2,"translate"),l()),t&2&&(ra("colspan",1),o(),b(" ",m(2,2,"labels.inputs.Installment Totals")," "))}function GD(t,n){t&1&&P(0,"tr",31)}function WD(t,n){t&1&&P(0,"tr",31)}function $D(t,n){t&1&&P(0,"tr",32)}function YD(t,n){t&1&&P(0,"tr",33)}var Am=(()=>{class t{constructor(){this.route=A(It),this.displayedColumns=["number","date","balanceOfLoan","principalDue","interest","fees","penalties","outstanding"],this.currency=null,this.route.parent.data.subscribe(e=>{this.currency=e.loanDetailsData.currency,this.originalScheduleDetails=e.loanDetailsData.originalSchedule})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-original-schedule-tab"]],decls:46,vars:6,consts:[[1,"container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","number"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-footer-cell","",4,"matFooterCellDef"],["matColumnDef","date"],["matColumnDef","balanceOfLoan"],["mat-header-cell","","class","r-amount",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","principalDue"],["mat-footer-cell","","class","r-amount",4,"matFooterCellDef"],["matColumnDef","interest"],["matColumnDef","fees"],["matColumnDef","penalties"],["matColumnDef","outstanding"],["matColumnDef","header"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["matColumnDef","header-amount"],["matColumnDef","header-total-cost"],["matColumnDef","header-installment-totals"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-footer-row","",4,"matFooterRowDef"],["mat-header-cell",""],["mat-cell",""],["mat-footer-cell",""],["mat-header-cell","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-footer-cell","",1,"r-amount"],["mat-header-cell","",1,"center"],["mat-header-row",""],["mat-row",""],["mat-footer-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),F(3,_D,2,0,"th",3)(4,CD,2,1,"td",4)(5,bD,2,0,"td",5),Q(),X(6,6),F(7,vD,3,3,"th",3)(8,xD,3,3,"td",4)(9,yD,4,3,"td",5),Q(),X(10,7),F(11,SD,3,3,"th",8)(12,DD,3,3,"td",9)(13,wD,2,0,"td",5),Q(),X(14,10),F(15,PD,3,3,"th",8)(16,TD,3,3,"td",9)(17,AD,4,6,"td",11),Q(),X(18,12),F(19,MD,3,3,"th",8)(20,OD,3,3,"td",9)(21,ID,4,6,"td",11),Q(),X(22,13),F(23,ED,3,3,"th",8)(24,LD,3,3,"td",9)(25,kD,4,6,"td",11),Q(),X(26,14),F(27,FD,3,3,"th",8)(28,ND,3,3,"td",9)(29,RD,4,6,"td",11),Q(),X(30,15),F(31,BD,3,3,"th",8)(32,qD,3,3,"td",9)(33,zD,4,6,"td",11),Q(),X(34,16),F(35,jD,1,1,"th",17),Q(),X(36,18),F(37,VD,3,4,"th",17),Q(),X(38,19),F(39,UD,3,4,"th",17),Q(),X(40,20),F(41,HD,3,4,"th",17),Q(),F(42,GD,1,0,"tr",21)(43,WD,1,0,"tr",21)(44,$D,1,0,"tr",22)(45,YD,1,0,"tr",23),l()()),i&2&&(o(),x("dataSource",a.originalScheduleDetails.periods),o(41),x("matHeaderRowDef",Ut(5,gD)),o(),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("matFooterRowDef",a.displayedColumns))},dependencies:[wt,Pt,_n,wo,vn,bn,xn,Cn,yn,Pp,Tp,Sn,wn,Dn,Pn,Ap,Mp,Sa,gn,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%;margin:3% 0%}.container[_ngcontent-%COMP%]{padding-bottom:2%}"]})}}return t})();var KD=()=>[10,25,50,100];function ZD(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Name")))}function JD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),$t("",e.name,",",e.currency.displaySymbol)}}function XD(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Type")))}function QD(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeCalculationType.value)}}function tw(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function ew(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.amount))}}function nw(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Collected On")))}function iw(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeTimeType.value)}}function aw(t,n){t&1&&P(0,"tr",13)}function ow(t,n){t&1&&P(0,"tr",14)}var Mm=(()=>{class t{constructor(){this.route=A(It),this.displayedColumns=["name","type","amount","collectedon"],this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}ngOnInit(){this.overdueCharges=this.loanDetails.overdueCharges,this.dataSource=new Li(this.overdueCharges),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-overdue-charges-tab"]],viewQuery:function(i,a){if(i&1&&(ri(Do,7),ri(wo,7)),i&2){let r;li(r=si())&&(a.paginator=r.first),li(r=si())&&(a.sort=r.first)}},decls:17,vars:5,consts:[[1,"container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","amount"],["matColumnDef","collectedon"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),F(3,ZD,3,3,"th",3)(4,JD,2,2,"td",4),Q(),X(5,5),F(6,XD,3,3,"th",3)(7,QD,2,1,"td",4),Q(),X(8,6),F(9,tw,3,3,"th",3)(10,ew,3,3,"td",4),Q(),X(11,7),F(12,nw,3,3,"th",3)(13,iw,2,1,"td",4),Q(),F(14,aw,1,0,"tr",8)(15,ow,1,0,"tr",9),l(),P(16,"mat-paginator",10),l()),i&2&&(o(),x("dataSource",a.dataSource),o(13),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("pageSizeOptions",Ut(4,KD)))},dependencies:[wt,Pt,_n,wo,vn,bn,xn,wp,Cn,yn,Sn,wn,Dn,Pn,Do,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}"]})}}return t})();var rw=()=>[50,100,200],lw=t=>[t];function sw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function cw(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),C(e.name)}}function pw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Fee/Penalty")))}function mw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Penalty")))}function dw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Fee")))}function uw(t,n){if(t&1&&(s(0,"td",23),M(1,mw,3,3,"span"),M(2,dw,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.penalty?1:-1),o(),O(e.penalty?-1:2)}}function fw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Payment due at")))}function hw(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeTimeType.value)}}function gw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Submitted On")))}function _w(t,n){if(t&1&&(s(0,"td",23),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.submittedOnDate))}}function Cw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Due As Of")," "))}function bw(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Submitted On")," "))}function vw(t,n){if(t&1&&(s(0,"th",24),M(1,Cw,3,3,"span"),M(2,bw,3,3,"span"),l()),t&2){let e=T();x("hide",e.useDueDate),o(),O(e.useDueDate?1:-1),o(),O(e.useDueDate?-1:2)}}function xw(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),C(m(2,1,e.dueDate))}}function yw(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),C(m(2,1,e.submittedOnDate))}}function Sw(t,n){if(t&1&&(s(0,"td",23),M(1,xw,3,3,"span"),M(2,yw,3,3,"span"),l()),t&2){let e=T();o(),O(e.useDueDate?1:-1),o(),O(e.useDueDate?-1:2)}}function Dw(t,n){t&1&&(s(0,"th",22),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Calculation Type")))}function ww(t,n){if(t&1&&(s(0,"td",23),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeCalculationType.value)}}function Pw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Due")))}function Tw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),b(" ",Ye(2,1,e.amount,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Aw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Paid")))}function Mw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),b(" ",Ye(2,1,e.amountPaid,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Ow(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Waived")," "))}function Iw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),b(" ",Ye(2,1,e.amountWaived,e.currency.code,"symbol-narrow","1.2-2")," ")}}function Ew(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Outstanding")," "))}function Lw(t,n){if(t&1&&(s(0,"td",26),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit;o(),b(" ",Ye(2,1,e.amountOutstanding,e.currency.code,"symbol-narrow","1.2-2")," ")}}function kw(t,n){t&1&&(s(0,"th",25),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Actions")," "))}function Fw(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",30),p(2,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.editCharge(r))}),P(3,"i",31),l(),s(4,"button",32),p(5,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.deleteCharge(r.id))}),P(6,"i",33),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Edit Charge"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Delete Charge"))))}function Nw(t,n){if(t&1){let e=Ct();s(0,"button",34),p(1,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.adjustCharge(r.id))}),P(2,"i",31),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Adjust Charge")))}function Rw(t,n){if(t&1){let e=Ct();s(0,"button",30),p(1,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.payCharge(r.id))}),P(2,"i",35),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Pay Charge")))}function Bw(t,n){if(t&1){let e=Ct();s(0,"button",30),p(1,"translate"),it("click",function(a){lt(e);let r=T().$implicit,u=T();return u.routeEdit(a),st(u.waiveCharge(r.id))}),P(2,"i",36),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Waive Charge")))}function qw(t,n){if(t&1&&(s(0,"td",27),M(1,Fw,7,8,"span"),M(2,Nw,3,4,"button",28),M(3,Rw,3,4,"button",29),M(4,Bw,3,4,"button",29),l()),t&2){let e=n.$implicit,i=T();o(),O(i.status==="Submitted and pending approval"?1:-1),o(),O(!e.paid&&i.status==="Active"?2:-1),o(),O(e.chargePayable&&!e.paid&&i.status==="Active"?3:-1),o(),O(e.actionFlag?-1:4)}}function zw(t,n){t&1&&P(0,"tr",37)}function jw(t,n){if(t&1&&P(0,"tr",38),t&2){let e=n.$implicit;x("routerLink",ka(1,lw,e.id))}}var Om=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(It),this.dateUtils=A(me),this.router=A(le),this.translateService=A(Qi),this.dialog=A(Gn),this.settingsService=A(oe),this.systemService=A(vp),this.displayedColumns=["name","feepenalty","paymentdueat","dueDate","calculationtype","due","paid","waived","outstanding","actions"],this.useDueDate=!0,this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}ngOnInit(){this.systemService.getConfigurationByName("charge-accrual-date").subscribe(i=>{this.useDueDate=i.stringValue==="due-date"}),this.chargesData=this.loanDetails.charges,this.status=this.loanDetails.status.value;let e;this.chargesData.forEach(i=>{i.dueDate=this.dateUtils.parseDate(i.dueDate),i.paid||i.waived||i.chargeTimeType.value==="Disbursement"||this.loanDetails.status.value!=="Active"?e=!0:e=!1,i.actionFlag=e}),this.chargesData=this.chargesData.sort(function(i,a){return a.dueDate-i.dueDate}),this.dataSource=new Li(this.chargesData),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}adjustCharge(e){this.router.navigate([`${e}/adjustment`],{relativeTo:this.route})}payCharge(e){let i=[new sa({controlName:"transactionDate",label:"Payment Date",value:"",type:"date",required:!0})],a={title:`Pay Charge ${e}`,layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=this.settingsService.language.code,g=this.settingsService.dateFormat,_=u.data.value.transactionDate,y={transactionDate:this.dateUtils.formatDate(_,g),dateFormat:g,locale:d};this.loansService.executeLoansAccountChargesCommand(this.loanDetails.id,"pay",y,e).subscribe(()=>{this.reload()})}})}waiveCharge(e){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id")+`${e} ?`,type:"Basic"}}).afterClosed().subscribe(a=>{a.confirm&&this.loansService.executeLoansAccountChargesCommand(this.loanDetails.id,"waive",{},e).subscribe(()=>{this.reload()})})}editCharge(e){let i=[new Pi({controlName:"amount",label:"Amount",value:e.amount||e.amountOrPercentage,type:"number",required:!0})],a={title:`Edit Charge ${e.id}`,layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=this.settingsService.language.code,g=this.settingsService.dateFormat,_=Se(ie({},u.data.value),{dateFormat:g,locale:d});this.loansService.editLoansAccountCharge(this.loanDetails.id,_,e.id).subscribe(()=>{this.reload()})}})}deleteCharge(e){this.dialog.open(la,{data:{deleteContext:`charge id:${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteLoansAccountCharge(this.loanDetails.id,e).subscribe(()=>{this.reload()})})}routeEdit(e){e.stopPropagation()}reload(){let e=this.loanDetails.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-charges-tab"]],viewQuery:function(i,a){if(i&1&&(ri(Do,7),ri(wo,7)),i&2){let r;li(r=si())&&(a.paginator=r.first),li(r=si())&&(a.sort=r.first)}},decls:38,vars:5,consts:[[1,"tab-container"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","feepenalty"],["matColumnDef","paymentdueat"],["matColumnDef","submittedDate"],["matColumnDef","dueDate"],["mat-header-cell","","mat-sort-header","",3,"hide",4,"matHeaderCellDef"],["matColumnDef","calculationtype"],["matColumnDef","due"],["mat-header-cell","","class","r-amount","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","paid"],["matColumnDef","waived"],["matColumnDef","outstanding"],["matColumnDef","actions"],["mat-cell","","class","center",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","","class","select-row",3,"routerLink",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","",3,"hide"],["mat-header-cell","","mat-sort-header","",1,"r-amount"],["mat-cell","",1,"r-amount"],["mat-cell","",1,"center"],["mat-raised-button","","color","accent",1,"account-action-button",3,"matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-pencil"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-trash"],["mat-raised-button","","color","accent",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-dollar"],[1,"fa","fa-flag"],["mat-header-row",""],["mat-row","",1,"select-row",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),F(3,sw,3,3,"th",3)(4,cw,2,1,"td",4),Q(),X(5,5),F(6,pw,3,3,"th",3)(7,uw,3,2,"td",4),Q(),X(8,6),F(9,fw,3,3,"th",3)(10,hw,2,1,"td",4),Q(),X(11,7),F(12,gw,3,3,"th",3)(13,_w,3,3,"td",4),Q(),X(14,8),F(15,vw,3,3,"th",9)(16,Sw,3,2,"td",4),Q(),X(17,10),F(18,Dw,3,3,"th",3)(19,ww,2,1,"td",4),Q(),X(20,11),F(21,Pw,3,3,"th",12)(22,Tw,3,6,"td",13),Q(),X(23,14),F(24,Aw,3,3,"th",12)(25,Mw,3,6,"td",13),Q(),X(26,15),F(27,Ow,3,3,"th",12)(28,Iw,3,6,"td",13),Q(),X(29,16),F(30,Ew,3,3,"th",12)(31,Lw,3,6,"td",13),Q(),X(32,17),F(33,kw,3,3,"th",12)(34,qw,5,4,"td",18),Q(),F(35,zw,1,0,"tr",19)(36,jw,1,3,"tr",20),l(),P(37,"mat-paginator",21),l()),i&2&&(o(),x("dataSource",a.dataSource),o(34),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns),o(),x("pageSizeOptions",Ut(4,rw)))},dependencies:[wt,Pt,ae,Gt,_n,wo,vn,bn,xn,wp,Cn,yn,Oi,Sn,wn,Dn,Pn,Do,Sa,gn,Tt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;margin-top:3%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();var Im=(()=>{class t{constructor(){this.route=A(It),this.entityDatatable=null,this.entityId=this.route.parent.parent.snapshot.paramMap.get("loanId"),this.entityDatatable=null,this.route.data.subscribe(e=>{this.entityDatatable=e.loanDatatable,this.multiRowDatatableFlag=this.entityDatatable.columnHeaders[0].columnName==="id"})}ngOnInit(){this.route.parent.parent.params.subscribe(e=>{this.entityId=e.loanId})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-datatable-tab"]],decls:2,vars:3,consts:[[1,"tab-container","mat-typography"],["entityType","Loan Account",3,"entityId","multiRowDatatableFlag","entityDatatable"]],template:function(i,a){i&1&&(s(0,"div",0),P(1,"mifosx-entity-datatable-tab",1),l()),i&2&&(o(),x("entityId",a.entityId)("multiRowDatatableFlag",a.multiRowDatatableFlag)("entityDatatable",a.entityDatatable))},dependencies:[wt,Pt,b1],encapsulation:2})}}return t})();var Vw=()=>["../../general"];function Uw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Closed Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function Hw(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.closeLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Em=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseForm()}createCloseForm(){this.closeLoanForm=this.formBuilder.group({transactionDate:[new Date(this.dataObject.date)||new Date,Wt.required],note:[]})}submit(){let e=this.closeLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.closeLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"close").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-close"]],inputs:{dataObject:"dataObject"},decls:24,vars:18,consts:[["closedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,Uw,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),F(23,Hw,3,4,"button",10),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.closeLoanForm),o(5),C(m(8,11,"labels.inputs.Closed On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.closeLoanForm.controls.transactionDate.hasError("required")?13:-1),o(3),C(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,Vw)),o(),b(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CLOSE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Gw=()=>["../../general"];function Ww(t,n){if(t&1){let e=Ct();s(0,"button",7),it("click",function(){lt(e);let a=T();return st(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),b(" ",m(2,1,"labels.buttons.Submit")," "))}var Lm=(()=>{class t{constructor(){this.loanService=A(At),this.formBuilder=A(Pe),this.route=A(It),this.router=A(le)}ngOnInit(){this.note=this.formBuilder.control("")}submit(){let e=this.route.snapshot.params.loanId;this.loanService.loanActionButtons(e,"undoapproval",{note:this.note.value}).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-undo-approval"]],decls:14,vars:10,consts:[[1,"container","mat-elevation-z8"],[1,"layout-column"],[1,"flex-fill"],["matInput","",3,"formControl"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"mat-card-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"textarea",3),l(),s(9,"mat-card-actions",4)(10,"button",5),c(11),p(12,"translate"),l(),F(13,Ww,3,3,"button",6),l()()()()()),i&2&&(o(6),C(m(7,5,"labels.inputs.Note")),o(2),x("formControl",a.note),o(2),x("routerLink",Ut(9,Gw)),o(),b(" ",m(12,7,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVALUNDO_LOAN"))},dependencies:[wt,Pt,we,he,Wo,ae,ge,Te,Ve,Ce,_e,Ae,Gt,Me,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var $w=()=>["../../general"];function Yw(t,n){if(t&1&&(s(0,"mat-option",5),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.displayName," ")}}function Kw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Loan Officer")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function Zw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Assignment Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function Jw(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.assignOfficerForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var km=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createassignOfficerForm(),this.loanOfficers=this.dataObject.loanOfficerOptions}createassignOfficerForm(){this.assignOfficerForm=this.formBuilder.group({toLoanOfficerId:["",Wt.required],assignmentDate:[new Date,Wt.required]})}submit(){let e=this.assignOfficerForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.assignOfficerForm.value.assignmentDate;e.assignmentDate instanceof Date&&(e.assignmentDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.fromLoanOfficerId=this.dataObject.loanOfficerId||"",this.loanService.loanActionButtons(this.loanId,"assignLoanOfficer",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-assign-loan-officer"]],inputs:{dataObject:"dataObject"},decls:27,vars:19,consts:[["assignOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","toLoanOfficerId"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","assignmentDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",4),de(10,Yw,2,2,"mat-option",5,xe),l(),M(12,Kw,7,9,"mat-error"),l(),s(13,"mat-form-field",6),it("click",function(){lt(r);let d=Et(20);return st(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",7)(18,"mat-datepicker-toggle",8)(19,"mat-datepicker",null,0),M(21,Zw,7,9,"mat-error"),l()(),s(22,"mat-card-actions",9)(23,"button",10),c(24),p(25,"translate"),l(),F(26,Jw,3,4,"button",11),l()()()()()}if(i&2){let r=Et(20);o(2),x("formGroup",a.assignOfficerForm),o(5),b(" ",m(8,12,"labels.inputs.To Loan Officer")),o(3),ue(a.loanOfficers),o(2),O(a.assignOfficerForm.controls.toLoanOfficerId.hasError("required")?12:-1),o(3),C(m(16,14,"labels.inputs.Assignment Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.assignOfficerForm.controls.assignmentDate.hasError("required")?21:-1),o(2),x("routerLink",Ut(18,$w)),o(),b(" ",m(25,16,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","BULKREASSIGN_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Xw=()=>["../../general"];function Qw(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function tP(t,n){if(t&1&&(s(0,"button",16),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.foreclosureForm.valid),o(),b(" ",m(2,2,"labels.buttons.Foreclosure")," ")}}var Fm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createforeclosureForm(),this.onChanges()}createforeclosureForm(){this.foreclosureForm=this.formBuilder.group({transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Wt.required],outstandingPrincipalPortion:[{value:this.dataObject.principalPortion||0,disabled:!0}],outstandingInterestPortion:[{value:this.dataObject.interestPortion||0,disabled:!0}],outstandingFeeChargesPortion:[{value:this.dataObject.feeChargesPortion||0,disabled:!0}],outstandingPenaltyChargesPortion:[{value:this.dataObject.penaltyChargesPortion||0,disabled:!0}],transactionAmount:[{value:this.dataObject.amount,disabled:!0}],note:["",Wt.required]})}onChanges(){this.foreclosureForm.get("transactionDate").valueChanges.subscribe(e=>{this.retrieveLoanForeclosureTemplate(e)})}retrieveLoanForeclosureTemplate(e){let i=this.settingsService.dateFormat,a=this.dateUtils.formatDate(e,i),r={command:"foreclosure",dateFormat:this.settingsService.dateFormat,locale:this.settingsService.language.code,transactionDate:a};this.loanService.getForeclosureData(this.loanId,r).subscribe(u=>{this.foreclosuredata=u,this.foreclosureForm.patchValue({outstandingPrincipalPortion:this.foreclosuredata.principalPortion,outstandingInterestPortion:this.foreclosuredata.interestPortion,outstandingFeeChargesPortion:this.foreclosuredata.feeChargesPortion,outstandingPenaltyChargesPortion:this.foreclosuredata.penaltyChargesPortion})})}submit(){let e=this.foreclosureForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.foreclosureForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.loanForclosureData(this.loanId,u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-foreclosure"]],inputs:{dataObject:"dataObject"},decls:49,vars:33,consts:[["transactionsDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","outstandingPrincipalPortion"],["matInput","","formControlName","outstandingInterestPortion"],["matInput","","formControlName","outstandingFeeChargesPortion"],["matInput","","required","","formControlName","outstandingPenaltyChargesPortion"],["matInput","","required","","formControlName","transactionAmount"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,Qw,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"input",8),l(),s(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),l(),P(28,"input",9),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),P(33,"input",10),l(),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),P(38,"input",11),l(),s(39,"mat-form-field")(40,"mat-label"),c(41),p(42,"translate"),l(),P(43,"textarea",12),l()(),s(44,"mat-card-actions",13)(45,"button",14),c(46),p(47,"translate"),l(),F(48,tP,3,4,"button",15),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.foreclosureForm),o(5),C(m(8,16,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.foreclosureForm.controls.transactionDate.hasError("required")?13:-1),o(3),C(m(17,18,"labels.inputs.Principal")),o(5),C(m(22,20,"labels.inputs.Interest")),o(5),C(m(27,22,"labels.inputs.Fee Amount")),o(5),C(m(32,24,"labels.inputs.Penalty Amount")),o(5),C(m(37,26,"labels.inputs.Transaction Amount")),o(5),C(m(42,28,"labels.inputs.Note")),o(4),x("routerLink",Ut(32,Xw)),o(),b(" ",m(47,30,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","FORECLOSURE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var eP=()=>["../../general"];function nP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function iP(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",14),it("click",function(){lt(e);let a=Et(7);return st(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",15)(5,"mat-datepicker-toggle",16)(6,"mat-datepicker",null,0),M(8,nP,7,9,"mat-error"),l()}if(t&2){let e=Et(7),i=T();o(2),C(m(3,6,"labels.inputs.Transaction Date")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(3),O(i.prepayLoanForm.controls.transactionDate.hasError("required")?8:-1)}}function aP(t,n){if(t&1&&P(0,"mifosx-input-amount",7),t&2){let e=T();x("currency",e.currency)("isRequired",!0)("inputFormControl",e.prepayLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount")}}function oP(t,n){if(t&1&&(s(0,"mat-option",18),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function rP(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",17),de(5,oP,2,2,"mat-option",18,xe),l()()),t&2){let e=T();o(2),C(m(3,1,"labels.inputs.Payment Type")),o(3),ue(e.paymentTypes)}}function lP(t,n){if(t&1){let e=Ct();s(0,"div",9)(1,"span",19),it("click",function(){lt(e);let a=T();return st(a.addPaymentDetails())}),s(2,"mat-slide-toggle")(3,"div",20)(4,"span",21),c(5),p(6,"translate"),l()()()()()}if(t&2){let e=T();o(3),x("className",e.showPaymentDetails?"enabled":"disabled"),o(2),C(m(6,2,"labels.inputs.Show Payment Details"))}}function sP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",23),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",24),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",25),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",26),l()),t&2&&(o(2),b(" ",m(3,5,"labels.inputs.Account")," #"),o(5),b("",m(8,7,"labels.inputs.Cheque")," #"),o(5),C(m(13,9,"labels.inputs.Routing Code")),o(5),b("",m(18,11,"labels.inputs.Reciept")," #"),o(5),b("",m(23,13,"labels.inputs.Bank")," #"))}function cP(t,n){if(t&1&&(s(0,"button",27),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.prepayLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Nm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.prepayData=this.dataObject,this.contractTermination=this.dataObject.actionName=="Contract Termination",this.maxDate=this.settingsService.businessDate,this.createprepayLoanForm(),this.contractTermination||this.setPrepayLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createprepayLoanForm(){this.contractTermination?this.prepayLoanForm=this.formBuilder.group({externalId:[""],note:[""]}):this.prepayLoanForm=this.formBuilder.group({transactionDate:[new Date,Wt.required],transactionAmount:["",Wt.required],externalId:[""],paymentTypeId:[""],note:[""]})}setPrepayLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.prepayLoanForm.patchValue({transactionAmount:this.dataObject.amount}),this.prepayLoanForm.get("transactionDate").valueChanges.subscribe(e=>{let i=this.dateUtils.formatDate(e,this.settingsService.dateFormat);this.loanService.getLoanPrepayLoanActionTemplate(this.loanId,i).subscribe(a=>{this.prepayData=a,this.prepayLoanForm.patchValue({transactionAmount:this.prepayData.amount})})})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.prepayLoanForm.addControl("accountNumber",new pe("")),this.prepayLoanForm.addControl("checkNumber",new pe("")),this.prepayLoanForm.addControl("routingCode",new pe("")),this.prepayLoanForm.addControl("receiptNumber",new pe("")),this.prepayLoanForm.addControl("bankNumber",new pe(""))):(this.prepayLoanForm.removeControl("accountNumber"),this.prepayLoanForm.removeControl("checkNumber"),this.prepayLoanForm.removeControl("routingCode"),this.prepayLoanForm.removeControl("receiptNumber"),this.prepayLoanForm.removeControl("bankNumber"))}submitRepayment(){let e=this.prepayLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.prepayLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loanService.submitLoanActionButton(this.loanId,u,"repayment").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}submitContractTermination(){let e=ie({},this.prepayLoanForm.value);this.loanService.loanActionButtons(this.loanId,"contractTermination",e).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}submit(){this.contractTermination?this.submitContractTermination():this.submitRepayment()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-prepay-loan"]],inputs:{dataObject:"dataObject"},decls:50,vars:42,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"layout-row-wrap"],[1,"flex-50","mat-body-strong"],[1,"flex-50","r-amount","right-label"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],[1,"flex-fill"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","paymentTypeId"],[3,"value"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",3),M(5,iP,9,8,"mat-form-field"),s(6,"div",4)(7,"div",5),c(8),p(9,"translate"),l(),s(10,"div",6),c(11),p(12,"formatNumber"),l(),s(13,"div",5),c(14),p(15,"translate"),l(),s(16,"div",6),c(17),p(18,"formatNumber"),l(),s(19,"div",5),c(20),p(21,"translate"),l(),s(22,"div",6),c(23),p(24,"formatNumber"),l(),s(25,"div",5),c(26),p(27,"translate"),l(),s(28,"div",6),c(29),p(30,"formatNumber"),l()(),M(31,aP,1,4,"mifosx-input-amount",7),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),P(36,"input",8),l(),M(37,rP,7,3,"mat-form-field"),M(38,lP,7,4,"div",9),M(39,sP,25,15),s(40,"mat-form-field")(41,"mat-label"),c(42),p(43,"translate"),l(),P(44,"textarea",10),l()(),s(45,"mat-card-actions",11)(46,"button",12),c(47),p(48,"translate"),l(),F(49,cP,3,4,"button",13),l()()()()()),i&2&&(o(2),x("formGroup",a.prepayLoanForm),o(3),O(a.contractTermination?-1:5),o(3),b(" ",m(9,19,"labels.inputs.Principal")," "),o(3),b(" ",m(12,21,a.prepayData.principalPortion)," "),o(3),b(" ",m(15,23,"labels.inputs.Interest")," "),o(3),b(" ",m(18,25,a.prepayData.interestPortion)," "),o(3),b(" ",m(21,27,"labels.inputs.Fees")," "),o(3),b(" ",m(24,29,a.prepayData.feeChargesPortion)," "),o(3),b(" ",m(27,31,"labels.inputs.Penalties")," "),o(3),b(" ",m(30,33,a.prepayData.penaltyChargesPortion)," "),o(2),O(a.contractTermination?-1:31),o(3),C(m(35,35,"labels.inputs.External Id")),o(3),O(a.contractTermination?-1:37),o(),O(a.contractTermination?-1:38),o(),O(a.showPaymentDetails?39:-1),o(3),C(m(43,37,"labels.inputs.Note")),o(4),x("routerLink",Ut(41,eP)),o(),b(" ",m(48,39,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN"))},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Bi,za,Wn,Tt,fn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var Rm=(()=>{class t{constructor(){this.loanService=A(At),this.dateUtils=A(me)}loadPenalties(e){return this.loanService.getLoanCharges(e).pipe(Nf(i=>{let a=[];Array.isArray(i)?a=i:i&&Array.isArray(i.pageItems)?a=i.pageItems:i&&Array.isArray(i.content)?a=i.content:i&&Array.isArray(i.charges)?a=i.charges:i&&i.data&&Array.isArray(i.data)&&(a=i.data);let r=this.filterPenaltyCharges(a);return r.forEach(u=>{u.dueDate&&(u.dueDate=this.dateUtils.parseDate(u.dueDate))}),r.sort((u,d)=>u.dueDate&&d.dueDate?u.dueDate.getTime()-d.dueDate.getTime():0),r}))}filterPenaltyCharges(e){return!e||!Array.isArray(e)?[]:e.filter(i=>!i||!(i.penalty||i.penalty==="true"||i.chargeTimeType&&(i.chargeTimeType.value?.toLowerCase().includes("overdue")||i.chargeTimeType.code?.toLowerCase().includes("overdue")||i.chargeTimeType.id===9))||i.waived||i.waived==="true"||i.paid||i.paid==="true"?!1:(i.amountOutstanding||i.amountOutstanding===0?i.amountOutstanding:i.amount)>0)}toggleSelectAllPenalties(e,i){let a=!e;return{selectAllPenalties:a,selectedPenalties:a?i.map(r=>r.id):[]}}togglePenaltySelection(e,i,a){let r=[...i],u=r.indexOf(e);u>-1?r.splice(u,1):r.push(e);let d=a.length,g=d===0?!1:r.length===d;return{selectedPenalties:r,selectAllPenalties:g}}isPenaltySelected(e,i){return i.includes(e)}getPenaltyDisplayKey(e){if(!e)return"labels.inputs.Overdue Fees";let i=(e.name||e.chargeTimeType?.value||"Overdue Fees").toString().trim(),a=i.toUpperCase();return a==="MORA"||a==="OVERDUE"?"labels.inputs.Overdue":a==="OVERDUE FEES"?"labels.inputs.Overdue Fees":(i.startsWith("labels."),i)}waivePenalties(e,i){if(!i||i.length===0)return pd([]);let a=i.map(r=>this.loanService.executeLoansAccountChargesCommand(e,"waive",{},r).pipe(Bf(u=>(console.error(`Error waiving penalty ${r}:`,u),pd(null)))));return Rf(a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var pP=()=>["../../general"],mP=(t,n)=>n.id;function dP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function uP(t,n){if(t&1&&(s(0,"div",7)(1,"div",19),c(2),p(3,"translate"),l(),s(4,"div",20),c(5),p(6,"formatNumber"),l(),s(7,"div",19),c(8),p(9,"translate"),l(),s(10,"div",20),c(11),p(12,"formatNumber"),l(),s(13,"div",19),c(14),p(15,"translate"),l(),s(16,"div",20),c(17),p(18,"formatNumber"),l(),s(19,"div",19),c(20),p(21,"translate"),l(),s(22,"div",20),c(23),p(24,"formatNumber"),l()()),t&2){let e=T();o(2),b(" ",m(3,8,"labels.inputs.Principal")," "),o(3),b(" ",m(6,10,e.dataObject.principalPortion)," "),o(3),b(" ",m(9,12,"labels.inputs.Interest")," "),o(3),b(" ",m(12,14,e.dataObject.interestPortion)," "),o(3),b(" ",m(15,16,"labels.inputs.Fees")," "),o(3),b(" ",m(18,18,e.dataObject.feeChargesPortion)," "),o(3),b(" ",m(21,20,"labels.inputs.Penalties")," "),o(3),b(" ",m(24,22,e.dataObject.penaltyChargesPortion)," ")}}function fP(t,n){if(t&1&&(s(0,"mat-option",11),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function hP(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",21),de(5,fP,2,2,"mat-option",11,xe),l()()),t&2){let e=T();o(2),C(m(3,1,"labels.inputs.Classification")),o(3),ue(e.classificationOptions)}}function gP(t,n){if(t&1&&(s(0,"mat-option",11),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function _P(t,n){if(t&1){let e=Ct();s(0,"div",26)(1,"mat-checkbox",13),it("change",function(){let a=lt(e).$implicit,r=T(3);return st(r.togglePenaltySelection(a.id))}),l(),s(2,"span",27),c(3),p(4,"translate"),l(),s(5,"span",28),c(6),p(7,"translate"),l(),s(8,"span",29),c(9),p(10,"dateFormat"),l(),s(11,"span",30),c(12),p(13,"formatNumber"),l()()}if(t&2){let e=n.$implicit,i=T(3);o(),x("checked",i.isPenaltySelected(e.id)),o(2),C(m(4,5,"labels.inputs.Penalty")),o(3),C(m(7,7,i.getPenaltyDisplayKey(e))),o(3),C(m(10,9,e.dueDate)),o(3),C(m(13,11,e.amountOutstanding||e.amount||0))}}function CP(t,n){if(t&1){let e=Ct();s(0,"div",22)(1,"div",24)(2,"mat-checkbox",13),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelectAllPenalties())}),c(3),p(4,"translate"),l()(),s(5,"div",25),de(6,_P,14,13,"div",26,mP),l()()}if(t&2){let e=T(2);o(2),x("checked",e.selectAllPenalties),o(),b(" ",m(4,2,"labels.inputs.All")," "),o(3),ue(e.penalties)}}function bP(t,n){t&1&&(s(0,"div",23)(1,"span",31),c(2),p(3,"translate"),l()()),t&2&&(o(2),C(m(3,1,"labels.text.No penalties found")))}function vP(t,n){if(t&1&&M(0,CP,8,4,"div",22)(1,bP,4,3,"div",23),t&2){let e=T();O(e.penalties.length>0?0:1)}}function xP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",32),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",33),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",34),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",35),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",36),l()),t&2&&(o(2),b(" ",m(3,5,"labels.inputs.Account")," #"),o(5),b(" ",m(8,7,"labels.inputs.Cheque")," #"),o(5),b(" ",m(13,9,"labels.inputs.Routing Code")),o(5),b(" ",m(18,11,"labels.inputs.Reciept")," #"),o(5),b(" ",m(23,13,"labels.inputs.Bank")," #"))}function yP(t,n){t&1&&(s(0,"mat-checkbox",15),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Skip Interest Refund Transaction Posting")," "))}function SP(t,n){if(t&1&&(s(0,"button",37),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.repaymentLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Bm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.penaltyManagementService=A(Rm),this.showPaymentDetails=!1,this.waivePenalties=!1,this.penalties=[],this.selectedPenalties=[],this.selectAllPenalties=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.command=null,this.classificationOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.command=this.dataObject.type.code.split(".")[1],this.maxDate=this.settingsService.businessDate,this.createRepaymentLoanForm(),this.setRepaymentLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency),this.loadPenalties()}createRepaymentLoanForm(){this.repaymentLoanForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,Wt.required],externalId:"",paymentTypeId:"",note:"",skipInterestRefund:[!1]}),this.isCapitalizedIncome()?(this.repaymentLoanForm.addControl("transactionAmount",new pe("",[])),this.updateTransactionAmountValidators(!1)):(this.repaymentLoanForm.addControl("transactionAmount",new pe("",[])),this.updateTransactionAmountValidators(!1)),(this.isCapitalizedIncome()||this.isBuyDownFee())&&this.repaymentLoanForm.addControl("classificationId",new pe(""))}setRepaymentLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.classificationOptions=this.dataObject.classificationOptions,this.repaymentLoanForm.patchValue({transactionAmount:this.dataObject.amount})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.repaymentLoanForm.addControl("accountNumber",new pe("")),this.repaymentLoanForm.addControl("checkNumber",new pe("")),this.repaymentLoanForm.addControl("routingCode",new pe("")),this.repaymentLoanForm.addControl("receiptNumber",new pe("")),this.repaymentLoanForm.addControl("bankNumber",new pe(""))):(this.repaymentLoanForm.removeControl("accountNumber"),this.repaymentLoanForm.removeControl("checkNumber"),this.repaymentLoanForm.removeControl("routingCode"),this.repaymentLoanForm.removeControl("receiptNumber"),this.repaymentLoanForm.removeControl("bankNumber"))}showDetails(){return!this.isCapitalizedIncome()&&!this.isBuyDownFee()}isCapitalizedIncome(){return["capitalizedIncome","capitalizedIncomeAdjustment"].includes(this.command)}isBuyDownFee(){return["buyDownFee"].includes(this.command)}showInterestRefundCheckbox(){let e=this.dataObject?.type?.code?.toLowerCase()||"";return e.includes("merchantissuedrefund")||e.includes("payoutrefund")}loadPenalties(){this.penaltyManagementService.loadPenalties(this.loanId).subscribe({next:e=>{this.penalties=e},error:e=>{console.error("Error loading penalties:",e),this.penalties=[]}})}toggleWaivePenalties(){this.waivePenalties=!this.waivePenalties,this.waivePenalties?this.recalculateTransactionAmount():(this.selectedPenalties=[],this.selectAllPenalties=!1,this.updateTransactionAmountValidators(!1),this.recalculateTransactionAmount())}toggleSelectAllPenalties(){let e=this.penaltyManagementService.toggleSelectAllPenalties(this.selectAllPenalties,this.penalties);this.selectAllPenalties=e.selectAllPenalties,this.selectedPenalties=e.selectedPenalties,this.recalculateTransactionAmount()}togglePenaltySelection(e){let i=this.penaltyManagementService.togglePenaltySelection(e,this.selectedPenalties,this.penalties);this.selectedPenalties=i.selectedPenalties,this.selectAllPenalties=i.selectAllPenalties,this.recalculateTransactionAmount()}isPenaltySelected(e){return this.penaltyManagementService.isPenaltySelected(e,this.selectedPenalties)}getPenaltyDisplayKey(e){return this.penaltyManagementService.getPenaltyDisplayKey(e)}recalculateTransactionAmount(){let e=this.repaymentLoanForm.value.transactionAmount,i=e!=null?Number(e):Number(this.dataObject.amount??0),a=isNaN(i)?Number(this.dataObject.amount??0):i;if(!this.waivePenalties||this.selectedPenalties.length===0){this.repaymentLoanForm.patchValue({transactionAmount:a},{emitEvent:!1});return}let r=0;this.selectedPenalties.forEach(d=>{let g=this.penalties.find(_=>_.id===d);g&&(r+=g.amountOutstanding||g.amount||0)});let u=Math.max(0,a-r);this.updateTransactionAmountValidators(this.waivePenalties&&u===0),this.repaymentLoanForm.patchValue({transactionAmount:u},{emitEvent:!1})}updateTransactionAmountValidators(e){let i=[Wt.required,Wt.min(e?0:.001)];this.isCapitalizedIncome()&&i.push(Wt.max(this.dataObject.amount)),this.repaymentLoanForm.controls.transactionAmount.setValidators(i),this.repaymentLoanForm.controls.transactionAmount.updateValueAndValidity({emitEvent:!1})}submit(){let e=this.repaymentLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.repaymentLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,e.skipInterestRefund&&(u.interestRefundCalculation=!1),delete u.skipInterestRefund,this.waivePenalties&&this.selectedPenalties.length>0?this.penaltyManagementService.waivePenalties(this.loanId,this.selectedPenalties).subscribe({next:()=>{this.submitRepayment(u)},error:d=>{console.error("Error waiving penalties:",d),this.submitRepayment(u)}}):this.submitRepayment(u)}submitRepayment(e){this.loanService.submitLoanActionButton(this.loanId,e,this.command).subscribe(i=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-make-repayment"]],inputs:{dataObject:"dataObject"},decls:50,vars:41,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"layout-row-wrap"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill","m-b-10"],[3,"change","checked"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],["formControlName","skipInterestRefund"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"flex-50","mat-body-strong"],[1,"flex-50","r-amount","right-label"],["formControlName","classificationId"],[1,"layout-row-wrap","m-t-20"],[1,"m-t-20","m-l-10"],[1,"flex-100","m-b-10"],[1,"flex-100","layout-row-wrap"],[1,"penalty-item-container"],[1,"penalty-label","mat-body-strong"],[1,"penalty-name"],[1,"penalty-date"],[1,"penalty-amount","r-amount"],[1,"mat-body-2"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,dP,7,9,"mat-error"),l(),M(14,uP,25,24,"div",7),P(15,"mifosx-input-amount",8),s(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),l(),P(20,"input",9),l(),M(21,hP,7,3,"mat-form-field"),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),s(26,"mat-select",10),de(27,gP,2,2,"mat-option",11,xe),l()(),s(29,"div",12)(30,"mat-slide-toggle",13),it("change",function(){return lt(r),st(a.addPaymentDetails())}),c(31),p(32,"translate"),l()(),s(33,"div",12)(34,"mat-slide-toggle",13),it("change",function(){return lt(r),st(a.toggleWaivePenalties())}),c(35),p(36,"translate"),l()(),M(37,vP,2,1),M(38,xP,25,15),s(39,"mat-form-field")(40,"mat-label"),c(41),p(42,"translate"),l(),P(43,"textarea",14),l(),M(44,yP,3,3,"mat-checkbox",15),l(),s(45,"mat-card-actions",16)(46,"button",17),c(47),p(48,"translate"),l(),F(49,SP,3,4,"button",18),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.repaymentLoanForm),o(5),C(m(8,26,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.repaymentLoanForm.controls.transactionDate.hasError("required")?13:-1),o(),O(a.showDetails()?14:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.repaymentLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(19,28,"labels.inputs.External Id")),o(3),O(a.isCapitalizedIncome()||a.isBuyDownFee()?21:-1),o(3),C(m(25,30,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypes),o(3),x("checked",a.showPaymentDetails),o(),b(" ",m(32,32,"labels.inputs.Show Payment Details")," "),o(3),x("checked",a.waivePenalties),o(),b(" ",m(36,34,"labels.inputs.Waive Penalties")," "),o(2),O(a.waivePenalties?37:-1),o(),O(a.showPaymentDetails?38:-1),o(3),b(" ",m(42,36,"labels.inputs.Note")),o(3),O(a.showInterestRefundCheckbox()?44:-1),o(2),x("routerLink",Ut(40,pP)),o(),b(" ",m(48,38,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Da,Me,Bi,za,Wn,gn,Tt,fn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}.penalty-item-container[_ngcontent-%COMP%]{width:100%;max-width:100%;display:grid;grid-template-columns:auto minmax(80px,110px) minmax(140px,100%) minmax(130px,170px) minmax(90px,120px);align-items:center;gap:8px;margin-top:10px;padding:12px 16px;background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;overflow:hidden}.penalty-label[_ngcontent-%COMP%]{min-width:80px}.penalty-name[_ngcontent-%COMP%]{min-width:120px}.penalty-date[_ngcontent-%COMP%]{white-space:nowrap}.penalty-amount[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.dark-theme[_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%]{background-color:#3a3a3a;color:#ffffffde;border-color:#4a4a4a}"]})}}return t})();var DP=()=>["../../general"];function wP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function PP(t,n){if(t&1&&(s(0,"button",13),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.creditBalanceLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var qm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCreditBalanceLoanForm(),this.setCreditBalanceLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createCreditBalanceLoanForm(){this.creditBalanceLoanForm=this.formBuilder.group({transactionDate:[new Date,Wt.required],transactionAmount:["",Wt.required],externalId:"",note:""})}setCreditBalanceLoanDetails(){this.creditBalanceLoanForm.patchValue({transactionAmount:this.dataObject.amount})}submit(){let e=this.creditBalanceLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.creditBalanceLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i}),d=this.dataObject.type.code.split(".")[1];u.transactionAmount=u.transactionAmount*1,this.loanService.submitLoanActionButton(this.loanId,u,d).subscribe(g=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-credit-balance-refund"]],inputs:{dataObject:"dataObject"},decls:30,vars:25,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,wP,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"textarea",9),l()(),s(25,"mat-card-actions",10)(26,"button",11),c(27),p(28,"translate"),l(),F(29,PP,3,4,"button",12),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.creditBalanceLoanForm),o(5),C(m(8,16,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.creditBalanceLoanForm.controls.transactionDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.creditBalanceLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(18,18,"labels.inputs.External Id")),o(5),C(m(23,20,"labels.inputs.Note")),o(4),x("routerLink",Ut(24,DP)),o(),b(" ",m(28,22,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Bi,Wn,Tt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var TP=()=>["../../general"];function AP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Interest Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function MP(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.loanInterestForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var zm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.router=A(le),this.settingsService=A(oe),this.dateUtils=A(me),this.loanService=A(At),this.route=A(It),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setLoanInterestForm(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}setLoanInterestForm(){this.loanInterestForm=this.formBuilder.group({transactionAmount:[this.dataObject.amount,Wt.required],transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Wt.required],note:[""]})}submit(){let e=this.loanInterestForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.loanInterestForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1;let d=this.route.snapshot.params.loanId;this.loanService.submitLoanActionButton(d,u,"waiveinterest").subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-waive-interest"]],inputs:{dataObject:"dataObject"},decls:25,vars:22,consts:[["interestDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,AP,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"textarea",8),l()(),s(20,"mat-card-actions",9)(21,"button",10),c(22),p(23,"translate"),l(),F(24,MP,3,4,"button",11),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.loanInterestForm),o(5),C(m(8,15,"labels.inputs.Interest waived on")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.loanInterestForm.controls.transactionDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.loanInterestForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(18,17,"labels.inputs.Note")),o(4),x("routerLink",Ut(21,TP)),o(),b(" ",m(23,19,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WAIVEINTERESTPORTION_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Bi,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var OP=()=>["../../general"];function IP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Write Off Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function EP(t,n){if(t&1&&(s(0,"mat-option",9),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function LP(t,n){if(t&1){let e=Ct();s(0,"button",14),it("click",function(){lt(e);let a=T();return st(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),b(" ",m(2,1,"labels.buttons.Submit")," "))}var jm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.loanService=A(At),this.dateUtils=A(me),this.router=A(le),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.writeOffReasonOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setWriteOffForm(),this.writeOffReasonOptions=this.dataObject.writeOffReasonOptions}setWriteOffForm(){this.writeOffForm=this.formBuilder.group({transactionDate:[this.dataObject.date&&new Date(this.dataObject.date),Wt.required],amount:[{value:this.dataObject.amount,disabled:!0}],writeoffReasonId:[""],note:[""]})}submit(){let e=this.writeOffForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.writeOffForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a)),(e.writeoffReasonId===null||e.writeoffReasonId==="")&&delete e.writeoffReasonId;let u=Se(ie({},e),{dateFormat:a,locale:i});delete u.amount,this.loanService.submitLoanActionButton(this.loanId,u,"writeoff").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-write-off-page"]],inputs:{dataObject:"dataObject"},decls:36,vars:24,consts:[["writeOffDatePicker",""],[1,"container","mat-elevation-z8"],[3,"formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","amount"],["formControlName","writeoffReasonId"],[3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"mat-card-content")(3,"form",2)(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,IP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),de(24,EP,2,2,"mat-option",9,xe),l()(),s(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),l(),P(30,"textarea",10),l()()(),s(31,"mat-card-actions",11)(32,"button",12),c(33),p(34,"translate"),l(),F(35,LP,3,3,"button",13),l()()()()}if(i&2){let r=Et(12);o(3),x("formGroup",a.writeOffForm),o(4),C(m(8,13,"labels.inputs.Write off on")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.writeOffForm.controls.transactionDate.hasError("required")?13:-1),o(3),C(m(17,15,"labels.inputs.Amount")),o(5),C(m(22,17,"labels.inputs.Reason for Write-Off")),o(3),ue(a.writeOffReasonOptions),o(4),C(m(29,19,"labels.inputs.Note")),o(4),x("routerLink",Ut(23,OP)),o(),b(" ",m(34,21,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WRITEOFF_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var kP=()=>["../../general"];function FP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Closed Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function NP(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.closeLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Vm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createCloseForm()}createCloseForm(){this.closeLoanForm=this.formBuilder.group({transactionDate:[new Date(this.dataObject.date)||new Date,Wt.required],note:[]})}submit(){let e=this.closeLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.closeLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"close-rescheduled").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-close-as-rescheduled"]],inputs:{dataObject:"dataObject"},decls:24,vars:18,consts:[["closedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,FP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),F(23,NP,3,4,"button",10),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.closeLoanForm),o(5),C(m(8,11,"labels.inputs.Closed On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.closeLoanForm.controls.transactionDate.hasError("required")?13:-1),o(3),C(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,kP)),o(),b(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CLOSEASRESCHEDULED_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var RP=()=>["../../general"],BP=(t,n)=>n.id;function qP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Reschedule Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function zP(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function jP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Reason for Rescheduling")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function VP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Submitted On Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function UP(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",6),it("click",function(){lt(e);let a=Et(7);return st(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18)(5,"mat-datepicker-toggle",8)(6,"mat-datepicker",null,2),l()}if(t&2){let e=Et(7),i=T();o(2),C(m(3,4,"labels.inputs.Installment Rescheduled to")),o(2),x("min",i.minDate)("matDatepicker",e),o(),x("for",e)}}function HP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",20),l()),t&2&&(o(2),b("",m(3,2,"labels.inputs.Principal Grace Periods")," "),o(5),b("",m(8,4,"labels.inputs.Interest Grace Periods")," "))}function GP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",21),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Number Of new Repayments")))}function WP(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.New Interest Rate")))}function $P(t,n){if(t&1){let e=Ct();s(0,"div",28)(1,"mat-checkbox",26),it("change",function(){let a=lt(e).$implicit,r=T(3);return st(r.togglePenaltySelection(a.id))}),l(),s(2,"span",29),c(3),p(4,"translate"),l(),s(5,"span",30),c(6),p(7,"translate"),l(),s(8,"span",31),c(9),p(10,"dateFormat"),l(),s(11,"span",32),c(12),p(13,"formatNumber"),l()()}if(t&2){let e=n.$implicit,i=T(3);o(),x("checked",i.isPenaltySelected(e.id)),o(2),C(m(4,5,"labels.inputs.Penalty")),o(3),C(m(7,7,i.getPenaltyDisplayKey(e))),o(3),C(m(10,9,e.dueDate)),o(3),C(m(13,11,e.amountOutstanding||e.amount||0))}}function YP(t,n){if(t&1){let e=Ct();s(0,"div",23)(1,"div",25)(2,"mat-checkbox",26),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelectAllPenalties())}),c(3),p(4,"translate"),l()(),s(5,"div",27),de(6,$P,14,13,"div",28,BP),l()()}if(t&2){let e=T(2);o(2),x("checked",e.selectAllPenalties),o(),b(" ",m(4,2,"labels.inputs.All")," "),o(3),ue(e.penalties)}}function KP(t,n){t&1&&(s(0,"div",24)(1,"span",33),c(2),p(3,"translate"),l()()),t&2&&(o(2),C(m(3,1,"labels.text.No penalties found")))}function ZP(t,n){if(t&1&&M(0,YP,8,4,"div",23)(1,KP,4,3,"div",24),t&2){let e=T();O(e.penalties.length>0?0:1)}}function JP(t,n){if(t&1&&(s(0,"button",34),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.rescheduleLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Um=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.penaltyManagementService=A(Rm),this.destroyRef=A(fp),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.changeRepaymentDate=new pe(!1),this.introduceGracePeriods=new pe(!1),this.extendRepaymentPeriod=new pe(!1),this.adjustinterestrates=new pe(!1),this.waivePenalties=new pe(!1),this.penalties=[],this.selectedPenalties=[],this.selectAllPenalties=!1,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.codes=this.dataObject.rescheduleReasons,this.setRescheduleLoanForm(),this.loadPenalties(),this.setupWaivePenaltiesListener()}setRescheduleLoanForm(){this.rescheduleLoanForm=this.formBuilder.group({rescheduleFromDate:[new Date,Wt.required],rescheduleReasonId:["",Wt.required],submittedOnDate:[new Date,Wt.required],rescheduleReasonComment:[""],adjustedDueDate:[""],graceOnPrincipal:[""],graceOnInterest:[""],extraTerms:[""],newInterestRate:[""]})}submit(){let e=this.rescheduleLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.rescheduleLoanForm.value.rescheduleFromDate,u=this.rescheduleLoanForm.value.adjustedDueDate,d=this.rescheduleLoanForm.value.submittedOnDate;r instanceof Date&&(e.rescheduleFromDate=this.dateUtils.formatDate(r,a)),u instanceof Date&&(e.adjustedDueDate=this.dateUtils.formatDate(u,a)),d instanceof Date&&(e.submittedOnDate=this.dateUtils.formatDate(d,a));let g=Se(ie({},e),{dateFormat:a,locale:i});g.loanId=this.loanId,this.waivePenalties.value&&this.selectedPenalties.length>0?this.penaltyManagementService.waivePenalties(this.loanId,this.selectedPenalties).subscribe({next:()=>{this.submitReschedule(g)},error:_=>{console.error("Error waiving penalties:",_),this.submitReschedule(g)}}):this.submitReschedule(g)}submitReschedule(e){this.loanService.submitRescheduleData(e).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}loadPenalties(){this.penaltyManagementService.loadPenalties(this.loanId).subscribe({next:e=>{this.penalties=e},error:e=>{console.error("Error loading penalties:",e),this.penalties=[]}})}setupWaivePenaltiesListener(){this.waivePenalties.valueChanges.pipe(Fp(this.destroyRef)).subscribe(e=>{e||(this.selectedPenalties=[],this.selectAllPenalties=!1)})}toggleSelectAllPenalties(){let e=this.penaltyManagementService.toggleSelectAllPenalties(this.selectAllPenalties,this.penalties);this.selectAllPenalties=e.selectAllPenalties,this.selectedPenalties=e.selectedPenalties}togglePenaltySelection(e){let i=this.penaltyManagementService.togglePenaltySelection(e,this.selectedPenalties,this.penalties);this.selectedPenalties=i.selectedPenalties,this.selectAllPenalties=i.selectAllPenalties}isPenaltySelected(e){return this.penaltyManagementService.isPenaltySelected(e,this.selectedPenalties)}getPenaltyDisplayKey(e){return this.penaltyManagementService.getPenaltyDisplayKey(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reschedule"]],inputs:{dataObject:"dataObject"},decls:61,vars:53,consts:[["rescheduleDatePicker",""],["submittedDatePicker",""],["installmentrescheduledDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rescheduleFromDate",3,"min","matDatepicker"],["matSuffix","",3,"for"],["formControlName","rescheduleReasonId"],[3,"value"],["matInput","","required","","formControlName","submittedOnDate",3,"min","matDatepicker"],["matInput","","formControlName","rescheduleReasonComment"],[3,"formControl"],[1,"m-b-10",3,"formControl"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","adjustedDueDate",3,"min","matDatepicker"],["matInput","","formControlName","graceOnPrincipal"],["matInput","","formControlName","graceOnInterest"],["matInput","","formControlName","extraTerms"],["matInput","","formControlName","newInterestRate"],[1,"layout-row-wrap","m-t-20"],[1,"m-t-20","m-l-10"],[1,"flex-100","m-b-10"],[3,"change","checked"],[1,"flex-100","layout-row-wrap"],[1,"penalty-item-container"],[1,"penalty-label","mat-body-strong"],[1,"penalty-name"],[1,"penalty-date"],[1,"penalty-amount","r-amount"],[1,"mat-body-2"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",3)(1,"mat-card")(2,"form",4),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",5)(5,"mat-form-field",6),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",7)(10,"mat-datepicker-toggle",8)(11,"mat-datepicker",null,0),M(13,qP,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",9),de(19,zP,2,2,"mat-option",10,xe),l(),M(21,jP,7,9,"mat-error"),l(),s(22,"mat-form-field",6),it("click",function(){lt(r);let d=Et(29);return st(d.open())}),s(23,"mat-label"),c(24),p(25,"translate"),l(),P(26,"input",11)(27,"mat-datepicker-toggle",8)(28,"mat-datepicker",null,1),M(30,VP,7,9,"mat-error"),l(),s(31,"mat-form-field")(32,"mat-label"),c(33),p(34,"translate"),l(),P(35,"textarea",12),l(),s(36,"mat-checkbox",13),c(37),p(38,"translate"),l(),M(39,UP,8,6,"mat-form-field"),s(40,"mat-checkbox",13),c(41),p(42,"translate"),l(),M(43,HP,10,6),s(44,"mat-checkbox",13),c(45),p(46,"translate"),l(),M(47,GP,5,3,"mat-form-field"),s(48,"mat-checkbox",13),c(49),p(50,"translate"),l(),M(51,WP,5,3,"mat-form-field"),s(52,"mat-checkbox",14),c(53),p(54,"translate"),l(),M(55,ZP,2,1),l(),s(56,"mat-card-actions",15)(57,"button",16),c(58),p(59,"translate"),l(),F(60,JP,3,4,"button",17),l()()()()()}if(i&2){let r=Et(12),u=Et(29);o(2),x("formGroup",a.rescheduleLoanForm),o(5),C(m(8,32,"labels.inputs.Reschedule from Installment On")),o(2),x("min",a.minDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.rescheduleLoanForm.controls.rescheduleFromDate.hasError("required")?13:-1),o(3),C(m(17,34,"labels.inputs.Reason for Rescheduling")),o(3),ue(a.codes),o(2),O(a.rescheduleLoanForm.controls.rescheduleReasonId.hasError("required")?21:-1),o(3),C(m(25,36,"labels.inputs.Submitted On")),o(2),x("min",a.minDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.rescheduleLoanForm.controls.submittedOnDate.hasError("required")?30:-1),o(3),C(m(34,38,"labels.inputs.Comments")),o(3),x("formControl",a.changeRepaymentDate),o(),b(" ",m(38,40,"labels.inputs.Change Repayment Date")," "),o(2),O(a.changeRepaymentDate.value?39:-1),o(),x("formControl",a.introduceGracePeriods),o(),b(" ",m(42,42,"labels.inputs.Introduce Mid-term grace periods")," "),o(2),O(a.introduceGracePeriods.value?43:-1),o(),x("formControl",a.extendRepaymentPeriod),o(),b(" ",m(46,44,"labels.inputs.Extend Repayment Period")," "),o(2),O(a.extendRepaymentPeriod.value?47:-1),o(),x("formControl",a.adjustinterestrates),o(),b(" ",m(50,46,"labels.inputs.Adjust interest rates for remainder of loan")," "),o(2),O(a.adjustinterestrates.value?51:-1),o(),x("formControl",a.waivePenalties),o(),b(" ",m(54,48,"labels.inputs.Waive Penalties")," "),o(2),O(a.waivePenalties.value?55:-1),o(2),x("routerLink",Ut(52,RP)),o(),b(" ",m(59,50,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVE_RESCHEDULELOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,Wo,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Da,Me,gn,Tt,fn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.penalty-item-container[_ngcontent-%COMP%]{width:100%;max-width:100%;display:grid;grid-template-columns:auto minmax(80px,110px) minmax(140px,100%) minmax(130px,170px) minmax(90px,120px);align-items:center;gap:8px;margin-top:10px;padding:12px 16px;background-color:#f5f5f5;border:1px solid #e0e0e0;border-radius:4px;box-sizing:border-box;overflow:hidden}.penalty-label[_ngcontent-%COMP%]{min-width:80px}.penalty-name[_ngcontent-%COMP%]{min-width:120px}.penalty-date[_ngcontent-%COMP%]{color:#000000b3;white-space:nowrap}.penalty-amount[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.dark-theme[_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .penalty-item-container[_ngcontent-%COMP%]{background-color:#3a3a3a;color:#ffffffde;border-color:#4a4a4a}"]})}}return t})();var XP=()=>["../../general"];function QP(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function tT(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function eT(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",20),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",21),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",22),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",23),l()),t&2&&(o(2),b(" ",m(3,5,"labels.inputs.Account")," #"),o(5),b("",m(8,7,"labels.inputs.Cheque")," #"),o(5),C(m(13,9,"labels.inputs.Routing Code")),o(5),b("",m(18,11,"labels.inputs.Reciept")," #"),o(5),b("",m(23,13,"labels.inputs.Bank")," #"))}function nT(t,n){if(t&1&&(s(0,"button",24),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.recoveryRepaymentLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Hm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.currency=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createRecoveryRepaymentLoanForm(),this.setRecoveryRepaymentLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency)}createRecoveryRepaymentLoanForm(){this.recoveryRepaymentLoanForm=this.formBuilder.group({transactionDate:[new Date,Wt.required],transactionAmount:["",Wt.required],externalId:[""],paymentTypeId:[""],note:[""]})}setRecoveryRepaymentLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.recoveryRepaymentLoanForm.patchValue({transactionAmount:this.dataObject.amount,transactionDate:new Date(this.dataObject.date)})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.recoveryRepaymentLoanForm.addControl("accountNumber",new pe("")),this.recoveryRepaymentLoanForm.addControl("checkNumber",new pe("")),this.recoveryRepaymentLoanForm.addControl("routingCode",new pe("")),this.recoveryRepaymentLoanForm.addControl("receiptNumber",new pe("")),this.recoveryRepaymentLoanForm.addControl("bankNumber",new pe(""))):(this.recoveryRepaymentLoanForm.removeControl("accountNumber"),this.recoveryRepaymentLoanForm.removeControl("checkNumber"),this.recoveryRepaymentLoanForm.removeControl("routingCode"),this.recoveryRepaymentLoanForm.removeControl("receiptNumber"),this.recoveryRepaymentLoanForm.removeControl("bankNumber"))}submit(){let e=this.recoveryRepaymentLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.recoveryRepaymentLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loanService.submitLoanActionButton(this.loanId,u,"recoverypayment").subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-recovery-repayment"]],inputs:{dataObject:"dataObject"},decls:45,vars:33,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,QP,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),s(24,"mat-select",9),de(25,tT,2,2,"mat-option",10,xe),l()(),s(27,"div",11)(28,"span",12),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(29,"mat-slide-toggle")(30,"div",13)(31,"span",14),c(32),p(33,"translate"),l()()()()(),M(34,eT,25,15),s(35,"mat-form-field")(36,"mat-label"),c(37),p(38,"translate"),l(),P(39,"textarea",15),l()(),s(40,"mat-card-actions",16)(41,"button",17),c(42),p(43,"translate"),l(),F(44,nT,3,4,"button",18),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.recoveryRepaymentLoanForm),o(5),C(m(8,20,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.recoveryRepaymentLoanForm.controls.transactionDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.recoveryRepaymentLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(18,22,"labels.inputs.External Id")),o(5),C(m(23,24,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),C(m(33,26,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?34:-1),o(3),C(m(38,28,"labels.inputs.Note")),o(4),x("routerLink",Ut(32,XP)),o(),b(" ",m(43,30,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REPAYMENT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Bi,za,Wn,Tt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();function iT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Active")," "))}function aT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Deleted")," "))}function oT(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",4),c(5),p(6,"formatNumber"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Available Disbursement Amount (with Over Applied)"),":"),o(3),C(m(6,4,e.data.loanData.delinquent.availableDisbursementAmountWithOverApplied))}}var Gm=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo)}ngOnInit(){this.dialogRef.updateSize("400px")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-view-guarantor-details-dialog"]],decls:41,vars:28,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column"],[1,"layout-row-wrap","responsive-column"],[1,"flex-fill"],[1,"flex-50"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"div",1)(4,"div",2)(5,"div",3)(6,"span",4),c(7),p(8,"translate"),l(),s(9,"span",4),c(10),l()(),s(11,"div",3)(12,"span",4),c(13),p(14,"translate"),l(),s(15,"span",4),c(16),l()(),s(17,"div",3)(18,"span",4),c(19),p(20,"translate"),l(),s(21,"span",4),c(22),l()(),s(23,"div",3)(24,"span",4),c(25),p(26,"translate"),l(),s(27,"span",4),c(28),l()(),s(29,"div",3)(30,"span",4),c(31),p(32,"translate"),l(),s(33,"span",4),M(34,iT,3,3,"span"),M(35,aT,3,3,"span"),l()(),M(36,oT,7,6,"div",3),l()(),s(37,"mat-dialog-actions",5)(38,"button",6),c(39),p(40,"translate"),l()()),i&2&&(o(),C(m(2,14,"labels.heading.Guarantor Detail")),o(6),b("",m(8,16,"labels.inputs.First Name"),":"),o(3),C(a.data.guarantorData.firstname),o(3),b("",m(14,18,"labels.inputs.Last Name"),":"),o(3),C(a.data.guarantorData.lastname),o(3),b("",m(20,20,"labels.inputs.Relationship"),":"),o(3),C(a.data.guarantorData.clientRelationshipType.name),o(3),b("",m(26,22,"labels.inputs.Guarantor Type"),":"),o(3),C(a.data.guarantorData.guarantorType.value),o(3),b("",m(32,24,"labels.inputs.Status"),":"),o(3),O(a.data.guarantorData.status?34:-1),o(),O(a.data.guarantorData.status?-1:35),o(),O((a.data.loanData==null||a.data.loanData.delinquent==null?null:a.data.loanData.delinquent.availableDisbursementAmountWithOverApplied)!==void 0?36:-1),o(3),C(m(40,26,"labels.buttons.Cancel")))},dependencies:[wt,Pt,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();function rT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Not Available")))}function lT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Unassigned")))}function sT(t,n){t&1&&(s(0,"span"),P(1,"fa-icon",5),l())}function cT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Not Provided")," "))}function pT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Not Provided")))}function mT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function dT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),$t(" ",e.firstname," \xA0 ",e.lastname," ")}}function uT(t,n){if(t&1&&(s(0,"td",25),M(1,dT,2,2,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function fT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Relationship")))}function hT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),b(" ",e.clientRelationshipType==null?null:e.clientRelationshipType.name," ")}}function gT(t,n){if(t&1&&(s(0,"td",25),M(1,hT,2,1,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function _T(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Guarantor Type")))}function CT(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),b(" ",e.guarantorType.value," ")}}function bT(t,n){if(t&1&&(s(0,"td",25),M(1,CT,2,1,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function vT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Deposit Account")))}function xT(t,n){t&1&&P(0,"span")}function yT(t,n){if(t&1&&(s(0,"td",25),M(1,xT,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function ST(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function DT(t,n){t&1&&P(0,"span")}function wT(t,n){if(t&1&&(s(0,"td",25),M(1,DT,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function PT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Remaining Amount")))}function TT(t,n){t&1&&P(0,"span")}function AT(t,n){if(t&1&&(s(0,"td",25),M(1,TT,1,0,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function MT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function OT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Active")," "))}function IT(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.Deleted")," "))}function ET(t,n){if(t&1&&(s(0,"span"),M(1,OT,3,3,"span"),M(2,IT,3,3,"span"),l()),t&2){let e=T().$implicit;o(),O(e.status?1:-1),o(),O(e.status?-1:2)}}function LT(t,n){if(t&1&&(s(0,"td",25),M(1,ET,3,2,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function kT(t,n){t&1&&(s(0,"th",24),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Action")))}function FT(t,n){if(t&1){let e=Ct();s(0,"button",28),it("click",function(){lt(e);let a=T(2).$implicit,r=T(2);return st(r.viewGuarantorDetails(a))}),P(1,"fa-icon",29),l()}}function NT(t,n){t&1&&(s(0,"button",27),P(1,"fa-icon",30),l())}function RT(t,n){if(t&1){let e=Ct();s(0,"button",32),it("click",function(){lt(e);let a=T(3).$implicit,r=T(2);return st(r.deleteGuarantor(a.id))}),P(1,"fa-icon",33),l()}}function BT(t,n){t&1&&(s(0,"span"),F(1,RT,2,0,"button",31),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_GUARANTOR"))}function qT(t,n){if(t&1&&(s(0,"span"),F(1,FT,2,0,"button",26),M(2,NT,2,0,"button",27),M(3,BT,2,1,"span"),l()),t&2){let e=T().$implicit;o(),x("mifosxHasPermission","READ_SAVINGSACCOUNT"),o(),O(e.status&&e.guarantorType.id===3&&e.id?2:-1),o(),O(e.status?3:-1)}}function zT(t,n){if(t&1&&(s(0,"td",25),M(1,qT,4,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.guarantorFundingDetails?-1:1)}}function jT(t,n){t&1&&P(0,"tr",34)}function VT(t,n){t&1&&P(0,"tr",35)}function UT(t,n){if(t&1){let e=Ct();s(0,"div",4)(1,"div",6)(2,"div",7)(3,"div",8)(4,"h3"),c(5),p(6,"translate"),l()()(),s(7,"div",7)(8,"div",9)(9,"button",10),it("click",function(){lt(e);let a=T();return st(a.toggleGuarantorsDetailsOverview())}),c(10),l()()()(),s(11,"table",11),p(12,"accountsFilter"),X(13,12),F(14,mT,3,3,"th",13)(15,uT,2,1,"td",14),Q(),X(16,15),F(17,fT,3,3,"th",13)(18,gT,2,1,"td",14),Q(),X(19,16),F(20,_T,3,3,"th",13)(21,bT,2,1,"td",14),Q(),X(22,17),F(23,vT,3,3,"th",13)(24,yT,2,1,"td",14),Q(),X(25,18),F(26,ST,3,3,"th",13)(27,wT,2,1,"td",14),Q(),X(28,19),F(29,PT,3,3,"th",13)(30,AT,2,1,"td",14),Q(),X(31,20),F(32,MT,3,3,"th",13)(33,LT,2,1,"td",14),Q(),X(34,21),F(35,kT,3,3,"th",13)(36,zT,2,1,"td",14),Q(),F(37,jT,1,0,"tr",22)(38,VT,1,0,"tr",23),l()()}if(t&2){let e=T();o(5),C(m(6,5,"labels.heading.Guarantors Details")),o(5),b(" ",e.showDeletedGuarantorsAccounts?"Hide Deleted Guarantors":"Show Deleted Guarantors"," "),o(),x("dataSource",Hf(12,7,e.guarantorDetails,"guarantor",e.showDeletedGuarantorsAccounts)),o(26),x("matHeaderRowDef",e.guarantorsDisplayedColumns),o(),x("matRowDefColumns",e.guarantorsDisplayedColumns)}}var Wm=(()=>{class t{constructor(){this.dialog=A(Gn),this.loansService=A(At),this.route=A(It),this.router=A(le),this.showDeletedGuarantorsAccounts=!1,this.guarantorsDisplayedColumns=["fullname","relationship","guarantortype","depositAccount","amount","remainingAmount","status","action"],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.guarantorDetails=this.dataObject.guarantors,this.loansService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe(e=>{e.availableDisbursementAmountWithOverApplied!==void 0&&(this.dataObject.availableDisbursementAmountWithOverApplied=e.availableDisbursementAmountWithOverApplied),e.delinquent&&(this.dataObject.delinquent=e.delinquent)})}toggleGuarantorsDetailsOverview(){this.showDeletedGuarantorsAccounts=!this.showDeletedGuarantorsAccounts}deleteGuarantor(e){this.dialog.open(la,{data:{deleteContext:`the guarantor id: ${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteGuarantor(this.loanId,e).subscribe(()=>{this.reload()})})}viewGuarantorDetails(e){this.dialog.open(Gm,{data:{guarantorData:e}}).afterClosed().subscribe(()=>{})}reload(){let e=this.dataObject.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-guarantors"]],inputs:{dataObject:"dataObject"},decls:68,vars:45,consts:[[1,"container","mat-elevation-z8"],[1,"view-guarantors-account-tables","layout-row","gap-2percent"],[1,"flex-49"],[3,"externalId"],[1,"layout-row-wrap","responsive-column","flex-fill"],["icon","times"],[1,"heading-content"],[1,"layout-column","flex-50"],[1,"heading-name"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["mat-table","",1,"flex-fill",3,"dataSource"],["matColumnDef","fullname"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","relationship"],["matColumnDef","guarantortype"],["matColumnDef","depositAccount"],["matColumnDef","amount"],["matColumnDef","remainingAmount"],["matColumnDef","status"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-raised-button","","class","account-action-button","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button"],["mat-raised-button","","color","primary",1,"account-action-button",3,"click"],["icon","eye",1,"m-r-10"],["icon","edit",1,"m-r-10"],["mat-raised-button","","class","account-action-button","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click"],["icon","trash",1,"m-r-10"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"div",1)(3,"div",2)(4,"table")(5,"tbody")(6,"tr")(7,"td"),c(8),p(9,"translate"),l(),s(10,"td"),c(11),M(12,rT,3,3,"span"),l()(),s(13,"tr")(14,"td"),c(15),p(16,"translate"),l(),s(17,"td"),c(18),l()(),s(19,"tr")(20,"td"),c(21),p(22,"translate"),l(),s(23,"td"),c(24),M(25,lT,3,3,"span"),M(26,sT,2,0,"span"),l()(),s(27,"tr")(28,"td"),c(29),p(30,"translate"),l(),s(31,"td"),P(32,"mifosx-external-identifier",3),l()()()()(),s(33,"div",2)(34,"table")(35,"tbody")(36,"tr")(37,"td"),c(38),p(39,"translate"),l(),s(40,"td"),c(41),M(42,cT,3,3,"span"),l()(),s(43,"tr")(44,"td"),c(45),p(46,"translate"),l(),s(47,"td")(48,"span"),c(49),p(50,"formatNumber"),l()()(),s(51,"tr")(52,"td"),c(53),p(54,"translate"),l(),s(55,"td")(56,"span"),c(57),p(58,"formatNumber"),l()()(),s(59,"tr")(60,"td"),c(61),p(62,"translate"),l(),s(63,"td"),c(64),p(65,"formatNumber"),M(66,pT,3,3,"span"),l()()()()()(),M(67,UT,39,11,"div",4),l()()),i&2&&(o(8),C(m(9,23,"labels.inputs.Disbursement Date")),o(3),b(" ",a.dataObject.timeline.actualDisbursementDate," "),o(),O(a.dataObject.timeline.actualDisbursementDate?-1:12),o(3),C(m(16,25,"labels.inputs.Currency")),o(3),C(a.dataObject.currency.name),o(3),C(m(22,27,"labels.inputs.Loan Officer")),o(3),b(" ",a.dataObject.loanOfficerName," "),o(),O(a.dataObject.loanOfficerName?-1:25),o(),O(a.dataObject.loanOfficerName?26:-1),o(3),C(m(30,29,"labels.inputs.External Id")),o(3),x("externalId",ce(a.dataObject.externalId)),o(6),C(m(39,31,"labels.inputs.Loan Purpose")),o(3),b(" ",a.dataObject.loanPurposeName," "),o(),O(a.dataObject.loanPurposeName?-1:42),o(3),C(m(46,33,"labels.inputs.Approved Amount")),o(4),C(m(50,35,a.dataObject.approvedPrincipal)),o(4),C(m(54,37,"labels.inputs.Disburse Amount")),o(4),C(m(58,39,a.dataObject.principal)),o(4),C(m(62,41,"labels.inputs.Arrears By")),o(3),b(" ",m(65,43,a.dataObject.summary==null?null:a.dataObject.summary.totalOverdue)," "),o(2),O((a.dataObject.summary==null?null:a.dataObject.summary.totalOverdue)<0?66:-1),o(),O(a.guarantorDetails?67:-1))},dependencies:[wt,Pt,ge,Gt,Me,un,Va,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt,u1,fn],styles:[".view-guarantors-account-tables[_ngcontent-%COMP%]{padding:1%;margin:1%}.view-guarantors-account-tables[_ngcontent-%COMP%] .table-headers[_ngcontent-%COMP%]{margin:0;padding:6px}.view-guarantors-account-tables[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:3px}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.heading-content[_ngcontent-%COMP%]{margin-bottom:1%;margin-top:1%;width:100%}.heading-name[_ngcontent-%COMP%]{display:block}.container[_ngcontent-%COMP%]{max-width:73rem}"]})}}return t})();var HT=()=>["../../general"];function GT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.name")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function WT(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),b(" ",e.displayName," ")}}function $T(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function YT(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),$t(" ",e.productName," - ",e.accountNo," ")}}function KT(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",15),de(5,YT,2,3,"mat-option",13,xe),l()(),s(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),l(),P(11,"input",16),l()),t&2){let e=T(2);o(2),C(m(3,2,"labels.inputs.Account")),o(3),ue(e.accountOptions),o(4),C(m(10,4,"labels.inputs.Amount"))}}function ZT(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",10)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",11),M(5,GT,7,9,"mat-error"),l(),s(6,"mat-autocomplete",12,0),it("optionSelected",function(a){lt(e);let r=T();return st(r.clientSelected(a.option.value))}),de(8,WT,2,2,"mat-option",13,xe),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),s(14,"mat-select",14),de(15,$T,2,2,"mat-option",13,xe),l()(),M(17,KT,12,6)}if(t&2){let e=Et(7),i=T();o(2),C(m(3,6,"labels.inputs.name")),o(2),x("matAutocomplete",e),o(),O(i.newGuarantorForm.controls.name.hasError("required")?5:-1),o(),x("displayWith",i.displayClient),o(2),ue(i.clientsData),o(4),C(m(13,8,"labels.inputs.Relationship")),o(3),ue(i.relationTypes),o(2),O((i.accountOptions==null?null:i.accountOptions.length)>0?17:-1)}}function JT(t,n){if(t&1&&(s(0,"mat-option",13),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function XT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),p(4,"translate"),s(5,"strong"),c(6),p(7,"translate"),l()()),t&2&&(o(),dd(" ",m(2,4,"labels.inputs.First Name")," ",m(3,6,"labels.commons.is")," ",m(4,8,"labels.commons.is")," "),o(5),C(m(7,10,"labels.commons.required")))}function QT(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),p(4,"translate"),s(5,"strong"),c(6),p(7,"translate"),l()()),t&2&&(o(),dd(" ",m(2,4,"labels.inputs.Last Name")," ",m(3,6,"labels.commons.is")," ",m(4,8,"labels.commons.is")," "),o(5),C(m(7,10,"labels.commons.required")))}function tA(t,n){if(t&1){let e=Ct();s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",14),de(5,JT,2,2,"mat-option",13,xe),l()(),s(7,"mat-form-field")(8,"mat-label"),c(9),p(10,"translate"),l(),P(11,"input",17),M(12,XT,8,12,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",18),M(18,QT,8,12,"mat-error"),l(),s(19,"mat-form-field",19),it("click",function(){lt(e);let a=Et(26);return st(a.open())}),s(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"input",20)(24,"mat-datepicker-toggle",21)(25,"mat-datepicker",null,1),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"input",22),l(),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),P(36,"input",23),l(),s(37,"mat-form-field")(38,"mat-label"),c(39),p(40,"translate"),l(),P(41,"input",24),l(),s(42,"mat-form-field")(43,"mat-label"),c(44),p(45,"translate"),l(),P(46,"input",25),l(),s(47,"mat-form-field")(48,"mat-label"),c(49),p(50,"translate"),l(),P(51,"input",26),l(),s(52,"mat-form-field")(53,"mat-label"),c(54),p(55,"translate"),l(),P(56,"input",27),l()}if(t&2){let e=Et(26),i=T();o(2),C(m(3,16,"labels.inputs.Relationship")),o(3),ue(i.relationTypes),o(4),C(m(10,18,"labels.inputs.First Name")),o(3),O(i.newGuarantorForm.controls.firstname.hasError("required")?12:-1),o(3),C(m(16,20,"labels.inputs.Last Name")),o(3),O(i.newGuarantorForm.controls.lastname.hasError("required")?18:-1),o(3),C(m(22,22,"labels.inputs.Date Of Birth")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(5),b("",m(30,24,"labels.inputs.Address Line")," 1"),o(5),b("",m(35,26,"labels.inputs.Address Line")," 2"),o(5),C(m(40,28,"labels.inputs.City")),o(5),C(m(45,30,"labels.inputs.Zip")),o(5),C(m(50,32,"labels.inputs.Mobile")),o(5),b("",m(55,34,"labels.inputs.Residence Phone")," #")}}function eA(t,n){if(t&1&&(s(0,"button",28),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.newGuarantorForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}function nA(t,n){if(t&1&&(s(0,"div",9)(1,"div",29)(2,"div",30),c(3),p(4,"translate"),l()(),s(5,"div",31)(6,"div",32),c(7),p(8,"translate"),l(),s(9,"div",32),c(10),l()(),s(11,"div",31)(12,"div",32),c(13),p(14,"translate"),l(),s(15,"div",32),c(16),l()(),s(17,"div",31)(18,"div",32),c(19),p(20,"translate"),l(),s(21,"div",32),c(22),l()()()),t&2){let e=T();o(3),C(m(4,7,"labels.inputs.Client Details")),o(4),C(m(8,9,"labels.inputs.name")),o(3),C(e.newGuarantorForm.controls.name.value.displayName),o(3),C(m(14,11,"labels.inputs.Id")),o(3),C(e.newGuarantorForm.controls.name.value.id),o(3),C(m(20,13,"labels.inputs.Office")),o(3),C(e.newGuarantorForm.controls.name.value.officeName)}}var $m=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.clientsService=A(as),this.settingsService=A(oe),this.showClientDetailsForm=!1,this.minDate=new Date(1900,0,1),this.maxDate=new Date,this.clientsData=[],this.accountOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createNewGuarantorForm(),this.setNewGuarantorDetailsForm(),this.buildDependencies()}createNewGuarantorForm(){this.newGuarantorForm=this.formBuilder.group({existingClient:[""],name:["",Wt.required],clientRelationshipTypeId:[""],savingsId:[""],amount:[""]})}setNewGuarantorDetailsForm(){this.relationTypes=this.dataObject.allowedClientRelationshipTypes,this.newGuarantorForm.patchValue({existingClient:!0})}buildDependencies(){this.newGuarantorForm.get("existingClient").valueChanges.subscribe(()=>{this.showClientDetailsForm=!this.showClientDetailsForm,this.showClientDetailsForm?(this.newGuarantorForm.addControl("firstname",new pe("")),this.newGuarantorForm.addControl("lastname",new pe("")),this.newGuarantorForm.addControl("dob",new pe("")),this.newGuarantorForm.addControl("addressLine1",new pe("")),this.newGuarantorForm.addControl("addressLine2",new pe("")),this.newGuarantorForm.addControl("city",new pe("")),this.newGuarantorForm.addControl("zip",new pe("")),this.newGuarantorForm.addControl("mobileNumber",new pe("")),this.newGuarantorForm.addControl("housePhoneNumber",new pe("")),this.newGuarantorForm.removeControl("name"),this.newGuarantorForm.removeControl("savingsId"),this.newGuarantorForm.removeControl("amount")):(this.newGuarantorForm.addControl("name",new pe("")),this.newGuarantorForm.addControl("savingsId",new pe("")),this.newGuarantorForm.addControl("amount",new pe("")),this.newGuarantorForm.removeControl("firstname"),this.newGuarantorForm.removeControl("lastname"),this.newGuarantorForm.removeControl("dob"),this.newGuarantorForm.removeControl("addressLine1"),this.newGuarantorForm.removeControl("addressLine2"),this.newGuarantorForm.removeControl("city"),this.newGuarantorForm.removeControl("zip"),this.newGuarantorForm.removeControl("mobileNumber"),this.newGuarantorForm.removeControl("housePhoneNumber"))})}ngAfterViewInit(){this.newGuarantorForm.value.existingClient&&this.newGuarantorForm.get("name").valueChanges.subscribe(e=>{e.length>=2&&this.clientsService.getFilteredClients("displayName","ASC",!0,e).subscribe(i=>{this.clientsData=i.pageItems})})}clientSelected(e){this.accountOptions=[],this.loanService.guarantorAccountResource(this.loanId,e.id).subscribe(i=>{this.accountOptions=i.accountLinkingOptions})}displayClient(e){return e?e.displayName:void 0}submit(){let e=this.newGuarantorForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.newGuarantorForm.value.dob,u=this.newGuarantorForm.value.existingClient?this.dataObject.guarantorTypeOptions[0].id:this.dataObject.guarantorTypeOptions[2].id,d=Se(ie({},e),{locale:i,dateFormat:a,guarantorTypeId:u});this.newGuarantorForm.value.existingClient?d.entityId=this.newGuarantorForm.controls.name.value.id:e.dob instanceof Date&&(d.dob=this.dateUtils.formatDate(r,a)),delete d.existingClient,delete d.name,this.loanService.createNewGuarantor(this.loanId,d).subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-guarantor"]],inputs:{dataObject:"dataObject"},decls:16,vars:13,consts:[["clientsAutocomplete","matAutocomplete"],["dobDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["labelPosition","before","formControlName","existingClient"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"mat-table"],[1,"flex-30"],["matInput","","formControlName","name",3,"matAutocomplete"],["autoActiveFirstOption","",3,"optionSelected","displayWith"],[3,"value"],["formControlName","clientRelationshipTypeId"],["formControlName","savingsId"],["type","number","matInput","","required","","formControlName","amount"],["matInput","","required","","formControlName","firstname"],["matInput","","required","","formControlName","lastname"],[3,"click"],["matInput","","formControlName","dob",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","addressLine1"],["matInput","","formControlName","addressLine2"],["matInput","","formControlName","city"],["matInput","","formControlName","zip"],["type","number","matInput","","formControlName","mobileNumber"],["type","number","matInput","","formControlName","housePhoneNumber"],["mat-raised-button","","color","primary",3,"disabled"],[1,"mat-header-row"],[1,"mat-header-cell"],[1,"mat-row"],[1,"mat-cell"]],template:function(i,a){i&1&&(s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",4)(5,"mat-checkbox",5),c(6),p(7,"translate"),l(),M(8,ZT,18,10),M(9,tA,57,36),l(),s(10,"mat-card-actions",6)(11,"button",7),c(12),p(13,"translate"),l(),F(14,eA,3,4,"button",8),l()()(),M(15,nA,23,15,"div",9),l()()),i&2&&(o(2),x("formGroup",a.newGuarantorForm),o(4),b(" ",m(7,8,"labels.inputs.Existing Client")," "),o(2),O(a.showClientDetailsForm?-1:8),o(),O(a.showClientDetailsForm?9:-1),o(2),x("routerLink",Ut(12,HT)),o(),b(" ",m(13,10,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_GUARANTOR"),o(),O(!(a.newGuarantorForm==null||a.newGuarantorForm.controls==null||a.newGuarantorForm.controls.name==null)&&a.newGuarantorForm.controls.name.value?15:-1))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Da,Me,l1,r1,Tt],styles:[".container[_ngcontent-%COMP%] .mat-table[_ngcontent-%COMP%]{display:block;font-family:Tahoma,Verdana,sans-serif;width:100%}.container[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-row[_ngcontent-%COMP%]{display:flex;border-bottom-width:1px;border-bottom-style:solid;align-items:center;min-height:48px;padding:0 24px}.container[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .mat-header-cell[_ngcontent-%COMP%]{flex:1;overflow:hidden;word-wrap:break-word}.container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0}"]})}}return t})();var iA=()=>["../../general"];function aA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Disbursement Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function oA(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",13),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Fixed EMI amount")))}function rA(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.disbursementForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Ym=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.loanService=A(At),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setDisbursementToSavingsForm(),this.dataObject.currency&&(this.currency=this.dataObject.currency);let e=this.route.snapshot.params.loanId;this.loanService.getLoanDelinquencyDataForTemplate(e).subscribe(i=>{i.availableDisbursementAmountWithOverApplied!==void 0&&(this.dataObject.availableDisbursementAmountWithOverApplied=i.availableDisbursementAmountWithOverApplied),i.delinquent&&(this.dataObject.delinquent=i.delinquent)})}setDisbursementToSavingsForm(){this.disbursementForm=this.formBuilder.group({actualDisbursementDate:[new Date,Wt.required],transactionAmount:[this.dataObject.amount,Wt.required],note:[""]}),this.dataObject.fixedEmiAmount&&this.disbursementForm.addControl("fixedEmiAmount",new pe(this.dataObject.fixedEmiAmount,[Wt.required]))}submit(){let e=this.disbursementForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.disbursementForm.value.actualDisbursementDate;e.actualDisbursementDate instanceof Date&&(e.actualDisbursementDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i}),d=this.route.snapshot.params.loanId;u.transactionAmount=u.transactionAmount*1,this.loanService.loanActionButtons(d,"disbursetosavings",u).subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-disburse-to-savings-account"]],inputs:{dataObject:"dataObject"},decls:32,vars:29,consts:[["disbursementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","actualDisbursementDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","readonly","",3,"value"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","type","number","formControlName","fixedEmiAmount"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,aA,7,9,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),p(20,"formatNumber"),l(),M(21,oA,5,3,"mat-form-field"),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),P(26,"textarea",9),l()(),s(27,"mat-card-actions",10)(28,"button",11),c(29),p(30,"translate"),l(),F(31,rA,3,4,"button",12),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.disbursementForm),o(5),C(m(8,18,"labels.inputs.Disbursement On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.disbursementForm.controls.actualDisbursementDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.disbursementForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(18,20,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(2),x("value",m(20,22,a.dataObject.availableDisbursementAmountWithOverApplied)),o(2),O(a.dataObject.fixedEmiAmount?21:-1),o(3),C(m(25,24,"labels.inputs.Note")),o(4),x("routerLink",Ut(28,iA)),o(),b(" ",m(30,26,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSETOSAVINGS_LOAN")}},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Bi,Wn,Tt,fn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var lA=()=>["../../general"];function sA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Rejected Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function cA(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.rejectLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Km=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.router=A(le),this.route=A(It),this.loanService=A(At),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.setRejectLoanForm()}setRejectLoanForm(){this.rejectLoanForm=this.formBuilder.group({rejectedOnDate:[new Date,Wt.required],note:[""]})}submit(){let e=this.rejectLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.rejectLoanForm.value.rejectedOnDate;e.rejectedOnDate instanceof Date&&(e.rejectedOnDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.loanActionButtons(this.loanId,"reject",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-reject-loan"]],decls:24,vars:18,consts:[["rejectedDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","rejectedOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,sA,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),F(23,cA,3,4,"button",10),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.rejectLoanForm),o(5),C(m(8,11,"labels.inputs.Rejected On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.rejectLoanForm.controls.rejectedOnDate.hasError("required")?13:-1),o(3),C(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,lA)),o(),b(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REJECT_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var pA=()=>["../../general"];function mA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),p(5,"translate"),l()()),t&2&&(o(),b(" ",m(2,2,"labels.inputs.Disbursed On Date")),o(3),C(m(5,4,"labels.commons.required")))}function dA(t,n){if(t&1&&(s(0,"mat-option",11),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function uA(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",20),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",21),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",22),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",23),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",24),l()),t&2&&(o(2),b("",m(3,5,"labels.inputs.Account")," #"),o(5),b("",m(8,7,"labels.inputs.Cheque")," #"),o(5),C(m(13,9,"labels.inputs.Routing Code")),o(5),b("",m(18,11,"labels.inputs.Reciept")," #"),o(5),b("",m(23,13,"labels.inputs.Bank")," #"))}function fA(t,n){if(t&1&&(s(0,"button",25),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.disbursementLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Zm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createDisbursementLoanForm(),this.setDisbursementLoanDetails(),this.dataObject.currency&&(this.currency=this.dataObject.currency),this.loanService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe(e=>{e.availableDisbursementAmountWithOverApplied!==void 0&&(this.dataObject.availableDisbursementAmountWithOverApplied=e.availableDisbursementAmountWithOverApplied),e.delinquent&&(this.dataObject.delinquent=e.delinquent)})}createDisbursementLoanForm(){this.disbursementLoanForm=this.formBuilder.group({actualDisbursementDate:[this.settingsService.businessDate,Wt.required],transactionAmount:["",Wt.required],externalId:"",paymentTypeId:"",note:""})}setDisbursementLoanDetails(){this.paymentTypes=this.dataObject.paymentTypeOptions,this.disbursementLoanForm.patchValue({transactionAmount:this.dataObject.amount})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.disbursementLoanForm.addControl("accountNumber",new pe("")),this.disbursementLoanForm.addControl("checkNumber",new pe("")),this.disbursementLoanForm.addControl("routingCode",new pe("")),this.disbursementLoanForm.addControl("receiptNumber",new pe("")),this.disbursementLoanForm.addControl("bankNumber",new pe(""))):(this.disbursementLoanForm.removeControl("accountNumber"),this.disbursementLoanForm.removeControl("checkNumber"),this.disbursementLoanForm.removeControl("routingCode"),this.disbursementLoanForm.removeControl("receiptNumber"),this.disbursementLoanForm.removeControl("bankNumber"))}submit(){let e=this.disbursementLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.disbursementLoanForm.value.actualDisbursementDate;e.actualDisbursementDate instanceof Date&&(e.actualDisbursementDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loanService.loanActionButtons(this.loanId,"disburse",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-disburse"]],inputs:{dataObject:"dataObject"},decls:51,vars:39,consts:[["actualDisbursementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","actualDisbursementDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","readonly","",3,"value"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,mA,6,6,"mat-error"),l(),P(14,"mifosx-input-amount",7),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",8),p(20,"formatNumber"),l(),s(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),l(),P(25,"input",9),l(),s(26,"mat-form-field")(27,"mat-label"),c(28),p(29,"translate"),l(),s(30,"mat-select",10),de(31,dA,2,2,"mat-option",11,xe),l()(),s(33,"div",12)(34,"span",13),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(35,"mat-slide-toggle")(36,"div",14)(37,"span",15),c(38),p(39,"translate"),l()()()()(),M(40,uA,25,15),s(41,"mat-form-field")(42,"mat-label"),c(43),p(44,"translate"),l(),P(45,"textarea",16),l()(),s(46,"mat-card-actions",17)(47,"button",18),c(48),p(49,"translate"),l(),F(50,fA,3,4,"button",19),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.disbursementLoanForm),o(5),C(m(8,22,"labels.inputs.Disbursed On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.disbursementLoanForm.controls.actualDisbursementDate.hasError("required")?13:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.disbursementLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(18,24,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(2),x("value",m(20,26,a.dataObject.availableDisbursementAmountWithOverApplied)),o(4),C(m(24,28,"labels.inputs.External Id")),o(5),C(m(29,30,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),C(m(39,32,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?40:-1),o(3),C(m(44,34,"labels.inputs.Note")),o(4),x("routerLink",Ut(38,pA)),o(),b(" ",m(49,36,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Bi,za,Wn,Tt,fn],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var hA=()=>["../../../general"];function gA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Withdrawn On Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function _A(t,n){if(t&1&&(s(0,"button",11),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.withdrawnByClientLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Jm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createWithdrawnByClientLoanForm()}createWithdrawnByClientLoanForm(){this.withdrawnByClientLoanForm=this.formBuilder.group({withdrawnOnDate:[new Date,Wt.required],note:""})}submit(){let e=this.withdrawnByClientLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.withdrawnByClientLoanForm.value.withdrawnOnDate;e.withdrawnOnDate instanceof Date&&(e.withdrawnOnDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.loanActionButtons(this.loanId,"withdrawnByApplicant",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-withdrawn-by-client"]],inputs:{dataObject:"dataObject"},decls:24,vars:18,consts:[["withdrawnOnDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","withdrawnOnDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,gA,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"textarea",7),l()(),s(19,"mat-card-actions",8)(20,"button",9),c(21),p(22,"translate"),l(),F(23,_A,3,4,"button",10),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.withdrawnByClientLoanForm),o(5),C(m(8,11,"labels.inputs.Withdrawn On")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.withdrawnByClientLoanForm.controls.withdrawnOnDate.hasError("required")?13:-1),o(3),C(m(17,13,"labels.inputs.Note")),o(4),x("routerLink",Ut(17,hA)),o(),b(" ",m(22,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","WITHDRAW_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var CA=()=>["../../loan-collateral"];function bA(t,n){if(t&1&&(s(0,"mat-option",4),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name)}}function vA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Collateral Type")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function xA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Value")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function yA(t,n){if(t&1&&(s(0,"button",10),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.collateralForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Xm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.router=A(le),this.route=A(It),this.loanService=A(At)}ngOnInit(){this.createAddCollateralForm()}createAddCollateralForm(){this.collateralForm=this.formBuilder.group({collateralTypeId:["",Wt.required],value:["",Wt.required],description:[""]})}submit(){let e=this.collateralForm.value.collateralTypeId;this.collateralForm.patchValue({collateralTypeId:e});let i=this.route.snapshot.params.loanId,a=this.collateralForm.value;a.locale="en",this.loanService.createLoanCollateral(i,a).subscribe(r=>{this.router.navigate(["../../loan-collateral"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-add-collateral"]],inputs:{dataObject:"dataObject"},decls:29,vars:18,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","collateralTypeId"],[3,"value"],["matInput","","required","","formControlName","value"],["matInput","","formControlName","description","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",3),de(10,bA,2,2,"mat-option",4,xe),l(),M(12,vA,7,9,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",5),M(18,xA,7,9,"mat-error"),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"textarea",6),l()(),s(24,"mat-card-actions",7)(25,"button",8),c(26),p(27,"translate"),l(),F(28,yA,3,4,"button",9),l()()()()()),i&2&&(o(2),x("formGroup",a.collateralForm),o(5),C(m(8,9,"labels.inputs.Collateral Type")),o(3),ue(a.dataObject.allowedCollateralTypes),o(2),O(a.collateralForm.controls.collateralTypeId.hasError("required")?12:-1),o(3),C(m(16,11,"labels.inputs.Value")),o(3),O(a.collateralForm.controls.value.hasError("required")?18:-1),o(3),C(m(22,13,"labels.inputs.Description")),o(4),x("routerLink",Ut(17,CA)),o(),b(" ",m(27,15,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_COLLATERAL"))},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Ae,En,In,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var SA=()=>["../../general"];function DA(t,n){if(t&1){let e=Ct();s(0,"button",7),it("click",function(){lt(e);let a=T();return st(a.submit())}),c(1),p(2,"translate"),l()}t&2&&(o(),b(" ",m(2,1,"labels.buttons.Submit")," "))}var Qm=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loansService=A(At),this.router=A(le),this.route=A(It),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.note=this.formBuilder.control("",Wt.required)}submit(){let e="undodisbursal";this.actionName==="Undo Last Disbursal"&&(e="undolastdisbursal"),this.loansService.loanActionButtons(this.loanId,e,{note:this.note.value}).subscribe(i=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-undo-disbursal"]],inputs:{actionName:"actionName"},decls:14,vars:10,consts:[[1,"container","mat-elevation-z8"],[1,"layout-column"],[1,"flex-fill"],["matInput","","required","","cdkTextareaAutosize","","cdkAutosizeMinRows","2",3,"formControl"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"mat-card-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"textarea",3),l()(),s(9,"mat-card-actions",4)(10,"button",5),c(11),p(12,"translate"),l(),F(13,DA,3,3,"button",6),l()()()()),i&2&&(o(6),C(m(7,5,"labels.inputs.Note")),o(2),x("formControl",a.note),o(2),x("routerLink",Ut(9,SA)),o(),b(" ",m(12,7,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSALUNDO_LOAN"))},dependencies:[wt,Pt,we,he,je,Wo,ae,ge,Te,Ve,Ce,_e,Ae,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var wA=["screenReport"],PA=()=>["../../general"];function TA(t,n){if(t&1&&(s(0,"mat-option",6),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function AA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Screen Report")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}var t0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loansService=A(At),this.route=A(It),this.sanitizer=A(Jl),this.renderer=A(jf),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.templatesData=this.dataObject,this.createLoanScreenReportForm()}createLoanScreenReportForm(){this.loanScreenReportForm=this.formBuilder.group({templateId:[""]})}print(){let e=window.open("","Screen Report","height=400,width=600");e.document.write(""),e.document.write(""),e.document.write(this.template),e.document.write(""),e.print(),e.close()}generate(){let e=this.loanScreenReportForm.get("templateId").value;this.loansService.getTemplateData(e,this.loanId).subscribe(i=>{this.template=this.sanitizer.sanitize(zf.HTML,i),this.renderer.setProperty(this.screenReportRef.nativeElement,"innerHTML",this.template)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-screen-reports"]],viewQuery:function(i,a){if(i&1&&ri(wA,7),i&2){let r;li(r=si())&&(a.screenReportRef=r.first)}},inputs:{dataObject:"dataObject"},decls:34,vars:21,consts:[["output",""],["screenReport",""],[1,"container","m-b-20"],[3,"ngSubmit","formGroup"],[1,"flex-fill"],["formControlName","templateId"],[3,"value"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs","size","sm",1,"m-r-10"],[1,"container"],[1,"layout-column","gap-3percent"],[1,"layout-align-end"],["mat-stroked-button","","color","primary",3,"click","disabled"],["icon","file",1,"m-r-10"],[1,"screen-report"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return lt(r),st(a.generate())}),s(3,"mat-card-content")(4,"div")(5,"mat-form-field",4)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",5),de(10,TA,2,2,"mat-option",6,xe),l(),M(12,AA,7,9,"mat-error"),l()(),s(13,"mat-card-actions",7)(14,"button",8),c(15),p(16,"translate"),l(),s(17,"button",9),P(18,"fa-icon",10),c(19),p(20,"translate"),l()()()()()(),s(21,"div",11,0)(23,"mat-card",12)(24,"div",13)(25,"button",14),it("click",function(){return lt(r),st(a.print())}),P(26,"fa-icon",15),c(27),p(28,"translate"),l()(),s(29,"div",16,1)(31,"p"),c(32),p(33,"translate"),l()()()()}i&2&&(o(2),x("formGroup",a.loanScreenReportForm),o(5),C(m(8,10,"labels.inputs.Loan Screen Reports")),o(3),ue(a.templatesData),o(2),O(a.loanScreenReportForm.controls.templateId.hasError("required")?12:-1),o(2),x("routerLink",Ut(20,PA)),o(),b(" ",m(16,12,"labels.buttons.Cancel")," "),o(2),x("disabled",!a.loanScreenReportForm.valid),o(2),b("",m(20,14,"labels.buttons.Generate Report")," "),o(6),x("disabled",!a.template),o(2),b(" ",m(28,16,"labels.buttons.Print")," "),o(5),C(m(33,18,"labels.text.Please select a screen report.")))},dependencies:[wt,Pt,Ne,he,Le,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,En,In,Gt,un,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .print[_ngcontent-%COMP%]{align-self:flex-end}.container[_ngcontent-%COMP%] .screen-report[_ngcontent-%COMP%]{text-align:center}"]})}}return t})();var MA=()=>["../../general"];function OA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Approved Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function IA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Amount")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function EA(t,n){if(t&1&&(s(0,"button",16),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.approveLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var e0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.dateUtils=A(me),this.loanService=A(At),this.router=A(le),this.settingsService=A(oe),this.loanData=new Object,this.minDate=new Date(2e3,0,1),this.route.data.subscribe(e=>{this.loanData=e.actionButtonData,this.currency=e.actionButtonData.currency}),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.setApproveLoanForm(),this.loanService.getApproveAssociationsDetails(this.loanId).subscribe(e=>{this.associationData=e,this.approveLoanForm.patchValue({expectedDisbursementDate:new Date(e.timeline.expectedDisbursementDate)})}),this.loanService.getLoanDelinquencyDataForTemplate(this.loanId).subscribe(e=>{e.availableDisbursementAmountWithOverApplied!==void 0&&(this.loanData.availableDisbursementAmountWithOverApplied=e.availableDisbursementAmountWithOverApplied),e.delinquent&&(this.loanData.delinquent=e.delinquent)})}setApproveLoanForm(){this.approveLoanForm=this.formBuilder.group({approvedOnDate:[this.settingsService.businessDate,Wt.required],expectedDisbursementDate:[""],approvedLoanAmount:[this.loanData.approvalAmount,Wt.required],note:[""]})}submit(){let e=this.approveLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.approveLoanForm.value.approvedOnDate,u=this.approveLoanForm.value.expectedDisbursementDate;e.approvedOnDate instanceof Date&&(e.approvedOnDate=this.dateUtils.formatDate(r,a)),e.expectedDisbursementDate instanceof Date&&(e.expectedDisbursementDate=this.dateUtils.formatDate(u,a));let d=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.loanActionButtons(this.loanId,"approve",d).subscribe(g=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-approve-loan"]],decls:45,vars:37,consts:[["approvedDatePicker",""],["disbursementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","approvedOnDate",3,"min","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","expectedDisbursementDate",3,"min","matDatepicker"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","readonly","",3,"value"],["matInput","","type","number","required","","formControlName","approvedLoanAmount"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",2)(1,"mat-card")(2,"form",3),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",4)(5,"mat-form-field",5),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",6)(10,"mat-datepicker-toggle",7)(11,"mat-datepicker",null,0),M(13,OA,7,9,"mat-error"),l(),s(14,"mat-form-field",5),it("click",function(){lt(r);let d=Et(21);return st(d.open())}),s(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",8)(19,"mat-datepicker-toggle",7)(20,"mat-datepicker",null,1),l(),P(22,"mifosx-input-amount",9),s(23,"mat-form-field")(24,"mat-label"),c(25),p(26,"translate"),l(),P(27,"input",10),p(28,"formatNumber"),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),P(33,"input",11),M(34,IA,7,9,"mat-error"),l(),s(35,"mat-form-field")(36,"mat-label"),c(37),p(38,"translate"),l(),P(39,"textarea",12),l()(),s(40,"mat-card-actions",13)(41,"button",14),c(42),p(43,"translate"),l(),F(44,EA,3,4,"button",15),l()()()()()}if(i&2){let r=Et(12),u=Et(21);o(2),x("formGroup",a.approveLoanForm),o(5),C(m(8,22,"labels.inputs.Approved On")),o(2),x("min",a.minDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.approveLoanForm.controls.approvedOnDate.hasError("required")?13:-1),o(3),C(m(17,24,"labels.inputs.Expected disbursement on")),o(2),x("min",a.minDate)("matDatepicker",u),o(),x("for",u),o(3),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.approveLoanForm.controls.approvedLoanAmount)("inputLabel","Approved Amount"),o(3),C(m(26,26,"labels.inputs.Available Disbursement Amount (with Over Applied)")),o(2),x("value",m(28,28,a.loanData.availableDisbursementAmountWithOverApplied)),o(4),C(m(32,30,"labels.inputs.Transaction Amount")),o(3),O(a.approveLoanForm.controls.approvedLoanAmount.hasError("required")?34:-1),o(3),C(m(38,32,"labels.inputs.Note")),o(4),x("routerLink",Ut(36,MA)),o(),b(" ",m(43,34,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","APPROVE_LOAN")}},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Bi,Wn,Tt,fn],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var LA=()=>["../../general"];function kA(t,n){if(t&1&&(s(0,"mat-option",5),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name+" ("+(e==null?null:e.currency.name)+")"," ")}}function FA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Charge")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function NA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function RA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Due Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function BA(t,n){if(t&1){let e=Ct();s(0,"mat-form-field",12),it("click",function(){lt(e);let a=Et(7);return st(a.open())}),s(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",13)(5,"mat-datepicker-toggle",14)(6,"mat-datepicker",null,0),M(8,RA,7,9,"mat-error"),l()}if(t&2){let e=Et(7),i=T();o(2),C(m(3,6,"labels.inputs.Due On")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(3),O(i.loanChargeForm.controls.dueDate.hasError("required")?8:-1)}}function qA(t,n){if(t&1&&(s(0,"button",15),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.loanChargeForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var n0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.route.data.subscribe(e=>{this.loanChargeOptions=e.actionButtonData.chargeOptions}),this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.createLoanChargeForm(),this.loanChargeForm.controls.chargeId.valueChanges.subscribe(e=>{let i=this.loanChargeOptions.find(a=>a.id===e);i.chargeTimeType.id===2?this.loanChargeForm.addControl("dueDate",new pe("",Wt.required)):this.loanChargeForm.removeControl("dueDate"),this.loanChargeForm.patchValue({amount:i.amount,chargeCalculation:i.chargeCalculationType.value,chargeTime:i.chargeTimeType.value})})}createLoanChargeForm(){this.loanChargeForm=this.formBuilder.group({chargeId:["",Wt.required],amount:["",Wt.required],chargeCalculation:[{value:"",disabled:!0}],chargeTime:[{value:"",disabled:!0}]})}submit(){let e=this.loanChargeForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.loanChargeForm.value.dueDate;e.dueDate instanceof Date&&(e.dueDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loansService.createLoanCharge(this.loanId,"charges",u).subscribe(d=>{this.router.navigate(["../../general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-add-loan-charge"]],decls:35,vars:22,consts:[["dueDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["required","","formControlName","chargeId"],[3,"value"],["type","number","required","","matInput","","formControlName","amount"],["matInput","","formControlName","chargeCalculation"],["matInput","","formControlName","chargeTime"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[3,"click"],["matInput","","required","","formControlName","dueDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",4),de(10,kA,2,2,"mat-option",5,xe),l(),M(12,FA,7,9,"mat-error"),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",6),M(18,NA,7,9,"mat-error"),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),P(23,"input",7),l(),s(24,"mat-form-field")(25,"mat-label"),c(26),p(27,"translate"),l(),P(28,"input",8),l(),M(29,BA,9,8,"mat-form-field"),l(),s(30,"mat-card-actions",9)(31,"button",10),c(32),p(33,"translate"),l(),F(34,qA,3,4,"button",11),l()()()()()),i&2&&(o(2),x("formGroup",a.loanChargeForm),o(5),C(m(8,11,"labels.inputs.Charge")),o(3),ue(a.loanChargeOptions),o(2),O(a.loanChargeForm.controls.chargeId.hasError("required")?12:-1),o(3),C(m(16,13,"labels.inputs.Amount")),o(3),O(a.loanChargeForm.controls.amount.hasError("required")?18:-1),o(3),C(m(22,15,"labels.inputs.Charge Calculation")),o(5),C(m(27,17,"labels.inputs.Charge Time")),o(3),O(a.loanChargeForm.controls.dueDate?29:-1),o(2),x("routerLink",Ut(21,LA)),o(),b(" ",m(33,19,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CREATE_LOANCHARGE"))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var zA=()=>["../../general"];function jA(t,n){if(t&1&&P(0,"mifosx-repayment-schedule-tab",2),t&2){let e=T();x("repaymentScheduleDetails",e.repaymentScheduleDetails)("forEditing",!0)}}var i0=(()=>{class t{constructor(){this.loansService=A(At),this.router=A(le),this.route=A(It),this.dialog=A(Gn),this.dateUtils=A(me),this.translateService=A(Qi),this.settingsService=A(oe),this.wasChanged=!1,this.wasValidated=!1,this.repaymentScheduleDetails=null,this.repaymentScheduleChanges={},this.loanId=this.route.snapshot.params.loanId,this.getRepaymentSchedule()}ngOnInit(){this.repaymentScheduleChanges={}}getRepaymentSchedule(){this.loansService.getLoanAccountResource(this.loanId,"repaymentSchedule").subscribe({next:e=>{this.repaymentScheduleDetails=e.repaymentSchedule},error:e=>{console.error("Failed to load repayment schedule:",e)}})}applyPattern(){if(!this.repaymentScheduleDetails)return;let e=[];this.repaymentScheduleDetails.periods.forEach(u=>{u.period&&e.push({idx:u.period,dueDate:this.dateUtils.formatDate(u.dueDate,this.settingsService.dateFormat)})});let a={title:"Pattern Update",formfields:[new nc({controlName:"fromPeriod",label:"From Date",value:"",options:{label:"dueDate",value:"idx",data:e},required:!0}),new nc({controlName:"toPeriod",label:"To Date",value:"",options:{label:"dueDate",value:"idx",data:e},required:!0}),new Pi({controlName:"amount",label:"Installment Amount",value:"",type:"number",required:!0})]};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data?.value&&this.repaymentScheduleDetails){let d=u.data.value.fromPeriod,g=u.data.value.toPeriod,_=u.data.value.amount,y=[];this.repaymentScheduleDetails.periods.forEach(I=>{let k=this.dateUtils.formatDate(I.dueDate,this.settingsService.dateFormat);I.period&&d<=I.period&&g>=I.period&&I.totalDueForPeriod!==_&&(I.totalDueForPeriod=_,this.repaymentScheduleChanges[k]={dueDate:k,installmentAmount:_},this.wasChanged=!0,I.changed=!0),y.push(I)}),this.repaymentScheduleDetails.periods=y}})}reset(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Recover Original Schedule"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want recover the Original Schedule")}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.applyCommandLoanScheduleVariations(this.loanId,"deleteVariations",{}).subscribe({next:()=>{this.getRepaymentSchedule(),this.wasChanged=!1,this.wasValidated=!1},error:a=>{console.error("Failed to delete schedule variations:",a)}})})}validate(){this.repaymentScheduleDetails&&this.loansService.applyCommandLoanScheduleVariations(this.loanId,"calculateLoanSchedule",this.getPayload()).subscribe({next:e=>{this.repaymentScheduleDetails&&(this.repaymentScheduleDetails.periods=[],e.periods.forEach(i=>{i.changed=!0,this.repaymentScheduleDetails.periods.push(i),this.wasValidated=!0}))},error:e=>{console.error("Failed to calculate loan schedule:",e)}})}submit(){this.loansService.applyCommandLoanScheduleVariations(this.loanId,"addVariations",this.getPayload()).subscribe({next:()=>{this.router.navigate(["../../repayment-schedule"],{relativeTo:this.route})},error:e=>{console.error("Failed to add schedule variations:",e)}})}getPayload(){let e=[];Object.keys(this.repaymentScheduleChanges).forEach(r=>{e.push(this.repaymentScheduleChanges[r])});let i=this.settingsService.dateFormat,a=this.settingsService.language.code;return{exceptions:{modifiedinstallments:e},dateFormat:i,locale:a}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-repayment-schedule"]],decls:21,vars:20,consts:[[1,"container","mat-elevation-z8"],[1,"m-b-10","layout-column"],[1,"flex-100",3,"repaymentScheduleDetails","forEditing"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["type","button","mat-raised-button","",3,"click"],["type","button","color","primary","mat-raised-button","",3,"click"],["type","button","color","primary","mat-raised-button","",3,"click","disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"mat-card-content")(3,"div",1),M(4,jA,1,2,"mifosx-repayment-schedule-tab",2),l(),s(5,"mat-card-actions",3)(6,"button",4),c(7),p(8,"translate"),l(),s(9,"button",5),it("click",function(){return a.reset()}),c(10),p(11,"translate"),l(),s(12,"button",6),it("click",function(){return a.applyPattern()}),c(13),p(14,"translate"),l(),s(15,"button",7),it("click",function(){return a.validate()}),c(16),p(17,"translate"),l(),s(18,"button",7),it("click",function(){return a.submit()}),c(19),p(20,"translate"),l()()()()()),i&2&&(o(4),O(a.repaymentScheduleDetails?4:-1),o(2),x("routerLink",Ut(19,zA)),o(),b(" ",m(8,9,"labels.buttons.Cancel")," "),o(3),C(m(11,11,"labels.buttons.Reset")),o(3),b(" ",m(14,13,"labels.buttons.Pattern")," "),o(2),x("disabled",!a.wasChanged),o(),b(" ",m(17,15,"labels.buttons.Validate")," "),o(2),x("disabled",!a.wasValidated),o(),b(" ",m(20,17,"labels.buttons.Submit")," "))},dependencies:[wt,Pt,ae,ge,Te,Ve,Gt,ho,Tt],encapsulation:2})}}return t})();var VA=()=>["../../general"];function UA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function HA(t,n){if(t&1&&(s(0,"mat-option",8),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function GA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Reason for Charge-Off")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function WA(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.chargeoffLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var a0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.chargeOffReasonOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.chargeOffReasonOptions=this.dataObject.chargeOffReasonOptions,this.createChargeoffLoanForm()}createChargeoffLoanForm(){this.chargeoffLoanForm=this.formBuilder.group({transactionDate:[this.settingsService.businessDate,Wt.required],externalId:"",chargeOffReasonId:"",note:""})}submit(){let e=this.chargeoffLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.chargeoffLoanForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"charge-off").subscribe(g=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-charge-off"]],inputs:{dataObject:"dataObject"},decls:37,vars:25,consts:[["transactionDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","transactionDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","chargeOffReasonId"],[3,"value"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,UA,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",7),de(19,HA,2,2,"mat-option",8,xe),l(),M(21,GA,7,9,"mat-error"),l(),s(22,"mat-form-field")(23,"mat-label"),c(24),p(25,"translate"),l(),P(26,"input",9),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"textarea",10),l()(),s(32,"mat-card-actions",11)(33,"button",12),c(34),p(35,"translate"),l(),F(36,WA,3,4,"button",13),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.chargeoffLoanForm),o(5),C(m(8,14,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.chargeoffLoanForm.controls.transactionDate.hasError("required")?13:-1),o(3),C(m(17,16,"labels.inputs.Reason for Charge-Off")),o(3),ue(a.chargeOffReasonOptions),o(2),O(a.chargeoffLoanForm.controls.chargeOffReasonId.hasError("required")?21:-1),o(3),C(m(25,18,"labels.inputs.External Id")),o(5),C(m(30,20,"labels.inputs.Note")),o(4),x("routerLink",Ut(24,VA)),o(),b(" ",m(35,22,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","CHARGEOFF_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var $A=()=>["../../general"];function YA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Settlement Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function KA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Purchase Price Ratio")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function ZA(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",11),M(5,KA,7,9,"mat-error"),l()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Purchase Price Ratio")),o(3),O(e.saleLoanForm.controls.purchasePriceRatio.hasError("required")?5:-1)}}function JA(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Owner External Id")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function XA(t,n){if(t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",12),M(5,JA,7,9,"mat-error"),l()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Owner External Id")),o(3),O(e.saleLoanForm.controls.ownerExternalId.hasError("required")?5:-1)}}function QA(t,n){if(t&1&&(s(0,"button",13),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.saleLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var o0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.externalAssetOwnerService=A(Wr),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.BUYBACK_COMMAND="buyback",this.SALE_COMMAND="sale",this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId;let e=this.route.snapshot.params.action;this.command=e==="Sell Loan"?this.SALE_COMMAND:this.BUYBACK_COMMAND}ngOnInit(){this.minDate=this.settingsService.businessDate,this.maxDate=this.settingsService.maxAllowedDate,this.createSaleLoanForm()}isBuyBack(){return this.command===this.BUYBACK_COMMAND}createSaleLoanForm(){this.saleLoanForm=this.formBuilder.group({settlementDate:[this.settingsService.businessDate,Wt.required],purchasePriceRatio:["",Wt.required],transferExternalId:"",ownerExternalId:["",Wt.required]}),this.isBuyBack()&&(this.saleLoanForm.removeControl("purchasePriceRatio"),this.saleLoanForm.removeControl("ownerExternalId"))}submit(){let e=this.saleLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.saleLoanForm.value.settlementDate;e.settlementDate instanceof Date&&(e.settlementDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});this.externalAssetOwnerService.executeExternalAssetOwnerLoanCommand(this.loanId,u,this.command).subscribe(d=>{this.router.navigate(["../../external-asset-owner"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-asset-transfer-loan"]],decls:26,vars:20,consts:[["settlementDatePicker",""],[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","settlementDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","transferExternalId"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["type","number","matInput","","required","","formControlName","purchasePriceRatio"],["matInput","","formControlName","ownerExternalId"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content")(4,"div",3)(5,"mat-form-field",4),it("click",function(){lt(r);let d=Et(12);return st(d.open())}),s(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",5)(10,"mat-datepicker-toggle",6)(11,"mat-datepicker",null,0),M(13,YA,7,9,"mat-error"),l(),M(14,ZA,6,4,"mat-form-field"),M(15,XA,6,4,"mat-form-field"),s(16,"mat-form-field")(17,"mat-label"),c(18),p(19,"translate"),l(),P(20,"input",7),l()(),s(21,"mat-card-actions",8)(22,"button",9),c(23),p(24,"translate"),l(),F(25,QA,3,4,"button",10),l()()()()()}if(i&2){let r=Et(12);o(2),x("formGroup",a.saleLoanForm),o(5),C(m(8,13,"labels.inputs.Settlement Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.saleLoanForm.controls.settlementDate.hasError("required")?13:-1),o(),O(a.isBuyBack()?-1:14),o(),O(a.isBuyBack()?-1:15),o(3),C(m(19,15,"labels.inputs.Transfer External Id")),o(4),x("routerLink",Ut(19,$A)),o(),b(" ",m(24,17,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","SALE_LOAN")}},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var wg=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo);let e=this.data;this.repaymentSchedule=e.repaymentSchedule,this.currencyCode=e.currencyCode}close(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-re-age-preview-dialog"]],decls:9,vars:9,consts:[[1,"m-l-30"],[1,"mat-typography"],[3,"repaymentScheduleDetails","currencyCode","forEditing"],["align","center"],["mat-raised-button","","color","primary","type","button",3,"click"]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"mat-dialog-content",1),P(4,"mifosx-repayment-schedule-tab",2),l(),s(5,"mat-dialog-actions",3)(6,"button",4),it("click",function(){return a.close()}),c(7),p(8,"translate"),l()()),i&2&&(o(),C(m(2,5,"labels.heading.Repayment Schedule Preview")),o(3),x("repaymentScheduleDetails",a.repaymentSchedule)("currencyCode",a.currencyCode)("forEditing",!1),o(3),b(" ",m(8,7,"labels.buttons.Back")," "))},dependencies:[wt,Pt,Gt,Ho,Go,ho,Tt],encapsulation:2})}}return t})();var tM=()=>["../../general"];function eM(t,n){if(t&1&&(s(0,"mat-option",8),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),b(" ",e," ")}}function nM(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function iM(t,n){if(t&1&&(s(0,"mat-option",8),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function aM(t,n){if(t&1&&(s(0,"mat-option",8),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function oM(t,n){if(t&1&&P(0,"mifosx-input-amount",19),t&2){let e=T(2);x("currency",e.loanTransactionData.currency)("isRequired",!1)("inputFormControl",e.reagingLoanForm.controls.transactionAmount)("inputLabel","Transaction Amount")("minVal",0)}}function rM(t,n){if(t&1&&(s(0,"button",24),c(1),p(2,"translate"),l()),t&2){let e=T(2);x("disabled",!e.reagingLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}function lM(t,n){if(t&1){let e=Ct();s(0,"button",25),it("click",function(){lt(e);let a=T(2);return st(a.preview())}),c(1),p(2,"translate"),l()}if(t&2){let e=T(2);x("disabled",!e.reagingLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Preview")," ")}}function sM(t,n){if(t&1){let e=Ct();s(0,"form",3),it("ngSubmit",function(){lt(e);let a=T();return st(a.submit())}),s(1,"mat-card-content")(2,"div",4)(3,"mat-form-field")(4,"mat-label"),c(5),p(6,"translate"),l(),P(7,"input",5),l(),s(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),l(),P(12,"input",6),l(),s(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),s(17,"mat-select",7),de(18,eM,2,2,"mat-option",8,xe),l()(),s(20,"mat-form-field",9),it("click",function(){lt(e);let a=Et(27);return st(a.open())}),s(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",10)(25,"mat-datepicker-toggle",11)(26,"mat-datepicker",null,0),M(28,nM,7,9,"mat-error"),l(),s(29,"mat-form-field")(30,"mat-label"),c(31),p(32,"translate"),l(),s(33,"mat-select",12),de(34,iM,3,5,"mat-option",8,xe),l()(),s(36,"mat-form-field")(37,"mat-label"),c(38),p(39,"translate"),l(),s(40,"mat-select",13),de(41,aM,2,2,"mat-option",8,xe),l()(),s(43,"mat-form-field")(44,"mat-label"),c(45),p(46,"translate"),l(),P(47,"input",14),l(),s(48,"mat-form-field")(49,"mat-label"),c(50),p(51,"translate"),l(),P(52,"input",15),l(),s(53,"div",16)(54,"span",17),it("click",function(){lt(e);let a=T();return st(a.displayTransactionAmount())}),s(55,"mat-slide-toggle")(56,"div")(57,"span",18),c(58),p(59,"translate"),l()()()()(),M(60,oM,1,5,"mifosx-input-amount",19),l(),s(61,"mat-card-actions",20)(62,"button",21),c(63),p(64,"translate"),l(),F(65,rM,3,4,"button",22)(66,lM,3,4,"button",23),l()()()}if(t&2){let e=Et(27),i=T();x("formGroup",i.reagingLoanForm),o(5),C(m(6,20,"labels.inputs.Number of Installments")),o(5),C(m(11,22,"labels.inputs.Frequency Number")),o(5),C(m(16,24,"labels.inputs.Frequency Type")),o(3),ue(i.periodFrequencyOptions),o(4),C(m(23,26,"labels.inputs.Start Date")),o(2),x("min",i.minDate)("max",i.maxDate)("matDatepicker",e),o(),x("for",e),o(3),O(i.reagingLoanForm.controls.startDate.hasError("required")?28:-1),o(3),C(m(32,28,"labels.inputs.Interest Handling")),o(3),ue(i.reAgeInterestHandlingOptions),o(4),C(m(39,30,"labels.inputs.Reason")),o(3),ue(i.reAgeReasonOptions),o(4),C(m(46,32,"labels.inputs.External Id")),o(5),C(m(51,34,"labels.inputs.Note")),o(8),C(m(59,36,"labels.inputs.Transaction Amount")),o(2),O(i.addTransactionAmount?60:-1),o(2),x("routerLink",Ut(40,tM)),o(),b(" ",m(64,38,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REAGING_LOAN"),o(),x("mifosxHasPermission","REAGING_LOAN")}}var r0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.router=A(le),this.settingsService=A(oe),this.loanService=A(At),this.dateUtils=A(me),this.dialog=A(Gn),this.reAgeReasonOptions=[],this.periodFrequencyOptions=[],this.reAgeInterestHandlingOptions=[],this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanTransactionData=null,this.addTransactionAmount=!1,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.loanTransactionData=this.dataObject,this.maxDate=this.settingsService.maxFutureDate,this.reAgeReasonOptions=this.dataObject.reAgeReasonOptions,this.reAgeInterestHandlingOptions=this.dataObject.reAgeInterestHandlingOptions,this.periodFrequencyOptions=this.dataObject.periodFrequencyOptions,this.createReagingLoanForm()}createReagingLoanForm(){this.reagingLoanForm=this.formBuilder.group({numberOfInstallments:[1,Wt.required],startDate:[this.settingsService.businessDate,Wt.required],frequencyNumber:[1,Wt.required],frequencyType:[,Wt.required],reAgeInterestHandling:[this.reAgeInterestHandlingOptions[0]],transactionAmount:[,[Wt.min(0)]],note:"",externalId:"",reasonCodeValueId:null})}prepareReagingData(){let e=ie({},this.reagingLoanForm.value),i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.reagingLoanForm.value.startDate;return e.startDate instanceof Date&&(e.startDate=this.dateUtils.formatDate(r,a)),e.reAgeInterestHandling&&typeof e.reAgeInterestHandling=="object"&&(e.reAgeInterestHandling=e.reAgeInterestHandling.id),Se(ie({},e),{dateFormat:a,locale:i})}preview(){if(this.reagingLoanForm.invalid)return;let e=this.prepareReagingData();this.loanService.getReAgePreview(this.loanId,e).subscribe({next:i=>{let a=i.currency?.code||this.loanTransactionData.currency.code;if(!a){console.error("Currency code is not available in API response or loan details");return}this.dialog.open(wg,{data:{repaymentSchedule:i,currencyCode:a},width:"95%",maxWidth:"1400px",height:"90vh"})},error:i=>{console.error("Error loading re-age preview:",i)}})}displayTransactionAmount(){this.addTransactionAmount=!this.addTransactionAmount,this.reagingLoanForm.patchValue({transactionAmount:null})}submit(){let e=this.prepareReagingData();e.transactionAmount===null&&delete e.transactionAmount,this.loanService.submitLoanActionButton(this.loanId,e,"reAge").subscribe({next:i=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})},error:i=>{console.error("Error submitting re-age:",i)}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reaging"]],inputs:{dataObject:"dataObject"},decls:3,vars:1,consts:[["startDatePicker",""],[1,"container","mat-elevation-z8"],[3,"formGroup"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["type","number","matInput","","required","","formControlName","numberOfInstallments"],["type","number","matInput","","required","","formControlName","frequencyNumber"],["formControlName","frequencyType"],[3,"value"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["formControlName","reAgeInterestHandling"],["formControlName","reasonCodeValueId"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-5","m-b-5","flex-75",3,"click"],[1,"m-l-10"],[3,"currency","isRequired","inputFormControl","inputLabel","minVal"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["type","button","mat-raised-button","","color","accent",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],["type","button","mat-raised-button","","color","accent",3,"click","disabled"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"mat-card"),M(2,sM,67,41,"form",2),l()()),i&2&&(o(2),O(a.loanTransactionData!==null?2:-1))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Me,Bi,za,Tt,wa],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var Pg=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.repaymentSchedule=this.data.repaymentSchedule,this.currencyCode=this.data.currencyCode}close(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-re-amortize-preview-dialog"]],decls:9,vars:9,consts:[["mat-dialog-title",""],[1,"mat-typography"],[3,"repaymentScheduleDetails","currencyCode","forEditing"],["align","end"],["mat-raised-button","","type","button",3,"click"]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"mat-dialog-content",1),P(4,"mifosx-repayment-schedule-tab",2),l(),s(5,"mat-dialog-actions",3)(6,"button",4),it("click",function(){return a.close()}),c(7),p(8,"translate"),l()()),i&2&&(o(),C(m(2,5,"labels.heading.Repayment Schedule Preview")),o(3),x("repaymentScheduleDetails",a.repaymentSchedule)("currencyCode",a.currencyCode)("forEditing",!1),o(3),b(" ",m(8,7,"labels.buttons.Go back")," "))},dependencies:[wt,Pt,Gt,Ur,Ho,Go,ho,Tt],encapsulation:2})}}return t})();var cM=()=>["../../general"];function pM(t,n){if(t&1&&(s(0,"mat-option",4),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function mM(t,n){if(t&1&&(s(0,"mat-option",4),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function dM(t,n){if(t&1&&(s(0,"button",12),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.reamortizeLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}function uM(t,n){if(t&1){let e=Ct();s(0,"button",13),it("click",function(){lt(e);let a=T();return st(a.preview())}),c(1),p(2,"translate"),l()}if(t&2){let e=T();x("disabled",!e.reamortizeLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Preview")," ")}}var l0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.router=A(le),this.loanService=A(At),this.settingsService=A(oe),this.dialog=A(Gn),this.reAmortizationReasonOptions=[],this.reAmortizationInterestHandlingOptions=[],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.reAmortizationReasonOptions=this.dataObject?.reAmortizationReasonOptions||[],this.reAmortizationInterestHandlingOptions=this.dataObject?.reAmortizationInterestHandlingOptions||[],this.createReAmortizeLoanForm()}createReAmortizeLoanForm(){this.reamortizeLoanForm=this.formBuilder.group({reAmortizationInterestHandling:[this.reAmortizationInterestHandlingOptions[0]||null],reasonCodeValueId:null,note:"",externalId:""})}prepareReAmortizeData(){let e=this.reamortizeLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat;return Se(ie({},e),{dateFormat:a,locale:i})}prepareReAmortizePreviewData(){let e=ie({},this.reamortizeLoanForm.value),i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=e.reAmortizationInterestHandling;return r&&typeof r=="object"&&(r=r.id),!r&&r!==0&&(r="default"),delete e.reAmortizationInterestHandling,Se(ie({},e),{reAmortizationInterestHandling:r,dateFormat:a,locale:i})}preview(){if(this.reamortizeLoanForm.invalid)return;let e=this.prepareReAmortizePreviewData();this.loanService.getReAmortizePreview(this.loanId,e).subscribe({next:i=>{let a=i.currency?.code;if(!a){console.error("Currency code is not available in API response");return}this.dialog.open(Pg,{data:{repaymentSchedule:i,currencyCode:a},width:"95%",maxWidth:"1400px",height:"90vh"})},error:i=>{console.error("Error loading re-amortize preview:",i)}})}submit(){let e=this.prepareReAmortizeData();this.loanService.submitLoanActionButton(this.loanId,e,"reAmortize").subscribe(i=>{this.router.navigate(["../../transactions"],{relativeTo:this.route})})}trackByInterestHandlingOption(e,i){return i.id??e}trackByReasonOption(e,i){return i.id??e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-reamortize"]],inputs:{dataObject:"dataObject"},decls:38,vars:20,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["formControlName","reAmortizationInterestHandling"],[3,"value"],["formControlName","reasonCodeValueId"],["matInput","","formControlName","externalId"],["matInput","","formControlName","note"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["type","button","mat-raised-button","","color","accent",3,"disabled","click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"],["type","button","mat-raised-button","","color","accent",3,"click","disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",3),de(10,pM,3,5,"mat-option",4,a.trackByInterestHandlingOption,!0),l()()(),s(12,"div",2)(13,"mat-form-field")(14,"mat-label"),c(15),p(16,"translate"),l(),s(17,"mat-select",5),de(18,mM,2,2,"mat-option",4,a.trackByReasonOption,!0),l()()(),s(20,"div",2)(21,"mat-form-field")(22,"mat-label"),c(23),p(24,"translate"),l(),P(25,"input",6),l()(),s(26,"div",2)(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"input",7),l()(),s(32,"mat-card-actions",8)(33,"button",9),c(34),p(35,"translate"),l(),F(36,dM,3,4,"button",10)(37,uM,3,4,"button",11),l()()()()()),i&2&&(o(2),x("formGroup",a.reamortizeLoanForm),o(5),C(m(8,9,"labels.inputs.Interest Handling")),o(3),ue(a.reAmortizationInterestHandlingOptions),o(5),C(m(16,11,"labels.inputs.Reason")),o(3),ue(a.reAmortizationReasonOptions),o(5),C(m(24,13,"labels.inputs.External Id")),o(6),C(m(30,15,"labels.inputs.Note")),o(4),x("routerLink",Ut(19,cM)),o(),b(" ",m(35,17,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","REAMORTIZE_LOAN"),o(),x("mifosxHasPermission","REAMORTIZE_LOAN"))},dependencies:[wt,Pt,Ne,we,he,Le,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ae,En,In,Gt,Me,Tt,wa],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var fM=()=>["../../general"];function hM(t,n){if(t&1&&(s(0,"div",3)(1,"span",13),c(2),p(3,"translateKey"),p(4,"dateFormat"),l()()),t&2){let e=T();o(2),$t("",Ee(3,2,"Maturity Date","inputs")," : ",m(4,5,e.maturityDate))}}function gM(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),p(5,"translate"),l()()),t&2&&(o(),b(" ",m(2,2,"labels.inputs.Start Date")),o(3),C(m(5,4,"labels.commons.required")))}function _M(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),p(5,"translate"),l()()),t&2&&(o(),b(" ",m(2,2,"labels.inputs.End Date")),o(3),C(m(5,4,"labels.commons.required")))}function CM(t,n){if(t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.interestPauseLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var s0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.startDate=new Date,this.maturityDate=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maturityDate=new Date(this.dataObject.timeline.expectedMaturityDate),this.maxDate=new Date(this.dataObject.timeline.expectedMaturityDate),this.startDate=new Date(this.settingsService.businessDate),this.startDate>this.maxDate&&(this.startDate=this.maxDate),this.createInterestPauseLoanForm()}createInterestPauseLoanForm(){this.interestPauseLoanForm=this.formBuilder.group({startDate:[this.startDate,Wt.required],endDate:[this.startDate,Wt.required]})}submit(){let e=this.interestPauseLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.interestPauseLoanForm.value.startDate;e.startDate instanceof Date&&(e.startDate=this.dateUtils.formatDate(r,a));let u=this.interestPauseLoanForm.value.endDate;e.endDate instanceof Date&&(e.endDate=this.dateUtils.formatDate(u,a));let d=Se(ie({},e),{dateFormat:a,locale:i});this.loanService.addInterestPauseToLoan(this.loanId,d).subscribe(g=>{this.router.navigate(["../../term-variations"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-add-interest-pause"]],inputs:{dataObject:"dataObject"},decls:29,vars:24,consts:[["startDatePicker",""],["endDatePicker",""],[1,"container","mat-elevation-z8"],[1,"m-b-20","layout-column"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","endDate",3,"min","max","matDatepicker"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],[1,"m-r-10"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",2)(1,"mat-card"),M(2,hM,5,7,"div",3),s(3,"form",4),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(4,"mat-card-content")(5,"div",5)(6,"mat-form-field",6),it("click",function(){lt(r);let d=Et(13);return st(d.open())}),s(7,"mat-label"),c(8),p(9,"translate"),l(),P(10,"input",7)(11,"mat-datepicker-toggle",8)(12,"mat-datepicker",null,0),M(14,gM,6,6,"mat-error"),l(),s(15,"mat-form-field",6),it("click",function(){lt(r);let d=Et(22);return st(d.open())}),s(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",9)(20,"mat-datepicker-toggle",8)(21,"mat-datepicker",null,1),M(23,_M,6,6,"mat-error"),l()(),s(24,"mat-card-actions",10)(25,"button",11),c(26),p(27,"translate"),l(),F(28,CM,3,4,"button",12),l()()()()()}if(i&2){let r=Et(13),u=Et(22);o(2),O(a.maturityDate?2:-1),o(),x("formGroup",a.interestPauseLoanForm),o(5),C(m(9,17,"labels.inputs.Start Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.interestPauseLoanForm.controls.startDate.hasError("required")?14:-1),o(3),C(m(18,19,"labels.inputs.End Date")),o(2),x("min",a.interestPauseLoanForm.value.startDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.interestPauseLoanForm.controls.endDate.hasError("required")?23:-1),o(2),x("routerLink",Ut(23,fM)),o(),b(" ",m(27,21,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","DISBURSE_LOAN")}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Me,gn,Tt,wa],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}"]})}}return t})();var bM=()=>["../../general"];function vM(t,n){if(t&1&&(s(0,"button",8),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.undoWriteOffLoanForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var Tg=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.settingsService=A(oe),this.alertService=A(Ql),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createUndoWriteOffLoanForm()}createUndoWriteOffLoanForm(){this.undoWriteOffLoanForm=this.formBuilder.group({note:[""]})}submit(){let e=this.undoWriteOffLoanForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.settingsService.businessDate,u=Se(ie({},e),{transactionDate:this.dateUtils.formatDate(r&&new Date(r),a),transactionAmount:0,dateFormat:a,locale:i});this.loanService.submitLoanActionButton(this.loanId,u,"undowriteoff").subscribe({next:d=>{this.router.navigate(["../../general"],{relativeTo:this.route})},error:d=>{console.error("Undo write-off failed:",d),this.alertService.alert({type:"Undo Write-off Failed",message:"An error occurred while processing the undo write-off transaction. Please try again or contact support if the problem persists."})}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-undo-write-off"]],inputs:{dataObject:"dataObject"},decls:18,vars:13,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[1,"m-b-20"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"p",3),c(6),p(7,"translate"),l(),s(8,"mat-form-field")(9,"mat-label"),c(10),p(11,"translate"),l(),P(12,"textarea",4),l()(),s(13,"mat-card-actions",5)(14,"button",6),c(15),p(16,"translate"),l(),F(17,vM,3,4,"button",7),l()()()()()),i&2&&(o(2),x("formGroup",a.undoWriteOffLoanForm),o(4),b(" ",m(7,6,"labels.text.Undo Write-off Description")," "),o(4),C(m(11,8,"labels.inputs.Note")),o(4),x("routerLink",Ut(12,bM)),o(),b(" ",m(16,10,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","UNDOWRITEOFF_LOAN"))},dependencies:[wt,Pt,Ne,we,he,Le,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ae,Gt,Me,Wn,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:37rem}.mat-card[_ngcontent-%COMP%]{padding:20px}.layout-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.mat-card-actions[_ngcontent-%COMP%]{padding-top:20px}.gap-5px[_ngcontent-%COMP%]{gap:5px}@media (width <= 768px){.responsive-column[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}"]})}}return t})();function xM(t,n){if(t&1&&P(0,"mifosx-loans-account-close",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function yM(t,n){t&1&&P(0,"mifosx-undo-approval")}function SM(t,n){if(t&1&&P(0,"mifosx-assign-loan-officer",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function DM(t,n){if(t&1&&P(0,"mifosx-foreclosure",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function wM(t,n){if(t&1&&P(0,"mifosx-prepay-loan",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function PM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function TM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function AM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function MM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function OM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function IM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function EM(t,n){if(t&1&&P(0,"mifosx-make-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function LM(t,n){if(t&1&&P(0,"mifosx-loan-credit-balance-refund",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function kM(t,n){if(t&1&&P(0,"mifosx-waive-interest",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function FM(t,n){if(t&1&&P(0,"mifosx-write-off-page",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function NM(t,n){if(t&1&&P(0,"mifosx-close-as-rescheduled",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function RM(t,n){if(t&1&&P(0,"mifosx-loan-reschedule",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function BM(t,n){if(t&1&&P(0,"mifosx-recovery-repayment",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function qM(t,n){if(t&1&&P(0,"mifosx-view-guarantors",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function zM(t,n){if(t&1&&P(0,"mifosx-create-guarantor",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function jM(t,n){if(t&1&&P(0,"mifosx-disburse-to-savings-account",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function VM(t,n){t&1&&P(0,"mifosx-reject-loan")}function UM(t,n){if(t&1&&P(0,"mifosx-disburse",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function HM(t,n){t&1&&P(0,"mifosx-withdrawn-by-client")}function GM(t,n){if(t&1&&P(0,"mifosx-add-collateral",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function WM(t,n){if(t&1&&P(0,"mifosx-undo-disbursal",1),t&2){let e=T();x("actionName",e.actionName)}}function $M(t,n){if(t&1&&P(0,"mifosx-loan-screen-reports",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function YM(t,n){t&1&&P(0,"mifosx-approve-loan")}function KM(t,n){t&1&&P(0,"mifosx-add-loan-charge")}function ZM(t,n){t&1&&P(0,"mifosx-edit-repayment-schedule")}function JM(t,n){if(t&1&&P(0,"mifosx-charge-off",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function XM(t,n){t&1&&P(0,"mifosx-asset-transfer-loan")}function QM(t,n){if(t&1&&P(0,"mifosx-loan-reaging",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function tO(t,n){if(t&1&&P(0,"mifosx-loan-reamortize",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}function eO(t,n){if(t&1&&P(0,"mifosx-add-interest-pause",0),t&2){let e=T();x("dataObject",e.navigationData)}}function nO(t,n){if(t&1&&P(0,"mifosx-undo-write-off",0),t&2){let e=T();x("dataObject",e.actionButtonData)}}var c0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.actions={Close:!1,"Undo Approval":!1,"Write Off":!1,"Add Collateral":!1,"Assign Loan Officer":!1,Foreclosure:!1,"Prepay Loan":!1,Reject:!1,"Disburse to Savings":!1,"Make Repayment":!1,"Waive Interest":!1,"Close (as Rescheduled)":!1,Reschedule:!1,"Recovery Payment":!1,"View Guarantors":!1,"Create Guarantor":!1,Disburse:!1,"Withdrawn by Client":!1,"Undo Disbursal":!1,"Undo Last Disbursal":!1,"Loan Screen Reports":!1,Approve:!1,"Add Loan Charge":!1,"Goodwill Credit":!1,"Merchant Issued Refund":!1,"Payout Refund":!1,"Credit Balance Refund":!1,"Edit Repayment Schedule":!1,"Charge-Off":!1,"Sell Loan":!1,"Buy Back Loan":!1,"Re-Age":!1,"Re-Amortize":!1,"Interest Payment Waiver":!1,"Add Interest Pause":!1,"Capitalized Income":!1,"Contract Termination":!1,"Buy Down Fee":!1,"Undo Write-off":!1};let e=this.router.currentNavigation();this.navigationData=e?.extras?.state?.data,this.route.data.subscribe(i=>{this.actionButtonData=i.actionButtonData?i.actionButtonData:{}}),this.route.params.subscribe(i=>{this.actionName=i.action,this.actionName==="Change Loan Officer"&&(this.actionName="Assign Loan Officer");for(let a of Object.keys(this.actions))this.actions[a]=!1;this.actions[this.actionName]=!0}),this.actionButtonData.actionName=this.actionName}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-account-actions"]],decls:36,vars:36,consts:[[3,"dataObject"],[3,"actionName"]],template:function(i,a){i&1&&(M(0,xM,1,1,"mifosx-loans-account-close",0),M(1,yM,1,0,"mifosx-undo-approval"),M(2,SM,1,1,"mifosx-assign-loan-officer",0),M(3,DM,1,1,"mifosx-foreclosure",0),M(4,wM,1,1,"mifosx-prepay-loan",0),M(5,PM,1,1,"mifosx-make-repayment",0),M(6,TM,1,1,"mifosx-make-repayment",0),M(7,AM,1,1,"mifosx-make-repayment",0),M(8,MM,1,1,"mifosx-make-repayment",0),M(9,OM,1,1,"mifosx-make-repayment",0),M(10,IM,1,1,"mifosx-make-repayment",0),M(11,EM,1,1,"mifosx-make-repayment",0),M(12,LM,1,1,"mifosx-loan-credit-balance-refund",0),M(13,kM,1,1,"mifosx-waive-interest",0),M(14,FM,1,1,"mifosx-write-off-page",0),M(15,NM,1,1,"mifosx-close-as-rescheduled",0),M(16,RM,1,1,"mifosx-loan-reschedule",0),M(17,BM,1,1,"mifosx-recovery-repayment",0),M(18,qM,1,1,"mifosx-view-guarantors",0),M(19,zM,1,1,"mifosx-create-guarantor",0),M(20,jM,1,1,"mifosx-disburse-to-savings-account",0),M(21,VM,1,0,"mifosx-reject-loan"),M(22,UM,1,1,"mifosx-disburse",0),M(23,HM,1,0,"mifosx-withdrawn-by-client"),M(24,GM,1,1,"mifosx-add-collateral",0),M(25,WM,1,1,"mifosx-undo-disbursal",1),M(26,$M,1,1,"mifosx-loan-screen-reports",0),M(27,YM,1,0,"mifosx-approve-loan"),M(28,KM,1,0,"mifosx-add-loan-charge"),M(29,ZM,1,0,"mifosx-edit-repayment-schedule"),M(30,JM,1,1,"mifosx-charge-off",0),M(31,XM,1,0,"mifosx-asset-transfer-loan"),M(32,QM,1,1,"mifosx-loan-reaging",0),M(33,tO,1,1,"mifosx-loan-reamortize",0),M(34,eO,1,1,"mifosx-add-interest-pause",0),M(35,nO,1,1,"mifosx-undo-write-off",0)),i&2&&(O(a.actions.Close?0:-1),o(),O(a.actions["Undo Approval"]?1:-1),o(),O(a.actions["Assign Loan Officer"]?2:-1),o(),O(a.actions.Foreclosure?3:-1),o(),O(a.actions["Prepay Loan"]||a.actions["Contract Termination"]?4:-1),o(),O(a.actions["Make Repayment"]?5:-1),o(),O(a.actions["Capitalized Income"]?6:-1),o(),O(a.actions["Goodwill Credit"]?7:-1),o(),O(a.actions["Buy Down Fee"]?8:-1),o(),O(a.actions["Interest Payment Waiver"]?9:-1),o(),O(a.actions["Payout Refund"]?10:-1),o(),O(a.actions["Merchant Issued Refund"]?11:-1),o(),O(a.actions["Credit Balance Refund"]?12:-1),o(),O(a.actions["Waive Interest"]?13:-1),o(),O(a.actions["Write Off"]?14:-1),o(),O(a.actions["Close (as Rescheduled)"]?15:-1),o(),O(a.actions.Reschedule?16:-1),o(),O(a.actions["Recovery Payment"]?17:-1),o(),O(a.actions["View Guarantors"]?18:-1),o(),O(a.actions["Create Guarantor"]?19:-1),o(),O(a.actions["Disburse to Savings"]?20:-1),o(),O(a.actions.Reject?21:-1),o(),O(a.actions.Disburse?22:-1),o(),O(a.actions["Withdrawn by Client"]?23:-1),o(),O(a.actions["Add Collateral"]?24:-1),o(),O(a.actions["Undo Disbursal"]||a.actions["Undo Last Disbursal"]?25:-1),o(),O(a.actions["Loan Screen Reports"]?26:-1),o(),O(a.actions.Approve?27:-1),o(),O(a.actions["Add Loan Charge"]?28:-1),o(),O(a.actions["Edit Repayment Schedule"]?29:-1),o(),O(a.actions["Charge-Off"]?30:-1),o(),O(a.actions["Sell Loan"]||a.actions["Buy Back Loan"]?31:-1),o(),O(a.actions["Re-Age"]?32:-1),o(),O(a.actions["Re-Amortize"]?33:-1),o(),O(a.actions["Add Interest Pause"]?34:-1),o(),O(a.actions["Undo Write-off"]?35:-1))},dependencies:[wt,Pt,Em,Lm,km,Fm,Nm,Bm,qm,zm,jm,Vm,Um,Hm,Wm,$m,Ym,Km,Zm,Jm,Xm,Qm,t0,e0,n0,i0,a0,o0,r0,l0,s0,Tg],encapsulation:2})}}return t})();function iO(t,n){t&1&&(s(0,"th",8),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.From Date")))}function aO(t,n){if(t&1&&(s(0,"td",9),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.fromDate))}}function oO(t,n){t&1&&(s(0,"th",8),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Interest Rate")))}function rO(t,n){if(t&1&&(s(0,"td",9),c(1),l()),t&2){let e=n.$implicit;o(),C(e.effectiveInterestRate)}}function lO(t,n){t&1&&P(0,"tr",10)}function sO(t,n){t&1&&P(0,"tr",11)}var p0=(()=>{class t{constructor(){this.route=A(It),this.displayedColumns=["fromDate","interestRate"],this.route.parent.data.subscribe(e=>{this.loanDetails=e.loanDetailsData})}ngOnInit(){this.interestRateData=this.loanDetails.interestRatesPeriods}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-floating-interest-rates"]],decls:10,vars:3,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","fromDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","interestRate"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"table",1),X(2,2),F(3,iO,3,3,"th",3)(4,aO,3,3,"td",4),Q(),X(5,5),F(6,oO,3,3,"th",3)(7,rO,2,1,"td",4),Q(),F(8,lO,1,0,"tr",6)(9,sO,1,0,"tr",7),l()()),i&2&&(o(),x("dataSource",a.interestRateData),o(7),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,gn,Tt],styles:["table[_ngcontent-%COMP%]{width:100%;margin:3% 0%}.container[_ngcontent-%COMP%]{padding-bottom:2%}"]})}}return t})();function cO(t,n){if(t&1&&(s(0,"div",1)(1,"span",2),c(2),p(3,"translate"),l(),s(4,"span",3),c(5),p(6,"yesNo"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Allow full term for each tranche"),":"),o(3),C(m(6,4,e.loanDetails.allowFullTermForTranche))}}function pO(t,n){if(t&1){let e=Ct();s(0,"button",8),it("click",function(){lt(e);let a=T();return st(a.addDisbursementDataEntry())}),P(1,"fa-icon",9),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Add")," "))}function mO(t,n){if(t&1){let e=Ct();s(0,"button",8),it("click",function(){lt(e);let a=T();return st(a.editDisbursementData())}),c(1),p(2,"translate"),l()}t&2&&(o(),b(" ",m(2,1,"labels.buttons.Apply Changes")," "))}function dO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Expected Disbursement On")))}function uO(t,n){if(t&1&&(s(0,"td",19),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.expectedDisbursementDate))}}function fO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Disbursed On")))}function hO(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.actualDisbursementDate)," ")}}function gO(t,n){if(t&1&&(s(0,"td",19),M(1,hO,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.actualDisbursementDate?1:-1)}}function _O(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Principal")))}function CO(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),C(e.principal)}}function bO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function vO(t,n){t&1&&(s(0,"span"),P(1,"i",22),l())}function xO(t,n){if(t&1){let e=Ct();s(0,"button",23),p(1,"translate"),it("click",function(){lt(e);let a=T().index,r=T(2);return st(r.editDisbursementDataEntry(a))}),P(2,"fa-icon",24),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit")))}function yO(t,n){if(t&1){let e=Ct();s(0,"button",25),p(1,"translate"),it("click",function(){lt(e);let a=T().index,r=T(2);return st(r.removeDisbursementDataEntry(a))}),P(2,"fa-icon",26),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete")))}function SO(t,n){if(t&1&&(s(0,"td",19),M(1,vO,2,0,"span"),M(2,xO,3,4,"button",20),M(3,yO,3,4,"button",21),l()),t&2){let e=n.$implicit,i=T(2);o(),O(e.actualDisbursementDate?1:-1),o(),O(!e.actualDisbursementDate&&i.showActionsTrancheButtons()?2:-1),o(),O(!e.actualDisbursementDate&&i.showActionsTrancheButtons()?3:-1)}}function DO(t,n){t&1&&P(0,"tr",27)}function wO(t,n){t&1&&P(0,"tr",28)}function PO(t,n){if(t&1&&(s(0,"table",7),X(1,10),F(2,dO,3,3,"th",11)(3,uO,3,3,"td",12),Q(),X(4,13),F(5,fO,3,3,"th",11)(6,gO,2,1,"td",12),Q(),X(7,14),F(8,_O,3,3,"th",11)(9,CO,2,1,"td",12),Q(),X(10,15),F(11,bO,3,3,"th",11)(12,SO,4,3,"td",12),Q(),F(13,DO,1,0,"tr",16)(14,wO,1,0,"tr",17),l()),t&2){let e=T();x("dataSource",e.disbursementDataSource),o(13),x("matHeaderRowDef",e.expectedDisbursementColumns),o(),x("matRowDefColumns",e.expectedDisbursementColumns)}}function TO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Applicable From Date")))}function AO(t,n){if(t&1&&(s(0,"td",19),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.termVariationApplicableFrom))}}function MO(t,n){t&1&&(s(0,"th",18),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Installment Amount")))}function OO(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),C(e.termValue)}}function IO(t,n){t&1&&P(0,"tr",27)}function EO(t,n){t&1&&P(0,"tr",28)}function LO(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",7),X(5,29),F(6,TO,3,3,"th",11)(7,AO,3,3,"td",12),Q(),X(8,30),F(9,MO,3,3,"th",11)(10,OO,2,1,"td",12),Q(),F(11,IO,1,0,"tr",16)(12,EO,1,0,"tr",17),l()()),t&2){let e=T();o(2),b("",m(3,4,"labels.heading.Installment Amount Variations"),":"),o(2),x("dataSource",e.loanDetails.emiAmountVariations),o(7),x("matHeaderRowDef",e.emivariationColumns),o(),x("matRowDefColumns",e.emivariationColumns)}}var m0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dialog=A(Gn),this.loanServices=A(At),this.settingsService=A(oe),this.dateUtils=A(me),this.expectedDisbursementColumns=["expected disbursement on","disbursed on","principal","action"],this.emivariationColumns=["emi amount variation from","fixed emi amount"],this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.disbursementDataSource=[],this.totalMultiDisbursed=null,this.disallowExpectedDisbursements=!1,this.pristine=!0,this.route.parent.data.subscribe(e=>{this.loanId=e.loanDetailsData.id,this.loanDetails=e.loanDetailsData,this.disallowExpectedDisbursements=this.loanDetails.disallowExpectedDisbursements||!1,this.currentPrincipalAmount=this.loanDetails.approvedPrincipal})}ngOnInit(){this.maxDate=this.settingsService.maxFutureDate,this.status=this.loanDetails.status.value,this.disbursementDataSource=this.loanServices.getLoanDisbursementDetailsData(),this.disbursementDataSource.forEach(e=>{e.id||(this.pristine=!1)})}showAddTrancheButtons(){return this.return=!0,(this.status==="Closed (obligations met)"||this.status==="Overpaid"||this.status==="Closed (rescheduled)"||this.status==="Closed (written off)"||this.status==="Submitted and pending approval"||this.disallowExpectedDisbursements)&&(this.return=!1),this.calculateTotalDisbursedAmount(),!(this.totalMultiDisbursed===this.currentPrincipalAmount||this.return===!1)}showActionsTrancheButtons(){return!(this.status==="Closed (obligations met)"||this.status==="Overpaid"||this.status==="Closed (rescheduled)"||this.status==="Closed (written off)"||this.status==="Submitted and pending approval"||this.disallowExpectedDisbursements)}calculateTotalDisbursedAmount(){this.totalMultiDisbursed=0,this.count=0,this.disbursementDataSource.forEach(e=>{this.totalMultiDisbursed+=e.principal*1,this.count+=1})}buildForm(e,i){return[new sa({controlName:"expectedDisbursementDate",label:"Expected Disbursement Date",value:e||"",type:"datetime-local",minDate:this.minDate,maxDate:this.maxDate,required:!0,order:1}),new Pi({controlName:"principal",label:"Principal",value:i,type:"number",required:!0,order:2})]}addDisbursementDataEntry(){this.calculateTotalDisbursedAmount();let e={title:"Add Disbursement Details",layout:{addButtonText:"Add"},formfields:this.buildForm(new Date,this.currentPrincipalAmount-this.totalMultiDisbursed)};this.dialog.open(gi,{data:e}).afterClosed().subscribe(a=>{if(a.data){let r=a.data.value.principal*1;this.totalMultiDisbursed+r<=this.currentPrincipalAmount&&(this.disbursementDataSource=this.disbursementDataSource.concat(a.data.value),this.loanServices.saveLoanDisbursementDetailsData(this.disbursementDataSource),this.pristine=!1)}})}editDisbursementDataEntry(e){let i=this.disbursementDataSource[e].principal*1,a=this.dateUtils.parseDate(this.disbursementDataSource[e].expectedDisbursementDate),r={title:"Edit Disbursement Details",layout:{addButtonText:"Save"},formfields:this.buildForm(a,i)};this.dialog.open(gi,{data:r}).afterClosed().subscribe(d=>{if(d.data){let g=d.data.value.principal*1;this.totalMultiDisbursed-i+g<=this.currentPrincipalAmount&&(this.disbursementDataSource[e].principal=g,this.disbursementDataSource[e].expectedDisbursementDate=d.data.value.expectedDisbursementDate,this.pristine=!1)}})}removeDisbursementDataEntry(e){this.dialog.open(la,{data:{deleteContext:"this"}}).afterClosed().subscribe(a=>{if(a.delete){let r=this.disbursementDataSource[e].principal*1;this.disbursementDataSource.splice(e,1),this.disbursementDataSource=this.disbursementDataSource.concat([]),this.totalMultiDisbursed-=r,this.pristine=!1}})}editDisbursementData(){let e=[];this.disbursementDataSource.forEach(a=>{e.push({expectedDisbursementDate:this.dateUtils.formatDate(a.expectedDisbursementDate,this.settingsService.dateFormat),principal:a.principal,id:a.id})});let i={disbursementData:e,dateFormat:this.settingsService.dateFormat,locale:this.settingsService.language.code};this.loanServices.editDisbursements(this.loanId,i).toPromise().then(a=>{this.reload(),this.pristine=!0})}reload(){let e=this.router.url;this.router.navigateByUrl("/clients",{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-tranche-details"]],decls:17,vars:14,consts:[[1,"container"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],["class","flex-fill",4,"ngIf"],[1,"layout-row","margin-t","layout-xs-column","layout-align-end","gap-2percent"],["mat-raised-button","","color","primary"],["mat-table","",3,"dataSource"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["matColumnDef","expected disbursement on"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","disbursed on"],["matColumnDef","principal"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["type","button","mat-icon-button","","color","primary","matTooltipPosition","left",3,"matTooltip"],["type","button","mat-icon-button","","color","warn","matTooltipPosition","left",3,"matTooltip"],[1,"fa","fa-check"],["type","button","mat-icon-button","","color","primary","matTooltipPosition","left",3,"click","matTooltip"],["icon","edit"],["type","button","mat-icon-button","","color","warn","matTooltipPosition","left",3,"click","matTooltip"],["icon","trash"],["mat-header-row",""],["mat-row",""],["matColumnDef","emi amount variation from"],["matColumnDef","fixed emi amount"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"span",2),c(3),p(4,"translate"),l(),s(5,"span",3),c(6),p(7,"formatNumber"),l()(),F(8,cO,7,6,"div",4),s(9,"h3"),c(10),p(11,"translate"),l(),s(12,"div",5),M(13,pO,4,3,"button",6),M(14,mO,3,3,"button",6),l(),M(15,PO,15,3,"table",7),M(16,LO,13,6,"div"),l()),i&2&&(o(3),b("",m(4,8,"labels.inputs.Maximum allowed outstanding balance"),":"),o(3),C(m(7,10,a.loanDetails.maxOutstandingLoanBalance)),o(2),x("ngIf",a.loanDetails.allowFullTermForTranche),o(2),C(m(11,12,"labels.heading.Loan Tranche Details")),o(3),O(a.showAddTrancheButtons()?13:-1),o(),O(a.pristine?-1:14),o(),O(a.disbursementDataSource.length>0?15:-1),o(),O(a.loanDetails.emiAmountVariations.length>0?16:-1))},dependencies:[wt,Gf,Pt,Gt,un,_n,vn,bn,xn,Cn,yn,qa,Oi,Sn,wn,Dn,Pn,gn,Tt,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var kO=()=>["../actions/Add Collateral"];function FO(t,n){if(t&1&&(s(0,"div",5)(1,"table")(2,"tbody")(3,"tr")(4,"td",7)(5,"b"),c(6),p(7,"translate"),l()(),s(8,"td",8),c(9),p(10,"formatNumber"),l(),s(11,"td",7)(12,"b"),c(13),p(14,"translate"),l()(),s(15,"td",8),c(16),p(17,"formatNumber"),l()()()()()),t&2){let e=T();o(6),b("",m(7,4,"labels.inputs.Number of Collaterals")," :"),o(3),b(" ",m(10,6,e.loanCollaterals==null?null:e.loanCollaterals.length)," "),o(4),b("",m(14,8,"labels.inputs.Total Amount")," :"),o(3),b(" ",m(17,10,e.totalAmount)," ")}}function NO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.ID")))}function RO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),C(e.id)}}function BO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Currency")))}function qO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),C(e.currency.code)}}function zO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Description")))}function jO(t,n){if(t&1&&(s(0,"td",18),c(1),l()),t&2){let e=n.$implicit;o(),C(e.description)}}function VO(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Value")))}function UO(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.value))}}function HO(t,n){t&1&&P(0,"tr",19)}function GO(t,n){t&1&&P(0,"tr",20)}function WO(t,n){if(t&1&&(s(0,"table",6),X(1,9),F(2,NO,3,3,"th",10)(3,RO,2,1,"td",11),Q(),X(4,12),F(5,BO,3,3,"th",10)(6,qO,2,1,"td",11),Q(),X(7,13),F(8,zO,3,3,"th",10)(9,jO,2,1,"td",11),Q(),X(10,14),F(11,VO,3,3,"th",10)(12,UO,3,3,"td",11),Q(),F(13,HO,1,0,"tr",15)(14,GO,1,0,"tr",16),l()),t&2){let e=T();x("dataSource",e.loanCollaterals),o(13),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}var d0=(()=>{class t{constructor(){this.route=A(It),this.loanCollaterals=[],this.displayedColumns=["id","currency","description","value"],this.route.data.subscribe(e=>{this.loanCollaterals=e.loanCollaterals})}ngOnInit(){this.totalAmount=0,this.loanCollaterals.forEach(e=>{this.totalAmount=this.totalAmount+e.value})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-collateral-tab"]],decls:11,vars:10,consts:[[1,"tab-container","mat-typography"],[1,"layout-row","align-start-center"],[1,"flex-90"],[1,"layout-row","gap-20px","align-end","align-items-center","action-buttons"],["mat-raised-button","","color","primary",3,"routerLink"],[1,"layout-row","gap-32px","performance-history-container"],["mat-table","",3,"dataSource"],[1,"flex-25"],[1,"flex-25","left"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","currency"],["matColumnDef","description"],["matColumnDef","value"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"h3",2),c(3),p(4,"translate"),l(),s(5,"div",3)(6,"button",4),c(7),p(8,"translate"),l()()(),M(9,FO,18,12,"div",5),M(10,WO,15,3,"table",6),l()),i&2&&(o(3),C(m(4,5,"labels.inputs.Loan Collateral Details")),o(3),x("routerLink",Ut(9,kO)),o(),b(" ",m(8,7,"labels.buttons.Add Collateral")," "),o(2),O((a.loanCollaterals==null?null:a.loanCollaterals.length)>0?9:-1),o(),O((a.loanCollaterals==null?null:a.loanCollaterals.length)>0?10:-1))},dependencies:[wt,Pt,ae,Gt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return t})();var Ag=(()=>{class t{constructor(){}dynamicSort(e){let i=1;return e[0]==="-"&&(i=-1,e=e.substring(1)),(a,r)=>(a[e]r[e]?1:0)*i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var $O=()=>["../","general"];function YO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function KO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.displayName," ")}}function ZO(t,n){if(t&1&&(s(0,"mat-form-field",15)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",27),p(5,"translate"),de(6,KO,2,2,"mat-option",7,xe),l()()),t&2){let e=T(2);o(2),C(m(3,3,"labels.inputs.Loan officer")),o(2),x("matTooltip",ce(m(5,5,"tooltips.Financial institution representative"))),o(2),ue(e.loanOfficerOptions)}}function JO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function XO(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function QO(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Submitted on")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function t6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Disbursement on")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function e6(t,n){if(t&1&&(s(0,"mat-option",7),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),$t(" (",e.accountNo,") ",e.productName," ")}}function n6(t,n){if(t&1){let e=Ct();s(0,"div",8)(1,"mat-form-field",15)(2,"mat-label"),c(3),p(4,"translate"),l(),P(5,"input",16),p(6,"translate"),l(),M(7,ZO,8,7,"mat-form-field",15),s(8,"mat-form-field",15)(9,"mat-label"),c(10),p(11,"translate"),l(),s(12,"mat-select",17),p(13,"translate"),de(14,JO,2,2,"mat-option",7,xe),l()(),s(16,"mat-form-field",15)(17,"mat-label"),c(18),p(19,"translate"),l(),s(20,"mat-select",18),de(21,XO,2,2,"mat-option",7,xe),l()(),s(23,"mat-form-field",19),it("click",function(){lt(e);let a=Et(31);return st(a.open())}),s(24,"mat-label"),c(25),p(26,"translate"),l(),P(27,"input",20),p(28,"translate"),P(29,"mat-datepicker-toggle",21)(30,"mat-datepicker",null,0),M(32,QO,7,9,"mat-error"),l(),s(33,"mat-form-field",19),it("click",function(){lt(e);let a=Et(41);return st(a.open())}),s(34,"mat-label"),c(35),p(36,"translate"),l(),P(37,"input",22),p(38,"translate"),P(39,"mat-datepicker-toggle",21)(40,"mat-datepicker",null,1),M(42,t6,7,9,"mat-error"),l(),P(43,"mat-divider",23),s(44,"h3",24),c(45),p(46,"translate"),l(),s(47,"mat-form-field",15)(48,"mat-label"),c(49),p(50,"translate"),l(),s(51,"mat-select",25),de(52,e6,2,3,"mat-option",7,xe),l()(),s(54,"mat-checkbox",26)(55,"p"),c(56),p(57,"translate"),l()()()}if(t&2){let e=Et(31),i=Et(41),a=T();o(3),C(m(4,27,"labels.inputs.External id")),o(2),x("matTooltip",ce(m(6,29,"tooltips.Provides an external id"))),o(2),O(a.loanProductSelected?7:-1),o(3),C(m(11,31,"labels.inputs.Loan Purpose")),o(2),x("matTooltip",ce(m(13,33,"tooltips.Provides an indication"))),o(2),ue(a.loanPurposeOptions),o(4),C(m(19,35,"labels.inputs.Fund")),o(3),ue(a.fundOptions),o(4),C(m(26,37,"labels.inputs.Submitted on")),o(2),x("matTooltip",ce(m(28,39,"tooltips.Date the loan account application")))("min",a.minDate)("max",a.maxDate)("matDatepicker",e),o(2),x("for",e),o(3),O(a.loansAccountDetailsForm.controls.submittedOnDate!=null&&a.loansAccountDetailsForm.controls.submittedOnDate.hasError("required")?32:-1),o(3),C(m(36,41,"labels.inputs.Disbursement on")),o(2),x("matTooltip",ce(m(38,43,"tooltips.Date that the loan account disbursed")))("min",a.loansAccountDetailsForm.value.submittedOnDate)("max",a.maxDate)("matDatepicker",i),o(2),x("for",i),o(3),O(a.loansAccountDetailsForm.controls.submittedOnDate!=null&&a.loansAccountDetailsForm.controls.submittedOnDate.hasError("required")?42:-1),o(3),C(m(46,45,"labels.heading.Savings Linkage")),o(4),C(m(50,47,"labels.inputs.Link savings")),o(3),ue(a.accountLinkingOptions),o(4),C(m(57,49,"labels.inputs.Create standing instructions at disbursement"))}}function i6(t,n){t&1&&(s(0,"button",14),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,$O)),o(),b(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oo=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loansService=A(At),this.route=A(It),this.translateService=A(Qi),this.settingsService=A(oe),this.commons=A(Ag),this.placeHolderLabel="",this.noEntriesFoundLabel="",this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.isFieldOfficerPatched=!1,this.loanId=null,this.loanProductSelected=!1,this.productData=new kf(1),this.filterFormCtrl=new pe(""),this._onDestroy=new Lf,this.loansAccountProductTemplate=new Kl,this.loanId=this.route.snapshot.params.loanId,this.createLoansAccountDetailsForm()}ngOnInit(){this.placeHolderLabel=this.translateService.instant("labels.text.Search"),this.noEntriesFoundLabel=this.translateService.instant("labels.text.No data found"),this.maxDate=this.settingsService.maxFutureDate,this.buildDependencies(),this.loansAccountTemplate&&(this.productList=this.loansAccountTemplate.productOptions.sort(this.commons.dynamicSort("name")),this.loansAccountTemplate.loanProductId&&this.loansAccountDetailsForm.patchValue({productId:this.loansAccountTemplate.loanProductId,submittedOnDate:this.loansAccountTemplate.timeline.submittedOnDate&&new Date(this.loansAccountTemplate.timeline.submittedOnDate),loanOfficerId:this.loansAccountTemplate.loanOfficerId,loanPurposeId:this.loansAccountTemplate.loanPurposeId,fundId:this.loansAccountTemplate.fundId,expectedDisbursementDate:this.loansAccountTemplate.timeline.expectedDisbursementDate&&new Date(this.loansAccountTemplate.timeline.expectedDisbursementDate),externalId:this.loansAccountTemplate.externalId})),this.filterFormCtrl.valueChanges.pipe(qf(this._onDestroy)).subscribe(()=>{this.searchItem()}),this.productData.next(this.productList.slice())}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}searchItem(){if(this.productList){let e=this.filterFormCtrl.value.toLowerCase();e?this.productData.next(this.productList.filter(i=>i.name.toLowerCase().indexOf(e)>=0)):this.productData.next(this.productList.slice())}}createLoansAccountDetailsForm(){this.loansAccountDetailsForm=this.formBuilder.group({productId:["",Wt.required],loanOfficerId:[""],loanPurposeId:[""],fundId:[""],submittedOnDate:[this.settingsService.businessDate,Wt.required],expectedDisbursementDate:["",Wt.required],externalId:[""],linkAccountId:[""],createStandingInstructionAtDisbursement:[""]})}buildDependencies(){let e=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,i=!this.loansAccountTemplate.clientId;this.loansAccountDetailsForm.get("productId").valueChanges.subscribe(a=>{this.loansService.getLoansAccountTemplateResource(e,i,a).subscribe(r=>{this.loansAccountProductTemplate.emit(r),this.loanOfficerOptions=r.loanOfficerOptions,this.loanPurposeOptions=r.loanPurposeOptions,this.fundOptions=r.fundOptions,this.accountLinkingOptions=r.accountLinkingOptions,this.loanProductSelected=!0,r.createStandingInstructionAtDisbursement&&this.loansAccountDetailsForm.get("createStandingInstructionAtDisbursement").patchValue(r.createStandingInstructionAtDisbursement)})})}get loansAccountDetails(){return this.loansAccountDetailsForm.getRawValue()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-details-step"]],inputs:{loansAccountTemplate:"loansAccountTemplate"},outputs:{loansAccountProductTemplate:"loansAccountProductTemplate"},decls:31,vars:33,consts:[["submitPicker",""],["disbursementPicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-fill"],["required","","formControlName","productId",3,"matTooltip"],[3,"placeholderLabel","noEntriesFoundLabel","formControl"],[3,"value"],[1,"layout-row-wrap","layout-lt-md-column","gap-2percent"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],[1,"flex-48"],["matInput","","formControlName","externalId",3,"matTooltip"],["formControlName","loanPurposeId",3,"matTooltip"],["formControlName","fundId"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","submittedOnDate",3,"min","max","matDatepicker","matTooltip"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","expectedDisbursementDate",3,"min","max","matDatepicker","matTooltip"],[1,"flex-98"],[1,"mat-h3","flex-fill"],["formControlName","linkAccountId"],["formControlName","createStandingInstructionAtDisbursement",1,"flex-48"],["formControlName","loanOfficerId",3,"matTooltip"]],template:function(i,a){if(i&1&&(s(0,"form",2)(1,"div",3)(2,"mat-form-field",4)(3,"mat-label"),c(4),p(5,"translate"),l(),s(6,"mat-select",5),p(7,"translate"),s(8,"mat-option"),P(9,"ngx-mat-select-search",6),l(),de(10,YO,2,2,"mat-option",7,xe),p(12,"async"),l(),s(13,"mat-error"),c(14),p(15,"translate"),p(16,"translate"),s(17,"strong"),c(18),p(19,"translate"),l()()()(),M(20,n6,58,51,"div",8),s(21,"div",9)(22,"button",10),P(23,"fa-icon",11),c(24),p(25,"translate"),l(),s(26,"button",12),c(27),p(28,"translate"),P(29,"fa-icon",13),l(),M(30,i6,3,5,"button",14),l()()),i&2){let r;x("formGroup",a.loansAccountDetailsForm),o(4),C(m(5,17,"labels.inputs.Product Name")),o(2),x("matTooltip",ce(m(7,19,"tooltips.Name of the loan product"))),o(3),x("placeholderLabel",ce(a.placeHolderLabel))("noEntriesFoundLabel",ce(a.noEntriesFoundLabel))("formControl",a.filterFormCtrl),o(),ue(m(12,21,a.productData)),o(4),$t(" ",m(15,23,"labels.inputs.Product Name")," ",m(16,25,"labels.commons.is")," "),o(4),C(m(19,27,"labels.commons.required")),o(2),O(a.loanProductSelected?20:-1),o(4),b(" ",m(25,29,"labels.buttons.Previous")," "),o(2),x("disabled",!((r=a.loansAccountDetailsForm.get("productId"))!=null&&r.value)||!((r=a.loansAccountDetailsForm.get("expectedDisbursementDate"))!=null&&r.value)||!((r=a.loansAccountDetailsForm.get("submittedOnDate"))!=null&&r.value)),o(),b(" ",m(28,31,"labels.buttons.Next")," "),o(3),O(a.loanId?30:-1)}},dependencies:[wt,Pt,Ne,we,he,Le,je,Wo,ke,Fe,ae,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Da,Oi,d1,m1,$o,ja,un,mo,Wf,Tt],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var a6=t=>({data:t});function o6(t,n){if(t&1&&(s(0,"mat-option",4),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),b(" ",e.name," ")}}function r6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Quantity")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function l6(t,n){if(t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),s(3,"strong"),c(4),l()()),t&2){let e=T();o(),b(" ",m(2,2,"labels.inputs.Quantity can not be more than")," "),o(3),C(e.maxQuantity)}}var u0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Pe),this.layout={addButtonText:"Add"},this.maxQuantity=0,this.createAddCollateralForm()}ngOnInit(){this.dialogRef.updateSize("400px"),this.collateralTypeData=this.data.collateralOptions,this.buildDependencies()}createAddCollateralForm(){this.addCollateralForm=this.formBuilder.group({collateral:["",Wt.required],quantity:["",Wt.required],totalValue:[{value:"",disabled:!0}],totalCollateralValue:[{value:"",disabled:!0}]})}buildDependencies(){this.addCollateralForm.controls.collateral.valueChanges.subscribe(e=>{this.collateralData=e,this.maxQuantity=e.quantity}),this.addCollateralForm.controls.quantity.valueChanges.subscribe(e=>{this.addCollateralForm.patchValue({totalValue:this.collateralData.basePrice*e,totalCollateralValue:this.collateralData.basePrice*this.collateralData.pctToBase*e/100})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-add-collateral-dialog"]],decls:43,vars:39,consts:[["mat-dialog-title",""],[3,"formGroup"],[1,"layout-column"],["formControlName","collateral","required",""],[3,"value"],["type","number","matInput","","formControlName","quantity","required","",3,"max","min"],["type","text","matInput","","formControlName","totalValue",3,"disabled"],["type","text","matInput","","formControlName","totalCollateralValue",3,"disabled"],["align","center"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close","disabled"]],template:function(i,a){i&1&&(s(0,"h1",0),c(1),p(2,"translate"),l(),s(3,"mat-dialog-content")(4,"form",1)(5,"div",2)(6,"mat-form-field")(7,"mat-label"),c(8),p(9,"translate"),l(),s(10,"mat-select",3),de(11,o6,2,2,"mat-option",4,xe),l(),s(13,"mat-error"),c(14),p(15,"translate"),p(16,"translate"),s(17,"strong"),c(18),p(19,"translate"),l()()(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",5),M(25,r6,7,9,"mat-error"),M(26,l6,5,4,"mat-error"),l(),s(27,"mat-form-field")(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"input",6),l(),s(32,"mat-form-field")(33,"mat-label"),c(34),p(35,"translate"),l(),P(36,"input",7),l()()()(),s(37,"mat-dialog-actions",8)(38,"button",9),c(39),p(40,"translate"),l(),s(41,"button",10),c(42),l()()),i&2&&(o(),C(m(2,19,"labels.heading.Add Loan Collateral")),o(3),x("formGroup",a.addCollateralForm),o(4),C(m(9,21,"labels.inputs.Collateral")),o(3),ue(a.collateralTypeData),o(3),$t(" ",m(15,23,"labels.inputs.Collateral")," ",m(16,25,"labels.commons.is")," "),o(4),C(m(19,27,"labels.commons.required")),o(4),C(m(23,29,"labels.inputs.Quantity")),o(2),x("max",a.maxQuantity)("min",0),o(),O(a.addCollateralForm.controls.quantity.hasError("required")?25:-1),o(),O(a.addCollateralForm.controls.quantity.hasError("max")?26:-1),o(3),C(m(30,31,"labels.inputs.Total Value")),o(2),x("disabled",!0),o(3),C(m(35,33,"labels.inputs.Total Collateral Value")),o(2),x("disabled",!0),o(3),C(m(40,35,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",ka(37,a6,a.addCollateralForm))("disabled",!a.addCollateralForm.valid||a.addCollateralForm.pristine),o(),b(" ",a.layout.addButtonText," "))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,t1,Qf,ke,Fe,Ce,_e,Ue,Ae,En,In,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();var s6=()=>["../","general"];function c6(t,n){if(t&1&&P(0,"mifosx-input-amount",4),t&2){let e=T();x("currency",e.currency)("isRequired",!0)("inputFormControl",e.loansAccountTermsForm.controls.principalAmount)("inputLabel","Principal")}}function p6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Loan Term")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function m6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function d6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Frequency")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function u6(t,n){t&1&&(s(0,"mat-form-field",11)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",60),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Fixed Length")))}function f6(t,n){if(t&1&&(s(0,"span",12),c(1),p(2,"find"),l()),t&2){let e=T();o(),C(Ye(2,1,e.loansAccountTermsForm.value.loanTermFrequencyType,e.termFrequencyTypeData,"id","value"))}}function h6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Number of repayments")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function g6(t,n){t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",61),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Installment Amount")))}function _6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Repaid every")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function C6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function b6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function v6(t,n){if(t&1&&(s(0,"mat-form-field",20)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",62),de(5,b6,3,5,"mat-option",10,xe),l()()),t&2){let e=T();o(2),C(m(3,1,"labels.inputs.Select On")),o(3),ue(e.repaymentFrequencyNthDayTypeData)}}function x6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function y6(t,n){if(t&1&&(s(0,"mat-form-field",20)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",63),de(5,x6,3,5,"mat-option",10,xe),l()()),t&2){let e=T();o(2),C(m(3,1,"labels.inputs.Select Day")),o(3),ue(e.repaymentFrequencyDaysOfWeekTypeData)}}function S6(t,n){t&1&&(s(0,"mat-checkbox",21),p(1,"translate"),c(2),p(3,"translate"),l()),t&2&&(x("matTooltip",ce(m(1,3,"tooltips.Leave this checkbox checked if the loan has Down Payment"))),o(2),b(" ",m(3,5,"labels.inputs.Enable Down Payment")," "))}function D6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function w6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function P6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function T6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amortization Type")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function A6(t,n){t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",69),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Principal Percentage Per Installment")))}function M6(t,n){if(t&1&&(s(0,"mat-form-field",7)(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",64),l(),s(5,"mat-form-field",7)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"mat-select",65),de(10,D6,3,5,"mat-option",10,xe),l(),s(12,"mat-error"),c(13),p(14,"translate"),p(15,"translate"),s(16,"strong"),c(17),p(18,"translate"),l()()(),s(19,"mat-form-field",7)(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",66),p(24,"translate"),de(25,w6,3,5,"mat-option",10,xe),l()(),s(27,"mat-form-field",7)(28,"mat-label"),c(29),p(30,"translate"),l(),s(31,"mat-select",67),p(32,"translate"),de(33,P6,3,5,"mat-option",10,xe),l(),M(35,T6,7,9,"mat-error"),l(),M(36,A6,5,3,"mat-form-field",7),s(37,"mat-checkbox",68)(38,"p"),c(39),p(40,"translate"),l()()),t&2){let e=T();o(2),b("",m(3,15,"labels.inputs.Nominal interest rate")," %"),o(5),C(m(8,17,"labels.inputs.Frequency")),o(3),ue(e.interestRateFrequencyTypeData),o(3),$t(" ",m(14,19,"labels.inputs.Nominal interest rate frequency")," ",m(15,21,"labels.commons.is")," "),o(4),C(m(18,23,"labels.commons.required")),o(4),C(m(22,25,"labels.inputs.Interest method")),o(2),x("matTooltip",ce(m(24,27,"tooltips.The Interest method value"))),o(2),ue(e.interestTypeData),o(4),C(m(30,29,"labels.inputs.Amortization")),o(2),x("matTooltip",ce(m(32,31,"tooltips.The Amortization value"))),o(2),ue(e.amortizationTypeData),o(2),O(e.loansAccountTermsForm.controls.amortizationType.hasError("required")?35:-1),o(),O(e.isEqualPrincipalPayments()?36:-1),o(),x("checked",e.loansAccountTermsData==null?null:e.loansAccountTermsData.isEqualAmortization),o(2),C(m(40,33,"labels.inputs.Is Equal Amortization"))}}function O6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function I6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function E6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amortization Type")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function L6(t,n){if(t&1&&(s(0,"div",22)(1,"mat-form-field",23)(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",70),de(6,O6,3,5,"mat-option",10,xe),l()(),s(8,"mat-form-field",23)(9,"mat-label"),c(10),p(11,"translate"),l(),s(12,"mat-select",67),p(13,"translate"),de(14,I6,3,5,"mat-option",10,xe),l(),M(16,E6,7,9,"mat-error"),l(),s(17,"mat-checkbox",71)(18,"p"),c(19),p(20,"translate"),l()()()),t&2){let e=T();o(3),C(m(4,6,"labels.inputs.Interest Method")),o(3),ue(e.interestTypeData),o(4),C(m(11,8,"labels.inputs.Amortization")),o(2),x("matTooltip",ce(m(13,10,"tooltips.The Amortization value"))),o(2),ue(e.amortizationTypeData),o(2),O(e.loansAccountTermsForm.controls.amortizationType.hasError("required")?16:-1),o(3),b("",m(20,12,"labels.inputs.Is Floating Rate"),"?")}}function k6(t,n){if(t&1&&(s(0,"div",23)(1,"div",72)(2,"span",35)(3,"p"),c(4),p(5,"translate"),l()(),s(6,"span",36)(7,"p"),c(8),p(9,"translateKey"),l()()()()),t&2){let e=T();o(4),C(m(5,2,"labels.inputs.Loan Schedule Type")),o(4),C(Ee(9,4,e.loanScheduleType.value,"catalogs"))}}function F6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.code),o(),b(" ",Ee(2,2,e.name,"catalogs")," ")}}function N6(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Repayment Strategy")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function R6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),p(2,"translateKey"),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",Ee(2,2,e.value,"catalogs")," ")}}function B6(t,n){t&1&&(X(0,27),s(1,"mat-checkbox",73)(2,"p"),c(3),p(4,"translate"),l()(),Q()),t&2&&(o(3),C(m(4,1,"labels.inputs.Is interest recognition on disbursement date?")))}function q6(t,n){if(t&1&&(s(0,"div",33)(1,"p")(2,"span",74)(3,"b"),c(4),p(5,"translate"),l()(),s(6,"span",23),c(7),l()()()),t&2){let e=T();o(4),C(m(5,2,"labels.inputs.Delinquency Bucket")),o(3),C(e.loanProduct==null?null:e.loanProduct.delinquencyBucket.name)}}function z6(t,n){t&1&&(s(0,"div",23)(1,"mat-checkbox",75)(2,"p"),c(3),p(4,"translate"),l()()()),t&2&&(o(3),C(m(4,1,"labels.inputs.Enable installment level Delinquency")))}function j6(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.accountNo," ")}}function V6(t,n){if(t&1&&(s(0,"mat-form-field",77)(1,"mat-label"),c(2),p(3,"translate"),l(),s(4,"mat-select",78),de(5,j6,2,2,"mat-option",10,xe),l()()),t&2){let e=T(2);o(2),C(m(3,1,"labels.inputs.Loan closed with Topup")),o(3),ue(e.clientActiveLoanData)}}function U6(t,n){if(t&1&&(X(0,23),s(1,"mat-checkbox",76)(2,"p"),c(3),p(4,"translate"),l()(),M(5,V6,7,3,"mat-form-field",77),Q()),t&2){let e=T();o(3),b("",m(4,2,"labels.inputs.Is Topup Loan"),"?"),o(2),O(e.loansAccountTermsForm.controls.isTopup.value?5:-1)}}function H6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),p(6,"translateKey"),l()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Days in year")),o(3),C(Ee(6,4,e.loansAccountTermsData.daysInYearType.value,"catalogs"))}}function G6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),p(6,"translateKey"),l()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Days in month")),o(3),C(Ee(6,4,e.loansAccountTermsData.daysInMonthType.value,"catalogs"))}}function W6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),l()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Advance payments adjustment type")),o(3),C(e.loansAccountTermsData.interestRecalculationData.rescheduleStrategyType.value)}}function $6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),b(" on ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value)}}function Y6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),b("on day ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay)}}function K6(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),$t("on ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value," ",e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value)}}function Z6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),p(6,"translateKey"),l()(),s(7,"div",34)(8,"span",35),c(9),p(10,"translate"),l(),s(11,"span",36)(12,"span"),c(13),l(),M(14,$6,2,1,"span"),M(15,Y6,2,1,"span"),M(16,K6,2,2,"span"),l()()),t&2){let e=T();o(2),C(m(3,7,"labels.inputs.Interest recalculation compounding on")),o(3),C(Ee(6,9,e.loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.value,"catalogs")),o(4),C(m(10,12,"labels.inputs.Frequency Interval for recalculation")),o(4),C(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.value),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id===3&&e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday?14:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id===4&&e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay?15:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id===4&&!e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay&&e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay?16:-1)}}function J6(t,n){if(t&1&&(s(0,"div",34)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),l()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Frequency Interval for recalculation")),o(3),C(e.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval)}}function X6(t,n){t&1&&(s(0,"div",34)(1,"h4",5),c(2),p(3,"translate"),l()()),t&2&&(o(2),C(m(3,1,"labels.heading.Loan Tranche Details")))}function Q6(t,n){t&1&&(s(0,"mat-checkbox",79),p(1,"translate"),c(2),p(3,"translate"),l()),t&2&&(x("matTooltip",ce(m(1,3,"tooltips.Allow full term length for each tranche disbursement"))),o(2),b(" ",m(3,5,"labels.inputs.Allow full term for each tranche")," "))}function tI(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Maximum allowed outstanding balance")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function eI(t,n){t&1&&(s(0,"div",34)(1,"h4",5),c(2),p(3,"translate"),l()()),t&2&&(o(2),b(" ",m(3,1,"labels.heading.Loan Tranche Details are not allowed for this Loan Product")," "))}function nI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Expected Disbursement Date")))}function iI(t,n){if(t&1&&(s(0,"td",88),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.expectedDisbursementDate)," ")}}function aI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Principal")))}function oI(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.principal," ")}}function rI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function lI(t,n){if(t&1){let e=Ct();s(0,"td",88)(1,"button",89),p(2,"translate"),it("click",function(){let a=lt(e).index,r=T(2);return st(r.removeDisbursementDataEntry(a))}),P(3,"fa-icon",90),l()()}t&2&&(o(),x("matTooltip",ce(m(2,2,"tooltips.Delete"))))}function sI(t,n){t&1&&P(0,"tr",91)}function cI(t,n){t&1&&P(0,"tr",92)}function pI(t,n){if(t&1){let e=Ct();P(0,"mat-divider",27),M(1,X6,4,3,"div",34),M(2,Q6,4,7,"mat-checkbox",79),s(3,"div",34)(4,"mat-form-field",23)(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",80),M(9,tI,7,9,"mat-error"),l(),s(10,"span",23)(11,"button",81),it("click",function(){lt(e);let a=T();return st(a.addDisbursementDataEntry(a.disbursementData))}),P(12,"fa-icon",82),l()()(),M(13,eI,4,3,"div",34),s(14,"table",83),X(15,84),F(16,nI,3,3,"th",46)(17,iI,3,3,"td",47),Q(),X(18,85),F(19,aI,3,3,"th",46)(20,oI,2,1,"td",47),Q(),X(21,86),F(22,rI,3,3,"th",46)(23,lI,4,4,"td",47),Q(),F(24,sI,1,0,"tr",52)(25,cI,1,0,"tr",53),l()}if(t&2){let e=T();o(),O(e.allowAddDisbursementDetails()?1:-1),o(),O(e.isFullTermTrancheEditable()?2:-1),o(4),C(m(7,10,"labels.inputs.Maximum allowed outstanding balance")),o(3),O(e.loansAccountTermsForm.controls.maxOutstandingLoanBalance.hasError("required")?9:-1),o(2),x("disabled",e.isMultiDisbursedCompleted),o(2),O(e.allowAddDisbursementDetails()?-1:13),o(),x("dataSource",e.disbursementDataSource)("hidden",e.disbursementDataSource.length===0),o(10),x("matHeaderRowDef",e.disbursementDisplayedColumns),o(),x("matRowDefColumns",e.disbursementDisplayedColumns)}}function mI(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),b(" on ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value," ")}}function dI(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),b("on day ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay," ")}}function uI(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T(2);o(),$t("on ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value," ",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value," ")}}function fI(t,n){if(t&1&&(s(0,"div",37)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),M(6,mI,2,1,"span"),M(7,dI,2,1,"span"),M(8,uI,2,2,"span"),l()()),t&2){let e=T();o(2),C(m(3,5,"labels.inputs.Frequency for compounding")),o(3),b("",e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.value," "),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id===3&&e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday?6:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id===4&&e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay?7:-1),o(),O(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id===4&&!e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay&&e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay?8:-1)}}function hI(t,n){if(t&1&&(s(0,"div",37)(1,"span",35),c(2),p(3,"translate"),l(),s(4,"span",36),c(5),l()()),t&2){let e=T();o(2),C(m(3,2,"labels.inputs.Frequency Interval for compounding")),o(3),C(e.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval)}}function gI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function _I(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),C(e.type.name)}}function CI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Quantity")))}function bI(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),C(e.value)}}function vI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Total Value")))}function xI(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),C(e.type.basePrice*e.value)}}function yI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Total Collateral Value")))}function SI(t,n){if(t&1&&(s(0,"td",88),c(1),l()),t&2){let e=n.$implicit;o(),C(e.type.pctToBase*e.type.basePrice*e.value/100)}}function DI(t,n){t&1&&(s(0,"th",87),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function wI(t,n){if(t&1){let e=Ct();s(0,"td",88)(1,"button",93),it("click",function(){let a=lt(e).index,r=T();return st(r.deleteCollateral(a))}),P(2,"fa-icon",90),l()()}}function PI(t,n){t&1&&P(0,"tr",91)}function TI(t,n){t&1&&P(0,"tr",92)}function AI(t,n){t&1&&(s(0,"button",59),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,s6)),o(),b(" ",m(2,2,"labels.buttons.Cancel")," "))}var Io=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.settingsService=A(oe),this.route=A(It),this.dialog=A(Gn),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.disbursementDataSource=[],this.transactionProcessingStrategyOptions=[],this.repaymentStrategyDisabled=!1,this.isCollateralSufficient=!1,this.totalCollateralValue=0,this.collateralDataSource=[],this.loanCollateralDisplayedColumns=["type","value","totalValue","totalCollateralValue","action"],this.disbursementDisplayedColumns=["expectedDisbursementDate","principal","actions"],this.totalMultiDisbursed=0,this.isMultiDisbursedCompleted=!1,this.pristine=!0,this.loanId=null,this.loanScheduleType=null,this.loanProduct=null,this.interestRateFrequencyTypeData=[],this.productEnableDownPayment=!1,this.enableIncomeCapitalization=!1,this.enableBuyDownFee=!1,this.isProgressive=!1,this.loanId=this.route.snapshot.params.loanId,this.createloansAccountTermsForm()}ngOnChanges(){if(this.loansAccountProductTemplate){if(this.currency=this.loansAccountProductTemplate.currency,this.loansAccountTermsData=this.loansAccountProductTemplate,this.loanId!=null&&this.loansAccountTemplate.accountNo&&(this.loansAccountTermsData=this.loansAccountTemplate),this.productEnableDownPayment=this.loansAccountTermsData.product.enableDownPayment,this.enableIncomeCapitalization=this.loansAccountTermsData.product.enableIncomeCapitalization,this.enableBuyDownFee=this.loansAccountTermsData.product.enableBuyDownFee,this.isProgressive=this.loansAccountTermsData.loanScheduleType.code==Gr.LOAN_SCHEDULE_TYPE_PROGRESSIVE,this.loansAccountTermsData.product&&(this.loanProduct=this.loansAccountTermsData.product),this.interestRateFrequencyTypeData=this.loansAccountTermsData.interestRateFrequencyTypeOptions,this.loansAccountTermsForm.patchValue({principalAmount:this.loansAccountTermsData.principal,loanTermFrequency:this.loansAccountTermsData.termFrequency,loanTermFrequencyType:this.loansAccountTermsData.termPeriodFrequencyType.id,numberOfRepayments:this.loansAccountTermsData.numberOfRepayments,repaymentEvery:this.loansAccountTermsData.repaymentEvery,repaymentFrequencyType:this.loansAccountTermsData.repaymentFrequencyType.id,amortizationType:this.loansAccountTermsData.amortizationType.id,isEqualAmortization:this.loansAccountTermsData.isEqualAmortization,interestType:this.loansAccountTermsData.interestType.id,isFloatingInterestRate:this.loansAccountTermsData.isLoanProductLinkedToFloatingRate?!1:null,interestCalculationPeriodType:this.loansAccountTermsData.interestCalculationPeriodType.id,allowPartialPeriodInterestCalculation:this.loansAccountTermsData.allowPartialPeriodInterestCalculation,inArrearsTolerance:this.loansAccountTermsData.inArrearsTolerance,graceOnPrincipalPayment:this.loansAccountTermsData.graceOnPrincipalPayment,graceOnInterestPayment:this.loansAccountTermsData.graceOnInterestPayment,graceOnArrearsAgeing:this.loansAccountTermsData.graceOnArrearsAgeing,graceOnInterestCharged:this.loansAccountTermsData.graceOnInterestCharged,fixedEmiAmount:this.loansAccountTermsData.fixedEmiAmount,maxOutstandingLoanBalance:this.loansAccountTermsData.maxOutstandingLoanBalance,transactionProcessingStrategyCode:this.loansAccountTermsData.transactionProcessingStrategyCode,interestRateDifferential:this.loansAccountTermsData.interestRateDifferential,multiDisburseLoan:this.loansAccountTermsData.multiDisburseLoan,interestRateFrequencyType:this.loansAccountTermsData.interestRateFrequencyType.id,balloonRepaymentAmount:this.loansAccountTermsData.balloonRepaymentAmount,interestRecognitionOnDisbursementDate:this.loansAccountTermsData.interestRecognitionOnDisbursementDate||!1}),this.setAdvancedPaymentStrategyControls(),this.loansAccountTermsData.loanScheduleType.code==Gr.LOAN_SCHEDULE_TYPE_CUMULATIVE&&this.loansAccountTermsForm.removeControl("interestRecognitionOnDisbursementDate"),this.loansAccountTermsData.isLoanProductLinkedToFloatingRate&&this.loansAccountTermsForm.removeControl("interestRatePerPeriod"),this.multiDisburseLoan=this.loansAccountTermsData.multiDisburseLoan,this.loansAccountTermsData.disbursementDetails&&(this.disbursementDataSource=this.loansAccountTermsData.disbursementDetails,this.totalMultiDisbursed=0,this.disbursementDataSource.forEach(i=>{this.totalMultiDisbursed+=i.principal})),this.isDelinquencyEnabled()&&this.loansAccountTermsForm.addControl("enableInstallmentLevelDelinquency",new pe(this.loansAccountTermsData.enableInstallmentLevelDelinquency||this.loanProduct.enableInstallmentLevelDelinquency)),this.collateralDataSource=this.loansAccountTermsData.collateral||[],this.productEnableDownPayment){let i=this.loansAccountTermsData.enableDownPayment!==!1;this.loansAccountTermsForm.addControl("enableDownPayment",new pe(i))}if(this.isFullTermTrancheEditable()){let i=this.loansAccountTermsData.allowFullTermForTranche??this.loanProduct?.allowFullTermForTranche??!1;this.loansAccountTermsForm.patchValue({allowFullTermForTranche:i})}let e=this.loansAccountTermsData.product.allowAttributeOverrides;e.repaymentEvery||(this.loansAccountTermsForm.controls.repaymentEvery.disable(),this.loansAccountTermsForm.controls.repaymentFrequencyType.disable()),e.interestType||this.loansAccountTermsForm.controls.interestType.disable(),e.amortizationType||this.loansAccountTermsForm.controls.amortizationType.disable(),e.interestCalculationPeriodType||(this.loansAccountTermsForm.controls.interestCalculationPeriodType.disable(),this.loansAccountTermsForm.controls.allowPartialPeriodInterestCalculation.disable()),e.inArrearsTolerance||this.loansAccountTermsForm.controls.inArrearsTolerance.disable(),e.transactionProcessingStrategyCode||this.loansAccountTermsForm.controls.transactionProcessingStrategyCode.disable(),e.graceOnPrincipalAndInterestPayment||this.loansAccountTermsForm.controls.graceOnPrincipalPayment.disable(),e.graceOnPrincipalAndInterestPayment||this.loansAccountTermsForm.controls.graceOnInterestPayment.disable(),e.graceOnArrearsAgeing||this.loansAccountTermsForm.controls.graceOnArrearsAgeing.disable(),this.setOptions(),this.loansAccountTermsForm.removeControl("maxOutstandingLoanBalance"),this.allowAddDisbursementDetails()?this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null,Wt.required)):this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null))}}ngOnInit(){if(this.maxDate=this.settingsService.maxFutureDate,this.loansAccountTermsData=this.loansAccountProductTemplate,this.loanId!=null&&this.loansAccountTemplate.accountNo&&(this.loansAccountTermsData=this.loansAccountTemplate),this.loansAccountTermsData){if(this.loansAccountTermsData.loanProductId){let e=null;if(this.loansAccountTermsData.expectedFirstRepaymentOnDate){let i=new Date(this.loansAccountTermsData.expectedFirstRepaymentOnDate);e=this.formatDateToDDMMYYYY(i)}this.loansAccountTermsForm.patchValue({repaymentsStartingFromDate:this.loansAccountTermsData.expectedFirstRepaymentOnDate&&e})}this.loansAccountTermsForm.patchValue({principalAmount:this.loansAccountTermsData.principal,loanTermFrequency:this.loansAccountTermsData.termFrequency,loanTermFrequencyType:this.loansAccountTermsData.termPeriodFrequencyType.id,numberOfRepayments:this.loansAccountTermsData.numberOfRepayments,repaymentEvery:this.loansAccountTermsData.repaymentEvery,repaymentFrequencyType:this.loansAccountTermsData.repaymentFrequencyType.id,amortizationType:this.loansAccountTermsData.amortizationType.id,isEqualAmortization:this.loansAccountTermsData.isEqualAmortization,interestType:this.loansAccountTermsData.interestType.id,isFloatingInterestRate:this.loansAccountTermsData.isLoanProductLinkedToFloatingRate?!1:null,interestCalculationPeriodType:this.loansAccountTermsData.interestCalculationPeriodType.id,allowPartialPeriodInterestCalculation:this.loansAccountTermsData.allowPartialPeriodInterestCalculation,inArrearsTolerance:this.loansAccountTermsData.inArrearsTolerance,graceOnPrincipalPayment:this.loansAccountTermsData.graceOnPrincipalPayment,graceOnInterestPayment:this.loansAccountTermsData.graceOnInterestPayment,graceOnArrearsAgeing:this.loansAccountTermsData.graceOnArrearsAgeing,graceOnInterestCharged:this.loansAccountTermsData.graceOnInterestCharged,fixedEmiAmount:this.loansAccountTermsData.fixedEmiAmount,maxOutstandingLoanBalance:this.loansAccountTermsData.maxOutstandingLoanBalance,transactionProcessingStrategyCode:this.loansAccountTermsData.transactionProcessingStrategyCode,interestRateDifferential:this.loansAccountTermsData.interestRateDifferential,multiDisburseLoan:this.loansAccountTermsData.multiDisburseLoan,interestRateFrequencyType:this.loansAccountTermsData.interestRateFrequencyType.id,balloonRepaymentAmount:this.loansAccountTermsData.balloonRepaymentAmount,interestRecognitionOnDisbursementDate:this.loansAccountTermsData.interestRecognitionOnDisbursementDate||!1})}this.createloansAccountTermsForm(),this.setAdvancedPaymentStrategyControls(),this.setLoanTermListener(),this.loansAccountTermsForm.removeControl("maxOutstandingLoanBalance"),this.allowAddDisbursementDetails()?(this.loansAccountTermsForm.removeControl("maxOutstandingLoanBalance"),this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null,Wt.required))):this.loansAccountTermsForm.addControl("maxOutstandingLoanBalance",new pe(this.loansAccountTermsData?.maxOutstandingLoanBalance??null))}allowAddDisbursementDetails(){return this.multiDisburseLoan&&!this.loansAccountTermsData.disallowExpectedDisbursements}formatDateToDDMMYYYY(e){let i=e.getDate().toString().padStart(2,"0"),a=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getFullYear();return`${i}-${a}-${r}`}setCustomValidators(){let e=this.loansAccountTermsForm.get("repaymentFrequencyNthDayType"),i=this.loansAccountTermsForm.get("repaymentFrequencyDayOfWeekType");this.loansAccountTermsForm.get("repaymentFrequencyType").valueChanges.subscribe(a=>{a===2?(e.setValidators([Wt.required]),i.setValidators([Wt.required])):(e.setValidators(null),i.setValidators(null)),e.updateValueAndValidity(),i.updateValueAndValidity()})}setLoanTermListener(){this.loansAccountTermsForm.get("numberOfRepayments").valueChanges.subscribe(e=>{let i=this.loansAccountTermsForm.value.repaymentEvery;this.calculateLoanTerm(e,i)}),this.loansAccountTermsForm.get("repaymentEvery").valueChanges.subscribe(e=>{let i=this.loansAccountTermsForm.value.numberOfRepayments;this.calculateLoanTerm(i,e)}),this.loansAccountTermsForm.get("loanTermFrequencyType").valueChanges.subscribe(e=>{this.loansAccountTermsForm.patchValue({repaymentFrequencyType:e})}),this.loansAccountTermsForm.get("amortizationType").valueChanges.subscribe(e=>{e===0?this.loansAccountTermsForm.addControl("fixedPrincipalPercentagePerInstallment",new pe("")):this.loansAccountTermsForm.removeControl("fixedPrincipalPercentagePerInstallment")})}setAdvancedPaymentStrategyControls(){this.loansAccountTermsData&&(this.loansAccountTermsForm.removeControl("interestRatePerPeriod"),this.loansAccountTermsForm.removeControl("fixedLength"),this.loansAccountTermsData.product.fixedLength?(this.loansAccountTermsForm.addControl("interestRatePerPeriod",new pe({value:0,disabled:!0},Wt.required)),this.loansAccountTermsForm.addControl("fixedLength",new pe(this.loansAccountTermsData.product.fixedLength))):this.loansAccountTermsForm.addControl("interestRatePerPeriod",new pe(this.loansAccountTermsData.interestRatePerPeriod,Wt.required)))}hasFixedLength(){return this.loansAccountTermsData?!!this.loansAccountTermsData.product?.fixedLength:!1}isEqualPrincipalPayments(){return this.loansAccountTermsForm.value.amortizationType===0}createloansAccountTermsForm(){this.loansAccountTermsForm=this.formBuilder.group({principalAmount:["",Wt.required],loanTermFrequency:[{value:"",disabled:!0},Wt.required],loanTermFrequencyType:["",Wt.required],numberOfRepayments:["",Wt.required],repaymentEvery:["",Wt.required],repaymentFrequencyType:[{value:"",disabled:!0},Wt.required],repaymentFrequencyNthDayType:[""],repaymentFrequencyDayOfWeekType:[""],repaymentsStartingFromDate:[""],interestChargedFromDate:[""],interestRatePerPeriod:[""],interestType:[""],isFloatingInterestRate:[null],isEqualAmortization:[""],amortizationType:["",Wt.required],interestCalculationPeriodType:[""],allowPartialPeriodInterestCalculation:[""],inArrearsTolerance:[""],graceOnInterestCharged:[""],graceOnPrincipalPayment:[""],graceOnInterestPayment:[""],graceOnArrearsAgeing:[""],loanIdToClose:[""],fixedEmiAmount:[""],isTopup:[""],maxOutstandingLoanBalance:[""],interestRateDifferential:[""],transactionProcessingStrategyCode:["",Wt.required],multiDisburseLoan:[!1],interestRateFrequencyType:[""],balloonRepaymentAmount:[""],interestRecognitionOnDisbursementDate:[!1],allowFullTermForTranche:[!1]})}calculateLoanTerm(e,i){let a=e*i;this.loansAccountTermsForm.patchValue({loanTermFrequency:a})}get disbursementData(){return{disbursementData:this.disbursementDataSource}}addDisbursementDataEntry(){let e=this.loansAccountTermsForm.get("principalAmount").value,i=[new sa({controlName:"expectedDisbursementDate",label:"Expected Disbursement Date",value:new Date||"",type:"datetime-local",minDate:this.minDate,maxDate:this.maxDate,required:!0,order:1}),new Pi({controlName:"principal",label:`Principal(It should be less than equal to the ${e})`,value:"",type:"number",required:!0,order:2})],a={title:"Add Disbursement Details",layout:{addButtonText:"Add"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=u.data.value.principal*1;this.totalMultiDisbursed+d<=e&&(this.disbursementDataSource=this.disbursementDataSource.concat(u.data.value),this.totalMultiDisbursed+=d,this.isMultiDisbursedCompleted=this.totalMultiDisbursed===e,this.pristine=!1)}})}removeDisbursementDataEntry(e){let i=this.loansAccountTermsForm.get("principalAmount").value;this.dialog.open(la,{data:{deleteContext:"this"}}).afterClosed().subscribe(r=>{if(r.delete){let u=this.disbursementDataSource[e].principal*1;this.disbursementDataSource.splice(e,1),this.disbursementDataSource=this.disbursementDataSource.concat([]),this.totalMultiDisbursed-=u,this.isMultiDisbursedCompleted=this.totalMultiDisbursed===i}})}addCollateral(){this.dialog.open(u0,{data:{collateralOptions:this.collateralOptions}}).afterClosed().subscribe(i=>{if(i.data){let a={type:i.data.value.collateral,value:i.data.value.quantity};this.totalCollateralValue+=a.type.pctToBase*a.type.basePrice*a.value/100,this.collateralDataSource=this.collateralDataSource.concat(a),this.collateralOptions=this.collateralOptions.filter(r=>r.collateralId!==i.data.value.collateral.collateralId),this.loanPrincipal{if(a.delete){let r=this.collateralDataSource.splice(e,1);this.collateralOptions=this.collateralOptions.concat(r[0].type),this.totalCollateralValue-=r[0].type.pctToBase*r[0].type.basePrice*r[0].value/100,this.collateralDataSource=this.collateralDataSource.concat([]),this.pristine=!1,this.loanPrincipal!Gr.isAdvancedPaymentAllocationStrategy(e.code)),this.repaymentStrategyDisabled=!1):(this.loansAccountProductTemplate.transactionProcessingStrategyOptions.some(e=>{Gr.isAdvancedPaymentAllocationStrategy(e.code)&&this.transactionProcessingStrategyOptions.push(e)}),this.repaymentStrategyDisabled=!0)}isDelinquencyEnabled(){return!!this.loanProduct?.delinquencyBucket?.name}get loansAccountTerms(){return this.loansAccountTermsForm.getRawValue()}get loanCollateral(){return{collateral:this.collateralDataSource}}isFullTermTrancheEditable(){return this.isProgressive&&!!this.multiDisburseLoan}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-terms-step"]],inputs:{loansProductOptions:"loansProductOptions",loansAccountProductTemplate:"loansAccountProductTemplate",loansAccountTemplate:"loansAccountTemplate",loansAccountFormValid:"loansAccountFormValid",collateralOptions:"collateralOptions",loanPrincipal:"loanPrincipal"},features:[Vr],decls:218,vars:185,consts:[["repaymentsPicker",""],["interestPicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48",3,"currency","isRequired","inputFormControl","inputLabel"],[1,"mat-h4","flex-98"],[1,"fas","fa-question",3,"matTooltip"],[1,"flex-fill","flex-23"],["type","number","matInput","","required","","disabled","","formControlName","loanTermFrequency"],["required","","formControlName","loanTermFrequencyType"],[3,"value"],[1,"flex-fill","flex-20"],[1,"flex-20","label-field"],["type","number","matInput","","formControlName","numberOfRepayments",3,"matTooltip"],[1,"flex-fill","flex-23",3,"click"],["matInput","","formControlName","repaymentsStartingFromDate",3,"min","max","matTooltip","matDatepicker"],["matSuffix","",3,"for"],["matInput","","formControlName","interestChargedFromDate",3,"min","max","matDatepicker","matTooltip"],["type","number","matInput","","required","","formControlName","repaymentEvery",3,"matTooltip"],["formControlName","repaymentFrequencyType","disabled","","required",""],[1,"flex-fill","flex-14"],["labelPosition","before","formControlName","enableDownPayment",1,"margin-b","flex-73",3,"matTooltip"],[1,"flex-48","layout-row","layout-xs-column"],[1,"flex-48"],["formControlName","transactionProcessingStrategyCode",3,"matTooltip","disabled"],["formControlName","interestCalculationPeriodType",3,"matTooltip"],["formControlName","allowPartialPeriodInterestCalculation",1,"flex-98",3,"matTooltip"],[1,"flex-98"],["matInput","","type","number","formControlName","inArrearsTolerance",3,"matTooltip"],["matInput","","formControlName","graceOnInterestCharged",3,"matTooltip"],["type","number","matInput","","formControlName","graceOnPrincipalPayment"],["type","number","matInput","","formControlName","graceOnInterestPayment"],["type","number","matInput","","formControlName","graceOnArrearsAgeing"],[1,"flex-48","flex-fill"],[1,"flex-100","layout-row"],[1,"flex-40"],[1,"flex-60"],[1,"flex-fill"],[1,"flex-50"],[1,"layout-column","table-name","flex-50"],[1,"layout-column","flex-50"],[1,"layout-row","align-flex-end"],["mat-raised-button","","color","primary",3,"click"],["icon","plus",1,"m-r-10"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["matColumnDef","totalValue"],["matColumnDef","totalCollateralValue"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["type","number","matInput","","formControlName","fixedLength"],["type","number","matInput","","formControlName","fixedEmiAmount"],["formControlName","repaymentFrequencyNthDayType"],["formControlName","repaymentFrequencyDayOfWeekType"],["type","number","matInput","","formControlName","interestRatePerPeriod"],["formControlName","interestRateFrequencyType"],["formControlName","interestType",3,"matTooltip"],["required","","formControlName","amortizationType",3,"matTooltip"],["formControlName","isEqualAmortization",1,"flex-23",3,"checked"],["type","number","matInput","","formControlName","fixedPrincipalPercentagePerInstallment"],["formControlName","interestType"],["formControlName","isFloatingInterestRate",1,"flex-48"],[1,"layout-row"],["formControlName","interestRecognitionOnDisbursementDate",1,"flex-98"],[1,"flex-53"],["formControlName","enableInstallmentLevelDelinquency"],["formControlName","isTopup",1,"flex-20"],[1,"flex-fill","flex-24"],["formControlName","loanIdToClose"],["labelPosition","before","formControlName","allowFullTermForTranche",1,"flex-48","margin-v",3,"matTooltip"],["matInput","","type","number","formControlName","maxOutstandingLoanBalance"],["type","button","mat-icon-button","","color","primary","required","",3,"click","disabled"],["icon","plus-circle","size","lg"],["mat-table","",3,"dataSource","hidden"],["matColumnDef","expectedDisbursementDate"],["matColumnDef","principal"],["matColumnDef","actions"],["mat-header-cell",""],["mat-cell",""],["type","button","mat-icon-button","","color","warn","matTooltipPosition","left",3,"click","matTooltip"],["icon","trash"],["mat-header-row",""],["mat-row",""],["mat-icon-button","","color","warn",3,"click"]],template:function(i,a){if(i&1){let r=Ct();s(0,"form",2)(1,"div",3),M(2,c6,1,4,"mifosx-input-amount",4),s(3,"h4",5),c(4),p(5,"translate"),P(6,"i",6),p(7,"translate"),l(),s(8,"mat-form-field",7)(9,"mat-label"),c(10),p(11,"translate"),l(),P(12,"input",8),M(13,p6,7,9,"mat-error"),l(),s(14,"mat-form-field",7)(15,"mat-label"),c(16),p(17,"translate"),l(),s(18,"mat-select",9),de(19,m6,3,5,"mat-option",10,xe),l(),M(21,d6,7,9,"mat-error"),l(),M(22,u6,5,3,"mat-form-field",11),M(23,f6,3,6,"span",12),s(24,"h4",5),c(25),p(26,"translate"),l(),s(27,"mat-form-field",7)(28,"mat-label"),c(29),p(30,"translate"),l(),P(31,"input",13),p(32,"translate"),M(33,h6,7,9,"mat-error"),l(),M(34,g6,5,3,"mat-form-field",7),s(35,"mat-form-field",14),it("click",function(){lt(r);let d=Et(43);return st(d.open())}),s(36,"mat-label"),c(37),p(38,"translate"),l(),P(39,"input",15),p(40,"translate"),P(41,"mat-datepicker-toggle",16)(42,"mat-datepicker",null,0),l(),s(44,"mat-form-field",14),it("click",function(){lt(r);let d=Et(52);return st(d.open())}),s(45,"mat-label"),c(46),p(47,"translate"),l(),P(48,"input",17),p(49,"translate"),P(50,"mat-datepicker-toggle",16)(51,"mat-datepicker",null,1),l(),s(53,"h4",5),c(54),p(55,"translate"),P(56,"i",6),p(57,"translate"),l(),s(58,"mat-form-field",7)(59,"mat-label"),c(60),p(61,"translate"),l(),P(62,"input",18),p(63,"translate"),M(64,_6,7,9,"mat-error"),l(),s(65,"mat-form-field",7)(66,"mat-label"),c(67),p(68,"translate"),l(),s(69,"mat-select",19),de(70,C6,3,5,"mat-option",10,xe),l()(),M(72,v6,7,3,"mat-form-field",20),M(73,y6,7,3,"mat-form-field",20),M(74,S6,4,7,"mat-checkbox",21),s(75,"h4",5),c(76),p(77,"translate"),l(),M(78,M6,41,35),M(79,L6,21,14,"div",22),s(80,"h4",5),c(81),p(82,"translate"),l(),M(83,k6,10,7,"div",23),s(84,"mat-form-field",23)(85,"mat-label"),c(86),p(87,"translate"),l(),s(88,"mat-select",24),p(89,"translate"),de(90,F6,3,5,"mat-option",10,xe),l(),M(92,N6,7,9,"mat-error"),l(),s(93,"h4",5),c(94),p(95,"translate"),l(),s(96,"mat-form-field",23)(97,"mat-label"),c(98),p(99,"translate"),l(),s(100,"mat-select",25),p(101,"translate"),de(102,R6,3,5,"mat-option",10,xe),l()(),s(104,"mat-checkbox",26),p(105,"translate"),s(106,"p"),c(107),p(108,"translate"),l()(),M(109,B6,5,3,"ng-container",27),s(110,"mat-form-field",23)(111,"mat-label"),c(112),p(113,"translate"),l(),P(114,"input",28),p(115,"translate"),l(),s(116,"mat-form-field",23)(117,"mat-label"),c(118),p(119,"translate"),l(),P(120,"input",29),p(121,"translate"),l(),s(122,"h4",5),c(123),p(124,"translate"),P(125,"i",6),p(126,"translate"),l(),s(127,"mat-form-field",7)(128,"mat-label"),c(129),p(130,"translate"),l(),P(131,"input",30),l(),s(132,"mat-form-field",7)(133,"mat-label"),c(134),p(135,"translate"),l(),P(136,"input",31),l(),s(137,"mat-form-field",23)(138,"mat-label"),c(139),p(140,"translate"),l(),P(141,"input",32),l(),M(142,q6,8,4,"div",33),M(143,z6,5,3,"div",23),M(144,U6,6,4,"ng-container",23),P(145,"mat-divider",27),s(146,"div",34)(147,"span",35)(148,"b"),c(149),p(150,"translate"),l()(),s(151,"span",36),c(152),p(153,"yesNo"),l()(),M(154,H6,7,7,"div",34),M(155,G6,7,7,"div",34),M(156,W6,6,4,"div",34),M(157,Z6,17,14),M(158,J6,6,4,"div",34),s(159,"div",34)(160,"span",35)(161,"b"),c(162),p(163,"translate"),l()(),s(164,"span",35),c(165),p(166,"yesNo"),l()(),s(167,"div",34)(168,"span",35)(169,"b"),c(170),p(171,"translate"),l()(),s(172,"span",35),c(173),p(174,"yesNo"),l()(),M(175,pI,26,12),M(176,fI,9,7,"div",37),M(177,hI,6,4,"div",37),P(178,"mat-divider",27),s(179,"div",38)(180,"div",39)(181,"h4",5),c(182),p(183,"translate"),l()(),s(184,"div",40)(185,"div",41)(186,"button",42),it("click",function(){return lt(r),st(a.addCollateral())}),P(187,"fa-icon",43),c(188),p(189,"translate"),l()()()(),s(190,"table",44),X(191,45),F(192,gI,3,3,"th",46)(193,_I,2,1,"td",47),Q(),X(194,48),F(195,CI,3,3,"th",46)(196,bI,2,1,"td",47),Q(),X(197,49),F(198,vI,3,3,"th",46)(199,xI,2,1,"td",47),Q(),X(200,50),F(201,yI,3,3,"th",46)(202,SI,2,1,"td",47),Q(),X(203,51),F(204,DI,3,3,"th",46)(205,wI,3,0,"td",47),Q(),F(206,PI,1,0,"tr",52)(207,TI,1,0,"tr",53),l()(),s(208,"div",54)(209,"button",55),P(210,"fa-icon",56),c(211),p(212,"translate"),l(),s(213,"button",57),c(214),p(215,"translate"),P(216,"fa-icon",58),l(),M(217,AI,3,5,"button",59),l()()}if(i&2){let r=Et(43),u=Et(52);x("formGroup",a.loansAccountTermsForm),o(2),O(a.currency?2:-1),o(2),b(" ",m(5,97,"labels.heading.Term Options")," "),o(2),x("matTooltip",ce(m(7,99,"tooltips.The loan term parameter in loan accounts"))),o(4),C(m(11,101,"labels.inputs.Loan Term")),o(3),O(a.loansAccountTermsForm.controls.loanTermFrequency.hasError("required")?13:-1),o(3),C(m(17,103,"labels.inputs.Frequency")),o(3),ue(a.termFrequencyTypeData),o(2),O(a.loansAccountTermsForm.controls.loanTermFrequencyType.hasError("required")?21:-1),o(),O(a.hasFixedLength()?22:-1),o(),O(a.hasFixedLength()?23:-1),o(2),C(m(26,105,"labels.inputs.Repayments")),o(4),C(m(30,107,"labels.inputs.Number of repayments")),o(2),x("matTooltip",ce(m(32,109,"tooltips.Enter the total count of repayments"))),o(2),O(a.loansAccountTermsForm.controls.numberOfRepayments.hasError("required")?33:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.canDefineInstallmentAmount?34:-1),o(3),C(m(38,111,"labels.inputs.First repayment on")),o(2),x("matTooltip",ce(m(40,113,"tooltips.May be entered to override")))("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(2),x("for",r),o(5),C(m(47,115,"labels.inputs.Interest charged from")),o(2),x("matTooltip",ce(m(49,117,"tooltips.May be entered to override the date")))("min",a.minDate)("max",a.maxDate)("matDatepicker",u),o(2),x("for",u),o(4),b(" ",m(55,119,"labels.heading.Repaid Every")," "),o(2),x("matTooltip",ce(m(57,121,"tooltips.Fields are input to calculating the repayment schedule"))),o(4),C(m(61,123,"labels.inputs.Repaid every")),o(2),x("matTooltip",ce(m(63,125,"tooltips.Fields are input to calculating the repayment schedule"))),o(2),O(a.loansAccountTermsForm.controls.repaymentEvery.hasError("required")?64:-1),o(3),C(m(68,127,"labels.inputs.Frequency")),o(3),ue(a.termFrequencyTypeData),o(2),O(a.loansAccountTermsForm.controls.repaymentFrequencyType.value===2?72:-1),o(),O(a.loansAccountTermsForm.controls.repaymentFrequencyType.value===2?73:-1),o(),O(a.productEnableDownPayment?74:-1),o(2),C(m(77,129,"labels.inputs.Nominal interest rate")),o(2),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isLoanProductLinkedToFloatingRate?-1:78),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isLoanProductLinkedToFloatingRate?79:-1),o(2),C(m(82,131,"labels.inputs.Loan Schedule")),o(2),O(a.loanScheduleType?83:-1),o(3),C(m(87,133,"labels.inputs.Repayment Strategy")),o(2),x("matTooltip",ce(m(89,135,"tooltips.The repayment strategy")))("disabled",a.repaymentStrategyDisabled),o(2),ue(a.transactionProcessingStrategyOptions),o(2),O(a.loansAccountTermsForm.controls.transactionProcessingStrategyCode.hasError("required")?92:-1),o(2),C(m(95,137,"labels.heading.Interest Calculations")),o(4),C(m(99,139,"labels.inputs.Interest calculation period")),o(2),x("matTooltip",ce(m(101,141,"tooltips.Daily - Will Calculate the interest"))),o(2),ue(a.interestCalculationPeriodTypeData),o(2),x("matTooltip",ce(m(105,143,"tooltips.To be used with SAME AS REPAYMENT PERIOD"))),o(3),C(m(108,145,"labels.inputs.Calculate interest for exact days in partial period")),o(2),O(a.isProgressive?109:-1),o(3),b("",m(113,147,"labels.inputs.Arrears tolerance")," "),o(2),x("matTooltip",ce(m(115,149,"tooltips.With Arrears tolerance"))),o(4),C(m(119,151,"labels.inputs.Interest free period")),o(2),x("matTooltip",ce(m(121,153,"tooltips.If the Interest Free Period"))),o(3),b(" ",m(124,155,"labels.heading.Moratorium")," "),o(2),x("matTooltip",ce(m(126,157,"tooltips.The moratorium information"))),o(4),C(m(130,159,"labels.inputs.Grace on principal payment")),o(5),C(m(135,161,"labels.inputs.Grace on interest payment")),o(5),C(m(140,163,"labels.inputs.On arrears ageing")),o(3),O(a.isDelinquencyEnabled()?142:-1),o(),O(a.isDelinquencyEnabled()?143:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isTopup?144:-1),o(5),C(m(150,165,"labels.inputs.Recalculate Interest")),o(3),C(m(153,167,a.loansAccountTermsData==null?null:a.loansAccountTermsData.isInterestRecalculationEnabled)),o(2),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?154:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?155:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?156:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled?157:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled&&a.loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id!==1?158:-1),o(4),C(m(163,169,"labels.inputs.Enable income capitalization")),o(3),C(m(166,171,a.enableIncomeCapitalization)),o(5),C(m(171,173,"labels.inputs.Enable Buy down fee")),o(3),C(m(174,175,a.enableBuyDownFee)),o(2),O(a.multiDisburseLoan?175:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled&&a.loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id!==0?176:-1),o(),O(a.loansAccountTermsData!=null&&a.loansAccountTermsData.isInterestRecalculationEnabled&&a.loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id!==0&&a.loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id!==1?177:-1),o(5),C(m(183,177,"labels.heading.Collaterals Data")),o(6),b("",m(189,179,"labels.buttons.Add")," "),o(2),x("dataSource",a.collateralDataSource),o(16),x("matHeaderRowDef",a.loanCollateralDisplayedColumns),o(),x("matRowDefColumns",a.loanCollateralDisplayedColumns),o(4),b(" ",m(212,181,"labels.buttons.Previous")," "),o(3),b(" ",m(215,183,"labels.buttons.Next")," "),o(3),O(a.loanId?217:-1)}},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Da,Bi,Oi,$o,qa,un,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,ja,mo,gn,Tt,wa,Op,Hr],styles:["h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0 2em}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var MI=()=>["../","general"];function OI(t,n){if(t&1&&(s(0,"mat-option",3),c(1),l()),t&2){let e=n.$implicit;x("value",e),o(),b(" ",e.name," ")}}function II(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function EI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||"")," ")}}function LI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Type")))}function kI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.chargeCalculationType.value," ")}}function FI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function NI(t,n){if(t&1){let e=Ct();s(0,"td",30),c(1),s(2,"button",31),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.editChargeAmount(a))}),P(3,"fa-icon",32),l()()}if(t&2){let e=n.$implicit;o(),b(" ",e.amount," ")}}function RI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Collected On")))}function BI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.chargeTimeType.value," ")}}function qI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Date")))}function zI(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.dueDate)||"Unassigned"," ")}}function jI(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function VI(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.N/A")," "))}function UI(t,n){if(t&1){let e=Ct();s(0,"button",31),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.editChargeDate(a))}),P(1,"fa-icon",32),l()}}function HI(t,n){if(t&1&&(s(0,"td",30),M(1,zI,3,3,"span"),M(2,jI,3,3,"span"),M(3,VI,3,3,"span"),M(4,UI,2,0,"button",33),l()),t&2){let e=n.$implicit;o(),O(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3),o(),O(e.chargeTimeType.value==="Weekly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"?4:-1)}}function GI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function WI(t,n){if(t&1){let e=Ct();s(0,"td",30)(1,"button",34),it("click",function(){let a=lt(e).$implicit,r=T();return st(r.deleteCharge(a))}),P(2,"fa-icon",35),l()()}}function $I(t,n){t&1&&P(0,"tr",36)}function YI(t,n){t&1&&P(0,"tr",37)}function KI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function ZI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),C(e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||""))}}function JI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Type")))}function XI(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeCalculationType.value)}}function QI(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function tE(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.amount))}}function eE(t,n){t&1&&(s(0,"th",29),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Collected On")))}function nE(t,n){if(t&1&&(s(0,"td",30),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeTimeType.value)}}function iE(t,n){t&1&&P(0,"tr",36)}function aE(t,n){t&1&&P(0,"tr",37)}function oE(t,n){t&1&&(s(0,"button",28),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,MI)),o(),b(" ",m(2,2,"labels.buttons.Cancel")," "))}var Eo=(()=>{class t{constructor(){this.dialog=A(Gn),this.dateUtils=A(me),this.route=A(It),this.settingsService=A(oe),this.chargesDataSource=[],this.overDueChargesDataSource=[],this.collateralDataSource=[],this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date","action"],this.overdueChargesDisplayedColumns=["name","type","amount","collectedon"],this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name","purpose","amount"],this.pristine=!0,this.isCollateralSufficient=!1,this.totalCollateralValue=0,this.loanId=null,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.loansAccountTemplate&&this.loansAccountTemplate.charges&&(this.chargesDataSource=this.loansAccountTemplate.charges.map(e=>Se(ie({},e),{id:e.id,chargeId:e.chargeId}))||[]),this.dataSource=new Li(this.activeClientMembers)}ngOnChanges(){if(this.loansAccountProductTemplate){this.loanPurposeOptions=this.loansAccountProductTemplate.loanPurposeOptions,this.chargeData=this.loansAccountProductTemplate.chargeOptions;let e=this.loansAccountTemplate?.gsimData?.groupId!=null;!this.loansSavingsAccountLinked&&!e&&(this.chargeData=this.chargeData.filter(a=>a.chargePaymentMode?.value!="Account transfer")),this.loansAccountProductTemplate.overdueCharges&&(this.overDueChargesDataSource=this.loansAccountProductTemplate.overdueCharges);let i=this.loanId!=null;this.loansAccountProductTemplate.charges&&this.loansAccountProductTemplate.charges.length>0&&this.chargesDataSource.length===0?this.chargesDataSource=this.loansAccountProductTemplate.charges.map(a=>Se(ie({},a),{chargeId:a.chargeId||a.id}))||[]:i&&this.loansAccountTemplate&&this.loansAccountTemplate.charges&&(this.chargesDataSource=this.loansAccountTemplate.charges.map(a=>Se(ie({},a),{id:a.id,chargeId:a.chargeId}))||[])}}addCharge(e){let i=Se(ie({},e.value),{chargeId:e.value.id||e.value.chargeId});this.chargesDataSource=this.chargesDataSource.concat([i]),e.value="",this.pristine=!1}editChargeAmount(e){let i=[new Pi({controlName:"amount",label:"Amount",value:e.amount,type:"number",required:!1})],a={title:"Edit Charge Amount",layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=Se(ie({},e),{amount:u.data.value.amount});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,d),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeDate(e){let i=[new sa({controlName:"date",label:"Date",value:e.dueDate||e.feeOnMonthDay||"",type:"datetime-local",required:!1})],a={title:"Edit Charge Date",layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d,g=this.settingsService.dateFormat,_=this.dateUtils.formatDate(u.data.value.date,g);switch(e.chargeTimeType.value){case"Specified due date":case"Weekly Fee":d=Se(ie({},e),{dueDate:_});break;case"Annual Fee":d=Se(ie({},e),{feeOnMonthDay:_});break}this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,d),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}editChargeFeeInterval(e){let i=[new Pi({controlName:"feeInterval",label:"Fee Interval",value:e.feeInterval,type:"text",required:!1})],a={title:"Edit Charge Fee Interval",layout:{addButtonText:"Confirm"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data){let d=Se(ie({},e),{feeInterval:u.data.value.feeInterval});this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1,d),this.chargesDataSource=this.chargesDataSource.concat([])}}),this.pristine=!1}deleteCharge(e){this.dialog.open(la,{data:{deleteContext:`charge ${e.name}`}}).afterClosed().subscribe(a=>{a.delete&&(this.chargesDataSource.splice(this.chargesDataSource.indexOf(e),1),this.chargesDataSource=this.chargesDataSource.concat([]),this.pristine=!1)})}get isValid(){return!0}get loansAccountCharges(){return{charges:this.getUniqueCharges(this.chargesDataSource).map(i=>Se(ie({},i),{chargeId:i.chargeId??i.id}))}}getUniqueCharges(e){let i=new Map;for(let a of e??[]){let r=a.chargeId??a.id;r!=null&&i.set(r,Se(ie({},a),{chargeId:r}))}return Array.from(i.values())}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(i=>i.selected).length===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-charges-step"]],inputs:{loansAccountProductTemplate:"loansAccountProductTemplate",loansAccountTemplate:"loansAccountTemplate",loansAccountFormValid:"loansAccountFormValid",activeClientMembers:"activeClientMembers",loansSavingsAccountLinked:"loansSavingsAccountLinked"},features:[Vr],decls:64,vars:24,consts:[["charge",""],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[3,"value"],[1,"flex-48","align-center"],["type","button","mat-raised-button","","color","primary",3,"click","disabled"],["icon","plus",1,"m-r-10"],["mat-table","",1,"flex-98","mat-elevation-z1",3,"dataSource","hidden"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],["matColumnDef","action"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"flex-98"],[1,"mat-h4","flex-98"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","type"],["matColumnDef","collectedon"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary",3,"click"],["icon","pen"],["mat-icon-button","","color","primary"],["mat-icon-button","","color","warn",3,"click"],["icon","trash"],["mat-header-row",""],["mat-row",""]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",null,0),de(7,OI,2,2,"mat-option",3,xe),l()(),s(9,"div",4)(10,"button",5),it("click",function(){lt(r);let d=Et(6);return st(a.addCharge(d))}),P(11,"fa-icon",6),c(12),p(13,"translate"),l()(),s(14,"table",7),X(15,8),F(16,II,3,3,"th",9)(17,EI,2,1,"td",10),Q(),X(18,11),F(19,LI,3,3,"th",9)(20,kI,2,1,"td",10),Q(),X(21,12),F(22,FI,3,3,"th",9)(23,NI,4,1,"td",10),Q(),X(24,13),F(25,RI,3,3,"th",9)(26,BI,2,1,"td",10),Q(),X(27,14),F(28,qI,3,3,"th",9)(29,HI,5,4,"td",10),Q(),X(30,15),F(31,GI,3,3,"th",9)(32,WI,3,0,"td",10),Q(),F(33,$I,1,0,"tr",16)(34,YI,1,0,"tr",17),l(),P(35,"mat-divider",18),s(36,"h4",19),c(37),p(38,"translate"),l(),s(39,"table",20),X(40,8),F(41,KI,3,3,"th",9)(42,ZI,2,1,"td",10),Q(),X(43,21),F(44,JI,3,3,"th",9)(45,XI,2,1,"td",10),Q(),X(46,12),F(47,QI,3,3,"th",9)(48,tE,3,3,"td",10),Q(),X(49,22),F(50,eE,3,3,"th",9)(51,nE,2,1,"td",10),Q(),F(52,iE,1,0,"tr",16)(53,aE,1,0,"tr",17),l()(),s(54,"div",23)(55,"button",24),P(56,"fa-icon",25),c(57),p(58,"translate"),l(),s(59,"button",26),c(60),p(61,"translate"),P(62,"fa-icon",27),l(),M(63,oE,3,5,"button",28),l()}if(i&2){let r=Et(6);o(3),C(m(4,14,"labels.inputs.Charge")),o(4),ue(a.chargeData),o(3),x("disabled",!r.value),o(2),b(" ",m(13,16,"labels.buttons.Add")," "),o(2),x("dataSource",a.chargesDataSource)("hidden",a.chargesDataSource.length===0),o(19),x("matHeaderRowDef",a.chargesDisplayedColumns),o(),x("matRowDefColumns",a.chargesDisplayedColumns),o(3),C(m(38,18,"labels.heading.Overdue Charges")),o(2),x("dataSource",a.overDueChargesDataSource),o(13),x("matHeaderRowDef",a.overdueChargesDisplayedColumns),o(),x("matRowDefColumns",a.overdueChargesDisplayedColumns),o(4),b(" ",m(58,20,"labels.buttons.Previous")," "),o(3),b(" ",m(61,22,"labels.buttons.Next")," "),o(3),O(a.loanId?63:-1)}},dependencies:[wt,Pt,ae,Ce,_e,En,In,Gt,un,_n,vn,bn,xn,Cn,yn,qa,Sn,wn,Dn,Pn,$o,ja,mo,gn,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.tableName[_ngcontent-%COMP%]{padding-left:2%}"]})}}return t})();function rE(t,n){if(t&1&&(s(0,"mat-option",14),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.value," ")}}function lE(t,n){if(t&1&&(s(0,"mat-select",11),de(1,rE,2,2,"mat-option",14,xe),l()),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName)),o(),ue(e.columnValues)}}function sE(t,n){if(t&1&&P(0,"input",12),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName))}}function cE(t,n){if(t&1&&P(0,"input",13),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName))}}function pE(t,n){if(t&1&&P(0,"textarea",13),t&2){let e=T(2).$implicit;x("formControlName",ce(e.controlName))}}function mE(t,n){if(t&1){let e=Ct();s(0,"span",15),it("click",function(){lt(e);let a=Et(4);return st(a.open())}),P(1,"input",16)(2,"mat-datepicker-toggle",17)(3,"mat-datepicker",null,0),l()}if(t&2){let e=Et(4),i=T(2).$implicit;o(),x("formControlName",ce(i.controlName))("matDatepicker",e),o(),x("for",e)}}function dE(t,n){if(t&1&&(s(0,"mat-form-field",9)(1,"mat-label"),c(2),l(),M(3,lE,3,2,"mat-select",11),M(4,sE,1,2,"input",12),M(5,cE,1,2,"input",13),M(6,pE,1,2,"textarea",13),M(7,mE,5,4,"span"),l()),t&2){let e=T().$implicit,i=T();o(2),C(i.getInputName(e)),o(),O(i.isDropdown(e.columnDisplayType)?3:-1),o(),O(i.isNumeric(e.columnDisplayType)?4:-1),o(),O(i.isString(e.columnDisplayType)?5:-1),o(),O(i.isText(e.columnDisplayType)?6:-1),o(),O(i.isDate(e.columnDisplayType)?7:-1)}}function uE(t,n){if(t&1&&(s(0,"mat-checkbox",10),c(1),l()),t&2){let e=T().$implicit,i=T();x("formControlName",ce(e.controlName)),o(),b(" ",i.getInputName(e)," ")}}function fE(t,n){if(t&1&&(s(0,"div",3),M(1,dE,8,6,"mat-form-field",9),M(2,uE,2,3,"mat-checkbox",10),l()),t&2){let e=n.$implicit,i=T();o(),O(i.isBoolean(e.columnDisplayType)?-1:1),o(),O(i.isBoolean(e.columnDisplayType)?2:-1)}}var Ds=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.settingsService=A(oe),this.dateUtils=A(me),this.datatableInputs=[]}ngOnInit(){this.datatableInputs=this.datatableData.columnHeaderData.filter(i=>i.columnName!=="id"&&i.columnName!=="loan_id"&&i.columnName!=="created_at"&&i.columnName!=="updated_at");let e={};this.datatableInputs.forEach(i=>{i.controlName=this.getInputName(i),i.isColumnNullable?e[i.controlName]=new pe(""):this.isNumeric(i.columnDisplayType)?e[i.controlName]=new pe(0,[Wt.required]):e[i.controlName]=new pe("",[Wt.required])}),this.datatableForm=this.formBuilder.group(e)}getInputName(e){return e.columnName&&e.columnName.includes("_cd_")?e.columnName.split("_cd_")[0]:e.columnName}isNumeric(e){return this.isColumnType(e,"INTEGER")||this.isColumnType(e,"DECIMAL")}isDate(e){return this.isColumnType(e,"DATE")||this.isColumnType(e,"DATETIME")}isBoolean(e){return this.isColumnType(e,"BOOLEAN")}isDropdown(e){return this.isColumnType(e,"CODELOOKUP")}isString(e){return this.isColumnType(e,"STRING")}isText(e){return this.isColumnType(e,"TEXT")}isColumnType(e,i){return e===i}get payload(){let e=this.settingsService.dateFormat,i=this.datatableForm.value,a={locale:this.settingsService.language.code},r=!1;return this.datatableInputs.forEach(d=>{let g=this.getInputName(d);this.isNumeric(d.columnDisplayType)?a[d.columnName]=i[g]*1:this.isDate(d.columnDisplayType)?(a[d.columnName]=this.dateUtils.formatDate(i[g],e),r=!0):a[d.columnName]=i[g]}),r&&(a.dateFormat=e),{registeredTableName:this.datatableData.registeredTableName,data:a}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-datatable-step"]],inputs:{datatableData:"datatableData"},decls:13,vars:7,consts:[["datePicker",""],[3,"formGroup"],[1,"layout-row-wrap","gap-2px","responsive-column"],[1,"flex-48"],[1,"layout-row","align-center","gap-2percent","margin-t","responsive-column"],["mat-raised-button","","matStepperPrevious","","disabled",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],[1,"flex-100"],["labelPosition","before",1,"margin-v",3,"formControlName"],[3,"formControlName"],["matInput","","type","number",3,"formControlName"],["matInput","",3,"formControlName"],[3,"value"],[3,"click"],["matInput","",1,"date-picker",3,"matDatepicker","formControlName"],["matSuffix","",3,"for"]],template:function(i,a){i&1&&(s(0,"form",1)(1,"div",2),de(2,fE,3,2,"div",3,xe),l(),s(4,"div",4)(5,"button",5),P(6,"fa-icon",6),c(7),p(8,"translate"),l(),s(9,"button",7),c(10),p(11,"translate"),P(12,"fa-icon",8),l()()()),i&2&&(x("formGroup",a.datatableForm),o(2),ue(a.datatableInputs),o(5),b(" ",m(8,3,"labels.buttons.Previous")," "),o(3),b(" ",m(11,5,"labels.buttons.Next")," "))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,ke,Fe,Ce,_e,Je,Ae,En,In,en,nn,tn,Gt,Da,ja,un,mo,Tt],styles:[".date-picker[_ngcontent-%COMP%]{width:92%}mat-checkbox[_ngcontent-%COMP%]{margin-top:30px}"]})}}return t})();var hE=()=>["../","general"];function gE(t,n){t&1&&(s(0,"button",9),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,hE)),o(),b(" ",m(2,2,"labels.buttons.Cancel")," "))}var el=(()=>{class t{constructor(){this.loansService=A(At),this.settingsService=A(oe),this.route=A(It),this.repaymentScheduleDetails=null,this.loanId=null,this.loanId=this.route.snapshot.params.loanId}showRepaymentInfo(){this.repaymentScheduleDetails=null;let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a=this.loansService.buildLoanRequestPayload(this.loansAccount,this.loansAccountTemplate,this.loansAccountProductTemplate.calendarOptions,e,i);delete a.enableInstallmentLevelDelinquency,delete a.externalId,this.loansService.calculateLoanSchedule(a).subscribe(r=>{this.repaymentScheduleDetails=r})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-schedule-step"]],inputs:{currencyCode:"currencyCode",loansAccountTemplate:"loansAccountTemplate",loansAccountProductTemplate:"loansAccountProductTemplate",loansAccount:"loansAccount"},decls:16,vars:12,consts:[[1,"layout-row-wrap","responsive-column"],["mat-flat-button","","color","primary",3,"click"],["icon","calendar",1,"m-r-10"],[1,"flex-100",3,"repaymentScheduleDetails","currencyCode"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext",""],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"button",1),it("click",function(){return a.showRepaymentInfo()}),P(2,"fa-icon",2),c(3),p(4,"translate"),l(),P(5,"mifosx-repayment-schedule-tab",3),l(),s(6,"div",4)(7,"button",5),P(8,"fa-icon",6),c(9),p(10,"translate"),l(),s(11,"button",7),c(12),p(13,"translate"),P(14,"fa-icon",8),l(),M(15,gE,3,5,"button",9),l()),i&2&&(o(3),b("",m(4,6,"labels.inputs.Generate Repayment Schedule")," "),o(2),x("repaymentScheduleDetails",a.repaymentScheduleDetails)("currencyCode",a.currencyCode),o(4),b(" ",m(10,8,"labels.buttons.Previous")," "),o(3),b(" ",m(13,10,"labels.buttons.Next")," "),o(3),O(a.loanId?15:-1))},dependencies:[wt,Pt,ae,Gt,un,ho,ja,mo,Tt],encapsulation:2})}}return t})();var _E=()=>["../.."];function CE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"find"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Loan officer"),":"),o(3),C(Ye(6,4,e.loansAccount.loanOfficerId,e.loansAccountProductTemplate.loanOfficerOptions,"id","displayName"))}}function bE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"find"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Loan purpose"),":"),o(3),C(Ye(6,4,e.loansAccount.loanPurposeId,e.loansAccountProductTemplate.loanPurposeOptions,"id","name"))}}function vE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"find"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Fund"),":"),o(3),C(Ye(6,4,e.loansAccount.fundId,e.loansAccountProductTemplate.fundOptions,"id","name"))}}function xE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),P(5,"mifosx-external-identifier",16),l()()),t&2){let e=T();o(2),b("",m(3,3,"labels.inputs.External id"),":"),o(3),x("externalId",ce(e.loansAccount.externalId))}}function yE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client ID")))}function SE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),C(e.id)}}function DE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Name")))}function wE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),C(e.displayName)}}function PE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Purpose")))}function TE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),C(e.purpose)}}function AE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Original Loan")))}function ME(t,n){if(t&1&&(s(0,"td",27),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.principal,i.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," ")}}function OE(t,n){t&1&&P(0,"tr",28)}function IE(t,n){t&1&&P(0,"tr",29)}function EE(t,n){if(t&1&&(s(0,"h3",7),c(1),p(2,"translate"),l(),P(3,"mat-divider",3),s(4,"div",5)(5,"table",17,0),X(7,18),F(8,yE,3,3,"th",19)(9,SE,2,1,"td",20),Q(),X(10,21),F(11,DE,3,3,"th",19)(12,wE,2,1,"td",20),Q(),X(13,22),F(14,PE,3,3,"th",19)(15,TE,2,1,"td",20),Q(),X(16,23),F(17,AE,3,3,"th",19)(18,ME,3,6,"td",20),Q(),F(19,OE,1,0,"tr",24)(20,IE,1,0,"tr",25),l()()),t&2){let e=T();o(),C(m(2,4,"labels.heading.Client Members")),o(4),x("dataSource",e.dataSource),o(14),x("matHeaderRowDef",e.membersDisplayedColumns),o(),x("matRowDefColumns",e.membersDisplayedColumns)}}function LE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"yesNo"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Enable Down Payments"),":"),o(3),C(m(6,4,e.loansAccount.enableDownPayment))}}function kE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"dateFormat"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.First repayment on"),":"),o(3),C(m(6,4,e.loansAccount.repaymentsStartingFromDate))}}function FE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"dateFormat"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Interest charged from"),":"),o(3),C(m(6,4,e.loansAccount.interestChargedFromDate))}}function NE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,3,"labels.inputs.Nominal interest rate"),":"),o(3),$t("",e.loansAccount.interestRatePerPeriod,"\xA0\xA0",e.loansAccountProductTemplate.interestRateFrequencyType.value)}}function RE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Interest method"),": "),o(3),C(e.loansAccount.interestType)}}function BE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Is Equal Amortization"),":"),o(3),C(e.loansAccount.isEqualAmortization)}}function qE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Calculate interest for exact days in partial period"),":"),o(3),C(e.loansAccount.allowPartialPeriodInterestCalculation)}}function zE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Arrears tolerance"),": "),o(3),C(e.loansAccount.inArrearsTolerance)}}function jE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Interest free period"),": "),o(3),C(e.loansAccount.graceOnInterestCharged)}}function VE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.On principal payment"),": "),o(3),C(e.loansAccount.graceOnPrincipalPayment)}}function UE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.On interest payment"),": "),o(3),C(e.loansAccount.graceOnInterestPayment)}}function HE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.On Arrears Aging"),": "),o(3),C(e.loansAccount.graceOnArrearsAgeing)}}function GE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Is Topup Loan"),"? "),o(3),C(e.loansAccount.isTopup)}}function WE(t,n){if(t&1&&(s(0,"div",3)(1,"span",4),c(2),p(3,"translate"),l(),s(4,"span",5),c(5),p(6,"translateKey"),l()()),t&2){let e=T();o(2),b("",m(3,2,"labels.inputs.Days in month"),": "),o(3),C(Ee(6,4,e.loansAccountProductTemplate==null?null:e.loansAccountProductTemplate.daysInMonthType.value,"catalogs"))}}function $E(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function YE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||"")," ")}}function KE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Type")))}function ZE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.chargeCalculationType.value," ")}}function JE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function XE(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.amount," ")}}function QE(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Collected On")))}function t7(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.chargeTimeType.value," ")}}function e7(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Date")))}function n7(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.dueDate)||"Unassigned"," ")}}function i7(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.feeOnMonthDay)||"Unassigned"," ")}}function a7(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.inputs.N/A")," "))}function o7(t,n){if(t&1&&(s(0,"td",27),M(1,n7,3,3,"span"),M(2,i7,3,3,"span"),M(3,a7,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?1:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"?2:-1),o(),O(e.chargeTimeType.value==="Monthly Fee"||e.chargeTimeType.value==="Annual Fee"||e.chargeTimeType.value==="Specified due date"||e.chargeTimeType.value==="Weekly Fee"?-1:3)}}function r7(t,n){t&1&&P(0,"tr",28)}function l7(t,n){t&1&&P(0,"tr",29)}function s7(t,n){if(t&1&&(s(0,"div",9)(1,"h3",2),c(2),p(3,"translate"),l(),P(4,"mat-divider",3),s(5,"table",30),X(6,21),F(7,$E,3,3,"th",19)(8,YE,2,1,"td",20),Q(),X(9,31),F(10,KE,3,3,"th",19)(11,ZE,2,1,"td",20),Q(),X(12,32),F(13,JE,3,3,"th",19)(14,XE,2,1,"td",20),Q(),X(15,33),F(16,QE,3,3,"th",19)(17,t7,2,1,"td",20),Q(),X(18,34),F(19,e7,3,3,"th",19)(20,o7,4,3,"td",20),Q(),F(21,r7,1,0,"tr",24)(22,l7,1,0,"tr",25),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Charges")),o(3),x("dataSource",e.loansAccount.charges),o(16),x("matHeaderRowDef",e.chargesDisplayedColumns),o(),x("matRowDefColumns",e.chargesDisplayedColumns)}}function c7(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.name")))}function p7(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),C(e.name+", "+((e.currency==null?null:e.currency.displaySymbol)||""))}}function m7(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Type")))}function d7(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeCalculationType.value)}}function u7(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function f7(t,n){if(t&1&&(s(0,"td",27),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.amount))}}function h7(t,n){t&1&&(s(0,"th",26),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Collected On")))}function g7(t,n){if(t&1&&(s(0,"td",27),c(1),l()),t&2){let e=n.$implicit;o(),C(e.chargeTimeType.value)}}function _7(t,n){t&1&&P(0,"tr",28)}function C7(t,n){t&1&&P(0,"tr",29)}function b7(t,n){if(t&1&&(s(0,"div",10)(1,"h3",35),c(2),p(3,"translate"),l(),P(4,"mat-divider",36),s(5,"table",37),X(6,21),F(7,c7,3,3,"th",19)(8,p7,2,1,"td",20),Q(),X(9,38),F(10,m7,3,3,"th",19)(11,d7,2,1,"td",20),Q(),X(12,32),F(13,u7,3,3,"th",19)(14,f7,3,3,"td",20),Q(),X(15,39),F(16,h7,3,3,"th",19)(17,g7,2,1,"td",20),Q(),F(18,_7,1,0,"tr",24)(19,C7,1,0,"tr",25),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Overdue Charges")),o(3),x("dataSource",e.loansAccountProductTemplate.overdueCharges),o(13),x("matHeaderRowDef",e.overdueChargesDisplayedColumns),o(),x("matRowDefColumns",e.overdueChargesDisplayedColumns)}}var nl=(()=>{class t{constructor(){this.loansAccountTemplate=[],this.submitEvent=new Kl,this.chargesDisplayedColumns=["name","chargeCalculationType","amount","chargeTimeType","date"],this.overdueChargesDisplayedColumns=["name","type","amount","collectedon"],this.membersDisplayedColumns=["id","name","purpose","principal"],this.loanPurposeOptions=[],this.productEnableDownPayment=!1}ngOnChanges(e){this.productEnableDownPayment=this.loansAccountProductTemplate.product.enableDownPayment,this.activeClientMembers&&(this.loanPurposeOptions=this.loansAccountProductTemplate.loanPurposeOptions,this.dataSource=new Li(this.activeClientMembers.filter(i=>i.selected).map(i=>Se(ie({},i),{purpose:this.loanPurposeOptions.find(a=>a.id===i.loanPurposeId)?.name}))),this.loansAccount.principalAmount=this.activeClientMembers.filter(i=>i.selected).reduce((i,a)=>i+(a.principal??0),0))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-account-preview-step"]],inputs:{loansAccountTemplate:"loansAccountTemplate",loansAccountProductTemplate:"loansAccountProductTemplate",loansAccount:"loansAccount",activeClientMembers:"activeClientMembers"},outputs:{submitEvent:"submitEvent"},features:[Vr],decls:148,vars:170,consts:[["membersTable",""],[1,"content","responsive-column"],[1,"mat-h3","flex-fill"],[1,"flex-fill"],[1,"flex-40"],[1,"flex-60"],[3,"chars","textValue"],[1,"mat-h3","margin-t","flex-fill"],[1,"m-l-5"],[1,"layout-row-wrap","responsive-column","flex-fill","margin-t"],[1,"flex-fill","layout-row-wrap","layout-xs-column","margin-t"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"click"],[3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","purpose"],["matColumnDef","principal"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["mat-table","",1,"flex-fill","mat-elevation-z1",3,"dataSource"],["matColumnDef","chargeCalculationType"],["matColumnDef","amount"],["matColumnDef","chargeTimeType"],["matColumnDef","date"],[1,"mat-h3","flex-98"],[1,"flex-98"],["mat-table","",1,"mat-elevation-z1",3,"dataSource"],["matColumnDef","type"],["matColumnDef","collectedon"]],template:function(i,a){i&1&&(s(0,"div",1)(1,"h3",2),c(2),p(3,"translate"),l(),s(4,"div",3)(5,"span",4),c(6),p(7,"translate"),l(),s(8,"span",5),P(9,"mifosx-long-text",6),p(10,"find"),l()(),M(11,CE,7,9,"div",3),M(12,bE,7,9,"div",3),M(13,vE,7,9,"div",3),s(14,"div",3)(15,"span",4),c(16),p(17,"translate"),l(),s(18,"span",5),c(19),p(20,"dateFormat"),l()(),s(21,"div",3)(22,"span",4),c(23),p(24,"translate"),l(),s(25,"span",5),c(26),p(27,"dateFormat"),l()(),M(28,xE,6,5,"div",3),M(29,EE,21,6),s(30,"h3",7),c(31),p(32,"translate"),l(),P(33,"mat-divider",3),s(34,"div",3)(35,"span",4),c(36),p(37,"translate"),l(),s(38,"span",5),c(39),p(40,"currency"),s(41,"span",8),c(42),l()()(),s(43,"div",3)(44,"span",4),c(45),p(46,"translate"),l(),s(47,"span",5),c(48),p(49,"find"),l()(),s(50,"div",3)(51,"span",4),c(52),p(53,"translate"),l(),s(54,"span",5),c(55),l()(),s(56,"div",3)(57,"span",4),c(58),p(59,"translate"),l(),s(60,"span",5),c(61),p(62,"find"),p(63,"find"),p(64,"find"),l()(),M(65,LE,7,6,"div",3),M(66,kE,7,6,"div",3),M(67,FE,7,6,"div",3),M(68,NE,6,5,"div",3),M(69,RE,6,4,"div",3),M(70,BE,6,4,"div",3),s(71,"div",3)(72,"span",4),c(73),p(74,"translate"),l(),s(75,"span",5),c(76),p(77,"find"),p(78,"translateKey"),l()(),s(79,"div",3)(80,"span",4),c(81),p(82,"translate"),l(),s(83,"span",5),c(84),p(85,"find"),p(86,"translateKey"),l()(),M(87,qE,6,4,"div",3),M(88,zE,6,4,"div",3),M(89,jE,6,4,"div",3),s(90,"div",3)(91,"span",4),c(92),p(93,"translate"),l(),s(94,"span",5),c(95),p(96,"find"),p(97,"translateKey"),l()(),s(98,"div",3)(99,"span",4),c(100),p(101,"translate"),l(),s(102,"span",5),c(103),p(104,"formatNumber"),l()(),s(105,"div",3)(106,"span",4),c(107),p(108,"translate"),l(),s(109,"span",5),c(110),p(111,"formatNumber"),l()(),s(112,"h3",7),c(113),p(114,"translate"),l(),P(115,"mat-divider",3),M(116,VE,6,4,"div",3),M(117,UE,6,4,"div",3),M(118,HE,6,4,"div",3),s(119,"div",3)(120,"span",4),c(121),p(122,"translate"),l(),s(123,"span",5),c(124),p(125,"yesNo"),l()(),M(126,GE,6,4,"div",3),s(127,"div",3)(128,"span",4),c(129),p(130,"translate"),l(),s(131,"span",5),c(132),p(133,"yesNo"),l()(),M(134,WE,7,7,"div",3),M(135,s7,23,6,"div",9),M(136,b7,20,6,"div",10),l(),s(137,"div",11)(138,"button",12),P(139,"fa-icon",13),c(140),p(141,"translate"),l(),s(142,"button",14),c(143),p(144,"translate"),l(),s(145,"button",15),it("click",function(){return a.submitEvent.emit()}),c(146),p(147,"translate"),l()()),i&2&&(o(2),C(m(3,63,"labels.heading.Details")),o(4),b("",m(7,65,"labels.inputs.Product"),":"),o(3),x("textValue",Uf(` - `,Ye(10,67,a.loansAccount.productId,a.loansAccountTemplate.productOptions,"id","name")))("chars",60),o(2),O(a.loansAccount.loanOfficerId?11:-1),o(),O(a.loansAccount.loanPurposeId?12:-1),o(),O(a.loansAccount.fundId?13:-1),o(3),b("",m(17,72,"labels.inputs.Submitted on"),":"),o(3),C(m(20,74,a.loansAccount.submittedOnDate)),o(4),b("",m(24,76,"labels.inputs.Disbursement on"),":"),o(3),C(m(27,78,a.loansAccount.expectedDisbursementDate)),o(2),O(a.loansAccount.externalId?28:-1),o(),O(a.activeClientMembers?29:-1),o(2),C(m(32,80,"labels.heading.Terms")),o(5),b("",m(37,82,"labels.inputs.Principal"),":"),o(3),b(" ",Ye(40,84,a.loansAccount.principalAmount,a.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," "),o(3),C(a.loansAccountProductTemplate.currency.code),o(3),b("",m(46,89,"labels.inputs.Loan Term"),":"),o(3),$t("",a.loansAccount.loanTermFrequency," ",Ye(49,91,a.loansAccount.loanTermFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")),o(4),b("",m(53,96,"labels.inputs.Number of repayments"),":"),o(3),C(a.loansAccount.numberOfRepayments),o(3),b("",m(59,98,"labels.inputs.Repaid every"),":"),o(3),Zl("",a.loansAccount.repaymentEvery," ",Ye(62,100,a.loansAccount.repaymentFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")," ",Ye(63,105,a.loansAccount.repaymentFrequencyNthDayType,a.loansAccountProductTemplate.repaymentFrequencyNthDayTypeOptions,"id","name")," ",Ye(64,110,a.loansAccount.repaymentFrequencyDayOfWeekType,a.loansAccountProductTemplate.repaymentFrequencyDaysOfWeekTypeOptions,"id","name")),o(4),O(a.productEnableDownPayment?65:-1),o(),O(a.loansAccount.repaymentsStartingFromDate?66:-1),o(),O(a.loansAccount.interestChargedFromDate?67:-1),o(),O(a.loansAccount.interestRatePerPeriod?68:-1),o(),O(a.loansAccount.interestType?69:-1),o(),O(a.loansAccount.isEqualAmortization?70:-1),o(3),C(m(74,115,"labels.inputs.Amortization")),o(3),C(Ee(78,122,Ye(77,117,a.loansAccount.amortizationType,a.loansAccountProductTemplate.amortizationTypeOptions,"id","value"),"catalogs")),o(5),b("",m(82,125,"labels.inputs.Interest calculation period"),": "),o(3),C(Ee(86,132,Ye(85,127,a.loansAccount.interestCalculationPeriodType,a.loansAccountProductTemplate.interestCalculationPeriodTypeOptions,"id","value"),"catalogs")),o(3),O(a.loansAccount.allowPartialPeriodInterestCalculation?87:-1),o(),O(a.loansAccount.inArrearsTolerance?88:-1),o(),O(a.loansAccount.graceOnInterestCharged?89:-1),o(3),b("",m(93,135,"labels.inputs.Repayment strategy"),": "),o(3),C(Ee(97,142,Ye(96,137,a.loansAccount.transactionProcessingStrategyCode,a.loansAccountProductTemplate.transactionProcessingStrategyOptions,"code","name"),"catalogs")),o(5),b(" ",m(101,145,"labels.inputs.Installment Amount")," "),o(3),b(" ",m(104,147,a.loansAccount.fixedEmiAmount)," "),o(4),b(" ",m(108,149,"labels.inputs.Balloon Repayment Amount")," "),o(3),b(" ",m(111,151,a.loansAccount.balloonRepaymentAmount)," "),o(3),C(m(114,153,"labels.heading.Moratorium")),o(3),O(a.loansAccount.graceOnPrincipalPayment?116:-1),o(),O(a.loansAccount.graceOnInterestPayment?117:-1),o(),O(a.loansAccount.graceOnArrearsAgeing?118:-1),o(3),b(" ",m(122,155,"labels.inputs.Enable installment level Delinquency")," "),o(3),b(" ",m(125,157,a.loansAccount.enableInstallmentLevelDelinquency)," "),o(2),O(a.loansAccount.isTopup?126:-1),o(3),b("",m(130,159,"labels.inputs.Recalculate Interest"),": "),o(3),C(m(133,161,a.loansAccountProductTemplate==null?null:a.loansAccountProductTemplate.isInterestRecalculationEnabled)),o(2),O(a.loansAccountProductTemplate!=null&&a.loansAccountProductTemplate.daysInMonthType?134:-1),o(),O(a.loansAccount.charges.length?135:-1),o(),O(a.loansAccountProductTemplate.overdueCharges.length?136:-1),o(4),b(" ",m(141,163,"labels.buttons.Previous")," "),o(2),x("routerLink",Ut(169,_E)),o(),b(" ",m(144,165,"labels.buttons.Cancel")," "),o(3),b(" ",m(147,167,"labels.buttons.Submit")," "))},dependencies:[wt,Pt,ae,Gt,Ep,Va,$o,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,ja,un,Sa,gn,Tt,wa,Op,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var v7=["dtloan"];function x7(t,n){t&1&&P(0,"fa-icon",20)}function y7(t,n){t&1&&P(0,"fa-icon",20)}function S7(t,n){t&1&&P(0,"fa-icon",21)}function D7(t,n){t&1&&P(0,"fa-icon",22)}function w7(t,n){t&1&&P(0,"fa-icon",23)}function P7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.DETAILS"))}function T7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.TERMS"))}function A7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.CHARGES"))}function M7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function O7(t,n){if(t&1&&(s(0,"mat-step",18),F(1,M7,2,3,"ng-template",14),P(2,"mifosx-loans-account-schedule-step",24,4),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function I7(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;C(e.registeredTableName)}}function E7(t,n){if(t&1&&(s(0,"mat-step"),F(1,I7,1,1,"ng-template",14),P(2,"mifosx-loans-account-datatable-step",25,5),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function L7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.PREVIEW"))}function k7(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),F(1,L7,2,3,"ng-template",14),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var f0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid}get loansSavingsAccountLinked(){return this.loansAccountDetailsStep.loansAccountDetailsForm.get("linkAccountId").value}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a=this.loansService.buildLoanRequestPayload(this.loansAccount,this.loansAccountTemplate,this.loansAccountProductTemplate.calendarOptions,e,i);if(this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.length>0){let r=[];this.loanDatatables.forEach(u=>{r.push(u.payload)}),a.datatables=r}this.loansService.createLoansAccount(a).subscribe(r=>{this.router.navigate(["../",r.resourceId,"general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-loans-account"]],viewQuery:function(i,a){if(i&1&&(ri(Oo,7),ri(Io,7),ri(Eo,7),ri(v7,5)),i&2){let r;li(r=si())&&(a.loansAccountDetailsStep=r.first),li(r=si())&&(a.loansAccountTermsStep=r.first),li(r=si())&&(a.loansAccountChargesStep=r.first),li(r=si())&&(a.loanDatatables=r)}},decls:24,vars:15,consts:[["loansAccountStepper",""],["loansAccountDetailsForm",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid","loansSavingsAccountLinked"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",6)(1,"mat-stepper",7,0),F(3,x7,1,0,"ng-template",8)(4,y7,1,0,"ng-template",9)(5,S7,1,0,"ng-template",10)(6,D7,1,0,"ng-template",11)(7,w7,1,0,"ng-template",12),s(8,"mat-step",13),F(9,P7,2,3,"ng-template",14),s(10,"mifosx-loans-account-details-step",15,1),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(12,"mat-step",13),F(13,T7,2,3,"ng-template",14),P(14,"mifosx-loans-account-terms-step",16,2),l(),s(16,"mat-step"),F(17,A7,2,3,"ng-template",14),P(18,"mifosx-loans-account-charges-step",17,3),l(),M(20,O7,4,4,"mat-step",18),de(21,E7,4,1,"mat-step",null,xe),M(23,k7,3,3,"mat-step",19),l()()}if(i&2){let r=Et(11);o(),x("linear",!1),o(7),x("stepControl",r),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(2),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid)("loansSavingsAccountLinked",a.loansSavingsAccountLinked),o(2),O(a.loansAccountFormValid?20:-1),o(),ue(a.datatables),o(2),O(a.loansAccountFormValid?23:-1)}},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,Ds,nl,Tt],encapsulation:2})}}return t})();var h0=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.settingsService=A(oe),this.entityType="loans",this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(e=>{this.getLoanDocumentsData(e.loanDocuments)})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}getLoanDocumentsData(e){e.forEach(i=>{i.docUrl=this.settingsService.serverUrl+"/loans/"+i.parentEntityId+"/documents/"+i.id+"/attachment?tenantIdentifier="+Zf.fineractPlatformTenantId,i.fileName&&(i.fileName.toLowerCase().indexOf(".jpg")!==-1||i.fileName.toLowerCase().indexOf(".jpeg")!==-1||i.fileName.toLowerCase().indexOf(".png")!==-1)&&(i.fileIsImage=!0),i.type&&i.type.toLowerCase().indexOf("image")!==-1&&(i.fileIsImage=!0)}),this.entityDocuments=e}uploadDocument(e){return this.loansService.loadLoanDocument(this.entityId,e)}deleteDocument(e){this.loansService.deleteLoanDocument(this.entityId,e).subscribe(i=>{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(i,a){i&1&&P(0,"mifosx-entity-documents-tab",0),i&2&&x("entityType",a.entityType)("entityId",a.entityId)("entityDocuments",a.entityDocuments)("callbackUpload",a.uploadDocument)("callbackDelete",a.deleteDocument)},dependencies:[wt,Pt,_1],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return t})();var F7=["instructionsTable"];function N7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client")))}function R7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function B7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.From Account")))}function q7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function z7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Beneficiary")))}function j7(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),b(" ",e.toClient.displayName," ")}}function V7(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Own Account")))}function U7(t,n){if(t&1&&(s(0,"td",17),M(1,j7,2,1,"span"),M(2,V7,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.fromClient.id!==e.toClient.id?1:-1),o(),O(e.fromClient.id===e.toClient.id?2:-1)}}function H7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.To Account")))}function G7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function W7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function $7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t("",e.instructionType.value,"/",e.amount)}}function Y7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Validity")))}function K7(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),p(3,"dateFormat"),l()),t&2){let e=n.$implicit;o(),$t(" ",m(2,2,e.validFrom)," to ",m(3,4,e.validTill)," ")}}function Z7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function J7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",20),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit Standing Instruction")))}function X7(t,n){t&1&&(s(0,"span"),F(1,J7,3,4,"button",18),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Q7(t,n){if(t&1){let e=Ct();s(0,"button",22),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T();return st(r.deleteStandingInstruction(a.id))}),P(2,"i",23),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete Standing Instruction")))}function t8(t,n){t&1&&(s(0,"span"),F(1,Q7,3,4,"button",21),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function e8(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",24),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.View Standing Instruction")))}function n8(t,n){if(t&1&&(s(0,"td",17),M(1,X7,2,1,"span"),M(2,t8,2,1,"span"),F(3,e8,3,4,"button",18),l()),t&2){let e=n.$implicit;o(),O(e.status.value!=="Deleted"?1:-1),o(),O(e.status.value!=="Deleted"?2:-1),o(),x("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function i8(t,n){t&1&&P(0,"tr",25)}function a8(t,n){t&1&&P(0,"tr",26)}var g0=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.dialog=A(Gn),this.accountTransfersService=A(w1),this.settingsService=A(oe),this.dataSource=new Li,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.loanDetailsData.clientId,i=this.loanDetailsData.clientName,a=this.loanDetailsData.id,r=this.settingsService.language.code,u=this.settingsService.dateFormat;this.loansService.getStandingInstructions(e,i,a,r,u).subscribe(d=>{this.instructionsData=d.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(la,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(i,a){if(i&1&&ri(F7,7),i&2){let r;li(r=si())&&(a.instructionTableRef=r.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",1)(1,"div",2)(2,"h3"),c(3),p(4,"translate"),l()(),s(5,"div",3)(6,"table",4,0),X(8,5),F(9,N7,3,3,"th",6)(10,R7,2,2,"td",7),Q(),X(11,8),F(12,B7,3,3,"th",6)(13,q7,2,2,"td",7),Q(),X(14,9),F(15,z7,3,3,"th",6)(16,U7,3,2,"td",7),Q(),X(17,10),F(18,H7,3,3,"th",6)(19,G7,2,2,"td",7),Q(),X(20,11),F(21,W7,3,3,"th",6)(22,$7,2,2,"td",7),Q(),X(23,12),F(24,Y7,3,3,"th",6)(25,K7,4,6,"td",7),Q(),X(26,13),F(27,Z7,3,3,"th",6)(28,n8,4,3,"td",7),Q(),F(29,i8,1,0,"tr",14)(30,a8,1,0,"tr",15),l()()()),i&2&&(o(3),C(m(4,4,"labels.heading.All Standing Instructions")),o(3),x("dataSource",a.dataSource),o(23),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Pt,Gt,Me,_n,vn,bn,xn,Cn,yn,Oi,Sn,wn,Dn,Pn,gn,Tt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();function o8(t,n){t&1&&P(0,"fa-icon",15)}function r8(t,n){t&1&&P(0,"fa-icon",15)}function l8(t,n){t&1&&P(0,"fa-icon",16)}function s8(t,n){t&1&&P(0,"fa-icon",17)}function c8(t,n){t&1&&P(0,"fa-icon",18)}function p8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.DETAILS"))}function m8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.TERMS"))}function d8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.CHARGES"))}function u8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function f8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.PREVIEW"))}function h8(t,n){if(t&1){let e=Ct();s(0,"mat-step",14),F(1,f8,2,3,"ng-template",9),s(2,"mifosx-loans-account-preview-step",19),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountAndTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var Mc=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),this.settingsService=A(oe),this.route.data.subscribe(e=>{this.loansAccountAndTemplate=e.loansAccountAndTemplate}),this.loanId=this.route.snapshot.params.loanId}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code,this.loansAccountProductTemplate.loanProductId&&this.loansService.getLoansCollateralTemplateResource(this.loansAccountProductTemplate.loanProductId).subscribe(i=>{this.collateralOptions=i.loanCollateralOptions})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValidAndNotPristine(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&(!this.loansAccountDetailsForm.pristine||!this.loansAccountTermsForm.pristine||!this.loansAccountTermsStep.pristine||!this.loansAccountChargesStep.pristine)}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a="individual",r=new Map;(this.loansAccount.charges??[]).forEach(d=>{let g=d.chargeId;g!=null&&r.set(g,d)});let u=Se(ie({},this.loansAccount),{clientId:this.loansAccountAndTemplate.clientId,charges:Array.from(r.values()).map(d=>{let g={chargeId:d.chargeId,amount:d.amount,dueDate:d.dueDate&&this.dateUtils.formatDate(d.dueDate,i)};return d.id&&d.id!==d.chargeId&&(g.id=d.id),g}),collateral:this.loansAccount.collateral.map(d=>({type:d.type,value:d.value,description:d.description})),disbursementData:this.loansAccount.disbursementData.map(d=>({expectedDisbursementDate:this.dateUtils.formatDate(d.expectedDisbursementDate,i),principal:d.principal})),interestChargedFromDate:this.dateUtils.formatDate(this.loansAccount.interestChargedFromDate,i),repaymentsStartingFromDate:this.dateUtils.formatDate(this.loansAccount.repaymentsStartingFromDate,i),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,i),expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,i),dateFormat:i,locale:e,loanType:a});delete u.isValid,u.syncRepaymentsWithMeeting&&(u.calendarId=this.loansAccountProductTemplate.calendarOptions[0].id,delete u.syncRepaymentsWithMeeting),u.recalculationRestFrequencyDate&&(u.recalculationRestFrequencyDate=this.dateUtils.formatDate(this.loansAccount.recalculationRestFrequencyDate,i)),u.interestCalculationPeriodType===0&&(u.allowPartialPeriodInterestCalculation=!1),(!u.isLoanProductLinkedToFloatingRate||u.isLoanProductLinkedToFloatingRate===!1)&&delete u.isFloatingInterestRate,u.principal=u.principalAmount,delete u.principalAmount,delete u.multiDisburseLoan,u.allowPartialPeriodInterestCalculation=u.allowPartialPeriodInterestCalculation,delete u.allowPartialPeriodInterestCalculation,this.loansService.updateLoansAccount(this.loanId,u).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-loans-account"]],viewQuery:function(i,a){if(i&1&&(ri(Oo,7),ri(Io,7),ri(Eo,7)),i&2){let r;li(r=si())&&(a.loansAccountDetailsStep=r.first),li(r=si())&&(a.loansAccountTermsStep=r.first),li(r=si())&&(a.loansAccountChargesStep=r.first)}},decls:21,vars:15,consts:[["loansAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-stepper",2,0),F(3,o8,1,0,"ng-template",3)(4,r8,1,0,"ng-template",4)(5,l8,1,0,"ng-template",5)(6,s8,1,0,"ng-template",6)(7,c8,1,0,"ng-template",7),s(8,"mat-step",8),F(9,p8,2,3,"ng-template",9),s(10,"mifosx-loans-account-details-step",10),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",8),F(12,m8,2,3,"ng-template",9),P(13,"mifosx-loans-account-terms-step",11),l(),s(14,"mat-step"),F(15,d8,2,3,"ng-template",9),P(16,"mifosx-loans-account-charges-step",12),l(),s(17,"mat-step"),F(18,u8,2,3,"ng-template",9),P(19,"mifosx-loans-account-schedule-step",13),l(),M(20,h8,3,3,"mat-step",14),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountAndTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("collateralOptions",a.collateralOptions),o(3),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountFormValid",a.loansAccountFormValidAndNotPristine),o(3),x("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccount",a.loansAccount)("currencyCode",a.currencyCode),o(),O(a.loansAccountFormValidAndNotPristine?20:-1))},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,nl,Tt],encapsulation:2})}}return t})();var g8=()=>["../"];function _8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Edit")," "))}function C8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(3);return st(a.payCharge())}),P(1,"fa-icon",13),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Pay")," "))}function b8(t,n){t&1&&(s(0,"span"),F(1,C8,4,3,"button",9),l()),t&2&&(o(),x("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"))}function v8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(3);return st(a.waiveCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Waive")," "))}function x8(t,n){t&1&&(s(0,"span"),F(1,v8,4,3,"button",8),l()),t&2&&(o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function y8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(2);return st(a.adjustmentCharge())}),P(1,"fa-icon",14),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Adjustment")," "))}function S8(t,n){if(t&1&&(s(0,"div",0),F(1,_8,4,3,"button",8),M(2,b8,2,1,"span"),M(3,x8,2,1,"span"),s(4,"span"),F(5,y8,4,3,"button",9),l()()),t&2){let e=T();o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),o(),O(e.allowPayCharge?2:-1),o(),O(e.allowWaive?3:-1),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE")}}function D8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",16),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Edit")," "))}function w8(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.deleteCharge())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Delete")," "))}function P8(t,n){t&1&&(s(0,"div",0),F(1,D8,4,3,"button",8)(2,w8,4,3,"button",15),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),o(),x("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var _0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(It),this.dateUtils=A(me),this.router=A(le),this.translateService=A(Qi),this.dialog=A(Gn),this.settingsService=A(oe),this.allowPayCharge=!0,this.allowWaive=!0,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.allowPayCharge=this.chargeData.chargePayable&&!this.chargeData.paid,this.allowWaive=!this.chargeData.chargeTimeType.waived,this.loansAccountData=e.loanDetailsData})}payCharge(){let e=[new sa({controlName:"transactionDate",label:"Payment Date",value:"",type:"date",required:!0})],i={title:`Pay Charge ${this.chargeData.id}`,layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(gi,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=r.data.value.transactionDate,_={transactionDate:this.dateUtils.formatDate(g,d),dateFormat:d,locale:u};this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"pay",_,this.chargeData.id).subscribe(()=>{this.reload()})}})}waiveCharge(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id:")` ${this.chargeData.id}`,type:"Basic"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"waive",{},this.chargeData.id).subscribe(()=>{this.reload()})})}editCharge(){let e=[new Pi({controlName:"amount",label:"Amount",value:this.chargeData.amount||this.chargeData.amountOrPercentage,type:"number",required:!0}),new sa({controlName:"dueDate",label:"Due Date",value:new Date(this.chargeData.dueDate),type:"date",maxDate:this.settingsService.maxAllowedDate,required:!0})],i={title:"Edit Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(gi,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=this.dateUtils.formatDate(r.data.value.dueDate,d),y={amount:r.data.value.amount,dueDate:g,dateFormat:d,locale:u};this.loansService.editLoansAccountCharge(this.loansAccountData.id,y,this.chargeData.id).subscribe(()=>{this.reload()})}})}deleteCharge(){this.dialog.open(la,{data:{deleteContext:`charge id:${this.chargeData.id}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoansAccountCharge(this.loansAccountData.id,this.chargeData.id).subscribe(()=>{this.reload()})})}loanChargeColor(){return this.chargeData.paid?"paid":"not-paid"}adjustmentCharge(){this.router.navigate(["adjustment"],{relativeTo:this.route})}reload(){let e=this.loansAccountData.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-charge"]],decls:72,vars:64,consts:[[1,"layout-row","align-end","gap-2percent","layout-xs-column","container","m-b-20"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","accent",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","flag",1,"m-r-10"],["mat-raised-button","","color","accent",3,"click"],["icon","dollar-sign",1,"m-r-10"],["icon","pen",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(i,a){i&1&&(M(0,S8,6,4,"div",0),M(1,P8,3,2,"div",0),s(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),P(6,"div",3),s(7,"div",4),c(8),p(9,"translate"),l(),s(10,"div",5),c(11),l(),s(12,"div",4),c(13),p(14,"translate"),l(),s(15,"div",5),c(16),l(),s(17,"div",4),c(18),p(19,"translate"),l(),s(20,"div",5),c(21),l(),s(22,"div",4),c(23),p(24,"translate"),l(),s(25,"div",5),c(26),l(),s(27,"div",4),c(28),p(29,"translate"),l(),s(30,"div",5),c(31),p(32,"dateFormat"),l(),s(33,"div",4),c(34),p(35,"translate"),l(),s(36,"div",5),c(37),l(),s(38,"div",4),c(39),p(40,"translate"),l(),s(41,"div",5),c(42),p(43,"formatNumber"),l(),s(44,"div",4),c(45),p(46,"translate"),l(),s(47,"div",5),c(48),p(49,"formatNumber"),l(),s(50,"div",4),c(51),p(52,"translate"),l(),s(53,"div",5),c(54),p(55,"formatNumber"),l(),s(56,"div",4),c(57),p(58,"translate"),l(),s(59,"div",5),c(60),p(61,"formatNumber"),l(),s(62,"div",4),c(63),p(64,"translate"),l(),s(65,"div",5),c(66),p(67,"dateFormat"),l()(),s(68,"div",6)(69,"button",7),c(70),p(71,"translate"),l()()()()()),i&2&&(O(a.loansAccountData.status.value==="Active"&&a.chargeData.amountOutstanding!==0?0:-1),o(),O(a.loansAccountData.status.value==="Submitted and pending approval"?1:-1),o(5),x("ngClass",a.loanChargeColor()),o(2),b(" ",m(9,27,"labels.inputs.name")," "),o(3),b(" ",a.chargeData.name," "),o(2),b(" ",m(14,29,"labels.inputs.Charge Type")," "),o(3),b(" ",a.chargeData.penalty?"Penalty":"Fees"," "),o(2),b(" ",m(19,31,"labels.inputs.Currency")," "),o(3),b(" ",a.chargeData.currency.displayLabel," "),o(2),b(" ",m(24,33,"labels.inputs.Payment due at")," "),o(3),b(" ",a.chargeData.chargeTimeType.value," "),o(2),b(" ",m(29,35,"labels.inputs.Payment due as of")," "),o(3),b(" ",m(32,37,a.chargeData.dueDate)," "),o(3),b(" ",m(35,39,"labels.inputs.Calculation Type")," "),o(3),b(" ",a.chargeData.chargeCalculationType.value," "),o(2),b(" ",m(40,41,"labels.inputs.Due")," "),o(3),b(" ",m(43,43,a.chargeData.amount)," "),o(3),b(" ",m(46,45,"labels.inputs.Paid")," "),o(3),b(" ",m(49,47,a.chargeData.amountPaid)," "),o(3),b(" ",m(52,49,"labels.inputs.Waived")," "),o(3),b(" ",m(55,51,a.chargeData.amountWaived)," "),o(3),b(" ",m(58,53,"labels.inputs.Outstanding")," "),o(3),b(" ",m(61,55,a.chargeData.amountOutstanding)," "),o(3),b(" ",m(64,57,"labels.inputs.Submitted On Date")," "),o(3),b(" ",m(67,59,a.chargeData.submittedOnDate)," "),o(3),x("routerLink",Ut(63,g8)),o(),b(" ",m(71,61,"labels.buttons.Back")," "))},dependencies:[wt,pa,Pt,ae,ge,Te,Gt,Me,un,gn,Tt,fn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.paid[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.not-paid[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var T8=()=>["../"];function A8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",13),P(2,"fa-icon",14),c(3),p(4,"translate"),l(),s(5,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.undoTransaction())}),P(6,"fa-icon",16),c(7),p(8,"translate"),l()()}if(t&2){let e=T(2);o(),x("routerLink","edit")("disabled",!e.allowEdition),o(2),b("",m(4,5,"Edit")," "),o(2),x("disabled",!e.allowUndo),o(2),b("",m(8,7,"Undo")," ")}}function M8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.chargebackTransaction())}),P(2,"fa-icon",16),c(3),p(4,"translate"),l()()}if(t&2){let e=T(2);o(),x("disabled",!e.allowChargeback),o(2),b("",m(4,2,"Chargeback")," ")}}function O8(t,n){t&1&&(s(0,"div",0),F(1,A8,9,9,"span",12)(2,M8,5,4,"span",12),l()),t&2&&(o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("mifosxHasPermission","CHARGEBACK_LOAN"))}function I8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),b(" ",Ee(2,1,"Repayment Transaction","catalogs")," "))}function E8(t,n){if(t&1&&(s(0,"div",5)(1,"a",17),c(2),l()()),t&2){let e=T();o(),x("href",e.loanTransactionRelatedLink(e.transactionData.toLoanTransactionRelation.fromLoanTransaction),md),o(),b(" ",e.transactionData.toLoanTransactionRelation.fromLoanTransaction," ")}}function L8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"External Id")," "))}function k8(t,n){if(t&1&&(s(0,"div",5),P(1,"mifosx-external-identifier",18),l()),t&2){let e=T();o(),x("externalId",ce(e.transactionData.externalId))}}function F8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),b(" ",Ee(2,1,"Classification","catalogs")," "))}function N8(t,n){if(t&1&&(s(0,"div",6),c(1),l()),t&2){let e=T();o(),b(" ",e.transactionData.classification.name," ")}}function R8(t,n){t&1&&P(0,"mat-divider",7),t&2&&x("inset",!0)}function B8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Relation Type")))}function q8(t,n){if(t&1&&(s(0,"td",29),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;x("matTooltip",e.paymentType),o(),b(" ",m(2,2,e.relationType)," ")}}function z8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Transaction")))}function j8(t,n){if(t&1&&(s(0,"td",30)(1,"a",17),c(2),l()()),t&2){let e=n.$implicit,i=T(2);o(),x("href",i.loanTransactionRelatedLink(e.toLoanTransaction),md),o(),b(" ",e.toLoanTransaction," ")}}function V8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function U8(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.amount,i.transactionData.currency.code,"symbol-narrow","1.2-2")," ")}}function H8(t,n){t&1&&P(0,"tr",31)}function G8(t,n){t&1&&P(0,"tr",32)}function W8(t,n){if(t&1&&(s(0,"div",8),c(1),p(2,"translate"),P(3,"br"),s(4,"table",19),X(5,20),F(6,B8,3,3,"th",21)(7,q8,3,4,"td",22),Q(),X(8,23),F(9,z8,3,3,"th",21)(10,j8,3,2,"td",24),Q(),X(11,25),F(12,V8,3,3,"th",21)(13,U8,3,6,"td",24),Q(),F(14,H8,1,0,"tr",26)(15,G8,1,0,"tr",27),l()()),t&2){let e=T();o(),b(" ",m(2,4,"Linked Transactions")," "),o(3),x("dataSource",e.transactionRelations),o(10),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}function $8(t,n){if(t&1&&P(0,"mifosx-transaction-payment-detail",9),t&2){let e=T();x("paymentDetailData",e.transactionData.paymentDetailData)}}var C0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(It),this.dateUtils=A(me),this.router=A(le),this.dialog=A(Gn),this.translateService=A(Qi),this.settingsService=A(oe),this.organizationService=A(Np),this.alertService=A(Ql),this.allowEdition=!0,this.allowUndo=!0,this.allowChargeback=!0,this.existTransactionRelations=!1,this.paymentTypeOptions=[],this.transactionRelations=new Li,this.displayedColumns=["relationType","toTransaction","amount"],this.isFullRelated=!1,this.amountRelationsAllowed=0,this.route.data.subscribe(e=>{this.transactionData=e.loansAccountTransaction,this.transactionType=this.transactionData.type,this.allowEdition=!this.transactionData.manuallyReversed&&!this.allowTransactionEdition(this.transactionData.type.id),this.allowUndo=this.allowUndoTransaction(this.transactionData.manuallyReversed,this.transactionType),this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.transactionData.manuallyReversed;let i=!1;if(this.transactionData.transactionRelations){this.transactionRelations.data=this.transactionData.transactionRelations,this.existTransactionRelations=this.transactionData.transactionRelations.length>0;let a=0;this.transactionData.transactionRelations.forEach(r=>{r.relationType==="CHARGEBACK"&&(a+=r.amount,i=!0)}),this.amountRelationsAllowed=this.transactionData.amount-a,this.isFullRelated=this.amountRelationsAllowed===0,this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.isFullRelated}this.allowChargeback||(this.allowEdition=!1),(this.existTransactionRelations&&i||this.transactionType.reAge||this.transactionType.reAmortize)&&(this.allowUndo=!1)}),this.clientId=this.route.snapshot.params.clientId,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.allowChargeback&&this.organizationService.getPaymentTypesWithCode().toPromise().then(e=>{this.paymentTypeOptions=e})}allowTransactionEdition(e){return e===20||e===21||e===22||e===23||e===28}allowChargebackTransaction(e){return e.repayment||e.interestPaymentWaiver||e.goodwillCredit||e.payoutRefund||e.merchantIssuedRefund||e.downPayment}allowUndoTransaction(e,i){return!(e||i.interestRefund)}isWriteOff(e){return e.writeOff||e.code==="loanTransactionType.writeOff"}undoTransaction(){let e=this.route.snapshot.params.loanId;if(this.transactionType.contractTermination){let i=[new Pi({controlName:"note",label:"Note",value:"",type:"text",required:!1,order:1}),new Pi({controlName:"reversalExternalId",label:"externalId",value:"",type:"text",required:!1,order:2})],a={title:this.translateService.instant("labels.heading.Undo Transaction"),layout:{addButtonText:"Undo"},formfields:i,pristine:!1};this.dialog.open(gi,{data:a,width:"50rem"}).afterClosed().subscribe(u=>{if(u.data){let d={note:u.data.value.note,reversalExternalId:u.data.value.reversalExternalId};this.loansService.loanActionButtons(e,"undoContractTermination",d).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}else this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction")+`${this.transactionData.id}`}}).afterClosed().subscribe(a=>{if(a.confirm){let r=this.settingsService.language.code,u=this.settingsService.dateFormat,d={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),u),transactionAmount:0,dateFormat:u,locale:r},g=this.isWriteOff(this.transactionType)?"undowriteoff":"undo",_=g==="undowriteoff"?null:this.transactionData.id;this.loansService.executeLoansAccountTransactionsCommand(e,g,d,_).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}chargebackTransaction(){let e=this.route.snapshot.params.loanId,i=[new nc({controlName:"paymentTypeId",label:"Payment Type",value:"",options:{label:"name",value:"id",data:this.paymentTypeOptions},required:!0,order:1}),new Pi({controlName:"amount",label:"Amount",value:this.amountRelationsAllowed,type:"number",required:!0,max:this.amountRelationsAllowed,order:2})],a={title:`Chargeback ${this.transactionType.value} Transaction`,layout:{addButtonText:"Chargeback"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data)if(u.data.value.amount<=this.amountRelationsAllowed){let d=this.settingsService.language.code,g={transactionAmount:u.data.value.amount,paymentTypeId:u.data.value.paymentTypeId,locale:d};this.loansService.executeLoansAccountTransactionsCommand(e,"chargeback",g,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}else this.alertService.alert({type:"BusinessRule",message:"Chargeback amount must be lower or equal to: "+this.amountRelationsAllowed})})}loanTransactionRelatedLink(e){return`/#/clients/${this.clientId}/loans-accounts/${this.loanId}/transactions/${e}`}loanTransactionColor(){return this.transactionData.manuallyReversed?"undo":this.existTransactionRelations?"linked":"active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-transaction"]],decls:47,vars:51,consts:[[1,"container","m-b-20","transaction-buttons","layout-align-end","gap-2percent"],[1,"container"],[1,"layout-row-wrap","card-content"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"flex-50","no-break-content"],[3,"inset"],[1,"mat-body-strong","flex-100"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink","disabled"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","undo",1,"m-r-10"],[3,"href"],["completed","true",3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","relationType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"matTooltip",4,"matCellDef"],["matColumnDef","toTransaction"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"matTooltip"],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,O8,3,2,"div",0),s(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),P(5,"div",3),s(6,"div",4),c(7),p(8,"translateKey"),l(),s(9,"div",5),c(10),l(),M(11,I8,3,4,"div",4),M(12,E8,3,2,"div",5),s(13,"div",4),c(14),p(15,"translateKey"),l(),s(16,"div",5),c(17),p(18,"translateKey"),l(),s(19,"div",4),c(20),p(21,"translateKey"),l(),s(22,"div",5),c(23),p(24,"dateFormat"),l(),s(25,"div",4),c(26),p(27,"translateKey"),l(),s(28,"div",5),c(29),l(),s(30,"div",4),c(31),p(32,"translateKey"),l(),s(33,"div",5),c(34),p(35,"currency"),l(),M(36,L8,3,3,"div",4),M(37,k8,2,2,"div",5),M(38,F8,3,4,"div",4),M(39,N8,2,1,"div",6),M(40,R8,1,1,"mat-divider",7),M(41,W8,16,6,"div",8),M(42,$8,1,1,"mifosx-transaction-payment-detail",9),l(),s(43,"div",10)(44,"button",11),c(45),p(46,"translate"),l()()()()()),i&2&&(O(a.transactionData.type.contra?-1:0),o(5),x("ngClass",a.loanTransactionColor()),o(2),b(" ",Ee(8,23,"Transaction Id","catalogs")," "),o(3),b(" ",a.transactionData.id," "),o(),O(a.transactionData.toLoanTransactionRelation?11:-1),o(),O(a.transactionData.toLoanTransactionRelation?12:-1),o(2),b(" ",Ee(15,26,"Type","catalogs")," "),o(3),b(" ",Ee(18,29,a.transactionData.type.value,"catalogs")," "),o(3),b(" ",Ee(21,32,"Transaction Date","catalogs")," "),o(3),b(" ",m(24,35,a.transactionData.date)," "),o(3),b(" ",Ee(27,37,"Currency","catalogs")," "),o(3),b(" ",a.transactionData.currency.name," "),o(2),b(" ",Ee(32,40,"Amount","catalogs")," "),o(3),b(" ",Ye(35,43,a.transactionData.amount,a.transactionData.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(a.transactionData.externalId?36:-1),o(),O(a.transactionData.externalId?37:-1),o(),O(a.transactionData.classification?38:-1),o(),O(a.transactionData.classification?39:-1),o(),O(a.existTransactionRelations?40:-1),o(),O(a.existTransactionRelations?41:-1),o(),O(a.transactionData.paymentDetailData?42:-1),o(2),x("routerLink",Ut(50,T8)),o(),b(" ",m(46,48,"labels.buttons.Back")," "))},dependencies:[wt,pa,Pt,ae,ge,Te,Gt,Me,un,Va,$o,_n,vn,bn,xn,Cn,yn,Oi,Sn,wn,Dn,Pn,y1,Sa,gn,Tt,wa],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.loan-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var Y8=()=>["../"];function K8(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(" ",m(6,7,"labels.commons.required")," "))}function Z8(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function J8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Account Number")))}function X8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Cheque")))}function Q8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",20),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Routing Code")))}function tL(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",21),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Receipt Number")))}function eL(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Bank")))}var b0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.showPaymentDetails=!1,this.route.data.subscribe(e=>{this.transactionTemplateData=e.loansAccountTransactionTemplate,e.loansAccountTransactionTemplate.currency&&(this.currency=e.loansAccountTransactionTemplate.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.loanAccountId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,externalId:this.transactionTemplateData.externalId,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",Wt.required],transactionAmount:["",Wt.required],externalId:[""],paymentTypeId:[""]})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.editTransactionForm.addControl("accountNumber",new pe("")),this.editTransactionForm.addControl("checkNumber",new pe("")),this.editTransactionForm.addControl("routingCode",new pe("")),this.editTransactionForm.addControl("receiptNumber",new pe("")),this.editTransactionForm.addControl("bankNumber",new pe(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loansService.executeLoansAccountTransactionsCommand(this.loanAccountId,"modify",u,this.transactionTemplateData.id).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-transaction"]],decls:45,vars:37,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Et(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,K8,7,9,"mat-error"),l(),P(13,"mifosx-input-amount",7),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",8),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",9),de(24,Z8,2,2,"mat-option",10,xe),l()(),s(26,"div",11)(27,"span",12),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(28,"mat-slide-toggle")(29,"div",13)(30,"span",14),c(31),p(32,"translate"),l()()()()(),M(33,J8,5,3,"mat-form-field"),M(34,X8,5,3,"mat-form-field"),M(35,Q8,5,3,"mat-form-field"),M(36,tL,5,3,"mat-form-field"),M(37,eL,5,3,"mat-form-field"),s(38,"mat-card-actions",15)(39,"button",16),c(40),p(41,"translate"),l(),s(42,"button",17),c(43),p(44,"translate"),l()()()()()()}if(i&2){let r=Et(11);o(2),x("formGroup",a.editTransactionForm),o(4),C(m(7,24,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(17,26,"labels.inputs.External Id")),o(5),C(m(22,28,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypeOptions),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),C(m(32,30,"labels.inputs.Show Payment Details")),o(2),O(a.editTransactionForm.controls.accountNumber?33:-1),o(),O(a.editTransactionForm.controls.checkNumber?34:-1),o(),O(a.editTransactionForm.controls.routingCode?35:-1),o(),O(a.editTransactionForm.controls.receiptNumber?36:-1),o(),O(a.editTransactionForm.controls.bankNumber?37:-1),o(2),x("routerLink",Ut(36,Y8)),o(),b(" ",m(41,32,"labels.buttons.Cancel")," "),o(2),x("disabled",!a.editTransactionForm.valid),o(),b(" ",m(44,34,"labels.buttons.Submit")," ")}},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Bi,za,Tt],styles:[".container[_ngcontent-%COMP%]{width:37rem;margin-top:3%;padding-bottom:2%}"]})}}return t})();var nL=()=>["../../../general"],v0=(()=>{class t{constructor(){this.sanitizer=A(Jl),this.route=A(It),this.route.data.subscribe(e=>{this.transactionRecieptData=e.loansTransactionReciept})}ngOnInit(){let e=this.transactionRecieptData.headers.get("Content-Type"),i=new Blob([this.transactionRecieptData.body],{type:e}),a=URL.createObjectURL(i);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-reciept"]],decls:7,vars:6,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"div",1)(2,"button",2),P(3,"fa-icon",3),c(4),p(5,"translate"),l()(),P(6,"iframe",4),l()),i&2&&(o(2),x("routerLink",Ut(5,nL)),o(2),b("",m(5,3,"labels.buttons.Back")," "),o(2),x("src",a.pentahoUrl,hp))},dependencies:[wt,Pt,ae,ge,Gt,un,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var iL=()=>["../"];function aL(t,n){if(t&1&&P(0,"iframe",13),t&2){let e=T();x("src",e.pentahoUrl,hp)}}var x0=(()=>{class t{constructor(){this.sanitizer=A(Jl),this.reportsService=A(kp),this.formBuilder=A(Pe),this.dateUtils=A(me),this.route=A(It),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.hideOutput=!0,this.route.parent.parent.data.subscribe(e=>{this.loansAccountId=e.loanDetailsData.accountNo})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransactionsReportForm()}createTransactionsReportForm(){this.transactionsReportForm=this.formBuilder.group({fromDate:["",Wt.required],toDate:[this.settingsService.businessDate,Wt.required]})}generate(){let e=this.settingsService.dateFormat,i={"output-type":"PDF",R_startDate:this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate,e),R_endDate:this.dateUtils.formatDate(this.transactionsReportForm.value.toDate,e),R_selectLoan:this.loansAccountId};this.reportsService.getPentahoRunReportData("Client Loan Account Schedule",i,"default","en",e).subscribe(a=>{let r=a.headers.get("Content-Type"),u=new Blob([a.body],{type:r}),d=URL.createObjectURL(u);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(d),this.hideOutput=!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-export-transactions"]],decls:41,vars:43,consts:[["fromDatePicker",""],["toDatePicker",""],[1,"layout-column","m-t-20",3,"ngSubmit","formGroup"],[1,"layout-row","layout-align-center","gap-3percent"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","fromDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill","flex-30",3,"click"],["matInput","","required","","formControlName","toDate",3,"min","max","matDatepicker"],[1,"generate-button","layout-row","layout-xs-column","layout-align-center","gap-5percent"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs",1,"m-r-10"],["frameborder","0","width","100%","height","750px;",3,"src"]],template:function(i,a){if(i&1){let r=Ct();s(0,"form",2),it("ngSubmit",function(){return lt(r),st(a.generate())}),s(1,"div",3)(2,"mat-form-field",4),it("click",function(){lt(r);let d=Et(9);return st(d.open())}),s(3,"mat-label"),c(4),p(5,"translate"),l(),P(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),s(10,"mat-error"),c(11),p(12,"translate"),p(13,"translate"),s(14,"strong"),c(15),p(16,"translate"),l()()(),s(17,"mat-form-field",7),it("click",function(){lt(r);let d=Et(24);return st(d.open())}),s(18,"mat-label"),c(19),p(20,"translate"),l(),P(21,"input",8)(22,"mat-datepicker-toggle",6)(23,"mat-datepicker",null,1),s(25,"mat-error"),c(26),p(27,"translate"),p(28,"translate"),s(29,"strong"),c(30),p(31,"translate"),l()()()(),s(32,"div",9)(33,"button",10),c(34),p(35,"translate"),l(),s(36,"button",11),P(37,"fa-icon",12),c(38),p(39,"translate"),l()()(),M(40,aL,1,1,"iframe",13)}if(i&2){let r=Et(9),u=Et(24);x("formGroup",a.transactionsReportForm),o(4),C(m(5,22,"labels.inputs.From Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(4),$t(" ",m(12,24,"labels.inputs.From date")," ",m(13,26,"labels.commons.is")," "),o(4),b(" ",m(16,28,"labels.commons.required")," "),o(4),C(m(20,30,"labels.inputs.To Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(4),$t(" ",m(27,32,"labels.inputs.To date")," ",m(28,34,"labels.commons.is")," "),o(4),b(" ",m(31,36,"labels.commons.required")," "),o(3),x("routerLink",Ut(42,iL)),o(),C(m(35,38,"labels.buttons.Cancel")),o(2),x("disabled",!a.transactionsReportForm.valid),o(2),b("",m(39,40,"labels.buttons.Generate Report")," \xA0 "),o(2),O(a.hideOutput?-1:40)}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,un,Tt],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var oL=t=>["../../",t,"general"];function rL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Id")))}function lL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.childLoanId," ")}}function sL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client ID")))}function cL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.clientId)}}function pL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Name")))}function mL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.clientName)}}function dL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Account Number")))}function uL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.childLoanAccountNo)}}function fL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Principal Loan")))}function hL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.childPrincipalAmount)}}function gL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Group Principal Loan")))}function _L(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.parentPrincipalAmount)}}function CL(t,n){t&1&&P(0,"tr",14)}function bL(t,n){if(t&1&&P(0,"tr",15),t&2){let e=n.$implicit;x("routerLink",ka(1,oL,e.childLoanId))}}var y0=(()=>{class t{constructor(){this.route=A(It),this.dialog=A(Gn),this.displayedColumns=["loanId","clientId","clientName","loanAccountNumber","clientPrincipalLoan","groupPrincipalLoan"],this.route.data.subscribe(e=>{this.glimOverviewData=e.glimData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Li(this.glimOverviewData)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-glim-account"]],viewQuery:function(i,a){if(i&1&&ri(Do,7),i&2){let r;li(r=si())&&(a.paginator=r.first)}},decls:26,vars:6,consts:[[1,"loan-card"],["mat-table","",3,"dataSource"],["matColumnDef","loanId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","clientId"],["matColumnDef","clientName"],["matColumnDef","loanAccountNumber"],["matColumnDef","clientPrincipalLoan"],["matColumnDef","groupPrincipalLoan"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"mat-card-content")(2,"h2"),c(3),p(4,"translate"),l(),s(5,"table",1),X(6,2),F(7,rL,3,3,"th",3)(8,lL,2,1,"td",4),Q(),X(9,5),F(10,sL,3,3,"th",3)(11,cL,2,1,"td",4),Q(),X(12,6),F(13,pL,3,3,"th",3)(14,mL,2,1,"td",4),Q(),X(15,7),F(16,dL,3,3,"th",3)(17,uL,2,1,"td",4),Q(),X(18,8),F(19,fL,3,3,"th",3)(20,hL,2,1,"td",4),Q(),X(21,9),F(22,gL,3,3,"th",3)(23,_L,2,1,"td",4),Q(),F(24,CL,1,0,"tr",10)(25,bL,1,3,"tr",11),l()()()),i&2&&(o(3),C(m(4,4,"labels.heading.GLIM Account Overview")),o(2),x("dataSource",a.dataSource),o(19),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Pt,ae,ge,Te,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt],styles:[".loan-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%]{color:#fff;width:90%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{margin:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:20px}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-actions[_ngcontent-%COMP%]{align-self:flex-end;margin:0 1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-span[_ngcontent-%COMP%]{margin:0 .5%}.loan-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.loans-overview[_ngcontent-%COMP%]{font-size:14px}"]})}}return t})();var vL=()=>["../","general"];function xL(t,n){if(t&1){let e=Ct();s(0,"th",17)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelects())}),ec("ngModelChange",function(a){lt(e);let r=T(2);return tc(r.selectAllItems,a)||(r.selectAllItems=a),st(a)}),l()()}if(t&2){let e=T(2);o(),Qs("ngModel",e.selectAllItems)}}function yL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelect())}),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.selected,a)||(r.selected=a),st(a)}),l()()}if(t&2){let e=n.$implicit;o(),Qs("ngModel",e.selected)}}function SL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client ID")))}function DL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),C(e.id)}}function wL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Name")))}function PL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),C(e.displayName)}}function TL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Purpose")))}function AL(t,n){if(t&1&&(s(0,"mat-option",21),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function ML(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",20),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.loanPurposeId,a)||(r.loanPurposeId=a),st(a)}),de(6,AL,2,2,"mat-option",21,xe),l()()()}if(t&2){let e=n.$implicit,i=T(2);o(3),C(m(4,2,"labels.inputs.Select Purpose")),o(2),Qs("ngModel",e.loanPurposeId),o(),ue(i.loanPurposeOptions)}}function OL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Original Loan")))}function IL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"input",22),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.principal,a)||(r.principal=a),st(a)}),l()()()}if(t&2){let e=n.$implicit;o(2),Qs("ngModel",e.principal)}}function EL(t,n){t&1&&P(0,"tr",23)}function LL(t,n){t&1&&P(0,"tr",24)}function kL(t,n){if(t&1&&(s(0,"div",0)(1,"table",7),X(2,8),F(3,xL,2,1,"th",9)(4,yL,2,1,"td",10),Q(),X(5,11),F(6,SL,3,3,"th",9)(7,DL,2,1,"td",10),Q(),X(8,12),F(9,wL,3,3,"th",9)(10,PL,2,1,"td",10),Q(),X(11,13),F(12,TL,3,3,"th",9)(13,ML,8,4,"td",10),Q(),X(14,14),F(15,OL,3,3,"th",9)(16,IL,3,1,"td",10),Q(),F(17,EL,1,0,"tr",15)(18,LL,1,0,"tr",16),l()()),t&2){let e=T();o(),x("dataSource",e.dataSource),o(16),x("matHeaderRowDef",e.displayedColumn),o(),x("matRowDefColumns",e.displayedColumn)}}function FL(t,n){t&1&&(s(0,"button",6),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,vL)),o(),b(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oc=(()=>{class t{constructor(){this.route=A(It),this.loanId=null,this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name","purpose","amount"],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.dataSource=new Li(this.activeClientMembers)}get isValid(){return!this.activeClientMembers||this.selectedClientMembers?.selectedMembers?.reduce((e,i)=>e+(i.principal??0),0)>0}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(i=>i.selected).length===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-active-client-members"]],inputs:{activeClientMembers:"activeClientMembers",loansAccountFormValid:"loansAccountFormValid"},decls:11,vars:9,consts:[[1,"layout-row-wrap","gap-2percent","layout-xs-column"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["mat-table","",1,"flex-98",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","name"],["matColumnDef","purpose"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[3,"change","ngModelChange","ngModel"],["mat-cell",""],[3,"ngModelChange","ngModel"],[3,"value"],["type","number","matInput","",3,"ngModelChange","ngModel"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,kL,19,3,"div",0),s(1,"div",1)(2,"button",2),P(3,"fa-icon",3),c(4),p(5,"translate"),l(),s(6,"button",4),c(7),p(8,"translate"),P(9,"fa-icon",5),l(),M(10,FL,3,5,"button",6),l()),i&2&&(O(a.activeClientMembers?0:-1),o(4),b(" ",m(5,5,"labels.buttons.Previous")," "),o(2),x("disabled",!a.loansAccountFormValid),o(),b(" ",m(8,7,"labels.buttons.Next")," "),o(3),O(a.loanId?10:-1))},dependencies:[wt,Pt,we,Mi,he,ae,Ce,_e,Ae,En,In,Gt,Da,_n,vn,bn,xn,e1,Xf,Cn,yn,Sn,wn,Dn,Pn,ja,un,mo,Tt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.tableName[_ngcontent-%COMP%]{padding-left:2%}"]})}}return t})();var NL=["dtloan"];function RL(t,n){t&1&&P(0,"fa-icon",20)}function BL(t,n){t&1&&P(0,"fa-icon",20)}function qL(t,n){t&1&&P(0,"fa-icon",21)}function zL(t,n){t&1&&P(0,"fa-icon",22)}function jL(t,n){t&1&&P(0,"fa-icon",23)}function VL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.DETAILS"))}function UL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.TERMS"))}function HL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.CHARGES"))}function GL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.heading.Active Client Members"))}function WL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function $L(t,n){if(t&1&&(s(0,"mat-step",18),F(1,WL,2,3,"ng-template",13),P(2,"mifosx-loans-account-schedule-step",24,3),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function YL(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;C(e.registeredTableName)}}function KL(t,n){if(t&1&&(s(0,"mat-step"),F(1,YL,1,1,"ng-template",13),P(2,"mifosx-loans-account-datatable-step",25,4),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function ZL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.PREVIEW"))}function JL(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),F(1,ZL,2,3,"ng-template",13),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("activeClientMembers",e.activeClientMembers)}}var S0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),this.dateUtils=A(me),this.i18nService=A(i1),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate,this.dataSource=e.groupsData.activeClientMembers})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get activeClientMembers(){return this.dataSource}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&this.loansActiveClientMembers.isValid}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return this.selectedMembers=this.loansActiveClientMembers.selectedClientMembers,ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}setData(e,i){let a=this.settingsService.language.code,r=this.settingsService.dateFormat,u=Se(ie({},this.loansAccount),{charges:(this.loansAccount.charges??[]).map(d=>{let g=d.chargeId??d.id;if(g==null)return null;let _={chargeId:g,amount:d.amount};return d.id&&d.id!==g&&(_.id=d.id),d.dueDate&&(_.dueDate=this.dateUtils.formatDate(d.dueDate,r)),d.feeInterval!==void 0&&(_.feeInterval=d.feeInterval),d.feeOnMonthDay!==void 0&&(_.feeOnMonthDay=d.feeOnMonthDay),_}).filter(Boolean),clientId:e.id,totalLoan:i,loanType:"glim",amortizationType:1,isParentAccount:!0,principal:e.principal,syncDisbursementWithMeeting:!1,expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,r),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,r),dateFormat:r,locale:a});return u.groupId=this.loansAccountTemplate.group.id,delete u.principalAmount,delete u.allowPartialPeriodInterestCalculation,delete u.multiDisburseLoan,delete u.isFloatingInterestRate,JSON.stringify(u)}buildRequestData(){let e=[],i=this.selectedMembers?.selectedMembers??[],a=this.totalLoanAmount();for(let r=0;rNumber(r.id)));for(let r of e){let u=Number(r.id),d=Number(r.linkAccountOwnerId);if(r.linkAccountId&&r.linkAccountOwnerId&&d!==u){this.i18nService.translate("errors.linkedSavingsAccountOwnership").subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}if(!i.has(u)){this.i18nService.translate("errors.clientNotInGSIM",{id:u}).subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}}let a=this.buildRequestData();this.loansService.createGlimAccount(a).subscribe(r=>{let u=JSON.parse(r[0].body);u.glimId?this.router.navigate(["../",u.glimId],{relativeTo:this.route}):this.notify(u,{batchSize:a.length})})}notify(e,i){let a=[String(e?.defaultUserMessage??"")];if(Array.isArray(e?.errors))for(let r of e.errors)a.push(String(r?.developerMessage??""));i&&a.push(`Context: ${JSON.stringify(i)}`),console.error(a.join(" ").trim())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-glim-account"]],viewQuery:function(i,a){if(i&1&&(ri(Oo,7),ri(Io,7),ri(Eo,7),ri(Oc,7),ri(NL,5)),i&2){let r;li(r=si())&&(a.loansAccountDetailsStep=r.first),li(r=si())&&(a.loansAccountTermsStep=r.first),li(r=si())&&(a.loansAccountChargesStep=r.first),li(r=si())&&(a.loansActiveClientMembers=r.first),li(r=si())&&(a.loanDatatables=r)}},decls:26,vars:16,consts:[["loansAccountStepper",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"activeClientMembers","loansAccountFormValid"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount","activeClientMembers"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",5)(1,"mat-stepper",6,0),F(3,RL,1,0,"ng-template",7)(4,BL,1,0,"ng-template",8)(5,qL,1,0,"ng-template",9)(6,zL,1,0,"ng-template",10)(7,jL,1,0,"ng-template",11),s(8,"mat-step",12),F(9,VL,2,3,"ng-template",13),s(10,"mifosx-loans-account-details-step",14),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",12),F(12,UL,2,3,"ng-template",13),P(13,"mifosx-loans-account-terms-step",15,1),l(),s(15,"mat-step"),F(16,HL,2,3,"ng-template",13),P(17,"mifosx-loans-account-charges-step",16,2),l(),s(19,"mat-step"),F(20,GL,2,3,"ng-template",13),P(21,"mifosx-loans-active-client-members",17),l(),M(22,$L,4,4,"mat-step",18),de(23,KL,4,1,"mat-step",null,xe),M(25,JL,3,4,"mat-step",19),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid),o(4),x("activeClientMembers",a.activeClientMembers)("loansAccountFormValid",a.loansAccountFormValid),o(),O(a.loansAccountFormValid?22:-1),o(),ue(a.datatables),o(2),O(a.loansAccountFormValid?25:-1))},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,Oc,el,Ds,nl,Tt],encapsulation:2})}}return t})();function XL(t,n){t&1&&(s(0,"div",1),P(1,"mat-spinner",2),l())}function QL(t,n){t&1&&(s(0,"div",3),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.messages.No Data Found")," "))}function tk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Date")))}function ek(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.buyDownFeeDate)," ")}}function nk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Fee Amount")))}function ik(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.buyDownFeeAmount,"0.00")," ")}}function ak(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Amortized Amount")))}function ok(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.amortizedAmount,"0.00")," ")}}function rk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Not Yet Amortized Amount")))}function lk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.notYetAmortizedAmount,"0.00")," ")}}function sk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Adjusted Amount")))}function ck(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.adjustedAmount,"0.00")," ")}}function pk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Charged Off Amount")))}function mk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.chargedOffAmount,"0.00")," ")}}function dk(t,n){t&1&&P(0,"tr",19)}function uk(t,n){t&1&&P(0,"tr",20)}function fk(t,n){if(t&1&&(s(0,"table",4),X(1,5),F(2,tk,3,3,"th",6)(3,ek,3,3,"td",7),Q(),X(4,8),F(5,nk,3,3,"th",6)(6,ik,3,4,"td",9),Q(),X(7,10),F(8,ak,3,3,"th",6)(9,ok,3,4,"td",9),Q(),X(10,11),F(11,rk,3,3,"th",6)(12,lk,3,4,"td",9),Q(),X(13,12),F(14,sk,3,3,"th",6)(15,ck,3,4,"td",9),Q(),X(16,13),F(17,pk,3,3,"th",6)(18,mk,3,4,"td",9),Q(),F(19,dk,1,0,"tr",14)(20,uk,1,0,"tr",15),l()),t&2){let e=T(2);x("dataSource",e.buyDownFeeData),o(19),x("matHeaderRowDef",e.buyDownFeeColumns),o(),x("matRowDefColumns",e.buyDownFeeColumns)}}function hk(t,n){if(t&1&&(s(0,"div"),M(1,QL,3,3,"div",3),M(2,fk,21,3,"table",4),l()),t&2){let e=T();o(),O(e.buyDownFeeData.length===0?1:-1),o(),O(e.buyDownFeeData.length>0?2:-1)}}var Mg=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.buyDownFeeData=[],this.isLoading=!0,this.buyDownFeeColumns=["buyDownFeeDate","buyDownFeeAmount","amortizedAmount","notYetAmortizedAmount","adjustedAmount","chargedOffAmount"]}ngOnInit(){this.getLoanId(),this.loadBuyDownFees()}getLoanId(){if(this.route.snapshot.data&&this.route.snapshot.data.loanId){this.loanId=this.route.snapshot.data.loanId;return}let e=this.route;for(;e;){if(e.snapshot.paramMap.has("loanId")){this.loanId=e.snapshot.paramMap.get("loanId");return}if(e.parent)e=e.parent;else break}console.error("Could not find loanId in route parameters")}loadBuyDownFees(){if(!this.loanId){console.error("Cannot load buy down fees: loanId is undefined"),this.isLoading=!1;return}this.isLoading=!0,this.loansService.getBuyDownFeeData(this.loanId).subscribe({next:e=>{this.buyDownFeeData=e||[],this.isLoading=!1},error:e=>{console.error("Error loading buy down fees:",e),this.isLoading=!1}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-buy-down-fees-tab"]],decls:6,vars:5,consts:[[1,"container"],[1,"loading-indicator"],["diameter","30"],[1,"no-data"],["mat-table","",3,"dataSource"],["matColumnDef","buyDownFeeDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","buyDownFeeAmount"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","notYetAmortizedAmount"],["matColumnDef","adjustedAmount"],["matColumnDef","chargedOffAmount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,XL,2,0,"div",1),M(5,hk,3,2,"div"),l()),i&2&&(o(2),C(m(3,3,"labels.heading.Buy Down Fees")),o(2),O(a.isLoading?4:-1),o(),O(a.isLoading?-1:5))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,gn,Tt,fn],encapsulation:2})}}return t})();var gk=["statusChart"],_k=["paymentsChart"];function Ck(t,n){t&1&&(s(0,"div",16),c(1),p(2,"translate"),l()),t&2&&(o(),b("",m(2,1,"labels.text.Loading data"),"..."))}function bk(t,n){t&1&&(s(0,"div",16),c(1),p(2,"translate"),l()),t&2&&(o(),b("",m(2,1,"labels.text.Loading data"),"..."))}function vk(t,n){t&1&&(s(0,"div",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.text.No repayment schedule available")," "))}Lp.register(...D1);var Og=(()=>{class t{constructor(){this.route=A(It),this.translate=A(Qi),this.initTimeout=null,this.loanId="",this.principalAmount=0,this.totalRepaid=0,this.outstandingBalance=0,this.interestCharged=0,this.totalExpected=0,this.progressPercentage=0}ngOnInit(){this.loanId=this.route.parent?.snapshot.paramMap.get("loanId")||"",this.routeDataSubscription=this.route.parent.data.subscribe(e=>{e.loanDetailsData&&(this.loanData=e.loanDetailsData,this.calculateMetrics(),this.initTimeout=window.setTimeout(()=>{this.createStatusChart(),this.createPaymentsChart()},100))}),this.langChangeSubscription=this.translate.onLangChange.subscribe(()=>{this.statusChart&&this.createStatusChart(),this.paymentsChart&&this.createPaymentsChart()})}ngAfterViewInit(){setTimeout(()=>{this.createStatusChart(),this.createPaymentsChart()},100)}calculateMetrics(){this.loanData&&(this.principalAmount=this.loanData.principal||0,this.totalRepaid=this.loanData.summary?.totalRepayment||0,this.outstandingBalance=this.loanData.summary?.totalOutstanding||0,this.interestCharged=this.loanData.summary?.interestCharged||0,this.totalExpected=this.loanData.summary?.totalExpectedRepayment||0,this.totalExpected===0?this.progressPercentage=0:this.progressPercentage=Math.min(100,Math.max(0,this.totalRepaid/this.totalExpected*100)))}createStatusChart(){if(!this.statusChartCanvas)return;this.statusChart&&this.statusChart.destroy();let i=this.statusChartCanvas.nativeElement.getContext("2d");if(!i)return;let a=Math.min(100,Math.max(0,this.totalExpected>0?this.totalRepaid/this.totalExpected*100:0)),r=Math.max(0,100-a);this.statusChart=new Lp(i,{type:"doughnut",data:{labels:[this.translate.instant("labels.inputs.Total Repaid"),this.translate.instant("labels.inputs.Outstanding Balance")],datasets:[{data:[a,r],backgroundColor:["#4CAF50","#FF9800"],borderWidth:0,borderColor:"transparent",hoverBorderWidth:3,hoverBorderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,aspectRatio:1.5,cutout:"70%",plugins:{legend:{position:"bottom",labels:{padding:20,font:{size:13,weight:"600"},usePointStyle:!0,pointStyle:"circle",generateLabels:u=>{let d=u.data;return d.labels.length&&d.datasets.length?d.labels.map((g,_)=>{let y=d.datasets[0].data[_];return{text:`${g}: ${y.toFixed(1)}%`,fillStyle:d.datasets[0].backgroundColor[_],hidden:!1,index:_}}):[]}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",padding:12,titleFont:{size:14,weight:"bold"},bodyFont:{size:13},callbacks:{label:function(u){let d=u.label||"",g=u.parsed||0;return`${d}: ${g.toFixed(1)}%`}}}}}})}createPaymentsChart(){if(!this.paymentsChartCanvas)return;this.paymentsChart&&this.paymentsChart.destroy();let i=this.paymentsChartCanvas.nativeElement.getContext("2d");if(!i)return;let a=this.loanData?.repaymentSchedule?.periods||[],r=[],u=[],d=[];a.forEach(g=>{g.period&&g.period>0&&(r.push(`${this.translate.instant("labels.inputs.Period")} ${g.period}`),u.push(g.principalDue||0),d.push(g.interestDue||0))}),this.paymentsChart=new Lp(i,{type:"bar",data:{labels:r.slice(0,10),datasets:[{label:this.translate.instant("labels.inputs.Principal"),data:u.slice(0,10),backgroundColor:"#2196F3",borderWidth:0,borderRadius:8,barThickness:24},{label:this.translate.instant("labels.inputs.Interest"),data:d.slice(0,10),backgroundColor:"#FFC107",borderWidth:0,borderRadius:8,barThickness:24}]},options:{responsive:!0,maintainAspectRatio:!0,aspectRatio:2,plugins:{legend:{position:"top",labels:{usePointStyle:!0,pointStyle:"circle",padding:15,font:{size:13,weight:"600"}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",padding:12,titleFont:{size:14,weight:"bold"},bodyFont:{size:13},callbacks:{label:function(g){let _=g.dataset.label||"",y=g.parsed.y||0;return`${_}: ${y.toLocaleString()}`}}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{font:{size:11}}},y:{stacked:!0,beginAtZero:!0,grid:{color:"rgba(0, 0, 0, 0.05)"},ticks:{font:{size:11}}}}}})}ngOnDestroy(){this.initTimeout!==null&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.routeDataSubscription&&this.routeDataSubscription.unsubscribe(),this.langChangeSubscription&&this.langChangeSubscription.unsubscribe(),this.statusChart&&this.statusChart.destroy(),this.paymentsChart&&this.paymentsChart.destroy()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-account-dashboard"]],viewQuery:function(i,a){if(i&1&&(ri(gk,5),ri(_k,5)),i&2){let r;li(r=si())&&(a.statusChartCanvas=r.first),li(r=si())&&(a.paymentsChartCanvas=r.first)}},decls:63,vars:41,consts:[["statusChart",""],["paymentsChart",""],[1,"dashboard-container"],[1,"dashboard-header-card"],[1,"header"],[1,"metrics-grid"],[1,"metric-card"],[1,"metric-label"],[1,"metric-value"],[1,"metric-value","success"],[1,"metric-progress"],[1,"progress-bar"],[1,"metric-value","warning"],[1,"charts-grid"],[1,"chart-card"],[1,"chart-container"],[1,"no-data-message"]],template:function(i,a){i&1&&(s(0,"div",2)(1,"mat-card",3)(2,"mat-card-header",4)(3,"h3"),c(4),p(5,"translate"),l()()(),s(6,"div",5)(7,"mat-card",6)(8,"mat-card-content")(9,"div",7),c(10),p(11,"translate"),l(),s(12,"div",8),c(13),p(14,"number"),l()()(),s(15,"mat-card",6)(16,"mat-card-content")(17,"div",7),c(18),p(19,"translate"),l(),s(20,"div",9),c(21),p(22,"number"),l(),s(23,"div",10),P(24,"div",11),l()()(),s(25,"mat-card",6)(26,"mat-card-content")(27,"div",7),c(28),p(29,"translate"),l(),s(30,"div",12),c(31),p(32,"number"),l()()(),s(33,"mat-card",6)(34,"mat-card-content")(35,"div",7),c(36),p(37,"translate"),l(),s(38,"div",8),c(39),p(40,"number"),l()()()(),s(41,"div",13)(42,"mat-card",14)(43,"mat-card-header")(44,"mat-card-title"),c(45),p(46,"translate"),l()(),s(47,"mat-card-content")(48,"div",15),P(49,"canvas",null,0),M(51,Ck,3,3,"div",16),l()()(),s(52,"mat-card",14)(53,"mat-card-header")(54,"mat-card-title"),c(55),p(56,"translate"),l()(),s(57,"mat-card-content")(58,"div",15),P(59,"canvas",null,1),M(61,bk,3,3,"div",16)(62,vk,3,3,"div",16),l()()()()()),i&2&&(o(4),b(" ",m(5,15,"labels.heading.Loan Dashboard")," "),o(6),C(m(11,17,"labels.inputs.Principal Amount")),o(3),C(Ee(14,19,a.principalAmount,"1.2-2")),o(5),C(m(19,22,"labels.inputs.Total Repaid")),o(3),C(Ee(22,24,a.totalRepaid,"1.2-2")),o(3),Vf("width",a.progressPercentage,"%"),o(4),C(m(29,27,"labels.inputs.Outstanding Balance")),o(3),C(Ee(32,29,a.outstandingBalance,"1.2-2")),o(5),C(m(37,32,"labels.inputs.Interest Charged")),o(3),C(Ee(40,34,a.interestCharged,"1.2-2")),o(6),b(" ",m(46,37,"labels.heading.Repayment Progress")," "),o(6),O(a.loanData?-1:51),o(4),b(" ",m(56,39,"labels.heading.Payment Schedule")," "),o(6),O(a.loanData?!(a.loanData.repaymentSchedule!=null&&a.loanData.repaymentSchedule.periods)||a.loanData.repaymentSchedule.periods.length===0?62:-1:61))},dependencies:[wt,Pt,ge,Te,bp,Cp,_p,Tt],styles:[".dashboard-container[_ngcontent-%COMP%]{padding:20px;background:linear-gradient(135deg,#0d47a1,#1565c0,#1976d2)}.dashboard-header-card[_ngcontent-%COMP%]{margin-bottom:24px;padding:0;border:none;background:#ffffff1a;backdrop-filter:blur(10px)}.dashboard-header-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:16px 24px;background:transparent;border-bottom:1px solid rgba(255,255,255,.2)}.dashboard-header-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:#fff;font-size:22px;font-weight:600;display:flex;align-items:center}.dashboard-header-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:#fff}.metrics-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:20px;margin-bottom:24px}.metrics-grid[_ngcontent-%COMP%] .metric-card[_ngcontent-%COMP%]{flex:1 1 250px;min-width:250px}.metric-card[_ngcontent-%COMP%]{background:#fffffff2;border:none;border-radius:16px;box-shadow:0 8px 24px #00000026;transition:all .3s ease}.metric-card[_ngcontent-%COMP%]:hover{transform:translateY(-4px);box-shadow:0 12px 32px #0003}.metric-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px}.metric-card[_ngcontent-%COMP%] .metric-label[_ngcontent-%COMP%]{font-size:12px;color:#666;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;font-weight:600}.metric-card[_ngcontent-%COMP%] .metric-value[_ngcontent-%COMP%]{font-size:32px;font-weight:700;color:#1976d2;margin-bottom:12px}.metric-card[_ngcontent-%COMP%] .metric-value.success[_ngcontent-%COMP%]{color:#4caf50}.metric-card[_ngcontent-%COMP%] .metric-value.warning[_ngcontent-%COMP%]{color:#ff9800}.metric-card[_ngcontent-%COMP%] .metric-progress[_ngcontent-%COMP%]{margin-top:12px;height:8px;background:linear-gradient(90deg,#e3f2fd,#bbdefb);border-radius:4px;overflow:hidden}.metric-card[_ngcontent-%COMP%] .metric-progress[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{height:100%;background:linear-gradient(90deg,#4caf50,#66bb6a);transition:width .6s ease;box-shadow:0 2px 8px #4caf504d}.charts-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:24px}.charts-grid[_ngcontent-%COMP%] .chart-card[_ngcontent-%COMP%]{flex:1 1 450px;min-width:450px}.chart-card[_ngcontent-%COMP%]{background:#fffffff2;border:none;border-radius:16px;box-shadow:0 8px 24px #00000026;overflow:hidden}.chart-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding:20px 24px;border-bottom:1px solid #e0e0e0;background:linear-gradient(135deg,#f5f5f5,#fafafa)}.chart-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1976d2;display:flex;align-items:center;gap:10px;margin:0}.chart-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:#1976d2}.chart-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px;background:#fff}.chart-card[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%]{width:100%;height:350px;position:relative}.chart-card[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{max-width:100%;height:auto!important}.chart-card[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%] .no-data-message[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#999;font-size:14px;text-align:center;font-weight:500}@media (width <= 768px){.metrics-grid[_ngcontent-%COMP%] .metric-card[_ngcontent-%COMP%], .charts-grid[_ngcontent-%COMP%] .chart-card[_ngcontent-%COMP%]{flex:1 1 100%;min-width:100%}.dashboard-container[_ngcontent-%COMP%]{padding:12px}}"]})}}return t})();var Fl=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getLoanAccountAssociationDetails(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Mu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanNotes(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Ou=(()=>{class t{constructor(){this.loansService=A(At)}resolve(){return this.loansService.getLoanDataTables()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Iu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.parent.paramMap.get("loanId"),a=e.paramMap.get("datatableName");return this.loansService.getLoanDatatable(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Eu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId"),a=e.paramMap.get("action");return a==="Assign Loan Officer"||a==="Change Loan Officer"?this.loansService.getLoanTemplate(i):a==="Make Repayment"?this.loansService.getLoanActionTemplate(i,"repayment"):a==="Goodwill Credit"?this.loansService.getLoanActionTemplate(i,"goodwillCredit"):a==="Interest Payment Waiver"?this.loansService.getLoanActionTemplate(i,"interestPaymentWaiver"):a==="Payout Refund"?this.loansService.getLoanActionTemplate(i,"payoutRefund"):a==="Merchant Issued Refund"?this.loansService.getLoanActionTemplate(i,"merchantIssuedRefund"):a==="Credit Balance Refund"?this.loansService.getLoanActionTemplate(i,"creditBalanceRefund"):a==="Waive Interest"?this.loansService.getLoanActionTemplate(i,"waiveinterest"):a==="Write Off"?this.loansService.getLoanActionTemplate(i,"writeoff"):a==="Close"?this.loansService.getLoanActionTemplate(i,"close"):a==="Close (as Rescheduled)"?this.loansService.getLoanActionTemplate(i,"close-rescheduled"):a==="Reschedule"?this.loansService.rescheduleLoanTemplate():a==="Prepay Loan"?this.loansService.getLoanPrepayLoanActionTemplate(i,null):a==="Add Collateral"?this.loansService.getLoanCollateralTemplate(i):a==="Disburse to Savings"?this.loansService.getLoanActionTemplate(i,"disburseToSavings"):a==="Recovery Payment"?this.loansService.getLoanActionTemplate(i,"recoverypayment"):a==="View Guarantors"?this.loansService.getLoanAccountResource(i,"guarantors"):a==="Create Guarantor"?this.loansService.getGuarantorTemplate(i):a==="Disburse"?this.loansService.getLoanActionTemplate(i,"disburse"):a==="Loan Screen Reports"?this.loansService.getLoanScreenReportsData():a==="Approve"?this.loansService.getLoanApprovalTemplate(i):a==="Add Loan Charge"?this.loansService.getLoanChargeTemplateResource(i):a==="Foreclosure"?this.loansService.getLoanForeclosureActionTemplate(i):a==="Charge-Off"?this.loansService.getLoanActionTemplate(i,"charge-off"):a==="Capitalized Income"?this.loansService.getLoanActionTemplate(i,"capitalizedIncome"):a==="Contract Termination"?this.loansService.getLoanActionTemplate(i,"contractTermination"):a==="Buy Down Fee"?this.loansService.getLoanActionTemplate(i,"buyDownFee"):a==="Re-Age"?this.loansService.getLoanActionTemplate(i,"reAge"):a==="Re-Amortize"?this.loansService.getLoanActionTemplate(i,"reAmortization"):void 0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Lu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.parent.parent.paramMap.get("clientId")||e.parent.parent.paramMap.get("groupId"),a=!!e.parent.parent.paramMap.get("groupId");return this.loansService.getLoansAccountTemplateResource(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var ku=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanDocuments(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var D0=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoansAccountAndTemplateResource(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var w0=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountCharge(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Fu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransaction(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Nu=(()=>{class t{constructor(){this.reportsService=A(kp)}resolve(e){let a={"output-type":"PDF",R_transactionId:e.paramMap.get("id")};return this.reportsService.getPentahoRunReportData("Loan Transaction Receipt",a,"default","en","dd MMMM yyyy")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Ru=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransactionTemplate(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Bu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("groupId"),a=e.paramMap.get("glimId");return this.loansService.getGLIMAccountData(a,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var qu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("groupId");return this.loansService.getGLIMLoanAccountTemplate(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var zu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyTags(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var xk=t=>({data:t});function yk(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function Sk(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.End Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}var P0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Pe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.createDelinquencyActionForm()}createDelinquencyActionForm(){this.delinquencyActionForm=this.formBuilder.group({startDate:[new Date,Wt.required],endDate:["",Wt.required]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-action-dialog"]],decls:29,vars:30,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column",3,"formGroup"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","endDate",3,"min","max","matDatepicker"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close","disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"h2",2),c(1),p(2,"translate"),l(),s(3,"div",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Et(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,yk,7,9,"mat-error"),l(),s(13,"mat-form-field",4),it("click",function(){lt(r);let d=Et(20);return st(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",7)(18,"mat-datepicker-toggle",6)(19,"mat-datepicker",null,1),M(21,Sk,7,9,"mat-error"),l()(),s(22,"mat-dialog-actions",8)(23,"button",9),c(24),p(25,"translate"),l(),s(26,"button",10),c(27),p(28,"translate"),l()()}if(i&2){let r=Et(11),u=Et(20);o(),C(m(2,18,"labels.heading.Loan Delinquency Actions")),o(2),x("formGroup",a.delinquencyActionForm),o(3),C(m(7,20,"labels.inputs.Start Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.delinquencyActionForm.controls.startDate.hasError("required")?12:-1),o(3),C(m(16,22,"labels.inputs.End Date")),o(2),x("min",a.delinquencyActionForm.value.startDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.delinquencyActionForm.controls.endDate.hasError("required")?21:-1),o(3),C(m(25,24,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",ka(28,xk,a.delinquencyActionForm))("disabled",!a.delinquencyActionForm.valid||a.delinquencyActionForm.pristine),o(),b(" ",m(28,26,"labels.buttons.Submit")," ")}},dependencies:[wt,Pt,we,he,Le,je,ke,Fe,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();function Dk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Delinquency Classification")))}function wk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),$t("( ",e.delinquencyRange.minimumAgeDays," - ",e.delinquencyRange.maximumAgeDays," )")}}function Pk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),b("( ",e.delinquencyRange.minimumAgeDays," )")}}function Tk(t,n){if(t&1&&(s(0,"td",12),c(1),M(2,wk,2,2,"span"),M(3,Pk,2,1,"span"),l()),t&2){let e=n.$implicit;o(),b(" ",e.delinquencyRange.classification," "),o(),O(e.delinquencyRange.maximumAgeDays?2:-1),o(),O(e.delinquencyRange.maximumAgeDays?-1:3)}}function Ak(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Added On")))}function Mk(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.addedOnDate)," ")}}function Ok(t,n){if(t&1&&(s(0,"td",12),M(1,Mk,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.addedOnDate?1:-1)}}function Ik(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Lifted On")))}function Ek(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.liftedOnDate)," ")}}function Lk(t,n){if(t&1&&(s(0,"td",12),M(1,Ek,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.liftedOnDate?1:-1)}}function kk(t,n){t&1&&P(0,"tr",13)}function Fk(t,n){t&1&&P(0,"tr",14)}function Nk(t,n){if(t&1&&(s(0,"table",1),X(1,4),F(2,Dk,3,3,"th",5)(3,Tk,4,3,"td",6),Q(),X(4,7),F(5,Ak,3,3,"th",5)(6,Ok,2,1,"td",6),Q(),X(7,8),F(8,Ik,3,3,"th",5)(9,Lk,2,1,"td",6),Q(),F(10,kk,1,0,"tr",9)(11,Fk,1,0,"tr",10),l()),t&2){let e=T();x("dataSource",e.loanDelinquencyTags),o(10),x("matHeaderRowDef",e.loanDelinquencyTagsColumns),o(),x("matRowDefColumns",e.loanDelinquencyTagsColumns)}}function Rk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Delinquency Classification")))}function Bk(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),C(e.classification)}}function qk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Days")))}function zk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.minimumAgeDays))}}function jk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function Vk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.delinquentAmount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Uk(t,n){t&1&&P(0,"tr",13)}function Hk(t,n){t&1&&P(0,"tr",14)}function Gk(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,4),F(6,Rk,3,3,"th",5)(7,Bk,2,1,"td",6),Q(),X(8,15),F(9,qk,3,3,"th",5)(10,zk,3,3,"td",6),Q(),X(11,16),F(12,jk,3,3,"th",5)(13,Vk,3,6,"td",6),Q(),F(14,Uk,1,0,"tr",9)(15,Hk,1,0,"tr",10),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Loan Delinquency Installment Tags")),o(2),x("dataSource",e.installmentLevelDelinquency),o(10),x("matHeaderRowDef",e.installmentDelinquencyTagsColumns),o(),x("matRowDefColumns",e.installmentDelinquencyTagsColumns)}}function Wk(t,n){if(t&1){let e=Ct();s(0,"button",18),it("click",function(){lt(e);let a=T(2);return st(a.createDelinquencyAction())}),P(1,"fa-icon",19),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Pause Delinquency Classification")," "))}function $k(t,n){t&1&&(s(0,"div",2),F(1,Wk,4,3,"button",17),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function Yk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Action")))}function Kk(t,n){if(t&1&&(s(0,"td",26),c(1),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",ce(i.actionClass(e.action))),o(),C(e.action)}}function Zk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Start Date")))}function Jk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.startDate))}}function Xk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.End Date")))}function Qk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.endDate))}}function tF(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Created On")))}function eF(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"datetimeFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.createdOn))}}function nF(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function iF(t,n){if(t&1){let e=Ct();s(0,"button",28),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T(2);return st(r.resumeDelinquencyClassification(a))}),P(2,"fa-icon",29),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Resume Delinquency Classification")))}function aF(t,n){t&1&&(s(0,"span"),F(1,iF,3,4,"button",27),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function oF(t,n){if(t&1&&(s(0,"td",12),M(1,aF,2,1,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isCurrentAndPauseAction(e)?1:-1)}}function rF(t,n){t&1&&P(0,"tr",13)}function lF(t,n){t&1&&P(0,"tr",14)}function sF(t,n){if(t&1&&(s(0,"div",3)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,20),F(6,Yk,3,3,"th",5)(7,Kk,2,3,"td",21),Q(),X(8,22),F(9,Zk,3,3,"th",5)(10,Jk,3,3,"td",6),Q(),X(11,23),F(12,Xk,3,3,"th",5)(13,Qk,3,3,"td",6),Q(),X(14,24),F(15,tF,3,3,"th",5)(16,eF,3,3,"td",6),Q(),X(17,25),F(18,nF,3,3,"th",5)(19,oF,2,1,"td",6),Q(),F(20,rF,1,0,"tr",9)(21,lF,1,0,"tr",10),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Loan Delinquency Actions")),o(2),x("dataSource",e.loanDelinquencyActions),o(16),x("matHeaderRowDef",e.loanDelinquencyActionsColumns),o(),x("matRowDefColumns",e.loanDelinquencyActionsColumns)}}var T0=(()=>{class t{constructor(){this.route=A(It),this.loansServices=A(At),this.dateUtils=A(me),this.settingsService=A(oe),this.translateService=A(Qi),this.dialog=A(Gn),this.loanDelinquencyTags=[],this.loanDelinquencyActions=[],this.installmentLevelDelinquency=[],this.loanDelinquencyTagsColumns=["classification","addedOn","liftedOn"],this.loanDelinquencyActionsColumns=["action","startDate","endDate","createdOn","actions"],this.installmentDelinquencyTagsColumns=["classification","minimumAgeDays","amount"],this.allowPause=!0,this.loanId=this.route.parent.parent.snapshot.params.loanId,this.route.parent.data.subscribe(e=>{this.loanDelinquencyTags=e.loanDelinquencyTagsData,this.loanDelinquencyActions=e.loanDelinquencyActions||[],this.validateDelinquencyActions();let i=e.loanDelinquencyData.delinquent||null;this.currency=e.loanDelinquencyData.currency,this.installmentLevelDelinquency=[],i!=null&&(this.installmentLevelDelinquency=i.installmentLevelDelinquency||[])})}ngOnInit(){this.locale=this.settingsService.language.code,this.dateFormat=this.settingsService.dateFormat,this.currentLoanDelinquencyAction=null,this.validateDelinquencyActions()}validateDelinquencyActions(){if(this.loanDelinquencyActions.length>0){let e=this.settingsService.businessDate;this.currentLoanDelinquencyAction=this.loanDelinquencyActions[this.loanDelinquencyActions.length-1],this.allowPause=this.currentLoanDelinquencyAction.action==="RESUME"}}createDelinquencyAction(){let e="pause";this.dialog.open(P0,{data:{action:e}}).afterClosed().subscribe(a=>{let r=a.data.value.startDate,u=a.data.value.endDate;this.sendDelinquencyAction(e,r,u)})}resumeDelinquencyClassification(e){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Loan Delinquency Classification"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want resume the Delinquency Classification for Loan")+this.loanId,type:"Mild"}}).afterClosed().subscribe(a=>{a.confirm&&this.sendDelinquencyAction("resume",new Date,null)})}sendDelinquencyAction(e,i,a){let r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat)};e==="pause"&&(r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat),endDate:this.dateUtils.formatDate(a,this.dateFormat)}),this.loansServices.createDelinquencyActions(this.loanId,r).subscribe(u=>{this.loansServices.getDelinquencyActions(this.loanId).subscribe(d=>{this.loanDelinquencyActions=d,this.validateDelinquencyActions()})})}isCurrentAndPauseAction(e){if(this.currentLoanDelinquencyAction!=null&&this.currentLoanDelinquencyAction.id===e.id&&e.action==="PAUSE"){let i=this.settingsService.businessDate,a=this.dateUtils.parseDate(e.startDate);if(ir)return this.allowPause=!0,!1}return!0}return!1}actionClass(e){return e==="PAUSE"?"status-pending":"status-active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-tags-tab"]],decls:8,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],[1,"layout-row","m-t-20","m-b-10","align-end","align-items-center"],[1,"m-t-10"],["matColumnDef","classification"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addedOn"],["matColumnDef","liftedOn"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["matColumnDef","minimumAgeDays"],["matColumnDef","amount"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","pause",1,"m-r-10"],["matColumnDef","action"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","createdOn"],["matColumnDef","actions"],["mat-cell","",3,"ngClass"],["mat-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-button","","color","primary",3,"click","matTooltip"],["icon","play",1,"m-r-10"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,Nk,12,3,"table",1),M(5,Gk,16,6,"div"),M(6,$k,2,1,"div",2),M(7,sF,22,6,"div",3),l()),i&2&&(o(2),C(m(3,5,"labels.heading.Loan Delinquency Tags")),o(2),O(a.loanDelinquencyTags.length>0?4:-1),o(),O(a.installmentLevelDelinquency.length>0?5:-1),o(),O(a.allowPause?6:-1),o(),O(a.loanDelinquencyActions.length>0?7:-1))},dependencies:[wt,pa,Pt,Gt,Me,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,un,Oi,Sa,gn,Tt,f1,fn],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var Ig=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.loanRescheduleRequests(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var cF=()=>["../actions/Reschedule"];function pF(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function mF(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),C(e.id)}}function dF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function uF(t,n){if(t&1&&(s(0,"td",14)(1,"div",15),p(2,"statusLookup"),P(3,"fa-icon",16),s(4,"span",17),c(5),p(6,"translate"),l()()()),t&2){let e=n.$implicit;o(),x("ngClass",m(2,2,e.statusEnum.code)),o(4),b(" ",m(6,4,e.statusEnum.value)," ")}}function fF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.From Date")))}function hF(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.rescheduleFromDate)," ")}}function gF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Reason")))}function _F(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.rescheduleReasonCodeValue.name," ")}}function CF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function bF(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",18),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Reject"))}),P(3,"fa-icon",19),l(),s(4,"button",20),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Approve"))}),P(6,"fa-icon",21),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Reject Reschedule"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Approve Reschedule"))))}function vF(t,n){if(t&1&&(s(0,"td",14),M(1,bF,7,8,"span"),l()),t&2){let e=n.$implicit;o(),O(e.statusEnum.pendingApproval?1:-1)}}function xF(t,n){t&1&&P(0,"tr",22)}function yF(t,n){t&1&&P(0,"tr",23)}var A0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansServices=A(At),this.settingsService=A(oe),this.dateUtils=A(me),this.translateService=A(Qi),this.dialog=A(Gn),this.loanRescheduleDataColumns=["id","rescheduleFromDate","reason","status","actions"],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.parent.data.subscribe(e=>{this.loanRescheduleData=e.loanRescheduleData})}manageRequest(e,i){this.dialog.open(ma,{data:{heading:`${i}`+this.translateService.instant("labels.heading.Loan Reschedule"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want")+`${i}`+this.translateService.instant("labels.dialogContext.the Loan Reschedule")+`${e.id}`}}).afterClosed().subscribe(r=>{if(r.confirm){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g={dateFormat:d,locale:u};i==="Approve"?g.approvedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d):g.rejectedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d),this.loansServices.applyCommandLoanRescheduleRequests(e.id,i.toLowerCase(),g).subscribe(_=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-reschedule-loan-tab"]],inputs:{loanStatus:"loanStatus"},decls:23,vars:8,consts:[[1,"container"],[1,"layout-row","gap-20px","align-end","align-items-center","action-buttons"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","rescheduleFromDate"],["matColumnDef","reason"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[3,"ngClass"],["icon","stop"],[1,"m-l-10","status"],["mat-raised-button","","color","warn","matTooltipPosition","left",1,"action-button",3,"click","matTooltip"],["icon","trash"],["mat-raised-button","","color","primary","matTooltipPosition","right",1,"action-button",3,"click","matTooltip"],["icon","check"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"button",2),c(3),p(4,"translate"),l()(),s(5,"table",3),X(6,4),F(7,pF,2,0,"th",5)(8,mF,2,1,"td",6),Q(),X(9,7),F(10,dF,3,3,"th",5)(11,uF,7,6,"td",6),Q(),X(12,8),F(13,fF,3,3,"th",5)(14,hF,3,3,"td",6),Q(),X(15,9),F(16,gF,3,3,"th",5)(17,_F,2,1,"td",6),Q(),X(18,10),F(19,CF,3,3,"th",5)(20,vF,2,1,"td",6),Q(),F(21,xF,1,0,"tr",11)(22,yF,1,0,"tr",12),l()()),i&2&&(o(2),x("routerLink",Ut(7,cF)),o(),b(" ",m(4,5,"labels.buttons.Reschedule")," "),o(2),x("dataSource",a.loanRescheduleData),o(16),x("matHeaderRowDef",a.loanRescheduleDataColumns),o(),x("matRowDefColumns",a.loanRescheduleDataColumns))},dependencies:[wt,pa,Pt,ae,Gt,_n,vn,bn,xn,Cn,yn,un,Oi,Sn,wn,Dn,Pn,gn,Tt,Ip],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}"]})}}return t})();var SF=()=>["../.."];function DF(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function wF(t,n){if(t&1&&(s(0,"mat-option",9),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function PF(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",19),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",20),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",21),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",22),l()),t&2&&(o(2),b(" ",m(3,5,"labels.inputs.Account")," #"),o(5),b("",m(8,7,"labels.inputs.Cheque")," #"),o(5),C(m(13,9,"labels.inputs.Routing Code")),o(5),b("",m(18,11,"labels.inputs.Reciept")," #"),o(5),b("",m(23,13,"labels.inputs.Bank")," #"))}function TF(t,n){if(t&1&&(s(0,"button",23),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.adjustLoanChargeForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var M0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.settingsService=A(oe),this.organizationService=A(Np),this.paymentTypes=[],this.chargeData=[],this.loanDetailsData=[],this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId,this.chargeId=this.route.snapshot.params.id,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.maxDate=this.settingsService.maxAllowedDate,this.createAdjustLoanChargeForm(),this.setRepaymentLoanDetails()}createAdjustLoanChargeForm(){this.adjustLoanChargeForm=this.formBuilder.group({amount:[this.chargeData.amount,Wt.required],externalId:"",paymentTypeId:"",note:""})}setRepaymentLoanDetails(){this.organizationService.getPaymentTypes().subscribe(e=>{this.paymentTypes=e})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.adjustLoanChargeForm.addControl("accountNumber",new pe("")),this.adjustLoanChargeForm.addControl("checkNumber",new pe("")),this.adjustLoanChargeForm.addControl("routingCode",new pe("")),this.adjustLoanChargeForm.addControl("receiptNumber",new pe("")),this.adjustLoanChargeForm.addControl("bankNumber",new pe(""))):(this.adjustLoanChargeForm.removeControl("accountNumber"),this.adjustLoanChargeForm.removeControl("checkNumber"),this.adjustLoanChargeForm.removeControl("routingCode"),this.adjustLoanChargeForm.removeControl("receiptNumber"),this.adjustLoanChargeForm.removeControl("bankNumber"))}submit(){let e=this.adjustLoanChargeForm.value,i=this.settingsService.language.code,a=Se(ie({},e),{locale:i});this.loanService.executeLoansAccountChargesCommand(this.loanId,"adjustment",a,this.chargeId).subscribe(u=>{this.router.navigate(["../.."],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-adjust-loan-charge"]],decls:44,vars:26,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["appearance","fill"],["matTextSuffix","",1,"m-l-10"],[1,"flex-auto"],["type","number","matInput","","required","","formControlName","amount",1,"right-input"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"span",4),c(10),l(),P(11,"span",5)(12,"input",6),M(13,DF,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),de(24,wF,2,2,"mat-option",9,xe),l()(),s(26,"div",10)(27,"span",11),it("click",function(){return a.addPaymentDetails()}),s(28,"mat-slide-toggle")(29,"div",12)(30,"span",13),c(31),p(32,"translate"),l()()()()(),M(33,PF,25,15),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),P(38,"textarea",14),l()(),s(39,"mat-card-actions",15)(40,"button",16),c(41),p(42,"translate"),l(),F(43,TF,3,4,"button",17),l()()()()()),i&2&&(o(2),x("formGroup",a.adjustLoanChargeForm),o(5),C(m(8,13,"labels.inputs.Amount")),o(3),C(a.loanDetailsData.currency.code),o(3),O(a.adjustLoanChargeForm.controls.amount.hasError("required")?13:-1),o(3),C(m(17,15,"labels.inputs.External Id")),o(5),C(m(22,17,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),C(m(32,19,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?33:-1),o(3),C(m(37,21,"labels.inputs.Note")),o(4),x("routerLink",Ut(25,SF)),o(),b(" ",m(42,23,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE"))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,Gt,Me,za,Wn,Tt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var Eg=(()=>{class t{constructor(){this.systemService=A(vp)}resolve(e){return this.systemService.getConfigurationByName("loan-arrears-delinquency-display-data")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var AF=t=>["/","journal-entry","view-transfer",t];function MF(t,n){if(t&1&&(s(0,"div",1)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",6)(5,"table")(6,"tbody")(7,"tr")(8,"td",7)(9,"b"),c(10),p(11,"translate"),l()(),s(12,"td",8)(13,"div",9),P(14,"fa-icon",10),s(15,"span",11),c(16),l()()(),s(17,"td",7)(18,"b"),c(19),p(20,"translate"),l()(),s(21,"td",8),P(22,"mifosx-external-identifier",12),l()(),s(23,"tr")(24,"td",7)(25,"b"),c(26),p(27,"translate"),l()(),s(28,"td",8),c(29),p(30,"dateFormat"),l(),s(31,"td",7)(32,"b"),c(33),p(34,"translate"),l()(),s(35,"td",8),c(36),p(37,"dateFormat"),l()(),s(38,"tr")(39,"td",7)(40,"b"),c(41),p(42,"translate"),l()(),s(43,"td",13)(44,"table")(45,"tbody")(46,"tr")(47,"td",14)(48,"b"),c(49),p(50,"translate"),l()(),s(51,"td",15),c(52),p(53,"formatNumber"),l()(),s(54,"tr")(55,"td",14)(56,"b"),c(57),p(58,"translate"),l()(),s(59,"td",15),c(60),p(61,"formatNumber"),l()(),s(62,"tr")(63,"td",14)(64,"b"),c(65),p(66,"translate"),l()(),s(67,"td",15),c(68),p(69,"formatNumber"),l()(),s(70,"tr")(71,"td",14)(72,"b"),c(73),p(74,"translate"),l()(),s(75,"td",15),c(76),p(77,"formatNumber"),l()(),s(78,"tr")(79,"td",14)(80,"b"),c(81),p(82,"translate"),l()(),s(83,"td",15),c(84),p(85,"formatNumber"),l()(),s(86,"tr")(87,"td",14)(88,"b"),c(89),p(90,"translate"),l()(),s(91,"td",15),c(92),p(93,"formatNumber"),l()()()()()()()()()()),t&2){let e=T();o(2),C(m(3,24,"labels.heading.Active Asset Transfer")),o(8),b("",m(11,26,"labels.inputs.Status")," :"),o(3),x("ngClass",e.itemStatus(e.activeTransferData.status)),o(3),C(e.activeTransferData.status),o(3),b("",m(20,28,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(e.activeTransferData.owner.externalId)),o(4),b("",m(27,30,"labels.inputs.Settlement Date")," :"),o(3),b(" ",m(30,32,e.activeTransferData.settlementDate)," "),o(4),b("",m(34,34,"labels.inputs.Effective Date")," :"),o(3),b(" ",m(37,36,e.activeTransferData.effectiveFrom)," "),o(5),b("",m(42,38,"labels.inputs.Details")," :"),o(8),b("",m(50,40,"labels.inputs.Principal Outstanding")," :"),o(3),b(" ",m(53,42,e.activeTransferData.details.totalPrincipalOutstanding)," "),o(5),b("",m(58,44,"labels.inputs.Interest Outstanding")," :"),o(3),b(" ",m(61,46,e.activeTransferData.details.totalInterestOutstanding)," "),o(5),b("",m(66,48,"labels.inputs.Fees Outstanding")," :"),o(3),b(" ",m(69,50,e.activeTransferData.details.totalFeeChargesOutstanding)," "),o(5),b("",m(74,52,"labels.inputs.Penalties Outstanding")," :"),o(3),b(" ",m(77,54,e.activeTransferData.details.totalPenaltyChargesOutstanding)," "),o(5),b("",m(82,56,"labels.inputs.Outstanding")," :"),o(3),b(" ",m(85,58,e.activeTransferData.details.totalOutstanding)," "),o(5),b("",m(90,60,"labels.inputs.Overpaid")," :"),o(3),C(m(93,62,e.activeTransferData.details.totalOverpaid))}}function OF(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.saleLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Sell Loan")," "))}function IF(t,n){t&1&&(s(0,"div",4),F(1,OF,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function EF(t,n){if(t&1){let e=Ct();s(0,"button",20),it("click",function(){lt(e);let a=T(2);return st(a.cancelSaleLoan())}),P(1,"fa-icon",21),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Cancel Sell Loan")," "))}function LF(t,n){t&1&&(s(0,"div",4),F(1,EF,4,3,"button",19),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function kF(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.buyBackLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Buy Back Loan")," "))}function FF(t,n){t&1&&(s(0,"div",4),F(1,kF,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function NF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function RF(t,n){if(t&1&&(s(0,"td",36)(1,"div",9),P(2,"fa-icon",10),s(3,"span",37),c(4),p(5,"translate"),l()()()),t&2){let e=n.$implicit,i=T(2);o(),x("ngClass",i.itemStatus(e.status)),o(3),b(" ",m(5,2,i.itemCurrentStatus(e))," ")}}function BF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Effective From")))}function qF(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.effectiveFrom))}}function zF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Owner External Id")))}function jF(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.owner.externalId))}}function VF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Transfer External Id")))}function UF(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.transferExternalId))}}function HF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Settlement Date")))}function GF(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.settlementDate))}}function WF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Purchase Price Ratio")))}function $F(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"number"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.purchasePriceRatio))}}function YF(t,n){t&1&&(s(0,"th",39),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function KF(t,n){if(t&1){let e=Ct();s(0,"button",42),p(1,"translate"),it("click",function(a){lt(e);let r=T(3);return st(r.routeJournalEntry(a))}),P(2,"i",43),l()}if(t&2){let e=T().$implicit;x("matTooltip",ce(m(1,3,"tooltips.View Journal Entries")))("routerLink",ka(5,AF,e.transferId))}}function ZF(t,n){if(t&1&&(s(0,"td",40),M(1,KF,3,7,"button",41),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isPendingOrCanceled(e)?-1:1)}}function JF(t,n){t&1&&P(0,"tr",44)}function XF(t,n){t&1&&P(0,"tr",45)}function QF(t,n){if(t&1&&(s(0,"table",5),X(1,22),F(2,NF,3,3,"th",23)(3,RF,6,4,"td",24),Q(),X(4,25),F(5,BF,3,3,"th",23)(6,qF,3,3,"td",24),Q(),X(7,26),F(8,zF,3,3,"th",23)(9,jF,2,2,"td",24),Q(),X(10,27),F(11,VF,3,3,"th",23)(12,UF,2,2,"td",24),Q(),X(13,28),F(14,HF,3,3,"th",23)(15,GF,3,3,"td",24),Q(),X(16,29),F(17,WF,3,3,"th",23)(18,$F,3,3,"td",24),Q(),X(19,30),F(20,YF,3,3,"th",31)(21,ZF,2,1,"td",32),Q(),F(22,JF,1,0,"tr",33)(23,XF,1,0,"tr",34),l()),t&2){let e=T();x("dataSource",e.loanTransfersData),o(22),x("matHeaderRowDef",e.loanTransferColumns),o(),x("matRowDefColumns",e.loanTransferColumns)}}var O0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dialog=A(Gn),this.externalAssetOwner=A(Rp),this.externalAssetOwnerService=A(Wr),this.defaultDate="9999-12-31",this.loanTransfersData=[],this.loanTransferColumns=["status","effectiveFrom","ownerExternalId","transferExternalId","settlementDate","purchasePriceRatio","actions"],this.existActiveTransfer=!1,this.route.data.subscribe(e=>{this.loanTransfersData=e.loanTransfersData.empty?[]:e.loanTransfersData.content,this.activeTransferData=e.activeTransferData||null,this.existActiveTransfer=e.activeTransferData&&e.activeTransferData.transferId!=null})}ngOnInit(){this.currentItem=null,this.loanTransfersData.length>0&&(this.currentItem=this.loanTransfersData[this.loanTransfersData.length-1])}itemCurrentStatus(e){return this.externalAssetOwner.itemCurrentStatus(e)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}isPending(e){return this.externalAssetOwner.isPending(e)}isPendingOrCanceled(e){return this.externalAssetOwner.isPendingOrCanceled(e)}isBuyBackPending(e){return this.externalAssetOwner.isBuyBackPending(e)}canBeCancelled(){return this.externalAssetOwner.validateStatus(this.currentItem,"PENDING")}canBeSold(){return this.externalAssetOwner.canBeSold(this.currentItem)}canBeBuyed(){return this.externalAssetOwner.validateStatus(this.currentItem,"ACTIVE")}saleLoan(){this.router.navigate(["../actions/Sell Loan"],{relativeTo:this.route})}cancelSaleLoan(){this.dialog.open(o1,{data:{cancelContext:`the Asset Transfer with the Owner External Id ${this.currentItem.owner.externalId} `}}).afterClosed().subscribe(i=>{if(i.cancel){let a={transferExternalId:this.currentItem.transferExternalId};this.externalAssetOwnerService.executeExternalAssetOwnerTransferCommand(this.currentItem.transferId,a,"cancel").subscribe(r=>{this.reload()})}})}buyBackLoan(){this.router.navigate(["../actions/Buy Back Loan"],{relativeTo:this.route})}routeJournalEntry(e){e.stopPropagation()}reload(){let e=this.router.url;this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-owner-tab"]],decls:10,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"flex-fill"],[1,"layout-row","align-start-center"],[1,"flex-90"],[1,"flex-10"],["mat-table","","mat-sort","",3,"dataSource"],[1,"layout-row","gap-32px","asset-transfer-container"],[1,"flex-25"],[1,"flex-25","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-10","external-asset-owner-status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50"],[1,"flex-50","r-amount"],["mat-raised-button","","class","f-right","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["icon","dollar-sign",1,"m-r-10"],["mat-raised-button","","class","f-right","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"f-right",3,"click"],["icon","trash",1,"m-r-10"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","effectiveFrom"],["matColumnDef","ownerExternalId"],["matColumnDef","transferExternalId"],["matColumnDef","settlementDate"],["matColumnDef","purchasePriceRatio"],["matColumnDef","actions"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","center td-min-space",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"m-l-10","status"],[3,"externalId"],["mat-header-cell","",1,"center"],["mat-cell","",1,"center","td-min-space"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"matTooltip","routerLink"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"click","matTooltip","routerLink"],[1,"fa","fa-arrow-circle-right"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),M(1,MF,94,64,"div",1),s(2,"div",2)(3,"h3",3),c(4),p(5,"translate"),l(),M(6,IF,2,1,"div",4),M(7,LF,2,1,"div",4),M(8,FF,2,1,"div",4),l(),M(9,QF,24,3,"table",5),l()),i&2&&(o(),O(a.existActiveTransfer?1:-1),o(3),C(m(5,6,"labels.heading.External Asset Owner")),o(2),O(a.canBeSold()?6:-1),o(),O(a.canBeCancelled()?7:-1),o(),O(a.canBeBuyed()?8:-1),o(),O(a.loanTransfersData.length>0?9:-1))},dependencies:[wt,pa,Pt,ae,Gt,Me,un,Va,_n,vn,bn,xn,Cn,yn,Oi,Sn,wn,Dn,Pn,_p,gn,Tt,fn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1% 1% 2%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.tab-container[_ngcontent-%COMP%] .asset-transfer-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.external-asset-owner-status[_ngcontent-%COMP%]{color:#000}.account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}"]})}}return t})();var ju=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransfers(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Lg=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerActiveTransfer(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kg=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanCollaterals(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Vu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Fg=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyActions(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function tN(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function eN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.index;o(),C(e+1)}}function nN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Start Date")))}function iN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.termVariationApplicableFrom))}}function aN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.End Date")))}function oN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.dateValue))}}function rN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Value")))}function lN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.decimalValue))}}function sN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Days")))}function cN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.days))}}function pN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function mN(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Edit"))}),P(3,"fa-icon",16),l(),s(4,"button",17),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Delete"))}),P(6,"fa-icon",18),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Edit"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Delete"))))}function dN(t,n){if(t&1&&(s(0,"td",14),M(1,mN,7,8,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.allowActions(e.termType.value)?1:-1)}}function uN(t,n){t&1&&P(0,"tr",19)}function fN(t,n){t&1&&P(0,"tr",20)}function hN(t,n){if(t&1&&(s(0,"div")(1,"h3",1),c(2),p(3,"translate"),l(),s(4,"table",2),X(5,3),F(6,tN,2,0,"th",4)(7,eN,2,1,"td",5),Q(),X(8,6),F(9,nN,3,3,"th",4)(10,iN,3,3,"td",5),Q(),X(11,7),F(12,aN,3,3,"th",4)(13,oN,3,3,"td",5),Q(),X(14,8),F(15,rN,3,3,"th",4)(16,lN,3,3,"td",5),Q(),X(17,9),F(18,sN,3,3,"th",4)(19,cN,3,3,"td",5),Q(),X(20,10),F(21,pN,3,3,"th",4)(22,dN,2,1,"td",5),Q(),F(23,uN,1,0,"tr",11)(24,fN,1,0,"tr",12),l()()),t&2){let e=n.$implicit,i=T();o(2),C(m(3,4,"labels.heading."+e.label)),o(2),x("dataSource",e.data),o(19),x("matHeaderRowDef",i.loanDTermVariationsColumns),o(),x("matRowDefColumns",i.loanDTermVariationsColumns)}}var I0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dates=A(me),this.settingsService=A(oe),this.loansService=A(At),this.dialog=A(Gn),this.loanTermVariationsData=[],this.loanDTermVariationsColumns=["row","startDate","endDate","days","actions"],this.emiAmountData=[],this.interestRateData=[],this.dueDateData=[],this.deleteInstallmentData=[],this.insertInstallmentData=[],this.principalAmountData=[],this.graceOnInterestData=[],this.graceOnPrincipalData=[],this.extendRepaymentPeriodData=[],this.interestRateFromInstallmentData=[],this.interestPausesData=[],this.invalidData=[];let e=this.dates;this.interestPausesData=[],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.data.subscribe(i=>{this.loanId=i.loanDetailsData.id,this.loanTermVariationsData=[],i.loanDetailsData.loanTermVariations?.forEach(a=>{switch(a.days=e.calculateDiff(new Date(a.termVariationApplicableFrom),new Date(a.dateValue))+1,a.termType.value){case"emiAmount":this.emiAmountData.push(a);break;case"interestRate":this.interestRateData.push(a);break;case"deleteInstallment":this.deleteInstallmentData.push(a);break;case"dueDate":this.dueDateData.push(a);break;case"insertInstallment":this.insertInstallmentData.push(a);break;case"principalAmount":this.principalAmountData.push(a);break;case"graceOnInterest":this.graceOnInterestData.push(a);break;case"graceOnPrincipal":this.graceOnPrincipalData.push(a);break;case"extendRepaymentPeriod":this.extendRepaymentPeriodData.push(a);break;case"interestRateForInstallment":this.interestRateFromInstallmentData.push(a);break;case"interestPause":this.interestPausesData.push(a);break;default:this.invalidData.push(a);break}}),this.deleteInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Delete Installment",data:this.deleteInstallmentData}),this.dueDateData.length>0&&this.loanTermVariationsData.push({label:"Due Date",data:this.dueDateData}),this.emiAmountData.length>0&&this.loanTermVariationsData.push({label:"EMI Amount",data:this.emiAmountData}),this.extendRepaymentPeriodData.length>0&&this.loanTermVariationsData.push({label:"Extend Repayment Period",data:this.extendRepaymentPeriodData}),this.graceOnInterestData.length>0&&this.loanTermVariationsData.push({label:"Grace On Interest",data:this.graceOnInterestData}),this.graceOnPrincipalData.length>0&&this.loanTermVariationsData.push({label:"Grace On Principal",data:this.graceOnPrincipalData}),this.insertInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Insert Installment",data:this.insertInstallmentData}),this.interestPausesData.length>0&&this.loanTermVariationsData.push({label:"Interest Pauses",data:this.interestPausesData}),this.interestRateData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate",data:this.interestRateData}),this.interestRateFromInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate From Installment",data:this.interestRateFromInstallmentData}),this.principalAmountData.length>0&&this.loanTermVariationsData.push({label:"Principal Amount",data:this.principalAmountData})})}manageRequest(e,i){i==="Delete"?this.deleteInterestPause(e):i==="Edit"&&this.updateInterestPause(e)}deleteInterestPause(e){this.dialog.open(la,{data:{deleteContext:`interest pause from ${e.startDate} to ${e.endDate}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteInterestPause(this.loanId,e.id).subscribe(r=>{this.reload()})})}updateInterestPause(e){let i=this.dates.parseDate(e.startDate),a=this.dates.parseDate(e.endDate),r=[new sa({controlName:"startDate",label:"Start Date",value:i,maxDate:this.settingsService.maxFutureDate,required:!0}),new sa({controlName:"endDate",label:"End Date",value:a,maxDate:this.settingsService.maxFutureDate,required:!0})],u={title:"Edit Interest Pause id: "+e.id,formfields:r,layout:{addButtonText:"Submit"}};this.dialog.open(gi,{data:u,width:"50rem"}).afterClosed().subscribe(g=>{if(g.data&&g.data.value.startDate<=g.data.value.endDate){let _=this.settingsService.language.code,y=this.settingsService.dateFormat,I={startDate:this.dates.formatDate(g.data.value.startDate,y),endDate:this.dates.formatDate(g.data.value.endDate,y),locale:_,dateFormat:y};this.loansService.updateInterestPause(this.loanId,e.id,I).subscribe(k=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}allowActions(e){return e==="interestPause"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-term-variations-tab"]],decls:3,vars:0,consts:[[1,"container"],[1,"m-t-20"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","value"],["matColumnDef","days"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary","matTooltipPosition","right",1,"button",3,"click","matTooltip"],["icon","edit","size","lg"],["mat-icon-button","","color","warn","matTooltipPosition","left",1,"button",3,"click","matTooltip"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),de(1,hN,25,6,"div",null,xe),l()),i&2&&(o(),ue(a.loanTermVariationsData))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,qa,Oi,un,Sn,wn,Dn,Pn,gn,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var Uu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getInterestPausesOfLoan(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();function gN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function _N(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.amount)," ")}}function CN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amortized Amount")))}function bN(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.amortizedAmount)," ")}}function vN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Unrecognized Amount")))}function xN(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.unrecognizedAmount)," ")}}function yN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Adjustment Amount")))}function SN(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.amountAdjustment,"-")," ")}}function DN(t,n){t&1&&P(0,"tr",12)}function wN(t,n){t&1&&P(0,"tr",13)}function PN(t,n){if(t&1&&(s(0,"table",1),X(1,2),F(2,gN,3,3,"th",3)(3,_N,3,3,"td",4),Q(),X(4,5),F(5,CN,3,3,"th",3)(6,bN,3,3,"td",4),Q(),X(7,6),F(8,vN,3,3,"th",3)(9,xN,3,3,"td",4),Q(),X(10,7),F(11,yN,3,3,"th",3)(12,SN,3,4,"td",4),Q(),F(13,DN,1,0,"tr",8)(14,wN,1,0,"tr",9),l()),t&2){let e=T();x("dataSource",e.capitalizedIncomeData),o(13),x("matHeaderRowDef",e.capitalizedIncomeColumns),o(),x("matRowDefColumns",e.capitalizedIncomeColumns)}}var Ng=(()=>{class t{constructor(){this.route=A(It),this.capitalizedIncomeData=[],this.capitalizedIncomeColumns=["amount","amortizedAmount","unrecognizedAmount","amountAdjustment"],this.loanId=this.route.parent.parent.snapshot.params.loanId,this.capitalizedIncomeData=[],this.route.parent.data.subscribe(e=>{e.loanDeferredIncomeData.capitalizedIncomeData.forEach(i=>{this.capitalizedIncomeData.push({amount:i.amount,amortizedAmount:i.amortizedAmount??0,unrecognizedAmount:i.unrecognizedAmount??0,amountAdjustment:i.amountAdjustment??0})})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-deferred-income-tab"]],decls:6,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","amount"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","unrecognizedAmount"],["matColumnDef","amountAdjustment"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"center"],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),p(4,"translate"),l(),M(5,PN,15,3,"table",1),l()),i&2&&(o(2),$t("",m(3,3,"labels.inputs.Deferred income")," - ",m(4,5,"labels.menus.Capitalized Income")),o(3),O(a.capitalizedIncomeData.length>0?5:-1))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt,fn],encapsulation:2})}}return t})();var Hu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDeferredIncomeData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Gu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return i?this.loansService.getBuyDownFeeData(i):(console.error("LoanBuyDownFeesDataResolver: Could not find loanId in route parameters"),new Ef(a=>{a.next([]),a.complete()}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();function TN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Id")))}function AN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.id," ")}}function MN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.External Id")))}function ON(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.externalId," ")}}function IN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Name")))}function EN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.name," ")}}function LN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function kN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.status," ")}}function FN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Originator Type")))}function NN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.originatorTypeId," ")}}function RN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Channel Type")))}function BN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.channelTypeId," ")}}function qN(t,n){t&1&&P(0,"tr",14)}function zN(t,n){t&1&&P(0,"tr",15)}var Rg=(()=>{class t{constructor(){this.route=A(It),this.loanOriginatorsData=[],this.loanId=null,this.loanoriginatorsColumns=["id","externalId","name","status","originatorTypeId","channelTypeId"];let e=this.route.parent?.parent?.snapshot.paramMap.get("loanId");this.loanId=e?Number(e):null,this.route.parent.data.subscribe(i=>{this.loanOriginatorsData=i.loanOriginatorsData.originators})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-originators-tab"]],decls:25,vars:6,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","externalId"],["matColumnDef","name"],["matColumnDef","status"],["matColumnDef","originatorTypeId"],["matColumnDef","channelTypeId"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,2),F(6,TN,3,3,"th",3)(7,AN,2,1,"td",4),Q(),X(8,5),F(9,MN,3,3,"th",3)(10,ON,2,1,"td",4),Q(),X(11,6),F(12,IN,3,3,"th",3)(13,EN,2,1,"td",4),Q(),X(14,7),F(15,LN,3,3,"th",3)(16,kN,2,1,"td",4),Q(),X(17,8),F(18,FN,3,3,"th",3)(19,NN,2,1,"td",4),Q(),X(20,9),F(21,RN,3,3,"th",3)(22,BN,2,1,"td",4),Q(),F(23,qN,1,0,"tr",10)(24,zN,1,0,"tr",11),l()()),i&2&&(o(2),C(m(3,4,"labels.heading.Loan Originators")),o(2),x("dataSource",a.loanOriginatorsData),o(19),x("matHeaderRowDef",a.loanoriginatorsColumns),o(),x("matRowDefColumns",a.loanoriginatorsColumns))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}"]})}}return t})();var Bg=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")??e.parent?.paramMap.get("loanId");return i?this.loansService.getLoanOriginators(i):Ff(()=>new Error("Missing loanId route param"))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var jN=[{path:"",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Loans Account",breadcrumb:"Create Loans Account"},component:f0,resolve:{loansAccountTemplate:Lu}},{path:":loanId",data:{title:"Loan View",routeParamBreadcrumb:"loanId"},component:qp,resolve:{loanDetailsData:Fl,loanDatatables:Ou,loanArrearsDelinquencyConfig:Eg},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:zp,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{}},{path:"dashboard",component:Og,data:{title:"Dashboard",breadcrumb:"Dashboard",routeParamBreadcrumb:!1}},{path:"accountdetail",component:jp,data:{title:"Account Detail",breadcrumb:"Account Detail",routeParamBreadcrumb:!1}},{path:"original-schedule",component:Am,data:{title:"Original Schedule",breadcrumb:"Original Schedule",routeParamBreadcrumb:!1}},{path:"repayment-schedule",component:ho,data:{title:"Repayment Schedule",breadcrumb:"Repayment Schedule",routeParamBreadcrumb:!1}},{path:"transactions",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:Tm},{path:"export",component:x0}]},{path:"deferred-income",data:{title:"Loans Deferred Income",breadcrumb:"Deferred income",routeParamBreadcrumb:!1},resolve:{loanDeferredIncomeData:Hu},children:[{path:"",component:Ng}]},{path:"delinquencytags",data:{title:"Loans Delinquency Tags",breadcrumb:"Delinquency Tags",routeParamBreadcrumb:!1},resolve:{loanDelinquencyTagsData:zu,loanDelinquencyData:Vu,loanDelinquencyActions:Fg},children:[{path:"",component:T0}]},{path:"loan-reschedules",data:{},resolve:{loanRescheduleData:Ig},children:[{path:"",component:A0}]},{path:"loan-collateral",component:d0,data:{title:"Loan Collateral Details",breadcrumb:"Loan Collateral Details",routeParamBreadcrumb:!1},resolve:{loanCollaterals:kg}},{path:"term-variations",component:I0,data:{title:"Loan Term Variations",breadcrumb:"Loan Term Variations",routeParamBreadcrumb:!1},resolve:{loanDetailsData:Fl,interestPausesData:Uu}},{path:"loan-tranche-details",component:m0,data:{title:"Loan Tranche Details",breadcrumb:"Loan Tranche Details",routeParamBreadcrumb:!1}},{path:"overdue-charges",component:Mm,data:{title:"Overdue Charges",breadcrumb:"Overdue Charges",routeParamBreadcrumb:!1}},{path:"floating-interest-rates",component:p0,data:{title:"Floating Interest Rates",breadcrumb:"Floating Interest Rates",routeParamBreadcrumb:!1}},{path:"charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},component:Om},{path:"loan-documents",component:h0,data:{title:"Loan Documents",breadcrumb:"Loan Documents",routeParamBreadcrumb:!1},resolve:{loanDocuments:ku}},{path:"notes",component:Vp,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{loanNotes:Mu}},{path:"standing-instruction",component:g0,data:{title:"Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"external-asset-owner",component:O0,data:{title:"External Asset Owner",breadcrumb:"External Asset Owner",routeParamBreadcrumb:!1},resolve:{activeTransferData:Lg,loanTransfersData:ju}},{path:"datatables",children:[{path:":datatableName",component:Im,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{loanDatatable:Iu}}]},{path:"originators",data:{title:"Loans Originators",breadcrumb:"Originators",routeParamBreadcrumb:!1},resolve:{loanOriginatorsData:Bg},children:[{path:"",component:Rg}]},{path:"buy-down-fees",component:Mg,data:{title:"Buy Down Fees",breadcrumb:"Buy Down Fees",routeParamBreadcrumb:!1},resolve:{loanBuyDownFeesData:Gu}}]},{path:":loanId/transactions/:id",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},resolve:{loanDetailsAssociationData:Fl},children:[{path:"",data:{routeParamBreadcrumb:"id"},component:C0,resolve:{loansAccountTransaction:Fu}},{path:"edit",component:b0,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{loansAccountTransactionTemplate:Ru}},{path:"reciept",component:v0,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{loansTransactionReciept:Nu}}]},{path:":loanId/edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:D0}},{path:":loanId/charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:_0,resolve:{loansAccountCharge:w0,loanDetailsData:Fl}},{path:":id/adjustment",data:{routeParamBreadcrumb:"id",breadcrumb:"Adjustment"},component:M0,resolve:{loansAccountCharge:w0,loanDetailsData:Fl}}]},{path:":loanId/actions/:action",component:c0,data:{title:"Loan Account Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},resolve:{actionButtonData:Eu}},{path:":loanId/transfer-funds",loadChildren:()=>import("./account-transfers.module-HM5KQJMK.js").then(t=>t.AccountTransfersModule)},{path:"edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:D0}}]},{path:"glim-account",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create GLIM Application",breadcrumb:"Create GLIM Application",routeParamBreadcrumb:!1},component:S0,resolve:{loansAccountTemplate:qu,groupsData:A1}},{path:":glimId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},component:y0,resolve:{glimData:Bu,groupsData:fd}}]}],qg=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({providers:[Fl,Mu,Ou,Iu,zu,Eu,Lu,ku,D0,w0,Fu,Ru,Nu,P1,fd,Bu,T1,qu,ju,Vu,Uu,Hu,Gu],imports:[ud.forChild(jN),ud]})}}return t})();var zg=(()=>{class t{constructor(){this.externalAssetOwner=A(Rp)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-transfer"]],inputs:{transferData:"transferData"},decls:89,vars:61,consts:[[1,"m-l-5","flex-25"],[1,"flex-25","m-l-5","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-5","status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50","m-l-5"],[1,"flex-50","r-amount"]],template:function(i,a){i&1&&(s(0,"table")(1,"tbody")(2,"tr")(3,"td",0)(4,"b"),c(5),p(6,"translate"),l()(),s(7,"td",1)(8,"div",2),P(9,"fa-icon",3),s(10,"span",4),c(11),l()()(),s(12,"td",0)(13,"b"),c(14),p(15,"translate"),l()(),s(16,"td",1),P(17,"mifosx-external-identifier",5),l()(),s(18,"tr")(19,"td",0)(20,"b"),c(21),p(22,"translate"),l()(),s(23,"td",0),c(24),p(25,"dateFormat"),l(),s(26,"td",0)(27,"b"),c(28),p(29,"translate"),l()(),s(30,"td",0),c(31),p(32,"dateFormat"),l()(),s(33,"tr")(34,"td",0)(35,"b"),c(36),p(37,"translate"),l()(),s(38,"td",6)(39,"table")(40,"tbody")(41,"tr")(42,"td",7)(43,"b"),c(44),p(45,"translate"),l()(),s(46,"td",8),c(47),p(48,"formatNumber"),l()(),s(49,"tr")(50,"td",7)(51,"b"),c(52),p(53,"translate"),l()(),s(54,"td",8),c(55),p(56,"formatNumber"),l()(),s(57,"tr")(58,"td",7)(59,"b"),c(60),p(61,"translate"),l()(),s(62,"td",8),c(63),p(64,"formatNumber"),l()(),s(65,"tr")(66,"td",7)(67,"b"),c(68),p(69,"translate"),l()(),s(70,"td",8),c(71),p(72,"formatNumber"),l()(),s(73,"tr")(74,"td",7)(75,"b"),c(76),p(77,"translate"),l()(),s(78,"td",8),c(79),p(80,"formatNumber"),l()(),s(81,"tr")(82,"td",7)(83,"b"),c(84),p(85,"translate"),l()(),s(86,"td",8),c(87),p(88,"formatNumber"),l()()()()()()()()),i&2&&(o(5),b("",m(6,23,"labels.inputs.Status")," :"),o(3),x("ngClass",a.itemStatus(a.transferData.status)),o(3),C(a.transferData.status),o(3),b("",m(15,25,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(a.transferData.owner.externalId)),o(4),b("",m(22,27,"labels.inputs.Settlement Date")," :"),o(3),b(" ",m(25,29,a.transferData.settlementDate)," "),o(4),b("",m(29,31,"labels.inputs.Effective Date")," :"),o(3),b(" ",m(32,33,a.transferData.effectiveFrom)," "),o(5),b("",m(37,35,"labels.inputs.Details")," :"),o(8),b("",m(45,37,"labels.inputs.Principal Outstanding")," :"),o(3),C(m(48,39,a.transferData.details.totalPrincipalOutstanding)),o(5),b("",m(53,41,"labels.inputs.Interest Outstanding")," :"),o(3),C(m(56,43,a.transferData.details.totalInterestOutstanding)),o(5),b("",m(61,45,"labels.inputs.Fees Outstanding")," :"),o(3),b(" ",m(64,47,a.transferData.details.totalFeeChargesOutstanding)," "),o(5),b("",m(69,49,"labels.inputs.Penalties Outstanding")," :"),o(3),b(" ",m(72,51,a.transferData.details.totalPenaltyChargesOutstanding)," "),o(5),b("",m(77,53,"labels.inputs.Outstanding")," :"),o(3),C(m(80,55,a.transferData.details.totalOutstanding)),o(5),b("",m(85,57,"labels.inputs.Overpaid")," :"),o(3),C(m(88,59,a.transferData.details.totalOverpaid)))},dependencies:[wt,pa,Pt,un,Va,gn,Tt,fn],styles:[".asset-transfer-container[_ngcontent-%COMP%]{height:150px}.asset-transfer-container[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:#000}"]})}}return t})();var Rst=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({imports:[S1,C1,qg,h1,Kf,n0,qp,zp,jp,Vp,Om,Mm,Am,ho,c0,Em,Tm,Im,Lm,km,Fm,Nm,Bm,zm,p0,jm,m0,Vm,Um,d0,f0,Oo,Io,Eo,nl,u0,Hm,Wm,$m,Gm,Km,Zm,Jm,Xm,Qm,h0,g0,Mc,t0,e0,_0,C0,b0,v0,x0,qm,y0,S0,T0,el,i0,Ym,Ds,A0,M0,a0,o0,O0,zg,P0,r0,l0,I0,s0,Oc]})}}return t})();export{Rst as LoansModule}; + `,Ye(10,67,a.loansAccount.productId,a.loansAccountTemplate.productOptions,"id","name")))("chars",60),o(2),O(a.loansAccount.loanOfficerId?11:-1),o(),O(a.loansAccount.loanPurposeId?12:-1),o(),O(a.loansAccount.fundId?13:-1),o(3),b("",m(17,72,"labels.inputs.Submitted on"),":"),o(3),C(m(20,74,a.loansAccount.submittedOnDate)),o(4),b("",m(24,76,"labels.inputs.Disbursement on"),":"),o(3),C(m(27,78,a.loansAccount.expectedDisbursementDate)),o(2),O(a.loansAccount.externalId?28:-1),o(),O(a.activeClientMembers?29:-1),o(2),C(m(32,80,"labels.heading.Terms")),o(5),b("",m(37,82,"labels.inputs.Principal"),":"),o(3),b(" ",Ye(40,84,a.loansAccount.principalAmount,a.loansAccountProductTemplate.currency.code,"symbol-narrow","1.2-2")," "),o(3),C(a.loansAccountProductTemplate.currency.code),o(3),b("",m(46,89,"labels.inputs.Loan Term"),":"),o(3),$t("",a.loansAccount.loanTermFrequency," ",Ye(49,91,a.loansAccount.loanTermFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")),o(4),b("",m(53,96,"labels.inputs.Number of repayments"),":"),o(3),C(a.loansAccount.numberOfRepayments),o(3),b("",m(59,98,"labels.inputs.Repaid every"),":"),o(3),Zl("",a.loansAccount.repaymentEvery," ",Ye(62,100,a.loansAccount.repaymentFrequencyType,a.loansAccountProductTemplate.termFrequencyTypeOptions,"id","name")," ",Ye(63,105,a.loansAccount.repaymentFrequencyNthDayType,a.loansAccountProductTemplate.repaymentFrequencyNthDayTypeOptions,"id","name")," ",Ye(64,110,a.loansAccount.repaymentFrequencyDayOfWeekType,a.loansAccountProductTemplate.repaymentFrequencyDaysOfWeekTypeOptions,"id","name")),o(4),O(a.productEnableDownPayment?65:-1),o(),O(a.loansAccount.repaymentsStartingFromDate?66:-1),o(),O(a.loansAccount.interestChargedFromDate?67:-1),o(),O(a.loansAccount.interestRatePerPeriod?68:-1),o(),O(a.loansAccount.interestType?69:-1),o(),O(a.loansAccount.isEqualAmortization?70:-1),o(3),C(m(74,115,"labels.inputs.Amortization")),o(3),C(Ee(78,122,Ye(77,117,a.loansAccount.amortizationType,a.loansAccountProductTemplate.amortizationTypeOptions,"id","value"),"catalogs")),o(5),b("",m(82,125,"labels.inputs.Interest calculation period"),": "),o(3),C(Ee(86,132,Ye(85,127,a.loansAccount.interestCalculationPeriodType,a.loansAccountProductTemplate.interestCalculationPeriodTypeOptions,"id","value"),"catalogs")),o(3),O(a.loansAccount.allowPartialPeriodInterestCalculation?87:-1),o(),O(a.loansAccount.inArrearsTolerance?88:-1),o(),O(a.loansAccount.graceOnInterestCharged?89:-1),o(3),b("",m(93,135,"labels.inputs.Repayment strategy"),": "),o(3),C(Ee(97,142,Ye(96,137,a.loansAccount.transactionProcessingStrategyCode,a.loansAccountProductTemplate.transactionProcessingStrategyOptions,"code","name"),"catalogs")),o(5),b(" ",m(101,145,"labels.inputs.Installment Amount")," "),o(3),b(" ",m(104,147,a.loansAccount.fixedEmiAmount)," "),o(4),b(" ",m(108,149,"labels.inputs.Balloon Repayment Amount")," "),o(3),b(" ",m(111,151,a.loansAccount.balloonRepaymentAmount)," "),o(3),C(m(114,153,"labels.heading.Moratorium")),o(3),O(a.loansAccount.graceOnPrincipalPayment?116:-1),o(),O(a.loansAccount.graceOnInterestPayment?117:-1),o(),O(a.loansAccount.graceOnArrearsAgeing?118:-1),o(3),b(" ",m(122,155,"labels.inputs.Enable installment level Delinquency")," "),o(3),b(" ",m(125,157,a.loansAccount.enableInstallmentLevelDelinquency)," "),o(2),O(a.loansAccount.isTopup?126:-1),o(3),b("",m(130,159,"labels.inputs.Recalculate Interest"),": "),o(3),C(m(133,161,a.loansAccountProductTemplate==null?null:a.loansAccountProductTemplate.isInterestRecalculationEnabled)),o(2),O(a.loansAccountProductTemplate!=null&&a.loansAccountProductTemplate.daysInMonthType?134:-1),o(),O(a.loansAccount.charges.length?135:-1),o(),O(a.loansAccountProductTemplate.overdueCharges.length?136:-1),o(4),b(" ",m(141,163,"labels.buttons.Previous")," "),o(2),x("routerLink",Ut(169,_E)),o(),b(" ",m(144,165,"labels.buttons.Cancel")," "),o(3),b(" ",m(147,167,"labels.buttons.Submit")," "))},dependencies:[wt,Pt,ae,Gt,Ep,Va,$o,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,ja,un,Sa,gn,Tt,wa,Op,fn,Hr],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%]{margin:0;font-weight:500}span[_ngcontent-%COMP%]{margin:.5em 0}mat-divider[_ngcontent-%COMP%]{margin:0 0 .5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}"]})}}return t})();var v7=["dtloan"];function x7(t,n){t&1&&P(0,"fa-icon",20)}function y7(t,n){t&1&&P(0,"fa-icon",20)}function S7(t,n){t&1&&P(0,"fa-icon",21)}function D7(t,n){t&1&&P(0,"fa-icon",22)}function w7(t,n){t&1&&P(0,"fa-icon",23)}function P7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.DETAILS"))}function T7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.TERMS"))}function A7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.CHARGES"))}function M7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function O7(t,n){if(t&1&&(s(0,"mat-step",18),F(1,M7,2,3,"ng-template",14),P(2,"mifosx-loans-account-schedule-step",24,4),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function I7(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;C(e.registeredTableName)}}function E7(t,n){if(t&1&&(s(0,"mat-step"),F(1,I7,1,1,"ng-template",14),P(2,"mifosx-loans-account-datatable-step",25,5),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function L7(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.PREVIEW"))}function k7(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),F(1,L7,2,3,"ng-template",14),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var f0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid}get loansSavingsAccountLinked(){return this.loansAccountDetailsStep.loansAccountDetailsForm.get("linkAccountId").value}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a=this.loansService.buildLoanRequestPayload(this.loansAccount,this.loansAccountTemplate,this.loansAccountProductTemplate.calendarOptions,e,i);if(this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.length>0){let r=[];this.loanDatatables.forEach(u=>{r.push(u.payload)}),a.datatables=r}this.loansService.createLoansAccount(a).subscribe(r=>{this.router.navigate(["../",r.resourceId,"general"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-loans-account"]],viewQuery:function(i,a){if(i&1&&(ri(Oo,7),ri(Io,7),ri(Eo,7),ri(v7,5)),i&2){let r;li(r=si())&&(a.loansAccountDetailsStep=r.first),li(r=si())&&(a.loansAccountTermsStep=r.first),li(r=si())&&(a.loansAccountChargesStep=r.first),li(r=si())&&(a.loanDatatables=r)}},decls:24,vars:15,consts:[["loansAccountStepper",""],["loansAccountDetailsForm",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid","loansSavingsAccountLinked"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",6)(1,"mat-stepper",7,0),F(3,x7,1,0,"ng-template",8)(4,y7,1,0,"ng-template",9)(5,S7,1,0,"ng-template",10)(6,D7,1,0,"ng-template",11)(7,w7,1,0,"ng-template",12),s(8,"mat-step",13),F(9,P7,2,3,"ng-template",14),s(10,"mifosx-loans-account-details-step",15,1),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(12,"mat-step",13),F(13,T7,2,3,"ng-template",14),P(14,"mifosx-loans-account-terms-step",16,2),l(),s(16,"mat-step"),F(17,A7,2,3,"ng-template",14),P(18,"mifosx-loans-account-charges-step",17,3),l(),M(20,O7,4,4,"mat-step",18),de(21,E7,4,1,"mat-step",null,xe),M(23,k7,3,3,"mat-step",19),l()()}if(i&2){let r=Et(11);o(),x("linear",!1),o(7),x("stepControl",r),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(2),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid)("loansSavingsAccountLinked",a.loansSavingsAccountLinked),o(2),O(a.loansAccountFormValid?20:-1),o(),ue(a.datatables),o(2),O(a.loansAccountFormValid?23:-1)}},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,Ds,nl,Tt],encapsulation:2})}}return t})();var h0=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.settingsService=A(oe),this.entityType="loans",this.entityId=this.route.parent.snapshot.params.loanId,this.route.data.subscribe(e=>{this.getLoanDocumentsData(e.loanDocuments)})}ngOnInit(){this.route.parent.params.subscribe(e=>{this.entityId=e.loanId})}getLoanDocumentsData(e){e.forEach(i=>{i.docUrl=this.settingsService.serverUrl+"/loans/"+i.parentEntityId+"/documents/"+i.id+"/attachment?tenantIdentifier="+Zf.fineractPlatformTenantId,i.fileName&&(i.fileName.toLowerCase().indexOf(".jpg")!==-1||i.fileName.toLowerCase().indexOf(".jpeg")!==-1||i.fileName.toLowerCase().indexOf(".png")!==-1)&&(i.fileIsImage=!0),i.type&&i.type.toLowerCase().indexOf("image")!==-1&&(i.fileIsImage=!0)}),this.entityDocuments=e}uploadDocument(e){return this.loansService.loadLoanDocument(this.entityId,e)}deleteDocument(e){this.loansService.deleteLoanDocument(this.entityId,e).subscribe(i=>{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-documents-tab"]],decls:1,vars:5,consts:[[3,"entityType","entityId","entityDocuments","callbackUpload","callbackDelete"]],template:function(i,a){i&1&&P(0,"mifosx-entity-documents-tab",0),i&2&&x("entityType",a.entityType)("entityId",a.entityId)("entityDocuments",a.entityDocuments)("callbackUpload",a.uploadDocument)("callbackDelete",a.deleteDocument)},dependencies:[wt,Pt,_1],styles:["table[_ngcontent-%COMP%]{width:100%;margin-top:3%}table[_ngcontent-%COMP%] .document-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}.tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}"]})}}return t})();var F7=["instructionsTable"];function N7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client")))}function R7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromClient.displayName,"-",e.fromClient.id," ")}}function B7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.From Account")))}function q7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.fromAccount.accountNo," (",e.fromAccountType.value,") ")}}function z7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Beneficiary")))}function j7(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),b(" ",e.toClient.displayName," ")}}function V7(t,n){t&1&&(s(0,"span"),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Own Account")))}function U7(t,n){if(t&1&&(s(0,"td",17),M(1,j7,2,1,"span"),M(2,V7,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.fromClient.id!==e.toClient.id?1:-1),o(),O(e.fromClient.id===e.toClient.id?2:-1)}}function H7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.To Account")))}function G7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t(" ",e.toAccount.accountNo," (",e.toAccountType.value,") ")}}function W7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function $7(t,n){if(t&1&&(s(0,"td",17),c(1),l()),t&2){let e=n.$implicit;o(),$t("",e.instructionType.value,"/",e.amount)}}function Y7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Validity")))}function K7(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),p(3,"dateFormat"),l()),t&2){let e=n.$implicit;o(),$t(" ",m(2,2,e.validFrom)," to ",m(3,4,e.validTill)," ")}}function Z7(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function J7(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",20),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.Edit Standing Instruction")))}function X7(t,n){t&1&&(s(0,"span"),F(1,J7,3,4,"button",18),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_STANDINGINSTRUCTION"))}function Q7(t,n){if(t&1){let e=Ct();s(0,"button",22),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T();return st(r.deleteStandingInstruction(a.id))}),P(2,"i",23),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Delete Standing Instruction")))}function t8(t,n){t&1&&(s(0,"span"),F(1,Q7,3,4,"button",21),l()),t&2&&(o(),x("mifosxHasPermission","DELETE_STANDINGINSTRUCTION"))}function e8(t,n){t&1&&(s(0,"button",19),p(1,"translate"),P(2,"i",24),l()),t&2&&x("matTooltip",ce(m(1,2,"tooltips.View Standing Instruction")))}function n8(t,n){if(t&1&&(s(0,"td",17),M(1,X7,2,1,"span"),M(2,t8,2,1,"span"),F(3,e8,3,4,"button",18),l()),t&2){let e=n.$implicit;o(),O(e.status.value!=="Deleted"?1:-1),o(),O(e.status.value!=="Deleted"?2:-1),o(),x("mifosxHasPermission","READ_STANDINGINSTRUCTION")}}function i8(t,n){t&1&&P(0,"tr",25)}function a8(t,n){t&1&&P(0,"tr",26)}var g0=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.dialog=A(Gn),this.accountTransfersService=A(w1),this.settingsService=A(oe),this.dataSource=new Li,this.displayedColumns=["client","fromAccount","beneficiary","toAccount","amount","validity","actions"],this.route.parent.data.subscribe(e=>{this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.getStandingInstructions()}getStandingInstructions(){let e=this.loanDetailsData.clientId,i=this.loanDetailsData.clientName,a=this.loanDetailsData.id,r=this.settingsService.language.code,u=this.settingsService.dateFormat;this.loansService.getStandingInstructions(e,i,a,r,u).subscribe(d=>{this.instructionsData=d.pageItems,this.dataSource.data=this.instructionsData,this.instructionTableRef.renderRows()})}deleteStandingInstruction(e){this.dialog.open(la,{data:{deleteContext:`standing instruction id: ${e}`}}).afterClosed().subscribe(a=>{a.delete&&this.accountTransfersService.deleteStandingInstrucions(e).subscribe(()=>{})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-standing-instructions-tab"]],viewQuery:function(i,a){if(i&1&&ri(F7,7),i&2){let r;li(r=si())&&(a.instructionTableRef=r.first)}},decls:31,vars:6,consts:[["instructionsTable",""],[1,"tab-container","mat-typography"],[1,"m-b-10"],[1,"mat-elevation-z1","m-b-25"],["mat-table","",3,"dataSource"],["matColumnDef","client"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromAccount"],["matColumnDef","beneficiary"],["matColumnDef","toAccount"],["matColumnDef","amount"],["matColumnDef","validity"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","account-action-button","mat-raised-button","","color","primary",3,"matTooltip",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"account-action-button",3,"matTooltip"],[1,"fa","fa-edit"],["class","account-action-button","mat-raised-button","","color","warn",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"account-action-button",3,"click","matTooltip"],[1,"fa","fa-times"],[1,"fa","fa-eye"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",1)(1,"div",2)(2,"h3"),c(3),p(4,"translate"),l()(),s(5,"div",3)(6,"table",4,0),X(8,5),F(9,N7,3,3,"th",6)(10,R7,2,2,"td",7),Q(),X(11,8),F(12,B7,3,3,"th",6)(13,q7,2,2,"td",7),Q(),X(14,9),F(15,z7,3,3,"th",6)(16,U7,3,2,"td",7),Q(),X(17,10),F(18,H7,3,3,"th",6)(19,G7,2,2,"td",7),Q(),X(20,11),F(21,W7,3,3,"th",6)(22,$7,2,2,"td",7),Q(),X(23,12),F(24,Y7,3,3,"th",6)(25,K7,4,6,"td",7),Q(),X(26,13),F(27,Z7,3,3,"th",6)(28,n8,4,3,"td",7),Q(),F(29,i8,1,0,"tr",14)(30,a8,1,0,"tr",15),l()()()),i&2&&(o(3),C(m(4,4,"labels.heading.All Standing Instructions")),o(3),x("dataSource",a.dataSource),o(23),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Pt,Gt,Me,_n,vn,bn,xn,Cn,yn,Oi,Sn,wn,Dn,Pn,gn,Tt],styles:[".tab-container[_ngcontent-%COMP%]{padding:1%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{margin-left:auto}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 6px;margin:4px;line-height:25px}"]})}}return t})();function o8(t,n){t&1&&P(0,"fa-icon",15)}function r8(t,n){t&1&&P(0,"fa-icon",15)}function l8(t,n){t&1&&P(0,"fa-icon",16)}function s8(t,n){t&1&&P(0,"fa-icon",17)}function c8(t,n){t&1&&P(0,"fa-icon",18)}function p8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.DETAILS"))}function m8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.TERMS"))}function d8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.CHARGES"))}function u8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function f8(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.PREVIEW"))}function h8(t,n){if(t&1){let e=Ct();s(0,"mat-step",14),F(1,f8,2,3,"ng-template",9),s(2,"mifosx-loans-account-preview-step",19),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountAndTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)}}var Mc=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),this.settingsService=A(oe),this.route.data.subscribe(e=>{this.loansAccountAndTemplate=e.loansAccountAndTemplate}),this.loanId=this.route.snapshot.params.loanId}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code,this.loansAccountProductTemplate.loanProductId&&this.loansService.getLoansCollateralTemplateResource(this.loansAccountProductTemplate.loanProductId).subscribe(i=>{this.collateralOptions=i.loanCollateralOptions})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get loansAccountFormValidAndNotPristine(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&(!this.loansAccountDetailsForm.pristine||!this.loansAccountTermsForm.pristine||!this.loansAccountTermsStep.pristine||!this.loansAccountChargesStep.pristine)}get loansAccount(){return ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}submit(){let e=this.settingsService.language.code,i=this.settingsService.dateFormat,a="individual",r=new Map;(this.loansAccount.charges??[]).forEach(d=>{let g=d.chargeId;g!=null&&r.set(g,d)});let u=Se(ie({},this.loansAccount),{clientId:this.loansAccountAndTemplate.clientId,charges:Array.from(r.values()).map(d=>{let g={chargeId:d.chargeId,amount:d.amount,dueDate:d.dueDate&&this.dateUtils.formatDate(d.dueDate,i)};return d.id&&d.id!==d.chargeId&&(g.id=d.id),g}),collateral:this.loansAccount.collateral.map(d=>({type:d.type,value:d.value,description:d.description})),disbursementData:this.loansAccount.disbursementData.map(d=>({expectedDisbursementDate:this.dateUtils.formatDate(d.expectedDisbursementDate,i),principal:d.principal})),interestChargedFromDate:this.dateUtils.formatDate(this.loansAccount.interestChargedFromDate,i),repaymentsStartingFromDate:this.dateUtils.formatDate(this.loansAccount.repaymentsStartingFromDate,i),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,i),expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,i),dateFormat:i,locale:e,loanType:a});delete u.isValid,u.syncRepaymentsWithMeeting&&(u.calendarId=this.loansAccountProductTemplate.calendarOptions[0].id,delete u.syncRepaymentsWithMeeting),u.recalculationRestFrequencyDate&&(u.recalculationRestFrequencyDate=this.dateUtils.formatDate(this.loansAccount.recalculationRestFrequencyDate,i)),u.interestCalculationPeriodType===0&&(u.allowPartialPeriodInterestCalculation=!1),(!u.isLoanProductLinkedToFloatingRate||u.isLoanProductLinkedToFloatingRate===!1)&&delete u.isFloatingInterestRate,u.principal=u.principalAmount,delete u.principalAmount,delete u.multiDisburseLoan,u.allowPartialPeriodInterestCalculation=u.allowPartialPeriodInterestCalculation,delete u.allowPartialPeriodInterestCalculation,this.loansService.updateLoansAccount(this.loanId,u).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-loans-account"]],viewQuery:function(i,a){if(i&1&&(ri(Oo,7),ri(Io,7),ri(Eo,7)),i&2){let r;li(r=si())&&(a.loansAccountDetailsStep=r.first),li(r=si())&&(a.loansAccountTermsStep=r.first),li(r=si())&&(a.loansAccountChargesStep=r.first)}},decls:21,vars:15,consts:[["loansAccountStepper",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-stepper",2,0),F(3,o8,1,0,"ng-template",3)(4,r8,1,0,"ng-template",4)(5,l8,1,0,"ng-template",5)(6,s8,1,0,"ng-template",6)(7,c8,1,0,"ng-template",7),s(8,"mat-step",8),F(9,p8,2,3,"ng-template",9),s(10,"mifosx-loans-account-details-step",10),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",8),F(12,m8,2,3,"ng-template",9),P(13,"mifosx-loans-account-terms-step",11),l(),s(14,"mat-step"),F(15,d8,2,3,"ng-template",9),P(16,"mifosx-loans-account-charges-step",12),l(),s(17,"mat-step"),F(18,u8,2,3,"ng-template",9),P(19,"mifosx-loans-account-schedule-step",13),l(),M(20,h8,3,3,"mat-step",14),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountAndTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("collateralOptions",a.collateralOptions),o(3),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountFormValid",a.loansAccountFormValidAndNotPristine),o(3),x("loansAccountTemplate",a.loansAccountAndTemplate)("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccount",a.loansAccount)("currencyCode",a.currencyCode),o(),O(a.loansAccountFormValidAndNotPristine?20:-1))},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,el,nl,Tt],encapsulation:2})}}return t})();var g8=()=>["../"];function _8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Edit")," "))}function C8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(3);return st(a.payCharge())}),P(1,"fa-icon",13),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Pay")," "))}function b8(t,n){t&1&&(s(0,"span"),F(1,C8,4,3,"button",9),l()),t&2&&(o(),x("mifosxHasPermission","PAY_SAVINGSACCOUNTCHARGE"))}function v8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(3);return st(a.waiveCharge())}),P(1,"fa-icon",11),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Waive")," "))}function x8(t,n){t&1&&(s(0,"span"),F(1,v8,4,3,"button",8),l()),t&2&&(o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"))}function y8(t,n){if(t&1){let e=Ct();s(0,"button",12),it("click",function(){lt(e);let a=T(2);return st(a.adjustmentCharge())}),P(1,"fa-icon",14),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Adjustment")," "))}function S8(t,n){if(t&1&&(s(0,"div",0),F(1,_8,4,3,"button",8),M(2,b8,2,1,"span"),M(3,x8,2,1,"span"),s(4,"span"),F(5,y8,4,3,"button",9),l()()),t&2){let e=T();o(),x("mifosxHasPermission","WAIVE_SAVINGSACCOUNTCHARGE"),o(),O(e.allowPayCharge?2:-1),o(),O(e.allowWaive?3:-1),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE")}}function D8(t,n){if(t&1){let e=Ct();s(0,"button",10),it("click",function(){lt(e);let a=T(2);return st(a.editCharge())}),P(1,"fa-icon",16),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Edit")," "))}function w8(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.deleteCharge())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),b(" ",m(3,1,"labels.buttons.Delete")," "))}function P8(t,n){t&1&&(s(0,"div",0),F(1,D8,4,3,"button",8)(2,w8,4,3,"button",15),l()),t&2&&(o(),x("mifosxHasPermission","UPDATE_SAVINGSACCOUNTCHARGE"),o(),x("mifosxHasPermission","DELETE_SAVINGSACCOUNTCHARGE"))}var _0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(It),this.dateUtils=A(me),this.router=A(le),this.translateService=A(Qi),this.dialog=A(Gn),this.settingsService=A(oe),this.allowPayCharge=!0,this.allowWaive=!0,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.allowPayCharge=this.chargeData.chargePayable&&!this.chargeData.paid,this.allowWaive=!this.chargeData.chargeTimeType.waived,this.loansAccountData=e.loanDetailsData})}payCharge(){let e=[new sa({controlName:"transactionDate",label:"Payment Date",value:"",type:"date",required:!0})],i={title:`Pay Charge ${this.chargeData.id}`,layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(gi,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=r.data.value.transactionDate,_={transactionDate:this.dateUtils.formatDate(g,d),dateFormat:d,locale:u};this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"pay",_,this.chargeData.id).subscribe(()=>{this.reload()})}})}waiveCharge(){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Waive Charge"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want to waive charge with id:")` ${this.chargeData.id}`,type:"Basic"}}).afterClosed().subscribe(i=>{i.confirm&&this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId,"waive",{},this.chargeData.id).subscribe(()=>{this.reload()})})}editCharge(){let e=[new Pi({controlName:"amount",label:"Amount",value:this.chargeData.amount||this.chargeData.amountOrPercentage,type:"number",required:!0}),new sa({controlName:"dueDate",label:"Due Date",value:new Date(this.chargeData.dueDate),type:"date",maxDate:this.settingsService.maxAllowedDate,required:!0})],i={title:"Edit Charge",layout:{addButtonText:"Confirm"},formfields:e};this.dialog.open(gi,{data:i}).afterClosed().subscribe(r=>{if(r.data){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g=this.dateUtils.formatDate(r.data.value.dueDate,d),y={amount:r.data.value.amount,dueDate:g,dateFormat:d,locale:u};this.loansService.editLoansAccountCharge(this.loansAccountData.id,y,this.chargeData.id).subscribe(()=>{this.reload()})}})}deleteCharge(){this.dialog.open(la,{data:{deleteContext:`charge id:${this.chargeData.id}`}}).afterClosed().subscribe(i=>{i.delete&&this.loansService.deleteLoansAccountCharge(this.loansAccountData.id,this.chargeData.id).subscribe(()=>{this.reload()})})}loanChargeColor(){return this.chargeData.paid?"paid":"not-paid"}adjustmentCharge(){this.router.navigate(["adjustment"],{relativeTo:this.route})}reload(){let e=this.loansAccountData.clientId,i=this.router.url;this.router.navigateByUrl(`/clients/${e}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([i]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-charge"]],decls:72,vars:64,consts:[[1,"layout-row","align-end","gap-2percent","layout-xs-column","container","m-b-20"],[1,"container"],[1,"layout-row-wrap"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","accent",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","flag",1,"m-r-10"],["mat-raised-button","","color","accent",3,"click"],["icon","dollar-sign",1,"m-r-10"],["icon","pen",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click",4,"mifosxHasPermission"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click"],["icon","trash",1,"m-r-10"]],template:function(i,a){i&1&&(M(0,S8,6,4,"div",0),M(1,P8,3,2,"div",0),s(2,"div",1)(3,"mat-card")(4,"mat-card-content")(5,"div",2),P(6,"div",3),s(7,"div",4),c(8),p(9,"translate"),l(),s(10,"div",5),c(11),l(),s(12,"div",4),c(13),p(14,"translate"),l(),s(15,"div",5),c(16),l(),s(17,"div",4),c(18),p(19,"translate"),l(),s(20,"div",5),c(21),l(),s(22,"div",4),c(23),p(24,"translate"),l(),s(25,"div",5),c(26),l(),s(27,"div",4),c(28),p(29,"translate"),l(),s(30,"div",5),c(31),p(32,"dateFormat"),l(),s(33,"div",4),c(34),p(35,"translate"),l(),s(36,"div",5),c(37),l(),s(38,"div",4),c(39),p(40,"translate"),l(),s(41,"div",5),c(42),p(43,"formatNumber"),l(),s(44,"div",4),c(45),p(46,"translate"),l(),s(47,"div",5),c(48),p(49,"formatNumber"),l(),s(50,"div",4),c(51),p(52,"translate"),l(),s(53,"div",5),c(54),p(55,"formatNumber"),l(),s(56,"div",4),c(57),p(58,"translate"),l(),s(59,"div",5),c(60),p(61,"formatNumber"),l(),s(62,"div",4),c(63),p(64,"translate"),l(),s(65,"div",5),c(66),p(67,"dateFormat"),l()(),s(68,"div",6)(69,"button",7),c(70),p(71,"translate"),l()()()()()),i&2&&(O(a.loansAccountData.status.value==="Active"&&a.chargeData.amountOutstanding!==0?0:-1),o(),O(a.loansAccountData.status.value==="Submitted and pending approval"?1:-1),o(5),x("ngClass",a.loanChargeColor()),o(2),b(" ",m(9,27,"labels.inputs.name")," "),o(3),b(" ",a.chargeData.name," "),o(2),b(" ",m(14,29,"labels.inputs.Charge Type")," "),o(3),b(" ",a.chargeData.penalty?"Penalty":"Fees"," "),o(2),b(" ",m(19,31,"labels.inputs.Currency")," "),o(3),b(" ",a.chargeData.currency.displayLabel," "),o(2),b(" ",m(24,33,"labels.inputs.Payment due at")," "),o(3),b(" ",a.chargeData.chargeTimeType.value," "),o(2),b(" ",m(29,35,"labels.inputs.Payment due as of")," "),o(3),b(" ",m(32,37,a.chargeData.dueDate)," "),o(3),b(" ",m(35,39,"labels.inputs.Calculation Type")," "),o(3),b(" ",a.chargeData.chargeCalculationType.value," "),o(2),b(" ",m(40,41,"labels.inputs.Due")," "),o(3),b(" ",m(43,43,a.chargeData.amount)," "),o(3),b(" ",m(46,45,"labels.inputs.Paid")," "),o(3),b(" ",m(49,47,a.chargeData.amountPaid)," "),o(3),b(" ",m(52,49,"labels.inputs.Waived")," "),o(3),b(" ",m(55,51,a.chargeData.amountWaived)," "),o(3),b(" ",m(58,53,"labels.inputs.Outstanding")," "),o(3),b(" ",m(61,55,a.chargeData.amountOutstanding)," "),o(3),b(" ",m(64,57,"labels.inputs.Submitted On Date")," "),o(3),b(" ",m(67,59,a.chargeData.submittedOnDate)," "),o(3),x("routerLink",Ut(63,g8)),o(),b(" ",m(71,61,"labels.buttons.Back")," "))},dependencies:[wt,pa,Pt,ae,ge,Te,Gt,Me,un,gn,Tt,fn],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.paid[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.not-paid[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var T8=()=>["../"];function A8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",13),P(2,"fa-icon",14),c(3),p(4,"translate"),l(),s(5,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.undoTransaction())}),P(6,"fa-icon",16),c(7),p(8,"translate"),l()()}if(t&2){let e=T(2);o(),x("routerLink","edit")("disabled",!e.allowEdition),o(2),b("",m(4,5,"Edit")," "),o(2),x("disabled",!e.allowUndo),o(2),b("",m(8,7,"Undo")," ")}}function M8(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),it("click",function(){lt(e);let a=T(2);return st(a.chargebackTransaction())}),P(2,"fa-icon",16),c(3),p(4,"translate"),l()()}if(t&2){let e=T(2);o(),x("disabled",!e.allowChargeback),o(2),b("",m(4,2,"Chargeback")," ")}}function O8(t,n){t&1&&(s(0,"div",0),F(1,A8,9,9,"span",12)(2,M8,5,4,"span",12),l()),t&2&&(o(),x("mifosxHasPermission","ADJUST_LOAN"),o(),x("mifosxHasPermission","CHARGEBACK_LOAN"))}function I8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),b(" ",Ee(2,1,"Repayment Transaction","catalogs")," "))}function E8(t,n){if(t&1&&(s(0,"div",5)(1,"a",17),c(2),l()()),t&2){let e=T();o(),x("href",e.loanTransactionRelatedLink(e.transactionData.toLoanTransactionRelation.fromLoanTransaction),md),o(),b(" ",e.transactionData.toLoanTransactionRelation.fromLoanTransaction," ")}}function L8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"External Id")," "))}function k8(t,n){if(t&1&&(s(0,"div",5),P(1,"mifosx-external-identifier",18),l()),t&2){let e=T();o(),x("externalId",ce(e.transactionData.externalId))}}function F8(t,n){t&1&&(s(0,"div",4),c(1),p(2,"translateKey"),l()),t&2&&(o(),b(" ",Ee(2,1,"Classification","catalogs")," "))}function N8(t,n){if(t&1&&(s(0,"div",6),c(1),l()),t&2){let e=T();o(),b(" ",e.transactionData.classification.name," ")}}function R8(t,n){t&1&&P(0,"mat-divider",7),t&2&&x("inset",!0)}function B8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Relation Type")))}function q8(t,n){if(t&1&&(s(0,"td",29),c(1),p(2,"translate"),l()),t&2){let e=n.$implicit;x("matTooltip",e.paymentType),o(),b(" ",m(2,2,e.relationType)," ")}}function z8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Transaction")))}function j8(t,n){if(t&1&&(s(0,"td",30)(1,"a",17),c(2),l()()),t&2){let e=n.$implicit,i=T(2);o(),x("href",i.loanTransactionRelatedLink(e.toLoanTransaction),md),o(),b(" ",e.toLoanTransaction," ")}}function V8(t,n){t&1&&(s(0,"th",28),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function U8(t,n){if(t&1&&(s(0,"td",30),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.amount,i.transactionData.currency.code,"symbol-narrow","1.2-2")," ")}}function H8(t,n){t&1&&P(0,"tr",31)}function G8(t,n){t&1&&P(0,"tr",32)}function W8(t,n){if(t&1&&(s(0,"div",8),c(1),p(2,"translate"),P(3,"br"),s(4,"table",19),X(5,20),F(6,B8,3,3,"th",21)(7,q8,3,4,"td",22),Q(),X(8,23),F(9,z8,3,3,"th",21)(10,j8,3,2,"td",24),Q(),X(11,25),F(12,V8,3,3,"th",21)(13,U8,3,6,"td",24),Q(),F(14,H8,1,0,"tr",26)(15,G8,1,0,"tr",27),l()()),t&2){let e=T();o(),b(" ",m(2,4,"Linked Transactions")," "),o(3),x("dataSource",e.transactionRelations),o(10),x("matHeaderRowDef",e.displayedColumns),o(),x("matRowDefColumns",e.displayedColumns)}}function $8(t,n){if(t&1&&P(0,"mifosx-transaction-payment-detail",9),t&2){let e=T();x("paymentDetailData",e.transactionData.paymentDetailData)}}var C0=(()=>{class t{constructor(){this.loansService=A(At),this.route=A(It),this.dateUtils=A(me),this.router=A(le),this.dialog=A(Gn),this.translateService=A(Qi),this.settingsService=A(oe),this.organizationService=A(Np),this.alertService=A(Ql),this.allowEdition=!0,this.allowUndo=!0,this.allowChargeback=!0,this.existTransactionRelations=!1,this.paymentTypeOptions=[],this.transactionRelations=new Li,this.displayedColumns=["relationType","toTransaction","amount"],this.isFullRelated=!1,this.amountRelationsAllowed=0,this.route.data.subscribe(e=>{this.transactionData=e.loansAccountTransaction,this.transactionType=this.transactionData.type,this.allowEdition=!this.transactionData.manuallyReversed&&!this.allowTransactionEdition(this.transactionData.type.id),this.allowUndo=this.allowUndoTransaction(this.transactionData.manuallyReversed,this.transactionType),this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.transactionData.manuallyReversed;let i=!1;if(this.transactionData.transactionRelations){this.transactionRelations.data=this.transactionData.transactionRelations,this.existTransactionRelations=this.transactionData.transactionRelations.length>0;let a=0;this.transactionData.transactionRelations.forEach(r=>{r.relationType==="CHARGEBACK"&&(a+=r.amount,i=!0)}),this.amountRelationsAllowed=this.transactionData.amount-a,this.isFullRelated=this.amountRelationsAllowed===0,this.allowChargeback=this.allowChargebackTransaction(this.transactionType)&&!this.isFullRelated}this.allowChargeback||(this.allowEdition=!1),(this.existTransactionRelations&&i||this.transactionType.reAge||this.transactionType.reAmortize)&&(this.allowUndo=!1)}),this.clientId=this.route.snapshot.params.clientId,this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.allowChargeback&&this.organizationService.getPaymentTypesWithCode().toPromise().then(e=>{this.paymentTypeOptions=e})}allowTransactionEdition(e){return e===20||e===21||e===22||e===23||e===28}allowChargebackTransaction(e){return e.repayment||e.interestPaymentWaiver||e.goodwillCredit||e.payoutRefund||e.merchantIssuedRefund||e.downPayment}allowUndoTransaction(e,i){return!(e||i.interestRefund)}isWriteOff(e){return e.writeOff||e.code==="loanTransactionType.writeOff"}undoTransaction(){let e=this.route.snapshot.params.loanId;if(this.transactionType.contractTermination){let i=[new Pi({controlName:"note",label:"Note",value:"",type:"text",required:!1,order:1}),new Pi({controlName:"reversalExternalId",label:"externalId",value:"",type:"text",required:!1,order:2})],a={title:this.translateService.instant("labels.heading.Undo Transaction"),layout:{addButtonText:"Undo"},formfields:i,pristine:!1};this.dialog.open(gi,{data:a,width:"50rem"}).afterClosed().subscribe(u=>{if(u.data){let d={note:u.data.value.note,reversalExternalId:u.data.value.reversalExternalId};this.loansService.loanActionButtons(e,"undoContractTermination",d).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}else this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Undo Transaction"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want undo the transaction")+`${this.transactionData.id}`}}).afterClosed().subscribe(a=>{if(a.confirm){let r=this.settingsService.language.code,u=this.settingsService.dateFormat,d={transactionDate:this.dateUtils.formatDate(this.transactionData.date&&new Date(this.transactionData.date),u),transactionAmount:0,dateFormat:u,locale:r},g=this.isWriteOff(this.transactionType)?"undowriteoff":"undo",_=g==="undowriteoff"?null:this.transactionData.id;this.loansService.executeLoansAccountTransactionsCommand(e,g,d,_).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}})}chargebackTransaction(){let e=this.route.snapshot.params.loanId,i=[new nc({controlName:"paymentTypeId",label:"Payment Type",value:"",options:{label:"name",value:"id",data:this.paymentTypeOptions},required:!0,order:1}),new Pi({controlName:"amount",label:"Amount",value:this.amountRelationsAllowed,type:"number",required:!0,max:this.amountRelationsAllowed,order:2})],a={title:`Chargeback ${this.transactionType.value} Transaction`,layout:{addButtonText:"Chargeback"},formfields:i};this.dialog.open(gi,{data:a}).afterClosed().subscribe(u=>{if(u.data)if(u.data.value.amount<=this.amountRelationsAllowed){let d=this.settingsService.language.code,g={transactionAmount:u.data.value.amount,paymentTypeId:u.data.value.paymentTypeId,locale:d};this.loansService.executeLoansAccountTransactionsCommand(e,"chargeback",g,this.transactionData.id).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.route})})}else this.alertService.alert({type:"BusinessRule",message:"Chargeback amount must be lower or equal to: "+this.amountRelationsAllowed})})}loanTransactionRelatedLink(e){return`/#/clients/${this.clientId}/loans-accounts/${this.loanId}/transactions/${e}`}loanTransactionColor(){return this.transactionData.manuallyReversed?"undo":this.existTransactionRelations?"linked":"active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-transaction"]],decls:47,vars:51,consts:[[1,"container","m-b-20","transaction-buttons","layout-align-end","gap-2percent"],[1,"container"],[1,"layout-row-wrap","card-content"],[1,"flex-100",3,"ngClass"],[1,"flex-50","mat-body-strong"],[1,"flex-50"],[1,"flex-50","no-break-content"],[3,"inset"],[1,"mat-body-strong","flex-100"],[3,"paymentDetailData"],[1,"layout-row","layout-align-center","gap-2percent","column-on-mobile"],["type","button","mat-raised-button","","color","primary",3,"routerLink"],[4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"routerLink","disabled"],["icon","edit",1,"m-r-10"],["mat-raised-button","","color","warn",3,"click","disabled"],["icon","undo",1,"m-r-10"],[3,"href"],["completed","true",3,"externalId"],["mat-table","",3,"dataSource"],["matColumnDef","relationType"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"matTooltip",4,"matCellDef"],["matColumnDef","toTransaction"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"matTooltip"],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,O8,3,2,"div",0),s(1,"div",1)(2,"mat-card")(3,"mat-card-content")(4,"div",2),P(5,"div",3),s(6,"div",4),c(7),p(8,"translateKey"),l(),s(9,"div",5),c(10),l(),M(11,I8,3,4,"div",4),M(12,E8,3,2,"div",5),s(13,"div",4),c(14),p(15,"translateKey"),l(),s(16,"div",5),c(17),p(18,"translateKey"),l(),s(19,"div",4),c(20),p(21,"translateKey"),l(),s(22,"div",5),c(23),p(24,"dateFormat"),l(),s(25,"div",4),c(26),p(27,"translateKey"),l(),s(28,"div",5),c(29),l(),s(30,"div",4),c(31),p(32,"translateKey"),l(),s(33,"div",5),c(34),p(35,"currency"),l(),M(36,L8,3,3,"div",4),M(37,k8,2,2,"div",5),M(38,F8,3,4,"div",4),M(39,N8,2,1,"div",6),M(40,R8,1,1,"mat-divider",7),M(41,W8,16,6,"div",8),M(42,$8,1,1,"mifosx-transaction-payment-detail",9),l(),s(43,"div",10)(44,"button",11),c(45),p(46,"translate"),l()()()()()),i&2&&(O(a.transactionData.type.contra?-1:0),o(5),x("ngClass",a.loanTransactionColor()),o(2),b(" ",Ee(8,23,"Transaction Id","catalogs")," "),o(3),b(" ",a.transactionData.id," "),o(),O(a.transactionData.toLoanTransactionRelation?11:-1),o(),O(a.transactionData.toLoanTransactionRelation?12:-1),o(2),b(" ",Ee(15,26,"Type","catalogs")," "),o(3),b(" ",Ee(18,29,a.transactionData.type.value,"catalogs")," "),o(3),b(" ",Ee(21,32,"Transaction Date","catalogs")," "),o(3),b(" ",m(24,35,a.transactionData.date)," "),o(3),b(" ",Ee(27,37,"Currency","catalogs")," "),o(3),b(" ",a.transactionData.currency.name," "),o(2),b(" ",Ee(32,40,"Amount","catalogs")," "),o(3),b(" ",Ye(35,43,a.transactionData.amount,a.transactionData.currency.code,"symbol-narrow","1.2-2")," "),o(2),O(a.transactionData.externalId?36:-1),o(),O(a.transactionData.externalId?37:-1),o(),O(a.transactionData.classification?38:-1),o(),O(a.transactionData.classification?39:-1),o(),O(a.existTransactionRelations?40:-1),o(),O(a.existTransactionRelations?41:-1),o(),O(a.transactionData.paymentDetailData?42:-1),o(2),x("routerLink",Ut(50,T8)),o(),b(" ",m(46,48,"labels.buttons.Back")," "))},dependencies:[wt,pa,Pt,ae,ge,Te,Gt,Me,un,Va,$o,_n,vn,bn,xn,Cn,yn,Oi,Sn,wn,Dn,Pn,y1,Sa,gn,Tt,wa],styles:["body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f2f2f2}.bg-black[_ngcontent-%COMP%]{background-color:#000}.bg-light-grey[_ngcontent-%COMP%]{background-color:#e5e5e5}.bg-medium-grey[_ngcontent-%COMP%]{background-color:#ccc}.bg-grey[_ngcontent-%COMP%]{background-color:#999}.bg-dark-grey[_ngcontent-%COMP%]{background-color:#222}.bg-white[_ngcontent-%COMP%], .bg-fff[_ngcontent-%COMP%]{background-color:#fff}.bg-none[_ngcontent-%COMP%], .no-bg[_ngcontent-%COMP%]{background:none;background-image:none;background-color:transparent}.bg-facebook[_ngcontent-%COMP%]{background-color:#47639e}.bg-twitter[_ngcontent-%COMP%]{background-color:#02a8f3}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}.no-border[_ngcontent-%COMP%]{border:none}.no-border-t[_ngcontent-%COMP%]{border-top:none}.no-border-r[_ngcontent-%COMP%]{border-right:none}.no-border-b[_ngcontent-%COMP%]{border-bottom:none}.no-border-l[_ngcontent-%COMP%]{border-left:none}.no-border-lr[_ngcontent-%COMP%], .no-border-rl[_ngcontent-%COMP%]{border-left:none;border-right:none}.no-border-tb[_ngcontent-%COMP%], .no-border-bt[_ngcontent-%COMP%]{border-top:none;border-bottom:none}.no-border-tl[_ngcontent-%COMP%], .no-border-lt[_ngcontent-%COMP%]{border-top:none;border-left:none}.no-border-tr[_ngcontent-%COMP%], .no-border-rt[_ngcontent-%COMP%]{border-top:none;border-right:none}.no-border-bl[_ngcontent-%COMP%], .no-border-lb[_ngcontent-%COMP%]{border-bottom:none;border-left:none}.no-border-br[_ngcontent-%COMP%], .no-border-rb[_ngcontent-%COMP%]{border-bottom:none;border-right:none}.border-dashed[_ngcontent-%COMP%], .border-dotted[_ngcontent-%COMP%]{border-style:dashed}.border-black[_ngcontent-%COMP%]{border-color:#000}.border-light-grey[_ngcontent-%COMP%]{border-color:#e5e5e5}.border-medium-grey[_ngcontent-%COMP%]{border-color:#ccc}.border-grey[_ngcontent-%COMP%]{border-color:#999}.border-dark-grey[_ngcontent-%COMP%]{border-color:#2222}.border-white[_ngcontent-%COMP%], .border-fff[_ngcontent-%COMP%]{border-color:#fff}.no-border-radius[_ngcontent-%COMP%]{border-radius:0}.radius3[_ngcontent-%COMP%]{border-radius:3px}.radius5[_ngcontent-%COMP%]{border-radius:5px}.radius10[_ngcontent-%COMP%]{border-radius:10px}.column-mandatory[_ngcontent-%COMP%]{color:#5cb85c;text-align:center}.not-column-mandatory[_ngcontent-%COMP%]{color:#666f73;text-align:center}.cdk-drag-placeholder[_ngcontent-%COMP%]{background:#3498db}.yes[_ngcontent-%COMP%]{color:#5cb85c!important;background-color:#5cb85c;height:4px;cursor:none}.no[_ngcontent-%COMP%]{color:red;background-color:red;height:4px;cursor:none}.strike[_ngcontent-%COMP%]{text-decoration:line-through;color:red}.transfer[_ngcontent-%COMP%]{color:#16a085}.linked[_ngcontent-%COMP%]{color:#4461e2}.accrual[_ngcontent-%COMP%]{color:#999}.fa-question[_ngcontent-%COMP%]{color:#4461e2}.enabled[_ngcontent-%COMP%]{color:#32cd32}.disabled[_ngcontent-%COMP%]{color:#f44366}.v-mid[_ngcontent-%COMP%], .v-m[_ngcontent-%COMP%]{vertical-align:middle}.v-top[_ngcontent-%COMP%], .v-t[_ngcontent-%COMP%]{vertical-align:top}.v-bottom[_ngcontent-%COMP%], .v-b[_ngcontent-%COMP%]{vertical-align:bottom}.v-super[_ngcontent-%COMP%]{vertical-align:super}.r-amount[_ngcontent-%COMP%]{text-align:right!important;padding-right:5px!important}.left[_ngcontent-%COMP%]{text-align:left!important}.right[_ngcontent-%COMP%]{text-align:right!important}.center[_ngcontent-%COMP%]{text-align:center!important}.amount-plus[_ngcontent-%COMP%]{color:#000}.amount-minus[_ngcontent-%COMP%]{color:#4461e2}.block[_ngcontent-%COMP%]{display:block}.inline[_ngcontent-%COMP%]{display:inline}.in-block[_ngcontent-%COMP%]{display:inline-block;zoom:1}.d-none[_ngcontent-%COMP%], .hide[_ngcontent-%COMP%], .hidden[_ngcontent-%COMP%]{display:none}.t-0[_ngcontent-%COMP%]{top:0}.b-0[_ngcontent-%COMP%]{bottom:0}.l-0[_ngcontent-%COMP%]{left:0}.r-0[_ngcontent-%COMP%]{right:0}.tb-0[_ngcontent-%COMP%]{top:0;bottom:0}.lr-0[_ngcontent-%COMP%]{left:0;right:0}.f-left[_ngcontent-%COMP%]{float:left}.f-right[_ngcontent-%COMP%]{float:right}.f-none[_ngcontent-%COMP%]{float:none}textarea[_ngcontent-%COMP%]{resize:both}textarea.vertical[_ngcontent-%COMP%], textarea.horizontal[_ngcontent-%COMP%]{resize:vertical}textarea.noresize[_ngcontent-%COMP%]{resize:none}.full-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%}.normal[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] select[_ngcontent-%COMP%], .normal[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=checkbox][_ngcontent-%COMP%], .full-input[_ngcontent-%COMP%] [type=radio][_ngcontent-%COMP%]{width:auto}.mat-tab-body-content[_ngcontent-%COMP%]{margin-bottom:20px}.mat-datepicker-input[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}.loader-wrapper[_ngcontent-%COMP%]{height:100vh;width:100vw}.loader-wrapper[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;position:absolute;animation:_ngcontent-%COMP%_rotate .8s infinite .2s}.loader-wrapper[_ngcontent-%COMP%] .bottom[_ngcontent-%COMP%]{border-width:0 90px 90px;border-color:transparent transparent #1fb050;bottom:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .top[_ngcontent-%COMP%]{border-width:90px 90px 0;border-color:#b4d575 transparent transparent;top:calc(50% - 100px);left:calc(50% - 90px)}.loader-wrapper[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{border-width:90px 0 90px 90px;border-color:transparent transparent transparent #1074b9;top:calc(50% - 90px);left:calc(50% - 100px)}.loader-wrapper[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{border-width:90px 90px 90px 0;border-color:transparent #1daeec transparent transparent;top:calc(50% - 90px);right:calc(50% - 100px)}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}body[_ngcontent-%COMP%]{margin:0}.container[_ngcontent-%COMP%]{margin:0 auto}.mb-05[_ngcontent-%COMP%]{margin-bottom:.5rem}.mr-05[_ngcontent-%COMP%]{margin-right:.5rem}.mb-1[_ngcontent-%COMP%]{margin-bottom:1rem}.mt-1[_ngcontent-%COMP%]{margin-top:1rem}.m-5[_ngcontent-%COMP%]{margin:5px}.m-t-5[_ngcontent-%COMP%]{margin-top:5px}.m-r-5[_ngcontent-%COMP%]{margin-right:5px}.m-b-5[_ngcontent-%COMP%]{margin-bottom:5px}.m-l-5[_ngcontent-%COMP%]{margin-left:5px}.m-v-5[_ngcontent-%COMP%]{margin:5px 0}.m-h-5[_ngcontent-%COMP%]{margin:0 5px}.m-10[_ngcontent-%COMP%]{margin:10px}.m-t-10[_ngcontent-%COMP%]{margin-top:10px}.m-r-10[_ngcontent-%COMP%]{margin-right:10px}.m-b-10[_ngcontent-%COMP%]{margin-bottom:10px}.m-l-10[_ngcontent-%COMP%]{margin-left:10px}.m-v-10[_ngcontent-%COMP%]{margin:10px 0}.m-h-10[_ngcontent-%COMP%]{margin:0 10px}.m-15[_ngcontent-%COMP%]{margin:15px}.m-t-15[_ngcontent-%COMP%]{margin-top:15px}.m-r-15[_ngcontent-%COMP%]{margin-right:15px}.m-b-15[_ngcontent-%COMP%]{margin-bottom:15px}.m-l-15[_ngcontent-%COMP%]{margin-left:15px}.m-v-15[_ngcontent-%COMP%]{margin:15px 0}.m-h-15[_ngcontent-%COMP%]{margin:0 15px}.m-20[_ngcontent-%COMP%]{margin:20px}.m-t-20[_ngcontent-%COMP%]{margin-top:20px}.m-r-20[_ngcontent-%COMP%]{margin-right:20px}.m-b-20[_ngcontent-%COMP%]{margin-bottom:20px}.m-l-20[_ngcontent-%COMP%]{margin-left:20px}.m-v-20[_ngcontent-%COMP%]{margin:20px 0}.m-h-20[_ngcontent-%COMP%]{margin:0 20px}.m-25[_ngcontent-%COMP%]{margin:25px}.m-t-25[_ngcontent-%COMP%]{margin-top:25px}.m-r-25[_ngcontent-%COMP%]{margin-right:25px}.m-b-25[_ngcontent-%COMP%]{margin-bottom:25px}.m-l-25[_ngcontent-%COMP%]{margin-left:25px}.m-v-25[_ngcontent-%COMP%]{margin:25px 0}.m-h-25[_ngcontent-%COMP%]{margin:0 25px}.m-30[_ngcontent-%COMP%]{margin:30px}.m-t-30[_ngcontent-%COMP%]{margin-top:30px}.m-r-30[_ngcontent-%COMP%]{margin-right:30px}.m-b-30[_ngcontent-%COMP%]{margin-bottom:30px}.m-l-30[_ngcontent-%COMP%]{margin-left:30px}.m-v-30[_ngcontent-%COMP%]{margin:30px 0}.m-h-30[_ngcontent-%COMP%]{margin:0 30px}.m-35[_ngcontent-%COMP%]{margin:35px}.m-t-35[_ngcontent-%COMP%]{margin-top:35px}.m-r-35[_ngcontent-%COMP%]{margin-right:35px}.m-b-35[_ngcontent-%COMP%]{margin-bottom:35px}.m-l-35[_ngcontent-%COMP%]{margin-left:35px}.m-v-35[_ngcontent-%COMP%]{margin:35px 0}.m-h-35[_ngcontent-%COMP%]{margin:0 35px}.m-40[_ngcontent-%COMP%]{margin:40px}.m-t-40[_ngcontent-%COMP%]{margin-top:40px}.m-r-40[_ngcontent-%COMP%]{margin-right:40px}.m-b-40[_ngcontent-%COMP%]{margin-bottom:40px}.m-l-40[_ngcontent-%COMP%]{margin-left:40px}.m-v-40[_ngcontent-%COMP%]{margin:40px 0}.m-h-40[_ngcontent-%COMP%]{margin:0 40px}.m-45[_ngcontent-%COMP%]{margin:45px}.m-t-45[_ngcontent-%COMP%]{margin-top:45px}.m-r-45[_ngcontent-%COMP%]{margin-right:45px}.m-b-45[_ngcontent-%COMP%]{margin-bottom:45px}.m-l-45[_ngcontent-%COMP%]{margin-left:45px}.m-v-45[_ngcontent-%COMP%]{margin:45px 0}.m-h-45[_ngcontent-%COMP%]{margin:0 45px}.m-50[_ngcontent-%COMP%]{margin:50px}.m-t-50[_ngcontent-%COMP%]{margin-top:50px}.m-r-50[_ngcontent-%COMP%]{margin-right:50px}.m-b-50[_ngcontent-%COMP%]{margin-bottom:50px}.m-l-50[_ngcontent-%COMP%]{margin-left:50px}.m-v-50[_ngcontent-%COMP%]{margin:50px 0}.m-h-50[_ngcontent-%COMP%]{margin:0 50px}.m-55[_ngcontent-%COMP%]{margin:55px}.m-t-55[_ngcontent-%COMP%]{margin-top:55px}.m-r-55[_ngcontent-%COMP%]{margin-right:55px}.m-b-55[_ngcontent-%COMP%]{margin-bottom:55px}.m-l-55[_ngcontent-%COMP%]{margin-left:55px}.m-v-55[_ngcontent-%COMP%]{margin:55px 0}.m-h-55[_ngcontent-%COMP%]{margin:0 55px}.m-60[_ngcontent-%COMP%]{margin:60px}.m-t-60[_ngcontent-%COMP%]{margin-top:60px}.m-r-60[_ngcontent-%COMP%]{margin-right:60px}.m-b-60[_ngcontent-%COMP%]{margin-bottom:60px}.m-l-60[_ngcontent-%COMP%]{margin-left:60px}.m-v-60[_ngcontent-%COMP%]{margin:60px 0}.m-h-60[_ngcontent-%COMP%]{margin:0 60px}.m-65[_ngcontent-%COMP%]{margin:65px}.m-t-65[_ngcontent-%COMP%]{margin-top:65px}.m-r-65[_ngcontent-%COMP%]{margin-right:65px}.m-b-65[_ngcontent-%COMP%]{margin-bottom:65px}.m-l-65[_ngcontent-%COMP%]{margin-left:65px}.m-v-65[_ngcontent-%COMP%]{margin:65px 0}.m-h-65[_ngcontent-%COMP%]{margin:0 65px}.m-70[_ngcontent-%COMP%]{margin:70px}.m-t-70[_ngcontent-%COMP%]{margin-top:70px}.m-r-70[_ngcontent-%COMP%]{margin-right:70px}.m-b-70[_ngcontent-%COMP%]{margin-bottom:70px}.m-l-70[_ngcontent-%COMP%]{margin-left:70px}.m-v-70[_ngcontent-%COMP%]{margin:70px 0}.m-h-70[_ngcontent-%COMP%]{margin:0 70px}.m-75[_ngcontent-%COMP%]{margin:75px}.m-t-75[_ngcontent-%COMP%]{margin-top:75px}.m-r-75[_ngcontent-%COMP%]{margin-right:75px}.m-b-75[_ngcontent-%COMP%]{margin-bottom:75px}.m-l-75[_ngcontent-%COMP%]{margin-left:75px}.m-v-75[_ngcontent-%COMP%]{margin:75px 0}.m-h-75[_ngcontent-%COMP%]{margin:0 75px}.m-80[_ngcontent-%COMP%]{margin:80px}.m-t-80[_ngcontent-%COMP%]{margin-top:80px}.m-r-80[_ngcontent-%COMP%]{margin-right:80px}.m-b-80[_ngcontent-%COMP%]{margin-bottom:80px}.m-l-80[_ngcontent-%COMP%]{margin-left:80px}.m-v-80[_ngcontent-%COMP%]{margin:80px 0}.m-h-80[_ngcontent-%COMP%]{margin:0 80px}.no-m[_ngcontent-%COMP%]{margin:0}.no-m-t[_ngcontent-%COMP%]{margin-top:0}.no-m-r[_ngcontent-%COMP%]{margin-right:0}.no-m-b[_ngcontent-%COMP%]{margin-bottom:0}.no-m-l[_ngcontent-%COMP%]{margin-left:0}.no-m-v[_ngcontent-%COMP%], .no-m-h[_ngcontent-%COMP%], .no-margin[_ngcontent-%COMP%]{margin:0}.no-m-lr[_ngcontent-%COMP%], .no-m-rl[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.no-m-tb[_ngcontent-%COMP%], .no-m-bt[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0}.m-t-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-bottom:0}.m-b-only[_ngcontent-%COMP%]{margin-left:0;margin-right:0;margin-top:0}.m-l-only[_ngcontent-%COMP%]{margin-right:0;margin-top:0;margin-bottom:0}.m-r-only[_ngcontent-%COMP%]{margin-left:0;margin-top:0;margin-bottom:0}.m-auto[_ngcontent-%COMP%]{margin-left:auto;margin-right:auto}.ls-0[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-tap-highlight-color:transparent}div[_ngcontent-%COMP%]{box-sizing:border-box}.color-inherit[_ngcontent-%COMP%]{color:inherit}.no-shadow[_ngcontent-%COMP%]{box-shadow:none}.pointer[_ngcontent-%COMP%]{cursor:pointer}.nolist[_ngcontent-%COMP%]{list-style:none}.actions-menu[_ngcontent-%COMP%]{color:#fff}.alert[_ngcontent-%COMP%]{background-color:#e8f4fd;padding:6px 16px;font-size:.875rem;font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;line-height:1.43;border-radius:4px;letter-spacing:normal;margin:10px}.alert[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{padding:8px 0;font-size:18px}.alert[_ngcontent-%COMP%] .alert-check[_ngcontent-%COMP%]{color:#359ff4;margin-right:2px;font-size:1.4rem} .mat-tooltip{font-size:15px;color:#fff!important;background-color:#4461e2b3;border:1px solid rgb(25.7777777778,51.5555555556,166.2222222222);max-width:400px!important;white-space:pre-line!important}.loading[_ngcontent-%COMP%]{position:absolute;min-width:100%;width:100px;height:12px;background:linear-gradient(125deg,#fff,#4461e2,#fff);animation:grow 4s linear infinite,move 4s linear infinite}mat-card-title[_ngcontent-%COMP%]{font-weight:600;font-size:x-large;padding-left:20px;padding-top:20px}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{overflow:hidden}.overflow-x-scroll[_ngcontent-%COMP%]{max-width:100%;overflow-x:auto}.overflow-no[_ngcontent-%COMP%]{overflow:hidden}.overflow-auto[_ngcontent-%COMP%]{overflow:auto}.overflow-scroll[_ngcontent-%COMP%]{overflow:scroll}.table-container[_ngcontent-%COMP%]{overflow-x:auto;max-width:100%}body[_ngcontent-%COMP%], .no-p[_ngcontent-%COMP%]{padding:0}.no-p-t[_ngcontent-%COMP%]{padding-top:0}.no-p-r[_ngcontent-%COMP%]{padding-right:0}.no-p-b[_ngcontent-%COMP%]{padding-bottom:0}.no-p-l[_ngcontent-%COMP%]{padding-left:0}.no-p-v[_ngcontent-%COMP%], .no-p-h[_ngcontent-%COMP%]{padding:0}.p-5[_ngcontent-%COMP%]{padding:5px}.p-t-5[_ngcontent-%COMP%]{padding-top:5px}.p-r-5[_ngcontent-%COMP%]{padding-right:5px}.p-b-5[_ngcontent-%COMP%]{padding-bottom:5px}.p-l-5[_ngcontent-%COMP%]{padding-left:5px}.p-v-5[_ngcontent-%COMP%]{padding:5px 0}.p-h-5[_ngcontent-%COMP%]{padding:0 5px}.p-10[_ngcontent-%COMP%]{padding:10px}.p-t-10[_ngcontent-%COMP%]{padding-top:10px}.p-b-10[_ngcontent-%COMP%]{padding-bottom:10px}.p-v-10[_ngcontent-%COMP%]{padding:10px 0}.p-h-10[_ngcontent-%COMP%]{padding:0 10px}.p-15[_ngcontent-%COMP%]{padding:15px}.p-t-15[_ngcontent-%COMP%]{padding-top:15px}.p-r-15[_ngcontent-%COMP%]{padding-right:15px}.p-b-15[_ngcontent-%COMP%]{padding-bottom:15px}.p-l-15[_ngcontent-%COMP%]{padding-left:15px}.p-v-15[_ngcontent-%COMP%]{padding:15px 0}.p-h-15[_ngcontent-%COMP%]{padding:0 15px}.p-20[_ngcontent-%COMP%]{padding:20px}.p-t-20[_ngcontent-%COMP%]{padding-top:20px}.p-r-20[_ngcontent-%COMP%]{padding-right:20px}.p-b-20[_ngcontent-%COMP%]{padding-bottom:20px}.p-l-20[_ngcontent-%COMP%]{padding-left:20px}.p-v-20[_ngcontent-%COMP%]{padding:20px 0}.p-h-20[_ngcontent-%COMP%]{padding:0 20px}.p-25[_ngcontent-%COMP%]{padding:25px}.p-t-25[_ngcontent-%COMP%]{padding-top:25px}.p-r-25[_ngcontent-%COMP%]{padding-right:25px}.p-b-25[_ngcontent-%COMP%]{padding-bottom:25px}.p-l-25[_ngcontent-%COMP%]{padding-left:25px}.p-v-25[_ngcontent-%COMP%]{padding:25px 0}.p-h-25[_ngcontent-%COMP%]{padding:0 25px}.p-30[_ngcontent-%COMP%]{padding:30px}.p-t-30[_ngcontent-%COMP%]{padding-top:30px}.p-r-30[_ngcontent-%COMP%]{padding-right:30px}.p-b-30[_ngcontent-%COMP%]{padding-bottom:30px}.p-l-30[_ngcontent-%COMP%]{padding-left:30px}.p-v-30[_ngcontent-%COMP%]{padding:30px 0}.p-h-30[_ngcontent-%COMP%]{padding:0 30px}.p-35[_ngcontent-%COMP%]{padding:35px}.p-t-35[_ngcontent-%COMP%]{padding-top:35px}.p-r-35[_ngcontent-%COMP%]{padding-right:35px}.p-b-35[_ngcontent-%COMP%]{padding-bottom:35px}.p-l-35[_ngcontent-%COMP%]{padding-left:35px}.p-v-35[_ngcontent-%COMP%]{padding:35px 0}.p-h-35[_ngcontent-%COMP%]{padding:0 35px}.p-40[_ngcontent-%COMP%]{padding:40px}.p-t-40[_ngcontent-%COMP%]{padding-top:40px}.p-r-40[_ngcontent-%COMP%]{padding-right:40px}.p-b-40[_ngcontent-%COMP%]{padding-bottom:40px}.p-l-40[_ngcontent-%COMP%]{padding-left:40px}.p-v-40[_ngcontent-%COMP%]{padding-top:40px;padding-bottom:40px}.p-h-40[_ngcontent-%COMP%]{padding:0 40px}.p-45[_ngcontent-%COMP%]{padding:45px}.p-t-45[_ngcontent-%COMP%]{padding-top:45px}.p-r-45[_ngcontent-%COMP%]{padding-right:45px}.p-b-45[_ngcontent-%COMP%]{padding-bottom:45px}.p-l-45[_ngcontent-%COMP%]{padding-left:45px}.p-v-45[_ngcontent-%COMP%]{padding:45px 0}.p-h-45[_ngcontent-%COMP%]{padding:0 45px}.p-50[_ngcontent-%COMP%]{padding:50px}.p-t-50[_ngcontent-%COMP%]{padding-top:50px}.p-r-50[_ngcontent-%COMP%]{padding-right:50px}.p-b-50[_ngcontent-%COMP%]{padding-bottom:50px}.p-l-50[_ngcontent-%COMP%]{padding-left:50px}.p-v-50[_ngcontent-%COMP%]{padding:50px 0}.p-h-50[_ngcontent-%COMP%]{padding:0 50px}.p-55[_ngcontent-%COMP%]{padding:55px}.p-t-55[_ngcontent-%COMP%]{padding-top:55px}.p-r-55[_ngcontent-%COMP%]{padding-right:55px}.p-b-55[_ngcontent-%COMP%]{padding-bottom:55px}.p-l-55[_ngcontent-%COMP%]{padding-left:55px}.p-v-55[_ngcontent-%COMP%]{padding:55px 0}.p-h-55[_ngcontent-%COMP%]{padding:0 55px}.p-60[_ngcontent-%COMP%]{padding:60px}.p-t-60[_ngcontent-%COMP%]{padding-top:60px}.p-r-60[_ngcontent-%COMP%]{padding-right:60px}.p-b-60[_ngcontent-%COMP%]{padding-bottom:60px}.p-l-60[_ngcontent-%COMP%]{padding-left:60px}.p-v-60[_ngcontent-%COMP%]{padding:60px 0}.p-h-60[_ngcontent-%COMP%]{padding:0 60px}.p-65[_ngcontent-%COMP%]{padding:65px}.p-t-65[_ngcontent-%COMP%]{padding-top:65px}.p-r-65[_ngcontent-%COMP%]{padding-right:65px}.p-b-65[_ngcontent-%COMP%]{padding-bottom:65px}.p-l-65[_ngcontent-%COMP%]{padding-left:65px}.p-v-65[_ngcontent-%COMP%]{padding:65px 0}.p-h-65[_ngcontent-%COMP%]{padding:0 65px}.p-70[_ngcontent-%COMP%]{padding:70px}.p-t-70[_ngcontent-%COMP%]{padding-top:70px}.p-r-70[_ngcontent-%COMP%]{padding-right:70px}.p-b-70[_ngcontent-%COMP%]{padding-bottom:70px}.p-l-70[_ngcontent-%COMP%]{padding-left:70px}.p-v-70[_ngcontent-%COMP%]{padding:70px 0}.p-h-70[_ngcontent-%COMP%]{padding:0 70px}.p-75[_ngcontent-%COMP%]{padding:75px}.p-t-75[_ngcontent-%COMP%]{padding-top:75px}.p-r-75[_ngcontent-%COMP%]{padding-right:75px}.p-b-75[_ngcontent-%COMP%]{padding-bottom:75px}.p-l-75[_ngcontent-%COMP%]{padding-left:75px}.p-v-75[_ngcontent-%COMP%]{padding:75px 0}.p-h-75[_ngcontent-%COMP%]{padding:0 75px}.p-80[_ngcontent-%COMP%]{padding:80px}.p-t-80[_ngcontent-%COMP%]{padding-top:80px}.p-r-80[_ngcontent-%COMP%]{padding-right:80px}.p-b-80[_ngcontent-%COMP%]{padding-bottom:80px}.p-l-80[_ngcontent-%COMP%]{padding-left:80px}.p-v-80[_ngcontent-%COMP%]{padding:80px 0}.p-h-80[_ngcontent-%COMP%]{padding:0 80px}.no-padding[_ngcontent-%COMP%]{padding:0!important}.no-pad-lr[_ngcontent-%COMP%], .no-pad-rl[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.no-pad-tb[_ngcontent-%COMP%], .no-pad-bt[_ngcontent-%COMP%]{padding-top:0;padding-bottom:0}.pad-t-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-bottom:0}.pad-b-only[_ngcontent-%COMP%]{padding-left:0;padding-right:0;padding-top:0}.pad-l-only[_ngcontent-%COMP%]{padding-right:0;padding-top:0;padding-bottom:0}.pad-r-only[_ngcontent-%COMP%]{padding-left:0;padding-top:0;padding-bottom:0}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%], .rel[_ngcontent-%COMP%], .relative[_ngcontent-%COMP%]{position:relative}.abs[_ngcontent-%COMP%], .absolute[_ngcontent-%COMP%]{position:absolute}.fixed[_ngcontent-%COMP%]{position:fixed}.status-active[_ngcontent-%COMP%]{color:#5cb85c}.status-inactive[_ngcontent-%COMP%]{color:#666f73}.status-deleted[_ngcontent-%COMP%]{color:#000}.status-pending[_ngcontent-%COMP%]{color:orange}.status-approved[_ngcontent-%COMP%]{color:#4461e2}.status-overpaid[_ngcontent-%COMP%]{color:purple}.status-chargeoff[_ngcontent-%COMP%]{color:#f39c12}.status-active-overdue[_ngcontent-%COMP%], .status-block[_ngcontent-%COMP%]{color:red}.status-matured[_ngcontent-%COMP%]{color:#ff4000}.subStatus-contract-termination[_ngcontent-%COMP%]{color:#b3b3b3}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%]{background-color:#2af72a}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-progress[_ngcontent-%COMP%]{color:#ff4000}.mat-step-header[_ngcontent-%COMP%] .mat-step-icon-state-done[_ngcontent-%COMP%] .status-transfer-hold[_ngcontent-%COMP%]{color:#df0101}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{-webkit-font-smoothing:antialiased}html[_ngcontent-%COMP%]{font-size:16px}body[_ngcontent-%COMP%]{font-family:Roboto,Helvetica Neue,sans-serif;font-weight:400;font-size:14px;color:#000000de;line-height:1.5;letter-spacing:normal}.mat-h1[_ngcontent-%COMP%], .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font:400 24px/32px Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;margin:0 0 16px}.lh-1[_ngcontent-%COMP%]{line-height:1}.lh-13[_ngcontent-%COMP%]{line-height:1.3}.lh-15[_ngcontent-%COMP%]{line-height:1.5}.bold[_ngcontent-%COMP%], .strong[_ngcontent-%COMP%]{font-weight:700}.no-bold[_ngcontent-%COMP%]{font-weight:400}.italic[_ngcontent-%COMP%], .em[_ngcontent-%COMP%]{font-style:italic}.strike[_ngcontent-%COMP%]{text-decoration:line-through}.normal[_ngcontent-%COMP%]{font-weight:400;font-style:normal}.uppercase[_ngcontent-%COMP%]{text-transform:uppercase}.text-left[_ngcontent-%COMP%]{text-align:left}.text-center[_ngcontent-%COMP%]{text-align:center}.text-right[_ngcontent-%COMP%]{text-align:right}.w100[_ngcontent-%COMP%]{font-weight:100}.w200[_ngcontent-%COMP%]{font-weight:200}.w300[_ngcontent-%COMP%]{font-weight:300}.w400[_ngcontent-%COMP%]{font-weight:400}.w500[_ngcontent-%COMP%]{font-weight:500}.w600[_ngcontent-%COMP%]{font-weight:600}.w700[_ngcontent-%COMP%]{font-weight:700}.w800[_ngcontent-%COMP%]{font-weight:800}.w900[_ngcontent-%COMP%]{font-weight:900}.f9[_ngcontent-%COMP%]{font-size:9px}.f10[_ngcontent-%COMP%]{font-size:10px}.f11[_ngcontent-%COMP%]{font-size:11px}.f12[_ngcontent-%COMP%]{font-size:12px}.f13[_ngcontent-%COMP%]{font-size:13px}.f14[_ngcontent-%COMP%]{font-size:14px}.f15[_ngcontent-%COMP%]{font-size:15px}.f16[_ngcontent-%COMP%]{font-size:16px}.f17[_ngcontent-%COMP%]{font-size:17px}.f18[_ngcontent-%COMP%]{font-size:18px;line-height:30px}.f19[_ngcontent-%COMP%]{font-size:19px}.f20[_ngcontent-%COMP%]{font-size:20px}.f30[_ngcontent-%COMP%]{font-size:30px}.f40[_ngcontent-%COMP%]{font-size:40px}.f50[_ngcontent-%COMP%]{font-size:50px}.f60[_ngcontent-%COMP%]{font-size:60px}.size-small[_ngcontent-%COMP%]{font-size:75%}.size-normal[_ngcontent-%COMP%]{font-size:100%}.size-medium[_ngcontent-%COMP%]{font-size:125%}.size-big[_ngcontent-%COMP%], .size-large[_ngcontent-%COMP%]{font-size:150%}.size-huge[_ngcontent-%COMP%]{font-size:200%}.inherit[_ngcontent-%COMP%]{font:inherit}.text-shadow[_ngcontent-%COMP%]{text-shadow:1px 1px 1px rgba(0,0,0,.4)}.text-rgb-2[_ngcontent-%COMP%]{color:#0003}.text-rgb-3[_ngcontent-%COMP%]{color:#0000004d}.text-rgb-4[_ngcontent-%COMP%]{color:#0006}.text-rgb-5[_ngcontent-%COMP%]{color:#00000080}.no-ul[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%]:hover, .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .no-ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:none}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.auto-cell-size[_ngcontent-%COMP%]{white-space:nowrap;width:1%}.ls-0[_ngcontent-%COMP%]{letter-spacing:-3px;white-space:nowrap}.label-field[_ngcontent-%COMP%]{margin-top:32px}.wrap-content[_ngcontent-%COMP%]{overflow-wrap:break-word;word-wrap:break-word}.no-break-content[_ngcontent-%COMP%]{overflow-wrap:anywhere!important}.fit[_ngcontent-%COMP%]{max-width:100%}.half-width[_ngcontent-%COMP%]{width:50%}.full-width[_ngcontent-%COMP%]{width:100%}.full-height[_ngcontent-%COMP%]{height:100%}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{width:100%;height:100%;min-height:100%}body[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{max-width:74rem;width:90%}.mw300[_ngcontent-%COMP%]{max-width:300px}.mw400[_ngcontent-%COMP%]{max-width:400px}.mw500[_ngcontent-%COMP%]{max-width:500px}.mw600[_ngcontent-%COMP%]{max-width:600px}.fullwidth[_ngcontent-%COMP%]{width:100%}.zindex-1[_ngcontent-%COMP%]{z-index:1}.zindex-2[_ngcontent-%COMP%]{z-index:2}.zindex-3[_ngcontent-%COMP%]{z-index:3}.zindex-4[_ngcontent-%COMP%]{z-index:4}.container[_ngcontent-%COMP%]{max-width:37rem}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:1rem 0;word-wrap:break-word}.container[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] mifosx-transaction-payment-detail[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.transaction-buttons[_ngcontent-%COMP%]{margin-top:3%}.loan-relation[_ngcontent-%COMP%]{background-color:#d7dada}.active[_ngcontent-%COMP%]{background-color:#5cb85c;height:4px}.linked[_ngcontent-%COMP%]{background-color:#4461e2;height:4px}.undo[_ngcontent-%COMP%]{background-color:red;height:4px}"]})}}return t})();var Y8=()=>["../"];function K8(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Transaction Date")," ",m(3,5,"labels.commons.is")," "),o(4),b(" ",m(6,7,"labels.commons.required")," "))}function Z8(t,n){if(t&1&&(s(0,"mat-option",10),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function J8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Account Number")))}function X8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",19),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Cheque")))}function Q8(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",20),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Routing Code")))}function tL(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",21),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Receipt Number")))}function eL(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",22),l()),t&2&&(o(2),C(m(3,1,"labels.inputs.Bank")))}var b0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.route=A(It),this.router=A(le),this.dateUtils=A(me),this.loansService=A(At),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.showPaymentDetails=!1,this.route.data.subscribe(e=>{this.transactionTemplateData=e.loansAccountTransactionTemplate,e.loansAccountTransactionTemplate.currency&&(this.currency=e.loansAccountTransactionTemplate.currency),this.paymentTypeOptions=this.transactionTemplateData.paymentTypeOptions}),this.loanAccountId=this.route.snapshot.params.loanId}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createEditTransactionForm(),this.editTransactionForm.patchValue({transactionDate:this.transactionTemplateData.date&&new Date(this.transactionTemplateData.date),transactionAmount:this.transactionTemplateData.amount,externalId:this.transactionTemplateData.externalId,paymentTypeId:this.transactionTemplateData.paymentTypeId})}createEditTransactionForm(){this.editTransactionForm=this.formBuilder.group({transactionDate:["",Wt.required],transactionAmount:["",Wt.required],externalId:[""],paymentTypeId:[""]})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.editTransactionForm.addControl("accountNumber",new pe("")),this.editTransactionForm.addControl("checkNumber",new pe("")),this.editTransactionForm.addControl("routingCode",new pe("")),this.editTransactionForm.addControl("receiptNumber",new pe("")),this.editTransactionForm.addControl("bankNumber",new pe(""))):(this.editTransactionForm.removeControl("accountNumber"),this.editTransactionForm.removeControl("checkNumber"),this.editTransactionForm.removeControl("routingCode"),this.editTransactionForm.removeControl("receiptNumber"),this.editTransactionForm.removeControl("bankNumber"))}submit(){let e=this.editTransactionForm.value,i=this.settingsService.language.code,a=this.settingsService.dateFormat,r=this.editTransactionForm.value.transactionDate;e.transactionDate instanceof Date&&(e.transactionDate=this.dateUtils.formatDate(r,a));let u=Se(ie({},e),{dateFormat:a,locale:i});u.transactionAmount=u.transactionAmount*1,this.loansService.executeLoansAccountTransactionsCommand(this.loanAccountId,"modify",u,this.transactionTemplateData.id).subscribe(d=>{this.router.navigate(["../"],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-edit-transaction"]],decls:45,vars:37,consts:[["dueDatePicker",""],[1,"container"],[3,"ngSubmit","formGroup"],[1,"layout-column"],[3,"click"],["matInput","","formControlName","transactionDate","required","",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[3,"currency","isRequired","inputFormControl","inputLabel"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],[1,"layout-row","layout-xs-column","layout-align-center","gap-5px"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["type","number","formControlName","accountNumber","matInput",""],["type","number","formControlName","checkNumber","matInput",""],["formControlName","routingCode","matInput",""],["formControlName","receiptNumber","matInput",""],["formControlName","bankNumber","matInput",""]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",1)(1,"mat-card")(2,"form",2),it("ngSubmit",function(){return lt(r),st(a.submit())}),s(3,"mat-card-content",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Et(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,K8,7,9,"mat-error"),l(),P(13,"mifosx-input-amount",7),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",8),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",9),de(24,Z8,2,2,"mat-option",10,xe),l()(),s(26,"div",11)(27,"span",12),it("click",function(){return lt(r),st(a.addPaymentDetails())}),s(28,"mat-slide-toggle")(29,"div",13)(30,"span",14),c(31),p(32,"translate"),l()()()()(),M(33,J8,5,3,"mat-form-field"),M(34,X8,5,3,"mat-form-field"),M(35,Q8,5,3,"mat-form-field"),M(36,tL,5,3,"mat-form-field"),M(37,eL,5,3,"mat-form-field"),s(38,"mat-card-actions",15)(39,"button",16),c(40),p(41,"translate"),l(),s(42,"button",17),c(43),p(44,"translate"),l()()()()()()}if(i&2){let r=Et(11);o(2),x("formGroup",a.editTransactionForm),o(4),C(m(7,24,"labels.inputs.Transaction Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.editTransactionForm.controls.transactionDate.hasError("required")?12:-1),o(),x("currency",a.currency)("isRequired",!0)("inputFormControl",a.editTransactionForm.controls.transactionAmount)("inputLabel","Transaction Amount"),o(3),C(m(17,26,"labels.inputs.External Id")),o(5),C(m(22,28,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypeOptions),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),C(m(32,30,"labels.inputs.Show Payment Details")),o(2),O(a.editTransactionForm.controls.accountNumber?33:-1),o(),O(a.editTransactionForm.controls.checkNumber?34:-1),o(),O(a.editTransactionForm.controls.routingCode?35:-1),o(),O(a.editTransactionForm.controls.receiptNumber?36:-1),o(),O(a.editTransactionForm.controls.bankNumber?37:-1),o(2),x("routerLink",Ut(36,Y8)),o(),b(" ",m(41,32,"labels.buttons.Cancel")," "),o(2),x("disabled",!a.editTransactionForm.valid),o(),b(" ",m(44,34,"labels.buttons.Submit")," ")}},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,en,nn,tn,Gt,Bi,za,Tt],styles:[".container[_ngcontent-%COMP%]{width:37rem;margin-top:3%;padding-bottom:2%}"]})}}return t})();var nL=()=>["../../../general"],v0=(()=>{class t{constructor(){this.sanitizer=A(Jl),this.route=A(It),this.route.data.subscribe(e=>{this.transactionRecieptData=e.loansTransactionReciept})}ngOnInit(){let e=this.transactionRecieptData.headers.get("Content-Type"),i=new Blob([this.transactionRecieptData.body],{type:e}),a=URL.createObjectURL(i);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-view-reciept"]],decls:7,vars:6,consts:[[1,"container"],[1,"back-button"],["type","button","color","primary","mat-raised-button","",3,"routerLink"],["icon","arrow-left",1,"m-r-10"],["frameborder","0","width","100%","height","600px;",3,"src"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"div",1)(2,"button",2),P(3,"fa-icon",3),c(4),p(5,"translate"),l()(),P(6,"iframe",4),l()),i&2&&(o(2),x("routerLink",Ut(5,nL)),o(2),b("",m(5,3,"labels.buttons.Back")," "),o(2),x("src",a.pentahoUrl,hp))},dependencies:[wt,Pt,ae,ge,Gt,un,Tt],styles:[".container[_ngcontent-%COMP%]{max-width:50rem}.container[_ngcontent-%COMP%] .back-button[_ngcontent-%COMP%]{max-height:2%;margin-bottom:2%}"]})}}return t})();var iL=()=>["../"];function aL(t,n){if(t&1&&P(0,"iframe",13),t&2){let e=T();x("src",e.pentahoUrl,hp)}}var x0=(()=>{class t{constructor(){this.sanitizer=A(Jl),this.reportsService=A(kp),this.formBuilder=A(Pe),this.dateUtils=A(me),this.route=A(It),this.settingsService=A(oe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.hideOutput=!0,this.route.parent.parent.data.subscribe(e=>{this.loansAccountId=e.loanDetailsData.accountNo})}ngOnInit(){this.maxDate=this.settingsService.businessDate,this.createTransactionsReportForm()}createTransactionsReportForm(){this.transactionsReportForm=this.formBuilder.group({fromDate:["",Wt.required],toDate:[this.settingsService.businessDate,Wt.required]})}generate(){let e=this.settingsService.dateFormat,i={"output-type":"PDF",R_startDate:this.dateUtils.formatDate(this.transactionsReportForm.value.fromDate,e),R_endDate:this.dateUtils.formatDate(this.transactionsReportForm.value.toDate,e),R_selectLoan:this.loansAccountId};this.reportsService.getPentahoRunReportData("Client Loan Account Schedule",i,"default","en",e).subscribe(a=>{let r=a.headers.get("Content-Type"),u=new Blob([a.body],{type:r}),d=URL.createObjectURL(u);this.pentahoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(d),this.hideOutput=!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-export-transactions"]],decls:41,vars:43,consts:[["fromDatePicker",""],["toDatePicker",""],[1,"layout-column","m-t-20",3,"ngSubmit","formGroup"],[1,"layout-row","layout-align-center","gap-3percent"],[1,"flex-fill",3,"click"],["matInput","","required","","formControlName","fromDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],[1,"flex-fill","flex-30",3,"click"],["matInput","","required","","formControlName","toDate",3,"min","max","matDatepicker"],[1,"generate-button","layout-row","layout-xs-column","layout-align-center","gap-5percent"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled"],["icon","cogs",1,"m-r-10"],["frameborder","0","width","100%","height","750px;",3,"src"]],template:function(i,a){if(i&1){let r=Ct();s(0,"form",2),it("ngSubmit",function(){return lt(r),st(a.generate())}),s(1,"div",3)(2,"mat-form-field",4),it("click",function(){lt(r);let d=Et(9);return st(d.open())}),s(3,"mat-label"),c(4),p(5,"translate"),l(),P(6,"input",5)(7,"mat-datepicker-toggle",6)(8,"mat-datepicker",null,0),s(10,"mat-error"),c(11),p(12,"translate"),p(13,"translate"),s(14,"strong"),c(15),p(16,"translate"),l()()(),s(17,"mat-form-field",7),it("click",function(){lt(r);let d=Et(24);return st(d.open())}),s(18,"mat-label"),c(19),p(20,"translate"),l(),P(21,"input",8)(22,"mat-datepicker-toggle",6)(23,"mat-datepicker",null,1),s(25,"mat-error"),c(26),p(27,"translate"),p(28,"translate"),s(29,"strong"),c(30),p(31,"translate"),l()()()(),s(32,"div",9)(33,"button",10),c(34),p(35,"translate"),l(),s(36,"button",11),P(37,"fa-icon",12),c(38),p(39,"translate"),l()()(),M(40,aL,1,1,"iframe",13)}if(i&2){let r=Et(9),u=Et(24);x("formGroup",a.transactionsReportForm),o(4),C(m(5,22,"labels.inputs.From Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(4),$t(" ",m(12,24,"labels.inputs.From date")," ",m(13,26,"labels.commons.is")," "),o(4),b(" ",m(16,28,"labels.commons.required")," "),o(4),C(m(20,30,"labels.inputs.To Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(4),$t(" ",m(27,32,"labels.inputs.To date")," ",m(28,34,"labels.commons.is")," "),o(4),b(" ",m(31,36,"labels.commons.required")," "),o(3),x("routerLink",Ut(42,iL)),o(),C(m(35,38,"labels.buttons.Cancel")),o(2),x("disabled",!a.transactionsReportForm.valid),o(2),b("",m(39,40,"labels.buttons.Generate Report")," \xA0 "),o(2),O(a.hideOutput?-1:40)}},dependencies:[wt,Pt,Ne,we,he,Le,je,ke,Fe,ae,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,un,Tt],styles:[".generate-button[_ngcontent-%COMP%]{max-height:2%;padding:1% 0 2% 6%;align-self:center}"]})}}return t})();var oL=t=>["../../",t,"general"];function rL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Id")))}function lL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.childLoanId," ")}}function sL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client ID")))}function cL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.clientId)}}function pL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Name")))}function mL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.clientName)}}function dL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Account Number")))}function uL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.childLoanAccountNo)}}function fL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Principal Loan")))}function hL(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.childPrincipalAmount)}}function gL(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Group Principal Loan")))}function _L(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),C(e.parentPrincipalAmount)}}function CL(t,n){t&1&&P(0,"tr",14)}function bL(t,n){if(t&1&&P(0,"tr",15),t&2){let e=n.$implicit;x("routerLink",ka(1,oL,e.childLoanId))}}var y0=(()=>{class t{constructor(){this.route=A(It),this.dialog=A(Gn),this.displayedColumns=["loanId","clientId","clientName","loanAccountNumber","clientPrincipalLoan","groupPrincipalLoan"],this.route.data.subscribe(e=>{this.glimOverviewData=e.glimData})}ngOnInit(){this.setLoanClientChargeOverview()}setLoanClientChargeOverview(){this.dataSource=new Li(this.glimOverviewData)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-glim-account"]],viewQuery:function(i,a){if(i&1&&ri(Do,7),i&2){let r;li(r=si())&&(a.paginator=r.first)}},decls:26,vars:6,consts:[[1,"loan-card"],["mat-table","",3,"dataSource"],["matColumnDef","loanId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","clientId"],["matColumnDef","clientName"],["matColumnDef","loanAccountNumber"],["matColumnDef","clientPrincipalLoan"],["matColumnDef","groupPrincipalLoan"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"routerLink",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"routerLink"]],template:function(i,a){i&1&&(s(0,"mat-card",0)(1,"mat-card-content")(2,"h2"),c(3),p(4,"translate"),l(),s(5,"table",1),X(6,2),F(7,rL,3,3,"th",3)(8,lL,2,1,"td",4),Q(),X(9,5),F(10,sL,3,3,"th",3)(11,cL,2,1,"td",4),Q(),X(12,6),F(13,pL,3,3,"th",3)(14,mL,2,1,"td",4),Q(),X(15,7),F(16,dL,3,3,"th",3)(17,uL,2,1,"td",4),Q(),X(18,8),F(19,fL,3,3,"th",3)(20,hL,2,1,"td",4),Q(),X(21,9),F(22,gL,3,3,"th",3)(23,_L,2,1,"td",4),Q(),F(24,CL,1,0,"tr",10)(25,bL,1,3,"tr",11),l()()()),i&2&&(o(3),C(m(4,4,"labels.heading.GLIM Account Overview")),o(2),x("dataSource",a.dataSource),o(19),x("matHeaderRowDef",a.displayedColumns),o(),x("matRowDefColumns",a.displayedColumns))},dependencies:[wt,Pt,ae,ge,Te,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt],styles:[".loan-card[_ngcontent-%COMP%]{margin:0 auto;max-width:80rem;width:90%;padding:0}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%]{color:#fff;width:90%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-title-group[_ngcontent-%COMP%] .loan-card-title[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%]{margin:1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .profile-image-container[_ngcontent-%COMP%] .profile-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:20px}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-actions[_ngcontent-%COMP%]{align-self:flex-end;margin:0 1%}.loan-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .loan-span[_ngcontent-%COMP%]{margin:0 .5%}.loan-card[_ngcontent-%COMP%] .navigation-tabs[_ngcontent-%COMP%]{overflow:auto}.loans-overview[_ngcontent-%COMP%]{font-size:14px}"]})}}return t})();var vL=()=>["../","general"];function xL(t,n){if(t&1){let e=Ct();s(0,"th",17)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelects())}),ec("ngModelChange",function(a){lt(e);let r=T(2);return tc(r.selectAllItems,a)||(r.selectAllItems=a),st(a)}),l()()}if(t&2){let e=T(2);o(),Qs("ngModel",e.selectAllItems)}}function yL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-checkbox",18),it("change",function(){lt(e);let a=T(2);return st(a.toggleSelect())}),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.selected,a)||(r.selected=a),st(a)}),l()()}if(t&2){let e=n.$implicit;o(),Qs("ngModel",e.selected)}}function SL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client ID")))}function DL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),C(e.id)}}function wL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Client Name")))}function PL(t,n){if(t&1&&(s(0,"td",19),c(1),l()),t&2){let e=n.$implicit;o(),C(e.displayName)}}function TL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Loan Purpose")))}function AL(t,n){if(t&1&&(s(0,"mat-option",21),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function ML(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"mat-label"),c(3),p(4,"translate"),l(),s(5,"mat-select",20),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.loanPurposeId,a)||(r.loanPurposeId=a),st(a)}),de(6,AL,2,2,"mat-option",21,xe),l()()()}if(t&2){let e=n.$implicit,i=T(2);o(3),C(m(4,2,"labels.inputs.Select Purpose")),o(2),Qs("ngModel",e.loanPurposeId),o(),ue(i.loanPurposeOptions)}}function OL(t,n){t&1&&(s(0,"th",17),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Original Loan")))}function IL(t,n){if(t&1){let e=Ct();s(0,"td",19)(1,"mat-form-field")(2,"input",22),ec("ngModelChange",function(a){let r=lt(e).$implicit;return tc(r.principal,a)||(r.principal=a),st(a)}),l()()()}if(t&2){let e=n.$implicit;o(2),Qs("ngModel",e.principal)}}function EL(t,n){t&1&&P(0,"tr",23)}function LL(t,n){t&1&&P(0,"tr",24)}function kL(t,n){if(t&1&&(s(0,"div",0)(1,"table",7),X(2,8),F(3,xL,2,1,"th",9)(4,yL,2,1,"td",10),Q(),X(5,11),F(6,SL,3,3,"th",9)(7,DL,2,1,"td",10),Q(),X(8,12),F(9,wL,3,3,"th",9)(10,PL,2,1,"td",10),Q(),X(11,13),F(12,TL,3,3,"th",9)(13,ML,8,4,"td",10),Q(),X(14,14),F(15,OL,3,3,"th",9)(16,IL,3,1,"td",10),Q(),F(17,EL,1,0,"tr",15)(18,LL,1,0,"tr",16),l()()),t&2){let e=T();o(),x("dataSource",e.dataSource),o(16),x("matHeaderRowDef",e.displayedColumn),o(),x("matRowDefColumns",e.displayedColumn)}}function FL(t,n){t&1&&(s(0,"button",6),c(1),p(2,"translate"),l()),t&2&&(x("routerLink",Ut(4,vL)),o(),b(" ",m(2,2,"labels.buttons.Cancel")," "))}var Oc=(()=>{class t{constructor(){this.route=A(It),this.loanId=null,this.selectAllItems=!1,this.loanPurposeOptions=[],this.displayedColumn=["check","id","name","purpose","amount"],this.loanId=this.route.snapshot.params.loanId}ngOnInit(){this.dataSource=new Li(this.activeClientMembers)}get isValid(){return!this.activeClientMembers||this.selectedClientMembers?.selectedMembers?.reduce((e,i)=>e+(i.principal??0),0)>0}get selectedClientMembers(){return{selectedMembers:this.activeClientMembers.filter(e=>e.selected)}}toggleSelects(){for(let e of this.activeClientMembers)e.selected=this.selectAllItems}toggleSelect(){let e=this.activeClientMembers.length;this.selectAllItems=e===0?!1:this.activeClientMembers.filter(i=>i.selected).length===e}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loans-active-client-members"]],inputs:{activeClientMembers:"activeClientMembers",loansAccountFormValid:"loansAccountFormValid"},decls:11,vars:9,consts:[[1,"layout-row-wrap","gap-2percent","layout-xs-column"],[1,"layout-row","responsive-column","align-center","gap-2px","margin-t"],["mat-raised-button","","matStepperPrevious",""],["icon","arrow-left",1,"m-r-10"],["mat-raised-button","","matStepperNext","",3,"disabled"],["icon","arrow-right",1,"m-l-10"],["mat-raised-button","",3,"routerLink"],["mat-table","",1,"flex-98",3,"dataSource"],["matColumnDef","check"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","name"],["matColumnDef","purpose"],["matColumnDef","amount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],[3,"change","ngModelChange","ngModel"],["mat-cell",""],[3,"ngModelChange","ngModel"],[3,"value"],["type","number","matInput","",3,"ngModelChange","ngModel"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(M(0,kL,19,3,"div",0),s(1,"div",1)(2,"button",2),P(3,"fa-icon",3),c(4),p(5,"translate"),l(),s(6,"button",4),c(7),p(8,"translate"),P(9,"fa-icon",5),l(),M(10,FL,3,5,"button",6),l()),i&2&&(O(a.activeClientMembers?0:-1),o(4),b(" ",m(5,5,"labels.buttons.Previous")," "),o(2),x("disabled",!a.loansAccountFormValid),o(),b(" ",m(8,7,"labels.buttons.Next")," "),o(3),O(a.loanId?10:-1))},dependencies:[wt,Pt,we,Mi,he,ae,Ce,_e,Ae,En,In,Gt,Da,_n,vn,bn,xn,e1,Xf,Cn,yn,Sn,wn,Dn,Pn,ja,un,mo,Tt],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-elevation-z1[_ngcontent-%COMP%]{margin:1em 0 1.5em}.margin-t[_ngcontent-%COMP%]{margin-top:1em}h4[_ngcontent-%COMP%]{font-weight:500;margin:1em 0}h3[_ngcontent-%COMP%]{font-weight:500}mat-divider[_ngcontent-%COMP%]{margin:1em 0}.margin-v[_ngcontent-%COMP%]{margin:1em 0}.margin-b[_ngcontent-%COMP%]{margin:0 0 1em}.tableName[_ngcontent-%COMP%]{padding-left:2%}"]})}}return t})();var NL=["dtloan"];function RL(t,n){t&1&&P(0,"fa-icon",20)}function BL(t,n){t&1&&P(0,"fa-icon",20)}function qL(t,n){t&1&&P(0,"fa-icon",21)}function zL(t,n){t&1&&P(0,"fa-icon",22)}function jL(t,n){t&1&&P(0,"fa-icon",23)}function VL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.DETAILS"))}function UL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.TERMS"))}function HL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.CHARGES"))}function GL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.heading.Active Client Members"))}function WL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.REPAYMENT SCHEDULE"))}function $L(t,n){if(t&1&&(s(0,"mat-step",18),F(1,WL,2,3,"ng-template",13),P(2,"mifosx-loans-account-schedule-step",24,3),l()),t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("currencyCode",e.currencyCode)}}function YL(t,n){if(t&1&&c(0),t&2){let e=T().$implicit;C(e.registeredTableName)}}function KL(t,n){if(t&1&&(s(0,"mat-step"),F(1,YL,1,1,"ng-template",13),P(2,"mifosx-loans-account-datatable-step",25,4),l()),t&2){let e=n.$implicit;o(2),x("datatableData",e)}}function ZL(t,n){t&1&&(c(0),p(1,"translate")),t&2&&C(m(1,1,"labels.inputs.PREVIEW"))}function JL(t,n){if(t&1){let e=Ct();s(0,"mat-step",19),F(1,ZL,2,3,"ng-template",13),s(2,"mifosx-loans-account-preview-step",26),it("submitEvent",function(){lt(e);let a=T();return st(a.submit())}),l()()}if(t&2){let e=T();o(2),x("loansAccountTemplate",e.loansAccountTemplate)("loansAccountProductTemplate",e.loansAccountProductTemplate)("loansAccount",e.loansAccount)("activeClientMembers",e.activeClientMembers)}}var S0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansService=A(At),this.settingsService=A(oe),this.clientService=A(as),this.dateUtils=A(me),this.i18nService=A(i1),this.loansAccountProductTemplate=null,this.datatables=[],this.route.data.subscribe(e=>{this.loansAccountTemplate=e.loansAccountTemplate,this.dataSource=e.groupsData.activeClientMembers})}setTemplate(e){this.loansAccountProductTemplate=e,this.currencyCode=this.loansAccountProductTemplate.currency.code;let i=this.loansAccountTemplate.clientId;i?this.clientService.getCollateralTemplate(i).subscribe(d=>{this.collateralOptions=d}):console.error("No collateral data requested from Fineract, collateral might misbehave");let a=this.loansAccountTemplate.clientId?this.loansAccountTemplate.clientId:this.loansAccountTemplate.group.id,r=!this.loansAccountTemplate.clientId,u=this.loansAccountProductTemplate.loanProductId;this.loansService.getLoansAccountTemplateResource(a,r,u).subscribe(d=>{this.multiDisburseLoan=d.multiDisburseLoan}),this.setDatatables()}setDatatables(){this.datatables=[],this.loansAccountProductTemplate.datatables&&this.loansAccountProductTemplate.datatables.forEach(e=>{this.datatables.push(e)})}get loansAccountDetailsForm(){return this.loansAccountDetailsStep.loansAccountDetailsForm}get loansAccountTermsForm(){return this.loansAccountTermsStep.loansAccountTermsForm}get activeClientMembers(){return this.dataSource}get loansAccountFormValid(){return this.loansAccountDetailsForm.valid&&this.loansAccountTermsForm.valid&&this.loansActiveClientMembers.isValid}get loanPrincipal(){return this.loansAccountTermsStep.loansAccountTermsForm.value.principal}get loansAccount(){return this.selectedMembers=this.loansActiveClientMembers.selectedClientMembers,ie(ie(ie(ie(ie({},this.loansAccountDetailsStep.loansAccountDetails),this.loansAccountTermsStep.loansAccountTerms),this.loansAccountChargesStep.loansAccountCharges),this.loansAccountTermsStep.loanCollateral),this.loansAccountTermsStep.disbursementData)}setData(e,i){let a=this.settingsService.language.code,r=this.settingsService.dateFormat,u=Se(ie({},this.loansAccount),{charges:(this.loansAccount.charges??[]).map(d=>{let g=d.chargeId??d.id;if(g==null)return null;let _={chargeId:g,amount:d.amount};return d.id&&d.id!==g&&(_.id=d.id),d.dueDate&&(_.dueDate=this.dateUtils.formatDate(d.dueDate,r)),d.feeInterval!==void 0&&(_.feeInterval=d.feeInterval),d.feeOnMonthDay!==void 0&&(_.feeOnMonthDay=d.feeOnMonthDay),_}).filter(Boolean),clientId:e.id,totalLoan:i,loanType:"glim",amortizationType:1,isParentAccount:!0,principal:e.principal,syncDisbursementWithMeeting:!1,expectedDisbursementDate:this.dateUtils.formatDate(this.loansAccount.expectedDisbursementDate,r),submittedOnDate:this.dateUtils.formatDate(this.loansAccount.submittedOnDate,r),dateFormat:r,locale:a});return u.groupId=this.loansAccountTemplate.group.id,delete u.principalAmount,delete u.allowPartialPeriodInterestCalculation,delete u.multiDisburseLoan,delete u.isFloatingInterestRate,JSON.stringify(u)}buildRequestData(){let e=[],i=this.selectedMembers?.selectedMembers??[],a=this.totalLoanAmount();for(let r=0;rNumber(r.id)));for(let r of e){let u=Number(r.id),d=Number(r.linkAccountOwnerId);if(r.linkAccountId&&r.linkAccountOwnerId&&d!==u){this.i18nService.translate("errors.linkedSavingsAccountOwnership").subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}if(!i.has(u)){this.i18nService.translate("errors.clientNotInGSIM",{id:u}).subscribe(g=>{this.notify({defaultUserMessage:g,errors:[]},{memberId:u})});return}}let a=this.buildRequestData();this.loansService.createGlimAccount(a).subscribe(r=>{let u=JSON.parse(r[0].body);u.glimId?this.router.navigate(["../",u.glimId],{relativeTo:this.route}):this.notify(u,{batchSize:a.length})})}notify(e,i){let a=[String(e?.defaultUserMessage??"")];if(Array.isArray(e?.errors))for(let r of e.errors)a.push(String(r?.developerMessage??""));i&&a.push(`Context: ${JSON.stringify(i)}`),console.error(a.join(" ").trim())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-create-glim-account"]],viewQuery:function(i,a){if(i&1&&(ri(Oo,7),ri(Io,7),ri(Eo,7),ri(Oc,7),ri(NL,5)),i&2){let r;li(r=si())&&(a.loansAccountDetailsStep=r.first),li(r=si())&&(a.loansAccountTermsStep=r.first),li(r=si())&&(a.loansAccountChargesStep=r.first),li(r=si())&&(a.loansActiveClientMembers=r.first),li(r=si())&&(a.loanDatatables=r)}},decls:26,vars:16,consts:[["loansAccountStepper",""],["loanAccountTerms",""],["loanAccountCharges",""],["loanAccountSchedule",""],["dtloan",""],[1,"container"],["orientation","vertical","labelPosition","bottom",1,"mat-elevation-z8",3,"linear"],["matStepperIcon","number"],["matStepperIcon","edit"],["matStepperIcon","done"],["matStepperIcon","error"],["matStepperIcon","preview"],[3,"stepControl"],["matStepLabel",""],[3,"loansAccountProductTemplate","loansAccountTemplate"],[3,"loansAccountProductTemplate","loansAccountTemplate","collateralOptions","loansAccountFormValid","loanPrincipal"],[3,"loansAccountProductTemplate","loansAccountTemplate","loansAccountFormValid"],[3,"activeClientMembers","loansAccountFormValid"],["state","repayment","completed",""],["state","preview","completed",""],["icon","pencil-alt","size","sm"],["icon","check","size","sm"],["icon","exclamation-triangle","size","lg"],["icon","eye","size","sm"],[3,"loansAccountTemplate","loansAccountProductTemplate","loansAccount","currencyCode"],[3,"datatableData"],[3,"submitEvent","loansAccountTemplate","loansAccountProductTemplate","loansAccount","activeClientMembers"]],template:function(i,a){if(i&1){let r=Ct();s(0,"div",5)(1,"mat-stepper",6,0),F(3,RL,1,0,"ng-template",7)(4,BL,1,0,"ng-template",8)(5,qL,1,0,"ng-template",9)(6,zL,1,0,"ng-template",10)(7,jL,1,0,"ng-template",11),s(8,"mat-step",12),F(9,VL,2,3,"ng-template",13),s(10,"mifosx-loans-account-details-step",14),it("loansAccountProductTemplate",function(d){return lt(r),st(a.setTemplate(d))}),l()(),s(11,"mat-step",12),F(12,UL,2,3,"ng-template",13),P(13,"mifosx-loans-account-terms-step",15,1),l(),s(15,"mat-step"),F(16,HL,2,3,"ng-template",13),P(17,"mifosx-loans-account-charges-step",16,2),l(),s(19,"mat-step"),F(20,GL,2,3,"ng-template",13),P(21,"mifosx-loans-active-client-members",17),l(),M(22,$L,4,4,"mat-step",18),de(23,KL,4,1,"mat-step",null,xe),M(25,JL,3,4,"mat-step",19),l()()}i&2&&(o(),x("linear",!1),o(7),x("stepControl",a.loansAccountDetailsForm),o(2),x("loansAccountTemplate",a.loansAccountTemplate),o(),x("stepControl",a.loansAccountTermsForm),o(2),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("collateralOptions",a.collateralOptions)("loansAccountFormValid",a.loansAccountFormValid)("loanPrincipal",a.loanPrincipal),o(4),x("loansAccountProductTemplate",a.loansAccountProductTemplate)("loansAccountTemplate",a.loansAccountTemplate)("loansAccountFormValid",a.loansAccountFormValid),o(4),x("activeClientMembers",a.activeClientMembers)("loansAccountFormValid",a.loansAccountFormValid),o(),O(a.loansAccountFormValid?22:-1),o(),ue(a.datatables),o(2),O(a.loansAccountFormValid?25:-1))},dependencies:[wt,Pt,is,es,un,ns,ts,Oo,Io,Eo,Oc,el,Ds,nl,Tt],encapsulation:2})}}return t})();function XL(t,n){t&1&&(s(0,"div",1),P(1,"mat-spinner",2),l())}function QL(t,n){t&1&&(s(0,"div",3),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.messages.No Data Found")," "))}function tk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Date")))}function ek(t,n){if(t&1&&(s(0,"td",17),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.buyDownFeeDate)," ")}}function nk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Fee Amount")))}function ik(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.buyDownFeeAmount,"0.00")," ")}}function ak(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Amortized Amount")))}function ok(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.amortizedAmount,"0.00")," ")}}function rk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Not Yet Amortized Amount")))}function lk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.notYetAmortizedAmount,"0.00")," ")}}function sk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Adjusted Amount")))}function ck(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.adjustedAmount,"0.00")," ")}}function pk(t,n){t&1&&(s(0,"th",16),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.heading.Charged Off Amount")))}function mk(t,n){if(t&1&&(s(0,"td",18),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.chargedOffAmount,"0.00")," ")}}function dk(t,n){t&1&&P(0,"tr",19)}function uk(t,n){t&1&&P(0,"tr",20)}function fk(t,n){if(t&1&&(s(0,"table",4),X(1,5),F(2,tk,3,3,"th",6)(3,ek,3,3,"td",7),Q(),X(4,8),F(5,nk,3,3,"th",6)(6,ik,3,4,"td",9),Q(),X(7,10),F(8,ak,3,3,"th",6)(9,ok,3,4,"td",9),Q(),X(10,11),F(11,rk,3,3,"th",6)(12,lk,3,4,"td",9),Q(),X(13,12),F(14,sk,3,3,"th",6)(15,ck,3,4,"td",9),Q(),X(16,13),F(17,pk,3,3,"th",6)(18,mk,3,4,"td",9),Q(),F(19,dk,1,0,"tr",14)(20,uk,1,0,"tr",15),l()),t&2){let e=T(2);x("dataSource",e.buyDownFeeData),o(19),x("matHeaderRowDef",e.buyDownFeeColumns),o(),x("matRowDefColumns",e.buyDownFeeColumns)}}function hk(t,n){if(t&1&&(s(0,"div"),M(1,QL,3,3,"div",3),M(2,fk,21,3,"table",4),l()),t&2){let e=T();o(),O(e.buyDownFeeData.length===0?1:-1),o(),O(e.buyDownFeeData.length>0?2:-1)}}var Mg=(()=>{class t{constructor(){this.route=A(It),this.loansService=A(At),this.buyDownFeeData=[],this.isLoading=!0,this.buyDownFeeColumns=["buyDownFeeDate","buyDownFeeAmount","amortizedAmount","notYetAmortizedAmount","adjustedAmount","chargedOffAmount"]}ngOnInit(){this.getLoanId(),this.loadBuyDownFees()}getLoanId(){if(this.route.snapshot.data&&this.route.snapshot.data.loanId){this.loanId=this.route.snapshot.data.loanId;return}let e=this.route;for(;e;){if(e.snapshot.paramMap.has("loanId")){this.loanId=e.snapshot.paramMap.get("loanId");return}if(e.parent)e=e.parent;else break}console.error("Could not find loanId in route parameters")}loadBuyDownFees(){if(!this.loanId){console.error("Cannot load buy down fees: loanId is undefined"),this.isLoading=!1;return}this.isLoading=!0,this.loansService.getBuyDownFeeData(this.loanId).subscribe({next:e=>{this.buyDownFeeData=e||[],this.isLoading=!1},error:e=>{console.error("Error loading buy down fees:",e),this.isLoading=!1}})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-buy-down-fees-tab"]],decls:6,vars:5,consts:[[1,"container"],[1,"loading-indicator"],["diameter","30"],[1,"no-data"],["mat-table","",3,"dataSource"],["matColumnDef","buyDownFeeDate"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","buyDownFeeAmount"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","notYetAmortizedAmount"],["matColumnDef","adjustedAmount"],["matColumnDef","chargedOffAmount"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,XL,2,0,"div",1),M(5,hk,3,2,"div"),l()),i&2&&(o(2),C(m(3,3,"labels.heading.Buy Down Fees")),o(2),O(a.isLoading?4:-1),o(),O(a.isLoading?-1:5))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,gn,Tt,fn],encapsulation:2})}}return t})();var gk=["statusChart"],_k=["paymentsChart"];function Ck(t,n){t&1&&(s(0,"div",16),c(1),p(2,"translate"),l()),t&2&&(o(),b("",m(2,1,"labels.text.Loading data"),"..."))}function bk(t,n){t&1&&(s(0,"div",16),c(1),p(2,"translate"),l()),t&2&&(o(),b("",m(2,1,"labels.text.Loading data"),"..."))}function vk(t,n){t&1&&(s(0,"div",16),c(1),p(2,"translate"),l()),t&2&&(o(),b(" ",m(2,1,"labels.text.No repayment schedule available")," "))}Lp.register(...D1);var Og=(()=>{class t{constructor(){this.route=A(It),this.translate=A(Qi),this.initTimeout=null,this.loanId="",this.principalAmount=0,this.totalRepaid=0,this.outstandingBalance=0,this.interestCharged=0,this.totalExpected=0,this.progressPercentage=0}ngOnInit(){this.loanId=this.route.parent?.snapshot.paramMap.get("loanId")||"",this.routeDataSubscription=this.route.parent.data.subscribe(e=>{e.loanDetailsData&&(this.loanData=e.loanDetailsData,this.calculateMetrics(),this.initTimeout=window.setTimeout(()=>{this.createStatusChart(),this.createPaymentsChart()},100))}),this.langChangeSubscription=this.translate.onLangChange.subscribe(()=>{this.statusChart&&this.createStatusChart(),this.paymentsChart&&this.createPaymentsChart()})}ngAfterViewInit(){setTimeout(()=>{this.createStatusChart(),this.createPaymentsChart()},100)}calculateMetrics(){this.loanData&&(this.principalAmount=this.loanData.principal||0,this.totalRepaid=this.loanData.summary?.totalRepayment||0,this.outstandingBalance=this.loanData.summary?.totalOutstanding||0,this.interestCharged=this.loanData.summary?.interestCharged||0,this.totalExpected=this.loanData.summary?.totalExpectedRepayment||0,this.totalExpected===0?this.progressPercentage=0:this.progressPercentage=Math.min(100,Math.max(0,this.totalRepaid/this.totalExpected*100)))}createStatusChart(){if(!this.statusChartCanvas)return;this.statusChart&&this.statusChart.destroy();let i=this.statusChartCanvas.nativeElement.getContext("2d");if(!i)return;let a=Math.min(100,Math.max(0,this.totalExpected>0?this.totalRepaid/this.totalExpected*100:0)),r=Math.max(0,100-a);this.statusChart=new Lp(i,{type:"doughnut",data:{labels:[this.translate.instant("labels.inputs.Total Repaid"),this.translate.instant("labels.inputs.Outstanding Balance")],datasets:[{data:[a,r],backgroundColor:["#4CAF50","#FF9800"],borderWidth:0,borderColor:"transparent",hoverBorderWidth:3,hoverBorderColor:"#fff"}]},options:{responsive:!0,maintainAspectRatio:!0,aspectRatio:1.5,cutout:"70%",plugins:{legend:{position:"bottom",labels:{padding:20,font:{size:13,weight:"600"},usePointStyle:!0,pointStyle:"circle",generateLabels:u=>{let d=u.data;return d.labels.length&&d.datasets.length?d.labels.map((g,_)=>{let y=d.datasets[0].data[_];return{text:`${g}: ${y.toFixed(1)}%`,fillStyle:d.datasets[0].backgroundColor[_],hidden:!1,index:_}}):[]}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",padding:12,titleFont:{size:14,weight:"bold"},bodyFont:{size:13},callbacks:{label:function(u){let d=u.label||"",g=u.parsed||0;return`${d}: ${g.toFixed(1)}%`}}}}}})}createPaymentsChart(){if(!this.paymentsChartCanvas)return;this.paymentsChart&&this.paymentsChart.destroy();let i=this.paymentsChartCanvas.nativeElement.getContext("2d");if(!i)return;let a=this.loanData?.repaymentSchedule?.periods||[],r=[],u=[],d=[];a.forEach(g=>{g.period&&g.period>0&&(r.push(`${this.translate.instant("labels.inputs.Period")} ${g.period}`),u.push(g.principalDue||0),d.push(g.interestDue||0))}),this.paymentsChart=new Lp(i,{type:"bar",data:{labels:r.slice(0,10),datasets:[{label:this.translate.instant("labels.inputs.Principal"),data:u.slice(0,10),backgroundColor:"#2196F3",borderWidth:0,borderRadius:8,barThickness:24},{label:this.translate.instant("labels.inputs.Interest"),data:d.slice(0,10),backgroundColor:"#FFC107",borderWidth:0,borderRadius:8,barThickness:24}]},options:{responsive:!0,maintainAspectRatio:!0,aspectRatio:2,plugins:{legend:{position:"top",labels:{usePointStyle:!0,pointStyle:"circle",padding:15,font:{size:13,weight:"600"}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.8)",padding:12,titleFont:{size:14,weight:"bold"},bodyFont:{size:13},callbacks:{label:function(g){let _=g.dataset.label||"",y=g.parsed.y||0;return`${_}: ${y.toLocaleString()}`}}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{font:{size:11}}},y:{stacked:!0,beginAtZero:!0,grid:{color:"rgba(0, 0, 0, 0.05)"},ticks:{font:{size:11}}}}}})}ngOnDestroy(){this.initTimeout!==null&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.routeDataSubscription&&this.routeDataSubscription.unsubscribe(),this.langChangeSubscription&&this.langChangeSubscription.unsubscribe(),this.statusChart&&this.statusChart.destroy(),this.paymentsChart&&this.paymentsChart.destroy()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-account-dashboard"]],viewQuery:function(i,a){if(i&1&&(ri(gk,5),ri(_k,5)),i&2){let r;li(r=si())&&(a.statusChartCanvas=r.first),li(r=si())&&(a.paymentsChartCanvas=r.first)}},decls:63,vars:41,consts:[["statusChart",""],["paymentsChart",""],[1,"dashboard-container"],[1,"dashboard-header-card"],[1,"header"],[1,"metrics-grid"],[1,"metric-card"],[1,"metric-label"],[1,"metric-value"],[1,"metric-value","success"],[1,"metric-progress"],[1,"progress-bar"],[1,"metric-value","warning"],[1,"charts-grid"],[1,"chart-card"],[1,"chart-container"],[1,"no-data-message"]],template:function(i,a){i&1&&(s(0,"div",2)(1,"mat-card",3)(2,"mat-card-header",4)(3,"h3"),c(4),p(5,"translate"),l()()(),s(6,"div",5)(7,"mat-card",6)(8,"mat-card-content")(9,"div",7),c(10),p(11,"translate"),l(),s(12,"div",8),c(13),p(14,"number"),l()()(),s(15,"mat-card",6)(16,"mat-card-content")(17,"div",7),c(18),p(19,"translate"),l(),s(20,"div",9),c(21),p(22,"number"),l(),s(23,"div",10),P(24,"div",11),l()()(),s(25,"mat-card",6)(26,"mat-card-content")(27,"div",7),c(28),p(29,"translate"),l(),s(30,"div",12),c(31),p(32,"number"),l()()(),s(33,"mat-card",6)(34,"mat-card-content")(35,"div",7),c(36),p(37,"translate"),l(),s(38,"div",8),c(39),p(40,"number"),l()()()(),s(41,"div",13)(42,"mat-card",14)(43,"mat-card-header")(44,"mat-card-title"),c(45),p(46,"translate"),l()(),s(47,"mat-card-content")(48,"div",15),P(49,"canvas",null,0),M(51,Ck,3,3,"div",16),l()()(),s(52,"mat-card",14)(53,"mat-card-header")(54,"mat-card-title"),c(55),p(56,"translate"),l()(),s(57,"mat-card-content")(58,"div",15),P(59,"canvas",null,1),M(61,bk,3,3,"div",16)(62,vk,3,3,"div",16),l()()()()()),i&2&&(o(4),b(" ",m(5,15,"labels.heading.Loan Dashboard")," "),o(6),C(m(11,17,"labels.inputs.Principal Amount")),o(3),C(Ee(14,19,a.principalAmount,"1.2-2")),o(5),C(m(19,22,"labels.inputs.Total Repaid")),o(3),C(Ee(22,24,a.totalRepaid,"1.2-2")),o(3),Vf("width",a.progressPercentage,"%"),o(4),C(m(29,27,"labels.inputs.Outstanding Balance")),o(3),C(Ee(32,29,a.outstandingBalance,"1.2-2")),o(5),C(m(37,32,"labels.inputs.Interest Charged")),o(3),C(Ee(40,34,a.interestCharged,"1.2-2")),o(6),b(" ",m(46,37,"labels.heading.Repayment Progress")," "),o(6),O(a.loanData?-1:51),o(4),b(" ",m(56,39,"labels.heading.Payment Schedule")," "),o(6),O(a.loanData?!(a.loanData.repaymentSchedule!=null&&a.loanData.repaymentSchedule.periods)||a.loanData.repaymentSchedule.periods.length===0?62:-1:61))},dependencies:[wt,Pt,ge,Te,bp,Cp,_p,Tt],styles:[".dashboard-container[_ngcontent-%COMP%]{padding:20px;background:linear-gradient(135deg,#0d47a1,#1565c0,#1976d2)}.dashboard-header-card[_ngcontent-%COMP%]{margin-bottom:24px;padding:0;border:none;background:#ffffff1a;backdrop-filter:blur(10px)}.dashboard-header-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:16px 24px;background:transparent;border-bottom:1px solid rgba(255,255,255,.2)}.dashboard-header-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:#fff;font-size:22px;font-weight:600;display:flex;align-items:center}.dashboard-header-card[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:#fff}.metrics-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:20px;margin-bottom:24px}.metrics-grid[_ngcontent-%COMP%] .metric-card[_ngcontent-%COMP%]{flex:1 1 250px;min-width:250px}.metric-card[_ngcontent-%COMP%]{background:#fffffff2;border:none;border-radius:16px;box-shadow:0 8px 24px #00000026;transition:all .3s ease}.metric-card[_ngcontent-%COMP%]:hover{transform:translateY(-4px);box-shadow:0 12px 32px #0003}.metric-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px}.metric-card[_ngcontent-%COMP%] .metric-label[_ngcontent-%COMP%]{font-size:12px;color:#666;margin-bottom:8px;text-transform:uppercase;letter-spacing:1px;font-weight:600}.metric-card[_ngcontent-%COMP%] .metric-value[_ngcontent-%COMP%]{font-size:32px;font-weight:700;color:#1976d2;margin-bottom:12px}.metric-card[_ngcontent-%COMP%] .metric-value.success[_ngcontent-%COMP%]{color:#4caf50}.metric-card[_ngcontent-%COMP%] .metric-value.warning[_ngcontent-%COMP%]{color:#ff9800}.metric-card[_ngcontent-%COMP%] .metric-progress[_ngcontent-%COMP%]{margin-top:12px;height:8px;background:linear-gradient(90deg,#e3f2fd,#bbdefb);border-radius:4px;overflow:hidden}.metric-card[_ngcontent-%COMP%] .metric-progress[_ngcontent-%COMP%] .progress-bar[_ngcontent-%COMP%]{height:100%;background:linear-gradient(90deg,#4caf50,#66bb6a);transition:width .6s ease;box-shadow:0 2px 8px #4caf504d}.charts-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:24px}.charts-grid[_ngcontent-%COMP%] .chart-card[_ngcontent-%COMP%]{flex:1 1 450px;min-width:450px}.chart-card[_ngcontent-%COMP%]{background:#fffffff2;border:none;border-radius:16px;box-shadow:0 8px 24px #00000026;overflow:hidden}.chart-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding:20px 24px;border-bottom:1px solid #e0e0e0;background:linear-gradient(135deg,#f5f5f5,#fafafa)}.chart-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#1976d2;display:flex;align-items:center;gap:10px;margin:0}.chart-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:#1976d2}.chart-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px;background:#fff}.chart-card[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%]{width:100%;height:350px;position:relative}.chart-card[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{max-width:100%;height:auto!important}.chart-card[_ngcontent-%COMP%] .chart-container[_ngcontent-%COMP%] .no-data-message[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#999;font-size:14px;text-align:center;font-weight:500}@media (width <= 768px){.metrics-grid[_ngcontent-%COMP%] .metric-card[_ngcontent-%COMP%], .charts-grid[_ngcontent-%COMP%] .chart-card[_ngcontent-%COMP%]{flex:1 1 100%;min-width:100%}.dashboard-container[_ngcontent-%COMP%]{padding:12px}}"]})}}return t})();var Fl=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getLoanAccountAssociationDetails(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Mu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanNotes(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Ou=(()=>{class t{constructor(){this.loansService=A(At)}resolve(){return this.loansService.getLoanDataTables()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Iu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.parent.paramMap.get("loanId"),a=e.paramMap.get("datatableName");return this.loansService.getLoanDatatable(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Eu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId"),a=e.paramMap.get("action");return a==="Assign Loan Officer"||a==="Change Loan Officer"?this.loansService.getLoanTemplate(i):a==="Make Repayment"?this.loansService.getLoanActionTemplate(i,"repayment"):a==="Goodwill Credit"?this.loansService.getLoanActionTemplate(i,"goodwillCredit"):a==="Interest Payment Waiver"?this.loansService.getLoanActionTemplate(i,"interestPaymentWaiver"):a==="Payout Refund"?this.loansService.getLoanActionTemplate(i,"payoutRefund"):a==="Merchant Issued Refund"?this.loansService.getLoanActionTemplate(i,"merchantIssuedRefund"):a==="Credit Balance Refund"?this.loansService.getLoanActionTemplate(i,"creditBalanceRefund"):a==="Waive Interest"?this.loansService.getLoanActionTemplate(i,"waiveinterest"):a==="Write Off"?this.loansService.getLoanActionTemplate(i,"writeoff"):a==="Close"?this.loansService.getLoanActionTemplate(i,"close"):a==="Close (as Rescheduled)"?this.loansService.getLoanActionTemplate(i,"close-rescheduled"):a==="Reschedule"?this.loansService.rescheduleLoanTemplate():a==="Prepay Loan"?this.loansService.getLoanPrepayLoanActionTemplate(i,null):a==="Add Collateral"?this.loansService.getLoanCollateralTemplate(i):a==="Disburse to Savings"?this.loansService.getLoanActionTemplate(i,"disburseToSavings"):a==="Recovery Payment"?this.loansService.getLoanActionTemplate(i,"recoverypayment"):a==="View Guarantors"?this.loansService.getLoanAccountResource(i,"guarantors"):a==="Create Guarantor"?this.loansService.getGuarantorTemplate(i):a==="Disburse"?this.loansService.getLoanActionTemplate(i,"disburse"):a==="Loan Screen Reports"?this.loansService.getLoanScreenReportsData():a==="Approve"?this.loansService.getLoanApprovalTemplate(i):a==="Add Loan Charge"?this.loansService.getLoanChargeTemplateResource(i):a==="Foreclosure"?this.loansService.getLoanForeclosureActionTemplate(i):a==="Charge-Off"?this.loansService.getLoanActionTemplate(i,"charge-off"):a==="Capitalized Income"?this.loansService.getLoanActionTemplate(i,"capitalizedIncome"):a==="Contract Termination"?this.loansService.getLoanActionTemplate(i,"contractTermination"):a==="Buy Down Fee"?this.loansService.getLoanActionTemplate(i,"buyDownFee"):a==="Re-Age"?this.loansService.getLoanActionTemplate(i,"reAge"):a==="Re-Amortize"?this.loansService.getLoanActionTemplate(i,"reAmortization"):void 0}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Lu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.parent.parent.paramMap.get("clientId")||e.parent.parent.paramMap.get("groupId"),a=!!e.parent.parent.paramMap.get("groupId");return this.loansService.getLoansAccountTemplateResource(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var ku=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanDocuments(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var D0=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoansAccountAndTemplateResource(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var w0=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountCharge(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Fu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransaction(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Nu=(()=>{class t{constructor(){this.reportsService=A(kp)}resolve(e){let a={"output-type":"PDF",R_transactionId:e.paramMap.get("id")};return this.reportsService.getPentahoRunReportData("Loan Transaction Receipt",a,"default","en","dd MMMM yyyy")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Ru=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId"),a=e.paramMap.get("id");return this.loansService.getLoansAccountTransactionTemplate(i,a)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Bu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("groupId"),a=e.paramMap.get("glimId");return this.loansService.getGLIMAccountData(a,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var qu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("groupId");return this.loansService.getGLIMLoanAccountTemplate(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var zu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyTags(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var xk=t=>({data:t});function yk(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Start Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function Sk(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.End Date")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}var P0=(()=>{class t{constructor(){this.dialogRef=A(Vo),this.data=A(Uo),this.formBuilder=A(Pe),this.minDate=new Date(2e3,0,1),this.maxDate=new Date(2100,0,1),this.createDelinquencyActionForm()}createDelinquencyActionForm(){this.delinquencyActionForm=this.formBuilder.group({startDate:[new Date,Wt.required],endDate:["",Wt.required]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-action-dialog"]],decls:29,vars:30,consts:[["validFromDatePicker",""],["validTillDatePicker",""],["mat-dialog-title",""],["mat-dialog-content","",1,"layout-column",3,"formGroup"],[1,"flex-48",3,"click"],["matInput","","required","","formControlName","startDate",3,"min","max","matDatepicker"],["matSuffix","",3,"for"],["matInput","","required","","formControlName","endDate",3,"min","max","matDatepicker"],[1,"layout-row","layout-xs-column","layout-align-center","gap-2percent"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary",3,"mat-dialog-close","disabled"]],template:function(i,a){if(i&1){let r=Ct();s(0,"h2",2),c(1),p(2,"translate"),l(),s(3,"div",3)(4,"mat-form-field",4),it("click",function(){lt(r);let d=Et(11);return st(d.open())}),s(5,"mat-label"),c(6),p(7,"translate"),l(),P(8,"input",5)(9,"mat-datepicker-toggle",6)(10,"mat-datepicker",null,0),M(12,yk,7,9,"mat-error"),l(),s(13,"mat-form-field",4),it("click",function(){lt(r);let d=Et(20);return st(d.open())}),s(14,"mat-label"),c(15),p(16,"translate"),l(),P(17,"input",7)(18,"mat-datepicker-toggle",6)(19,"mat-datepicker",null,1),M(21,Sk,7,9,"mat-error"),l()(),s(22,"mat-dialog-actions",8)(23,"button",9),c(24),p(25,"translate"),l(),s(26,"button",10),c(27),p(28,"translate"),l()()}if(i&2){let r=Et(11),u=Et(20);o(),C(m(2,18,"labels.heading.Loan Delinquency Actions")),o(2),x("formGroup",a.delinquencyActionForm),o(3),C(m(7,20,"labels.inputs.Start Date")),o(2),x("min",a.minDate)("max",a.maxDate)("matDatepicker",r),o(),x("for",r),o(3),O(a.delinquencyActionForm.controls.startDate.hasError("required")?12:-1),o(3),C(m(16,22,"labels.inputs.End Date")),o(2),x("min",a.delinquencyActionForm.value.startDate)("max",a.maxDate)("matDatepicker",u),o(),x("for",u),o(3),O(a.delinquencyActionForm.controls.endDate.hasError("required")?21:-1),o(3),C(m(25,24,"labels.buttons.Cancel")),o(2),x("mat-dialog-close",ka(28,xk,a.delinquencyActionForm))("disabled",!a.delinquencyActionForm.valid||a.delinquencyActionForm.pristine),o(),b(" ",m(28,26,"labels.buttons.Submit")," ")}},dependencies:[wt,Pt,we,he,Le,je,ke,Fe,Ce,_e,Ue,Je,Ae,en,nn,tn,Gt,Ur,Ho,Go,Xl,Tt],encapsulation:2})}}return t})();function Dk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Delinquency Classification")))}function wk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),$t("( ",e.delinquencyRange.minimumAgeDays," - ",e.delinquencyRange.maximumAgeDays," )")}}function Pk(t,n){if(t&1&&(s(0,"span"),c(1),l()),t&2){let e=T().$implicit;o(),b("( ",e.delinquencyRange.minimumAgeDays," )")}}function Tk(t,n){if(t&1&&(s(0,"td",12),c(1),M(2,wk,2,2,"span"),M(3,Pk,2,1,"span"),l()),t&2){let e=n.$implicit;o(),b(" ",e.delinquencyRange.classification," "),o(),O(e.delinquencyRange.maximumAgeDays?2:-1),o(),O(e.delinquencyRange.maximumAgeDays?-1:3)}}function Ak(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Added On")))}function Mk(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.addedOnDate)," ")}}function Ok(t,n){if(t&1&&(s(0,"td",12),M(1,Mk,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.addedOnDate?1:-1)}}function Ik(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Lifted On")))}function Ek(t,n){if(t&1&&(s(0,"span"),c(1),p(2,"dateFormat"),l()),t&2){let e=T().$implicit;o(),b(" ",m(2,1,e.liftedOnDate)," ")}}function Lk(t,n){if(t&1&&(s(0,"td",12),M(1,Ek,3,3,"span"),l()),t&2){let e=n.$implicit;o(),O(e.liftedOnDate?1:-1)}}function kk(t,n){t&1&&P(0,"tr",13)}function Fk(t,n){t&1&&P(0,"tr",14)}function Nk(t,n){if(t&1&&(s(0,"table",1),X(1,4),F(2,Dk,3,3,"th",5)(3,Tk,4,3,"td",6),Q(),X(4,7),F(5,Ak,3,3,"th",5)(6,Ok,2,1,"td",6),Q(),X(7,8),F(8,Ik,3,3,"th",5)(9,Lk,2,1,"td",6),Q(),F(10,kk,1,0,"tr",9)(11,Fk,1,0,"tr",10),l()),t&2){let e=T();x("dataSource",e.loanDelinquencyTags),o(10),x("matHeaderRowDef",e.loanDelinquencyTagsColumns),o(),x("matRowDefColumns",e.loanDelinquencyTagsColumns)}}function Rk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Delinquency Classification")))}function Bk(t,n){if(t&1&&(s(0,"td",12),c(1),l()),t&2){let e=n.$implicit;o(),C(e.classification)}}function qk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Days")))}function zk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.minimumAgeDays))}}function jk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function Vk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"currency"),l()),t&2){let e=n.$implicit,i=T(2);o(),b(" ",Ye(2,1,e.delinquentAmount,i.currency.code,"symbol-narrow","1.2-2")," ")}}function Uk(t,n){t&1&&P(0,"tr",13)}function Hk(t,n){t&1&&P(0,"tr",14)}function Gk(t,n){if(t&1&&(s(0,"div")(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,4),F(6,Rk,3,3,"th",5)(7,Bk,2,1,"td",6),Q(),X(8,15),F(9,qk,3,3,"th",5)(10,zk,3,3,"td",6),Q(),X(11,16),F(12,jk,3,3,"th",5)(13,Vk,3,6,"td",6),Q(),F(14,Uk,1,0,"tr",9)(15,Hk,1,0,"tr",10),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Loan Delinquency Installment Tags")),o(2),x("dataSource",e.installmentLevelDelinquency),o(10),x("matHeaderRowDef",e.installmentDelinquencyTagsColumns),o(),x("matRowDefColumns",e.installmentDelinquencyTagsColumns)}}function Wk(t,n){if(t&1){let e=Ct();s(0,"button",18),it("click",function(){lt(e);let a=T(2);return st(a.createDelinquencyAction())}),P(1,"fa-icon",19),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Pause Delinquency Classification")," "))}function $k(t,n){t&1&&(s(0,"div",2),F(1,Wk,4,3,"button",17),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function Yk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Action")))}function Kk(t,n){if(t&1&&(s(0,"td",26),c(1),l()),t&2){let e=n.$implicit,i=T(2);x("ngClass",ce(i.actionClass(e.action))),o(),C(e.action)}}function Zk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Start Date")))}function Jk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.startDate))}}function Xk(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.End Date")))}function Qk(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.endDate))}}function tF(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Created On")))}function eF(t,n){if(t&1&&(s(0,"td",12),c(1),p(2,"datetimeFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.createdOn))}}function nF(t,n){t&1&&(s(0,"th",11),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function iF(t,n){if(t&1){let e=Ct();s(0,"button",28),p(1,"translate"),it("click",function(){lt(e);let a=T(2).$implicit,r=T(2);return st(r.resumeDelinquencyClassification(a))}),P(2,"fa-icon",29),l()}t&2&&x("matTooltip",ce(m(1,2,"tooltips.Resume Delinquency Classification")))}function aF(t,n){t&1&&(s(0,"span"),F(1,iF,3,4,"button",27),l()),t&2&&(o(),x("mifosxHasPermission","CREATE_DELINQUENCY_ACTION"))}function oF(t,n){if(t&1&&(s(0,"td",12),M(1,aF,2,1,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isCurrentAndPauseAction(e)?1:-1)}}function rF(t,n){t&1&&P(0,"tr",13)}function lF(t,n){t&1&&P(0,"tr",14)}function sF(t,n){if(t&1&&(s(0,"div",3)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,20),F(6,Yk,3,3,"th",5)(7,Kk,2,3,"td",21),Q(),X(8,22),F(9,Zk,3,3,"th",5)(10,Jk,3,3,"td",6),Q(),X(11,23),F(12,Xk,3,3,"th",5)(13,Qk,3,3,"td",6),Q(),X(14,24),F(15,tF,3,3,"th",5)(16,eF,3,3,"td",6),Q(),X(17,25),F(18,nF,3,3,"th",5)(19,oF,2,1,"td",6),Q(),F(20,rF,1,0,"tr",9)(21,lF,1,0,"tr",10),l()()),t&2){let e=T();o(2),C(m(3,4,"labels.heading.Loan Delinquency Actions")),o(2),x("dataSource",e.loanDelinquencyActions),o(16),x("matHeaderRowDef",e.loanDelinquencyActionsColumns),o(),x("matRowDefColumns",e.loanDelinquencyActionsColumns)}}var T0=(()=>{class t{constructor(){this.route=A(It),this.loansServices=A(At),this.dateUtils=A(me),this.settingsService=A(oe),this.translateService=A(Qi),this.dialog=A(Gn),this.loanDelinquencyTags=[],this.loanDelinquencyActions=[],this.installmentLevelDelinquency=[],this.loanDelinquencyTagsColumns=["classification","addedOn","liftedOn"],this.loanDelinquencyActionsColumns=["action","startDate","endDate","createdOn","actions"],this.installmentDelinquencyTagsColumns=["classification","minimumAgeDays","amount"],this.allowPause=!0,this.loanId=this.route.parent.parent.snapshot.params.loanId,this.route.parent.data.subscribe(e=>{this.loanDelinquencyTags=e.loanDelinquencyTagsData,this.loanDelinquencyActions=e.loanDelinquencyActions||[],this.validateDelinquencyActions();let i=e.loanDelinquencyData.delinquent||null;this.currency=e.loanDelinquencyData.currency,this.installmentLevelDelinquency=[],i!=null&&(this.installmentLevelDelinquency=i.installmentLevelDelinquency||[])})}ngOnInit(){this.locale=this.settingsService.language.code,this.dateFormat=this.settingsService.dateFormat,this.currentLoanDelinquencyAction=null,this.validateDelinquencyActions()}validateDelinquencyActions(){if(this.loanDelinquencyActions.length>0){let e=this.settingsService.businessDate;this.currentLoanDelinquencyAction=this.loanDelinquencyActions[this.loanDelinquencyActions.length-1],this.allowPause=this.currentLoanDelinquencyAction.action==="RESUME"}}createDelinquencyAction(){let e="pause";this.dialog.open(P0,{data:{action:e}}).afterClosed().subscribe(a=>{let r=a.data.value.startDate,u=a.data.value.endDate;this.sendDelinquencyAction(e,r,u)})}resumeDelinquencyClassification(e){this.dialog.open(ma,{data:{heading:this.translateService.instant("labels.heading.Loan Delinquency Classification"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want resume the Delinquency Classification for Loan")+this.loanId,type:"Mild"}}).afterClosed().subscribe(a=>{a.confirm&&this.sendDelinquencyAction("resume",new Date,null)})}sendDelinquencyAction(e,i,a){let r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat)};e==="pause"&&(r={action:e,locale:this.locale,dateFormat:this.dateFormat,startDate:this.dateUtils.formatDate(i,this.dateFormat),endDate:this.dateUtils.formatDate(a,this.dateFormat)}),this.loansServices.createDelinquencyActions(this.loanId,r).subscribe(u=>{this.loansServices.getDelinquencyActions(this.loanId).subscribe(d=>{this.loanDelinquencyActions=d,this.validateDelinquencyActions()})})}isCurrentAndPauseAction(e){if(this.currentLoanDelinquencyAction!=null&&this.currentLoanDelinquencyAction.id===e.id&&e.action==="PAUSE"){let i=this.settingsService.businessDate,a=this.dateUtils.parseDate(e.startDate);if(ir)return this.allowPause=!0,!1}return!0}return!1}actionClass(e){return e==="PAUSE"?"status-pending":"status-active"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-delinquency-tags-tab"]],decls:8,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],[1,"layout-row","m-t-20","m-b-10","align-end","align-items-center"],[1,"m-t-10"],["matColumnDef","classification"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addedOn"],["matColumnDef","liftedOn"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["matColumnDef","minimumAgeDays"],["matColumnDef","amount"],["mat-raised-button","","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",3,"click"],["icon","pause",1,"m-r-10"],["matColumnDef","action"],["mat-cell","",3,"ngClass",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","createdOn"],["matColumnDef","actions"],["mat-cell","",3,"ngClass"],["mat-button","","color","primary",3,"matTooltip","click",4,"mifosxHasPermission"],["mat-button","","color","primary",3,"click","matTooltip"],["icon","play",1,"m-r-10"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),M(4,Nk,12,3,"table",1),M(5,Gk,16,6,"div"),M(6,$k,2,1,"div",2),M(7,sF,22,6,"div",3),l()),i&2&&(o(2),C(m(3,5,"labels.heading.Loan Delinquency Tags")),o(2),O(a.loanDelinquencyTags.length>0?4:-1),o(),O(a.installmentLevelDelinquency.length>0?5:-1),o(),O(a.allowPause?6:-1),o(),O(a.loanDelinquencyActions.length>0?7:-1))},dependencies:[wt,pa,Pt,Gt,Me,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,un,Oi,Sa,gn,Tt,f1,fn],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var Ig=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.loanRescheduleRequests(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var cF=()=>["../actions/Reschedule"];function pF(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function mF(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),C(e.id)}}function dF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function uF(t,n){if(t&1&&(s(0,"td",14)(1,"div",15),p(2,"statusLookup"),P(3,"fa-icon",16),s(4,"span",17),c(5),p(6,"translate"),l()()()),t&2){let e=n.$implicit;o(),x("ngClass",m(2,2,e.statusEnum.code)),o(4),b(" ",m(6,4,e.statusEnum.value)," ")}}function fF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.From Date")))}function hF(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.rescheduleFromDate)," ")}}function gF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Reason")))}function _F(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.rescheduleReasonCodeValue.name," ")}}function CF(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function bF(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",18),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Reject"))}),P(3,"fa-icon",19),l(),s(4,"button",20),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T();return st(r.manageRequest(a,"Approve"))}),P(6,"fa-icon",21),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Reject Reschedule"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Approve Reschedule"))))}function vF(t,n){if(t&1&&(s(0,"td",14),M(1,bF,7,8,"span"),l()),t&2){let e=n.$implicit;o(),O(e.statusEnum.pendingApproval?1:-1)}}function xF(t,n){t&1&&P(0,"tr",22)}function yF(t,n){t&1&&P(0,"tr",23)}var A0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.loansServices=A(At),this.settingsService=A(oe),this.dateUtils=A(me),this.translateService=A(Qi),this.dialog=A(Gn),this.loanRescheduleDataColumns=["id","rescheduleFromDate","reason","status","actions"],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.parent.data.subscribe(e=>{this.loanRescheduleData=e.loanRescheduleData})}manageRequest(e,i){this.dialog.open(ma,{data:{heading:`${i}`+this.translateService.instant("labels.heading.Loan Reschedule"),dialogContext:this.translateService.instant("labels.dialogContext.Are you sure you want")+`${i}`+this.translateService.instant("labels.dialogContext.the Loan Reschedule")+`${e.id}`}}).afterClosed().subscribe(r=>{if(r.confirm){let u=this.settingsService.language.code,d=this.settingsService.dateFormat,g={dateFormat:d,locale:u};i==="Approve"?g.approvedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d):g.rejectedOnDate=this.dateUtils.formatDate(this.settingsService.businessDate,d),this.loansServices.applyCommandLoanRescheduleRequests(e.id,i.toLowerCase(),g).subscribe(_=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-reschedule-loan-tab"]],inputs:{loanStatus:"loanStatus"},decls:23,vars:8,consts:[[1,"container"],[1,"layout-row","gap-20px","align-end","align-items-center","action-buttons"],["mat-raised-button","","color","primary",3,"routerLink"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","rescheduleFromDate"],["matColumnDef","reason"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[3,"ngClass"],["icon","stop"],[1,"m-l-10","status"],["mat-raised-button","","color","warn","matTooltipPosition","left",1,"action-button",3,"click","matTooltip"],["icon","trash"],["mat-raised-button","","color","primary","matTooltipPosition","right",1,"action-button",3,"click","matTooltip"],["icon","check"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"div",1)(2,"button",2),c(3),p(4,"translate"),l()(),s(5,"table",3),X(6,4),F(7,pF,2,0,"th",5)(8,mF,2,1,"td",6),Q(),X(9,7),F(10,dF,3,3,"th",5)(11,uF,7,6,"td",6),Q(),X(12,8),F(13,fF,3,3,"th",5)(14,hF,3,3,"td",6),Q(),X(15,9),F(16,gF,3,3,"th",5)(17,_F,2,1,"td",6),Q(),X(18,10),F(19,CF,3,3,"th",5)(20,vF,2,1,"td",6),Q(),F(21,xF,1,0,"tr",11)(22,yF,1,0,"tr",12),l()()),i&2&&(o(2),x("routerLink",Ut(7,cF)),o(),b(" ",m(4,5,"labels.buttons.Reschedule")," "),o(2),x("dataSource",a.loanRescheduleData),o(16),x("matHeaderRowDef",a.loanRescheduleDataColumns),o(),x("matRowDefColumns",a.loanRescheduleDataColumns))},dependencies:[wt,pa,Pt,ae,Gt,_n,vn,bn,xn,Cn,yn,un,Oi,Sn,wn,Dn,Pn,gn,Tt,Ip],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}"]})}}return t})();var SF=()=>["../.."];function DF(t,n){t&1&&(s(0,"mat-error"),c(1),p(2,"translate"),p(3,"translate"),s(4,"strong"),c(5),p(6,"translate"),l()()),t&2&&(o(),$t(" ",m(2,3,"labels.inputs.Amount")," ",m(3,5,"labels.commons.is")," "),o(4),C(m(6,7,"labels.commons.required")))}function wF(t,n){if(t&1&&(s(0,"mat-option",9),c(1),l()),t&2){let e=n.$implicit;x("value",e.id),o(),b(" ",e.name," ")}}function PF(t,n){t&1&&(s(0,"mat-form-field")(1,"mat-label"),c(2),p(3,"translate"),l(),P(4,"input",18),l(),s(5,"mat-form-field")(6,"mat-label"),c(7),p(8,"translate"),l(),P(9,"input",19),l(),s(10,"mat-form-field")(11,"mat-label"),c(12),p(13,"translate"),l(),P(14,"input",20),l(),s(15,"mat-form-field")(16,"mat-label"),c(17),p(18,"translate"),l(),P(19,"input",21),l(),s(20,"mat-form-field")(21,"mat-label"),c(22),p(23,"translate"),l(),P(24,"input",22),l()),t&2&&(o(2),b(" ",m(3,5,"labels.inputs.Account")," #"),o(5),b("",m(8,7,"labels.inputs.Cheque")," #"),o(5),C(m(13,9,"labels.inputs.Routing Code")),o(5),b("",m(18,11,"labels.inputs.Reciept")," #"),o(5),b("",m(23,13,"labels.inputs.Bank")," #"))}function TF(t,n){if(t&1&&(s(0,"button",23),c(1),p(2,"translate"),l()),t&2){let e=T();x("disabled",!e.adjustLoanChargeForm.valid),o(),b(" ",m(2,2,"labels.buttons.Submit")," ")}}var M0=(()=>{class t{constructor(){this.formBuilder=A(Pe),this.loanService=A(At),this.route=A(It),this.router=A(le),this.settingsService=A(oe),this.organizationService=A(Np),this.paymentTypes=[],this.chargeData=[],this.loanDetailsData=[],this.showPaymentDetails=!1,this.minDate=new Date(2e3,0,1),this.maxDate=new Date,this.loanId=this.route.snapshot.params.loanId,this.chargeId=this.route.snapshot.params.id,this.route.data.subscribe(e=>{this.chargeData=e.loansAccountCharge,this.loanDetailsData=e.loanDetailsData})}ngOnInit(){this.maxDate=this.settingsService.maxAllowedDate,this.createAdjustLoanChargeForm(),this.setRepaymentLoanDetails()}createAdjustLoanChargeForm(){this.adjustLoanChargeForm=this.formBuilder.group({amount:[this.chargeData.amount,Wt.required],externalId:"",paymentTypeId:"",note:""})}setRepaymentLoanDetails(){this.organizationService.getPaymentTypes().subscribe(e=>{this.paymentTypes=e})}addPaymentDetails(){this.showPaymentDetails=!this.showPaymentDetails,this.showPaymentDetails?(this.adjustLoanChargeForm.addControl("accountNumber",new pe("")),this.adjustLoanChargeForm.addControl("checkNumber",new pe("")),this.adjustLoanChargeForm.addControl("routingCode",new pe("")),this.adjustLoanChargeForm.addControl("receiptNumber",new pe("")),this.adjustLoanChargeForm.addControl("bankNumber",new pe(""))):(this.adjustLoanChargeForm.removeControl("accountNumber"),this.adjustLoanChargeForm.removeControl("checkNumber"),this.adjustLoanChargeForm.removeControl("routingCode"),this.adjustLoanChargeForm.removeControl("receiptNumber"),this.adjustLoanChargeForm.removeControl("bankNumber"))}submit(){let e=this.adjustLoanChargeForm.value,i=this.settingsService.language.code,a=Se(ie({},e),{locale:i});this.loanService.executeLoansAccountChargesCommand(this.loanId,"adjustment",a,this.chargeId).subscribe(u=>{this.router.navigate(["../.."],{relativeTo:this.route})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-adjust-loan-charge"]],decls:44,vars:26,consts:[[1,"container","mat-elevation-z8"],[3,"ngSubmit","formGroup"],[1,"layout-column"],["appearance","fill"],["matTextSuffix","",1,"m-l-10"],[1,"flex-auto"],["type","number","matInput","","required","","formControlName","amount",1,"right-input"],["matInput","","formControlName","externalId"],["formControlName","paymentTypeId"],[3,"value"],[1,"flex-fill"],[1,"expandcollapsebutton","m-l-10","m-t-40","flex-75",3,"click"],[3,"className"],[1,"m-l-10"],["matInput","","formControlName","note","cdkTextareaAutosize","","cdkAutosizeMinRows","2"],[1,"layout-row","align-center","gap-5px","responsive-column"],["type","button","mat-raised-button","",3,"routerLink"],["mat-raised-button","","color","primary",3,"disabled",4,"mifosxHasPermission"],["matInput","","formControlName","accountNumber"],["matInput","","formControlName","checkNumber"],["matInput","","formControlName","routingCode"],["matInput","","formControlName","receiptNumber"],["matInput","","formControlName","bankNumber"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"mat-card")(2,"form",1),it("ngSubmit",function(){return a.submit()}),s(3,"mat-card-content")(4,"div",2)(5,"mat-form-field",3)(6,"mat-label"),c(7),p(8,"translate"),l(),s(9,"span",4),c(10),l(),P(11,"span",5)(12,"input",6),M(13,DF,7,9,"mat-error"),l(),s(14,"mat-form-field")(15,"mat-label"),c(16),p(17,"translate"),l(),P(18,"input",7),l(),s(19,"mat-form-field")(20,"mat-label"),c(21),p(22,"translate"),l(),s(23,"mat-select",8),de(24,wF,2,2,"mat-option",9,xe),l()(),s(26,"div",10)(27,"span",11),it("click",function(){return a.addPaymentDetails()}),s(28,"mat-slide-toggle")(29,"div",12)(30,"span",13),c(31),p(32,"translate"),l()()()()(),M(33,PF,25,15),s(34,"mat-form-field")(35,"mat-label"),c(36),p(37,"translate"),l(),P(38,"textarea",14),l()(),s(39,"mat-card-actions",15)(40,"button",16),c(41),p(42,"translate"),l(),F(43,TF,3,4,"button",17),l()()()()()),i&2&&(o(2),x("formGroup",a.adjustLoanChargeForm),o(5),C(m(8,13,"labels.inputs.Amount")),o(3),C(a.loanDetailsData.currency.code),o(3),O(a.adjustLoanChargeForm.controls.amount.hasError("required")?13:-1),o(3),C(m(17,15,"labels.inputs.External Id")),o(5),C(m(22,17,"labels.inputs.Payment Type")),o(3),ue(a.paymentTypes),o(5),x("className",a.showPaymentDetails?"enabled":"disabled"),o(2),C(m(32,19,"labels.inputs.Show Payment Details")),o(2),O(a.showPaymentDetails?33:-1),o(3),C(m(37,21,"labels.inputs.Note")),o(4),x("routerLink",Ut(25,SF)),o(),b(" ",m(42,23,"labels.buttons.Cancel")," "),o(2),x("mifosxHasPermission","ADJUSTMENT_LOANCHARGE"))},dependencies:[wt,Pt,Ne,we,Mi,he,Le,je,ke,Fe,ae,ge,Te,Ve,Ce,_e,Ue,Je,Ae,En,In,Gt,Me,za,Wn,Tt],styles:[".expandcollapsebutton[_ngcontent-%COMP%]{margin-top:-7px}.container[_ngcontent-%COMP%]{max-width:37rem}.right-input[_ngcontent-%COMP%]{text-align:right}.right-label[_ngcontent-%COMP%]{padding-right:25px!important}"]})}}return t})();var Eg=(()=>{class t{constructor(){this.systemService=A(vp)}resolve(e){return this.systemService.getConfigurationByName("loan-arrears-delinquency-display-data")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var AF=t=>["/","journal-entry","view-transfer",t];function MF(t,n){if(t&1&&(s(0,"div",1)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"div",6)(5,"table")(6,"tbody")(7,"tr")(8,"td",7)(9,"b"),c(10),p(11,"translate"),l()(),s(12,"td",8)(13,"div",9),P(14,"fa-icon",10),s(15,"span",11),c(16),l()()(),s(17,"td",7)(18,"b"),c(19),p(20,"translate"),l()(),s(21,"td",8),P(22,"mifosx-external-identifier",12),l()(),s(23,"tr")(24,"td",7)(25,"b"),c(26),p(27,"translate"),l()(),s(28,"td",8),c(29),p(30,"dateFormat"),l(),s(31,"td",7)(32,"b"),c(33),p(34,"translate"),l()(),s(35,"td",8),c(36),p(37,"dateFormat"),l()(),s(38,"tr")(39,"td",7)(40,"b"),c(41),p(42,"translate"),l()(),s(43,"td",13)(44,"table")(45,"tbody")(46,"tr")(47,"td",14)(48,"b"),c(49),p(50,"translate"),l()(),s(51,"td",15),c(52),p(53,"formatNumber"),l()(),s(54,"tr")(55,"td",14)(56,"b"),c(57),p(58,"translate"),l()(),s(59,"td",15),c(60),p(61,"formatNumber"),l()(),s(62,"tr")(63,"td",14)(64,"b"),c(65),p(66,"translate"),l()(),s(67,"td",15),c(68),p(69,"formatNumber"),l()(),s(70,"tr")(71,"td",14)(72,"b"),c(73),p(74,"translate"),l()(),s(75,"td",15),c(76),p(77,"formatNumber"),l()(),s(78,"tr")(79,"td",14)(80,"b"),c(81),p(82,"translate"),l()(),s(83,"td",15),c(84),p(85,"formatNumber"),l()(),s(86,"tr")(87,"td",14)(88,"b"),c(89),p(90,"translate"),l()(),s(91,"td",15),c(92),p(93,"formatNumber"),l()()()()()()()()()()),t&2){let e=T();o(2),C(m(3,24,"labels.heading.Active Asset Transfer")),o(8),b("",m(11,26,"labels.inputs.Status")," :"),o(3),x("ngClass",e.itemStatus(e.activeTransferData.status)),o(3),C(e.activeTransferData.status),o(3),b("",m(20,28,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(e.activeTransferData.owner.externalId)),o(4),b("",m(27,30,"labels.inputs.Settlement Date")," :"),o(3),b(" ",m(30,32,e.activeTransferData.settlementDate)," "),o(4),b("",m(34,34,"labels.inputs.Effective Date")," :"),o(3),b(" ",m(37,36,e.activeTransferData.effectiveFrom)," "),o(5),b("",m(42,38,"labels.inputs.Details")," :"),o(8),b("",m(50,40,"labels.inputs.Principal Outstanding")," :"),o(3),b(" ",m(53,42,e.activeTransferData.details.totalPrincipalOutstanding)," "),o(5),b("",m(58,44,"labels.inputs.Interest Outstanding")," :"),o(3),b(" ",m(61,46,e.activeTransferData.details.totalInterestOutstanding)," "),o(5),b("",m(66,48,"labels.inputs.Fees Outstanding")," :"),o(3),b(" ",m(69,50,e.activeTransferData.details.totalFeeChargesOutstanding)," "),o(5),b("",m(74,52,"labels.inputs.Penalties Outstanding")," :"),o(3),b(" ",m(77,54,e.activeTransferData.details.totalPenaltyChargesOutstanding)," "),o(5),b("",m(82,56,"labels.inputs.Outstanding")," :"),o(3),b(" ",m(85,58,e.activeTransferData.details.totalOutstanding)," "),o(5),b("",m(90,60,"labels.inputs.Overpaid")," :"),o(3),C(m(93,62,e.activeTransferData.details.totalOverpaid))}}function OF(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.saleLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Sell Loan")," "))}function IF(t,n){t&1&&(s(0,"div",4),F(1,OF,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function EF(t,n){if(t&1){let e=Ct();s(0,"button",20),it("click",function(){lt(e);let a=T(2);return st(a.cancelSaleLoan())}),P(1,"fa-icon",21),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Cancel Sell Loan")," "))}function LF(t,n){t&1&&(s(0,"div",4),F(1,EF,4,3,"button",19),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function kF(t,n){if(t&1){let e=Ct();s(0,"button",17),it("click",function(){lt(e);let a=T(2);return st(a.buyBackLoan())}),P(1,"fa-icon",18),c(2),p(3,"translate"),l()}t&2&&(o(2),b("",m(3,1,"labels.buttons.Buy Back Loan")," "))}function FF(t,n){t&1&&(s(0,"div",4),F(1,kF,4,3,"button",16),l()),t&2&&(o(),x("mifosxHasPermission","SALE_LOAN"))}function NF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function RF(t,n){if(t&1&&(s(0,"td",36)(1,"div",9),P(2,"fa-icon",10),s(3,"span",37),c(4),p(5,"translate"),l()()()),t&2){let e=n.$implicit,i=T(2);o(),x("ngClass",i.itemStatus(e.status)),o(3),b(" ",m(5,2,i.itemCurrentStatus(e))," ")}}function BF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Effective From")))}function qF(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.effectiveFrom))}}function zF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Owner External Id")))}function jF(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.owner.externalId))}}function VF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Transfer External Id")))}function UF(t,n){if(t&1&&(s(0,"td",36),P(1,"mifosx-external-identifier",38),l()),t&2){let e=n.$implicit;o(),x("externalId",ce(e.transferExternalId))}}function HF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Settlement Date")))}function GF(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.settlementDate))}}function WF(t,n){t&1&&(s(0,"th",35),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Purchase Price Ratio")))}function $F(t,n){if(t&1&&(s(0,"td",36),c(1),p(2,"number"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.purchasePriceRatio))}}function YF(t,n){t&1&&(s(0,"th",39),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function KF(t,n){if(t&1){let e=Ct();s(0,"button",42),p(1,"translate"),it("click",function(a){lt(e);let r=T(3);return st(r.routeJournalEntry(a))}),P(2,"i",43),l()}if(t&2){let e=T().$implicit;x("matTooltip",ce(m(1,3,"tooltips.View Journal Entries")))("routerLink",ka(5,AF,e.transferId))}}function ZF(t,n){if(t&1&&(s(0,"td",40),M(1,KF,3,7,"button",41),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.isPendingOrCanceled(e)?-1:1)}}function JF(t,n){t&1&&P(0,"tr",44)}function XF(t,n){t&1&&P(0,"tr",45)}function QF(t,n){if(t&1&&(s(0,"table",5),X(1,22),F(2,NF,3,3,"th",23)(3,RF,6,4,"td",24),Q(),X(4,25),F(5,BF,3,3,"th",23)(6,qF,3,3,"td",24),Q(),X(7,26),F(8,zF,3,3,"th",23)(9,jF,2,2,"td",24),Q(),X(10,27),F(11,VF,3,3,"th",23)(12,UF,2,2,"td",24),Q(),X(13,28),F(14,HF,3,3,"th",23)(15,GF,3,3,"td",24),Q(),X(16,29),F(17,WF,3,3,"th",23)(18,$F,3,3,"td",24),Q(),X(19,30),F(20,YF,3,3,"th",31)(21,ZF,2,1,"td",32),Q(),F(22,JF,1,0,"tr",33)(23,XF,1,0,"tr",34),l()),t&2){let e=T();x("dataSource",e.loanTransfersData),o(22),x("matHeaderRowDef",e.loanTransferColumns),o(),x("matRowDefColumns",e.loanTransferColumns)}}var O0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dialog=A(Gn),this.externalAssetOwner=A(Rp),this.externalAssetOwnerService=A(Wr),this.defaultDate="9999-12-31",this.loanTransfersData=[],this.loanTransferColumns=["status","effectiveFrom","ownerExternalId","transferExternalId","settlementDate","purchasePriceRatio","actions"],this.existActiveTransfer=!1,this.route.data.subscribe(e=>{this.loanTransfersData=e.loanTransfersData.empty?[]:e.loanTransfersData.content,this.activeTransferData=e.activeTransferData||null,this.existActiveTransfer=e.activeTransferData&&e.activeTransferData.transferId!=null})}ngOnInit(){this.currentItem=null,this.loanTransfersData.length>0&&(this.currentItem=this.loanTransfersData[this.loanTransfersData.length-1])}itemCurrentStatus(e){return this.externalAssetOwner.itemCurrentStatus(e)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}isPending(e){return this.externalAssetOwner.isPending(e)}isPendingOrCanceled(e){return this.externalAssetOwner.isPendingOrCanceled(e)}isBuyBackPending(e){return this.externalAssetOwner.isBuyBackPending(e)}canBeCancelled(){return this.externalAssetOwner.validateStatus(this.currentItem,"PENDING")}canBeSold(){return this.externalAssetOwner.canBeSold(this.currentItem)}canBeBuyed(){return this.externalAssetOwner.validateStatus(this.currentItem,"ACTIVE")}saleLoan(){this.router.navigate(["../actions/Sell Loan"],{relativeTo:this.route})}cancelSaleLoan(){this.dialog.open(o1,{data:{cancelContext:`the Asset Transfer with the Owner External Id ${this.currentItem.owner.externalId} `}}).afterClosed().subscribe(i=>{if(i.cancel){let a={transferExternalId:this.currentItem.transferExternalId};this.externalAssetOwnerService.executeExternalAssetOwnerTransferCommand(this.currentItem.transferId,a,"cancel").subscribe(r=>{this.reload()})}})}buyBackLoan(){this.router.navigate(["../actions/Buy Back Loan"],{relativeTo:this.route})}routeJournalEntry(e){e.stopPropagation()}reload(){let e=this.router.url;this.router.navigateByUrl("/",{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-owner-tab"]],decls:10,vars:8,consts:[[1,"tab-container","mat-typography"],[1,"flex-fill"],[1,"layout-row","align-start-center"],[1,"flex-90"],[1,"flex-10"],["mat-table","","mat-sort","",3,"dataSource"],[1,"layout-row","gap-32px","asset-transfer-container"],[1,"flex-25"],[1,"flex-25","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-10","external-asset-owner-status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50"],[1,"flex-50","r-amount"],["mat-raised-button","","class","f-right","color","primary",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","primary",1,"f-right",3,"click"],["icon","dollar-sign",1,"m-r-10"],["mat-raised-button","","class","f-right","color","warn",3,"click",4,"mifosxHasPermission"],["mat-raised-button","","color","warn",1,"f-right",3,"click"],["icon","trash",1,"m-r-10"],["matColumnDef","status"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","effectiveFrom"],["matColumnDef","ownerExternalId"],["matColumnDef","transferExternalId"],["matColumnDef","settlementDate"],["matColumnDef","purchasePriceRatio"],["matColumnDef","actions"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","center td-min-space",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"m-l-10","status"],[3,"externalId"],["mat-header-cell","",1,"center"],["mat-cell","",1,"center","td-min-space"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"matTooltip","routerLink"],["mat-raised-button","","color","primary","matTooltipPosition","left",1,"account-action-button",3,"click","matTooltip","routerLink"],[1,"fa","fa-arrow-circle-right"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),M(1,MF,94,64,"div",1),s(2,"div",2)(3,"h3",3),c(4),p(5,"translate"),l(),M(6,IF,2,1,"div",4),M(7,LF,2,1,"div",4),M(8,FF,2,1,"div",4),l(),M(9,QF,24,3,"table",5),l()),i&2&&(o(),O(a.existActiveTransfer?1:-1),o(3),C(m(5,6,"labels.heading.External Asset Owner")),o(2),O(a.canBeSold()?6:-1),o(),O(a.canBeCancelled()?7:-1),o(),O(a.canBeBuyed()?8:-1),o(),O(a.loanTransfersData.length>0?9:-1))},dependencies:[wt,pa,Pt,ae,Gt,Me,un,Va,_n,vn,bn,xn,Cn,yn,Oi,Sn,wn,Dn,Pn,_p,gn,Tt,fn],styles:[".tab-container[_ngcontent-%COMP%]{padding:1% 1% 2%;margin:1%}.tab-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:1% auto}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%]{padding-bottom:1rem;padding-top:1rem}.tab-container[_ngcontent-%COMP%] .transaction-buttons[_ngcontent-%COMP%] .accruals[_ngcontent-%COMP%]{padding-top:1%}.tab-container[_ngcontent-%COMP%] .asset-transfer-container[_ngcontent-%COMP%]{border:1px solid;padding:1%;margin-bottom:20px}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%}.tab-container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .select-row[_ngcontent-%COMP%]:hover{cursor:pointer}.external-asset-owner-status[_ngcontent-%COMP%]{color:#000}.account-action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}"]})}}return t})();var ju=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerTransfers(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Lg=(()=>{class t{constructor(){this.externalAssetOwnerService=A(Wr)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.externalAssetOwnerService.retrieveExternalAssetOwnerActiveTransfer(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kg=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getLoanCollaterals(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Vu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Fg=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDelinquencyActions(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function tN(t,n){t&1&&(s(0,"th",13),c(1,"#"),l())}function eN(t,n){if(t&1&&(s(0,"td",14),c(1),l()),t&2){let e=n.index;o(),C(e+1)}}function nN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Start Date")))}function iN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.termVariationApplicableFrom))}}function aN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.End Date")))}function oN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"dateFormat"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.dateValue))}}function rN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Value")))}function lN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.decimalValue))}}function sN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Days")))}function cN(t,n){if(t&1&&(s(0,"td",14),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),C(m(2,1,e.days))}}function pN(t,n){t&1&&(s(0,"th",13),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Actions")))}function mN(t,n){if(t&1){let e=Ct();s(0,"span")(1,"button",15),p(2,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Edit"))}),P(3,"fa-icon",16),l(),s(4,"button",17),p(5,"translate"),it("click",function(){lt(e);let a=T().$implicit,r=T(2);return st(r.manageRequest(a,"Delete"))}),P(6,"fa-icon",18),l()()}t&2&&(o(),x("matTooltip",ce(m(2,4,"tooltips.Edit"))),o(3),x("matTooltip",ce(m(5,6,"tooltips.Delete"))))}function dN(t,n){if(t&1&&(s(0,"td",14),M(1,mN,7,8,"span"),l()),t&2){let e=n.$implicit,i=T(2);o(),O(i.allowActions(e.termType.value)?1:-1)}}function uN(t,n){t&1&&P(0,"tr",19)}function fN(t,n){t&1&&P(0,"tr",20)}function hN(t,n){if(t&1&&(s(0,"div")(1,"h3",1),c(2),p(3,"translate"),l(),s(4,"table",2),X(5,3),F(6,tN,2,0,"th",4)(7,eN,2,1,"td",5),Q(),X(8,6),F(9,nN,3,3,"th",4)(10,iN,3,3,"td",5),Q(),X(11,7),F(12,aN,3,3,"th",4)(13,oN,3,3,"td",5),Q(),X(14,8),F(15,rN,3,3,"th",4)(16,lN,3,3,"td",5),Q(),X(17,9),F(18,sN,3,3,"th",4)(19,cN,3,3,"td",5),Q(),X(20,10),F(21,pN,3,3,"th",4)(22,dN,2,1,"td",5),Q(),F(23,uN,1,0,"tr",11)(24,fN,1,0,"tr",12),l()()),t&2){let e=n.$implicit,i=T();o(2),C(m(3,4,"labels.heading."+e.label)),o(2),x("dataSource",e.data),o(19),x("matHeaderRowDef",i.loanDTermVariationsColumns),o(),x("matRowDefColumns",i.loanDTermVariationsColumns)}}var I0=(()=>{class t{constructor(){this.route=A(It),this.router=A(le),this.dates=A(me),this.settingsService=A(oe),this.loansService=A(At),this.dialog=A(Gn),this.loanTermVariationsData=[],this.loanDTermVariationsColumns=["row","startDate","endDate","days","actions"],this.emiAmountData=[],this.interestRateData=[],this.dueDateData=[],this.deleteInstallmentData=[],this.insertInstallmentData=[],this.principalAmountData=[],this.graceOnInterestData=[],this.graceOnPrincipalData=[],this.extendRepaymentPeriodData=[],this.interestRateFromInstallmentData=[],this.interestPausesData=[],this.invalidData=[];let e=this.dates;this.interestPausesData=[],this.clientId=this.route.parent.parent.snapshot.paramMap.get("clientId"),this.route.data.subscribe(i=>{this.loanId=i.loanDetailsData.id,this.loanTermVariationsData=[],i.loanDetailsData.loanTermVariations?.forEach(a=>{switch(a.days=e.calculateDiff(new Date(a.termVariationApplicableFrom),new Date(a.dateValue))+1,a.termType.value){case"emiAmount":this.emiAmountData.push(a);break;case"interestRate":this.interestRateData.push(a);break;case"deleteInstallment":this.deleteInstallmentData.push(a);break;case"dueDate":this.dueDateData.push(a);break;case"insertInstallment":this.insertInstallmentData.push(a);break;case"principalAmount":this.principalAmountData.push(a);break;case"graceOnInterest":this.graceOnInterestData.push(a);break;case"graceOnPrincipal":this.graceOnPrincipalData.push(a);break;case"extendRepaymentPeriod":this.extendRepaymentPeriodData.push(a);break;case"interestRateForInstallment":this.interestRateFromInstallmentData.push(a);break;case"interestPause":this.interestPausesData.push(a);break;default:this.invalidData.push(a);break}}),this.deleteInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Delete Installment",data:this.deleteInstallmentData}),this.dueDateData.length>0&&this.loanTermVariationsData.push({label:"Due Date",data:this.dueDateData}),this.emiAmountData.length>0&&this.loanTermVariationsData.push({label:"EMI Amount",data:this.emiAmountData}),this.extendRepaymentPeriodData.length>0&&this.loanTermVariationsData.push({label:"Extend Repayment Period",data:this.extendRepaymentPeriodData}),this.graceOnInterestData.length>0&&this.loanTermVariationsData.push({label:"Grace On Interest",data:this.graceOnInterestData}),this.graceOnPrincipalData.length>0&&this.loanTermVariationsData.push({label:"Grace On Principal",data:this.graceOnPrincipalData}),this.insertInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Insert Installment",data:this.insertInstallmentData}),this.interestPausesData.length>0&&this.loanTermVariationsData.push({label:"Interest Pauses",data:this.interestPausesData}),this.interestRateData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate",data:this.interestRateData}),this.interestRateFromInstallmentData.length>0&&this.loanTermVariationsData.push({label:"Interest Rate From Installment",data:this.interestRateFromInstallmentData}),this.principalAmountData.length>0&&this.loanTermVariationsData.push({label:"Principal Amount",data:this.principalAmountData})})}manageRequest(e,i){i==="Delete"?this.deleteInterestPause(e):i==="Edit"&&this.updateInterestPause(e)}deleteInterestPause(e){this.dialog.open(la,{data:{deleteContext:`interest pause from ${e.startDate} to ${e.endDate}`}}).afterClosed().subscribe(a=>{a.delete&&this.loansService.deleteInterestPause(this.loanId,e.id).subscribe(r=>{this.reload()})})}updateInterestPause(e){let i=this.dates.parseDate(e.startDate),a=this.dates.parseDate(e.endDate),r=[new sa({controlName:"startDate",label:"Start Date",value:i,maxDate:this.settingsService.maxFutureDate,required:!0}),new sa({controlName:"endDate",label:"End Date",value:a,maxDate:this.settingsService.maxFutureDate,required:!0})],u={title:"Edit Interest Pause id: "+e.id,formfields:r,layout:{addButtonText:"Submit"}};this.dialog.open(gi,{data:u,width:"50rem"}).afterClosed().subscribe(g=>{if(g.data&&g.data.value.startDate<=g.data.value.endDate){let _=this.settingsService.language.code,y=this.settingsService.dateFormat,I={startDate:this.dates.formatDate(g.data.value.startDate,y),endDate:this.dates.formatDate(g.data.value.endDate,y),locale:_,dateFormat:y};this.loansService.updateInterestPause(this.loanId,e.id,I).subscribe(k=>{this.reload()})}})}reload(){let e=this.router.url;this.router.navigateByUrl(`/clients/${this.clientId}/loans-accounts`,{skipLocationChange:!0}).then(()=>this.router.navigate([e]))}allowActions(e){return e==="interestPause"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-term-variations-tab"]],decls:3,vars:0,consts:[[1,"container"],[1,"m-t-20"],["mat-table","",3,"dataSource"],["matColumnDef","row"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","startDate"],["matColumnDef","endDate"],["matColumnDef","value"],["matColumnDef","days"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","color","primary","matTooltipPosition","right",1,"button",3,"click","matTooltip"],["icon","edit","size","lg"],["mat-icon-button","","color","warn","matTooltipPosition","left",1,"button",3,"click","matTooltip"],["icon","trash","size","lg"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0),de(1,hN,25,6,"div",null,xe),l()),i&2&&(o(),ue(a.loanTermVariationsData))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,qa,Oi,un,Sn,wn,Dn,Pn,gn,Tt,fn],styles:["table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{min-width:26px;padding:0 0 3px;margin:0 2%;line-height:25px}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}.container[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{margin-left:1%}"]})}}return t})();var Uu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");if(!isNaN(+i))return this.loansService.getInterestPausesOfLoan(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();function gN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amount")))}function _N(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.amount)," ")}}function CN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Amortized Amount")))}function bN(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.amortizedAmount)," ")}}function vN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Unrecognized Amount")))}function xN(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",m(2,1,e.unrecognizedAmount)," ")}}function yN(t,n){t&1&&(s(0,"th",10),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Adjustment Amount")))}function SN(t,n){if(t&1&&(s(0,"td",11),c(1),p(2,"formatNumber"),l()),t&2){let e=n.$implicit;o(),b(" ",Ee(2,1,e.amountAdjustment,"-")," ")}}function DN(t,n){t&1&&P(0,"tr",12)}function wN(t,n){t&1&&P(0,"tr",13)}function PN(t,n){if(t&1&&(s(0,"table",1),X(1,2),F(2,gN,3,3,"th",3)(3,_N,3,3,"td",4),Q(),X(4,5),F(5,CN,3,3,"th",3)(6,bN,3,3,"td",4),Q(),X(7,6),F(8,vN,3,3,"th",3)(9,xN,3,3,"td",4),Q(),X(10,7),F(11,yN,3,3,"th",3)(12,SN,3,4,"td",4),Q(),F(13,DN,1,0,"tr",8)(14,wN,1,0,"tr",9),l()),t&2){let e=T();x("dataSource",e.capitalizedIncomeData),o(13),x("matHeaderRowDef",e.capitalizedIncomeColumns),o(),x("matRowDefColumns",e.capitalizedIncomeColumns)}}var Ng=(()=>{class t{constructor(){this.route=A(It),this.capitalizedIncomeData=[],this.capitalizedIncomeColumns=["amount","amortizedAmount","unrecognizedAmount","amountAdjustment"],this.loanId=this.route.parent.parent.snapshot.params.loanId,this.capitalizedIncomeData=[],this.route.parent.data.subscribe(e=>{e.loanDeferredIncomeData.capitalizedIncomeData.forEach(i=>{this.capitalizedIncomeData.push({amount:i.amount,amortizedAmount:i.amortizedAmount??0,unrecognizedAmount:i.unrecognizedAmount??0,amountAdjustment:i.amountAdjustment??0})})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-deferred-income-tab"]],decls:6,vars:7,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","amount"],["mat-header-cell","","class","center",4,"matHeaderCellDef"],["mat-cell","","class","r-amount",4,"matCellDef"],["matColumnDef","amortizedAmount"],["matColumnDef","unrecognizedAmount"],["matColumnDef","amountAdjustment"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","",1,"center"],["mat-cell","",1,"r-amount"],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),p(4,"translate"),l(),M(5,PN,15,3,"table",1),l()),i&2&&(o(2),$t("",m(3,3,"labels.inputs.Deferred income")," - ",m(4,5,"labels.menus.Capitalized Income")),o(3),O(a.capitalizedIncomeData.length>0?5:-1))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt,fn],encapsulation:2})}}return t})();var Hu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return this.loansService.getDeferredIncomeData(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();var Gu=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")||e.parent.paramMap.get("loanId");return i?this.loansService.getBuyDownFeeData(i):(console.error("LoanBuyDownFeesDataResolver: Could not find loanId in route parameters"),new Ef(a=>{a.next([]),a.complete()}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac})}}return t})();function TN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Id")))}function AN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.id," ")}}function MN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.External Id")))}function ON(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.externalId," ")}}function IN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Name")))}function EN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.name," ")}}function LN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Status")))}function kN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.status," ")}}function FN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Originator Type")))}function NN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.originatorTypeId," ")}}function RN(t,n){t&1&&(s(0,"th",12),c(1),p(2,"translate"),l()),t&2&&(o(),C(m(2,1,"labels.inputs.Channel Type")))}function BN(t,n){if(t&1&&(s(0,"td",13),c(1),l()),t&2){let e=n.$implicit;o(),b(" ",e.channelTypeId," ")}}function qN(t,n){t&1&&P(0,"tr",14)}function zN(t,n){t&1&&P(0,"tr",15)}var Rg=(()=>{class t{constructor(){this.route=A(It),this.loanOriginatorsData=[],this.loanId=null,this.loanoriginatorsColumns=["id","externalId","name","status","originatorTypeId","channelTypeId"];let e=this.route.parent?.parent?.snapshot.paramMap.get("loanId");this.loanId=e?Number(e):null,this.route.parent.data.subscribe(i=>{this.loanOriginatorsData=i.loanOriginatorsData.originators})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-loan-originators-tab"]],decls:25,vars:6,consts:[[1,"container"],["mat-table","",3,"dataSource"],["matColumnDef","id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","externalId"],["matColumnDef","name"],["matColumnDef","status"],["matColumnDef","originatorTypeId"],["matColumnDef","channelTypeId"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h3"),c(2),p(3,"translate"),l(),s(4,"table",1),X(5,2),F(6,TN,3,3,"th",3)(7,AN,2,1,"td",4),Q(),X(8,5),F(9,MN,3,3,"th",3)(10,ON,2,1,"td",4),Q(),X(11,6),F(12,IN,3,3,"th",3)(13,EN,2,1,"td",4),Q(),X(14,7),F(15,LN,3,3,"th",3)(16,kN,2,1,"td",4),Q(),X(17,8),F(18,FN,3,3,"th",3)(19,NN,2,1,"td",4),Q(),X(20,9),F(21,RN,3,3,"th",3)(22,BN,2,1,"td",4),Q(),F(23,qN,1,0,"tr",10)(24,zN,1,0,"tr",11),l()()),i&2&&(o(2),C(m(3,4,"labels.heading.Loan Originators")),o(2),x("dataSource",a.loanOriginatorsData),o(19),x("matHeaderRowDef",a.loanoriginatorsColumns),o(),x("matRowDefColumns",a.loanoriginatorsColumns))},dependencies:[wt,Pt,_n,vn,bn,xn,Cn,yn,Sn,wn,Dn,Pn,Tt],styles:["table[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{padding-top:1%;padding-bottom:2%}"]})}}return t})();var Bg=(()=>{class t{constructor(){this.loansService=A(At)}resolve(e){let i=e.paramMap.get("loanId")??e.parent?.paramMap.get("loanId");return i?this.loansService.getLoanOriginators(i):Ff(()=>new Error("Missing loanId route param"))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Qe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var jN=[{path:"",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create Loans Account",breadcrumb:"Create Loans Account"},component:f0,resolve:{loansAccountTemplate:Lu}},{path:":loanId",data:{title:"Loan View",routeParamBreadcrumb:"loanId"},component:qp,resolve:{loanDetailsData:Fl,loanDatatables:Ou,loanArrearsDelinquencyConfig:Eg},children:[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",component:zp,data:{title:"General",breadcrumb:"General",routeParamBreadcrumb:!1},resolve:{}},{path:"dashboard",component:Og,data:{title:"Dashboard",breadcrumb:"Dashboard",routeParamBreadcrumb:!1}},{path:"accountdetail",component:jp,data:{title:"Account Detail",breadcrumb:"Account Detail",routeParamBreadcrumb:!1}},{path:"original-schedule",component:Am,data:{title:"Original Schedule",breadcrumb:"Original Schedule",routeParamBreadcrumb:!1}},{path:"repayment-schedule",component:ho,data:{title:"Repayment Schedule",breadcrumb:"Repayment Schedule",routeParamBreadcrumb:!1}},{path:"transactions",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},children:[{path:"",component:Tm},{path:"export",component:x0}]},{path:"deferred-income",data:{title:"Loans Deferred Income",breadcrumb:"Deferred income",routeParamBreadcrumb:!1},resolve:{loanDeferredIncomeData:Hu},children:[{path:"",component:Ng}]},{path:"delinquencytags",data:{title:"Loans Delinquency Tags",breadcrumb:"Delinquency Tags",routeParamBreadcrumb:!1},resolve:{loanDelinquencyTagsData:zu,loanDelinquencyData:Vu,loanDelinquencyActions:Fg},children:[{path:"",component:T0}]},{path:"loan-reschedules",data:{},resolve:{loanRescheduleData:Ig},children:[{path:"",component:A0}]},{path:"loan-collateral",component:d0,data:{title:"Loan Collateral Details",breadcrumb:"Loan Collateral Details",routeParamBreadcrumb:!1},resolve:{loanCollaterals:kg}},{path:"term-variations",component:I0,data:{title:"Loan Term Variations",breadcrumb:"Loan Term Variations",routeParamBreadcrumb:!1},resolve:{loanDetailsData:Fl,interestPausesData:Uu}},{path:"loan-tranche-details",component:m0,data:{title:"Loan Tranche Details",breadcrumb:"Loan Tranche Details",routeParamBreadcrumb:!1}},{path:"overdue-charges",component:Mm,data:{title:"Overdue Charges",breadcrumb:"Overdue Charges",routeParamBreadcrumb:!1}},{path:"floating-interest-rates",component:p0,data:{title:"Floating Interest Rates",breadcrumb:"Floating Interest Rates",routeParamBreadcrumb:!1}},{path:"charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},component:Om},{path:"loan-documents",component:h0,data:{title:"Loan Documents",breadcrumb:"Loan Documents",routeParamBreadcrumb:!1},resolve:{loanDocuments:ku}},{path:"notes",component:Vp,data:{title:"Notes",breadcrumb:"Notes",routeParamBreadcrumb:!1},resolve:{loanNotes:Mu}},{path:"standing-instruction",component:g0,data:{title:"Standing Instructions",breadcrumb:"Standing Instructions",routeParamBreadcrumb:!1}},{path:"external-asset-owner",component:O0,data:{title:"External Asset Owner",breadcrumb:"External Asset Owner",routeParamBreadcrumb:!1},resolve:{activeTransferData:Lg,loanTransfersData:ju}},{path:"datatables",children:[{path:":datatableName",component:Im,data:{title:"Data Table View",routeParamBreadcrumb:"datatableName"},resolve:{loanDatatable:Iu}}]},{path:"originators",data:{title:"Loans Originators",breadcrumb:"Originators",routeParamBreadcrumb:!1},resolve:{loanOriginatorsData:Bg},children:[{path:"",component:Rg}]},{path:"buy-down-fees",component:Mg,data:{title:"Buy Down Fees",breadcrumb:"Buy Down Fees",routeParamBreadcrumb:!1},resolve:{loanBuyDownFeesData:Gu}}]},{path:":loanId/transactions/:id",data:{title:"Loans Account Transactions",breadcrumb:"Transactions",routeParamBreadcrumb:!1},resolve:{loanDetailsAssociationData:Fl},children:[{path:"",data:{routeParamBreadcrumb:"id"},component:C0,resolve:{loansAccountTransaction:Fu}},{path:"edit",component:b0,data:{breadcrumb:"Edit",routeParamBreadcrumb:!1},resolve:{loansAccountTransactionTemplate:Ru}},{path:"reciept",component:v0,data:{breadcrumb:"Reciept",routeParamBreadcrumb:!1},resolve:{loansTransactionReciept:Nu}}]},{path:":loanId/edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:D0}},{path:":loanId/charges",data:{title:"Loans Account Charges",breadcrumb:"Charges",routeParamBreadcrumb:!1},children:[{path:"",redirectTo:"../charges",pathMatch:"prefix"},{path:":id",data:{routeParamBreadcrumb:"id"},component:_0,resolve:{loansAccountCharge:w0,loanDetailsData:Fl}},{path:":id/adjustment",data:{routeParamBreadcrumb:"id",breadcrumb:"Adjustment"},component:M0,resolve:{loansAccountCharge:w0,loanDetailsData:Fl}}]},{path:":loanId/actions/:action",component:c0,data:{title:"Loan Account Actions",breadcrumb:"action",routeParamBreadcrumb:"action"},resolve:{actionButtonData:Eu}},{path:":loanId/transfer-funds",loadChildren:()=>import("./account-transfers.module-O4CHVKRL.js").then(t=>t.AccountTransfersModule)},{path:"edit-loans-account",data:{title:"Modify Loans Account",breadcrumb:"Modify Loans Account",routeParamBreadcrumb:"Edit"},component:Mc,resolve:{loansAccountAndTemplate:D0}}]},{path:"glim-account",data:{title:"Loans",breadcrumb:"Loans",routeParamBreadcrumb:!1},children:[{path:"create",data:{title:"Create GLIM Application",breadcrumb:"Create GLIM Application",routeParamBreadcrumb:!1},component:S0,resolve:{loansAccountTemplate:qu,groupsData:A1}},{path:":glimId",data:{title:"GSIM Account View",routeParamBreadcrumb:"savingAccountId"},component:y0,resolve:{glimData:Bu,groupsData:fd}}]}],qg=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({providers:[Fl,Mu,Ou,Iu,zu,Eu,Lu,ku,D0,w0,Fu,Ru,Nu,P1,fd,Bu,T1,qu,ju,Vu,Uu,Hu,Gu],imports:[ud.forChild(jN),ud]})}}return t})();var zg=(()=>{class t{constructor(){this.externalAssetOwner=A(Rp)}itemStatus(e){return this.externalAssetOwner.itemStatus(e)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Dt({type:t,selectors:[["mifosx-external-asset-transfer"]],inputs:{transferData:"transferData"},decls:89,vars:61,consts:[[1,"m-l-5","flex-25"],[1,"flex-25","m-l-5","left"],[3,"ngClass"],["icon","stop"],[1,"m-l-5","status"],["completed","true",3,"externalId"],[1,"flex-75","left"],[1,"flex-50","m-l-5"],[1,"flex-50","r-amount"]],template:function(i,a){i&1&&(s(0,"table")(1,"tbody")(2,"tr")(3,"td",0)(4,"b"),c(5),p(6,"translate"),l()(),s(7,"td",1)(8,"div",2),P(9,"fa-icon",3),s(10,"span",4),c(11),l()()(),s(12,"td",0)(13,"b"),c(14),p(15,"translate"),l()(),s(16,"td",1),P(17,"mifosx-external-identifier",5),l()(),s(18,"tr")(19,"td",0)(20,"b"),c(21),p(22,"translate"),l()(),s(23,"td",0),c(24),p(25,"dateFormat"),l(),s(26,"td",0)(27,"b"),c(28),p(29,"translate"),l()(),s(30,"td",0),c(31),p(32,"dateFormat"),l()(),s(33,"tr")(34,"td",0)(35,"b"),c(36),p(37,"translate"),l()(),s(38,"td",6)(39,"table")(40,"tbody")(41,"tr")(42,"td",7)(43,"b"),c(44),p(45,"translate"),l()(),s(46,"td",8),c(47),p(48,"formatNumber"),l()(),s(49,"tr")(50,"td",7)(51,"b"),c(52),p(53,"translate"),l()(),s(54,"td",8),c(55),p(56,"formatNumber"),l()(),s(57,"tr")(58,"td",7)(59,"b"),c(60),p(61,"translate"),l()(),s(62,"td",8),c(63),p(64,"formatNumber"),l()(),s(65,"tr")(66,"td",7)(67,"b"),c(68),p(69,"translate"),l()(),s(70,"td",8),c(71),p(72,"formatNumber"),l()(),s(73,"tr")(74,"td",7)(75,"b"),c(76),p(77,"translate"),l()(),s(78,"td",8),c(79),p(80,"formatNumber"),l()(),s(81,"tr")(82,"td",7)(83,"b"),c(84),p(85,"translate"),l()(),s(86,"td",8),c(87),p(88,"formatNumber"),l()()()()()()()()),i&2&&(o(5),b("",m(6,23,"labels.inputs.Status")," :"),o(3),x("ngClass",a.itemStatus(a.transferData.status)),o(3),C(a.transferData.status),o(3),b("",m(15,25,"labels.inputs.Owner External Id")," :"),o(3),x("externalId",ce(a.transferData.owner.externalId)),o(4),b("",m(22,27,"labels.inputs.Settlement Date")," :"),o(3),b(" ",m(25,29,a.transferData.settlementDate)," "),o(4),b("",m(29,31,"labels.inputs.Effective Date")," :"),o(3),b(" ",m(32,33,a.transferData.effectiveFrom)," "),o(5),b("",m(37,35,"labels.inputs.Details")," :"),o(8),b("",m(45,37,"labels.inputs.Principal Outstanding")," :"),o(3),C(m(48,39,a.transferData.details.totalPrincipalOutstanding)),o(5),b("",m(53,41,"labels.inputs.Interest Outstanding")," :"),o(3),C(m(56,43,a.transferData.details.totalInterestOutstanding)),o(5),b("",m(61,45,"labels.inputs.Fees Outstanding")," :"),o(3),b(" ",m(64,47,a.transferData.details.totalFeeChargesOutstanding)," "),o(5),b("",m(69,49,"labels.inputs.Penalties Outstanding")," :"),o(3),b(" ",m(72,51,a.transferData.details.totalPenaltyChargesOutstanding)," "),o(5),b("",m(77,53,"labels.inputs.Outstanding")," :"),o(3),C(m(80,55,a.transferData.details.totalOutstanding)),o(5),b("",m(85,57,"labels.inputs.Overpaid")," :"),o(3),C(m(88,59,a.transferData.details.totalOverpaid)))},dependencies:[wt,pa,Pt,un,Va,gn,Tt,fn],styles:[".asset-transfer-container[_ngcontent-%COMP%]{height:150px}.asset-transfer-container[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{color:#000}"]})}}return t})();var Rst=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=gp({type:t})}static{this.\u0275inj=up({imports:[S1,C1,qg,h1,Kf,n0,qp,zp,jp,Vp,Om,Mm,Am,ho,c0,Em,Tm,Im,Lm,km,Fm,Nm,Bm,zm,p0,jm,m0,Vm,Um,d0,f0,Oo,Io,Eo,nl,u0,Hm,Wm,$m,Gm,Km,Zm,Jm,Xm,Qm,h0,g0,Mc,t0,e0,_0,C0,b0,v0,x0,qm,y0,S0,T0,el,i0,Ym,Ds,A0,M0,a0,o0,O0,zg,P0,r0,l0,I0,s0,Oc]})}}return t})();export{Rst as LoansModule}; diff --git a/browser/main.js b/browser/main.js index e254f9400..7731e6d51 100644 --- a/browser/main.js +++ b/browser/main.js @@ -1,4 +1,4 @@ -import{a as MO,b as Tl,c as sp,d as Qs,e as Da,f as kh,g as li,h as u7}from"./chunk-NJEDRF32.js";import{a as Va,b as BP,c as RP,d as cu}from"./chunk-PZ5W5NMJ.js";import{$ as Md,$a as gc,$b as zo,$c as Xe,$d as Be,$e as er,$f as Jl,A as sl,Aa as en,Ab as nh,Ac as eo,Ad as ca,Ae as Ri,Af as Tt,Ag as Ih,B as xs,Ba as Xi,Bb as oh,Bc as xo,Bd as PO,Be as NO,Bf as UO,Bg as Tr,C as Co,Ca as Z1,Cb as Kc,Cc as Ht,Cd as Fd,Ce as LO,Cf as WO,D as Oo,Da as Y,Db as Od,Dc as Hn,Dd as Re,De as bh,Df as Wt,Dg as p7,E as Bo,Ea as K,Eb as ce,Ec as Gn,Ed as ut,Ee as VO,Ef as QO,Eg as Ui,F as z6,Fa as cl,Fb as wl,Fc as fo,Fd as La,Fe as Ss,Ff as JO,Fg as Oh,G as ke,Ga as J,Gb as nO,Gc as Bn,Gd as kd,Ge as ip,Gf as Hr,Gg as Ws,H as Hi,Ha as K6,Hb as oO,Hc as fh,Hd as ai,He as np,Hf as Fr,Hg as m7,I as wd,Ia as B,Ib as aO,Ic as gO,Id as Fe,Ie as qO,If as tr,J as Ar,Ja as y,Jb as ah,Jc as _O,Jd as jn,Je as Ka,Jf as ir,Jg as Ah,K as S,Ka as X6,Kb as rh,Kc as vi,Kd as ze,Ke as Xa,Kf as nr,Kg as na,L as q,La as Z6,Lb as rO,Lc as fe,Ld as ft,Le as op,Lf as YO,Lg as Yl,M as z,Ma as Ed,Mc as ep,Md as dr,Me as ap,Mf as KO,Mg as Do,N as aa,Na as Ee,Nb as pn,Nc as sn,Nd as gt,Ne as br,Nf as yh,Ng as Kl,O as H6,Oa as Te,Ob as AP,Oc as CO,Od as pa,Oe as yr,Of as Vd,Og as Fh,P as Qc,Pa as Me,Pb as lO,Pc as Ya,Pd as ci,Pe as $s,Pf as qd,Pg as d7,Q as G6,Qa as ve,Qb as Ro,Qc as vO,Qd as pi,Qe as Sr,Qf as Sh,R as Td,Ra as Jc,Rb as Xc,Rc as xO,Rd as mi,Re as Pr,Rf as XO,Rg as so,S as j6,Sa as gr,Sb as sO,Sc as Zt,Sd as di,Se as Wl,Sf as Ph,T as Jo,Ta as eO,Tb as cO,Tc as Ot,Td as fi,Te as ea,Tf as zd,U as Y1,Ua as s,Ub as pO,Uc as su,Ud as wi,Ue as rp,Uf as Hd,V as ru,Va as f,Vb as Ul,Vc as Yo,Vd as Fn,Ve as ma,Vf as ZO,W as $6,Wa as _,Wb as Mo,Wc as Ad,Wd as Oi,We as kt,Wf as e7,X as OP,Xa as ae,Xb as bs,Xc as bO,Xd as Ke,Xe as zO,Xf as wh,Y as U6,Ya as qo,Yb as vr,Yc as st,Yd as wO,Ye as Ld,Yf as t7,Z as W6,Za as eh,Zb as pr,Zc as ie,Zd as TO,Ze as Ql,Zf as i7,_ as on,_a as hc,_b as mO,_c as Ue,_d as Bd,_e as Za,_f as Ma,a as iu,aa as Q6,ab as _c,ac as ja,ad as ys,ae as gh,af as HO,ag as Us,b as nu,ba as Dd,bb as Ne,bc as mr,bf as GO,bg as Th,c as Vo,ca as i,cb as Cc,cc as Fm,cd as it,ce as cn,cf as jO,cg as Gr,d as Fa,da as yi,db as th,dc as lh,dd as tp,de as xi,df as lp,dg as Kn,e as ou,ea as Im,eb as oe,ec as lu,ed as et,ee as Rd,ef as At,eg as Rn,f as Q1,fa as J6,fb as Nt,fc as sh,fd as an,fe as zs,ff as ri,fg as bo,g as k6,ga as Y6,gb as _r,gc as Ie,gd as bn,ge as ii,gf as $O,gg as ho,h as au,ha as K1,hb as p,hc as la,hd as Ze,he as DO,hf as da,hg as ga,i as Cs,ia,ib as m,ic as ch,id as sa,ie as EO,if as ua,ig as Ai,j as J1,ja as se,jb as Dt,jc as Ve,jd as Ra,je as _h,jf as fa,jg as Nn,k as An,ka as Gi,kb as Cr,kc as Oe,kd as tt,ke as Hs,kf as ha,kg as n7,l as B6,la as Om,lb as zt,lc as Ba,ld as yO,le as Gs,lf as Yi,m as R6,ma as X1,mb as ti,mc as xn,md as Ko,me as js,mf as qi,mg as Gd,n as Pd,na as F,nb as jl,nc as ph,nd as dt,ne as IO,nf as _t,ng as o7,o as Em,oa as Qa,ob as tO,oc as mh,od as hh,oe as OO,of as Ct,og as a7,p as N6,pa as gn,pb as Id,pc as Pi,pd as Na,pe as AO,pf as vt,pg as r7,q as qr,qa as Am,qb as oo,qc as Ce,qd as SO,qe as Nd,qg as l7,r as vs,ra as M,rb as pl,rc as dh,rd as nt,re as Zo,rf as xt,rg as Mh,s as Gl,sa as D,sb as ka,sc as FP,sd as qs,se as Ch,sf as bt,sg as s7,t as Fo,ta as De,tb as Ls,tc as dO,td as me,te as FO,tg as c7,u as Wc,ua as Se,ub as Vs,uc as uO,ud as $e,ue as kO,uf as yt,ug as Dh,v as ko,va as Pe,vb as $l,vc as kP,vd as Xo,ve as xr,vf as St,vg as wr,w as Zr,wa as h,wb as iO,wc as uh,wd as zr,we as vh,wg as Eh,x as L6,xa as l,xb as Ja,xc as fO,xd as Ye,xe as xh,xf as Pt,xg as or,y as V6,ya as r,yb as ih,yc as hO,yd as ml,ye as BO,yf as wt,yg as Sn,z as q6,za as x,zb as Yc,zc as Zc,zd as It,ze as RO,zg as $i}from"./chunk-HZWIHY3V.js";import{a as rt,b as qt,c as gs,d as U1,e as pt,f as EP,g as _s,h as Zn,i as IP,j as F6,k as W1}from"./chunk-PHUH23IY.js";var Vm=pt((Qd,Cu)=>{(function(){var e,a="4.17.23",t=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",u=500,g="__lodash_placeholder__",v=1,C=2,b=4,P=1,T=2,w=1,I=2,E=4,R=8,G=16,U=32,Z=64,he=128,re=256,pe=512,de=30,be="...",ue=800,j=16,Q=1,le=2,O=3,k=1/0,L=9007199254740991,N=17976931348623157e292,H=NaN,$=4294967295,ne=$-1,xe=$>>>1,ye=[["ary",he],["bind",w],["bindKey",I],["curry",R],["curryRight",G],["flip",pe],["partial",U],["partialRight",Z],["rearg",re]],Le="[object Arguments]",ee="[object Array]",Ae="[object AsyncFunction]",X="[object Boolean]",W="[object Date]",_e="[object DOMException]",qe="[object Error]",mt="[object Function]",Je="[object GeneratorFunction]",at="[object Map]",Qt="[object Number]",Gt="[object Null]",Qe="[object Object]",Vt="[object Promise]",Bt="[object Proxy]",Ut="[object RegExp]",Yt="[object Set]",ei="[object String]",ni="[object Symbol]",Ei="[object Undefined]",Fi="[object WeakMap]",Ni="[object WeakSet]",un="[object ArrayBuffer]",ji="[object DataView]",Ki="[object Float32Array]",io="[object Float64Array]",Cn="[object Int8Array]",Zi="[object Int16Array]",vn="[object Int32Array]",zi="[object Uint8Array]",Li="[object Uint8ClampedArray]",Xn="[object Uint16Array]",dn="[object Uint32Array]",Tn=/\b__p \+= '';/g,Cl=/\b(__p \+=) '' \+/g,Pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,En=/&(?:amp|lt|gt|quot|#39);/g,Ea=/[&<>"']/g,Un=RegExp(En.source),Wn=RegExp(Ea.source),Wr=/<%-([\s\S]+?)%>/g,kn=/<%([\s\S]+?)%>/g,In=/<%=([\s\S]+?)%>/g,ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$n=/^\w*$/,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qr=/[\\^$.*+?()[\]{}|]/g,Qn=RegExp(Qr.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ki=/\{\n\/\* \[wrapped with (.+)\] \*/,wo=/,? & /,Ji=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,mn=/[()=,{}\[\]\/\s]/,Ho=/\\(\\)?/g,Mn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rn=/\w*$/,No=/^[-+]0x[0-9a-f]+$/i,po=/^0b[01]+$/i,mo=/^\[object .+?Constructor\]$/,$o=/^0o[0-7]+$/i,Pa=/^(?:0|[1-9]\d*)$/,Ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rr=/($^)/,za=/['\n\r\u2028\u2029\\]/g,Wa="\\ud800-\\udfff",ht="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",bi=ht+oi+Mi,Vi="\\u2700-\\u27bf",fn="a-z\\xdf-\\xf6\\xf8-\\xff",_n="\\xac\\xb1\\xd7\\xf7",go="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jn="\\u2000-\\u206f",Ln=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yn="A-Z\\xc0-\\xd6\\xd8-\\xde",va="\\ufe0e\\ufe0f",wa=_n+go+Jn+Ln,Eo="['\u2019]",Uo="["+Wa+"]",lr="["+wa+"]",Ir="["+bi+"]",Jr="\\d+",Fl="["+Vi+"]",As="["+fn+"]",gm="[^"+Wa+wa+Jr+Vi+fn+Yn+"]",Fs="\\ud83c[\\udffb-\\udfff]",Ao="(?:"+Ir+"|"+Fs+")",Lo="[^"+Wa+"]",_m="(?:\\ud83c[\\udde6-\\uddff]){2}",cs="[\\ud800-\\udbff][\\udc00-\\udfff]",ps="["+Yn+"]",Nr="\\u200d",kl="(?:"+As+"|"+gm+")",ks="(?:"+ps+"|"+gm+")",Rc="(?:"+Eo+"(?:d|ll|m|re|s|t|ve))?",Cm="(?:"+Eo+"(?:D|LL|M|RE|S|T|VE))?",ac=Ao+"?",ms="["+va+"]?",a1="(?:"+Nr+"(?:"+[Lo,_m,cs].join("|")+")"+ms+ac+")*",sd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vm=ms+ac+a1,cd="(?:"+[Fl,_m,cs].join("|")+")"+vm,r1="(?:"+[Lo+Ir+"?",Ir,_m,cs,Uo].join("|")+")",pd=RegExp(Eo,"g"),md=RegExp(Ir,"g"),SS=RegExp(Fs+"(?="+Fs+")|"+r1+vm,"g"),LW=RegExp([ps+"?"+As+"+"+Rc+"(?="+[lr,ps,"$"].join("|")+")",ks+"+"+Cm+"(?="+[lr,ps+kl,"$"].join("|")+")",ps+"?"+kl+"+"+Rc,ps+"+"+Cm,q0,sd,Jr,cd].join("|"),"g"),VW=RegExp("["+Nr+Wa+bi+va+"]"),qW=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zW=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],HW=-1,xa={};xa[Ki]=xa[io]=xa[Cn]=xa[Zi]=xa[vn]=xa[zi]=xa[Li]=xa[Xn]=xa[dn]=!0,xa[Le]=xa[ee]=xa[un]=xa[X]=xa[ji]=xa[W]=xa[qe]=xa[mt]=xa[at]=xa[Qt]=xa[Qe]=xa[Ut]=xa[Yt]=xa[ei]=xa[Fi]=!1;var ra={};ra[Le]=ra[ee]=ra[un]=ra[ji]=ra[X]=ra[W]=ra[Ki]=ra[io]=ra[Cn]=ra[Zi]=ra[vn]=ra[at]=ra[Qt]=ra[Qe]=ra[Ut]=ra[Yt]=ra[ei]=ra[ni]=ra[zi]=ra[Li]=ra[Xn]=ra[dn]=!0,ra[qe]=ra[mt]=ra[Fi]=!1;var GW={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},jW={"&":"&","<":"<",">":">",'"':""","'":"'"},$W={"&":"&","<":"<",">":">",""":'"',"'":"'"},UW={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},WW=parseFloat,QW=parseInt,TE=typeof global=="object"&&global&&global.Object===Object&&global,JW=typeof self=="object"&&self&&self.Object===Object&&self,fr=TE||JW||Function("return this")(),PS=typeof Qd=="object"&&Qd&&!Qd.nodeType&&Qd,xm=PS&&typeof Cu=="object"&&Cu&&!Cu.nodeType&&Cu,ME=xm&&xm.exports===PS,wS=ME&&TE.process,Bl=(function(){try{var Jt=xm&&xm.require&&xm.require("util").types;return Jt||wS&&wS.binding&&wS.binding("util")}catch{}})(),DE=Bl&&Bl.isArrayBuffer,EE=Bl&&Bl.isDate,IE=Bl&&Bl.isMap,OE=Bl&&Bl.isRegExp,AE=Bl&&Bl.isSet,FE=Bl&&Bl.isTypedArray;function vl(Jt,Si,hi){switch(hi.length){case 0:return Jt.call(Si);case 1:return Jt.call(Si,hi[0]);case 2:return Jt.call(Si,hi[0],hi[1]);case 3:return Jt.call(Si,hi[0],hi[1],hi[2])}return Jt.apply(Si,hi)}function YW(Jt,Si,hi,hn){for(var no=-1,Go=Jt==null?0:Jt.length;++no-1}function TS(Jt,Si,hi){for(var hn=-1,no=Jt==null?0:Jt.length;++hn-1;);return hi}function zE(Jt,Si){for(var hi=Jt.length;hi--&&dd(Si,Jt[hi],0)>-1;);return hi}function aQ(Jt,Si){for(var hi=Jt.length,hn=0;hi--;)Jt[hi]===Si&&++hn;return hn}var rQ=IS(GW),lQ=IS(jW);function sQ(Jt){return"\\"+UW[Jt]}function cQ(Jt,Si){return Jt==null?e:Jt[Si]}function ud(Jt){return VW.test(Jt)}function pQ(Jt){return qW.test(Jt)}function mQ(Jt){for(var Si,hi=[];!(Si=Jt.next()).done;)hi.push(Si.value);return hi}function kS(Jt){var Si=-1,hi=Array(Jt.size);return Jt.forEach(function(hn,no){hi[++Si]=[no,hn]}),hi}function HE(Jt,Si){return function(hi){return Jt(Si(hi))}}function Vc(Jt,Si){for(var hi=-1,hn=Jt.length,no=0,Go=[];++hi-1}function XQ(A,V){var te=this.__data__,we=P1(te,A);return we<0?(++this.size,te.push([A,V])):te[we][1]=V,this}rc.prototype.clear=QQ,rc.prototype.delete=JQ,rc.prototype.get=YQ,rc.prototype.has=KQ,rc.prototype.set=XQ;function lc(A){var V=-1,te=A==null?0:A.length;for(this.clear();++V=V?A:V)),A}function Vl(A,V,te,we,He,ct){var Ft,$t=V&v,Xt=V&C,Di=V&b;if(te&&(Ft=He?te(A,we,He,ct):te(A)),Ft!==e)return Ft;if(!Ia(A))return A;var Ii=lo(A);if(Ii){if(Ft=iY(A),!$t)return ol(A,Ft)}else{var Bi=Vr(A),tn=Bi==mt||Bi==Je;if(Uc(A))return PI(A,$t);if(Bi==Qe||Bi==Le||tn&&!He){if(Ft=Xt||tn?{}:GI(A),!$t)return Xt?$J(A,fJ(Ft,A)):jJ(A,eI(Ft,A))}else{if(!ra[Bi])return He?A:{};Ft=nY(A,Bi,$t)}}ct||(ct=new us);var yn=ct.get(A);if(yn)return yn;ct.set(A,Ft),C6(A)?A.forEach(function(zn){Ft.add(Vl(zn,V,te,zn,A,ct))}):g6(A)&&A.forEach(function(zn,Po){Ft.set(Po,Vl(zn,V,te,Po,A,ct))});var qn=Di?Xt?rP:aP:Xt?rl:hr,uo=Ii?e:qn(A);return Rl(uo||A,function(zn,Po){uo&&(Po=zn,zn=A[Po]),W0(Ft,Po,Vl(zn,V,te,Po,A,ct))}),Ft}function hJ(A){var V=hr(A);return function(te){return tI(te,A,V)}}function tI(A,V,te){var we=te.length;if(A==null)return!we;for(A=oa(A);we--;){var He=te[we],ct=V[He],Ft=A[He];if(Ft===e&&!(He in A)||!ct(Ft))return!1}return!0}function iI(A,V,te){if(typeof A!="function")throw new Nl(n);return eu(function(){A.apply(e,te)},V)}function Q0(A,V,te,we){var He=-1,ct=l1,Ft=!0,$t=A.length,Xt=[],Di=V.length;if(!$t)return Xt;te&&(V=Ta(V,xl(te))),we?(ct=TS,Ft=!1):V.length>=t&&(ct=z0,Ft=!1,V=new Sm(V));e:for(;++He<$t;){var Ii=A[He],Bi=te==null?Ii:te(Ii);if(Ii=we||Ii!==0?Ii:0,Ft&&Bi===Bi){for(var tn=Di;tn--;)if(V[tn]===Bi)continue e;Xt.push(Ii)}else ct(V,Bi,we)||Xt.push(Ii)}return Xt}var Hc=EI(Bs),nI=EI(HS,!0);function gJ(A,V){var te=!0;return Hc(A,function(we,He,ct){return te=!!V(we,He,ct),te}),te}function w1(A,V,te){for(var we=-1,He=A.length;++weHe?0:He+te),we=we===e||we>He?He:co(we),we<0&&(we+=He),we=te>we?0:x6(we);te0&&te($t)?V>1?Or($t,V-1,te,we,He):Lc(He,$t):we||(He[He.length]=$t)}return He}var zS=II(),aI=II(!0);function Bs(A,V){return A&&zS(A,V,hr)}function HS(A,V){return A&&aI(A,V,hr)}function T1(A,V){return Nc(V,function(te){return dc(A[te])})}function wm(A,V){V=jc(V,A);for(var te=0,we=V.length;A!=null&&teV}function CJ(A,V){return A!=null&&Wo.call(A,V)}function vJ(A,V){return A!=null&&V in oa(A)}function xJ(A,V,te){return A>=Lr(V,te)&&A=120&&Ii.length>=120)?new Sm(Ft&&Ii):e}Ii=A[0];var Bi=-1,tn=$t[0];e:for(;++Bi-1;)$t!==A&&_1.call($t,Xt,1),_1.call(A,Xt,1);return A}function gI(A,V){for(var te=A?V.length:0,we=te-1;te--;){var He=V[te];if(te==we||He!==ct){var ct=He;mc(He)?_1.call(A,He,1):XS(A,He)}}return A}function JS(A,V){return A+x1(YE()*(V-A+1))}function FJ(A,V,te,we){for(var He=-1,ct=cr(v1((V-A)/(te||1)),0),Ft=hi(ct);ct--;)Ft[we?ct:++He]=A,A+=te;return Ft}function YS(A,V){var te="";if(!A||V<1||V>L)return te;do V%2&&(te+=A),V=x1(V/2),V&&(A+=A);while(V);return te}function _o(A,V){return uP(UI(A,V,ll),A+"")}function kJ(A){return ZE(Sd(A))}function BJ(A,V){var te=Sd(A);return N1(te,Pm(V,0,te.length))}function K0(A,V,te,we){if(!Ia(A))return A;V=jc(V,A);for(var He=-1,ct=V.length,Ft=ct-1,$t=A;$t!=null&&++HeHe?0:He+V),te=te>He?He:te,te<0&&(te+=He),He=V>te?0:te-V>>>0,V>>>=0;for(var ct=hi(He);++we>>1,Ft=A[ct];Ft!==null&&!yl(Ft)&&(te?Ft<=V:Ft=t){var Di=V?null:JJ(A);if(Di)return c1(Di);Ft=!1,He=z0,Xt=new Sm}else Xt=V?[]:$t;e:for(;++we=we?A:ql(A,V,te)}var SI=TQ||function(A){return fr.clearTimeout(A)};function PI(A,V){if(V)return A.slice();var te=A.length,we=$E?$E(te):new A.constructor(te);return A.copy(we),we}function iP(A){var V=new A.constructor(A.byteLength);return new h1(V).set(new h1(A)),V}function qJ(A,V){var te=V?iP(A.buffer):A.buffer;return new A.constructor(te,A.byteOffset,A.byteLength)}function zJ(A){var V=new A.constructor(A.source,rn.exec(A));return V.lastIndex=A.lastIndex,V}function HJ(A){return U0?oa(U0.call(A)):{}}function wI(A,V){var te=V?iP(A.buffer):A.buffer;return new A.constructor(te,A.byteOffset,A.length)}function TI(A,V){if(A!==V){var te=A!==e,we=A===null,He=A===A,ct=yl(A),Ft=V!==e,$t=V===null,Xt=V===V,Di=yl(V);if(!$t&&!Di&&!ct&&A>V||ct&&Ft&&Xt&&!$t&&!Di||we&&Ft&&Xt||!te&&Xt||!He)return 1;if(!we&&!ct&&!Di&&A=$t)return Xt;var Di=te[we];return Xt*(Di=="desc"?-1:1)}}return A.index-V.index}function MI(A,V,te,we){for(var He=-1,ct=A.length,Ft=te.length,$t=-1,Xt=V.length,Di=cr(ct-Ft,0),Ii=hi(Xt+Di),Bi=!we;++$t1?te[He-1]:e,Ft=He>2?te[2]:e;for(ct=A.length>3&&typeof ct=="function"?(He--,ct):e,Ft&&Kr(te[0],te[1],Ft)&&(ct=He<3?e:ct,He=1),V=oa(V);++we-1?He[ct?V[Ft]:Ft]:e}}function FI(A){return pc(function(V){var te=V.length,we=te,He=Ll.prototype.thru;for(A&&V.reverse();we--;){var ct=V[we];if(typeof ct!="function")throw new Nl(n);if(He&&!Ft&&B1(ct)=="wrapper")var Ft=new Ll([],!0)}for(we=Ft?we:te;++we1&&Io.reverse(),Ii&&Xt$t))return!1;var Di=ct.get(A),Ii=ct.get(V);if(Di&&Ii)return Di==V&&Ii==A;var Bi=-1,tn=!0,yn=te&T?new Sm:e;for(ct.set(A,V),ct.set(V,A);++Bi<$t;){var qn=A[Bi],uo=V[Bi];if(we)var zn=Ft?we(uo,qn,Bi,V,A,ct):we(qn,uo,Bi,A,V,ct);if(zn!==e){if(zn)continue;tn=!1;break}if(yn){if(!DS(V,function(Po,Io){if(!z0(yn,Io)&&(qn===Po||He(qn,Po,te,we,ct)))return yn.push(Io)})){tn=!1;break}}else if(!(qn===uo||He(qn,uo,te,we,ct))){tn=!1;break}}return ct.delete(A),ct.delete(V),tn}function KJ(A,V,te,we,He,ct,Ft){switch(te){case ji:if(A.byteLength!=V.byteLength||A.byteOffset!=V.byteOffset)return!1;A=A.buffer,V=V.buffer;case un:return!(A.byteLength!=V.byteLength||!ct(new h1(A),new h1(V)));case X:case W:case Qt:return fs(+A,+V);case qe:return A.name==V.name&&A.message==V.message;case Ut:case ei:return A==V+"";case at:var $t=kS;case Yt:var Xt=we&P;if($t||($t=c1),A.size!=V.size&&!Xt)return!1;var Di=Ft.get(A);if(Di)return Di==V;we|=T,Ft.set(A,V);var Ii=qI($t(A),$t(V),we,He,ct,Ft);return Ft.delete(A),Ii;case ni:if(U0)return U0.call(A)==U0.call(V)}return!1}function XJ(A,V,te,we,He,ct){var Ft=te&P,$t=aP(A),Xt=$t.length,Di=aP(V),Ii=Di.length;if(Xt!=Ii&&!Ft)return!1;for(var Bi=Xt;Bi--;){var tn=$t[Bi];if(!(Ft?tn in V:Wo.call(V,tn)))return!1}var yn=ct.get(A),qn=ct.get(V);if(yn&&qn)return yn==V&&qn==A;var uo=!0;ct.set(A,V),ct.set(V,A);for(var zn=Ft;++Bi1?"& ":"")+V[we],V=V.join(te>2?", ":" "),A.replace(_i,`{ +import{a as MO,b as Tl,c as sp,d as Qs,e as Da,f as kh,g as li,h as u7}from"./chunk-74HZWEDD.js";import{a as Va,b as BP,c as RP,d as cu}from"./chunk-FMTK7B7D.js";import{$ as Md,$a as gc,$b as zo,$c as Xe,$d as Be,$e as er,$f as Jl,A as sl,Aa as en,Ab as nh,Ac as eo,Ad as ca,Ae as Ri,Af as Tt,Ag as Ih,B as xs,Ba as Xi,Bb as oh,Bc as xo,Bd as PO,Be as NO,Bf as UO,Bg as Tr,C as Co,Ca as Z1,Cb as Kc,Cc as Ht,Cd as Fd,Ce as LO,Cf as WO,D as Oo,Da as Y,Db as Od,Dc as Hn,Dd as Re,De as bh,Df as Wt,Dg as p7,E as Bo,Ea as K,Eb as ce,Ec as Gn,Ed as ut,Ee as VO,Ef as QO,Eg as Ui,F as z6,Fa as cl,Fb as wl,Fc as fo,Fd as La,Fe as Ss,Ff as JO,Fg as Oh,G as ke,Ga as J,Gb as nO,Gc as Bn,Gd as kd,Ge as ip,Gf as Hr,Gg as Ws,H as Hi,Ha as K6,Hb as oO,Hc as fh,Hd as ai,He as np,Hf as Fr,Hg as m7,I as wd,Ia as B,Ib as aO,Ic as gO,Id as Fe,Ie as qO,If as tr,J as Ar,Ja as y,Jb as ah,Jc as _O,Jd as jn,Je as Ka,Jf as ir,Jg as Ah,K as S,Ka as X6,Kb as rh,Kc as vi,Kd as ze,Ke as Xa,Kf as nr,Kg as na,L as q,La as Z6,Lb as rO,Lc as fe,Ld as ft,Le as op,Lf as YO,Lg as Yl,M as z,Ma as Ed,Mc as ep,Md as dr,Me as ap,Mf as KO,Mg as Do,N as aa,Na as Ee,Nb as pn,Nc as sn,Nd as gt,Ne as br,Nf as yh,Ng as Kl,O as H6,Oa as Te,Ob as AP,Oc as CO,Od as pa,Oe as yr,Of as Vd,Og as Fh,P as Qc,Pa as Me,Pb as lO,Pc as Ya,Pd as ci,Pe as $s,Pf as qd,Pg as d7,Q as G6,Qa as ve,Qb as Ro,Qc as vO,Qd as pi,Qe as Sr,Qf as Sh,R as Td,Ra as Jc,Rb as Xc,Rc as xO,Rd as mi,Re as Pr,Rf as XO,Rg as so,S as j6,Sa as gr,Sb as sO,Sc as Zt,Sd as di,Se as Wl,Sf as Ph,T as Jo,Ta as eO,Tb as cO,Tc as Ot,Td as fi,Te as ea,Tf as zd,U as Y1,Ua as s,Ub as pO,Uc as su,Ud as wi,Ue as rp,Uf as Hd,V as ru,Va as f,Vb as Ul,Vc as Yo,Vd as Fn,Ve as ma,Vf as ZO,W as $6,Wa as _,Wb as Mo,Wc as Ad,Wd as Oi,We as kt,Wf as e7,X as OP,Xa as ae,Xb as bs,Xc as bO,Xd as Ke,Xe as zO,Xf as wh,Y as U6,Ya as qo,Yb as vr,Yc as st,Yd as wO,Ye as Ld,Yf as t7,Z as W6,Za as eh,Zb as pr,Zc as ie,Zd as TO,Ze as Ql,Zf as i7,_ as on,_a as hc,_b as mO,_c as Ue,_d as Bd,_e as Za,_f as Ma,a as iu,aa as Q6,ab as _c,ac as ja,ad as ys,ae as gh,af as HO,ag as Us,b as nu,ba as Dd,bb as Ne,bc as mr,bf as GO,bg as Th,c as Vo,ca as i,cb as Cc,cc as Fm,cd as it,ce as cn,cf as jO,cg as Gr,d as Fa,da as yi,db as th,dc as lh,dd as tp,de as xi,df as lp,dg as Kn,e as ou,ea as Im,eb as oe,ec as lu,ed as et,ee as Rd,ef as At,eg as Rn,f as Q1,fa as J6,fb as Nt,fc as sh,fd as an,fe as zs,ff as ri,fg as bo,g as k6,ga as Y6,gb as _r,gc as Ie,gd as bn,ge as ii,gf as $O,gg as ho,h as au,ha as K1,hb as p,hc as la,hd as Ze,he as DO,hf as da,hg as ga,i as Cs,ia,ib as m,ic as ch,id as sa,ie as EO,if as ua,ig as Ai,j as J1,ja as se,jb as Dt,jc as Ve,jd as Ra,je as _h,jf as fa,jg as Nn,k as An,ka as Gi,kb as Cr,kc as Oe,kd as tt,ke as Hs,kf as ha,kg as n7,l as B6,la as Om,lb as zt,lc as Ba,ld as yO,le as Gs,lf as Yi,m as R6,ma as X1,mb as ti,mc as xn,md as Ko,me as js,mf as qi,mg as Gd,n as Pd,na as F,nb as jl,nc as ph,nd as dt,ne as IO,nf as _t,ng as o7,o as Em,oa as Qa,ob as tO,oc as mh,od as hh,oe as OO,of as Ct,og as a7,p as N6,pa as gn,pb as Id,pc as Pi,pd as Na,pe as AO,pf as vt,pg as r7,q as qr,qa as Am,qb as oo,qc as Ce,qd as SO,qe as Nd,qg as l7,r as vs,ra as M,rb as pl,rc as dh,rd as nt,re as Zo,rf as xt,rg as Mh,s as Gl,sa as D,sb as ka,sc as FP,sd as qs,se as Ch,sf as bt,sg as s7,t as Fo,ta as De,tb as Ls,tc as dO,td as me,te as FO,tg as c7,u as Wc,ua as Se,ub as Vs,uc as uO,ud as $e,ue as kO,uf as yt,ug as Dh,v as ko,va as Pe,vb as $l,vc as kP,vd as Xo,ve as xr,vf as St,vg as wr,w as Zr,wa as h,wb as iO,wc as uh,wd as zr,we as vh,wg as Eh,x as L6,xa as l,xb as Ja,xc as fO,xd as Ye,xe as xh,xf as Pt,xg as or,y as V6,ya as r,yb as ih,yc as hO,yd as ml,ye as BO,yf as wt,yg as Sn,z as q6,za as x,zb as Yc,zc as Zc,zd as It,ze as RO,zg as $i}from"./chunk-2XE77LT4.js";import{a as rt,b as qt,c as gs,d as U1,e as pt,f as EP,g as _s,h as Zn,i as IP,j as F6,k as W1}from"./chunk-PHUH23IY.js";var Vm=pt((Qd,Cu)=>{(function(){var e,a="4.17.23",t=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",u=500,g="__lodash_placeholder__",v=1,C=2,b=4,P=1,T=2,w=1,I=2,E=4,R=8,G=16,U=32,Z=64,he=128,re=256,pe=512,de=30,be="...",ue=800,j=16,Q=1,le=2,O=3,k=1/0,L=9007199254740991,N=17976931348623157e292,H=NaN,$=4294967295,ne=$-1,xe=$>>>1,ye=[["ary",he],["bind",w],["bindKey",I],["curry",R],["curryRight",G],["flip",pe],["partial",U],["partialRight",Z],["rearg",re]],Le="[object Arguments]",ee="[object Array]",Ae="[object AsyncFunction]",X="[object Boolean]",W="[object Date]",_e="[object DOMException]",qe="[object Error]",mt="[object Function]",Je="[object GeneratorFunction]",at="[object Map]",Qt="[object Number]",Gt="[object Null]",Qe="[object Object]",Vt="[object Promise]",Bt="[object Proxy]",Ut="[object RegExp]",Yt="[object Set]",ei="[object String]",ni="[object Symbol]",Ei="[object Undefined]",Fi="[object WeakMap]",Ni="[object WeakSet]",un="[object ArrayBuffer]",ji="[object DataView]",Ki="[object Float32Array]",io="[object Float64Array]",Cn="[object Int8Array]",Zi="[object Int16Array]",vn="[object Int32Array]",zi="[object Uint8Array]",Li="[object Uint8ClampedArray]",Xn="[object Uint16Array]",dn="[object Uint32Array]",Tn=/\b__p \+= '';/g,Cl=/\b(__p \+=) '' \+/g,Pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,En=/&(?:amp|lt|gt|quot|#39);/g,Ea=/[&<>"']/g,Un=RegExp(En.source),Wn=RegExp(Ea.source),Wr=/<%-([\s\S]+?)%>/g,kn=/<%([\s\S]+?)%>/g,In=/<%=([\s\S]+?)%>/g,ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$n=/^\w*$/,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qr=/[\\^$.*+?()[\]{}|]/g,Qn=RegExp(Qr.source),Rt=/^\s+/,ui=/\s/,_i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ki=/\{\n\/\* \[wrapped with (.+)\] \*/,wo=/,? & /,Ji=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,mn=/[()=,{}\[\]\/\s]/,Ho=/\\(\\)?/g,Mn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ln=/\w*$/,No=/^[-+]0x[0-9a-f]+$/i,po=/^0b[01]+$/i,mo=/^\[object .+?Constructor\]$/,$o=/^0o[0-7]+$/i,Pa=/^(?:0|[1-9]\d*)$/,Ua=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rr=/($^)/,za=/['\n\r\u2028\u2029\\]/g,Wa="\\ud800-\\udfff",ht="\\u0300-\\u036f",oi="\\ufe20-\\ufe2f",Mi="\\u20d0-\\u20ff",bi=ht+oi+Mi,Vi="\\u2700-\\u27bf",fn="a-z\\xdf-\\xf6\\xf8-\\xff",_n="\\xac\\xb1\\xd7\\xf7",go="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jn="\\u2000-\\u206f",Ln=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yn="A-Z\\xc0-\\xd6\\xd8-\\xde",va="\\ufe0e\\ufe0f",wa=_n+go+Jn+Ln,Eo="['\u2019]",Uo="["+Wa+"]",lr="["+wa+"]",Ir="["+bi+"]",Jr="\\d+",Fl="["+Vi+"]",As="["+fn+"]",gm="[^"+Wa+wa+Jr+Vi+fn+Yn+"]",Fs="\\ud83c[\\udffb-\\udfff]",Ao="(?:"+Ir+"|"+Fs+")",Lo="[^"+Wa+"]",_m="(?:\\ud83c[\\udde6-\\uddff]){2}",cs="[\\ud800-\\udbff][\\udc00-\\udfff]",ps="["+Yn+"]",Nr="\\u200d",kl="(?:"+As+"|"+gm+")",ks="(?:"+ps+"|"+gm+")",Rc="(?:"+Eo+"(?:d|ll|m|re|s|t|ve))?",Cm="(?:"+Eo+"(?:D|LL|M|RE|S|T|VE))?",ac=Ao+"?",ms="["+va+"]?",a1="(?:"+Nr+"(?:"+[Lo,_m,cs].join("|")+")"+ms+ac+")*",sd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vm=ms+ac+a1,cd="(?:"+[Fl,_m,cs].join("|")+")"+vm,r1="(?:"+[Lo+Ir+"?",Ir,_m,cs,Uo].join("|")+")",pd=RegExp(Eo,"g"),md=RegExp(Ir,"g"),SS=RegExp(Fs+"(?="+Fs+")|"+r1+vm,"g"),LW=RegExp([ps+"?"+As+"+"+Rc+"(?="+[lr,ps,"$"].join("|")+")",ks+"+"+Cm+"(?="+[lr,ps+kl,"$"].join("|")+")",ps+"?"+kl+"+"+Rc,ps+"+"+Cm,q0,sd,Jr,cd].join("|"),"g"),VW=RegExp("["+Nr+Wa+bi+va+"]"),qW=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zW=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],HW=-1,xa={};xa[Ki]=xa[io]=xa[Cn]=xa[Zi]=xa[vn]=xa[zi]=xa[Li]=xa[Xn]=xa[dn]=!0,xa[Le]=xa[ee]=xa[un]=xa[X]=xa[ji]=xa[W]=xa[qe]=xa[mt]=xa[at]=xa[Qt]=xa[Qe]=xa[Ut]=xa[Yt]=xa[ei]=xa[Fi]=!1;var ra={};ra[Le]=ra[ee]=ra[un]=ra[ji]=ra[X]=ra[W]=ra[Ki]=ra[io]=ra[Cn]=ra[Zi]=ra[vn]=ra[at]=ra[Qt]=ra[Qe]=ra[Ut]=ra[Yt]=ra[ei]=ra[ni]=ra[zi]=ra[Li]=ra[Xn]=ra[dn]=!0,ra[qe]=ra[mt]=ra[Fi]=!1;var GW={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},jW={"&":"&","<":"<",">":">",'"':""","'":"'"},$W={"&":"&","<":"<",">":">",""":'"',"'":"'"},UW={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},WW=parseFloat,QW=parseInt,TE=typeof global=="object"&&global&&global.Object===Object&&global,JW=typeof self=="object"&&self&&self.Object===Object&&self,fr=TE||JW||Function("return this")(),PS=typeof Qd=="object"&&Qd&&!Qd.nodeType&&Qd,xm=PS&&typeof Cu=="object"&&Cu&&!Cu.nodeType&&Cu,ME=xm&&xm.exports===PS,wS=ME&&TE.process,Bl=(function(){try{var Jt=xm&&xm.require&&xm.require("util").types;return Jt||wS&&wS.binding&&wS.binding("util")}catch{}})(),DE=Bl&&Bl.isArrayBuffer,EE=Bl&&Bl.isDate,IE=Bl&&Bl.isMap,OE=Bl&&Bl.isRegExp,AE=Bl&&Bl.isSet,FE=Bl&&Bl.isTypedArray;function vl(Jt,Si,hi){switch(hi.length){case 0:return Jt.call(Si);case 1:return Jt.call(Si,hi[0]);case 2:return Jt.call(Si,hi[0],hi[1]);case 3:return Jt.call(Si,hi[0],hi[1],hi[2])}return Jt.apply(Si,hi)}function YW(Jt,Si,hi,hn){for(var no=-1,Go=Jt==null?0:Jt.length;++no-1}function TS(Jt,Si,hi){for(var hn=-1,no=Jt==null?0:Jt.length;++hn-1;);return hi}function zE(Jt,Si){for(var hi=Jt.length;hi--&&dd(Si,Jt[hi],0)>-1;);return hi}function aQ(Jt,Si){for(var hi=Jt.length,hn=0;hi--;)Jt[hi]===Si&&++hn;return hn}var rQ=IS(GW),lQ=IS(jW);function sQ(Jt){return"\\"+UW[Jt]}function cQ(Jt,Si){return Jt==null?e:Jt[Si]}function ud(Jt){return VW.test(Jt)}function pQ(Jt){return qW.test(Jt)}function mQ(Jt){for(var Si,hi=[];!(Si=Jt.next()).done;)hi.push(Si.value);return hi}function kS(Jt){var Si=-1,hi=Array(Jt.size);return Jt.forEach(function(hn,no){hi[++Si]=[no,hn]}),hi}function HE(Jt,Si){return function(hi){return Jt(Si(hi))}}function Vc(Jt,Si){for(var hi=-1,hn=Jt.length,no=0,Go=[];++hi-1}function XQ(A,V){var te=this.__data__,we=P1(te,A);return we<0?(++this.size,te.push([A,V])):te[we][1]=V,this}rc.prototype.clear=QQ,rc.prototype.delete=JQ,rc.prototype.get=YQ,rc.prototype.has=KQ,rc.prototype.set=XQ;function lc(A){var V=-1,te=A==null?0:A.length;for(this.clear();++V=V?A:V)),A}function Vl(A,V,te,we,He,ct){var Ft,$t=V&v,Xt=V&C,Di=V&b;if(te&&(Ft=He?te(A,we,He,ct):te(A)),Ft!==e)return Ft;if(!Ia(A))return A;var Ii=lo(A);if(Ii){if(Ft=iY(A),!$t)return ol(A,Ft)}else{var Bi=Vr(A),tn=Bi==mt||Bi==Je;if(Uc(A))return PI(A,$t);if(Bi==Qe||Bi==Le||tn&&!He){if(Ft=Xt||tn?{}:GI(A),!$t)return Xt?$J(A,fJ(Ft,A)):jJ(A,eI(Ft,A))}else{if(!ra[Bi])return He?A:{};Ft=nY(A,Bi,$t)}}ct||(ct=new us);var yn=ct.get(A);if(yn)return yn;ct.set(A,Ft),C6(A)?A.forEach(function(zn){Ft.add(Vl(zn,V,te,zn,A,ct))}):g6(A)&&A.forEach(function(zn,Po){Ft.set(Po,Vl(zn,V,te,Po,A,ct))});var qn=Di?Xt?rP:aP:Xt?rl:hr,uo=Ii?e:qn(A);return Rl(uo||A,function(zn,Po){uo&&(Po=zn,zn=A[Po]),W0(Ft,Po,Vl(zn,V,te,Po,A,ct))}),Ft}function hJ(A){var V=hr(A);return function(te){return tI(te,A,V)}}function tI(A,V,te){var we=te.length;if(A==null)return!we;for(A=oa(A);we--;){var He=te[we],ct=V[He],Ft=A[He];if(Ft===e&&!(He in A)||!ct(Ft))return!1}return!0}function iI(A,V,te){if(typeof A!="function")throw new Nl(n);return eu(function(){A.apply(e,te)},V)}function Q0(A,V,te,we){var He=-1,ct=l1,Ft=!0,$t=A.length,Xt=[],Di=V.length;if(!$t)return Xt;te&&(V=Ta(V,xl(te))),we?(ct=TS,Ft=!1):V.length>=t&&(ct=z0,Ft=!1,V=new Sm(V));e:for(;++He<$t;){var Ii=A[He],Bi=te==null?Ii:te(Ii);if(Ii=we||Ii!==0?Ii:0,Ft&&Bi===Bi){for(var tn=Di;tn--;)if(V[tn]===Bi)continue e;Xt.push(Ii)}else ct(V,Bi,we)||Xt.push(Ii)}return Xt}var Hc=EI(Bs),nI=EI(HS,!0);function gJ(A,V){var te=!0;return Hc(A,function(we,He,ct){return te=!!V(we,He,ct),te}),te}function w1(A,V,te){for(var we=-1,He=A.length;++weHe?0:He+te),we=we===e||we>He?He:co(we),we<0&&(we+=He),we=te>we?0:x6(we);te0&&te($t)?V>1?Or($t,V-1,te,we,He):Lc(He,$t):we||(He[He.length]=$t)}return He}var zS=II(),aI=II(!0);function Bs(A,V){return A&&zS(A,V,hr)}function HS(A,V){return A&&aI(A,V,hr)}function T1(A,V){return Nc(V,function(te){return dc(A[te])})}function wm(A,V){V=jc(V,A);for(var te=0,we=V.length;A!=null&&teV}function CJ(A,V){return A!=null&&Wo.call(A,V)}function vJ(A,V){return A!=null&&V in oa(A)}function xJ(A,V,te){return A>=Lr(V,te)&&A=120&&Ii.length>=120)?new Sm(Ft&&Ii):e}Ii=A[0];var Bi=-1,tn=$t[0];e:for(;++Bi-1;)$t!==A&&_1.call($t,Xt,1),_1.call(A,Xt,1);return A}function gI(A,V){for(var te=A?V.length:0,we=te-1;te--;){var He=V[te];if(te==we||He!==ct){var ct=He;mc(He)?_1.call(A,He,1):XS(A,He)}}return A}function JS(A,V){return A+x1(YE()*(V-A+1))}function FJ(A,V,te,we){for(var He=-1,ct=cr(v1((V-A)/(te||1)),0),Ft=hi(ct);ct--;)Ft[we?ct:++He]=A,A+=te;return Ft}function YS(A,V){var te="";if(!A||V<1||V>L)return te;do V%2&&(te+=A),V=x1(V/2),V&&(A+=A);while(V);return te}function _o(A,V){return uP(UI(A,V,ll),A+"")}function kJ(A){return ZE(Sd(A))}function BJ(A,V){var te=Sd(A);return N1(te,Pm(V,0,te.length))}function K0(A,V,te,we){if(!Ia(A))return A;V=jc(V,A);for(var He=-1,ct=V.length,Ft=ct-1,$t=A;$t!=null&&++HeHe?0:He+V),te=te>He?He:te,te<0&&(te+=He),He=V>te?0:te-V>>>0,V>>>=0;for(var ct=hi(He);++we>>1,Ft=A[ct];Ft!==null&&!yl(Ft)&&(te?Ft<=V:Ft=t){var Di=V?null:JJ(A);if(Di)return c1(Di);Ft=!1,He=z0,Xt=new Sm}else Xt=V?[]:$t;e:for(;++we=we?A:ql(A,V,te)}var SI=TQ||function(A){return fr.clearTimeout(A)};function PI(A,V){if(V)return A.slice();var te=A.length,we=$E?$E(te):new A.constructor(te);return A.copy(we),we}function iP(A){var V=new A.constructor(A.byteLength);return new h1(V).set(new h1(A)),V}function qJ(A,V){var te=V?iP(A.buffer):A.buffer;return new A.constructor(te,A.byteOffset,A.byteLength)}function zJ(A){var V=new A.constructor(A.source,ln.exec(A));return V.lastIndex=A.lastIndex,V}function HJ(A){return U0?oa(U0.call(A)):{}}function wI(A,V){var te=V?iP(A.buffer):A.buffer;return new A.constructor(te,A.byteOffset,A.length)}function TI(A,V){if(A!==V){var te=A!==e,we=A===null,He=A===A,ct=yl(A),Ft=V!==e,$t=V===null,Xt=V===V,Di=yl(V);if(!$t&&!Di&&!ct&&A>V||ct&&Ft&&Xt&&!$t&&!Di||we&&Ft&&Xt||!te&&Xt||!He)return 1;if(!we&&!ct&&!Di&&A=$t)return Xt;var Di=te[we];return Xt*(Di=="desc"?-1:1)}}return A.index-V.index}function MI(A,V,te,we){for(var He=-1,ct=A.length,Ft=te.length,$t=-1,Xt=V.length,Di=cr(ct-Ft,0),Ii=hi(Xt+Di),Bi=!we;++$t1?te[He-1]:e,Ft=He>2?te[2]:e;for(ct=A.length>3&&typeof ct=="function"?(He--,ct):e,Ft&&Kr(te[0],te[1],Ft)&&(ct=He<3?e:ct,He=1),V=oa(V);++we-1?He[ct?V[Ft]:Ft]:e}}function FI(A){return pc(function(V){var te=V.length,we=te,He=Ll.prototype.thru;for(A&&V.reverse();we--;){var ct=V[we];if(typeof ct!="function")throw new Nl(n);if(He&&!Ft&&B1(ct)=="wrapper")var Ft=new Ll([],!0)}for(we=Ft?we:te;++we1&&Io.reverse(),Ii&&Xt$t))return!1;var Di=ct.get(A),Ii=ct.get(V);if(Di&&Ii)return Di==V&&Ii==A;var Bi=-1,tn=!0,yn=te&T?new Sm:e;for(ct.set(A,V),ct.set(V,A);++Bi<$t;){var qn=A[Bi],uo=V[Bi];if(we)var zn=Ft?we(uo,qn,Bi,V,A,ct):we(qn,uo,Bi,A,V,ct);if(zn!==e){if(zn)continue;tn=!1;break}if(yn){if(!DS(V,function(Po,Io){if(!z0(yn,Io)&&(qn===Po||He(qn,Po,te,we,ct)))return yn.push(Io)})){tn=!1;break}}else if(!(qn===uo||He(qn,uo,te,we,ct))){tn=!1;break}}return ct.delete(A),ct.delete(V),tn}function KJ(A,V,te,we,He,ct,Ft){switch(te){case ji:if(A.byteLength!=V.byteLength||A.byteOffset!=V.byteOffset)return!1;A=A.buffer,V=V.buffer;case un:return!(A.byteLength!=V.byteLength||!ct(new h1(A),new h1(V)));case X:case W:case Qt:return fs(+A,+V);case qe:return A.name==V.name&&A.message==V.message;case Ut:case ei:return A==V+"";case at:var $t=kS;case Yt:var Xt=we&P;if($t||($t=c1),A.size!=V.size&&!Xt)return!1;var Di=Ft.get(A);if(Di)return Di==V;we|=T,Ft.set(A,V);var Ii=qI($t(A),$t(V),we,He,ct,Ft);return Ft.delete(A),Ii;case ni:if(U0)return U0.call(A)==U0.call(V)}return!1}function XJ(A,V,te,we,He,ct){var Ft=te&P,$t=aP(A),Xt=$t.length,Di=aP(V),Ii=Di.length;if(Xt!=Ii&&!Ft)return!1;for(var Bi=Xt;Bi--;){var tn=$t[Bi];if(!(Ft?tn in V:Wo.call(V,tn)))return!1}var yn=ct.get(A),qn=ct.get(V);if(yn&&qn)return yn==V&&qn==A;var uo=!0;ct.set(A,V),ct.set(V,A);for(var zn=Ft;++Bi1?"& ":"")+V[we],V=V.join(te>2?", ":" "),A.replace(_i,`{ /* [wrapped with `+V+`] */ `)}function aY(A){return lo(A)||Dm(A)||!!(QE&&A&&A[QE])}function mc(A,V){var te=typeof A;return V=V??L,!!V&&(te=="number"||te!="symbol"&&Pa.test(A))&&A>-1&&A%1==0&&A0){if(++V>=ue)return arguments[0]}else V=0;return A.apply(e,arguments)}}function N1(A,V){var te=-1,we=A.length,He=we-1;for(V=V===e?we:V;++te1?A[V-1]:e;return te=typeof te=="function"?(A.pop(),te):e,o6(A,te)});function a6(A){var V=ot(A);return V.__chain__=!0,V}function gK(A,V){return V(A),A}function L1(A,V){return V(A)}var _K=pc(function(A){var V=A.length,te=V?A[0]:0,we=this.__wrapped__,He=function(ct){return qS(ct,A)};return V>1||this.__actions__.length||!(we instanceof To)||!mc(te)?this.thru(He):(we=we.slice(te,+te+(V?1:0)),we.__actions__.push({func:L1,args:[He],thisArg:e}),new Ll(we,this.__chain__).thru(function(ct){return V&&!ct.length&&ct.push(e),ct}))});function CK(){return a6(this)}function vK(){return new Ll(this.value(),this.__chain__)}function xK(){this.__values__===e&&(this.__values__=v6(this.value()));var A=this.__index__>=this.__values__.length,V=A?e:this.__values__[this.__index__++];return{done:A,value:V}}function bK(){return this}function yK(A){for(var V,te=this;te instanceof S1;){var we=XI(te);we.__index__=0,we.__values__=e,V?He.__wrapped__=we:V=we;var He=we;te=te.__wrapped__}return He.__wrapped__=A,V}function SK(){var A=this.__wrapped__;if(A instanceof To){var V=A;return this.__actions__.length&&(V=new To(this)),V=V.reverse(),V.__actions__.push({func:L1,args:[fP],thisArg:e}),new Ll(V,this.__chain__)}return this.thru(fP)}function PK(){return bI(this.__wrapped__,this.__actions__)}var wK=I1(function(A,V,te){Wo.call(A,te)?++A[te]:sc(A,te,1)});function TK(A,V,te){var we=lo(A)?kE:gJ;return te&&Kr(A,V,te)&&(V=e),we(A,Vn(V,3))}function MK(A,V){var te=lo(A)?Nc:oI;return te(A,Vn(V,3))}var DK=AI(ZI),EK=AI(e6);function IK(A,V){return Or(V1(A,V),1)}function OK(A,V){return Or(V1(A,V),k)}function AK(A,V,te){return te=te===e?1:co(te),Or(V1(A,V),te)}function r6(A,V){var te=lo(A)?Rl:Hc;return te(A,Vn(V,3))}function l6(A,V){var te=lo(A)?KW:nI;return te(A,Vn(V,3))}var FK=I1(function(A,V,te){Wo.call(A,te)?A[te].push(V):sc(A,te,[V])});function kK(A,V,te,we){A=al(A)?A:Sd(A),te=te&&!we?co(te):0;var He=A.length;return te<0&&(te=cr(He+te,0)),j1(A)?te<=He&&A.indexOf(V,te)>-1:!!He&&dd(A,V,te)>-1}var BK=_o(function(A,V,te){var we=-1,He=typeof V=="function",ct=al(A)?hi(A.length):[];return Hc(A,function(Ft){ct[++we]=He?vl(V,Ft,te):J0(Ft,V,te)}),ct}),RK=I1(function(A,V,te){sc(A,te,V)});function V1(A,V){var te=lo(A)?Ta:pI;return te(A,Vn(V,3))}function NK(A,V,te,we){return A==null?[]:(lo(V)||(V=V==null?[]:[V]),te=we?e:te,lo(te)||(te=te==null?[]:[te]),fI(A,V,te))}var LK=I1(function(A,V,te){A[te?0:1].push(V)},function(){return[[],[]]});function VK(A,V,te){var we=lo(A)?MS:LE,He=arguments.length<3;return we(A,Vn(V,4),te,He,Hc)}function qK(A,V,te){var we=lo(A)?XW:LE,He=arguments.length<3;return we(A,Vn(V,4),te,He,nI)}function zK(A,V){var te=lo(A)?Nc:oI;return te(A,H1(Vn(V,3)))}function HK(A){var V=lo(A)?ZE:kJ;return V(A)}function GK(A,V,te){(te?Kr(A,V,te):V===e)?V=1:V=co(V);var we=lo(A)?mJ:BJ;return we(A,V)}function jK(A){var V=lo(A)?dJ:NJ;return V(A)}function $K(A){if(A==null)return 0;if(al(A))return j1(A)?fd(A):A.length;var V=Vr(A);return V==at||V==Yt?A.size:US(A).length}function UK(A,V,te){var we=lo(A)?DS:LJ;return te&&Kr(A,V,te)&&(V=e),we(A,Vn(V,3))}var WK=_o(function(A,V){if(A==null)return[];var te=V.length;return te>1&&Kr(A,V[0],V[1])?V=[]:te>2&&Kr(V[0],V[1],V[2])&&(V=[V[0]]),fI(A,Or(V,1),[])}),q1=MQ||function(){return fr.Date.now()};function QK(A,V){if(typeof V!="function")throw new Nl(n);return A=co(A),function(){if(--A<1)return V.apply(this,arguments)}}function s6(A,V,te){return V=te?e:V,V=A&&V==null?A.length:V,cc(A,he,e,e,e,e,V)}function c6(A,V){var te;if(typeof V!="function")throw new Nl(n);return A=co(A),function(){return--A>0&&(te=V.apply(this,arguments)),A<=1&&(V=e),te}}var gP=_o(function(A,V,te){var we=w;if(te.length){var He=Vc(te,bd(gP));we|=U}return cc(A,we,V,te,He)}),p6=_o(function(A,V,te){var we=w|I;if(te.length){var He=Vc(te,bd(p6));we|=U}return cc(V,we,A,te,He)});function m6(A,V,te){V=te?e:V;var we=cc(A,R,e,e,e,e,e,V);return we.placeholder=m6.placeholder,we}function d6(A,V,te){V=te?e:V;var we=cc(A,G,e,e,e,e,e,V);return we.placeholder=d6.placeholder,we}function u6(A,V,te){var we,He,ct,Ft,$t,Xt,Di=0,Ii=!1,Bi=!1,tn=!0;if(typeof A!="function")throw new Nl(n);V=Hl(V)||0,Ia(te)&&(Ii=!!te.leading,Bi="maxWait"in te,ct=Bi?cr(Hl(te.maxWait)||0,V):ct,tn="trailing"in te?!!te.trailing:tn);function yn(Ga){var hs=we,fc=He;return we=He=e,Di=Ga,Ft=A.apply(fc,hs),Ft}function qn(Ga){return Di=Ga,$t=eu(Po,V),Ii?yn(Ga):Ft}function uo(Ga){var hs=Ga-Xt,fc=Ga-Di,A6=V-hs;return Bi?Lr(A6,ct-fc):A6}function zn(Ga){var hs=Ga-Xt,fc=Ga-Di;return Xt===e||hs>=V||hs<0||Bi&&fc>=ct}function Po(){var Ga=q1();if(zn(Ga))return Io(Ga);$t=eu(Po,uo(Ga))}function Io(Ga){return $t=e,tn&&we?yn(Ga):(we=He=e,Ft)}function Sl(){$t!==e&&SI($t),Di=0,we=Xt=He=$t=e}function Xr(){return $t===e?Ft:Io(q1())}function Pl(){var Ga=q1(),hs=zn(Ga);if(we=arguments,He=this,Xt=Ga,hs){if($t===e)return qn(Xt);if(Bi)return SI($t),$t=eu(Po,V),yn(Xt)}return $t===e&&($t=eu(Po,V)),Ft}return Pl.cancel=Sl,Pl.flush=Xr,Pl}var JK=_o(function(A,V){return iI(A,1,V)}),YK=_o(function(A,V,te){return iI(A,Hl(V)||0,te)});function KK(A){return cc(A,pe)}function z1(A,V){if(typeof A!="function"||V!=null&&typeof V!="function")throw new Nl(n);var te=function(){var we=arguments,He=V?V.apply(this,we):we[0],ct=te.cache;if(ct.has(He))return ct.get(He);var Ft=A.apply(this,we);return te.cache=ct.set(He,Ft)||ct,Ft};return te.cache=new(z1.Cache||lc),te}z1.Cache=lc;function H1(A){if(typeof A!="function")throw new Nl(n);return function(){var V=arguments;switch(V.length){case 0:return!A.call(this);case 1:return!A.call(this,V[0]);case 2:return!A.call(this,V[0],V[1]);case 3:return!A.call(this,V[0],V[1],V[2])}return!A.apply(this,V)}}function XK(A){return c6(2,A)}var ZK=VJ(function(A,V){V=V.length==1&&lo(V[0])?Ta(V[0],xl(Vn())):Ta(Or(V,1),xl(Vn()));var te=V.length;return _o(function(we){for(var He=-1,ct=Lr(we.length,te);++He=V}),Dm=lI((function(){return arguments})())?lI:function(A){return Aa(A)&&Wo.call(A,"callee")&&!WE.call(A,"callee")},lo=hi.isArray,fX=DE?xl(DE):yJ;function al(A){return A!=null&&G1(A.length)&&!dc(A)}function Ha(A){return Aa(A)&&al(A)}function hX(A){return A===!0||A===!1||Aa(A)&&Yr(A)==X}var Uc=EQ||DP,gX=EE?xl(EE):SJ;function _X(A){return Aa(A)&&A.nodeType===1&&!tu(A)}function CX(A){if(A==null)return!0;if(al(A)&&(lo(A)||typeof A=="string"||typeof A.splice=="function"||Uc(A)||yd(A)||Dm(A)))return!A.length;var V=Vr(A);if(V==at||V==Yt)return!A.size;if(Z0(A))return!US(A).length;for(var te in A)if(Wo.call(A,te))return!1;return!0}function vX(A,V){return Y0(A,V)}function xX(A,V,te){te=typeof te=="function"?te:e;var we=te?te(A,V):e;return we===e?Y0(A,V,e,te):!!we}function CP(A){if(!Aa(A))return!1;var V=Yr(A);return V==qe||V==_e||typeof A.message=="string"&&typeof A.name=="string"&&!tu(A)}function bX(A){return typeof A=="number"&&JE(A)}function dc(A){if(!Ia(A))return!1;var V=Yr(A);return V==mt||V==Je||V==Ae||V==Bt}function h6(A){return typeof A=="number"&&A==co(A)}function G1(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=L}function Ia(A){var V=typeof A;return A!=null&&(V=="object"||V=="function")}function Aa(A){return A!=null&&typeof A=="object"}var g6=IE?xl(IE):wJ;function yX(A,V){return A===V||$S(A,V,sP(V))}function SX(A,V,te){return te=typeof te=="function"?te:e,$S(A,V,sP(V),te)}function PX(A){return _6(A)&&A!=+A}function wX(A){if(sY(A))throw new no(o);return sI(A)}function TX(A){return A===null}function MX(A){return A==null}function _6(A){return typeof A=="number"||Aa(A)&&Yr(A)==Qt}function tu(A){if(!Aa(A)||Yr(A)!=Qe)return!1;var V=g1(A);if(V===null)return!0;var te=Wo.call(V,"constructor")&&V.constructor;return typeof te=="function"&&te instanceof te&&d1.call(te)==SQ}var vP=OE?xl(OE):TJ;function DX(A){return h6(A)&&A>=-L&&A<=L}var C6=AE?xl(AE):MJ;function j1(A){return typeof A=="string"||!lo(A)&&Aa(A)&&Yr(A)==ei}function yl(A){return typeof A=="symbol"||Aa(A)&&Yr(A)==ni}var yd=FE?xl(FE):DJ;function EX(A){return A===e}function IX(A){return Aa(A)&&Vr(A)==Fi}function OX(A){return Aa(A)&&Yr(A)==Ni}var AX=k1(WS),FX=k1(function(A,V){return A<=V});function v6(A){if(!A)return[];if(al(A))return j1(A)?ds(A):ol(A);if(H0&&A[H0])return mQ(A[H0]());var V=Vr(A),te=V==at?kS:V==Yt?c1:Sd;return te(A)}function uc(A){if(!A)return A===0?A:0;if(A=Hl(A),A===k||A===-k){var V=A<0?-1:1;return V*N}return A===A?A:0}function co(A){var V=uc(A),te=V%1;return V===V?te?V-te:V:0}function x6(A){return A?Pm(co(A),0,$):0}function Hl(A){if(typeof A=="number")return A;if(yl(A))return H;if(Ia(A)){var V=typeof A.valueOf=="function"?A.valueOf():A;A=Ia(V)?V+"":V}if(typeof A!="string")return A===0?A:+A;A=VE(A);var te=po.test(A);return te||$o.test(A)?QW(A.slice(2),te?2:8):No.test(A)?H:+A}function b6(A){return Rs(A,rl(A))}function kX(A){return A?Pm(co(A),-L,L):A===0?A:0}function Qo(A){return A==null?"":bl(A)}var BX=vd(function(A,V){if(Z0(V)||al(V)){Rs(V,hr(V),A);return}for(var te in V)Wo.call(V,te)&&W0(A,te,V[te])}),y6=vd(function(A,V){Rs(V,rl(V),A)}),$1=vd(function(A,V,te,we){Rs(V,rl(V),A,we)}),RX=vd(function(A,V,te,we){Rs(V,hr(V),A,we)}),NX=pc(qS);function LX(A,V){var te=Cd(A);return V==null?te:eI(te,V)}var VX=_o(function(A,V){A=oa(A);var te=-1,we=V.length,He=we>2?V[2]:e;for(He&&Kr(V[0],V[1],He)&&(we=1);++te1),ct}),Rs(A,rP(A),te),we&&(te=Vl(te,v|C|b,YJ));for(var He=V.length;He--;)XS(te,V[He]);return te});function nZ(A,V){return P6(A,H1(Vn(V)))}var oZ=pc(function(A,V){return A==null?{}:OJ(A,V)});function P6(A,V){if(A==null)return{};var te=Ta(rP(A),function(we){return[we]});return V=Vn(V),hI(A,te,function(we,He){return V(we,He[0])})}function aZ(A,V,te){V=jc(V,A);var we=-1,He=V.length;for(He||(He=1,A=e);++weV){var we=A;A=V,V=we}if(te||A%1||V%1){var He=YE();return Lr(A+He*(V-A+WW("1e-"+((He+"").length-1))),V)}return JS(A,V)}var gZ=xd(function(A,V,te){return V=V.toLowerCase(),A+(te?M6(V):V)});function M6(A){return yP(Qo(A).toLowerCase())}function D6(A){return A=Qo(A),A&&A.replace(Ua,rQ).replace(md,"")}function _Z(A,V,te){A=Qo(A),V=bl(V);var we=A.length;te=te===e?we:Pm(co(te),0,we);var He=te;return te-=V.length,te>=0&&A.slice(te,He)==V}function CZ(A){return A=Qo(A),A&&Wn.test(A)?A.replace(Ea,lQ):A}function vZ(A){return A=Qo(A),A&&Qn.test(A)?A.replace(Qr,"\\$&"):A}var xZ=xd(function(A,V,te){return A+(te?"-":"")+V.toLowerCase()}),bZ=xd(function(A,V,te){return A+(te?" ":"")+V.toLowerCase()}),yZ=OI("toLowerCase");function SZ(A,V,te){A=Qo(A),V=co(V);var we=V?fd(A):0;if(!V||we>=V)return A;var He=(V-we)/2;return F1(x1(He),te)+A+F1(v1(He),te)}function PZ(A,V,te){A=Qo(A),V=co(V);var we=V?fd(A):0;return V&&we>>0,te?(A=Qo(A),A&&(typeof V=="string"||V!=null&&!vP(V))&&(V=bl(V),!V&&ud(A))?$c(ds(A),0,te):A.split(V,te)):[]}var OZ=xd(function(A,V,te){return A+(te?" ":"")+yP(V)});function AZ(A,V,te){return A=Qo(A),te=te==null?0:Pm(co(te),0,A.length),V=bl(V),A.slice(te,te+V.length)==V}function FZ(A,V,te){var we=ot.templateSettings;te&&Kr(A,V,te)&&(V=e),A=Qo(A),V=$1({},V,we,LI);var He=$1({},V.imports,we.imports,LI),ct=hr(He),Ft=FS(He,ct),$t,Xt,Di=0,Ii=V.interpolate||rr,Bi="__p += '",tn=BS((V.escape||rr).source+"|"+Ii.source+"|"+(Ii===In?Mn:rr).source+"|"+(V.evaluate||rr).source+"|$","g"),yn="//# sourceURL="+(Wo.call(V,"sourceURL")?(V.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++HW+"]")+` `;A.replace(tn,function(zn,Po,Io,Sl,Xr,Pl){return Io||(Io=Sl),Bi+=A.slice(Di,Pl).replace(za,sQ),Po&&($t=!0,Bi+=`' + @@ -17,16 +17,16 @@ __p += '`),Io&&(Bi+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Bi+`return __p -}`;var uo=I6(function(){return Go(ct,yn+"return "+Bi).apply(e,Ft)});if(uo.source=Bi,CP(uo))throw uo;return uo}function kZ(A){return Qo(A).toLowerCase()}function BZ(A){return Qo(A).toUpperCase()}function RZ(A,V,te){if(A=Qo(A),A&&(te||V===e))return VE(A);if(!A||!(V=bl(V)))return A;var we=ds(A),He=ds(V),ct=qE(we,He),Ft=zE(we,He)+1;return $c(we,ct,Ft).join("")}function NZ(A,V,te){if(A=Qo(A),A&&(te||V===e))return A.slice(0,GE(A)+1);if(!A||!(V=bl(V)))return A;var we=ds(A),He=zE(we,ds(V))+1;return $c(we,0,He).join("")}function LZ(A,V,te){if(A=Qo(A),A&&(te||V===e))return A.replace(Rt,"");if(!A||!(V=bl(V)))return A;var we=ds(A),He=qE(we,ds(V));return $c(we,He).join("")}function VZ(A,V){var te=de,we=be;if(Ia(V)){var He="separator"in V?V.separator:He;te="length"in V?co(V.length):te,we="omission"in V?bl(V.omission):we}A=Qo(A);var ct=A.length;if(ud(A)){var Ft=ds(A);ct=Ft.length}if(te>=ct)return A;var $t=te-fd(we);if($t<1)return we;var Xt=Ft?$c(Ft,0,$t).join(""):A.slice(0,$t);if(He===e)return Xt+we;if(Ft&&($t+=Xt.length-$t),vP(He)){if(A.slice($t).search(He)){var Di,Ii=Xt;for(He.global||(He=BS(He.source,Qo(rn.exec(He))+"g")),He.lastIndex=0;Di=He.exec(Ii);)var Bi=Di.index;Xt=Xt.slice(0,Bi===e?$t:Bi)}}else if(A.indexOf(bl(He),$t)!=$t){var tn=Xt.lastIndexOf(He);tn>-1&&(Xt=Xt.slice(0,tn))}return Xt+we}function qZ(A){return A=Qo(A),A&&Un.test(A)?A.replace(En,hQ):A}var zZ=xd(function(A,V,te){return A+(te?" ":"")+V.toUpperCase()}),yP=OI("toUpperCase");function E6(A,V,te){return A=Qo(A),V=te?e:V,V===e?pQ(A)?CQ(A):tQ(A):A.match(V)||[]}var I6=_o(function(A,V){try{return vl(A,e,V)}catch(te){return CP(te)?te:new no(te)}}),HZ=pc(function(A,V){return Rl(V,function(te){te=Ns(te),sc(A,te,gP(A[te],A))}),A});function GZ(A){var V=A==null?0:A.length,te=Vn();return A=V?Ta(A,function(we){if(typeof we[1]!="function")throw new Nl(n);return[te(we[0]),we[1]]}):[],_o(function(we){for(var He=-1;++HeL)return[];var te=$,we=Lr(A,$);V=Vn(V),A-=$;for(var He=AS(we,V);++te0||V<0)?new To(te):(A<0?te=te.takeRight(-A):A&&(te=te.drop(A)),V!==e&&(V=co(V),te=V<0?te.dropRight(-V):te.take(V-A)),te)},To.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},To.prototype.toArray=function(){return this.take($)},Bs(To.prototype,function(A,V){var te=/^(?:filter|find|map|reject)|While$/.test(V),we=/^(?:head|last)$/.test(V),He=ot[we?"take"+(V=="last"?"Right":""):V],ct=we||/^find/.test(V);He&&(ot.prototype[V]=function(){var Ft=this.__wrapped__,$t=we?[1]:arguments,Xt=Ft instanceof To,Di=$t[0],Ii=Xt||lo(Ft),Bi=function(Po){var Io=He.apply(ot,Lc([Po],$t));return we&&tn?Io[0]:Io};Ii&&te&&typeof Di=="function"&&Di.length!=1&&(Xt=Ii=!1);var tn=this.__chain__,yn=!!this.__actions__.length,qn=ct&&!tn,uo=Xt&&!yn;if(!ct&&Ii){Ft=uo?Ft:new To(this);var zn=A.apply(Ft,$t);return zn.__actions__.push({func:L1,args:[Bi],thisArg:e}),new Ll(zn,tn)}return qn&&uo?A.apply(this,$t):(zn=this.thru(Bi),qn?we?zn.value()[0]:zn.value():zn)})}),Rl(["pop","push","shift","sort","splice","unshift"],function(A){var V=p1[A],te=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",we=/^(?:pop|shift)$/.test(A);ot.prototype[A]=function(){var He=arguments;if(we&&!this.__chain__){var ct=this.value();return V.apply(lo(ct)?ct:[],He)}return this[te](function(Ft){return V.apply(lo(Ft)?Ft:[],He)})}}),Bs(To.prototype,function(A,V){var te=ot[V];if(te){var we=te.name+"";Wo.call(_d,we)||(_d[we]=[]),_d[we].push({name:V,func:te})}}),_d[O1(e,I).name]=[{name:"wrapper",func:e}],To.prototype.clone=qQ,To.prototype.reverse=zQ,To.prototype.value=HQ,ot.prototype.at=_K,ot.prototype.chain=CK,ot.prototype.commit=vK,ot.prototype.next=xK,ot.prototype.plant=yK,ot.prototype.reverse=SK,ot.prototype.toJSON=ot.prototype.valueOf=ot.prototype.value=PK,ot.prototype.first=ot.prototype.head,H0&&(ot.prototype[H0]=bK),ot},qc=vQ();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fr._=qc,define(function(){return qc})):xm?((xm.exports=qc)._=qc,PS._=qc):fr._=qc}).call(Qd)});var $A=pt(Ag=>{"use strict";Ag.byteLength=lle;Ag.toByteArray=cle;Ag.fromByteArray=dle;var Ks=[],es=[],rle=typeof Uint8Array<"u"?Uint8Array:Array,_w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(qm=0,GA=_w.length;qm0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=a);var o=t===a?0:4-t%4;return[t,o]}function lle(e){var a=jA(e),t=a[0],o=a[1];return(t+o)*3/4-o}function sle(e,a,t){return(a+t)*3/4-t}function cle(e){var a,t=jA(e),o=t[0],n=t[1],c=new rle(sle(e,o,n)),d=0,u=n>0?o-4:o,g;for(g=0;g>16&255,c[d++]=a>>8&255,c[d++]=a&255;return n===2&&(a=es[e.charCodeAt(g)]<<2|es[e.charCodeAt(g+1)]>>4,c[d++]=a&255),n===1&&(a=es[e.charCodeAt(g)]<<10|es[e.charCodeAt(g+1)]<<4|es[e.charCodeAt(g+2)]>>2,c[d++]=a>>8&255,c[d++]=a&255),c}function ple(e){return Ks[e>>18&63]+Ks[e>>12&63]+Ks[e>>6&63]+Ks[e&63]}function mle(e,a,t){for(var o,n=[],c=a;cu?u:d+c));return o===1?(a=e[t-1],n.push(Ks[a>>2]+Ks[a<<4&63]+"==")):o===2&&(a=(e[t-2]<<8)+e[t-1],n.push(Ks[a>>10]+Ks[a>>4&63]+Ks[a<<2&63]+"=")),n.join("")}});var UA=pt(Cw=>{Cw.read=function(e,a,t,o,n){var c,d,u=n*8-o-1,g=(1<>1,C=-7,b=t?n-1:0,P=t?-1:1,T=e[a+b];for(b+=P,c=T&(1<<-C)-1,T>>=-C,C+=u;C>0;c=c*256+e[a+b],b+=P,C-=8);for(d=c&(1<<-C)-1,c>>=-C,C+=o;C>0;d=d*256+e[a+b],b+=P,C-=8);if(c===0)c=1-v;else{if(c===g)return d?NaN:(T?-1:1)*(1/0);d=d+Math.pow(2,o),c=c-v}return(T?-1:1)*d*Math.pow(2,c-o)};Cw.write=function(e,a,t,o,n,c){var d,u,g,v=c*8-n-1,C=(1<>1,P=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=o?0:c-1,w=o?1:-1,I=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(u=isNaN(a)?1:0,d=C):(d=Math.floor(Math.log(a)/Math.LN2),a*(g=Math.pow(2,-d))<1&&(d--,g*=2),d+b>=1?a+=P/g:a+=P*Math.pow(2,1-b),a*g>=2&&(d++,g/=2),d+b>=C?(u=0,d=C):d+b>=1?(u=(a*g-1)*Math.pow(2,n),d=d+b):(u=a*Math.pow(2,b-1)*Math.pow(2,n),d=0));n>=8;e[t+T]=u&255,T+=w,u/=256,n-=8);for(d=d<0;e[t+T]=d&255,T+=w,d/=256,v-=8);e[t+T-w]|=I*128}});var aF=pt(Kd=>{"use strict";var vw=$A(),Yd=UA(),WA=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Kd.Buffer=Ti;Kd.SlowBuffer=Cle;Kd.INSPECT_MAX_BYTES=50;var Fg=2147483647;Kd.kMaxLength=Fg;Ti.TYPED_ARRAY_SUPPORT=ule();!Ti.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ule(){try{var e=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(e,a),e.foo()===42}catch{return!1}}Object.defineProperty(Ti.prototype,"parent",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.buffer}});Object.defineProperty(Ti.prototype,"offset",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.byteOffset}});function yc(e){if(e>Fg)throw new RangeError('The value "'+e+'" is invalid for option "size"');var a=new Uint8Array(e);return Object.setPrototypeOf(a,Ti.prototype),a}function Ti(e,a,t){if(typeof e=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Sw(e)}return YA(e,a,t)}Ti.poolSize=8192;function YA(e,a,t){if(typeof e=="string")return hle(e,a);if(ArrayBuffer.isView(e))return gle(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Xs(e,ArrayBuffer)||e&&Xs(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xs(e,SharedArrayBuffer)||e&&Xs(e.buffer,SharedArrayBuffer)))return bw(e,a,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return Ti.from(o,a,t);var n=_le(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ti.from(e[Symbol.toPrimitive]("string"),a,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ti.from=function(e,a,t){return YA(e,a,t)};Object.setPrototypeOf(Ti.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ti,Uint8Array);function KA(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function fle(e,a,t){return KA(e),e<=0?yc(e):a!==void 0?typeof t=="string"?yc(e).fill(a,t):yc(e).fill(a):yc(e)}Ti.alloc=function(e,a,t){return fle(e,a,t)};function Sw(e){return KA(e),yc(e<0?0:Pw(e)|0)}Ti.allocUnsafe=function(e){return Sw(e)};Ti.allocUnsafeSlow=function(e){return Sw(e)};function hle(e,a){if((typeof a!="string"||a==="")&&(a="utf8"),!Ti.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var t=XA(e,a)|0,o=yc(t),n=o.write(e,a);return n!==t&&(o=o.slice(0,n)),o}function xw(e){for(var a=e.length<0?0:Pw(e.length)|0,t=yc(a),o=0;o=Fg)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fg.toString(16)+" bytes");return e|0}function Cle(e){return+e!=e&&(e=0),Ti.alloc(+e)}Ti.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==Ti.prototype};Ti.compare=function(a,t){if(Xs(a,Uint8Array)&&(a=Ti.from(a,a.offset,a.byteLength)),Xs(t,Uint8Array)&&(t=Ti.from(t,t.offset,t.byteLength)),!Ti.isBuffer(a)||!Ti.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===t)return 0;for(var o=a.length,n=t.length,c=0,d=Math.min(o,n);cn.length?Ti.from(d).copy(n,c):Uint8Array.prototype.set.call(n,d,c);else if(Ti.isBuffer(d))d.copy(n,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=d.length}return n};function XA(e,a){if(Ti.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Xs(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&t===0)return 0;for(var n=!1;;)switch(a){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return yw(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return oF(e).length;default:if(n)return o?-1:yw(e).length;a=(""+a).toLowerCase(),n=!0}}Ti.byteLength=XA;function vle(e,a,t){var o=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,a>>>=0,t<=a))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ele(this,a,t);case"utf8":case"utf-8":return eF(this,a,t);case"ascii":return Mle(this,a,t);case"latin1":case"binary":return Dle(this,a,t);case"base64":return wle(this,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ile(this,a,t);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}Ti.prototype._isBuffer=!0;function zm(e,a,t){var o=e[a];e[a]=e[t],e[t]=o}Ti.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(a+=" ... "),""};WA&&(Ti.prototype[WA]=Ti.prototype.inspect);Ti.prototype.compare=function(a,t,o,n,c){if(Xs(a,Uint8Array)&&(a=Ti.from(a,a.offset,a.byteLength)),!Ti.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof a);if(t===void 0&&(t=0),o===void 0&&(o=a?a.length:0),n===void 0&&(n=0),c===void 0&&(c=this.length),t<0||o>a.length||n<0||c>this.length)throw new RangeError("out of range index");if(n>=c&&t>=o)return 0;if(n>=c)return-1;if(t>=o)return 1;if(t>>>=0,o>>>=0,n>>>=0,c>>>=0,this===a)return 0;for(var d=c-n,u=o-t,g=Math.min(d,u),v=this.slice(n,c),C=a.slice(t,o),b=0;b2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ww(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof a=="string"&&(a=Ti.from(a,o)),Ti.isBuffer(a))return a.length===0?-1:QA(e,a,t,o,n);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,a,t):Uint8Array.prototype.lastIndexOf.call(e,a,t):QA(e,[a],t,o,n);throw new TypeError("val must be string, number or Buffer")}function QA(e,a,t,o,n){var c=1,d=e.length,u=a.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||a.length<2)return-1;c=2,d/=2,u/=2,t/=2}function g(T,w){return c===1?T[w]:T.readUInt16BE(w*c)}var v;if(n){var C=-1;for(v=t;vd&&(t=d-u),v=t;v>=0;v--){for(var b=!0,P=0;Pn&&(o=n)):o=n;var c=a.length;o>c/2&&(o=c/2);for(var d=0;d>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var c=this.length-t;if((o===void 0||o>c)&&(o=c),a.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return xle(this,a,t,o);case"utf8":case"utf-8":return ble(this,a,t,o);case"ascii":case"latin1":case"binary":return yle(this,a,t,o);case"base64":return Sle(this,a,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ple(this,a,t,o);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}};Ti.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wle(e,a,t){return a===0&&t===e.length?vw.fromByteArray(e):vw.fromByteArray(e.slice(a,t))}function eF(e,a,t){t=Math.min(e.length,t);for(var o=[],n=a;n239?4:c>223?3:c>191?2:1;if(n+u<=t){var g,v,C,b;switch(u){case 1:c<128&&(d=c);break;case 2:g=e[n+1],(g&192)===128&&(b=(c&31)<<6|g&63,b>127&&(d=b));break;case 3:g=e[n+1],v=e[n+2],(g&192)===128&&(v&192)===128&&(b=(c&15)<<12|(g&63)<<6|v&63,b>2047&&(b<55296||b>57343)&&(d=b));break;case 4:g=e[n+1],v=e[n+2],C=e[n+3],(g&192)===128&&(v&192)===128&&(C&192)===128&&(b=(c&15)<<18|(g&63)<<12|(v&63)<<6|C&63,b>65535&&b<1114112&&(d=b))}}d===null?(d=65533,u=1):d>65535&&(d-=65536,o.push(d>>>10&1023|55296),d=56320|d&1023),o.push(d),n+=u}return Tle(o)}var JA=4096;function Tle(e){var a=e.length;if(a<=JA)return String.fromCharCode.apply(String,e);for(var t="",o=0;oo)&&(t=o);for(var n="",c=a;co&&(a=o),t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),tt)throw new RangeError("Trying to access beyond buffer length")}Ti.prototype.readUintLE=Ti.prototype.readUIntLE=function(a,t,o){a=a>>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=this[a],c=1,d=0;++d>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=this[a+--t],c=1;t>0&&(c*=256);)n+=this[a+--t]*c;return n};Ti.prototype.readUint8=Ti.prototype.readUInt8=function(a,t){return a=a>>>0,t||Mr(a,1,this.length),this[a]};Ti.prototype.readUint16LE=Ti.prototype.readUInt16LE=function(a,t){return a=a>>>0,t||Mr(a,2,this.length),this[a]|this[a+1]<<8};Ti.prototype.readUint16BE=Ti.prototype.readUInt16BE=function(a,t){return a=a>>>0,t||Mr(a,2,this.length),this[a]<<8|this[a+1]};Ti.prototype.readUint32LE=Ti.prototype.readUInt32LE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216};Ti.prototype.readUint32BE=Ti.prototype.readUInt32BE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])};Ti.prototype.readIntLE=function(a,t,o){a=a>>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=this[a],c=1,d=0;++d=c&&(n-=Math.pow(2,8*t)),n};Ti.prototype.readIntBE=function(a,t,o){a=a>>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=t,c=1,d=this[a+--n];n>0&&(c*=256);)d+=this[a+--n]*c;return c*=128,d>=c&&(d-=Math.pow(2,8*t)),d};Ti.prototype.readInt8=function(a,t){return a=a>>>0,t||Mr(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]};Ti.prototype.readInt16LE=function(a,t){a=a>>>0,t||Mr(a,2,this.length);var o=this[a]|this[a+1]<<8;return o&32768?o|4294901760:o};Ti.prototype.readInt16BE=function(a,t){a=a>>>0,t||Mr(a,2,this.length);var o=this[a+1]|this[a]<<8;return o&32768?o|4294901760:o};Ti.prototype.readInt32LE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};Ti.prototype.readInt32BE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};Ti.prototype.readFloatLE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),Yd.read(this,a,!0,23,4)};Ti.prototype.readFloatBE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),Yd.read(this,a,!1,23,4)};Ti.prototype.readDoubleLE=function(a,t){return a=a>>>0,t||Mr(a,8,this.length),Yd.read(this,a,!0,52,8)};Ti.prototype.readDoubleBE=function(a,t){return a=a>>>0,t||Mr(a,8,this.length),Yd.read(this,a,!1,52,8)};function fl(e,a,t,o,n,c){if(!Ti.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>n||ae.length)throw new RangeError("Index out of range")}Ti.prototype.writeUintLE=Ti.prototype.writeUIntLE=function(a,t,o,n){if(a=+a,t=t>>>0,o=o>>>0,!n){var c=Math.pow(2,8*o)-1;fl(this,a,t,o,c,0)}var d=1,u=0;for(this[t]=a&255;++u>>0,o=o>>>0,!n){var c=Math.pow(2,8*o)-1;fl(this,a,t,o,c,0)}var d=o-1,u=1;for(this[t+d]=a&255;--d>=0&&(u*=256);)this[t+d]=a/u&255;return t+o};Ti.prototype.writeUint8=Ti.prototype.writeUInt8=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,1,255,0),this[t]=a&255,t+1};Ti.prototype.writeUint16LE=Ti.prototype.writeUInt16LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,65535,0),this[t]=a&255,this[t+1]=a>>>8,t+2};Ti.prototype.writeUint16BE=Ti.prototype.writeUInt16BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,65535,0),this[t]=a>>>8,this[t+1]=a&255,t+2};Ti.prototype.writeUint32LE=Ti.prototype.writeUInt32LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,4294967295,0),this[t+3]=a>>>24,this[t+2]=a>>>16,this[t+1]=a>>>8,this[t]=a&255,t+4};Ti.prototype.writeUint32BE=Ti.prototype.writeUInt32BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,4294967295,0),this[t]=a>>>24,this[t+1]=a>>>16,this[t+2]=a>>>8,this[t+3]=a&255,t+4};Ti.prototype.writeIntLE=function(a,t,o,n){if(a=+a,t=t>>>0,!n){var c=Math.pow(2,8*o-1);fl(this,a,t,o,c-1,-c)}var d=0,u=1,g=0;for(this[t]=a&255;++d>0)-g&255;return t+o};Ti.prototype.writeIntBE=function(a,t,o,n){if(a=+a,t=t>>>0,!n){var c=Math.pow(2,8*o-1);fl(this,a,t,o,c-1,-c)}var d=o-1,u=1,g=0;for(this[t+d]=a&255;--d>=0&&(u*=256);)a<0&&g===0&&this[t+d+1]!==0&&(g=1),this[t+d]=(a/u>>0)-g&255;return t+o};Ti.prototype.writeInt8=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,1,127,-128),a<0&&(a=255+a+1),this[t]=a&255,t+1};Ti.prototype.writeInt16LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,32767,-32768),this[t]=a&255,this[t+1]=a>>>8,t+2};Ti.prototype.writeInt16BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,32767,-32768),this[t]=a>>>8,this[t+1]=a&255,t+2};Ti.prototype.writeInt32LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,2147483647,-2147483648),this[t]=a&255,this[t+1]=a>>>8,this[t+2]=a>>>16,this[t+3]=a>>>24,t+4};Ti.prototype.writeInt32BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[t]=a>>>24,this[t+1]=a>>>16,this[t+2]=a>>>8,this[t+3]=a&255,t+4};function tF(e,a,t,o,n,c){if(t+o>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function iF(e,a,t,o,n){return a=+a,t=t>>>0,n||tF(e,a,t,4,34028234663852886e22,-34028234663852886e22),Yd.write(e,a,t,o,23,4),t+4}Ti.prototype.writeFloatLE=function(a,t,o){return iF(this,a,t,!0,o)};Ti.prototype.writeFloatBE=function(a,t,o){return iF(this,a,t,!1,o)};function nF(e,a,t,o,n){return a=+a,t=t>>>0,n||tF(e,a,t,8,17976931348623157e292,-17976931348623157e292),Yd.write(e,a,t,o,52,8),t+8}Ti.prototype.writeDoubleLE=function(a,t,o){return nF(this,a,t,!0,o)};Ti.prototype.writeDoubleBE=function(a,t,o){return nF(this,a,t,!1,o)};Ti.prototype.copy=function(a,t,o,n){if(!Ti.isBuffer(a))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),t>=a.length&&(t=a.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),a.length-t>>0,o=o===void 0?this.length:o>>>0,a||(a=0);var d;if(typeof a=="number")for(d=t;d55295&&t<57344){if(!n){if(t>56319){(a-=3)>-1&&c.push(239,191,189);continue}else if(d+1===o){(a-=3)>-1&&c.push(239,191,189);continue}n=t;continue}if(t<56320){(a-=3)>-1&&c.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(a-=3)>-1&&c.push(239,191,189);if(n=null,t<128){if((a-=1)<0)break;c.push(t)}else if(t<2048){if((a-=2)<0)break;c.push(t>>6|192,t&63|128)}else if(t<65536){if((a-=3)<0)break;c.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((a-=4)<0)break;c.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return c}function Fle(e){for(var a=[],t=0;t>8,n=t%256,c.push(n),c.push(o);return c}function oF(e){return vw.toByteArray(Ale(e))}function kg(e,a,t,o){for(var n=0;n=a.length||n>=e.length);++n)a[n+t]=e[n];return n}function Xs(e,a){return e instanceof a||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===a.name}function ww(e){return e!==e}var Ble=(function(){for(var e="0123456789abcdef",a=new Array(256),t=0;t<16;++t)for(var o=t*16,n=0;n<16;++n)a[o+n]=e[t]+e[n];return a})()});var Uk=pt((x1n,$k)=>{function qze(){this.__data__=[],this.size=0}$k.exports=qze});var Km=pt((b1n,Wk)=>{function zze(e,a){return e===a||e!==e&&a!==a}Wk.exports=zze});var af=pt((y1n,Qk)=>{var Hze=Km();function Gze(e,a){for(var t=e.length;t--;)if(Hze(e[t][0],a))return t;return-1}Qk.exports=Gze});var Yk=pt((S1n,Jk)=>{var jze=af(),$ze=Array.prototype,Uze=$ze.splice;function Wze(e){var a=this.__data__,t=jze(a,e);if(t<0)return!1;var o=a.length-1;return t==o?a.pop():Uze.call(a,t,1),--this.size,!0}Jk.exports=Wze});var Xk=pt((P1n,Kk)=>{var Qze=af();function Jze(e){var a=this.__data__,t=Qze(a,e);return t<0?void 0:a[t][1]}Kk.exports=Jze});var eB=pt((w1n,Zk)=>{var Yze=af();function Kze(e){return Yze(this.__data__,e)>-1}Zk.exports=Kze});var iB=pt((T1n,tB)=>{var Xze=af();function Zze(e,a){var t=this.__data__,o=Xze(t,e);return o<0?(++this.size,t.push([e,a])):t[o][1]=a,this}tB.exports=Zze});var rf=pt((M1n,nB)=>{var eHe=Uk(),tHe=Yk(),iHe=Xk(),nHe=eB(),oHe=iB();function s0(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a{var aHe=rf();function rHe(){this.__data__=new aHe,this.size=0}oB.exports=rHe});var lB=pt((E1n,rB)=>{function lHe(e){var a=this.__data__,t=a.delete(e);return this.size=a.size,t}rB.exports=lHe});var cB=pt((I1n,sB)=>{function sHe(e){return this.__data__.get(e)}sB.exports=sHe});var mB=pt((O1n,pB)=>{function cHe(e){return this.__data__.has(e)}pB.exports=cHe});var uT=pt((A1n,dB)=>{var pHe=typeof global=="object"&&global&&global.Object===Object&&global;dB.exports=pHe});var is=pt((F1n,uB)=>{var mHe=uT(),dHe=typeof self=="object"&&self&&self.Object===Object&&self,uHe=mHe||dHe||Function("return this")();uB.exports=uHe});var Xm=pt((k1n,fB)=>{var fHe=is(),hHe=fHe.Symbol;fB.exports=hHe});var CB=pt((B1n,_B)=>{var hB=Xm(),gB=Object.prototype,gHe=gB.hasOwnProperty,_He=gB.toString,lf=hB?hB.toStringTag:void 0;function CHe(e){var a=gHe.call(e,lf),t=e[lf];try{e[lf]=void 0;var o=!0}catch{}var n=_He.call(e);return o&&(a?e[lf]=t:delete e[lf]),n}_B.exports=CHe});var xB=pt((R1n,vB)=>{var vHe=Object.prototype,xHe=vHe.toString;function bHe(e){return xHe.call(e)}vB.exports=bHe});var vp=pt((N1n,SB)=>{var bB=Xm(),yHe=CB(),SHe=xB(),PHe="[object Null]",wHe="[object Undefined]",yB=bB?bB.toStringTag:void 0;function THe(e){return e==null?e===void 0?wHe:PHe:yB&&yB in Object(e)?yHe(e):SHe(e)}SB.exports=THe});var Ml=pt((L1n,PB)=>{function MHe(e){var a=typeof e;return e!=null&&(a=="object"||a=="function")}PB.exports=MHe});var c0=pt((V1n,wB)=>{var DHe=vp(),EHe=Ml(),IHe="[object AsyncFunction]",OHe="[object Function]",AHe="[object GeneratorFunction]",FHe="[object Proxy]";function kHe(e){if(!EHe(e))return!1;var a=DHe(e);return a==OHe||a==AHe||a==IHe||a==FHe}wB.exports=kHe});var MB=pt((q1n,TB)=>{var BHe=is(),RHe=BHe["__core-js_shared__"];TB.exports=RHe});var IB=pt((z1n,EB)=>{var fT=MB(),DB=(function(){var e=/[^.]+$/.exec(fT&&fT.keys&&fT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function NHe(e){return!!DB&&DB in e}EB.exports=NHe});var hT=pt((H1n,OB)=>{var LHe=Function.prototype,VHe=LHe.toString;function qHe(e){if(e!=null){try{return VHe.call(e)}catch{}try{return e+""}catch{}}return""}OB.exports=qHe});var FB=pt((G1n,AB)=>{var zHe=c0(),HHe=IB(),GHe=Ml(),jHe=hT(),$He=/[\\^$.*+?()[\]{}|]/g,UHe=/^\[object .+?Constructor\]$/,WHe=Function.prototype,QHe=Object.prototype,JHe=WHe.toString,YHe=QHe.hasOwnProperty,KHe=RegExp("^"+JHe.call(YHe).replace($He,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function XHe(e){if(!GHe(e)||HHe(e))return!1;var a=zHe(e)?KHe:UHe;return a.test(jHe(e))}AB.exports=XHe});var BB=pt((j1n,kB)=>{function ZHe(e,a){return e?.[a]}kB.exports=ZHe});var xp=pt(($1n,RB)=>{var eGe=FB(),tGe=BB();function iGe(e,a){var t=tGe(e,a);return eGe(t)?t:void 0}RB.exports=iGe});var Fv=pt((U1n,NB)=>{var nGe=xp(),oGe=is(),aGe=nGe(oGe,"Map");NB.exports=aGe});var sf=pt((W1n,LB)=>{var rGe=xp(),lGe=rGe(Object,"create");LB.exports=lGe});var zB=pt((Q1n,qB)=>{var VB=sf();function sGe(){this.__data__=VB?VB(null):{},this.size=0}qB.exports=sGe});var GB=pt((J1n,HB)=>{function cGe(e){var a=this.has(e)&&delete this.__data__[e];return this.size-=a?1:0,a}HB.exports=cGe});var $B=pt((Y1n,jB)=>{var pGe=sf(),mGe="__lodash_hash_undefined__",dGe=Object.prototype,uGe=dGe.hasOwnProperty;function fGe(e){var a=this.__data__;if(pGe){var t=a[e];return t===mGe?void 0:t}return uGe.call(a,e)?a[e]:void 0}jB.exports=fGe});var WB=pt((K1n,UB)=>{var hGe=sf(),gGe=Object.prototype,_Ge=gGe.hasOwnProperty;function CGe(e){var a=this.__data__;return hGe?a[e]!==void 0:_Ge.call(a,e)}UB.exports=CGe});var JB=pt((X1n,QB)=>{var vGe=sf(),xGe="__lodash_hash_undefined__";function bGe(e,a){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=vGe&&a===void 0?xGe:a,this}QB.exports=bGe});var KB=pt((Z1n,YB)=>{var yGe=zB(),SGe=GB(),PGe=$B(),wGe=WB(),TGe=JB();function p0(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a{var XB=KB(),MGe=rf(),DGe=Fv();function EGe(){this.size=0,this.__data__={hash:new XB,map:new(DGe||MGe),string:new XB}}ZB.exports=EGe});var iR=pt((thn,tR)=>{function IGe(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}tR.exports=IGe});var cf=pt((ihn,nR)=>{var OGe=iR();function AGe(e,a){var t=e.__data__;return OGe(a)?t[typeof a=="string"?"string":"hash"]:t.map}nR.exports=AGe});var aR=pt((nhn,oR)=>{var FGe=cf();function kGe(e){var a=FGe(this,e).delete(e);return this.size-=a?1:0,a}oR.exports=kGe});var lR=pt((ohn,rR)=>{var BGe=cf();function RGe(e){return BGe(this,e).get(e)}rR.exports=RGe});var cR=pt((ahn,sR)=>{var NGe=cf();function LGe(e){return NGe(this,e).has(e)}sR.exports=LGe});var mR=pt((rhn,pR)=>{var VGe=cf();function qGe(e,a){var t=VGe(this,e),o=t.size;return t.set(e,a),this.size+=t.size==o?0:1,this}pR.exports=qGe});var kv=pt((lhn,dR)=>{var zGe=eR(),HGe=aR(),GGe=lR(),jGe=cR(),$Ge=mR();function m0(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a{var UGe=rf(),WGe=Fv(),QGe=kv(),JGe=200;function YGe(e,a){var t=this.__data__;if(t instanceof UGe){var o=t.__data__;if(!WGe||o.length{var KGe=rf(),XGe=aB(),ZGe=lB(),eje=cB(),tje=mB(),ije=fR();function d0(e){var a=this.__data__=new KGe(e);this.size=a.size}d0.prototype.clear=XGe;d0.prototype.delete=ZGe;d0.prototype.get=eje;d0.prototype.has=tje;d0.prototype.set=ije;hR.exports=d0});var Bv=pt((phn,gR)=>{function nje(e,a){for(var t=-1,o=e==null?0:e.length;++t{var oje=xp(),aje=(function(){try{var e=oje(Object,"defineProperty");return e({},"",{}),e}catch{}})();_R.exports=aje});var mf=pt((dhn,vR)=>{var CR=gT();function rje(e,a,t){a=="__proto__"&&CR?CR(e,a,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[a]=t}vR.exports=rje});var df=pt((uhn,xR)=>{var lje=mf(),sje=Km(),cje=Object.prototype,pje=cje.hasOwnProperty;function mje(e,a,t){var o=e[a];(!(pje.call(e,a)&&sje(o,t))||t===void 0&&!(a in e))&&lje(e,a,t)}xR.exports=mje});var u0=pt((fhn,bR)=>{var dje=df(),uje=mf();function fje(e,a,t,o){var n=!t;t||(t={});for(var c=-1,d=a.length;++c{function hje(e,a){for(var t=-1,o=Array(e);++t{function gje(e){return e!=null&&typeof e=="object"}PR.exports=gje});var TR=pt((_hn,wR)=>{var _je=vp(),Cje=Es(),vje="[object Arguments]";function xje(e){return Cje(e)&&_je(e)==vje}wR.exports=xje});var f0=pt((Chn,ER)=>{var MR=TR(),bje=Es(),DR=Object.prototype,yje=DR.hasOwnProperty,Sje=DR.propertyIsEnumerable,Pje=MR((function(){return arguments})())?MR:function(e){return bje(e)&&yje.call(e,"callee")&&!Sje.call(e,"callee")};ER.exports=Pje});var $a=pt((vhn,IR)=>{var wje=Array.isArray;IR.exports=wje});var AR=pt((xhn,OR)=>{function Tje(){return!1}OR.exports=Tje});var Zm=pt((uf,h0)=>{var Mje=is(),Dje=AR(),BR=typeof uf=="object"&&uf&&!uf.nodeType&&uf,FR=BR&&typeof h0=="object"&&h0&&!h0.nodeType&&h0,Eje=FR&&FR.exports===BR,kR=Eje?Mje.Buffer:void 0,Ije=kR?kR.isBuffer:void 0,Oje=Ije||Dje;h0.exports=Oje});var ff=pt((bhn,RR)=>{var Aje=9007199254740991,Fje=/^(?:0|[1-9]\d*)$/;function kje(e,a){var t=typeof e;return a=a??Aje,!!a&&(t=="number"||t!="symbol"&&Fje.test(e))&&e>-1&&e%1==0&&e{var Bje=9007199254740991;function Rje(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bje}NR.exports=Rje});var VR=pt((Shn,LR)=>{var Nje=vp(),Lje=Rv(),Vje=Es(),qje="[object Arguments]",zje="[object Array]",Hje="[object Boolean]",Gje="[object Date]",jje="[object Error]",$je="[object Function]",Uje="[object Map]",Wje="[object Number]",Qje="[object Object]",Jje="[object RegExp]",Yje="[object Set]",Kje="[object String]",Xje="[object WeakMap]",Zje="[object ArrayBuffer]",e$e="[object DataView]",t$e="[object Float32Array]",i$e="[object Float64Array]",n$e="[object Int8Array]",o$e="[object Int16Array]",a$e="[object Int32Array]",r$e="[object Uint8Array]",l$e="[object Uint8ClampedArray]",s$e="[object Uint16Array]",c$e="[object Uint32Array]",ba={};ba[t$e]=ba[i$e]=ba[n$e]=ba[o$e]=ba[a$e]=ba[r$e]=ba[l$e]=ba[s$e]=ba[c$e]=!0;ba[qje]=ba[zje]=ba[Zje]=ba[Hje]=ba[e$e]=ba[Gje]=ba[jje]=ba[$je]=ba[Uje]=ba[Wje]=ba[Qje]=ba[Jje]=ba[Yje]=ba[Kje]=ba[Xje]=!1;function p$e(e){return Vje(e)&&Lje(e.length)&&!!ba[Nje(e)]}LR.exports=p$e});var hf=pt((Phn,qR)=>{function m$e(e){return function(a){return e(a)}}qR.exports=m$e});var Nv=pt((gf,g0)=>{var d$e=uT(),zR=typeof gf=="object"&&gf&&!gf.nodeType&&gf,_f=zR&&typeof g0=="object"&&g0&&!g0.nodeType&&g0,u$e=_f&&_f.exports===zR,_T=u$e&&d$e.process,f$e=(function(){try{var e=_f&&_f.require&&_f.require("util").types;return e||_T&&_T.binding&&_T.binding("util")}catch{}})();g0.exports=f$e});var _0=pt((whn,jR)=>{var h$e=VR(),g$e=hf(),HR=Nv(),GR=HR&&HR.isTypedArray,_$e=GR?g$e(GR):h$e;jR.exports=_$e});var CT=pt((Thn,$R)=>{var C$e=SR(),v$e=f0(),x$e=$a(),b$e=Zm(),y$e=ff(),S$e=_0(),P$e=Object.prototype,w$e=P$e.hasOwnProperty;function T$e(e,a){var t=x$e(e),o=!t&&v$e(e),n=!t&&!o&&b$e(e),c=!t&&!o&&!n&&S$e(e),d=t||o||n||c,u=d?C$e(e.length,String):[],g=u.length;for(var v in e)(a||w$e.call(e,v))&&!(d&&(v=="length"||n&&(v=="offset"||v=="parent")||c&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||y$e(v,g)))&&u.push(v);return u}$R.exports=T$e});var Cf=pt((Mhn,UR)=>{var M$e=Object.prototype;function D$e(e){var a=e&&e.constructor,t=typeof a=="function"&&a.prototype||M$e;return e===t}UR.exports=D$e});var vT=pt((Dhn,WR)=>{function E$e(e,a){return function(t){return e(a(t))}}WR.exports=E$e});var JR=pt((Ehn,QR)=>{var I$e=vT(),O$e=I$e(Object.keys,Object);QR.exports=O$e});var Lv=pt((Ihn,YR)=>{var A$e=Cf(),F$e=JR(),k$e=Object.prototype,B$e=k$e.hasOwnProperty;function R$e(e){if(!A$e(e))return F$e(e);var a=[];for(var t in Object(e))B$e.call(e,t)&&t!="constructor"&&a.push(t);return a}YR.exports=R$e});var tc=pt((Ohn,KR)=>{var N$e=c0(),L$e=Rv();function V$e(e){return e!=null&&L$e(e.length)&&!N$e(e)}KR.exports=V$e});var Dc=pt((Ahn,XR)=>{var q$e=CT(),z$e=Lv(),H$e=tc();function G$e(e){return H$e(e)?q$e(e):z$e(e)}XR.exports=G$e});var e9=pt((Fhn,ZR)=>{var j$e=u0(),$$e=Dc();function U$e(e,a){return e&&j$e(a,$$e(a),e)}ZR.exports=U$e});var i9=pt((khn,t9)=>{function W$e(e){var a=[];if(e!=null)for(var t in Object(e))a.push(t);return a}t9.exports=W$e});var o9=pt((Bhn,n9)=>{var Q$e=Ml(),J$e=Cf(),Y$e=i9(),K$e=Object.prototype,X$e=K$e.hasOwnProperty;function Z$e(e){if(!Q$e(e))return Y$e(e);var a=J$e(e),t=[];for(var o in e)o=="constructor"&&(a||!X$e.call(e,o))||t.push(o);return t}n9.exports=Z$e});var bp=pt((Rhn,a9)=>{var eUe=CT(),tUe=o9(),iUe=tc();function nUe(e){return iUe(e)?eUe(e,!0):tUe(e)}a9.exports=nUe});var l9=pt((Nhn,r9)=>{var oUe=u0(),aUe=bp();function rUe(e,a){return e&&oUe(a,aUe(a),e)}r9.exports=rUe});var xT=pt((vf,C0)=>{var lUe=is(),m9=typeof vf=="object"&&vf&&!vf.nodeType&&vf,s9=m9&&typeof C0=="object"&&C0&&!C0.nodeType&&C0,sUe=s9&&s9.exports===m9,c9=sUe?lUe.Buffer:void 0,p9=c9?c9.allocUnsafe:void 0;function cUe(e,a){if(a)return e.slice();var t=e.length,o=p9?p9(t):new e.constructor(t);return e.copy(o),o}C0.exports=cUe});var bT=pt((Lhn,d9)=>{function pUe(e,a){var t=-1,o=e.length;for(a||(a=Array(o));++t{function mUe(e,a){for(var t=-1,o=e==null?0:e.length,n=0,c=[];++t{function dUe(){return[]}f9.exports=dUe});var Vv=pt((zhn,g9)=>{var uUe=yT(),fUe=ST(),hUe=Object.prototype,gUe=hUe.propertyIsEnumerable,h9=Object.getOwnPropertySymbols,_Ue=h9?function(e){return e==null?[]:(e=Object(e),uUe(h9(e),function(a){return gUe.call(e,a)}))}:fUe;g9.exports=_Ue});var C9=pt((Hhn,_9)=>{var CUe=u0(),vUe=Vv();function xUe(e,a){return CUe(e,vUe(e),a)}_9.exports=xUe});var qv=pt((Ghn,v9)=>{function bUe(e,a){for(var t=-1,o=a.length,n=e.length;++t{var yUe=vT(),SUe=yUe(Object.getPrototypeOf,Object);x9.exports=SUe});var PT=pt(($hn,b9)=>{var PUe=qv(),wUe=xf(),TUe=Vv(),MUe=ST(),DUe=Object.getOwnPropertySymbols,EUe=DUe?function(e){for(var a=[];e;)PUe(a,TUe(e)),e=wUe(e);return a}:MUe;b9.exports=EUe});var S9=pt((Uhn,y9)=>{var IUe=u0(),OUe=PT();function AUe(e,a){return IUe(e,OUe(e),a)}y9.exports=AUe});var wT=pt((Whn,P9)=>{var FUe=qv(),kUe=$a();function BUe(e,a,t){var o=a(e);return kUe(e)?o:FUe(o,t(e))}P9.exports=BUe});var TT=pt((Qhn,w9)=>{var RUe=wT(),NUe=Vv(),LUe=Dc();function VUe(e){return RUe(e,LUe,NUe)}w9.exports=VUe});var M9=pt((Jhn,T9)=>{var qUe=wT(),zUe=PT(),HUe=bp();function GUe(e){return qUe(e,HUe,zUe)}T9.exports=GUe});var E9=pt((Yhn,D9)=>{var jUe=xp(),$Ue=is(),UUe=jUe($Ue,"DataView");D9.exports=UUe});var O9=pt((Khn,I9)=>{var WUe=xp(),QUe=is(),JUe=WUe(QUe,"Promise");I9.exports=JUe});var MT=pt((Xhn,A9)=>{var YUe=xp(),KUe=is(),XUe=YUe(KUe,"Set");A9.exports=XUe});var k9=pt((Zhn,F9)=>{var ZUe=xp(),eWe=is(),tWe=ZUe(eWe,"WeakMap");F9.exports=tWe});var td=pt((egn,z9)=>{var DT=E9(),ET=Fv(),IT=O9(),OT=MT(),AT=k9(),q9=vp(),v0=hT(),B9="[object Map]",iWe="[object Object]",R9="[object Promise]",N9="[object Set]",L9="[object WeakMap]",V9="[object DataView]",nWe=v0(DT),oWe=v0(ET),aWe=v0(IT),rWe=v0(OT),lWe=v0(AT),ed=q9;(DT&&ed(new DT(new ArrayBuffer(1)))!=V9||ET&&ed(new ET)!=B9||IT&&ed(IT.resolve())!=R9||OT&&ed(new OT)!=N9||AT&&ed(new AT)!=L9)&&(ed=function(e){var a=q9(e),t=a==iWe?e.constructor:void 0,o=t?v0(t):"";if(o)switch(o){case nWe:return V9;case oWe:return B9;case aWe:return R9;case rWe:return N9;case lWe:return L9}return a});z9.exports=ed});var G9=pt((tgn,H9)=>{var sWe=Object.prototype,cWe=sWe.hasOwnProperty;function pWe(e){var a=e.length,t=new e.constructor(a);return a&&typeof e[0]=="string"&&cWe.call(e,"index")&&(t.index=e.index,t.input=e.input),t}H9.exports=pWe});var FT=pt((ign,j9)=>{var mWe=is(),dWe=mWe.Uint8Array;j9.exports=dWe});var zv=pt((ngn,U9)=>{var $9=FT();function uWe(e){var a=new e.constructor(e.byteLength);return new $9(a).set(new $9(e)),a}U9.exports=uWe});var Q9=pt((ogn,W9)=>{var fWe=zv();function hWe(e,a){var t=a?fWe(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}W9.exports=hWe});var Y9=pt((agn,J9)=>{var gWe=/\w*$/;function _We(e){var a=new e.constructor(e.source,gWe.exec(e));return a.lastIndex=e.lastIndex,a}J9.exports=_We});var tN=pt((rgn,eN)=>{var K9=Xm(),X9=K9?K9.prototype:void 0,Z9=X9?X9.valueOf:void 0;function CWe(e){return Z9?Object(Z9.call(e)):{}}eN.exports=CWe});var kT=pt((lgn,iN)=>{var vWe=zv();function xWe(e,a){var t=a?vWe(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}iN.exports=xWe});var oN=pt((sgn,nN)=>{var bWe=zv(),yWe=Q9(),SWe=Y9(),PWe=tN(),wWe=kT(),TWe="[object Boolean]",MWe="[object Date]",DWe="[object Map]",EWe="[object Number]",IWe="[object RegExp]",OWe="[object Set]",AWe="[object String]",FWe="[object Symbol]",kWe="[object ArrayBuffer]",BWe="[object DataView]",RWe="[object Float32Array]",NWe="[object Float64Array]",LWe="[object Int8Array]",VWe="[object Int16Array]",qWe="[object Int32Array]",zWe="[object Uint8Array]",HWe="[object Uint8ClampedArray]",GWe="[object Uint16Array]",jWe="[object Uint32Array]";function $We(e,a,t){var o=e.constructor;switch(a){case kWe:return bWe(e);case TWe:case MWe:return new o(+e);case BWe:return yWe(e,t);case RWe:case NWe:case LWe:case VWe:case qWe:case zWe:case HWe:case GWe:case jWe:return wWe(e,t);case DWe:return new o;case EWe:case AWe:return new o(e);case IWe:return SWe(e);case OWe:return new o;case FWe:return PWe(e)}}nN.exports=$We});var BT=pt((cgn,rN)=>{var UWe=Ml(),aN=Object.create,WWe=(function(){function e(){}return function(a){if(!UWe(a))return{};if(aN)return aN(a);e.prototype=a;var t=new e;return e.prototype=void 0,t}})();rN.exports=WWe});var RT=pt((pgn,lN)=>{var QWe=BT(),JWe=xf(),YWe=Cf();function KWe(e){return typeof e.constructor=="function"&&!YWe(e)?QWe(JWe(e)):{}}lN.exports=KWe});var cN=pt((mgn,sN)=>{var XWe=td(),ZWe=Es(),eQe="[object Map]";function tQe(e){return ZWe(e)&&XWe(e)==eQe}sN.exports=tQe});var uN=pt((dgn,dN)=>{var iQe=cN(),nQe=hf(),pN=Nv(),mN=pN&&pN.isMap,oQe=mN?nQe(mN):iQe;dN.exports=oQe});var hN=pt((ugn,fN)=>{var aQe=td(),rQe=Es(),lQe="[object Set]";function sQe(e){return rQe(e)&&aQe(e)==lQe}fN.exports=sQe});var vN=pt((fgn,CN)=>{var cQe=hN(),pQe=hf(),gN=Nv(),_N=gN&&gN.isSet,mQe=_N?pQe(_N):cQe;CN.exports=mQe});var NT=pt((hgn,SN)=>{var dQe=pf(),uQe=Bv(),fQe=df(),hQe=e9(),gQe=l9(),_Qe=xT(),CQe=bT(),vQe=C9(),xQe=S9(),bQe=TT(),yQe=M9(),SQe=td(),PQe=G9(),wQe=oN(),TQe=RT(),MQe=$a(),DQe=Zm(),EQe=uN(),IQe=Ml(),OQe=vN(),AQe=Dc(),FQe=bp(),kQe=1,BQe=2,RQe=4,xN="[object Arguments]",NQe="[object Array]",LQe="[object Boolean]",VQe="[object Date]",qQe="[object Error]",bN="[object Function]",zQe="[object GeneratorFunction]",HQe="[object Map]",GQe="[object Number]",yN="[object Object]",jQe="[object RegExp]",$Qe="[object Set]",UQe="[object String]",WQe="[object Symbol]",QQe="[object WeakMap]",JQe="[object ArrayBuffer]",YQe="[object DataView]",KQe="[object Float32Array]",XQe="[object Float64Array]",ZQe="[object Int8Array]",eJe="[object Int16Array]",tJe="[object Int32Array]",iJe="[object Uint8Array]",nJe="[object Uint8ClampedArray]",oJe="[object Uint16Array]",aJe="[object Uint32Array]",Ca={};Ca[xN]=Ca[NQe]=Ca[JQe]=Ca[YQe]=Ca[LQe]=Ca[VQe]=Ca[KQe]=Ca[XQe]=Ca[ZQe]=Ca[eJe]=Ca[tJe]=Ca[HQe]=Ca[GQe]=Ca[yN]=Ca[jQe]=Ca[$Qe]=Ca[UQe]=Ca[WQe]=Ca[iJe]=Ca[nJe]=Ca[oJe]=Ca[aJe]=!0;Ca[qQe]=Ca[bN]=Ca[QQe]=!1;function Hv(e,a,t,o,n,c){var d,u=a&kQe,g=a&BQe,v=a&RQe;if(t&&(d=n?t(e,o,n,c):t(e)),d!==void 0)return d;if(!IQe(e))return e;var C=MQe(e);if(C){if(d=PQe(e),!u)return CQe(e,d)}else{var b=SQe(e),P=b==bN||b==zQe;if(DQe(e))return _Qe(e,u);if(b==yN||b==xN||P&&!n){if(d=g||P?{}:TQe(e),!u)return g?xQe(e,gQe(d,e)):vQe(e,hQe(d,e))}else{if(!Ca[b])return n?e:{};d=wQe(e,b,u)}}c||(c=new dQe);var T=c.get(e);if(T)return T;c.set(e,d),OQe(e)?e.forEach(function(E){d.add(Hv(E,a,t,E,e,c))}):EQe(e)&&e.forEach(function(E,R){d.set(R,Hv(E,a,t,R,e,c))});var w=v?g?yQe:bQe:g?FQe:AQe,I=C?void 0:w(e);return uQe(I||e,function(E,R){I&&(R=E,E=e[R]),fQe(d,R,Hv(E,a,t,R,e,c))}),d}SN.exports=Hv});var wN=pt((ggn,PN)=>{var rJe=NT(),lJe=4;function sJe(e){return rJe(e,lJe)}PN.exports=sJe});var Gv=pt((_gn,TN)=>{function cJe(e){return function(){return e}}TN.exports=cJe});var DN=pt((Cgn,MN)=>{function pJe(e){return function(a,t,o){for(var n=-1,c=Object(a),d=o(a),u=d.length;u--;){var g=d[e?u:++n];if(t(c[g],g,c)===!1)break}return a}}MN.exports=pJe});var jv=pt((vgn,EN)=>{var mJe=DN(),dJe=mJe();EN.exports=dJe});var $v=pt((xgn,IN)=>{var uJe=jv(),fJe=Dc();function hJe(e,a){return e&&uJe(e,a,fJe)}IN.exports=hJe});var AN=pt((bgn,ON)=>{var gJe=tc();function _Je(e,a){return function(t,o){if(t==null)return t;if(!gJe(t))return e(t,o);for(var n=t.length,c=a?n:-1,d=Object(t);(a?c--:++c{var CJe=$v(),vJe=AN(),xJe=vJe(CJe);FN.exports=xJe});var yp=pt((Sgn,kN)=>{function bJe(e){return e}kN.exports=bJe});var LT=pt((Pgn,BN)=>{var yJe=yp();function SJe(e){return typeof e=="function"?e:yJe}BN.exports=SJe});var VT=pt((wgn,RN)=>{var PJe=Bv(),wJe=bf(),TJe=LT(),MJe=$a();function DJe(e,a){var t=MJe(e)?PJe:wJe;return t(e,TJe(a))}RN.exports=DJe});var qT=pt((Tgn,NN)=>{NN.exports=VT()});var VN=pt((Mgn,LN)=>{var EJe=bf();function IJe(e,a){var t=[];return EJe(e,function(o,n,c){a(o,n,c)&&t.push(o)}),t}LN.exports=IJe});var zN=pt((Dgn,qN)=>{var OJe="__lodash_hash_undefined__";function AJe(e){return this.__data__.set(e,OJe),this}qN.exports=AJe});var GN=pt((Egn,HN)=>{function FJe(e){return this.__data__.has(e)}HN.exports=FJe});var zT=pt((Ign,jN)=>{var kJe=kv(),BJe=zN(),RJe=GN();function Uv(e){var a=-1,t=e==null?0:e.length;for(this.__data__=new kJe;++a{function NJe(e,a){for(var t=-1,o=e==null?0:e.length;++t{function LJe(e,a){return e.has(a)}WN.exports=LJe});var GT=pt((Fgn,QN)=>{var VJe=zT(),qJe=UN(),zJe=HT(),HJe=1,GJe=2;function jJe(e,a,t,o,n,c){var d=t&HJe,u=e.length,g=a.length;if(u!=g&&!(d&&g>u))return!1;var v=c.get(e),C=c.get(a);if(v&&C)return v==a&&C==e;var b=-1,P=!0,T=t&GJe?new VJe:void 0;for(c.set(e,a),c.set(a,e);++b{function $Je(e){var a=-1,t=Array(e.size);return e.forEach(function(o,n){t[++a]=[n,o]}),t}JN.exports=$Je});var Wv=pt((Bgn,KN)=>{function UJe(e){var a=-1,t=Array(e.size);return e.forEach(function(o){t[++a]=o}),t}KN.exports=UJe});var iL=pt((Rgn,tL)=>{var XN=Xm(),ZN=FT(),WJe=Km(),QJe=GT(),JJe=YN(),YJe=Wv(),KJe=1,XJe=2,ZJe="[object Boolean]",eYe="[object Date]",tYe="[object Error]",iYe="[object Map]",nYe="[object Number]",oYe="[object RegExp]",aYe="[object Set]",rYe="[object String]",lYe="[object Symbol]",sYe="[object ArrayBuffer]",cYe="[object DataView]",eL=XN?XN.prototype:void 0,jT=eL?eL.valueOf:void 0;function pYe(e,a,t,o,n,c,d){switch(t){case cYe:if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case sYe:return!(e.byteLength!=a.byteLength||!c(new ZN(e),new ZN(a)));case ZJe:case eYe:case nYe:return WJe(+e,+a);case tYe:return e.name==a.name&&e.message==a.message;case oYe:case rYe:return e==a+"";case iYe:var u=JJe;case aYe:var g=o&KJe;if(u||(u=YJe),e.size!=a.size&&!g)return!1;var v=d.get(e);if(v)return v==a;o|=XJe,d.set(e,a);var C=QJe(u(e),u(a),o,n,c,d);return d.delete(e),C;case lYe:if(jT)return jT.call(e)==jT.call(a)}return!1}tL.exports=pYe});var aL=pt((Ngn,oL)=>{var nL=TT(),mYe=1,dYe=Object.prototype,uYe=dYe.hasOwnProperty;function fYe(e,a,t,o,n,c){var d=t&mYe,u=nL(e),g=u.length,v=nL(a),C=v.length;if(g!=C&&!d)return!1;for(var b=g;b--;){var P=u[b];if(!(d?P in a:uYe.call(a,P)))return!1}var T=c.get(e),w=c.get(a);if(T&&w)return T==a&&w==e;var I=!0;c.set(e,a),c.set(a,e);for(var E=d;++b{var $T=pf(),hYe=GT(),gYe=iL(),_Ye=aL(),rL=td(),lL=$a(),sL=Zm(),CYe=_0(),vYe=1,cL="[object Arguments]",pL="[object Array]",Qv="[object Object]",xYe=Object.prototype,mL=xYe.hasOwnProperty;function bYe(e,a,t,o,n,c){var d=lL(e),u=lL(a),g=d?pL:rL(e),v=u?pL:rL(a);g=g==cL?Qv:g,v=v==cL?Qv:v;var C=g==Qv,b=v==Qv,P=g==v;if(P&&sL(e)){if(!sL(a))return!1;d=!0,C=!1}if(P&&!C)return c||(c=new $T),d||CYe(e)?hYe(e,a,t,o,n,c):gYe(e,a,g,t,o,n,c);if(!(t&vYe)){var T=C&&mL.call(e,"__wrapped__"),w=b&&mL.call(a,"__wrapped__");if(T||w){var I=T?e.value():e,E=w?a.value():a;return c||(c=new $T),n(I,E,t,o,c)}}return P?(c||(c=new $T),_Ye(e,a,t,o,n,c)):!1}dL.exports=bYe});var UT=pt((Vgn,gL)=>{var yYe=uL(),fL=Es();function hL(e,a,t,o,n){return e===a?!0:e==null||a==null||!fL(e)&&!fL(a)?e!==e&&a!==a:yYe(e,a,t,o,hL,n)}gL.exports=hL});var CL=pt((qgn,_L)=>{var SYe=pf(),PYe=UT(),wYe=1,TYe=2;function MYe(e,a,t,o){var n=t.length,c=n,d=!o;if(e==null)return!c;for(e=Object(e);n--;){var u=t[n];if(d&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++n{var DYe=Ml();function EYe(e){return e===e&&!DYe(e)}vL.exports=EYe});var bL=pt((Hgn,xL)=>{var IYe=WT(),OYe=Dc();function AYe(e){for(var a=OYe(e),t=a.length;t--;){var o=a[t],n=e[o];a[t]=[o,n,IYe(n)]}return a}xL.exports=AYe});var QT=pt((Ggn,yL)=>{function FYe(e,a){return function(t){return t==null?!1:t[e]===a&&(a!==void 0||e in Object(t))}}yL.exports=FYe});var PL=pt((jgn,SL)=>{var kYe=CL(),BYe=bL(),RYe=QT();function NYe(e){var a=BYe(e);return a.length==1&&a[0][2]?RYe(a[0][0],a[0][1]):function(t){return t===e||kYe(t,e,a)}}SL.exports=NYe});var id=pt(($gn,wL)=>{var LYe=vp(),VYe=Es(),qYe="[object Symbol]";function zYe(e){return typeof e=="symbol"||VYe(e)&&LYe(e)==qYe}wL.exports=zYe});var Jv=pt((Ugn,TL)=>{var HYe=$a(),GYe=id(),jYe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$Ye=/^\w*$/;function UYe(e,a){if(HYe(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||GYe(e)?!0:$Ye.test(e)||!jYe.test(e)||a!=null&&e in Object(a)}TL.exports=UYe});var EL=pt((Wgn,DL)=>{var ML=kv(),WYe="Expected a function";function JT(e,a){if(typeof e!="function"||a!=null&&typeof a!="function")throw new TypeError(WYe);var t=function(){var o=arguments,n=a?a.apply(this,o):o[0],c=t.cache;if(c.has(n))return c.get(n);var d=e.apply(this,o);return t.cache=c.set(n,d)||c,d};return t.cache=new(JT.Cache||ML),t}JT.Cache=ML;DL.exports=JT});var OL=pt((Qgn,IL)=>{var QYe=EL(),JYe=500;function YYe(e){var a=QYe(e,function(o){return t.size===JYe&&t.clear(),o}),t=a.cache;return a}IL.exports=YYe});var FL=pt((Jgn,AL)=>{var KYe=OL(),XYe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZYe=/\\(\\)?/g,eKe=KYe(function(e){var a=[];return e.charCodeAt(0)===46&&a.push(""),e.replace(XYe,function(t,o,n,c){a.push(n?c.replace(ZYe,"$1"):o||t)}),a});AL.exports=eKe});var yf=pt((Ygn,kL)=>{function tKe(e,a){for(var t=-1,o=e==null?0:e.length,n=Array(o);++t{var BL=Xm(),iKe=yf(),nKe=$a(),oKe=id(),aKe=1/0,RL=BL?BL.prototype:void 0,NL=RL?RL.toString:void 0;function LL(e){if(typeof e=="string")return e;if(nKe(e))return iKe(e,LL)+"";if(oKe(e))return NL?NL.call(e):"";var a=e+"";return a=="0"&&1/e==-aKe?"-0":a}VL.exports=LL});var YT=pt((Xgn,zL)=>{var rKe=qL();function lKe(e){return e==null?"":rKe(e)}zL.exports=lKe});var Sf=pt((Zgn,HL)=>{var sKe=$a(),cKe=Jv(),pKe=FL(),mKe=YT();function dKe(e,a){return sKe(e)?e:cKe(e,a)?[e]:pKe(mKe(e))}HL.exports=dKe});var x0=pt((e_n,GL)=>{var uKe=id(),fKe=1/0;function hKe(e){if(typeof e=="string"||uKe(e))return e;var a=e+"";return a=="0"&&1/e==-fKe?"-0":a}GL.exports=hKe});var Pf=pt((t_n,jL)=>{var gKe=Sf(),_Ke=x0();function CKe(e,a){a=gKe(a,e);for(var t=0,o=a.length;e!=null&&t{var vKe=Pf();function xKe(e,a,t){var o=e==null?void 0:vKe(e,a);return o===void 0?t:o}$L.exports=xKe});var QL=pt((n_n,WL)=>{function bKe(e,a){return e!=null&&a in Object(e)}WL.exports=bKe});var KT=pt((o_n,JL)=>{var yKe=Sf(),SKe=f0(),PKe=$a(),wKe=ff(),TKe=Rv(),MKe=x0();function DKe(e,a,t){a=yKe(a,e);for(var o=-1,n=a.length,c=!1;++o{var EKe=QL(),IKe=KT();function OKe(e,a){return e!=null&&IKe(e,a,EKe)}YL.exports=OKe});var XL=pt((r_n,KL)=>{var AKe=UT(),FKe=UL(),kKe=XT(),BKe=Jv(),RKe=WT(),NKe=QT(),LKe=x0(),VKe=1,qKe=2;function zKe(e,a){return BKe(e)&&RKe(a)?NKe(LKe(e),a):function(t){var o=FKe(t,e);return o===void 0&&o===a?kKe(t,e):AKe(a,o,VKe|qKe)}}KL.exports=zKe});var ZT=pt((l_n,ZL)=>{function HKe(e){return function(a){return a?.[e]}}ZL.exports=HKe});var tV=pt((s_n,eV)=>{var GKe=Pf();function jKe(e){return function(a){return GKe(a,e)}}eV.exports=jKe});var nV=pt((c_n,iV)=>{var $Ke=ZT(),UKe=tV(),WKe=Jv(),QKe=x0();function JKe(e){return WKe(e)?$Ke(QKe(e)):UKe(e)}iV.exports=JKe});var ic=pt((p_n,oV)=>{var YKe=PL(),KKe=XL(),XKe=yp(),ZKe=$a(),eXe=nV();function tXe(e){return typeof e=="function"?e:e==null?XKe:typeof e=="object"?ZKe(e)?KKe(e[0],e[1]):YKe(e):eXe(e)}oV.exports=tXe});var eM=pt((m_n,aV)=>{var iXe=yT(),nXe=VN(),oXe=ic(),aXe=$a();function rXe(e,a){var t=aXe(e)?iXe:nXe;return t(e,oXe(a,3))}aV.exports=rXe});var lV=pt((d_n,rV)=>{var lXe=Object.prototype,sXe=lXe.hasOwnProperty;function cXe(e,a){return e!=null&&sXe.call(e,a)}rV.exports=cXe});var tM=pt((u_n,sV)=>{var pXe=lV(),mXe=KT();function dXe(e,a){return e!=null&&mXe(e,a,pXe)}sV.exports=dXe});var pV=pt((f_n,cV)=>{var uXe=Lv(),fXe=td(),hXe=f0(),gXe=$a(),_Xe=tc(),CXe=Zm(),vXe=Cf(),xXe=_0(),bXe="[object Map]",yXe="[object Set]",SXe=Object.prototype,PXe=SXe.hasOwnProperty;function wXe(e){if(e==null)return!0;if(_Xe(e)&&(gXe(e)||typeof e=="string"||typeof e.splice=="function"||CXe(e)||xXe(e)||hXe(e)))return!e.length;var a=fXe(e);if(a==bXe||a==yXe)return!e.size;if(vXe(e))return!uXe(e).length;for(var t in e)if(PXe.call(e,t))return!1;return!0}cV.exports=wXe});var iM=pt((h_n,mV)=>{function TXe(e){return e===void 0}mV.exports=TXe});var nM=pt((g_n,dV)=>{var MXe=bf(),DXe=tc();function EXe(e,a){var t=-1,o=DXe(e)?Array(e.length):[];return MXe(e,function(n,c,d){o[++t]=a(n,c,d)}),o}dV.exports=EXe});var oM=pt((__n,uV)=>{var IXe=yf(),OXe=ic(),AXe=nM(),FXe=$a();function kXe(e,a){var t=FXe(e)?IXe:AXe;return t(e,OXe(a,3))}uV.exports=kXe});var hV=pt((C_n,fV)=>{function BXe(e,a,t,o){var n=-1,c=e==null?0:e.length;for(o&&c&&(t=e[++n]);++n{function RXe(e,a,t,o,n){return n(e,function(c,d,u){t=o?(o=!1,c):a(t,c,d,u)}),t}gV.exports=RXe});var aM=pt((x_n,CV)=>{var NXe=hV(),LXe=bf(),VXe=ic(),qXe=_V(),zXe=$a();function HXe(e,a,t){var o=zXe(e)?NXe:qXe,n=arguments.length<3;return o(e,VXe(a,4),t,n,LXe)}CV.exports=HXe});var xV=pt((b_n,vV)=>{var GXe=vp(),jXe=$a(),$Xe=Es(),UXe="[object String]";function WXe(e){return typeof e=="string"||!jXe(e)&&$Xe(e)&&GXe(e)==UXe}vV.exports=WXe});var yV=pt((y_n,bV)=>{var QXe=ZT(),JXe=QXe("length");bV.exports=JXe});var PV=pt((S_n,SV)=>{var YXe="\\ud800-\\udfff",KXe="\\u0300-\\u036f",XXe="\\ufe20-\\ufe2f",ZXe="\\u20d0-\\u20ff",eZe=KXe+XXe+ZXe,tZe="\\ufe0e\\ufe0f",iZe="\\u200d",nZe=RegExp("["+iZe+YXe+eZe+tZe+"]");function oZe(e){return nZe.test(e)}SV.exports=oZe});var FV=pt((P_n,AV)=>{var TV="\\ud800-\\udfff",aZe="\\u0300-\\u036f",rZe="\\ufe20-\\ufe2f",lZe="\\u20d0-\\u20ff",sZe=aZe+rZe+lZe,cZe="\\ufe0e\\ufe0f",pZe="["+TV+"]",rM="["+sZe+"]",lM="\\ud83c[\\udffb-\\udfff]",mZe="(?:"+rM+"|"+lM+")",MV="[^"+TV+"]",DV="(?:\\ud83c[\\udde6-\\uddff]){2}",EV="[\\ud800-\\udbff][\\udc00-\\udfff]",dZe="\\u200d",IV=mZe+"?",OV="["+cZe+"]?",uZe="(?:"+dZe+"(?:"+[MV,DV,EV].join("|")+")"+OV+IV+")*",fZe=OV+IV+uZe,hZe="(?:"+[MV+rM+"?",rM,DV,EV,pZe].join("|")+")",wV=RegExp(lM+"(?="+lM+")|"+hZe+fZe,"g");function gZe(e){for(var a=wV.lastIndex=0;wV.test(e);)++a;return a}AV.exports=gZe});var BV=pt((w_n,kV)=>{var _Ze=yV(),CZe=PV(),vZe=FV();function xZe(e){return CZe(e)?vZe(e):_Ze(e)}kV.exports=xZe});var NV=pt((T_n,RV)=>{var bZe=Lv(),yZe=td(),SZe=tc(),PZe=xV(),wZe=BV(),TZe="[object Map]",MZe="[object Set]";function DZe(e){if(e==null)return 0;if(SZe(e))return PZe(e)?wZe(e):e.length;var a=yZe(e);return a==TZe||a==MZe?e.size:bZe(e).length}RV.exports=DZe});var VV=pt((M_n,LV)=>{var EZe=Bv(),IZe=BT(),OZe=$v(),AZe=ic(),FZe=xf(),kZe=$a(),BZe=Zm(),RZe=c0(),NZe=Ml(),LZe=_0();function VZe(e,a,t){var o=kZe(e),n=o||BZe(e)||LZe(e);if(a=AZe(a,4),t==null){var c=e&&e.constructor;n?t=o?new c:[]:NZe(e)?t=RZe(c)?IZe(FZe(e)):{}:t={}}return(n?EZe:OZe)(e,function(d,u,g){return a(t,d,u,g)}),t}LV.exports=VZe});var GV=pt((D_n,HV)=>{var qV=Xm(),qZe=f0(),zZe=$a(),zV=qV?qV.isConcatSpreadable:void 0;function HZe(e){return zZe(e)||qZe(e)||!!(zV&&e&&e[zV])}HV.exports=HZe});var Yv=pt((E_n,$V)=>{var GZe=qv(),jZe=GV();function jV(e,a,t,o,n){var c=-1,d=e.length;for(t||(t=jZe),n||(n=[]);++c0&&t(u)?a>1?jV(u,a-1,t,o,n):GZe(n,u):o||(n[n.length]=u)}return n}$V.exports=jV});var WV=pt((I_n,UV)=>{function $Ze(e,a,t){switch(t.length){case 0:return e.call(a);case 1:return e.call(a,t[0]);case 2:return e.call(a,t[0],t[1]);case 3:return e.call(a,t[0],t[1],t[2])}return e.apply(a,t)}UV.exports=$Ze});var sM=pt((O_n,JV)=>{var UZe=WV(),QV=Math.max;function WZe(e,a,t){return a=QV(a===void 0?e.length-1:a,0),function(){for(var o=arguments,n=-1,c=QV(o.length-a,0),d=Array(c);++n{var QZe=Gv(),YV=gT(),JZe=yp(),YZe=YV?function(e,a){return YV(e,"toString",{configurable:!0,enumerable:!1,value:QZe(a),writable:!0})}:JZe;KV.exports=YZe});var eq=pt((F_n,ZV)=>{var KZe=800,XZe=16,ZZe=Date.now;function eet(e){var a=0,t=0;return function(){var o=ZZe(),n=XZe-(o-t);if(t=o,n>0){if(++a>=KZe)return arguments[0]}else a=0;return e.apply(void 0,arguments)}}ZV.exports=eet});var cM=pt((k_n,tq)=>{var tet=XV(),iet=eq(),net=iet(tet);tq.exports=net});var wf=pt((B_n,iq)=>{var oet=yp(),aet=sM(),ret=cM();function set(e,a){return ret(aet(e,a,oet),e+"")}iq.exports=set});var pM=pt((R_n,nq)=>{function cet(e,a,t,o){for(var n=e.length,c=t+(o?1:-1);o?c--:++c{function pet(e){return e!==e}oq.exports=pet});var lq=pt((L_n,rq)=>{function met(e,a,t){for(var o=t-1,n=e.length;++o{var det=pM(),uet=aq(),fet=lq();function het(e,a,t){return a===a?fet(e,a,t):det(e,uet,t)}sq.exports=het});var mq=pt((q_n,pq)=>{var get=cq();function _et(e,a){var t=e==null?0:e.length;return!!t&&get(e,a,0)>-1}pq.exports=_et});var uq=pt((z_n,dq)=>{function Cet(e,a,t){for(var o=-1,n=e==null?0:e.length;++o{function vet(){}fq.exports=vet});var _q=pt((G_n,gq)=>{var mM=MT(),xet=hq(),bet=Wv(),yet=1/0,Pet=mM&&1/bet(new mM([,-0]))[1]==yet?function(e){return new mM(e)}:xet;gq.exports=Pet});var vq=pt((j_n,Cq)=>{var wet=zT(),Tet=mq(),Met=uq(),Det=HT(),Eet=_q(),Iet=Wv(),Oet=200;function Aet(e,a,t){var o=-1,n=Tet,c=e.length,d=!0,u=[],g=u;if(t)d=!1,n=Met;else if(c>=Oet){var v=a?null:Eet(e);if(v)return Iet(v);d=!1,n=Det,g=new wet}else g=a?[]:u;e:for(;++o{var Fet=tc(),ket=Es();function Bet(e){return ket(e)&&Fet(e)}xq.exports=Bet});var yq=pt((U_n,bq)=>{var Ret=Yv(),Net=wf(),Let=vq(),Vet=dM(),qet=Net(function(e){return Let(Ret(e,1,Vet,!0))});bq.exports=qet});var Pq=pt((W_n,Sq)=>{var zet=yf();function Het(e,a){return zet(a,function(t){return e[t]})}Sq.exports=Het});var uM=pt((Q_n,wq)=>{var Get=Pq(),jet=Dc();function $et(e){return e==null?[]:Get(e,jet(e))}wq.exports=$et});var Dl=pt((J_n,Tq)=>{var Kv;if(typeof gs=="function")try{Kv={clone:wN(),constant:Gv(),each:qT(),filter:eM(),has:tM(),isArray:$a(),isEmpty:pV(),isFunction:c0(),isUndefined:iM(),keys:Dc(),map:oM(),reduce:aM(),size:NV(),transform:VV(),union:yq(),values:uM()}}catch{}Kv||(Kv=window._);Tq.exports=Kv});var Xv=pt((K_n,Iq)=>{"use strict";var ao=Dl();Iq.exports=So;var Uet="\0",nd="\0",Mq="";function So(e){this._isDirected=ao.has(e,"directed")?e.directed:!0,this._isMultigraph=ao.has(e,"multigraph")?e.multigraph:!1,this._isCompound=ao.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ao.constant(void 0),this._defaultEdgeLabelFn=ao.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[nd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}So.prototype._nodeCount=0;So.prototype._edgeCount=0;So.prototype.isDirected=function(){return this._isDirected};So.prototype.isMultigraph=function(){return this._isMultigraph};So.prototype.isCompound=function(){return this._isCompound};So.prototype.setGraph=function(e){return this._label=e,this};So.prototype.graph=function(){return this._label};So.prototype.setDefaultNodeLabel=function(e){return ao.isFunction(e)||(e=ao.constant(e)),this._defaultNodeLabelFn=e,this};So.prototype.nodeCount=function(){return this._nodeCount};So.prototype.nodes=function(){return ao.keys(this._nodes)};So.prototype.sources=function(){var e=this;return ao.filter(this.nodes(),function(a){return ao.isEmpty(e._in[a])})};So.prototype.sinks=function(){var e=this;return ao.filter(this.nodes(),function(a){return ao.isEmpty(e._out[a])})};So.prototype.setNodes=function(e,a){var t=arguments,o=this;return ao.each(e,function(n){t.length>1?o.setNode(n,a):o.setNode(n)}),this};So.prototype.setNode=function(e,a){return ao.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=a),this):(this._nodes[e]=arguments.length>1?a:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=nd,this._children[e]={},this._children[nd][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};So.prototype.node=function(e){return this._nodes[e]};So.prototype.hasNode=function(e){return ao.has(this._nodes,e)};So.prototype.removeNode=function(e){var a=this;if(ao.has(this._nodes,e)){var t=function(o){a.removeEdge(a._edgeObjs[o])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],ao.each(this.children(e),function(o){a.setParent(o)}),delete this._children[e]),ao.each(ao.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],ao.each(ao.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};So.prototype.setParent=function(e,a){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ao.isUndefined(a))a=nd;else{a+="";for(var t=a;!ao.isUndefined(t);t=this.parent(t))if(t===e)throw new Error("Setting "+a+" as parent of "+e+" would create a cycle");this.setNode(a)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=a,this._children[a][e]=!0,this};So.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};So.prototype.parent=function(e){if(this._isCompound){var a=this._parent[e];if(a!==nd)return a}};So.prototype.children=function(e){if(ao.isUndefined(e)&&(e=nd),this._isCompound){var a=this._children[e];if(a)return ao.keys(a)}else{if(e===nd)return this.nodes();if(this.hasNode(e))return[]}};So.prototype.predecessors=function(e){var a=this._preds[e];if(a)return ao.keys(a)};So.prototype.successors=function(e){var a=this._sucs[e];if(a)return ao.keys(a)};So.prototype.neighbors=function(e){var a=this.predecessors(e);if(a)return ao.union(a,this.successors(e))};So.prototype.isLeaf=function(e){var a;return this.isDirected()?a=this.successors(e):a=this.neighbors(e),a.length===0};So.prototype.filterNodes=function(e){var a=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});a.setGraph(this.graph());var t=this;ao.each(this._nodes,function(c,d){e(d)&&a.setNode(d,c)}),ao.each(this._edgeObjs,function(c){a.hasNode(c.v)&&a.hasNode(c.w)&&a.setEdge(c,t.edge(c))});var o={};function n(c){var d=t.parent(c);return d===void 0||a.hasNode(d)?(o[c]=d,d):d in o?o[d]:n(d)}return this._isCompound&&ao.each(a.nodes(),function(c){a.setParent(c,n(c))}),a};So.prototype.setDefaultEdgeLabel=function(e){return ao.isFunction(e)||(e=ao.constant(e)),this._defaultEdgeLabelFn=e,this};So.prototype.edgeCount=function(){return this._edgeCount};So.prototype.edges=function(){return ao.values(this._edgeObjs)};So.prototype.setPath=function(e,a){var t=this,o=arguments;return ao.reduce(e,function(n,c){return o.length>1?t.setEdge(n,c,a):t.setEdge(n,c),c}),this};So.prototype.setEdge=function(){var e,a,t,o,n=!1,c=arguments[0];typeof c=="object"&&c!==null&&"v"in c?(e=c.v,a=c.w,t=c.name,arguments.length===2&&(o=arguments[1],n=!0)):(e=c,a=arguments[1],t=arguments[3],arguments.length>2&&(o=arguments[2],n=!0)),e=""+e,a=""+a,ao.isUndefined(t)||(t=""+t);var d=Tf(this._isDirected,e,a,t);if(ao.has(this._edgeLabels,d))return n&&(this._edgeLabels[d]=o),this;if(!ao.isUndefined(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(a),this._edgeLabels[d]=n?o:this._defaultEdgeLabelFn(e,a,t);var u=Wet(this._isDirected,e,a,t);return e=u.v,a=u.w,Object.freeze(u),this._edgeObjs[d]=u,Dq(this._preds[a],e),Dq(this._sucs[e],a),this._in[a][d]=u,this._out[e][d]=u,this._edgeCount++,this};So.prototype.edge=function(e,a,t){var o=arguments.length===1?fM(this._isDirected,arguments[0]):Tf(this._isDirected,e,a,t);return this._edgeLabels[o]};So.prototype.hasEdge=function(e,a,t){var o=arguments.length===1?fM(this._isDirected,arguments[0]):Tf(this._isDirected,e,a,t);return ao.has(this._edgeLabels,o)};So.prototype.removeEdge=function(e,a,t){var o=arguments.length===1?fM(this._isDirected,arguments[0]):Tf(this._isDirected,e,a,t),n=this._edgeObjs[o];return n&&(e=n.v,a=n.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Eq(this._preds[a],e),Eq(this._sucs[e],a),delete this._in[a][o],delete this._out[e][o],this._edgeCount--),this};So.prototype.inEdges=function(e,a){var t=this._in[e];if(t){var o=ao.values(t);return a?ao.filter(o,function(n){return n.v===a}):o}};So.prototype.outEdges=function(e,a){var t=this._out[e];if(t){var o=ao.values(t);return a?ao.filter(o,function(n){return n.w===a}):o}};So.prototype.nodeEdges=function(e,a){var t=this.inEdges(e,a);if(t)return t.concat(this.outEdges(e,a))};function Dq(e,a){e[a]?e[a]++:e[a]=1}function Eq(e,a){--e[a]||delete e[a]}function Tf(e,a,t,o){var n=""+a,c=""+t;if(!e&&n>c){var d=n;n=c,c=d}return n+Mq+c+Mq+(ao.isUndefined(o)?Uet:o)}function Wet(e,a,t,o){var n=""+a,c=""+t;if(!e&&n>c){var d=n;n=c,c=d}var u={v:n,w:c};return o&&(u.name=o),u}function fM(e,a){return Tf(e,a.v,a.w,a.name)}});var Aq=pt((X_n,Oq)=>{Oq.exports="2.1.8"});var kq=pt((Z_n,Fq)=>{Fq.exports={Graph:Xv(),version:Aq()}});var Rq=pt((eCn,Bq)=>{var nc=Dl(),Qet=Xv();Bq.exports={write:Jet,read:Xet};function Jet(e){var a={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Yet(e),edges:Ket(e)};return nc.isUndefined(e.graph())||(a.value=nc.clone(e.graph())),a}function Yet(e){return nc.map(e.nodes(),function(a){var t=e.node(a),o=e.parent(a),n={v:a};return nc.isUndefined(t)||(n.value=t),nc.isUndefined(o)||(n.parent=o),n})}function Ket(e){return nc.map(e.edges(),function(a){var t=e.edge(a),o={v:a.v,w:a.w};return nc.isUndefined(a.name)||(o.name=a.name),nc.isUndefined(t)||(o.value=t),o})}function Xet(e){var a=new Qet(e.options).setGraph(e.value);return nc.each(e.nodes,function(t){a.setNode(t.v,t.value),t.parent&&a.setParent(t.v,t.parent)}),nc.each(e.edges,function(t){a.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),a}});var Lq=pt((tCn,Nq)=>{var Zv=Dl();Nq.exports=Zet;function Zet(e){var a={},t=[],o;function n(c){Zv.has(a,c)||(a[c]=!0,o.push(c),Zv.each(e.successors(c),n),Zv.each(e.predecessors(c),n))}return Zv.each(e.nodes(),function(c){o=[],n(c),o.length&&t.push(o)}),t}});var hM=pt((iCn,qq)=>{var Vq=Dl();qq.exports=ns;function ns(){this._arr=[],this._keyIndices={}}ns.prototype.size=function(){return this._arr.length};ns.prototype.keys=function(){return this._arr.map(function(e){return e.key})};ns.prototype.has=function(e){return Vq.has(this._keyIndices,e)};ns.prototype.priority=function(e){var a=this._keyIndices[e];if(a!==void 0)return this._arr[a].priority};ns.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};ns.prototype.add=function(e,a){var t=this._keyIndices;if(e=String(e),!Vq.has(t,e)){var o=this._arr,n=o.length;return t[e]=n,o.push({key:e,priority:a}),this._decrease(n),!0}return!1};ns.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};ns.prototype.decrease=function(e,a){var t=this._keyIndices[e];if(a>this._arr[t].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[t].priority+" New: "+a);this._arr[t].priority=a,this._decrease(t)};ns.prototype._heapify=function(e){var a=this._arr,t=2*e,o=t+1,n=e;t>1,!(a[o].priority{var ett=Dl(),ttt=hM();zq.exports=ntt;var itt=ett.constant(1);function ntt(e,a,t,o){return ott(e,String(a),t||itt,o||function(n){return e.outEdges(n)})}function ott(e,a,t,o){var n={},c=new ttt,d,u,g=function(v){var C=v.v!==d?v.v:v.w,b=n[C],P=t(v),T=u.distance+P;if(P<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+v+" Weight: "+P);T0&&(d=c.removeMin(),u=n[d],u.distance!==Number.POSITIVE_INFINITY);)o(d).forEach(g);return n}});var Gq=pt((oCn,Hq)=>{var att=gM(),rtt=Dl();Hq.exports=ltt;function ltt(e,a,t){return rtt.transform(e.nodes(),function(o,n){o[n]=att(e,n,a,t)},{})}});var _M=pt((aCn,$q)=>{var jq=Dl();$q.exports=stt;function stt(e){var a=0,t=[],o={},n=[];function c(d){var u=o[d]={onStack:!0,lowlink:a,index:a++};if(t.push(d),e.successors(d).forEach(function(C){jq.has(o,C)?o[C].onStack&&(u.lowlink=Math.min(u.lowlink,o[C].index)):(c(C),u.lowlink=Math.min(u.lowlink,o[C].lowlink))}),u.lowlink===u.index){var g=[],v;do v=t.pop(),o[v].onStack=!1,g.push(v);while(d!==v);n.push(g)}}return e.nodes().forEach(function(d){jq.has(o,d)||c(d)}),n}});var Wq=pt((rCn,Uq)=>{var ctt=Dl(),ptt=_M();Uq.exports=mtt;function mtt(e){return ctt.filter(ptt(e),function(a){return a.length>1||a.length===1&&e.hasEdge(a[0],a[0])})}});var Jq=pt((lCn,Qq)=>{var dtt=Dl();Qq.exports=ftt;var utt=dtt.constant(1);function ftt(e,a,t){return htt(e,a||utt,t||function(o){return e.outEdges(o)})}function htt(e,a,t){var o={},n=e.nodes();return n.forEach(function(c){o[c]={},o[c][c]={distance:0},n.forEach(function(d){c!==d&&(o[c][d]={distance:Number.POSITIVE_INFINITY})}),t(c).forEach(function(d){var u=d.v===c?d.w:d.v,g=a(d);o[c][u]={distance:g,predecessor:c}})}),n.forEach(function(c){var d=o[c];n.forEach(function(u){var g=o[u];n.forEach(function(v){var C=g[c],b=d[v],P=g[v],T=C.distance+b.distance;T{var Mf=Dl();Kq.exports=Yq;Yq.CycleException=ex;function Yq(e){var a={},t={},o=[];function n(c){if(Mf.has(t,c))throw new ex;Mf.has(a,c)||(t[c]=!0,a[c]=!0,Mf.each(e.predecessors(c),n),delete t[c],o.push(c))}if(Mf.each(e.sinks(),n),Mf.size(a)!==e.nodeCount())throw new ex;return o}function ex(){}ex.prototype=new Error});var ez=pt((cCn,Zq)=>{var Xq=CM();Zq.exports=gtt;function gtt(e){try{Xq(e)}catch(a){if(a instanceof Xq.CycleException)return!1;throw a}return!0}});var vM=pt((pCn,iz)=>{var tx=Dl();iz.exports=_tt;function _tt(e,a,t){tx.isArray(a)||(a=[a]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],c={};return tx.each(a,function(d){if(!e.hasNode(d))throw new Error("Graph does not have node: "+d);tz(e,d,t==="post",c,o,n)}),n}function tz(e,a,t,o,n,c){tx.has(o,a)||(o[a]=!0,t||c.push(a),tx.each(n(a),function(d){tz(e,d,t,o,n,c)}),t&&c.push(a))}});var oz=pt((mCn,nz)=>{var Ctt=vM();nz.exports=vtt;function vtt(e,a){return Ctt(e,a,"post")}});var rz=pt((dCn,az)=>{var xtt=vM();az.exports=btt;function btt(e,a){return xtt(e,a,"pre")}});var cz=pt((uCn,sz)=>{var lz=Dl(),ytt=Xv(),Stt=hM();sz.exports=Ptt;function Ptt(e,a){var t=new ytt,o={},n=new Stt,c;function d(g){var v=g.v===c?g.w:g.v,C=n.priority(v);if(C!==void 0){var b=a(g);b0;){if(c=n.removeMin(),lz.has(o,c))t.setEdge(c,o[c]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(c).forEach(d)}return t}});var mz=pt((fCn,pz)=>{pz.exports={components:Lq(),dijkstra:gM(),dijkstraAll:Gq(),findCycles:Wq(),floydWarshall:Jq(),isAcyclic:ez(),postorder:oz(),preorder:rz(),prim:cz(),tarjan:_M(),topsort:CM()}});var fz=pt((hCn,uz)=>{var dz=kq();uz.exports={Graph:dz.Graph,json:Rq(),alg:mz(),version:dz.version}});var os=pt((gCn,hz)=>{var ix;if(typeof gs=="function")try{ix=fz()}catch{}ix||(ix=window.graphlib);hz.exports=ix});var _z=pt((CCn,gz)=>{var wtt=NT(),Ttt=1,Mtt=4;function Dtt(e){return wtt(e,Ttt|Mtt)}gz.exports=Dtt});var Df=pt((vCn,Cz)=>{var Ett=Km(),Itt=tc(),Ott=ff(),Att=Ml();function Ftt(e,a,t){if(!Att(t))return!1;var o=typeof a;return(o=="number"?Itt(t)&&Ott(a,t.length):o=="string"&&a in t)?Ett(t[a],e):!1}Cz.exports=Ftt});var bz=pt((xCn,xz)=>{var ktt=wf(),Btt=Km(),Rtt=Df(),Ntt=bp(),vz=Object.prototype,Ltt=vz.hasOwnProperty,Vtt=ktt(function(e,a){e=Object(e);var t=-1,o=a.length,n=o>2?a[2]:void 0;for(n&&Rtt(a[0],a[1],n)&&(o=1);++t{var qtt=ic(),ztt=tc(),Htt=Dc();function Gtt(e){return function(a,t,o){var n=Object(a);if(!ztt(a)){var c=qtt(t,3);a=Htt(a),t=function(u){return c(n[u],u,n)}}var d=e(a,t,o);return d>-1?n[c?a[d]:d]:void 0}}yz.exports=Gtt});var wz=pt((yCn,Pz)=>{var jtt=/\s/;function $tt(e){for(var a=e.length;a--&&jtt.test(e.charAt(a)););return a}Pz.exports=$tt});var Mz=pt((SCn,Tz)=>{var Utt=wz(),Wtt=/^\s+/;function Qtt(e){return e&&e.slice(0,Utt(e)+1).replace(Wtt,"")}Tz.exports=Qtt});var Oz=pt((PCn,Iz)=>{var Jtt=Mz(),Dz=Ml(),Ytt=id(),Ez=NaN,Ktt=/^[-+]0x[0-9a-f]+$/i,Xtt=/^0b[01]+$/i,Ztt=/^0o[0-7]+$/i,eit=parseInt;function tit(e){if(typeof e=="number")return e;if(Ytt(e))return Ez;if(Dz(e)){var a=typeof e.valueOf=="function"?e.valueOf():e;e=Dz(a)?a+"":a}if(typeof e!="string")return e===0?e:+e;e=Jtt(e);var t=Xtt.test(e);return t||Ztt.test(e)?eit(e.slice(2),t?2:8):Ktt.test(e)?Ez:+e}Iz.exports=tit});var xM=pt((wCn,Fz)=>{var iit=Oz(),Az=1/0,nit=17976931348623157e292;function oit(e){if(!e)return e===0?e:0;if(e=iit(e),e===Az||e===-Az){var a=e<0?-1:1;return a*nit}return e===e?e:0}Fz.exports=oit});var Bz=pt((TCn,kz)=>{var ait=xM();function rit(e){var a=ait(e),t=a%1;return a===a?t?a-t:a:0}kz.exports=rit});var Nz=pt((MCn,Rz)=>{var lit=pM(),sit=ic(),cit=Bz(),pit=Math.max;function mit(e,a,t){var o=e==null?0:e.length;if(!o)return-1;var n=t==null?0:cit(t);return n<0&&(n=pit(o+n,0)),lit(e,sit(a,3),n)}Rz.exports=mit});var Vz=pt((DCn,Lz)=>{var dit=Sz(),uit=Nz(),fit=dit(uit);Lz.exports=fit});var bM=pt((ECn,qz)=>{var hit=Yv();function git(e){var a=e==null?0:e.length;return a?hit(e,1):[]}qz.exports=git});var Hz=pt((ICn,zz)=>{var _it=jv(),Cit=LT(),vit=bp();function xit(e,a){return e==null?e:_it(e,Cit(a),vit)}zz.exports=xit});var jz=pt((OCn,Gz)=>{function bit(e){var a=e==null?0:e.length;return a?e[a-1]:void 0}Gz.exports=bit});var Uz=pt((ACn,$z)=>{var yit=mf(),Sit=$v(),Pit=ic();function wit(e,a){var t={};return a=Pit(a,3),Sit(e,function(o,n,c){yit(t,n,a(o,n,c))}),t}$z.exports=wit});var nx=pt((FCn,Wz)=>{var Tit=id();function Mit(e,a,t){for(var o=-1,n=e.length;++o{function Dit(e,a){return e>a}Qz.exports=Dit});var Kz=pt((BCn,Yz)=>{var Eit=nx(),Iit=Jz(),Oit=yp();function Ait(e){return e&&e.length?Eit(e,Oit,Iit):void 0}Yz.exports=Ait});var yM=pt((RCn,Xz)=>{var Fit=mf(),kit=Km();function Bit(e,a,t){(t!==void 0&&!kit(e[a],t)||t===void 0&&!(a in e))&&Fit(e,a,t)}Xz.exports=Bit});var tH=pt((NCn,eH)=>{var Rit=vp(),Nit=xf(),Lit=Es(),Vit="[object Object]",qit=Function.prototype,zit=Object.prototype,Zz=qit.toString,Hit=zit.hasOwnProperty,Git=Zz.call(Object);function jit(e){if(!Lit(e)||Rit(e)!=Vit)return!1;var a=Nit(e);if(a===null)return!0;var t=Hit.call(a,"constructor")&&a.constructor;return typeof t=="function"&&t instanceof t&&Zz.call(t)==Git}eH.exports=jit});var SM=pt((LCn,iH)=>{function $it(e,a){if(!(a==="constructor"&&typeof e[a]=="function")&&a!="__proto__")return e[a]}iH.exports=$it});var oH=pt((VCn,nH)=>{var Uit=u0(),Wit=bp();function Qit(e){return Uit(e,Wit(e))}nH.exports=Qit});var pH=pt((qCn,cH)=>{var aH=yM(),Jit=xT(),Yit=kT(),Kit=bT(),Xit=RT(),rH=f0(),lH=$a(),Zit=dM(),ent=Zm(),tnt=c0(),int=Ml(),nnt=tH(),ont=_0(),sH=SM(),ant=oH();function rnt(e,a,t,o,n,c,d){var u=sH(e,t),g=sH(a,t),v=d.get(g);if(v){aH(e,t,v);return}var C=c?c(u,g,t+"",e,a,d):void 0,b=C===void 0;if(b){var P=lH(g),T=!P&&ent(g),w=!P&&!T&&ont(g);C=g,P||T||w?lH(u)?C=u:Zit(u)?C=Kit(u):T?(b=!1,C=Jit(g,!0)):w?(b=!1,C=Yit(g,!0)):C=[]:nnt(g)||rH(g)?(C=u,rH(u)?C=ant(u):(!int(u)||tnt(u))&&(C=Xit(g))):b=!1}b&&(d.set(g,C),n(C,g,o,c,d),d.delete(g)),aH(e,t,C)}cH.exports=rnt});var uH=pt((zCn,dH)=>{var lnt=pf(),snt=yM(),cnt=jv(),pnt=pH(),mnt=Ml(),dnt=bp(),unt=SM();function mH(e,a,t,o,n){e!==a&&cnt(a,function(c,d){if(n||(n=new lnt),mnt(c))pnt(e,a,d,t,mH,o,n);else{var u=o?o(unt(e,d),c,d+"",e,a,n):void 0;u===void 0&&(u=c),snt(e,d,u)}},dnt)}dH.exports=mH});var hH=pt((HCn,fH)=>{var fnt=wf(),hnt=Df();function gnt(e){return fnt(function(a,t){var o=-1,n=t.length,c=n>1?t[n-1]:void 0,d=n>2?t[2]:void 0;for(c=e.length>3&&typeof c=="function"?(n--,c):void 0,d&&hnt(t[0],t[1],d)&&(c=n<3?void 0:c,n=1),a=Object(a);++o{var _nt=uH(),Cnt=hH(),vnt=Cnt(function(e,a,t){_nt(e,a,t)});gH.exports=vnt});var PM=pt((jCn,CH)=>{function xnt(e,a){return e{var bnt=nx(),ynt=PM(),Snt=yp();function Pnt(e){return e&&e.length?bnt(e,Snt,ynt):void 0}vH.exports=Pnt});var yH=pt((UCn,bH)=>{var wnt=nx(),Tnt=ic(),Mnt=PM();function Dnt(e,a){return e&&e.length?wnt(e,Tnt(a,2),Mnt):void 0}bH.exports=Dnt});var PH=pt((WCn,SH)=>{var Ent=is(),Int=function(){return Ent.Date.now()};SH.exports=Int});var MH=pt((QCn,TH)=>{var Ont=df(),Ant=Sf(),Fnt=ff(),wH=Ml(),knt=x0();function Bnt(e,a,t,o){if(!wH(e))return e;a=Ant(a,e);for(var n=-1,c=a.length,d=c-1,u=e;u!=null&&++n{var Rnt=Pf(),Nnt=MH(),Lnt=Sf();function Vnt(e,a,t){for(var o=-1,n=a.length,c={};++o{var qnt=EH(),znt=XT();function Hnt(e,a){return qnt(e,a,function(t,o){return znt(e,o)})}IH.exports=Hnt});var FH=pt((KCn,AH)=>{var Gnt=bM(),jnt=sM(),$nt=cM();function Unt(e){return $nt(jnt(e,void 0,Gnt),e+"")}AH.exports=Unt});var BH=pt((XCn,kH)=>{var Wnt=OH(),Qnt=FH(),Jnt=Qnt(function(e,a){return e==null?{}:Wnt(e,a)});kH.exports=Jnt});var NH=pt((ZCn,RH)=>{var Ynt=Math.ceil,Knt=Math.max;function Xnt(e,a,t,o){for(var n=-1,c=Knt(Ynt((a-e)/(t||1)),0),d=Array(c);c--;)d[o?c:++n]=e,e+=t;return d}RH.exports=Xnt});var VH=pt((e2n,LH)=>{var Znt=NH(),eot=Df(),wM=xM();function tot(e){return function(a,t,o){return o&&typeof o!="number"&&eot(a,t,o)&&(t=o=void 0),a=wM(a),t===void 0?(t=a,a=0):t=wM(t),o=o===void 0?a{var iot=VH(),not=iot();qH.exports=not});var GH=pt((i2n,HH)=>{function oot(e,a){var t=e.length;for(e.sort(a);t--;)e[t]=e[t].value;return e}HH.exports=oot});var UH=pt((n2n,$H)=>{var jH=id();function aot(e,a){if(e!==a){var t=e!==void 0,o=e===null,n=e===e,c=jH(e),d=a!==void 0,u=a===null,g=a===a,v=jH(a);if(!u&&!v&&!c&&e>a||c&&d&&g&&!u&&!v||o&&d&&g||!t&&g||!n)return 1;if(!o&&!c&&!v&&e{var rot=UH();function lot(e,a,t){for(var o=-1,n=e.criteria,c=a.criteria,d=n.length,u=t.length;++o=u)return g;var v=t[o];return g*(v=="desc"?-1:1)}}return e.index-a.index}WH.exports=lot});var YH=pt((a2n,JH)=>{var TM=yf(),sot=Pf(),cot=ic(),pot=nM(),mot=GH(),dot=hf(),uot=QH(),fot=yp(),hot=$a();function got(e,a,t){a.length?a=TM(a,function(c){return hot(c)?function(d){return sot(d,c.length===1?c[0]:c)}:c}):a=[fot];var o=-1;a=TM(a,dot(cot));var n=pot(e,function(c,d,u){var g=TM(a,function(v){return v(c)});return{criteria:g,index:++o,value:c}});return mot(n,function(c,d){return uot(c,d,t)})}JH.exports=got});var ZH=pt((r2n,XH)=>{var _ot=Yv(),Cot=YH(),vot=wf(),KH=Df(),xot=vot(function(e,a){if(e==null)return[];var t=a.length;return t>1&&KH(e,a[0],a[1])?a=[]:t>2&&KH(a[0],a[1],a[2])&&(a=[a[0]]),Cot(e,_ot(a,1),[])});XH.exports=xot});var tG=pt((l2n,eG)=>{var bot=YT(),yot=0;function Sot(e){var a=++yot;return bot(e)+a}eG.exports=Sot});var nG=pt((s2n,iG)=>{function Pot(e,a,t){for(var o=-1,n=e.length,c=a.length,d={};++o{var wot=df(),Tot=nG();function Mot(e,a){return Tot(e||[],a||[],wot)}oG.exports=Mot});var ya=pt((p2n,rG)=>{var ox;if(typeof gs=="function")try{ox={cloneDeep:_z(),constant:Gv(),defaults:bz(),each:qT(),filter:eM(),find:Vz(),flatten:bM(),forEach:VT(),forIn:Hz(),has:tM(),isUndefined:iM(),last:jz(),map:oM(),mapValues:Uz(),max:Kz(),merge:_H(),min:xH(),minBy:yH(),now:PH(),pick:BH(),range:zH(),reduce:aM(),sortBy:ZH(),uniqueId:tG(),values:uM(),zipObject:aG()}}catch{}ox||(ox=window._);rG.exports=ox});var cG=pt((d2n,sG)=>{sG.exports=ax;function ax(){var e={};e._next=e._prev=e,this._sentinel=e}ax.prototype.dequeue=function(){var e=this._sentinel,a=e._prev;if(a!==e)return lG(a),a};ax.prototype.enqueue=function(e){var a=this._sentinel;e._prev&&e._next&&lG(e),e._next=a._next,a._next._prev=e,a._next=e,e._prev=a};ax.prototype.toString=function(){for(var e=[],a=this._sentinel,t=a._prev;t!==a;)e.push(JSON.stringify(t,Dot)),t=t._prev;return"["+e.join(", ")+"]"};function lG(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Dot(e,a){if(e!=="_next"&&e!=="_prev")return a}});var mG=pt((u2n,pG)=>{var Ec=ya(),Eot=os().Graph,Iot=cG();pG.exports=Aot;var Oot=Ec.constant(1);function Aot(e,a){if(e.nodeCount()<=1)return[];var t=kot(e,a||Oot),o=Fot(t.graph,t.buckets,t.zeroIdx);return Ec.flatten(Ec.map(o,function(n){return e.outEdges(n.v,n.w)}),!0)}function Fot(e,a,t){for(var o=[],n=a[a.length-1],c=a[0],d;e.nodeCount();){for(;d=c.dequeue();)MM(e,a,t,d);for(;d=n.dequeue();)MM(e,a,t,d);if(e.nodeCount()){for(var u=a.length-2;u>0;--u)if(d=a[u].dequeue(),d){o=o.concat(MM(e,a,t,d,!0));break}}}return o}function MM(e,a,t,o,n){var c=n?[]:void 0;return Ec.forEach(e.inEdges(o.v),function(d){var u=e.edge(d),g=e.node(d.v);n&&c.push({v:d.v,w:d.w}),g.out-=u,DM(a,t,g)}),Ec.forEach(e.outEdges(o.v),function(d){var u=e.edge(d),g=d.w,v=e.node(g);v.in-=u,DM(a,t,v)}),e.removeNode(o.v),c}function kot(e,a){var t=new Eot,o=0,n=0;Ec.forEach(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),Ec.forEach(e.edges(),function(u){var g=t.edge(u.v,u.w)||0,v=a(u),C=g+v;t.setEdge(u.v,u.w,C),n=Math.max(n,t.node(u.v).out+=v),o=Math.max(o,t.node(u.w).in+=v)});var c=Ec.range(n+o+3).map(function(){return new Iot}),d=o+1;return Ec.forEach(t.nodes(),function(u){DM(c,d,t.node(u))}),{graph:t,buckets:c,zeroIdx:d}}function DM(e,a,t){t.out?t.in?e[t.out-t.in+a].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}});var uG=pt((f2n,dG)=>{"use strict";var od=ya(),Bot=mG();dG.exports={run:Rot,undo:Lot};function Rot(e){var a=e.graph().acyclicer==="greedy"?Bot(e,t(e)):Not(e);od.forEach(a,function(o){var n=e.edge(o);e.removeEdge(o),n.forwardName=o.name,n.reversed=!0,e.setEdge(o.w,o.v,n,od.uniqueId("rev"))});function t(o){return function(n){return o.edge(n).weight}}}function Not(e){var a=[],t={},o={};function n(c){od.has(o,c)||(o[c]=!0,t[c]=!0,od.forEach(e.outEdges(c),function(d){od.has(t,d.w)?a.push(d):n(d.w)}),delete t[c])}return od.forEach(e.nodes(),n),a}function Lot(e){od.forEach(e.edges(),function(a){var t=e.edge(a);if(t.reversed){e.removeEdge(a);var o=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(a.w,a.v,t,o)}})}});var tl=pt((h2n,_G)=>{"use strict";var jo=ya(),fG=os().Graph;_G.exports={addDummyNode:hG,simplify:Vot,asNonCompoundGraph:qot,successorWeights:zot,predecessorWeights:Hot,intersectRect:Got,buildLayerMatrix:jot,normalizeRanks:$ot,removeEmptyRanks:Uot,addBorderNode:Wot,maxRank:gG,partition:Qot,time:Jot,notime:Yot};function hG(e,a,t,o){var n;do n=jo.uniqueId(o);while(e.hasNode(n));return t.dummy=a,e.setNode(n,t),n}function Vot(e){var a=new fG().setGraph(e.graph());return jo.forEach(e.nodes(),function(t){a.setNode(t,e.node(t))}),jo.forEach(e.edges(),function(t){var o=a.edge(t.v,t.w)||{weight:0,minlen:1},n=e.edge(t);a.setEdge(t.v,t.w,{weight:o.weight+n.weight,minlen:Math.max(o.minlen,n.minlen)})}),a}function qot(e){var a=new fG({multigraph:e.isMultigraph()}).setGraph(e.graph());return jo.forEach(e.nodes(),function(t){e.children(t).length||a.setNode(t,e.node(t))}),jo.forEach(e.edges(),function(t){a.setEdge(t,e.edge(t))}),a}function zot(e){var a=jo.map(e.nodes(),function(t){var o={};return jo.forEach(e.outEdges(t),function(n){o[n.w]=(o[n.w]||0)+e.edge(n).weight}),o});return jo.zipObject(e.nodes(),a)}function Hot(e){var a=jo.map(e.nodes(),function(t){var o={};return jo.forEach(e.inEdges(t),function(n){o[n.v]=(o[n.v]||0)+e.edge(n).weight}),o});return jo.zipObject(e.nodes(),a)}function Got(e,a){var t=e.x,o=e.y,n=a.x-t,c=a.y-o,d=e.width/2,u=e.height/2;if(!n&&!c)throw new Error("Not possible to find intersection inside of the rectangle");var g,v;return Math.abs(c)*d>Math.abs(n)*u?(c<0&&(u=-u),g=u*n/c,v=u):(n<0&&(d=-d),g=d,v=d*c/n),{x:t+g,y:o+v}}function jot(e){var a=jo.map(jo.range(gG(e)+1),function(){return[]});return jo.forEach(e.nodes(),function(t){var o=e.node(t),n=o.rank;jo.isUndefined(n)||(a[n][o.order]=t)}),a}function $ot(e){var a=jo.min(jo.map(e.nodes(),function(t){return e.node(t).rank}));jo.forEach(e.nodes(),function(t){var o=e.node(t);jo.has(o,"rank")&&(o.rank-=a)})}function Uot(e){var a=jo.min(jo.map(e.nodes(),function(c){return e.node(c).rank})),t=[];jo.forEach(e.nodes(),function(c){var d=e.node(c).rank-a;t[d]||(t[d]=[]),t[d].push(c)});var o=0,n=e.graph().nodeRankFactor;jo.forEach(t,function(c,d){jo.isUndefined(c)&&d%n!==0?--o:o&&jo.forEach(c,function(u){e.node(u).rank+=o})})}function Wot(e,a,t,o){var n={width:0,height:0};return arguments.length>=4&&(n.rank=t,n.order=o),hG(e,"border",n,a)}function gG(e){return jo.max(jo.map(e.nodes(),function(a){var t=e.node(a).rank;if(!jo.isUndefined(t))return t}))}function Qot(e,a){var t={lhs:[],rhs:[]};return jo.forEach(e,function(o){a(o)?t.lhs.push(o):t.rhs.push(o)}),t}function Jot(e,a){var t=jo.now();try{return a()}finally{console.log(e+" time: "+(jo.now()-t)+"ms")}}function Yot(e,a){return a()}});var xG=pt((g2n,vG)=>{"use strict";var CG=ya(),Kot=tl();vG.exports={run:Xot,undo:eat};function Xot(e){e.graph().dummyChains=[],CG.forEach(e.edges(),function(a){Zot(e,a)})}function Zot(e,a){var t=a.v,o=e.node(t).rank,n=a.w,c=e.node(n).rank,d=a.name,u=e.edge(a),g=u.labelRank;if(c!==o+1){e.removeEdge(a);var v,C,b;for(b=0,++o;o{"use strict";var rx=ya();bG.exports={longestPath:tat,slack:iat};function tat(e){var a={};function t(o){var n=e.node(o);if(rx.has(a,o))return n.rank;a[o]=!0;var c=rx.min(rx.map(e.outEdges(o),function(d){return t(d.w)-e.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),n.rank=c}rx.forEach(e.sources(),t)}function iat(e,a){return e.node(a.w).rank-e.node(a.v).rank-e.edge(a).minlen}});var EM=pt((C2n,yG)=>{"use strict";var lx=ya(),nat=os().Graph,sx=Ef().slack;yG.exports=oat;function oat(e){var a=new nat({directed:!1}),t=e.nodes()[0],o=e.nodeCount();a.setNode(t,{});for(var n,c;aat(a,e){"use strict";var Ic=ya(),sat=EM(),cat=Ef().slack,pat=Ef().longestPath,mat=os().alg.preorder,dat=os().alg.postorder,uat=tl().simplify;EG.exports=ad;ad.initLowLimValues=OM;ad.initCutValues=IM;ad.calcCutValue=PG;ad.leaveEdge=TG;ad.enterEdge=MG;ad.exchangeEdges=DG;function ad(e){e=uat(e),pat(e);var a=sat(e);OM(a),IM(a,e);for(var t,o;t=TG(a);)o=MG(a,e,t),DG(a,e,t,o)}function IM(e,a){var t=dat(e,e.nodes());t=t.slice(0,t.length-1),Ic.forEach(t,function(o){fat(e,a,o)})}function fat(e,a,t){var o=e.node(t),n=o.parent;e.edge(t,n).cutvalue=PG(e,a,t)}function PG(e,a,t){var o=e.node(t),n=o.parent,c=!0,d=a.edge(t,n),u=0;return d||(c=!1,d=a.edge(n,t)),u=d.weight,Ic.forEach(a.nodeEdges(t),function(g){var v=g.v===t,C=v?g.w:g.v;if(C!==n){var b=v===c,P=a.edge(g).weight;if(u+=b?P:-P,gat(e,t,C)){var T=e.edge(t,C).cutvalue;u+=b?-T:T}}}),u}function OM(e,a){arguments.length<2&&(a=e.nodes()[0]),wG(e,{},1,a)}function wG(e,a,t,o,n){var c=t,d=e.node(o);return a[o]=!0,Ic.forEach(e.neighbors(o),function(u){Ic.has(a,u)||(t=wG(e,a,t,u,o))}),d.low=c,d.lim=t++,n?d.parent=n:delete d.parent,t}function TG(e){return Ic.find(e.edges(),function(a){return e.edge(a).cutvalue<0})}function MG(e,a,t){var o=t.v,n=t.w;a.hasEdge(o,n)||(o=t.w,n=t.v);var c=e.node(o),d=e.node(n),u=c,g=!1;c.lim>d.lim&&(u=d,g=!0);var v=Ic.filter(a.edges(),function(C){return g===SG(e,e.node(C.v),u)&&g!==SG(e,e.node(C.w),u)});return Ic.minBy(v,function(C){return cat(a,C)})}function DG(e,a,t,o){var n=t.v,c=t.w;e.removeEdge(n,c),e.setEdge(o.v,o.w,{}),OM(e),IM(e,a),hat(e,a)}function hat(e,a){var t=Ic.find(e.nodes(),function(n){return!a.node(n).parent}),o=mat(e,t);o=o.slice(1),Ic.forEach(o,function(n){var c=e.node(n).parent,d=a.edge(n,c),u=!1;d||(d=a.edge(c,n),u=!0),a.node(n).rank=a.node(c).rank+(u?d.minlen:-d.minlen)})}function gat(e,a,t){return e.hasEdge(a,t)}function SG(e,a,t){return t.low<=a.lim&&a.lim<=t.lim}});var kG=pt((x2n,FG)=>{"use strict";var _at=Ef(),AG=_at.longestPath,Cat=EM(),vat=IG();FG.exports=xat;function xat(e){switch(e.graph().ranker){case"network-simplex":OG(e);break;case"tight-tree":yat(e);break;case"longest-path":bat(e);break;default:OG(e)}}var bat=AG;function yat(e){AG(e),Cat(e)}function OG(e){vat(e)}});var RG=pt((b2n,BG)=>{var AM=ya();BG.exports=Sat;function Sat(e){var a=wat(e);AM.forEach(e.graph().dummyChains,function(t){for(var o=e.node(t),n=o.edgeObj,c=Pat(e,a,n.v,n.w),d=c.path,u=c.lca,g=0,v=d[g],C=!0;t!==n.w;){if(o=e.node(t),C){for(;(v=d[g])!==u&&e.node(v).maxRankd||u>a[g].lim));for(v=g,g=o;(g=e.parent(g))!==v;)c.push(g);return{path:n.concat(c.reverse()),lca:v}}function wat(e){var a={},t=0;function o(n){var c=t;AM.forEach(e.children(n),o),a[n]={low:c,lim:t++}}return AM.forEach(e.children(),o),a}});var VG=pt((y2n,LG)=>{var Oc=ya(),FM=tl();LG.exports={run:Tat,cleanup:Eat};function Tat(e){var a=FM.addDummyNode(e,"root",{},"_root"),t=Mat(e),o=Oc.max(Oc.values(t))-1,n=2*o+1;e.graph().nestingRoot=a,Oc.forEach(e.edges(),function(d){e.edge(d).minlen*=n});var c=Dat(e)+1;Oc.forEach(e.children(),function(d){NG(e,a,n,c,o,t,d)}),e.graph().nodeRankFactor=n}function NG(e,a,t,o,n,c,d){var u=e.children(d);if(!u.length){d!==a&&e.setEdge(a,d,{weight:0,minlen:t});return}var g=FM.addBorderNode(e,"_bt"),v=FM.addBorderNode(e,"_bb"),C=e.node(d);e.setParent(g,d),C.borderTop=g,e.setParent(v,d),C.borderBottom=v,Oc.forEach(u,function(b){NG(e,a,t,o,n,c,b);var P=e.node(b),T=P.borderTop?P.borderTop:b,w=P.borderBottom?P.borderBottom:b,I=P.borderTop?o:2*o,E=T!==w?1:n-c[d]+1;e.setEdge(g,T,{weight:I,minlen:E,nestingEdge:!0}),e.setEdge(w,v,{weight:I,minlen:E,nestingEdge:!0})}),e.parent(d)||e.setEdge(a,g,{weight:0,minlen:n+c[d]})}function Mat(e){var a={};function t(o,n){var c=e.children(o);c&&c.length&&Oc.forEach(c,function(d){t(d,n+1)}),a[o]=n}return Oc.forEach(e.children(),function(o){t(o,1)}),a}function Dat(e){return Oc.reduce(e.edges(),function(a,t){return a+e.edge(t).weight},0)}function Eat(e){var a=e.graph();e.removeNode(a.nestingRoot),delete a.nestingRoot,Oc.forEach(e.edges(),function(t){var o=e.edge(t);o.nestingEdge&&e.removeEdge(t)})}});var HG=pt((S2n,zG)=>{var kM=ya(),Iat=tl();zG.exports=Oat;function Oat(e){function a(t){var o=e.children(t),n=e.node(t);if(o.length&&kM.forEach(o,a),kM.has(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var c=n.minRank,d=n.maxRank+1;c{"use strict";var oc=ya();$G.exports={adjust:Aat,undo:Fat};function Aat(e){var a=e.graph().rankdir.toLowerCase();(a==="lr"||a==="rl")&&jG(e)}function Fat(e){var a=e.graph().rankdir.toLowerCase();(a==="bt"||a==="rl")&&kat(e),(a==="lr"||a==="rl")&&(Bat(e),jG(e))}function jG(e){oc.forEach(e.nodes(),function(a){GG(e.node(a))}),oc.forEach(e.edges(),function(a){GG(e.edge(a))})}function GG(e){var a=e.width;e.width=e.height,e.height=a}function kat(e){oc.forEach(e.nodes(),function(a){BM(e.node(a))}),oc.forEach(e.edges(),function(a){var t=e.edge(a);oc.forEach(t.points,BM),oc.has(t,"y")&&BM(t)})}function BM(e){e.y=-e.y}function Bat(e){oc.forEach(e.nodes(),function(a){RM(e.node(a))}),oc.forEach(e.edges(),function(a){var t=e.edge(a);oc.forEach(t.points,RM),oc.has(t,"x")&&RM(t)})}function RM(e){var a=e.x;e.x=e.y,e.y=a}});var QG=pt((w2n,WG)=>{"use strict";var Ac=ya();WG.exports=Rat;function Rat(e){var a={},t=Ac.filter(e.nodes(),function(u){return!e.children(u).length}),o=Ac.max(Ac.map(t,function(u){return e.node(u).rank})),n=Ac.map(Ac.range(o+1),function(){return[]});function c(u){if(!Ac.has(a,u)){a[u]=!0;var g=e.node(u);n[g.rank].push(u),Ac.forEach(e.successors(u),c)}}var d=Ac.sortBy(t,function(u){return e.node(u).rank});return Ac.forEach(d,c),n}});var YG=pt((T2n,JG)=>{"use strict";var Sp=ya();JG.exports=Nat;function Nat(e,a){for(var t=0,o=1;o0;)C%2&&(b+=u[C+1]),C=C-1>>1,u[C]+=v.weight;g+=v.weight*b})),g}});var ZG=pt((M2n,XG)=>{var KG=ya();XG.exports=Vat;function Vat(e,a){return KG.map(a,function(t){var o=e.inEdges(t);if(o.length){var n=KG.reduce(o,function(c,d){var u=e.edge(d),g=e.node(d.v);return{sum:c.sum+u.weight*g.order,weight:c.weight+u.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:t}})}});var tj=pt((D2n,ej)=>{"use strict";var El=ya();ej.exports=qat;function qat(e,a){var t={};El.forEach(e,function(n,c){var d=t[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:c};El.isUndefined(n.barycenter)||(d.barycenter=n.barycenter,d.weight=n.weight)}),El.forEach(a.edges(),function(n){var c=t[n.v],d=t[n.w];!El.isUndefined(c)&&!El.isUndefined(d)&&(d.indegree++,c.out.push(t[n.w]))});var o=El.filter(t,function(n){return!n.indegree});return zat(o)}function zat(e){var a=[];function t(c){return function(d){d.merged||(El.isUndefined(d.barycenter)||El.isUndefined(c.barycenter)||d.barycenter>=c.barycenter)&&Hat(c,d)}}function o(c){return function(d){d.in.push(c),--d.indegree===0&&e.push(d)}}for(;e.length;){var n=e.pop();a.push(n),El.forEach(n.in.reverse(),t(n)),El.forEach(n.out,o(n))}return El.map(El.filter(a,function(c){return!c.merged}),function(c){return El.pick(c,["vs","i","barycenter","weight"])})}function Hat(e,a){var t=0,o=0;e.weight&&(t+=e.barycenter*e.weight,o+=e.weight),a.weight&&(t+=a.barycenter*a.weight,o+=a.weight),e.vs=a.vs.concat(e.vs),e.barycenter=t/o,e.weight=o,e.i=Math.min(a.i,e.i),a.merged=!0}});var oj=pt((E2n,nj)=>{var If=ya(),Gat=tl();nj.exports=jat;function jat(e,a){var t=Gat.partition(e,function(C){return If.has(C,"barycenter")}),o=t.lhs,n=If.sortBy(t.rhs,function(C){return-C.i}),c=[],d=0,u=0,g=0;o.sort($at(!!a)),g=ij(c,n,g),If.forEach(o,function(C){g+=C.vs.length,c.push(C.vs),d+=C.barycenter*C.weight,u+=C.weight,g=ij(c,n,g)});var v={vs:If.flatten(c,!0)};return u&&(v.barycenter=d/u,v.weight=u),v}function ij(e,a,t){for(var o;a.length&&(o=If.last(a)).i<=t;)a.pop(),e.push(o.vs),t++;return t}function $at(e){return function(a,t){return a.barycentert.barycenter?1:e?t.i-a.i:a.i-t.i}}});var lj=pt((I2n,rj)=>{var Pp=ya(),Uat=ZG(),Wat=tj(),Qat=oj();rj.exports=aj;function aj(e,a,t,o){var n=e.children(a),c=e.node(a),d=c?c.borderLeft:void 0,u=c?c.borderRight:void 0,g={};d&&(n=Pp.filter(n,function(w){return w!==d&&w!==u}));var v=Uat(e,n);Pp.forEach(v,function(w){if(e.children(w.v).length){var I=aj(e,w.v,t,o);g[w.v]=I,Pp.has(I,"barycenter")&&Yat(w,I)}});var C=Wat(v,t);Jat(C,g);var b=Qat(C,o);if(d&&(b.vs=Pp.flatten([d,b.vs,u],!0),e.predecessors(d).length)){var P=e.node(e.predecessors(d)[0]),T=e.node(e.predecessors(u)[0]);Pp.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+P.order+T.order)/(b.weight+2),b.weight+=2}return b}function Jat(e,a){Pp.forEach(e,function(t){t.vs=Pp.flatten(t.vs.map(function(o){return a[o]?a[o].vs:o}),!0)})}function Yat(e,a){Pp.isUndefined(e.barycenter)?(e.barycenter=a.barycenter,e.weight=a.weight):(e.barycenter=(e.barycenter*e.weight+a.barycenter*a.weight)/(e.weight+a.weight),e.weight+=a.weight)}});var cj=pt((O2n,sj)=>{var Of=ya(),Kat=os().Graph;sj.exports=Xat;function Xat(e,a,t){var o=Zat(e),n=new Kat({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(c){return e.node(c)});return Of.forEach(e.nodes(),function(c){var d=e.node(c),u=e.parent(c);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(n.setNode(c),n.setParent(c,u||o),Of.forEach(e[t](c),function(g){var v=g.v===c?g.w:g.v,C=n.edge(v,c),b=Of.isUndefined(C)?0:C.weight;n.setEdge(v,c,{weight:e.edge(g).weight+b})}),Of.has(d,"minRank")&&n.setNode(c,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),n}function Zat(e){for(var a;e.hasNode(a=Of.uniqueId("_root")););return a}});var mj=pt((A2n,pj)=>{var ert=ya();pj.exports=trt;function trt(e,a,t){var o={},n;ert.forEach(t,function(c){for(var d=e.parent(c),u,g;d;){if(u=e.parent(d),u?(g=o[u],o[u]=d):(g=n,n=d),g&&g!==d){a.setEdge(g,d);return}d=u}})}});var gj=pt((F2n,hj)=>{"use strict";var wp=ya(),irt=QG(),nrt=YG(),ort=lj(),art=cj(),rrt=mj(),lrt=os().Graph,dj=tl();hj.exports=srt;function srt(e){var a=dj.maxRank(e),t=uj(e,wp.range(1,a+1),"inEdges"),o=uj(e,wp.range(a-1,-1,-1),"outEdges"),n=irt(e);fj(e,n);for(var c=Number.POSITIVE_INFINITY,d,u=0,g=0;g<4;++u,++g){crt(u%2?t:o,u%4>=2),n=dj.buildLayerMatrix(e);var v=nrt(e,n);v{"use strict";var ro=ya(),prt=os().Graph,mrt=tl();wj.exports={positionX:frt,findType1Conflicts:_j,findType2Conflicts:Cj,addConflict:NM,hasConflict:vj,verticalAlignment:xj,horizontalCompaction:bj,alignCoordinates:Sj,findSmallestWidthAlignment:yj,balance:Pj};function _j(e,a){var t={};function o(n,c){var d=0,u=0,g=n.length,v=ro.last(c);return ro.forEach(c,function(C,b){var P=drt(e,C),T=P?e.node(P).order:g;(P||C===v)&&(ro.forEach(c.slice(u,b+1),function(w){ro.forEach(e.predecessors(w),function(I){var E=e.node(I),R=E.order;(Rv)&&NM(t,P,C)})})}function n(c,d){var u=-1,g,v=0;return ro.forEach(d,function(C,b){if(e.node(C).dummy==="border"){var P=e.predecessors(C);P.length&&(g=e.node(P[0]).order,o(d,v,b,u,g),v=b,u=g)}o(d,v,d.length,g,c.length)}),d}return ro.reduce(a,n),t}function drt(e,a){if(e.node(a).dummy)return ro.find(e.predecessors(a),function(t){return e.node(t).dummy})}function NM(e,a,t){if(a>t){var o=a;a=t,t=o}var n=e[a];n||(e[a]=n={}),n[t]=!0}function vj(e,a,t){if(a>t){var o=a;a=t,t=o}return ro.has(e[a],t)}function xj(e,a,t,o){var n={},c={},d={};return ro.forEach(a,function(u){ro.forEach(u,function(g,v){n[g]=g,c[g]=g,d[g]=v})}),ro.forEach(a,function(u){var g=-1;ro.forEach(u,function(v){var C=o(v);if(C.length){C=ro.sortBy(C,function(I){return d[I]});for(var b=(C.length-1)/2,P=Math.floor(b),T=Math.ceil(b);P<=T;++P){var w=C[P];c[v]===v&&g{"use strict";var Af=ya(),Mj=tl(),_rt=Tj().positionX;Dj.exports=Crt;function Crt(e){e=Mj.asNonCompoundGraph(e),vrt(e),Af.forEach(_rt(e),function(a,t){e.node(t).x=a})}function vrt(e){var a=Mj.buildLayerMatrix(e),t=e.graph().ranksep,o=0;Af.forEach(a,function(n){var c=Af.max(Af.map(n,function(d){return e.node(d).height}));Af.forEach(n,function(d){e.node(d).y=o+c/2}),o+=c+t})}});var Bj=pt((R2n,kj)=>{"use strict";var vo=ya(),Ij=uG(),Oj=xG(),xrt=kG(),brt=tl().normalizeRanks,yrt=RG(),Srt=tl().removeEmptyRanks,Aj=VG(),Prt=HG(),Fj=UG(),wrt=gj(),Trt=Ej(),Tp=tl(),Mrt=os().Graph;kj.exports=Drt;function Drt(e,a){var t=a&&a.debugTiming?Tp.time:Tp.notime;t("layout",function(){var o=t(" buildLayoutGraph",function(){return Vrt(e)});t(" runLayout",function(){Ert(o,t)}),t(" updateInputGraph",function(){Irt(e,o)})})}function Ert(e,a){a(" makeSpaceForEdgeLabels",function(){qrt(e)}),a(" removeSelfEdges",function(){Jrt(e)}),a(" acyclic",function(){Ij.run(e)}),a(" nestingGraph.run",function(){Aj.run(e)}),a(" rank",function(){xrt(Tp.asNonCompoundGraph(e))}),a(" injectEdgeLabelProxies",function(){zrt(e)}),a(" removeEmptyRanks",function(){Srt(e)}),a(" nestingGraph.cleanup",function(){Aj.cleanup(e)}),a(" normalizeRanks",function(){brt(e)}),a(" assignRankMinMax",function(){Hrt(e)}),a(" removeEdgeLabelProxies",function(){Grt(e)}),a(" normalize.run",function(){Oj.run(e)}),a(" parentDummyChains",function(){yrt(e)}),a(" addBorderSegments",function(){Prt(e)}),a(" order",function(){wrt(e)}),a(" insertSelfEdges",function(){Yrt(e)}),a(" adjustCoordinateSystem",function(){Fj.adjust(e)}),a(" position",function(){Trt(e)}),a(" positionSelfEdges",function(){Krt(e)}),a(" removeBorderNodes",function(){Qrt(e)}),a(" normalize.undo",function(){Oj.undo(e)}),a(" fixupEdgeLabelCoords",function(){Urt(e)}),a(" undoCoordinateSystem",function(){Fj.undo(e)}),a(" translateGraph",function(){jrt(e)}),a(" assignNodeIntersects",function(){$rt(e)}),a(" reversePoints",function(){Wrt(e)}),a(" acyclic.undo",function(){Ij.undo(e)})}function Irt(e,a){vo.forEach(e.nodes(),function(t){var o=e.node(t),n=a.node(t);o&&(o.x=n.x,o.y=n.y,a.children(t).length&&(o.width=n.width,o.height=n.height))}),vo.forEach(e.edges(),function(t){var o=e.edge(t),n=a.edge(t);o.points=n.points,vo.has(n,"x")&&(o.x=n.x,o.y=n.y)}),e.graph().width=a.graph().width,e.graph().height=a.graph().height}var Ort=["nodesep","edgesep","ranksep","marginx","marginy"],Art={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Frt=["acyclicer","ranker","rankdir","align"],krt=["width","height"],Brt={width:0,height:0},Rrt=["minlen","weight","width","height","labeloffset"],Nrt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Lrt=["labelpos"];function Vrt(e){var a=new Mrt({multigraph:!0,compound:!0}),t=VM(e.graph());return a.setGraph(vo.merge({},Art,LM(t,Ort),vo.pick(t,Frt))),vo.forEach(e.nodes(),function(o){var n=VM(e.node(o));a.setNode(o,vo.defaults(LM(n,krt),Brt)),a.setParent(o,e.parent(o))}),vo.forEach(e.edges(),function(o){var n=VM(e.edge(o));a.setEdge(o,vo.merge({},Nrt,LM(n,Rrt),vo.pick(n,Lrt)))}),a}function qrt(e){var a=e.graph();a.ranksep/=2,vo.forEach(e.edges(),function(t){var o=e.edge(t);o.minlen*=2,o.labelpos.toLowerCase()!=="c"&&(a.rankdir==="TB"||a.rankdir==="BT"?o.width+=o.labeloffset:o.height+=o.labeloffset)})}function zrt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a);if(t.width&&t.height){var o=e.node(a.v),n=e.node(a.w),c={rank:(n.rank-o.rank)/2+o.rank,e:a};Tp.addDummyNode(e,"edge-proxy",c,"_ep")}})}function Hrt(e){var a=0;vo.forEach(e.nodes(),function(t){var o=e.node(t);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,a=vo.max(a,o.maxRank))}),e.graph().maxRank=a}function Grt(e){vo.forEach(e.nodes(),function(a){var t=e.node(a);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(a))})}function jrt(e){var a=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,n=0,c=e.graph(),d=c.marginx||0,u=c.marginy||0;function g(v){var C=v.x,b=v.y,P=v.width,T=v.height;a=Math.min(a,C-P/2),t=Math.max(t,C+P/2),o=Math.min(o,b-T/2),n=Math.max(n,b+T/2)}vo.forEach(e.nodes(),function(v){g(e.node(v))}),vo.forEach(e.edges(),function(v){var C=e.edge(v);vo.has(C,"x")&&g(C)}),a-=d,o-=u,vo.forEach(e.nodes(),function(v){var C=e.node(v);C.x-=a,C.y-=o}),vo.forEach(e.edges(),function(v){var C=e.edge(v);vo.forEach(C.points,function(b){b.x-=a,b.y-=o}),vo.has(C,"x")&&(C.x-=a),vo.has(C,"y")&&(C.y-=o)}),c.width=t-a+d,c.height=n-o+u}function $rt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a),o=e.node(a.v),n=e.node(a.w),c,d;t.points?(c=t.points[0],d=t.points[t.points.length-1]):(t.points=[],c=n,d=o),t.points.unshift(Tp.intersectRect(o,c)),t.points.push(Tp.intersectRect(n,d))})}function Urt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a);if(vo.has(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function Wrt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a);t.reversed&&t.points.reverse()})}function Qrt(e){vo.forEach(e.nodes(),function(a){if(e.children(a).length){var t=e.node(a),o=e.node(t.borderTop),n=e.node(t.borderBottom),c=e.node(vo.last(t.borderLeft)),d=e.node(vo.last(t.borderRight));t.width=Math.abs(d.x-c.x),t.height=Math.abs(n.y-o.y),t.x=c.x+t.width/2,t.y=o.y+t.height/2}}),vo.forEach(e.nodes(),function(a){e.node(a).dummy==="border"&&e.removeNode(a)})}function Jrt(e){vo.forEach(e.edges(),function(a){if(a.v===a.w){var t=e.node(a.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:a,label:e.edge(a)}),e.removeEdge(a)}})}function Yrt(e){var a=Tp.buildLayerMatrix(e);vo.forEach(a,function(t){var o=0;vo.forEach(t,function(n,c){var d=e.node(n);d.order=c+o,vo.forEach(d.selfEdges,function(u){Tp.addDummyNode(e,"selfedge",{width:u.label.width,height:u.label.height,rank:d.rank,order:c+ ++o,e:u.e,label:u.label},"_se")}),delete d.selfEdges})})}function Krt(e){vo.forEach(e.nodes(),function(a){var t=e.node(a);if(t.dummy==="selfedge"){var o=e.node(t.e.v),n=o.x+o.width/2,c=o.y,d=t.x-n,u=o.height/2;e.setEdge(t.e,t.label),e.removeNode(a),t.label.points=[{x:n+2*d/3,y:c-u},{x:n+5*d/6,y:c-u},{x:n+d,y:c},{x:n+5*d/6,y:c+u},{x:n+2*d/3,y:c+u}],t.label.x=t.x,t.label.y=t.y}})}function LM(e,a){return vo.mapValues(vo.pick(e,a),Number)}function VM(e){var a={};return vo.forEach(e,function(t,o){a[o.toLowerCase()]=t}),a}});var Nj=pt((N2n,Rj)=>{var cx=ya(),Xrt=tl(),Zrt=os().Graph;Rj.exports={debugOrdering:elt};function elt(e){var a=Xrt.buildLayerMatrix(e),t=new Zrt({compound:!0,multigraph:!0}).setGraph({});return cx.forEach(e.nodes(),function(o){t.setNode(o,{label:o}),t.setParent(o,"layer"+e.node(o).rank)}),cx.forEach(e.edges(),function(o){t.setEdge(o.v,o.w,{},o.name)}),cx.forEach(a,function(o,n){var c="layer"+n;t.setNode(c,{rank:"same"}),cx.reduce(o,function(d,u){return t.setEdge(d,u,{style:"invis"}),u})}),t}});var Vj=pt((L2n,Lj)=>{Lj.exports="0.8.5"});var zj=pt((V2n,qj)=>{qj.exports={graphlib:os(),layout:Bj(),debug:Nj(),util:{time:tl().time,notime:tl().notime},version:Vj()}});var GM=pt(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var HM=(function(){function e(a,t,o){this.source=a,this.target=t,this.type=o}return e})();Mp.PowerEdge=HM;var f$=(function(){function e(a,t,o,n){var c=this;if(this.linkAccessor=o,this.modules=new Array(a),this.roots=[],n)this.initModulesFromGroup(n);else{this.roots.push(new b0);for(var d=0;d=this.R))return this.merge(o.a,o.b,a),!0}},e.prototype.nEdges=function(a,t){var o=a.incoming.intersection(t.incoming),n=a.outgoing.intersection(t.outgoing);return this.R-o.count()-n.count()},e.prototype.getGroupHierarchy=function(a){var t=this,o=[],n={};h$(this.roots[0],n,o);var c=this.allEdges();return c.forEach(function(d){var u=t.modules[d.source],g=t.modules[d.target];a.push(new HM(typeof u.gid>"u"?d.source:o[u.gid],typeof g.gid>"u"?d.target:o[g.gid],d.type))}),o},e.prototype.allEdges=function(){var a=[];return e.getEdges(this.roots[0],a),a},e.getEdges=function(a,t){a.forAll(function(o){o.getEdges(t),e.getEdges(o.children,t)})},e})();Mp.Configuration=f$;function h$(e,a,t){e.forAll(function(o){if(o.isLeaf())a.leaves||(a.leaves=[]),a.leaves.push(o.id);else{var n=a;if(o.gid=t.length,!o.isIsland()||o.isPredefined()){if(n={id:o.gid},o.isPredefined())for(var c in o.definition)n[c]=o.definition[c];a.groups||(a.groups=[]),a.groups.push(o.gid),t.push(n)}h$(o.children,n,t)}})}var Ff=(function(){function e(a,t,o,n,c){t===void 0&&(t=new kf),o===void 0&&(o=new kf),n===void 0&&(n=new b0),this.id=a,this.outgoing=t,this.incoming=o,this.children=n,this.definition=c}return e.prototype.getEdges=function(a){var t=this;this.outgoing.forAll(function(o,n){o.forAll(function(c){a.push(new HM(t.id,c.id,n))})})},e.prototype.isLeaf=function(){return this.children.count()===0},e.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},e.prototype.isPredefined=function(){return typeof this.definition<"u"},e})();Mp.Module=Ff;function rlt(e,a){var t={};for(var o in e)o in a&&(t[o]=e[o]);return t}var b0=(function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(a){var t=new e;return t.table=rlt(this.table,a.table),t},e.prototype.intersectionCount=function(a){return this.intersection(a).count()},e.prototype.contains=function(a){return a in this.table},e.prototype.add=function(a){this.table[a.id]=a},e.prototype.remove=function(a){delete this.table[a.id]},e.prototype.forAll=function(a){for(var t in this.table)a(this.table[t])},e.prototype.modules=function(){var a=[];return this.forAll(function(t){t.isPredefined()||a.push(t)}),a},e})();Mp.ModuleSet=b0;var kf=(function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(a){var t=!1;return this.forAllModules(function(o){!t&&o.id==a&&(t=!0)}),t},e.prototype.add=function(a,t){var o=a in this.sets?this.sets[a]:this.sets[a]=new b0;o.add(t),++this.n},e.prototype.remove=function(a,t){var o=this.sets[a];o.remove(t),o.count()===0&&delete this.sets[a],--this.n},e.prototype.forAll=function(a){for(var t in this.sets)a(this.sets[t],Number(t))},e.prototype.forAllModules=function(a){this.forAll(function(t,o){return t.forAll(a)})},e.prototype.intersection=function(a){var t=new e;return this.forAll(function(o,n){if(n in a.sets){var c=o.intersection(a.sets[n]),d=c.count();d>0&&(t.sets[n]=c,t.n+=d)}}),t},e})();Mp.LinkSets=kf;function llt(e,a,t,o){for(var n=e.length,c=new f$(n,a,t,o);c.greedyMerge(););var d=[],u=c.getGroupHierarchy(d);return d.forEach(function(g){var v=function(C){var b=g[C];typeof b=="number"&&(g[C]=e[b])};v("source"),v("target")}),{groups:u,powerEdges:d}}Mp.getGroups=llt});var fx=pt(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});function g$(e,a){var t={};for(var o in e)t[o]={};for(var o in a)t[o]={};return Object.keys(t).length}function _$(e,a){var t=0;for(var o in e)typeof a[o]<"u"&&++t;return t}function slt(e,a){var t={},o=function(n,c){typeof t[n]>"u"&&(t[n]={}),t[n][c]={}};return e.forEach(function(n){var c=a.getSourceIndex(n),d=a.getTargetIndex(n);o(c,d),o(d,c)}),t}function C$(e,a,t,o){var n=slt(e,o);e.forEach(function(c){var d=n[o.getSourceIndex(c)],u=n[o.getTargetIndex(c)];o.setLength(c,1+a*t(d,u))})}function clt(e,a,t){t===void 0&&(t=1),C$(e,t,function(o,n){return Math.sqrt(g$(o,n)-_$(o,n))},a)}y0.symmetricDiffLinkLengths=clt;function plt(e,a,t){t===void 0&&(t=1),C$(e,t,function(o,n){return Math.min(Object.keys(o).length,Object.keys(n).length)<1.1?0:_$(o,n)/g$(o,n)},a)}y0.jaccardLinkLengths=plt;function mlt(e,a,t,o){var n=v$(e,a,o),c={};n.forEach(function(u,g){return u.forEach(function(v){return c[v]=g})});var d=[];return a.forEach(function(u){var g=o.getSourceIndex(u),v=o.getTargetIndex(u),C=c[g],b=c[v];C!==b&&d.push({axis:t,left:g,right:v,gap:o.getMinSeparation(u)})}),d}y0.generateDirectedEdgeConstraints=mlt;function v$(e,a,t){var o=[],n=0,c=[],d=[];function u(R){R.index=R.lowlink=n++,c.push(R),R.onStack=!0;for(var G=0,U=R.out;G"u"?(u(Z),R.lowlink=Math.min(R.lowlink,Z.lowlink)):Z.onStack&&(R.lowlink=Math.min(R.lowlink,Z.index))}if(R.lowlink===R.index){for(var he=[];c.length&&(Z=c.pop(),Z.onStack=!1,he.push(Z),Z!==R););d.push(he.map(function(re){return re.id}))}}for(var g=0;g"u"&&u(E)}return d}y0.stronglyConnectedComponents=v$});var hx=pt(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});var x$=(function(){function e(){this.locks={}}return e.prototype.add=function(a,t){this.locks[a]=t},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var a in this.locks)return!1;return!0},e.prototype.apply=function(a){for(var t in this.locks)a(Number(t),this.locks[t])},e})();Bf.Locks=x$;var dlt=(function(){function e(a,t,o){o===void 0&&(o=null),this.D=t,this.G=o,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new b$,this.project=null,this.x=a,this.k=a.length;var n=this.n=a[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new x$,this.minD=Number.MAX_VALUE;for(var c=n,d;c--;)for(d=n;--d>c;){var u=t[c][d];u>0&&u1e-9)break;var w=this.offsetDir();for(n=0;n1&&I>E||!isFinite(E)){for(n=0;n1&&(R=1);var G=E*E,U=2*R*(I-E)/(G*I),Z=I*I*I,he=2*-R/(G*Z);for(isFinite(U)||console.log(U),n=0;n0?j-(O+1)*pe:j-(O-1)*pe;-re0;)for(var c=t;c-- >0;)o(n,c)},e.prototype.matrixApply=function(a){e.mApply(this.k,this.n,a)},e.prototype.computeNextPosition=function(a,t){var o=this;this.computeDerivatives(a);var n=this.computeStepSize(this.g);if(this.stepAndProject(a,t,this.g,n),this.project){this.matrixApply(function(d,u){return o.e[d][u]=a[d][u]-t[d][u]});var c=this.computeStepSize(this.e);c=Math.max(.2,Math.min(c,1)),this.stepAndProject(a,t,this.e,c)}},e.prototype.run=function(a){for(var t=Number.MAX_VALUE,o=!1;!o&&a-- >0;){var n=this.rungeKutta();o=Math.abs(t/n-1)>16)/this.range},e.prototype.getNextBetween=function(a,t){return a+this.getNext()*(t-a)},e})();Bf.PseudoRandom=b$});var Cx=pt(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var y$=(function(){function e(a){this.scale=a,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(a){var t=this.scale/a.scale,o=a.offset/a.scale,n=a.weight;this.AB+=n*t*o,this.AD+=n*t*a.desiredPosition,this.A2+=n*t*t},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e})();Fc.PositionStats=y$;var gx=(function(){function e(a,t,o,n){n===void 0&&(n=!1),this.left=a,this.right=t,this.gap=o,this.equality=n,this.active=!1,this.unsatisfiable=!1,this.left=a,this.right=t,this.gap=o,this.equality=n}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e})();Fc.Constraint=gx;var _x=(function(){function e(a,t,o){t===void 0&&(t=1),o===void 0&&(o=1),this.desiredPosition=a,this.weight=t,this.scale=o,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(a,t){var o=function(n,c){return n.active&&a!==c&&t(n,c)};this.cOut.forEach(function(n){return o(n,n.right)}),this.cIn.forEach(function(n){return o(n,n.left)})},e})();Fc.Variable=_x;var jM=(function(){function e(a){this.vars=[],a.offset=0,this.ps=new y$(a.scale),this.addVariable(a)}return e.prototype.addVariable=function(a){a.block=this,this.vars.push(a),this.ps.addVariable(a),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var a=0,t=this.vars.length;a=0?this.inactive.push(a):this.bs.merge(a)}}},e.prototype.solve=function(){this.satisfy();for(var a=Number.MAX_VALUE,t=this.bs.cost();Math.abs(a-t)>1e-4;)this.satisfy(),a=t,t=this.bs.cost();return t},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e})();Fc.Solver=UM;function ult(e,a,t){for(var o=e.map(function(E){return new _x(E.desiredCenter)}),n=[],c=e.length,d=0;d{"use strict";var flt=ld&&ld.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(ld,"__esModule",{value:!0});var S$=(function(){function e(){this.findIter=function(a){for(var t=this._root,o=this.iterator();t!==null;){var n=this._comparator(a,t.data);if(n===0)return o._cursor=t,o;o._ancestors.push(t),t=t.get_child(n>0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(a){for(var t=this._root;t!==null;){var o=this._comparator(a,t.data);if(o===0)return t.data;t=t.get_child(o>0)}return null},e.prototype.lowerBound=function(a){return this._bound(a,this._comparator)},e.prototype.upperBound=function(a){var t=this._comparator;function o(n,c){return t(c,n)}return this._bound(a,o)},e.prototype.min=function(){var a=this._root;if(a===null)return null;for(;a.left!==null;)a=a.left;return a.data},e.prototype.max=function(){var a=this._root;if(a===null)return null;for(;a.right!==null;)a=a.right;return a.data},e.prototype.iterator=function(){return new P$(this)},e.prototype.each=function(a){for(var t=this.iterator(),o;(o=t.next())!==null;)a(o)},e.prototype.reach=function(a){for(var t=this.iterator(),o;(o=t.prev())!==null;)a(o)},e.prototype._bound=function(a,t){for(var o=this._root,n=this.iterator();o!==null;){var c=this._comparator(a,o.data);if(c===0)return n._cursor=o,n;n._ancestors.push(o),o=o.get_child(c>0)}for(var d=n._ancestors.length-1;d>=0;--d)if(o=n._ancestors[d],t(a,o.data)>0)return n._cursor=o,n._ancestors.length=d,n;return n._ancestors.length=0,n},e})();ld.TreeBase=S$;var P$=(function(){function e(a){this._tree=a,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},e.prototype.next=function(){if(this._cursor===null){var a=this._tree._root;a!==null&&this._minNode(a)}else if(this._cursor.right===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===t)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},e.prototype.prev=function(){if(this._cursor===null){var a=this._tree._root;a!==null&&this._maxNode(a)}else if(this._cursor.left===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===t)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},e.prototype._minNode=function(a){for(;a.left!==null;)this._ancestors.push(a),a=a.left;this._cursor=a},e.prototype._maxNode=function(a){for(;a.right!==null;)this._ancestors.push(a),a=a.right;this._cursor=a},e})();ld.Iterator=P$;var vx=(function(){function e(a){this.data=a,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(a){return a?this.right:this.left},e.prototype.set_child=function(a,t){a?this.right=t:this.left=t},e})(),hlt=(function(e){flt(a,e);function a(t){var o=e.call(this)||this;return o._root=null,o._comparator=t,o.size=0,o}return a.prototype.insert=function(t){var o=!1;if(this._root===null)this._root=new vx(t),o=!0,this.size++;else{var n=new vx(void 0),c=!1,d=!1,u=null,g=n,v=null,C=this._root;for(g.right=this._root;;){if(C===null?(C=new vx(t),v.set_child(c,C),o=!0,this.size++):a.is_red(C.left)&&a.is_red(C.right)&&(C.red=!0,C.left.red=!1,C.right.red=!1),a.is_red(C)&&a.is_red(v)){var b=g.right===u;C===v.get_child(d)?g.set_child(b,a.single_rotate(u,!d)):g.set_child(b,a.double_rotate(u,!d))}var P=this._comparator(C.data,t);if(P===0)break;d=c,c=P<0,u!==null&&(g=u),u=v,v=C,C=C.get_child(c)}this._root=n.right}return this._root.red=!1,o},a.prototype.remove=function(t){if(this._root===null)return!1;var o=new vx(void 0),n=o;n.right=this._root;for(var c=null,d=null,u=null,g=!0;n.get_child(g)!==null;){var v=g;d=c,c=n,n=n.get_child(g);var C=this._comparator(t,n.data);if(g=C>0,C===0&&(u=n),!a.is_red(n)&&!a.is_red(n.get_child(g))){if(a.is_red(n.get_child(!g))){var b=a.single_rotate(n,g);c.set_child(v,b),c=b}else if(!a.is_red(n.get_child(!g))){var P=c.get_child(!v);if(P!==null)if(!a.is_red(P.get_child(!v))&&!a.is_red(P.get_child(v)))c.red=!1,P.red=!0,n.red=!0;else{var T=d.right===c;a.is_red(P.get_child(v))?d.set_child(T,a.double_rotate(c,v)):a.is_red(P.get_child(!v))&&d.set_child(T,a.single_rotate(c,v));var w=d.get_child(T);w.red=!0,n.red=!0,w.left.red=!1,w.right.red=!1}}}}return u!==null&&(u.data=n.data,c.set_child(c.right===n,n.get_child(n.left===null)),this.size--),this._root=o.right,this._root!==null&&(this._root.red=!1),u!==null},a.is_red=function(t){return t!==null&&t.red},a.single_rotate=function(t,o){var n=t.get_child(!o);return t.set_child(!o,n.get_child(o)),n.set_child(o,t),t.red=!0,n.red=!1,n},a.double_rotate=function(t,o){return t.set_child(!o,a.single_rotate(t.get_child(!o),!o)),a.single_rotate(t,o)},a})(S$);ld.RBTree=hlt});var S0=pt(nl=>{"use strict";var glt=nl&&nl.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(nl,"__esModule",{value:!0});var kc=Cx(),_lt=WM();function Rf(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(a,t){return t.bounds.union(a)},Dp.empty()):Dp.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(a,t){return Rf(t).union(a)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}nl.computeGroupBounds=Rf;var Dp=(function(){function e(a,t,o,n){this.x=a,this.X=t,this.y=o,this.Y=n}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(a){var t=this.cx(),o=a.cx();return t<=o&&a.x0?o[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(a,t,o,n,c,d,u,g){var v=o-a,C=u-c,b=n-t,P=g-d,T=P*v-C*b;if(T==0)return null;var w=a-c,I=t-d,E=C*I-P*w,R=E/T,G=v*I-b*w,U=G/T;return R>=0&&R<=1&&U>=0&&U<=1?{x:a+R*v,y:t+R*b}:null},e.prototype.inflate=function(a){return new e(this.x-a,this.X+a,this.y-a,this.Y+a)},e})();nl.Rectangle=Dp;function Clt(e,a,t){var o=e.rayIntersection(a.cx(),a.cy())||{x:e.cx(),y:e.cy()},n=a.rayIntersection(e.cx(),e.cy())||{x:a.cx(),y:a.cy()},c=n.x-o.x,d=n.y-o.y,u=Math.sqrt(c*c+d*d),g=u-t;return{sourceIntersection:o,targetIntersection:n,arrowStart:{x:o.x+g*c/u,y:o.y+g*d/u}}}nl.makeEdgeBetween=Clt;function vlt(e,a,t){var o=a.rayIntersection(e.x,e.y);o||(o={x:a.cx(),y:a.cy()});var n=o.x-e.x,c=o.y-e.y,d=Math.sqrt(n*n+c*c);return{x:o.x-t*n/d,y:o.y-t*c/d}}nl.makeEdgeTo=vlt;var xlt=(function(){function e(a,t,o){this.v=a,this.r=t,this.pos=o,this.prev=QM(),this.next=QM()}return e})(),w$=(function(){function e(a,t,o){this.isOpen=a,this.v=t,this.pos=o}return e})();function blt(e,a){return e.pos>a.pos?1:e.pos=c);var u=new Array(d);for(n=0;n0&&(e[o].insert(c),c[n].insert(e))};t("next","prev"),t("prev","next")}function D$(e,a){return YM(e,a,T$,1e-6)}nl.generateXConstraints=D$;function E$(e,a){return YM(e,a,M$,1e-6)}nl.generateYConstraints=E$;function I$(e){return JM(e,T$,1e-6)}nl.generateXGroupConstraints=I$;function O$(e){return JM(e,M$,1e-6)}nl.generateYGroupConstraints=O$;function Plt(e){var a=e.map(function(n){return new kc.Variable(n.cx())}),t=D$(e,a),o=new kc.Solver(a,t);o.solve(),a.forEach(function(n,c){return e[c].setXCentre(n.position())}),a=e.map(function(n){return new kc.Variable(n.cy())}),t=E$(e,a),o=new kc.Solver(a,t),o.solve(),a.forEach(function(n,c){return e[c].setYCentre(n.position())})}nl.removeOverlaps=Plt;var xx=(function(e){glt(a,e);function a(t,o){var n=e.call(this,0,o)||this;return n.index=t,n}return a})(kc.Variable);nl.IndexedVariable=xx;var wlt=(function(){function e(a,t,o,n,c){var d=this;if(o===void 0&&(o=null),n===void 0&&(n=null),c===void 0&&(c=!1),this.nodes=a,this.groups=t,this.rootGroup=o,this.avoidOverlaps=c,this.variables=a.map(function(g,v){return g.variable=new xx(v,1)}),n&&this.createConstraints(n),c&&o&&typeof o.groups<"u"){a.forEach(function(g){if(!g.width||!g.height){g.bounds=new Dp(g.x,g.x,g.y,g.y);return}var v=g.width/2,C=g.height/2;g.bounds=new Dp(g.x-v,g.x+v,g.y-C,g.y+C)}),Rf(o);var u=a.length;t.forEach(function(g){d.variables[u]=g.minVar=new xx(u++,typeof g.stiffness<"u"?g.stiffness:.01),d.variables[u]=g.maxVar=new xx(u++,typeof g.stiffness<"u"?g.stiffness:.01)})}}return e.prototype.createSeparation=function(a){return new kc.Constraint(this.nodes[a.left].variable,this.nodes[a.right].variable,a.gap,typeof a.equality<"u"?a.equality:!1)},e.prototype.makeFeasible=function(a){var t=this;if(this.avoidOverlaps){var o="x",n="width";a.axis==="x"&&(o="y",n="height");var c=a.offsets.map(function(u){return t.nodes[u.node]}).sort(function(u,g){return u[o]-g[o]}),d=null;c.forEach(function(u){if(d){var g=d[o]+d[n];g>u[o]&&(u[o]=g)}d=u})}},e.prototype.createAlignment=function(a){var t=this,o=this.nodes[a.offsets[0].node].variable;this.makeFeasible(a);var n=a.axis==="x"?this.xConstraints:this.yConstraints;a.offsets.slice(1).forEach(function(c){var d=t.nodes[c.node].variable;n.push(new kc.Constraint(o,d,c.offset,!0))})},e.prototype.createConstraints=function(a){var t=this,o=function(n){return typeof n.type>"u"||n.type==="separation"};this.xConstraints=a.filter(function(n){return n.axis==="x"&&o(n)}).map(function(n){return t.createSeparation(n)}),this.yConstraints=a.filter(function(n){return n.axis==="y"&&o(n)}).map(function(n){return t.createSeparation(n)}),a.filter(function(n){return n.type==="alignment"}).forEach(function(n){return t.createAlignment(n)})},e.prototype.setupVariablesAndBounds=function(a,t,o,n){this.nodes.forEach(function(c,d){c.fixed?(c.variable.weight=c.fixedWeight?c.fixedWeight:1e3,o[d]=n(c)):c.variable.weight=1;var u=(c.width||0)/2,g=(c.height||0)/2,v=a[d],C=t[d];c.bounds=new Dp(v-u,v+u,C-g,C+g)})},e.prototype.xProject=function(a,t,o){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(a,t,a,o,function(n){return n.px},this.xConstraints,I$,function(n){return n.bounds.setXCentre(o[n.variable.index]=n.variable.position())},function(n){var c=o[n.minVar.index]=n.minVar.position(),d=o[n.maxVar.index]=n.maxVar.position(),u=n.padding/2;n.bounds.x=c-u,n.bounds.X=d+u})},e.prototype.yProject=function(a,t,o){!this.rootGroup&&!this.yConstraints||this.project(a,t,t,o,function(n){return n.py},this.yConstraints,O$,function(n){return n.bounds.setYCentre(o[n.variable.index]=n.variable.position())},function(n){var c=o[n.minVar.index]=n.minVar.position(),d=o[n.maxVar.index]=n.maxVar.position(),u=n.padding/2;n.bounds.y=c-u,n.bounds.Y=d+u})},e.prototype.projectFunctions=function(){var a=this;return[function(t,o,n){return a.xProject(t,o,n)},function(t,o,n){return a.yProject(t,o,n)}]},e.prototype.project=function(a,t,o,n,c,d,u,g,v){this.setupVariablesAndBounds(a,t,n,c),this.rootGroup&&this.avoidOverlaps&&(Rf(this.rootGroup),d=d.concat(u(this.rootGroup))),this.solve(this.variables,d,o,n),this.nodes.forEach(g),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(v),Rf(this.rootGroup))},e.prototype.solve=function(a,t,o,n){var c=new kc.Solver(a,t);c.setStartingPositions(o),c.setDesiredPositions(n),c.solve()},e})();nl.Projection=wlt});var KM=pt(bx=>{"use strict";Object.defineProperty(bx,"__esModule",{value:!0});var A$=(function(){function e(a){this.elem=a,this.subheaps=[]}return e.prototype.toString=function(a){for(var t="",o=!1,n=0;n{"use strict";Object.defineProperty(XM,"__esModule",{value:!0});var F$=KM(),k$=(function(){function e(a,t){this.id=a,this.distance=t}return e})(),Mlt=(function(){function e(a){this.id=a,this.neighbours=[]}return e})(),B$=(function(){function e(a,t,o){this.node=a,this.prev=t,this.d=o}return e})(),Dlt=(function(){function e(a,t,o,n,c){this.n=a,this.es=t,this.neighbours=new Array(this.n);for(var d=this.n;d--;)this.neighbours[d]=new Mlt(d);for(d=this.es.length;d--;){var u=this.es[d],g=o(u),v=n(u),C=c(u);this.neighbours[g].neighbours.push(new k$(v,C)),this.neighbours[v].neighbours.push(new k$(g,C))}}return e.prototype.DistanceMatrix=function(){for(var a=new Array(this.n),t=0;tb&&(v.d=b,v.prev=u,o.reduceKey(v.q,v,function(T,w){return T.q=w}))}}return c},e})();XM.Calculator=Dlt});var i5=pt(Oa=>{"use strict";var N$=Oa&&Oa.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(Oa,"__esModule",{value:!0});var Elt=S0(),e5=(function(){function e(){}return e})();Oa.Point=e5;var t5=(function(){function e(a,t,o,n){this.x1=a,this.y1=t,this.x2=o,this.y2=n}return e})();Oa.LineSegment=t5;var Ilt=(function(e){N$(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a})(e5);Oa.PolyPoint=Ilt;function Il(e,a,t){return(a.x-e.x)*(t.y-e.y)-(t.x-e.x)*(a.y-e.y)}Oa.isLeft=Il;function Os(e,a,t){return Il(e,a,t)>0}function as(e,a,t){return Il(e,a,t)<0}function Olt(e){var a=e.slice(0).sort(function(P,T){return P.x!==T.x?T.x-P.x:T.y-P.y}),t=e.length,o,n=0,c=a[0].x;for(o=1;o=0&&a[o].x===C;o--);for(g=o+1,o=d;++o<=g;)if(!(Il(a[n],a[g],a[o])>=0&&o1&&!(Il(u[u.length-2],u[u.length-1],a[o])>0);)u.length-=1;o!=n&&u.push(a[o])}v!=g&&u.push(a[v]);var b=u.length;for(o=g;--o>=d;)if(!(Il(a[v],a[d],a[o])>=0&&o>d)){for(;u.length>b&&!(Il(u[u.length-2],u[u.length-1],a[o])>0);)u.length-=1;o!=n&&u.push(a[o])}}return u}Oa.ConvexHull=Olt;function Alt(e,a,t){a.slice(0).sort(function(o,n){return Math.atan2(o.y-e.y,o.x-e.x)-Math.atan2(n.y-e.y,n.x-e.x)}).forEach(t)}Oa.clockwiseRadialSweep=Alt;function Flt(e,a){var t=a.slice(0);return t.push(a[0]),{rtan:Sx(e,t),ltan:Px(e,t)}}function Sx(e,a){var t=a.length-1,o,n,c,d,u;if(as(e,a[1],a[0])&&!Os(e,a[t-1],a[0]))return 0;for(o=0,n=t;;){if(n-o===1)return Os(e,a[o],a[n])?o:n;if(c=Math.floor((o+n)/2),u=as(e,a[c+1],a[c]),u&&!Os(e,a[c-1],a[c]))return c;d=Os(e,a[o+1],a[o]),d?u||Os(e,a[o],a[c])?n=c:o=c:u&&as(e,a[o],a[c])?n=c:o=c}}function Px(e,a){var t=a.length-1,o,n,c,d,u;if(Os(e,a[t-1],a[0])&&!as(e,a[1],a[0]))return 0;for(o=0,n=t;;){if(n-o===1)return as(e,a[o],a[n])?o:n;if(c=Math.floor((o+n)/2),u=as(e,a[c+1],a[c]),Os(e,a[c-1],a[c])&&!u)return c;d=as(e,a[o+1],a[o]),d?u?as(e,a[o],a[c])?n=c:o=c:n=c:u?o=c:Os(e,a[o],a[c])?n=c:o=c}}function wx(e,a,t,o,n,c){var d,u;d=t(a[0],e),u=o(e[d],a);for(var g=!1;!g;){for(g=!0;d===e.length-1&&(d=0),!n(a[u],e[d],e[d+1]);)++d;for(;u===0&&(u=a.length-1),!c(e[d],a[u],a[u-1]);)--u,g=!1}return{t1:d,t2:u}}Oa.tangent_PolyPolyC=wx;function klt(e,a){var t=L$(a,e);return{t1:t.t2,t2:t.t1}}Oa.LRtangent_PolyPolyC=klt;function L$(e,a){return wx(e,a,Sx,Px,Os,as)}Oa.RLtangent_PolyPolyC=L$;function Blt(e,a){return wx(e,a,Px,Px,as,as)}Oa.LLtangent_PolyPolyC=Blt;function Rlt(e,a){return wx(e,a,Sx,Sx,Os,Os)}Oa.RRtangent_PolyPolyC=Rlt;var Lf=(function(){function e(a,t){this.t1=a,this.t2=t}return e})();Oa.BiTangent=Lf;var V$=(function(){function e(){}return e})();Oa.BiTangents=V$;var Nlt=(function(e){N$(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a})(e5);Oa.TVGPoint=Nlt;var ZM=(function(){function e(a,t,o,n){this.id=a,this.polyid=t,this.polyvertid=o,this.p=n,n.vv=this}return e})();Oa.VisibilityVertex=ZM;var yx=(function(){function e(a,t){this.source=a,this.target=t}return e.prototype.length=function(){var a=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(a*a+t*t)},e})();Oa.VisibilityEdge=yx;var Llt=(function(){function e(a,t){if(this.P=a,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var o=a.length,n=0;n0&&this.E.push(new yx(c[d-1].vv,g))}c.length>1&&this.E.push(new yx(c[0].vv,c[c.length-1].vv))}for(var n=0;n0)return!0;return!1},e})();Oa.TangentVisibilityGraph=Llt;function q$(e,a){for(var t=[],o=1,n=a.length;o=0&&w>=0&&I<0&&E>=0&&R>=0&&G<0?n.ll=new Lf(c,d):T<=0&&w<=0&&I>0&&E<=0&&R<=0&&G>0?n.rr=new Lf(c,d):T<=0&&w>0&&I<=0&&E>=0&&R<0&&G>=0?n.rl=new Lf(c,d):T>=0&&w<0&&I>=0&&E<=0&&R>0&&G<=0&&(n.lr=new Lf(c,d))}return n}Oa.tangents=z$;function Vlt(e,a){for(var t=1,o=a.length;t0)return!0}return!1}Oa.polysOverlap=qlt});var n5=pt(Tx=>{"use strict";Object.defineProperty(Tx,"__esModule",{value:!0});var rs={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function zlt(e,a,t,b,C,c){C===void 0&&(C=1),c===void 0&&(c=!0);var d=0,u=0,g=a,v=t,C=typeof C<"u"?C:1,b=typeof b<"u"?b:0,P=0,T=0,w=0,I=0,E=[];if(e.length==0)return;R(e),U(e,C),c&&G(e);function R(de){de.forEach(function(ue){be(ue)});function be(ue){var j=Number.MAX_VALUE,Q=Number.MAX_VALUE,le=0,O=0;ue.array.forEach(function(k){var L=typeof k.width<"u"?k.width:b,N=typeof k.height<"u"?k.height:b;L/=2,N/=2,le=Math.max(k.x+L,le),j=Math.min(k.x-L,j),O=Math.max(k.y+N,O),Q=Math.min(k.y-N,Q)}),ue.width=le-j,ue.height=O-Q}}function G(de){de.forEach(function(be){var ue={x:0,y:0};be.array.forEach(function(le){ue.x+=le.x,ue.y+=le.y}),ue.x/=be.array.length,ue.y/=be.array.length;var j={x:ue.x-be.width/2,y:ue.y-be.height/2},Q={x:be.x-j.x+g/2-P/2,y:be.y-j.y+v/2-T/2};be.array.forEach(function(le){le.x+=Q.x,le.y+=Q.y})})}function U(de,be){var ue=Number.POSITIVE_INFINITY,j=0;de.sort(function(ye,Le){return Le.height-ye.height}),w=de.reduce(function(ye,Le){return ye.widthw||$>rs.FLOAT_EPSILON;){if(N!=1)var ne=le-(le-Q)/rs.GOLDEN_SECTION,k=Z(de,ne);if(N!=0)var xe=Q+(le-Q)/rs.GOLDEN_SECTION,L=Z(de,xe);if(H=Math.abs(ne-xe),$=Math.abs(k-L),kL?(Q=ne,ne=xe,k=L,N=1):(le=xe,xe=ne,L=k,N=0),O++>100)break}Z(de,j)}function Z(de,be){E=[],P=0,T=0,I=u;for(var ue=0;ue=de.height&&E[j].x+E[j].width+de.width+rs.PADDING-be<=rs.FLOAT_EPSILON){ue=E[j];break}E.push(de),ue!==void 0?(de.x=ue.x+ue.width+rs.PADDING,de.y=ue.bottom,de.space_left=de.height,de.bottom=de.y,ue.space_left-=de.height+rs.PADDING,ue.bottom+=de.height+rs.PADDING):(de.y=I,I+=de.height+rs.PADDING,de.x=d,de.bottom=de.y,de.space_left=de.height),de.y+de.height-T>-rs.FLOAT_EPSILON&&(T=de.y+de.height-u),de.x+de.width-P>-rs.FLOAT_EPSILON&&(P=de.x+de.width-d)}function re(de){var be=0;return de.forEach(function(ue){return be+=ue.width+rs.PADDING}),be}function pe(){return P/T}}Tx.applyPacking=zlt;function Hlt(e,a){for(var t={},o={},n=[],c=0,d=0;d{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var Glt=GM(),o5=fx(),Mx=hx(),Dx=S0(),H$=Nf(),G$=i5(),j$=n5(),Vf;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(Vf=qf.EventType||(qf.EventType={}));function Ex(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var jlt=(function(){function e(){var a=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(t){return typeof a._linkType=="function"?a._linkType(t):0}}}return e.prototype.on=function(a,t){return this.event||(this.event={}),typeof a=="string"?this.event[Vf[a]]=t:this.event[a]=t,this},e.prototype.trigger=function(a){this.event&&typeof this.event[a.type]<"u"&&this.event[a.type](a)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha"u"||typeof o.py>"u")&&(o.px=o.x,o.py=o.y);var c=[o.px,o.py];this._descent.locks.add(n,c)}var d=this._descent.rungeKutta();return d===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=d),this._lastStress=d,this.updateNodePositions(),this.trigger({type:Vf.tick,alpha:this._alpha,stress:this._lastStress}),!1},e.prototype.updateNodePositions=function(){for(var a=this._descent.x[0],t=this._descent.x[1],o,n=this._nodes.length;n--;)o=this._nodes[n],o.x=a[n],o.y=t[n]},e.prototype.nodes=function(a){if(!a){if(this._nodes.length===0&&this._links.length>0){var t=0;this._links.forEach(function(n){t=Math.max(t,n.source,n.target)}),this._nodes=new Array(++t);for(var o=0;o"u"&&(o.padding=1),typeof o.leaves<"u"&&o.leaves.forEach(function(n,c){typeof n=="number"&&((o.leaves[c]=t._nodes[n]).parent=o)}),typeof o.groups<"u"&&o.groups.forEach(function(n,c){typeof n=="number"&&((o.groups[c]=t._groups[n]).parent=o)})}),this._rootGroup.leaves=this._nodes.filter(function(o){return typeof o.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(o){return typeof o.parent>"u"}),this):this._groups},e.prototype.powerGraphGroups=function(a){var t=Glt.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(t.groups),a(t),this},e.prototype.avoidOverlaps=function(a){return arguments.length?(this._avoidOverlaps=a,this):this._avoidOverlaps},e.prototype.handleDisconnected=function(a){return arguments.length?(this._handleDisconnected=a,this):this._handleDisconnected},e.prototype.flowLayout=function(a,t){return arguments.length||(a="y"),this._directedLinkConstraints={axis:a,getMinSeparation:typeof t=="number"?function(){return t}:t},this},e.prototype.links=function(a){return arguments.length?(this._links=a,this):this._links},e.prototype.constraints=function(a){return arguments.length?(this._constraints=a,this):this._constraints},e.prototype.distanceMatrix=function(a){return arguments.length?(this._distanceMatrix=a,this):this._distanceMatrix},e.prototype.size=function(a){return a?(this._canvasSize=a,this):this._canvasSize},e.prototype.defaultNodeSize=function(a){return a?(this._defaultNodeSize=a,this):this._defaultNodeSize},e.prototype.groupCompactness=function(a){return a?(this._groupCompactness=a,this):this._groupCompactness},e.prototype.linkDistance=function(a){return a?(this._linkDistance=typeof a=="function"?a:+a,this._linkLengthCalculator=null,this):this._linkDistance},e.prototype.linkType=function(a){return this._linkType=a,this},e.prototype.convergenceThreshold=function(a){return a?(this._threshold=typeof a=="function"?a:+a,this):this._threshold},e.prototype.alpha=function(a){return arguments.length?(a=+a,this._alpha?a>0?this._alpha=a:this._alpha=0:a>0&&(this._running||(this._running=!0,this.trigger({type:Vf.start,alpha:this._alpha=a}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(a){return typeof this._linkDistance=="function"?+this._linkDistance(a):this._linkDistance},e.setLinkLength=function(a,t){a.length=t},e.prototype.getLinkType=function(a){return typeof this._linkType=="function"?this._linkType(a):0},e.prototype.symmetricDiffLinkLengths=function(a,t){var o=this;return t===void 0&&(t=1),this.linkDistance(function(n){return a*n.length}),this._linkLengthCalculator=function(){return o5.symmetricDiffLinkLengths(o._links,o.linkAccessor,t)},this},e.prototype.jaccardLinkLengths=function(a,t){var o=this;return t===void 0&&(t=1),this.linkDistance(function(n){return a*n.length}),this._linkLengthCalculator=function(){return o5.jaccardLinkLengths(o._links,o.linkAccessor,t)},this},e.prototype.start=function(a,t,o,n,c,d){var u=this;a===void 0&&(a=0),t===void 0&&(t=0),o===void 0&&(o=0),n===void 0&&(n=0),c===void 0&&(c=!0),d===void 0&&(d=!0);var g,v,C=this.nodes().length,b=C+2*this._groups.length,P=this._links.length,T=this._canvasSize[0],w=this._canvasSize[1],I=new Array(b),E=new Array(b),R=null,G=this._avoidOverlaps;this._nodes.forEach(function(ue,j){ue.index=j,typeof ue.x>"u"&&(ue.x=T/2,ue.y=w/2),I[j]=ue.x,E[j]=ue.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new H$.Calculator(b,this._links,e.getSourceIndex,e.getTargetIndex,function(ue){return u.getLinkLength(ue)}).DistanceMatrix(),R=Mx.Descent.createSquareMatrix(b,function(){return 2}),this._links.forEach(function(ue){typeof ue.source=="number"&&(ue.source=u._nodes[ue.source]),typeof ue.target=="number"&&(ue.target=u._nodes[ue.target])}),this._links.forEach(function(ue){var j=e.getSourceIndex(ue),Q=e.getTargetIndex(ue);R[j][Q]=R[Q][j]=ue.weight||1}));var Z=Mx.Descent.createSquareMatrix(b,function(ue,j){return U[ue][j]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var g=C,he=function(j,Q,le,O){R[j][Q]=R[Q][j]=le,Z[j][Q]=Z[Q][j]=O};this._groups.forEach(function(j){he(g,g+1,u._groupCompactness,.1),I[g]=0,E[g++]=0,I[g]=0,E[g++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var re=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,re=re.concat(o5.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new Mx.Descent([I,E],Z),this._descent.locks.clear();for(var g=0;g0&&(this._descent.project=new Dx.Projection(this._nodes,this._groups,this._rootGroup,re).projectFunctions()),this._descent.run(t),this.separateOverlappingComponents(T,w,d),this.avoidOverlaps(G),G&&(this._nodes.forEach(function(ue,j){ue.x=I[j],ue.y=E[j]}),this._descent.project=new Dx.Projection(this._nodes,this._groups,this._rootGroup,re,!0).projectFunctions(),this._nodes.forEach(function(ue,j){I[j]=ue.x,E[j]=ue.y})),this._descent.G=R,this._descent.run(o),n){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=C,this._descent.scaleSnapByMaxH=C!=b;var be=Mx.Descent.createSquareMatrix(b,function(ue,j){return ue>=C||j>=C?R[ue][j]:0});this._descent.G=be,this._descent.run(n)}return this.updateNodePositions(),this.separateOverlappingComponents(T,w,d),c?this.resume():this},e.prototype.initialLayout=function(a,t,o){if(this._groups.length>0&&a>0){var n=this._nodes.length,c=this._links.map(function(u){return{source:u.source.index,target:u.target.index}}),d=this._nodes.map(function(u){return{index:u.index}});this._groups.forEach(function(u,g){d.push({index:u.index=n+g})}),this._groups.forEach(function(u,g){typeof u.leaves<"u"&&u.leaves.forEach(function(v){return c.push({source:u.index,target:v.index})}),typeof u.groups<"u"&&u.groups.forEach(function(v){return c.push({source:u.index,target:v.index})})}),new e().size(this.size()).nodes(d).links(c).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(a,0,0,0,!1),this._nodes.forEach(function(u){t[u.index]=d[u.index].x,o[u.index]=d[u.index].y})}else this._descent.run(a)},e.prototype.separateOverlappingComponents=function(a,t,o){var n=this;if(o===void 0&&(o=!0),!this._distanceMatrix&&this._handleDisconnected){var c=this._descent.x[0],d=this._descent.x[1];this._nodes.forEach(function(g,v){g.x=c[v],g.y=d[v]});var u=j$.separateGraphs(this._nodes,this._links);j$.applyPacking(u,a,t,this._defaultNodeSize,1,o),this._nodes.forEach(function(g,v){n._descent.x[0][v]=g.x,n._descent.x[1][v]=g.y,g.bounds&&(g.bounds.setXCentre(g.x),g.bounds.setYCentre(g.y))})}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(a){a===void 0&&(a=0),this._visibilityGraph=new G$.TangentVisibilityGraph(this._nodes.map(function(t){return t.bounds.inflate(-a).vertices()}))},e.prototype.routeEdge=function(a,t,o){t===void 0&&(t=5);var n=[],c=new G$.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),d={x:a.source.x,y:a.source.y},u={x:a.target.x,y:a.target.y},g=c.addPoint(d,a.source.index),v=c.addPoint(u,a.target.index);c.addEdgeIfVisible(d,u,a.source.index,a.target.index),typeof o<"u"&&o(c);var C=function(Z){return Z.source.id},b=function(Z){return Z.target.id},P=function(Z){return Z.length()},T=new H$.Calculator(c.V.length,c.E,C,b,P),w=T.PathFromNodeToNode(g.id,v.id);if(w.length===1||w.length===c.V.length){var I=Dx.makeEdgeBetween(a.source.innerBounds,a.target.innerBounds,t);n=[I.sourceIntersection,I.arrowStart]}else{for(var E=w.length-2,R=c.V[w[E]].p,G=c.V[w[0]].p,n=[a.source.innerBounds.rayIntersection(R.x,R.y)],U=E;U>=0;--U)n.push(c.V[w[U]].p);n.push(Dx.makeEdgeTo(G,a.target.innerBounds,t))}return n},e.getSourceIndex=function(a){return typeof a.source=="number"?a.source:a.source.index},e.getTargetIndex=function(a){return typeof a.target=="number"?a.target:a.target.index},e.linkId=function(a){return e.getSourceIndex(a)+"-"+e.getTargetIndex(a)},e.dragStart=function(a){Ex(a)?e.storeOffset(a,e.dragOrigin(a)):(e.stopNode(a),a.fixed|=2)},e.stopNode=function(a){a.px=a.x,a.py=a.y},e.storeOffset=function(a,t){typeof a.leaves<"u"&&a.leaves.forEach(function(o){o.fixed|=2,e.stopNode(o),o._dragGroupOffsetX=o.x-t.x,o._dragGroupOffsetY=o.y-t.y}),typeof a.groups<"u"&&a.groups.forEach(function(o){return e.storeOffset(o,t)})},e.dragOrigin=function(a){return Ex(a)?{x:a.bounds.cx(),y:a.bounds.cy()}:a},e.drag=function(a,t){Ex(a)?(typeof a.leaves<"u"&&a.leaves.forEach(function(o){a.bounds.setXCentre(t.x),a.bounds.setYCentre(t.y),o.px=o._dragGroupOffsetX+t.x,o.py=o._dragGroupOffsetY+t.y}),typeof a.groups<"u"&&a.groups.forEach(function(o){return e.drag(o,t)})):(a.px=t.x,a.py=t.y)},e.dragEnd=function(a){Ex(a)?(typeof a.leaves<"u"&&a.leaves.forEach(function(t){e.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY}),typeof a.groups<"u"&&a.groups.forEach(e.dragEnd)):a.fixed&=-7},e.mouseOver=function(a){a.fixed|=4,a.px=a.x,a.py=a.y},e.mouseOut=function(a){a.fixed&=-5},e})();qf.Layout=jlt});var U$=pt(w0=>{"use strict";var $lt=w0&&w0.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(w0,"__esModule",{value:!0});var a5=P0(),$$=(function(e){$lt(a,e);function a(t){var o=e.call(this)||this,n=o,c=t;return c.trigger&&(o.trigger=c.trigger),c.kick&&(o.kick=c.kick),c.drag&&(o.drag=c.drag),c.on&&(o.on=c.on),o.dragstart=o.dragStart=a5.Layout.dragStart,o.dragend=o.dragEnd=a5.Layout.dragEnd,o}return a.prototype.trigger=function(t){},a.prototype.kick=function(){},a.prototype.drag=function(){},a.prototype.on=function(t,o){return this},a})(a5.Layout);w0.LayoutAdaptor=$$;function Ult(e){return new $$(e)}w0.adaptor=Ult});var Q$=pt(T0=>{"use strict";var Wlt=T0&&T0.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(T0,"__esModule",{value:!0});var Ol=P0(),W$=(function(e){Wlt(a,e);function a(){var t=e.call(this)||this;t.event=d3.dispatch(Ol.EventType[Ol.EventType.start],Ol.EventType[Ol.EventType.tick],Ol.EventType[Ol.EventType.end]);var o=t,n;return t.drag=function(){if(!c)var c=d3.behavior.drag().origin(Ol.Layout.dragOrigin).on("dragstart.d3adaptor",Ol.Layout.dragStart).on("drag.d3adaptor",function(d){Ol.Layout.drag(d,d3.event),o.resume()}).on("dragend.d3adaptor",Ol.Layout.dragEnd);if(!arguments.length)return c;this.call(c)},t}return a.prototype.trigger=function(t){var o={type:Ol.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event[o.type](o)},a.prototype.kick=function(){var t=this;d3.timer(function(){return e.prototype.tick.call(t)})},a.prototype.on=function(t,o){return typeof t=="string"?this.event.on(t,o):this.event.on(Ol.EventType[t],o),this},a})(Ol.Layout);T0.D3StyleLayoutAdaptor=W$;function Qlt(){return new W$}T0.d3adaptor=Qlt});var J$=pt(zf=>{"use strict";var Jlt=zf&&zf.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(zf,"__esModule",{value:!0});var Al=P0(),Ylt=(function(e){Jlt(a,e);function a(t){var o=e.call(this)||this;o.d3Context=t,o.event=t.dispatch(Al.EventType[Al.EventType.start],Al.EventType[Al.EventType.tick],Al.EventType[Al.EventType.end]);var n=o,c;return o.drag=function(){if(!d)var d=t.drag().subject(Al.Layout.dragOrigin).on("start.d3adaptor",Al.Layout.dragStart).on("drag.d3adaptor",function(u){Al.Layout.drag(u,t.event),n.resume()}).on("end.d3adaptor",Al.Layout.dragEnd);if(!arguments.length)return d;arguments[0].call(d)},o}return a.prototype.trigger=function(t){var o={type:Al.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event.call(o.type,o)},a.prototype.kick=function(){var t=this,o=this.d3Context.timer(function(){return e.prototype.tick.call(t)&&o.stop()})},a.prototype.on=function(t,o){return typeof t=="string"?this.event.on(t,o):this.event.on(Al.EventType[t],o),this},a})(Al.Layout);zf.D3StyleLayoutAdaptor=Ylt});var Y$=pt(r5=>{"use strict";Object.defineProperty(r5,"__esModule",{value:!0});var Klt=Q$(),Xlt=J$();function Zlt(e){return!e||est(e)?new Klt.D3StyleLayoutAdaptor:new Xlt.D3StyleLayoutAdaptor(e)}r5.d3adaptor=Zlt;function est(e){var a=/^3\./;return e.version&&e.version.match(a)!==null}});var p5=pt(M0=>{"use strict";Object.defineProperty(M0,"__esModule",{value:!0});var tst=S0(),l5=Cx(),ist=Nf(),K$=(function(){function e(a,t,o){this.id=a,this.rect=t,this.children=o,this.leaf=typeof o>"u"||o.length===0}return e})();M0.NodeWrapper=K$;var s5=(function(){function e(a,t,o,n,c){n===void 0&&(n=null),c===void 0&&(c=null),this.id=a,this.x=t,this.y=o,this.node=n,this.line=c}return e})();M0.Vert=s5;var c5=(function(){function e(a,t){this.s=a,this.t=t;var o=e.findMatch(a,t),n=t.slice(0).reverse(),c=e.findMatch(a,n);o.length>=c.length?(this.length=o.length,this.si=o.si,this.ti=o.ti,this.reversed=!1):(this.length=c.length,this.si=c.si,this.ti=t.length-c.ti-c.length,this.reversed=!0)}return e.findMatch=function(a,t){for(var o=a.length,n=t.length,c={length:0,si:-1,ti:-1},d=new Array(o),u=0;uc.length&&(c.length=v,c.si=u-v+1,c.ti=g-v+1)}else d[u][g]=0}return c},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e})();M0.LongestCommonSubsequence=c5;var nst=(function(){function e(a,t,o){var n=this;o===void 0&&(o=12),this.originalnodes=a,this.groupPadding=o,this.leaves=null,this.nodes=a.map(function(I,E){return new K$(E,t.getBounds(I),t.getChildren(I))}),this.leaves=this.nodes.filter(function(I){return I.leaf}),this.groups=this.nodes.filter(function(I){return!I.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(I){return I.children.forEach(function(E){return n.nodes[E].parent=I})}),this.root={children:[]},this.nodes.forEach(function(I){typeof I.parent>"u"&&(I.parent=n.root,n.root.children.push(I.id)),I.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(I,E){return n.getDepth(I)-n.getDepth(E)});var c=this.backToFront.slice(0).reverse().filter(function(I){return!I.leaf});c.forEach(function(I){var E=tst.Rectangle.empty();I.children.forEach(function(R){return E=E.union(n.nodes[R].rect)}),I.rect=E.inflate(n.groupPadding)});var d=this.midPoints(this.cols.map(function(I){return I.pos})),u=this.midPoints(this.rows.map(function(I){return I.pos})),g=d[0],v=d[d.length-1],C=u[0],b=u[u.length-1],P=this.rows.map(function(I){return{x1:g,x2:v,y1:I.pos,y2:I.pos}}).concat(u.map(function(I){return{x1:g,x2:v,y1:I,y2:I}})),T=this.cols.map(function(I){return{x1:I.pos,x2:I.pos,y1:C,y2:b}}).concat(d.map(function(I){return{x1:I,x2:I,y1:C,y2:b}})),w=P.concat(T);w.forEach(function(I){return I.verts=[]}),this.verts=[],this.edges=[],P.forEach(function(I){return T.forEach(function(E){var R=new s5(n.verts.length,E.x1,I.y1);I.verts.push(R),E.verts.push(R),n.verts.push(R);for(var G=n.backToFront.length;G-- >0;){var U=n.backToFront[G],Z=U.rect,he=Math.abs(R.x-Z.cx()),re=Math.abs(R.y-Z.cy());if(he0;){var n=o.filter(function(d){return d.rect["overlap"+a.toUpperCase()](o[0].rect)}),c={nodes:n,pos:this.avg(n.map(function(d){return d.rect["c"+a]()}))};t.push(c),c.nodes.forEach(function(d){return o.splice(o.indexOf(d),1)})}return t.sort(function(d,u){return d.pos-u.pos}),t},e.prototype.getDepth=function(a){for(var t=0;a.parent!==this.root;)t++,a=a.parent;return t},e.prototype.midPoints=function(a){for(var t=a[1]-a[0],o=[a[0]-t/2],n=1;n.1)&&(b={pos:g[0][t],segments:[]},C.push(b)),b.segments.push(g)}return C},e.nudgeSegs=function(a,t,o,n,c,d){var u=n.length;if(!(u<=1)){for(var g=n.map(function(U){return new l5.Variable(U[0][a])}),v=[],C=0;C=0&&v.push(new l5.Constraint(g[E],g[R],d))}var G=new l5.Solver(g,v);G.solve(),g.forEach(function(U,Z){var he=n[Z],re=U.position();he[0][a]=he[1][a]=re;var pe=o[he.edgeid];he.i>0&&(pe[he.i-1][1][a]=re),he.iMath.PI||c<-Math.PI)&&(c=n-o),c},e.isLeft=function(a,t,o){return(t.x-a.x)*(o.y-a.y)-(t.y-a.y)*(o.x-a.x)<=0},e.getOrder=function(a){for(var t={},o=0;o"u"&&(t[n.l]={}),t[n.l][n.r]=!0}return function(c,d){return typeof t[c]<"u"&&t[c][d]}},e.orderEdges=function(a){for(var t=[],o=0;o=c.length||u.ti+u.length>=d.length)){t.push({l:o,r:n});continue}u.si+u.length>=c.length||u.ti+u.length>=d.length?(g=c[u.si+1],C=c[u.si-1],v=d[u.ti-1]):(g=c[u.si+u.length-2],v=c[u.si+u.length],C=d[u.ti+u.length]),e.isLeft(g,v,C)?t.push({l:n,r:o}):t.push({l:o,r:n})}}return e.getOrder(t)},e.makeSegments=function(a){function t(v){return{x:v.x,y:v.y}}for(var o=function(v,C,b){return Math.abs((C.x-v.x)*(b.y-v.y)-(C.y-v.y)*(b.x-v.x))<.001},n=[],c=t(a[0]),d=1;d1&&de>1?1e3:0},I=T.PathFromNodeToNodeWithPrevCost(n.ports[0].id,c.ports[0].id,w),E=I.reverse().map(function(R){return o.verts[R]});return E.push(this.nodes[c.id].ports[0]),E.filter(function(R,G){return!(G0&&R.node===c&&E[G-1].node===c)})},e.getRoutePath=function(a,t,o,n){var c={routepath:"M "+a[0][0].x+" "+a[0][0].y+" ",arrowpath:""};if(a.length>1)for(var d=0;d0?g-=C/Math.abs(C)*t:v-=b/Math.abs(b)*t,c.routepath+="L "+g+" "+v+" ";var P=a[d+1],T=P[0].x,w=P[0].y,I=P[1].x,E=P[1].y;C=I-T,b=E-w;var R=e.angleBetween2Lines(u,P)<0?1:0,G,U;Math.abs(C)>0?(G=T+C/Math.abs(C)*t,U=w):(G=T,U=w+b/Math.abs(b)*t);var Z=Math.abs(G-g),he=Math.abs(U-v);c.routepath+="A "+Z+" "+he+" 0 0 "+R+" "+G+" "+U+" "}else{var re=[g,v],pe,de;Math.abs(C)>0?(g-=C/Math.abs(C)*n,pe=[g,v+o],de=[g,v-o]):(v-=b/Math.abs(b)*n,pe=[g+o,v],de=[g-o,v]),c.routepath+="L "+g+" "+v+" ",n>0&&(c.arrowpath="M "+re[0]+" "+re[1]+" L "+pe[0]+" "+pe[1]+" L "+de[0]+" "+de[1])}}else{var u=a[0],g=u[1].x,v=u[1].y,C=g-u[0].x,b=v-u[0].y,re=[g,v],pe,de;Math.abs(C)>0?(g-=C/Math.abs(C)*n,pe=[g,v+o],de=[g,v-o]):(v-=b/Math.abs(b)*n,pe=[g+o,v],de=[g-o,v]),c.routepath+="L "+g+" "+v+" ",n>0&&(c.arrowpath="M "+re[0]+" "+re[1]+" L "+pe[0]+" "+pe[1]+" L "+de[0]+" "+de[1])}return c},e})();M0.GridRouter=nst});var X$=pt(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var ost=Nf(),m5=hx(),ast=S0(),rst=fx(),lst=(function(){function e(a,t){this.source=a,this.target=t}return e.prototype.actualLength=function(a){var t=this;return Math.sqrt(a.reduce(function(o,n){var c=n[t.target]-n[t.source];return o+c*c},0))},e})();Hf.Link3D=lst;var sst=(function(){function e(a,t,o){a===void 0&&(a=0),t===void 0&&(t=0),o===void 0&&(o=0),this.x=a,this.y=t,this.z=o}return e})();Hf.Node3D=sst;var cst=(function(){function e(a,t,o){var n=this;o===void 0&&(o=1),this.nodes=a,this.links=t,this.idealLinkLength=o,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var c=0;c"u"&&(d[C]=Math.random())}n.result[0][u]=d.x,n.result[1][u]=d.y,n.result[2][u]=d.z})}return e.prototype.linkLength=function(a){return a.actualLength(this.result)},e.prototype.start=function(a){var t=this;a===void 0&&(a=100);var o=this.nodes.length,n=new pst;this.useJaccardLinkLengths&&rst.jaccardLinkLengths(this.links,n,1.5),this.links.forEach(function(C){return C.length*=t.idealLinkLength});var c=new ost.Calculator(o,this.links,function(C){return C.source},function(C){return C.target},function(C){return C.length}).DistanceMatrix(),d=m5.Descent.createSquareMatrix(o,function(C,b){return c[C][b]}),u=m5.Descent.createSquareMatrix(o,function(){return 2});this.links.forEach(function(C){var b=C.source,P=C.target;return u[b][P]=u[P][b]=1}),this.descent=new m5.Descent(this.result,d),this.descent.threshold=.001,this.descent.G=u,this.constraints&&(this.descent.project=new ast.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var g=0;g{"use strict";Object.defineProperty(Ix,"__esModule",{value:!0});var d5=P0(),mst=p5();function dst(e,a,t,o){e.cola.start(0,0,0,10,!1);var n=ust(e.cola.nodes(),e.cola.groups(),t,o);return n.routeEdges(e.powerGraph.powerEdges,a,function(c){return c.source.routerNode.id},function(c){return c.target.routerNode.id})}Ix.gridify=dst;function ust(e,a,t,o){e.forEach(function(c){c.routerNode={name:c.name,bounds:c.bounds.inflate(-t)}}),a.forEach(function(c){c.routerNode={bounds:c.bounds.inflate(-o),children:(typeof c.groups<"u"?c.groups.map(function(d){return e.length+d.id}):[]).concat(typeof c.leaves<"u"?c.leaves.map(function(d){return d.index}):[])}});var n=e.concat(a).map(function(c,d){return c.routerNode.id=d,c.routerNode});return new mst.GridRouter(n,{getChildren:function(c){return c.children},getBounds:function(c){return c.bounds}},t-o)}function fst(e,a,t){var o;e.nodes.forEach(function(u,g){return u.index=g}),new d5.Layout().avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups(function(u){o=u,o.groups.forEach(function(g){return g.padding=t})});var n=e.nodes.length,c=[],d=e.nodes.slice(0);return d.forEach(function(u,g){return u.index=g}),o.groups.forEach(function(u){var g=u.index=u.id+n;d.push(u),typeof u.leaves<"u"&&u.leaves.forEach(function(v){return c.push({source:g,target:v.index})}),typeof u.groups<"u"&&u.groups.forEach(function(v){return c.push({source:g,target:v.id+n})})}),o.powerEdges.forEach(function(u){c.push({source:u.source.index,target:u.target.index})}),new d5.Layout().size(a).nodes(d).links(c).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new d5.Layout().convergenceThreshold(.001).size(a).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(u){o=u,o.groups.forEach(function(g){g.padding=t})}).start(50,0,100,0,!1),powerGraph:o}}Ix.powerGraphGridLayout=fst});var eU=pt(Ox=>{"use strict";function $r(e){for(var a in e)Ox.hasOwnProperty(a)||(Ox[a]=e[a])}Object.defineProperty(Ox,"__esModule",{value:!0});$r(U$());$r(Y$());$r(hx());$r(i5());$r(p5());$r(n5());$r(P0());$r(X$());$r(fx());$r(GM());$r(KM());$r(WM());$r(S0());$r(Nf());$r(Cx());$r(Z$())});var mE=pt((pW,pE)=>{(function(e){typeof pW=="object"&&typeof pE<"u"?pE.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})(function(){return(function e(a,t,o){function n(u,g){if(!t[u]){if(!a[u]){var v=typeof gs=="function"&&gs;if(!g&&v)return v(u,!0);if(c)return c(u,!0);var C=new Error("Cannot find module '"+u+"'");throw C.code="MODULE_NOT_FOUND",C}var b=t[u]={exports:{}};a[u][0].call(b.exports,function(P){return n(a[u][1][P]||P)},b,b.exports,e,a,t,o)}return t[u].exports}for(var c=typeof gs=="function"&&gs,d=0;d{let I=this.workbook.addWorksheet(P.sheetName),E=P.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],R=P.map||function(U){if(U==="")return null;let Z=Number(U);if(!Number.isNaN(Z)&&Z!==1/0)return Z;let he=E.reduce((pe,de)=>{if(pe)return pe;let be=u(U,de,!0);return be.isValid()?be:null},null);if(he)return new Date(he.valueOf());let re=C[U];return re!==void 0?re:U},G=n.parse(P.parserOptions).on("data",U=>{I.addRow(U.map(R))}).on("end",()=>{G.emit("worksheet",I)});G.on("worksheet",T).on("error",w),b.pipe(G)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(b,P){return new Promise((T,w)=>{P=P||{};let I=this.workbook.getWorksheet(P.sheetName||P.sheetId),E=n.format(P.formatterOptions);b.on("finish",()=>{T()}),E.on("error",w),E.pipe(b);let{dateFormat:R,dateUTC:G}=P,U=P.map||(re=>{if(re){if(re.text||re.hyperlink)return re.hyperlink||re.text||"";if(re.formula||re.result)return re.result||"";if(re instanceof Date)return R?G?u.utc(re).format(R):u(re).format(R):G?u.utc(re).format():u(re).format();if(re.error)return re.error;if(typeof re=="object")return JSON.stringify(re)}return re}),Z=P.includeEmptyRows===void 0||P.includeEmptyRows,he=1;I&&I.eachRow((re,pe)=>{if(Z)for(;he++2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=d,u)if(typeof u=="string"){let v=o.decodeAddress(u);this.nativeCol=v.col+g,this.nativeColOff=0,this.nativeRow=v.row+g,this.nativeRowOff=0}else u.nativeCol!==void 0?(this.nativeCol=u.nativeCol||0,this.nativeColOff=u.nativeColOff||0,this.nativeRow=u.nativeRow||0,this.nativeRowOff=u.nativeRowOff||0):u.col!==void 0?(this.col=u.col+g,this.row=u.row+g):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(d){return d instanceof n||d==null?d:new n(d)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(d){this.nativeCol=Math.floor(d),this.nativeColOff=Math.floor((d-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(d){this.nativeRow=Math.floor(d),this.nativeRowOff=Math.floor((d-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(d){this.nativeCol=d.nativeCol,this.nativeColOff=d.nativeColOff,this.nativeRow=d.nativeRow,this.nativeRowOff=d.nativeRowOff}}a.exports=n},{"../utils/col-cache":19}],3:[function(e,a,t){"use strict";let o=e("../utils/col-cache"),n=e("../utils/under-dash"),c=e("./enums"),{slideFormula:d}=e("../utils/shared-formula"),u=e("./note");class g{constructor(b,P,T){if(!b||!P)throw new Error("A Cell needs a Row");this._row=b,this._column=P,o.validateAddress(T),this._address=T,this._value=v.create(g.Types.Null,this),this.style=this._mergeStyle(b.style,P.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(b){this.style.numFmt=b}get font(){return this.style.font}set font(b){this.style.font=b}get alignment(){return this.style.alignment}set alignment(b){this.style.alignment=b}get border(){return this.style.border}set border(b){this.style.border=b}get fill(){return this.style.fill}set fill(b){this.style.fill=b}get protection(){return this.style.protection}set protection(b){this.style.protection=b}_mergeStyle(b,P,T){let w=b&&b.numFmt||P&&P.numFmt;w&&(T.numFmt=w);let I=b&&b.font||P&&P.font;I&&(T.font=I);let E=b&&b.alignment||P&&P.alignment;E&&(T.alignment=E);let R=b&&b.border||P&&P.border;R&&(T.border=R);let G=b&&b.fill||P&&P.fill;G&&(T.fill=G);let U=b&&b.protection||P&&P.protection;return U&&(T.protection=U),T}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===g.Types.Merge}merge(b,P){this._value.release(),this._value=v.create(g.Types.Merge,this,b),P||(this.style=b.style)}unmerge(){this.type===g.Types.Merge&&(this._value.release(),this._value=v.create(g.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(b){return this._value.type===g.Types.Merge&&this._value.isMergedTo(b)}get master(){return this.type===g.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===g.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(b){this.type!==g.Types.Merge?(this._value.release(),this._value=v.create(v.getType(b),this,b)):this._value.master.value=b}get note(){return this._comment&&this._comment.note}set note(b){this._comment=new u(b)}get text(){return this._value.toString()}get html(){return n.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(b){this.type===g.Types.String&&(this._value=v.create(g.Types.Hyperlink,this,{text:this._value.value,hyperlink:b}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:b}=this._row;return{sheetName:b.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(b){this.names=[b]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(b){let{definedNames:P}=this.workbook;P.removeAllNames(this.fullAddress),b.forEach(T=>{P.addEx(this.fullAddress,T)})}addName(b){this.workbook.definedNames.addEx(this.fullAddress,b)}removeName(b){this.workbook.definedNames.removeEx(this.fullAddress,b)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(b){this._dataValidations.add(this.address,b)}get model(){let{model:b}=this._value;return b.style=this.style,this._comment&&(b.comment=this._comment.model),b}set model(b){if(this._value.release(),this._value=v.create(b.type,this),this._value.model=b,b.comment)switch(b.comment.type){case"note":this._comment=u.fromModel(b.comment)}b.style?this.style=b.style:this.style={}}}g.Types=c.ValueType;let v={getType:C=>C==null?g.Types.Null:C instanceof String||typeof C=="string"?g.Types.String:typeof C=="number"?g.Types.Number:typeof C=="boolean"?g.Types.Boolean:C instanceof Date?g.Types.Date:C.text&&C.hyperlink?g.Types.Hyperlink:C.formula||C.sharedFormula?g.Types.Formula:C.richText?g.Types.RichText:C.sharedString?g.Types.SharedString:C.error?g.Types.Error:g.Types.JSON,types:[{t:g.Types.Null,f:class{constructor(C){this.model={address:C.address,type:g.Types.Null}}get value(){return null}set value(C){}get type(){return g.Types.Null}get effectiveType(){return g.Types.Null}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){}toString(){return""}}},{t:g.Types.Number,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Number,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Number}get effectiveType(){return g.Types.Number}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.String,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.String,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.String}get effectiveType(){return g.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:g.Types.Date,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Date,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Date}get effectiveType(){return g.Types.Date}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.Hyperlink,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Hyperlink,text:b?b.text:void 0,hyperlink:b?b.hyperlink:void 0},b&&b.tooltip&&(this.model.tooltip=b.tooltip)}get value(){let C={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(C.tooltip=this.model.tooltip),C}set value(C){this.model={text:C.text,hyperlink:C.hyperlink},C.tooltip&&(this.model.tooltip=C.tooltip)}get text(){return this.model.text}set text(C){this.model.text=C}get hyperlink(){return this.model.hyperlink}set hyperlink(C){this.model.hyperlink=C}get type(){return g.Types.Hyperlink}get effectiveType(){return g.Types.Hyperlink}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:g.Types.Formula,f:class{constructor(C,b){this.cell=C,this.model={address:C.address,type:g.Types.Formula,shareType:b?b.shareType:void 0,ref:b?b.ref:void 0,formula:b?b.formula:void 0,sharedFormula:b?b.sharedFormula:void 0,result:b?b.result:void 0}}_copyModel(C){let b={},P=T=>{let w=C[T];w&&(b[T]=w)};return P("formula"),P("result"),P("ref"),P("shareType"),P("sharedFormula"),b}get value(){return this._copyModel(this.model)}set value(C){this.model=this._copyModel(C)}validate(C){switch(v.getType(C)){case g.Types.Null:case g.Types.String:case g.Types.Number:case g.Types.Date:break;case g.Types.Hyperlink:case g.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(C){this.model.formula=C}get formulaType(){return this.model.formula?c.FormulaType.Master:this.model.sharedFormula?c.FormulaType.Shared:c.FormulaType.None}get result(){return this.model.result}set result(C){this.model.result=C}get type(){return g.Types.Formula}get effectiveType(){let C=this.model.result;return C==null?c.ValueType.Null:C instanceof String||typeof C=="string"?c.ValueType.String:typeof C=="number"?c.ValueType.Number:C instanceof Date?c.ValueType.Date:C.text&&C.hyperlink?c.ValueType.Hyperlink:C.formula?c.ValueType.Formula:c.ValueType.Null}get address(){return this.model.address}set address(C){this.model.address=C}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:C}=this.cell,b=C.findCell(this.model.sharedFormula);this._translatedFormula=b&&d(b.formula,b.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:g.Types.Merge,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Merge,master:b?b.address:void 0},this._master=b,b&&b.addMergeRef()}get value(){return this._master.value}set value(C){C instanceof g?(this._master&&this._master.releaseMergeRef(),C.addMergeRef(),this._master=C):this._master.value=C}isMergedTo(C){return C===this._master}get master(){return this._master}get type(){return g.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:g.Types.JSON,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.String,value:JSON.stringify(b),rawValue:b}}get value(){return this.model.rawValue}set value(C){this.model.rawValue=C,this.model.value=JSON.stringify(C)}get type(){return g.Types.String}get effectiveType(){return g.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:g.Types.SharedString,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.SharedString,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.SharedString}get effectiveType(){return g.Types.SharedString}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.RichText,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.String,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}toString(){return this.model.value.richText.map(C=>C.text).join("")}get type(){return g.Types.RichText}get effectiveType(){return g.Types.RichText}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:g.Types.Boolean,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Boolean,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Boolean}get effectiveType(){return g.Types.Boolean}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.Error,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Error,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Error}get effectiveType(){return g.Types.Error}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((C,b)=>(C[b.t]=b.f,C),[]),create(C,b,P){let T=this.types[C];if(!T)throw new Error("Could not create Value of type "+C);return new T(b,P)}};a.exports=g},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,a,t){"use strict";let o=e("../utils/under-dash"),n=e("./enums"),c=e("../utils/col-cache");class d{constructor(g,v,C){this._worksheet=g,this._number=v,C!==!1&&(this.defn=C)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return c.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(g){g?(this.key=g.key,this.width=g.width!==void 0?g.width:9,this.outlineLevel=g.outlineLevel,g.style?this.style=g.style:this.style={},this.header=g.header,this._hidden=!!g.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(g){g!==void 0?(this._header=g,this.headers.forEach((v,C)=>{this._worksheet.getCell(C+1,this.number).value=v})):this._header=void 0}get key(){return this._key}set key(g){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=g,g&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(g){this._hidden=g}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(g){this._outlineLevel=g}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(g){return this.width===g.width&&this.hidden===g.hidden&&this.outlineLevel===g.outlineLevel&&o.isEqual(this.style,g.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let g=this.style;return!g||!(g.font||g.numFmt||g.alignment||g.border||g.fill||g.protection)}get headerCount(){return this.headers.length}eachCell(g,v){let C=this.number;v||(v=g,g=null),this._worksheet.eachRow(g,(b,P)=>{v(b.getCell(C),P)})}get values(){let g=[];return this.eachCell((v,C)=>{v&&v.type!==n.ValueType.Null&&(g[C]=v.value)}),g}set values(g){if(!g)return;let v=this.number,C=0;g.hasOwnProperty("0")&&(C=1),g.forEach((b,P)=>{this._worksheet.getCell(P+C,v).value=b})}_applyStyle(g,v){return this.style[g]=v,this.eachCell(C=>{C[g]=v}),v}get numFmt(){return this.style.numFmt}set numFmt(g){this._applyStyle("numFmt",g)}get font(){return this.style.font}set font(g){this._applyStyle("font",g)}get alignment(){return this.style.alignment}set alignment(g){this._applyStyle("alignment",g)}get protection(){return this.style.protection}set protection(g){this._applyStyle("protection",g)}get border(){return this.style.border}set border(g){this._applyStyle("border",g)}get fill(){return this.style.fill}set fill(g){this._applyStyle("fill",g)}static toModel(g){let v=[],C=null;return g&&g.forEach((b,P)=>{b.isDefault?C&&(C=null):C&&b.equivalentTo(C)?C.max=P+1:(C={min:P+1,max:P+1,width:b.width!==void 0?b.width:9,style:b.style,isCustomWidth:b.isCustomWidth,hidden:b.hidden,outlineLevel:b.outlineLevel,collapsed:b.collapsed},v.push(C))}),v.length?v:void 0}static fromModel(g,v){let C=[],b=1,P=0;for(v=(v=v||[]).sort(function(T,w){return T.min-w.min});P{v.removeCellEx(g)})}forEach(g){o.each(this.matrixMap,(v,C)=>{v.forEach(b=>{g(C,b)})})}getNames(g){return this.getNamesEx(n.decodeEx(g))}getNamesEx(g){return o.map(this.matrixMap,(v,C)=>v.findCellEx(g)&&C).filter(Boolean)}_explore(g,v){v.mark=!1;let{sheetName:C}=v,b=new d(v.row,v.col,v.row,v.col,C),P,T;function w(E,R){let G=g.findCellAt(C,E,v.col);return!(!G||!G.mark)&&(b[R]=E,G.mark=!1,!0)}for(T=v.row-1;w(T,"top");T--);for(T=v.row+1;w(T,"bottom");T++);function I(E,R){let G=[];for(T=b.top;T<=b.bottom;T++){let U=g.findCellAt(C,T,E);if(!U||!U.mark)return!1;G.push(U)}b[R]=E;for(let U=0;U{C.mark=!0}),{name:g,ranges:v.map(C=>C.mark&&this._explore(v,C)).filter(Boolean).map(C=>C.$shortRange)}):{name:g,ranges:[]}}normaliseMatrix(g,v){g.forEachInSheet(v,(C,b,P)=>{C&&(C.row===b&&C.col===P||(C.row=b,C.col=P,C.address=n.n2l(P)+b))})}spliceRows(g,v,C,b){o.each(this.matrixMap,P=>{P.spliceRows(g,v,C,b),this.normaliseMatrix(P,g)})}spliceColumns(g,v,C,b){o.each(this.matrixMap,P=>{P.spliceColumns(g,v,C,b),this.normaliseMatrix(P,g)})}get model(){return o.map(this.matrixMap,(g,v)=>this.getRanges(v,g)).filter(g=>g.ranges.length)}set model(g){let v=this.matrixMap={};g.forEach(C=>{let b=v[C.name]=new c;C.ranges.forEach(P=>{u.test(P.split("!").pop()||"")&&b.addCell(P)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,a,t){"use strict";a.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,a,t){"use strict";let o=e("../utils/col-cache"),n=e("./anchor");a.exports=class{constructor(c,d){this.worksheet=c,this.model=d}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(c){let{type:d,imageId:u,range:g,hyperlinks:v}=c;if(this.type=d,this.imageId=u,d==="image")if(typeof g=="string"){let C=o.decode(g);this.range={tl:new n(this.worksheet,{col:C.left,row:C.top},-1),br:new n(this.worksheet,{col:C.right,row:C.bottom},0),editAs:"oneCell"}}else this.range={tl:new n(this.worksheet,g.tl,0),br:g.br&&new n(this.worksheet,g.br,0),ext:g.ext,editAs:g.editAs,hyperlinks:v||g.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,a,t){"use strict";let o=e("../utils/under-dash");class n{constructor(d){this.note=d}get model(){let d=null;switch(typeof this.note){case"string":d={type:"note",note:{texts:[{text:this.note}]}};break;default:d={type:"note",note:this.note}}return o.deepMerge({},n.DEFAULT_CONFIGS,d)}set model(d){let{note:u}=d,{texts:g}=u;g.length===1&&Object.keys(g[0]).length===1?this.note=g[0].text:this.note=u}static fromModel(d){let u=new n;return u.model=d,u}}n.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},a.exports=n},{"../utils/under-dash":26}],10:[function(e,a,t){"use strict";let o=e("../utils/col-cache");class n{constructor(){this.decode(arguments)}setTLBR(d,u,g,v,C){if(arguments.length<4){let b=o.decodeAddress(d),P=o.decodeAddress(u);this.model={top:Math.min(b.row,P.row),left:Math.min(b.col,P.col),bottom:Math.max(b.row,P.row),right:Math.max(b.col,P.col),sheetName:g},this.setTLBR(b.row,b.col,P.row,P.col,C)}else this.model={top:Math.min(d,g),left:Math.min(u,v),bottom:Math.max(d,g),right:Math.max(u,v),sheetName:C}}decode(d){switch(d.length){case 5:this.setTLBR(d[0],d[1],d[2],d[3],d[4]);break;case 4:this.setTLBR(d[0],d[1],d[2],d[3]);break;case 3:this.setTLBR(d[0],d[1],d[2]);break;case 2:this.setTLBR(d[0],d[1]);break;case 1:{let u=d[0];if(u instanceof n)this.model={top:u.model.top,left:u.model.left,bottom:u.model.bottom,right:u.model.right,sheetName:u.sheetName};else if(u instanceof Array)this.decode(u);else if(u.top&&u.left&&u.bottom&&u.right)this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName};else{let g=o.decodeEx(u);g.top?this.model={top:g.top,left:g.left,bottom:g.bottom,right:g.right,sheetName:g.sheetName}:this.model={top:g.row,left:g.col,bottom:g.row,right:g.col,sheetName:g.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+d.length)}}get top(){return this.model.top||1}set top(d){this.model.top=d}get left(){return this.model.left||1}set left(d){this.model.left=d}get bottom(){return this.model.bottom||1}set bottom(d){this.model.bottom=d}get right(){return this.model.right||1}set right(d){this.model.right=d}get sheetName(){return this.model.sheetName}set sheetName(d){this.model.sheetName=d}get _serialisedSheetName(){let{sheetName:d}=this.model;return d?/^[a-zA-Z0-9]*$/.test(d)?d+"!":`'${d}'!`:""}expand(d,u,g,v){(!this.model.top||dthis.bottom)&&(this.bottom=g),(!this.model.right||v>this.right)&&(this.right=v)}expandRow(d){if(d){let{dimensions:u,number:g}=d;u&&this.expand(g,u.min,g,u.max)}}expandToAddress(d){let u=o.decodeEx(d);this.expand(u.row,u.col,u.row,u.col)}get tl(){return o.n2l(this.left)+this.top}get $t$l(){return`$${o.n2l(this.left)}$${this.top}`}get br(){return o.n2l(this.right)+this.bottom}get $b$r(){return`$${o.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&!(d.bottomthis.bottom)&&!(d.rightthis.right)}contains(d){let u=o.decodeEx(d);return this.containsEx(u)}containsEx(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&d.row>=this.top&&d.row<=this.bottom&&d.col>=this.left&&d.col<=this.right}forEachAddress(d){for(let u=this.left;u<=this.right;u++)for(let g=this.top;g<=this.bottom;g++)d(o.encodeAddress(g,u),g,u)}}a.exports=n},{"../utils/col-cache":19}],11:[function(e,a,t){"use strict";let o=e("../utils/under-dash"),n=e("./enums"),c=e("../utils/col-cache"),d=e("./cell");a.exports=class{constructor(u,g){this._worksheet=u,this._number=g,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(u){return this._cells[u-1]}getCellEx(u){let g=this._cells[u.col-1];if(!g){let v=this._worksheet.getColumn(u.col);g=new d(this,v,u.address),this._cells[u.col-1]=g}return g}getCell(u){if(typeof u=="string"){let g=this._worksheet.getColumnKey(u);u=g?g.number:c.l2n(u)}return this._cells[u-1]||this.getCellEx({address:c.encodeAddress(this._number,u),row:this._number,col:u})}splice(u,g){let v=u+g;for(var C=arguments.length,b=new Array(C>2?C-2:0),P=2;P0)for(I=w;I>=v;I--)E=this._cells[I-1],E?(R=this.getCell(I+T),R.value=E.value,R.style=E.style,R._comment=E._comment):this._cells[I+T-1]=void 0;for(I=0;I{v&&v.type!==n.ValueType.Null&&g(v,C+1)})}addPageBreak(u,g){let v=this._worksheet,C=Math.max(0,u-1)||0,b=Math.max(0,g-1)||16838,P={id:this._number,max:b,man:1};C&&(P.min=C),v.rowBreaks.push(P)}get values(){let u=[];return this._cells.forEach(g=>{g&&g.type!==n.ValueType.Null&&(u[g.col]=g.value)}),u}set values(u){if(this._cells=[],u)if(u instanceof Array){let g=0;u.hasOwnProperty("0")&&(g=1),u.forEach((v,C)=>{v!==void 0&&(this.getCellEx({address:c.encodeAddress(this._number,C+g),row:this._number,col:C+g}).value=v)})}else this._worksheet.eachColumnKey((g,v)=>{u[v]!==void 0&&(this.getCellEx({address:c.encodeAddress(this._number,g.number),row:this._number,col:g.number}).value=u[v])})}get hasValues(){return o.some(this._cells,u=>u&&u.type!==n.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let u=0;return this.eachCell(()=>{u++}),u}get dimensions(){let u=0,g=0;return this._cells.forEach(v=>{v&&v.type!==n.ValueType.Null&&((!u||u>v.col)&&(u=v.col),g0?{min:u,max:g}:null}_applyStyle(u,g){return this.style[u]=g,this._cells.forEach(v=>{v&&(v[u]=g)}),g}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let u=[],g=0,v=0;return this._cells.forEach(C=>{if(C){let b=C.model;b&&((!g||g>C.col)&&(g=C.col),v{switch(v.type){case d.Types.Merge:break;default:{let C;if(v.address)C=c.decodeAddress(v.address);else if(g){let{row:b}=g,P=g.col+1;C={row:b,col:P,address:c.encodeAddress(b,P),$col$row:`$${c.n2l(P)}$${b}`}}g=C,this.getCellEx(C).model=v;break}}}),u.height?this.height=u.height:delete this.height,this.hidden=u.hidden,this.outlineLevel=u.outlineLevel||0,this.style=u.style&&JSON.parse(JSON.stringify(u.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,a,t){"use strict";let o=e("../utils/col-cache");class n{constructor(d,u,g){this.table=d,this.column=u,this.index=g}_set(d,u){this.table.cacheState(),this.column[d]=u}get name(){return this.column.name}set name(d){this._set("name",d)}get filterButton(){return this.column.filterButton}set filterButton(d){this.column.filterButton=d}get style(){return this.column.style}set style(d){this.column.style=d}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(d){this._set("totalsRowLabel",d)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(d){this._set("totalsRowFunction",d)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(d){this._set("totalsRowResult",d)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(d){this._set("totalsRowFormula",d)}}a.exports=class{constructor(c,d){this.worksheet=c,d&&(this.table=d,this.validate(),this.store())}getFormula(c){switch(c.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${c.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${c.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${c.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${c.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${c.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${c.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${c.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${c.name}])`;case"custom":return c.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+c.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:c}=this,d=(T,w,I)=>{T[w]===void 0&&(T[w]=I)};d(c,"headerRow",!0),d(c,"totalsRow",!1),d(c,"style",{}),d(c.style,"theme","TableStyleMedium2"),d(c.style,"showFirstColumn",!1),d(c.style,"showLastColumn",!1),d(c.style,"showRowStripes",!1),d(c.style,"showColumnStripes",!1);let u=(T,w)=>{if(!T)throw new Error(w)};u(c.ref,"Table must have ref"),u(c.columns,"Table must have column definitions"),u(c.rows,"Table must have row definitions"),c.tl=o.decodeAddress(c.ref);let{row:g,col:v}=c.tl;u(g>0,"Table must be on valid row"),u(v>0,"Table must be on valid col");let{width:C,filterHeight:b,tableHeight:P}=this;c.autoFilterRef=o.encode(g,v,g+b-1,v+C-1),c.tableRef=o.encode(g,v,g+P-1,v+C-1),c.columns.forEach((T,w)=>{u(T.name,`Column ${w} must have a name`),w===0?d(T,"totalsRowLabel","Total"):(d(T,"totalsRowFunction","none"),T.totalsRowFormula=this.getFormula(T))})}store(){let c=(b,P)=>{P&&Object.keys(P).forEach(T=>{b[T]=P[T]})},{worksheet:d,table:u}=this,{row:g,col:v}=u.tl,C=0;if(u.headerRow){let b=d.getRow(g+C++);u.columns.forEach((P,T)=>{let{style:w,name:I}=P,E=b.getCell(v+T);E.value=I,c(E,w)})}if(u.rows.forEach(b=>{let P=d.getRow(g+C++);b.forEach((T,w)=>{let I=P.getCell(v+w);I.value=T,c(I,u.columns[w].style)})}),u.totalsRow){let b=d.getRow(g+C++);u.columns.forEach((P,T)=>{let w=b.getCell(v+T);if(T===0)w.value=P.totalsRowLabel;else{let I=this.getFormula(P);w.value=I?{formula:P.totalsRowFormula,result:P.totalsRowResult}:null}c(w,P.style)})}}load(c){let{table:d}=this,{row:u,col:g}=d.tl,v=0;if(d.headerRow){let C=c.getRow(u+v++);d.columns.forEach((b,P)=>{C.getCell(g+P).value=b.name})}if(d.rows.forEach(C=>{let b=c.getRow(u+v++);C.forEach((P,T)=>{b.getCell(g+T).value=P})}),d.totalsRow){let C=c.getRow(u+v++);d.columns.forEach((b,P)=>{let T=C.getCell(g+P);P===0?T.value=b.totalsRowLabel:this.getFormula(b)&&(T.value={formula:b.totalsRowFormula,result:b.totalsRowResult})})}}get model(){return this.table}set model(c){this.table=c}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let c=o.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let d=0;d1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(c,d)}getColumn(c){let d=this.table.columns[c];return new n(this,d,c)}addColumn(c,d,u){this.cacheState(),u===void 0?(this.table.columns.push(c),this.table.rows.forEach((g,v)=>{g.push(d[v])})):(this.table.columns.splice(u,0,c),this.table.rows.forEach((g,v)=>{g.splice(u,0,d[v])}))}removeColumns(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(c,d),this.table.rows.forEach(u=>{u.splice(c,d)})}_assign(c,d,u){this.cacheState(),c[d]=u}get ref(){return this.table.ref}set ref(c){this._assign(this.table,"ref",c)}get name(){return this.table.name}set name(c){this.table.name=c}get displayName(){return this.table.displyName||this.table.name}set displayNamename(c){this.table.displayName=c}get headerRow(){return this.table.headerRow}set headerRow(c){this._assign(this.table,"headerRow",c)}get totalsRow(){return this.table.totalsRow}set totalsRow(c){this._assign(this.table,"totalsRow",c)}get theme(){return this.table.style.name}set theme(c){this.table.style.name=c}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(c){this.table.style.showFirstColumn=c}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(c){this.table.style.showLastColumn=c}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(c){this.table.style.showRowStripes=c}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(c){this.table.style.showColumnStripes=c}}},{"../utils/col-cache":19}],13:[function(e,a,t){"use strict";let o=e("./worksheet"),n=e("./defined-names"),c=e("../xlsx/xlsx"),d=e("../csv/csv");a.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new n}get xlsx(){return this._xlsx||(this._xlsx=new c(this)),this._xlsx}get csv(){return this._csv||(this._csv=new d(this)),this._csv}get nextId(){for(let u=1;u(w&&w.orderNo)>T?w.orderNo:T,0),b=Object.assign({},g,{id:v,name:u,orderNo:C+1,workbook:this}),P=new o(b);return this._worksheets[v]=P,P}removeWorksheetEx(u){delete this._worksheets[u.id]}removeWorksheet(u){let g=this.getWorksheet(u);g&&g.destroy()}getWorksheet(u){return u===void 0?this._worksheets.find(Boolean):typeof u=="number"?this._worksheets[u]:typeof u=="string"?this._worksheets.find(g=>g&&g.name===u):void 0}get worksheets(){return this._worksheets.slice(1).sort((u,g)=>u.orderNo-g.orderNo).filter(Boolean)}eachSheet(u){this.worksheets.forEach(g=>{u(g,g.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(u){let g=this.media.length;return this.media.push(Object.assign({},u,{type:"image"})),g}getImage(u){return this.media[u]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(u=>u.model),sheets:this.worksheets.map(u=>u.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(u){this.creator=u.creator,this.lastModifiedBy=u.lastModifiedBy,this.lastPrinted=u.lastPrinted,this.created=u.created,this.modified=u.modified,this.company=u.company,this.manager=u.manager,this.title=u.title,this.subject=u.subject,this.keywords=u.keywords,this.category=u.category,this.description=u.description,this.language=u.language,this.revision=u.revision,this.contentStatus=u.contentStatus,this.properties=u.properties,this.calcProperties=u.calcProperties,this._worksheets=[],u.worksheets.forEach(g=>{let{id:v,name:C,state:b}=g,P=u.sheets&&u.sheets.findIndex(T=>T.id===v);(this._worksheets[v]=new o({id:v,name:C,orderNo:P,state:b,workbook:this})).model=g}),this._definedNames.model=u.definedNames,this.views=u.views,this._themes=u.themes,this.media=u.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,a,t){"use strict";let o=e("../utils/under-dash"),n=e("../utils/col-cache"),c=e("./range"),d=e("./row"),u=e("./column"),g=e("./enums"),v=e("./image"),C=e("./table"),b=e("./data-validations"),P=e("../utils/encryptor"),{copyStyle:T}=e("../utils/copy-style");a.exports=class{constructor(w){w=w||{},this._workbook=w.workbook,this.id=w.id,this.orderNo=w.orderNo,this.name=w.name,this.state=w.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},w.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!w.pageSetup||!w.pageSetup.fitToWidth&&!w.pageSetup.fitToHeight||w.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},w.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},w.headerFooter),this.dataValidations=new b,this.views=w.views||[],this.autoFilter=w.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(w){if(w===void 0&&(w="sheet"+this.id),this._name!==w){if(typeof w!="string")throw new Error("The name has to be a string.");if(w==="")throw new Error("The name can't be empty.");if(w==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(w))throw new Error(`Worksheet name ${w} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(w))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+w);if(w&&w.length>31&&(console.warn(`Worksheet name ${w} exceeds 31 chars. This will be truncated`),w=w.substring(0,31)),this._workbook._worksheets.find(I=>I&&I.name.toLowerCase()===w.toLowerCase()))throw new Error("Worksheet name already exists: "+w);this._name=w}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let w=new c;return this._rows.forEach(I=>{if(I){let E=I.dimensions;E&&w.expand(I.number,E.min,I.number,E.max)}}),w}get columns(){return this._columns}set columns(w){this._headerRowCount=w.reduce((R,G)=>{let U=(G.header?1:G.headers&&G.headers.length)||0;return Math.max(R,U)},0);let I=1,E=this._columns=[];w.forEach(R=>{let G=new u(this,I++,!1);E.push(G),G.defn=R})}getColumnKey(w){return this._keys[w]}setColumnKey(w,I){this._keys[w]=I}deleteColumnKey(w){delete this._keys[w]}eachColumnKey(w){o.each(this._keys,w)}getColumn(w){if(typeof w=="string"){let I=this._keys[w];if(I)return I;w=n.l2n(w)}if(this._columns||(this._columns=[]),w>this._columns.length){let I=this._columns.length+1;for(;I<=w;)this._columns.push(new u(this,I++))}return this._columns[w-1]}spliceColumns(w,I){let E=this._rows.length;for(var R=arguments.length,G=new Array(R>2?R-2:0),U=2;U0)for(let pe=0;pe{de.push(ue[pe]||null)});let be=this.getRow(pe+1);be.splice.apply(be,de)}else this._rows.forEach(pe=>{pe&&pe.splice(w,I)});let Z=G.length-I,he=w+I,re=this._columns.length;if(Z<0)for(let pe=w+G.length;pe<=re;pe++)this.getColumn(pe).defn=this.getColumn(pe-Z).defn;else if(Z>0)for(let pe=re;pe>=he;pe--)this.getColumn(pe+Z).defn=this.getColumn(pe).defn;for(let pe=w;pe{w=Math.max(w,I.cellCount)}),w}get actualColumnCount(){let w=[],I=0;return this.eachRow(E=>{E.eachCell(R=>{let{col:G}=R;w[G]||(w[G]=!0,I++)})}),I}_commitRow(){}get _lastRowNumber(){let w=this._rows,I=w.length;for(;I>0&&w[I-1]===void 0;)I--;return I}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(w){return this._rows[w-1]}findRows(w,I){return this._rows.slice(w-1,w-1+I)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let w=0;return this.eachRow(()=>{w++}),w}getRow(w){let I=this._rows[w-1];return I||(I=this._rows[w-1]=new d(this,w)),I}getRows(w,I){if(I<1)return;let E=[];for(let R=w;R1&&arguments[1]!==void 0?arguments[1]:"n",E=this._nextRow,R=this.getRow(E);return R.values=w,this._setStyleOption(E,I[0]==="i"?I:"n"),R}addRows(w){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",E=[];return w.forEach(R=>{E.push(this.addRow(R,I))}),E}insertRow(w,I){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(w,0,I),this._setStyleOption(w,E),this.getRow(w)}insertRows(w,I){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(w,0,...I),E!=="n")for(let R=0;R1&&arguments[1]!==void 0?arguments[1]:"n";I[0]==="o"&&this.findRow(w+1)!==void 0?this._copyStyle(w+1,w,I[1]==="+"):I[0]==="i"&&this.findRow(w-1)!==void 0&&this._copyStyle(w-1,w,I[1]==="+")}_copyStyle(w,I){let E=arguments.length>2&&arguments[2]!==void 0&&arguments[2],R=this.getRow(w),G=this.getRow(I);G.style=T(R.style),R.eachCell({includeEmpty:E},(U,Z)=>{G.getCell(Z).style=T(U.style)}),G.height=R.height}duplicateRow(w,I){let E=arguments.length>2&&arguments[2]!==void 0&&arguments[2],R=this._rows[w-1],G=new Array(I).fill(R.values);this.spliceRows(w+1,E?0:I,...G);for(let U=0;U{Z.getCell(re).style=he.style})}}spliceRows(w,I){let E=w+I;for(var R=arguments.length,G=new Array(R>2?R-2:0),U=2;U{be.getCell(j).style=ue.style}),this._rows[pe-1]=void 0}else this._rows[pe+he-1]=void 0;else if(he>0)for(pe=re;pe>=E;pe--)if(de=this._rows[pe-1],de){let be=this.getRow(pe+he);be.values=de.values,be.style=de.style,be.height=de.height,de.eachCell({includeEmpty:!0},(ue,j)=>{if(be.getCell(j).style=ue.style,ue._value.constructor.name==="MergeValue"){let Q=this.getRow(ue._row._number+Z).getCell(j),le=ue._value._master,O=this.getRow(le._row._number+Z).getCell(le._column._number);Q.merge(O)}})}else this._rows[pe+he-1]=void 0;for(pe=0;pe{E&&E.hasValues&&I(E,E.number)})}getSheetValues(){let w=[];return this._rows.forEach(I=>{I&&(w[I.number]=I.values)}),w}findCell(w,I){let E=n.getAddress(w,I),R=this._rows[E.row-1];return R?R.findCell(E.col):void 0}getCell(w,I){let E=n.getAddress(w,I);return this.getRow(E.row).getCellEx(E)}mergeCells(){for(var w=arguments.length,I=new Array(w),E=0;E{if(R.intersects(w))throw new Error("Cannot merge already merged cells")});let E=this.getCell(w.top,w.left);for(let R=w.top;R<=w.bottom;R++)for(let G=w.left;G<=w.right;G++)(R>w.top||G>w.left)&&this.getCell(R,G).merge(E,I);this._merges[E.address]=w}_unMergeMaster(w){let I=this._merges[w.address];if(I){for(let E=I.top;E<=I.bottom;E++)for(let R=I.left;R<=I.right;R++)this.getCell(E,R).unmerge();delete this._merges[w.address]}}get hasMerges(){return o.some(this._merges,Boolean)}unMergeCells(){for(var w=arguments.length,I=new Array(w),E=0;E3&&arguments[3]!==void 0?arguments[3]:"shared",G=n.decode(w),{top:U,left:Z,bottom:he,right:re}=G,pe=re-Z+1,de=n.encodeAddress(U,Z),be=R==="shared",ue;ue=typeof E=="function"?E:Array.isArray(E)?Array.isArray(E[0])?(Q,le)=>E[Q-U][le-Z]:(Q,le)=>E[(Q-U)*pe+(le-Z)]:()=>{};let j=!0;for(let Q=U;Q<=he;Q++)for(let le=Z;le<=re;le++)j?(this.getCell(Q,le).value={shareType:R,formula:I,ref:w,result:ue(Q,le)},j=!1):this.getCell(Q,le).value=be?{sharedFormula:de,result:ue(Q,le)}:ue(Q,le)}addImage(w,I){let E={type:"image",imageId:w,range:I};this._media.push(new v(this,E))}getImages(){return this._media.filter(w=>w.type==="image")}addBackgroundImage(w){let I={type:"background",imageId:w};this._media.push(new v(this,I))}getBackgroundImageId(){let w=this._media.find(I=>I.type==="background");return w&&w.imageId}protect(w,I){return new Promise(E=>{this.sheetProtection={sheet:!0},I&&"spinCount"in I&&(I.spinCount=Number.isFinite(I.spinCount)?Math.round(Math.max(0,I.spinCount)):1e5),w&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=P.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=I&&"spinCount"in I?I.spinCount:1e5,this.sheetProtection.hashValue=P.convertPasswordToHash(w,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),I&&(this.sheetProtection=Object.assign(this.sheetProtection,I),!w&&"spinCount"in I&&delete this.sheetProtection.spinCount),E()})}unprotect(){this.sheetProtection=null}addTable(w){let I=new C(this,w);return this.tables[w.name]=I,I}getTable(w){return this.tables[w]}removeTable(w){delete this.tables[w]}getTables(){return Object.values(this.tables)}addConditionalFormatting(w){this.conditionalFormattings.push(w)}removeConditionalFormatting(w){typeof w=="number"?this.conditionalFormattings.splice(w,1):this.conditionalFormattings=w instanceof Function?this.conditionalFormattings.filter(w):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(w){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=w}get model(){let w={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(R=>R.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(R=>R.model),conditionalFormattings:this.conditionalFormattings};w.cols=u.toModel(this.columns);let I=w.rows=[],E=w.dimensions=new c;return this._rows.forEach(R=>{let G=R&&R.model;G&&(E.expand(G.number,G.min,G.number,G.max),I.push(G))}),w.merges=[],o.each(this._merges,R=>{w.merges.push(R.range)}),w}_parseRows(w){this._rows=[],w.rows.forEach(I=>{let E=new d(this,I.number);this._rows[E.number-1]=E,E.model=I})}_parseMergeCells(w){o.each(w.mergeCells,I=>{this.mergeCellsWithoutStyle(I)})}set model(w){this.name=w.name,this._columns=u.fromModel(this,w.cols),this._parseRows(w),this._parseMergeCells(w),this.dataValidations=new b(w.dataValidations),this.properties=w.properties,this.pageSetup=w.pageSetup,this.headerFooter=w.headerFooter,this.views=w.views,this.autoFilter=w.autoFilter,this._media=w.media.map(I=>new v(this,I)),this.sheetProtection=w.sheetProtection,this.tables=w.tables.reduce((I,E)=>{let R=new C;return R.model=E,I[E.name]=R,I},{}),this.conditionalFormattings=w.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,a,t){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let o={Workbook:e("./doc/workbook")},n=e("./doc/enums");Object.keys(n).forEach(c=>{o[c]=n[c]}),a.exports=o},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,a,t){"use strict";let o=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");t.bufferToString=function(n){return typeof n=="string"?n:o?o.decode(n):n.toString()}},{}],17:[function(e,a,t){"use strict";let o=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:n}=e("buffer");t.stringToBuffer=function(c){return typeof c!="string"?c:o?n.from(o.encode(c).buffer):n.from(c)}},{buffer:220}],18:[function(e,a,t){"use strict";let o=e("./under-dash"),n=e("./col-cache");a.exports=class{constructor(c){this.template=c,this.sheets={}}addCell(c){this.addCellEx(n.decodeEx(c))}getCell(c){return this.findCellEx(n.decodeEx(c),!0)}findCell(c){return this.findCellEx(n.decodeEx(c),!1)}findCellAt(c,d,u){let g=this.sheets[c],v=g&&g[d];return v&&v[u]}addCellEx(c){if(c.top)for(let d=c.top;d<=c.bottom;d++)for(let u=c.left;u<=c.right;u++)this.getCellAt(c.sheetName,d,u);else this.findCellEx(c,!0)}getCellEx(c){return this.findCellEx(c,!0)}findCellEx(c,d){let u=this.findSheet(c,d),g=this.findSheetRow(u,c,d);return this.findRowCell(g,c,d)}getCellAt(c,d,u){let g=this.sheets[c]||(this.sheets[c]=[]),v=g[d]||(g[d]=[]);return v[u]||(v[u]={sheetName:c,address:n.n2l(u)+d,row:d,col:u})}removeCellEx(c){let d=this.findSheet(c);if(!d)return;let u=this.findSheetRow(d,c);u&&delete u[c.col]}forEachInSheet(c,d){let u=this.sheets[c];u&&u.forEach((g,v)=>{g&&g.forEach((C,b)=>{C&&d(C,v,b)})})}forEach(c){o.each(this.sheets,(d,u)=>{this.forEachInSheet(u,c)})}map(c){let d=[];return this.forEach(u=>{d.push(c(u))}),d}findSheet(c,d){let u=c.sheetName;return this.sheets[u]?this.sheets[u]:d?this.sheets[u]=[]:void 0}findSheetRow(c,d,u){let{row:g}=d;return c&&c[g]?c[g]:u?c[g]=[]:void 0}findRowCell(c,d,u){let{col:g}=d;return c&&c[g]?c[g]:u?c[g]=this.template?Object.assign(d,JSON.parse(JSON.stringify(this.template))):d:void 0}spliceRows(c,d,u,g){let v=this.sheets[c];if(v){let C=[];for(let b=0;b{b.splice(d,u,...C)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,a,t){"use strict";let o=/^[A-Z]+\d+$/,n={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:c=>c<=26?1:c<=676?2:3,_fill(c){let d,u,g,v,C,b=1;if(c>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&c>=1){for(;b<=26;)d=this._dictionary[b-1],this._n2l[b]=d,this._l2n[d]=b,b++;this._l2nFill=1}if(this._l2nFill<2&&c>=2){for(b=27;b<=702;)u=b-27,g=u%26,v=Math.floor(u/26),d=this._dictionary[v]+this._dictionary[g],this._n2l[b]=d,this._l2n[d]=b,b++;this._l2nFill=2}if(this._l2nFill<3&&c>=3){for(b=703;b<=16384;)u=b-703,g=u%26,v=Math.floor(u/26)%26,C=Math.floor(u/676),d=this._dictionary[C]+this._dictionary[v]+this._dictionary[g],this._n2l[b]=d,this._l2n[d]=b,b++;this._l2nFill=3}},l2n(c){if(this._l2n[c]||this._fill(c.length),!this._l2n[c])throw new Error("Out of bounds. Invalid column letter: "+c);return this._l2n[c]},n2l(c){if(c<1||c>16384)throw new Error(c+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[c]||this._fill(this._level(c)),this._n2l[c]},_hash:{},validateAddress(c){if(!o.test(c))throw new Error("Invalid Address: "+c);return!0},decodeAddress(c){let d=c.length<5&&this._hash[c];if(d)return d;let u=!1,g="",v=0,C=!1,b="",P=0;for(let w,I=0;I=65&&w<=90)u=!0,g+=c[I],v=26*v+w-64;else if(w>=48&&w<=57)C=!0,b+=c[I],P=10*P+w-48;else if(C&&u&&w!==36)break;if(u){if(v>16384)throw new Error("Out of bounds. Invalid column letter: "+g)}else v=void 0;C||(P=void 0);let T={address:c=g+b,col:v,row:P,$col$row:`$${g}$${b}`};return v<=100&&P<=100&&(this._hash[c]=T,this._hash[T.$col$row]=T),T},getAddress(c,d){if(d){let u=this.n2l(d)+c;return this.decodeAddress(u)}return this.decodeAddress(c)},decode(c){let d=c.split(":");if(d.length===2){let u=this.decodeAddress(d[0]),g=this.decodeAddress(d[1]),v={top:Math.min(u.row,g.row),left:Math.min(u.col,g.col),bottom:Math.max(u.row,g.row),right:Math.max(u.col,g.col)};return v.tl=this.n2l(v.left)+v.top,v.br=this.n2l(v.right)+v.bottom,v.dimensions=`${v.tl}:${v.br}`,v}return this.decodeAddress(c)},decodeEx(c){let d=c.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),u=d[1]||d[2],g=d[3],v=g.split(":");if(v.length>1){let b=this.decodeAddress(v[0]),P=this.decodeAddress(v[1]),T=Math.min(b.row,P.row),w=Math.min(b.col,P.col),I=Math.max(b.row,P.row),E=Math.max(b.col,P.col);return b=this.n2l(w)+T,P=this.n2l(E)+I,{top:T,left:w,bottom:I,right:E,sheetName:u,tl:{address:b,col:w,row:T,$col$row:`$${this.n2l(w)}$${T}`,sheetName:u},br:{address:P,col:E,row:I,$col$row:`$${this.n2l(E)}$${I}`,sheetName:u},dimensions:`${b}:${P}`}}if(g.startsWith("#"))return u?{sheetName:u,error:g}:{error:g};let C=this.decodeAddress(g);return u?rt({sheetName:u},C):C},encodeAddress:(c,d)=>n.n2l(d)+c,encode(){switch(arguments.length){case 2:return n.encodeAddress(arguments[0],arguments[1]);case 4:return`${n.encodeAddress(arguments[0],arguments[1])}:${n.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(c,d){let[u,g,,v,C]=c,[b,P]=d;return b>=u&&b<=v&&P>=g&&P<=C}};a.exports=n},{}],20:[function(e,a,t){"use strict";let o=(c,d)=>rt(rt({},c),d.reduce((u,g)=>(c[g]&&(u[g]=rt({},c[g])),u),{})),n=function(c,d,u){let g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];c[u]&&(d[u]=o(c[u],g))};t.copyStyle=c=>{if(!c)return c;if(d=c,Object.keys(d).length===0)return{};var d;let u=rt({},c);return n(c,u,"font",["color"]),n(c,u,"alignment"),n(c,u,"protection"),c.border&&(n(c,u,"border"),n(c.border,u.border,"top",["color"]),n(c.border,u.border,"left",["color"]),n(c.border,u.border,"bottom",["color"]),n(c.border,u.border,"right",["color"]),n(c.border,u.border,"diagonal",["color"])),c.fill&&(n(c,u,"fill",["fgColor","bgColor","center"]),c.fill.stops&&(u.fill.stops=c.fill.stops.map(g=>o(g,["color"])))),u}},{}],21:[function(e,a,t){(function(o){(function(){"use strict";let n=e("crypto"),c={hash(d){let u=n.createHash(d);for(var g=arguments.length,v=new Array(g>1?g-1:0),C=1;Cn.randomBytes(d)};a.exports=c}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,a,t){"use strict";let{SaxesParser:o}=e("saxes"),{PassThrough:n}=e("readable-stream"),{bufferToString:c}=e("./browser-buffer-decode");a.exports=function(d){return F6(this,null,function*(){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new n));let u=new o,g;u.on("error",w=>{g=w});let v=[];u.on("opentag",w=>v.push({eventType:"opentag",value:w})),u.on("text",w=>v.push({eventType:"text",value:w})),u.on("closetag",w=>v.push({eventType:"closetag",value:w}));try{for(var C=W1(d),b,P,T;b=!(P=yield new IP(C.next())).done;b=!1){let w=P.value;if(u.write(c(w)),g)throw g;yield v,v=[]}}catch{T=[P]}finally{try{b&&(P=C.return)&&(yield new IP(P.call(C)))}finally{if(T)throw T[0]}}})}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,a,t){"use strict";let o=e("./col-cache"),n=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,c=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;a.exports={slideFormula:function(d,u,g){let v=o.decode(u),C=o.decode(g);return d.replace(n,(b,P,T,w,I)=>{if(I)return b;let E=c.exec(w);if(E){let R=E[1],G=E[2].toUpperCase(),U=E[3],Z=E[4];if(G.length>3||G.length===3&&G>"XFD")return b;let he=o.l2n(G),re=parseInt(Z,10);return R||(he+=C.col-v.col),U||(re+=C.row-v.row),(P||"")+(R||"")+o.n2l(he)+(U||"")+re}return b})}}},{"./col-cache":19}],24:[function(e,a,t){(function(o,n){(function(){"use strict";let c=e("readable-stream"),d=e("./utils"),u=e("./string-buf");class g{constructor(I,E){this._data=I,this._encoding=E}get length(){return this.toBuffer().length}copy(I,E,R,G){return this.toBuffer().copy(I,E,R,G)}toBuffer(){return this._buffer||(this._buffer=n.from(this._data,this._encoding)),this._buffer}}class v{constructor(I){this._data=I}get length(){return this._data.length}copy(I,E,R,G){return this._data._buf.copy(I,E,R,G)}toBuffer(){return this._data.toBuffer()}}class C{constructor(I){this._data=I}get length(){return this._data.length}copy(I,E,R,G){this._data.copy(I,E,R,G)}toBuffer(){return this._data}}class b{constructor(I){this.size=I,this.buffer=n.alloc(I),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let I=n.alloc(this.iWrite-this.iRead);return this.buffer.copy(I,0,this.iRead,this.iWrite),I}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(I){let E;return I===0?null:I===void 0||I>=this.length?(E=this.toBuffer(),this.iRead=this.iWrite,E):(E=n.alloc(I),this.buffer.copy(E,0,this.iRead,I),this.iRead+=I,E)}write(I,E,R){let G=Math.min(R,this.size-this.iWrite);return I.copy(this.buffer,this.iWrite,E,E+G),this.iWrite+=G,G}}let P=function(w){w=w||{},this.bufSize=w.bufSize||1048576,this.buffers=[],this.batch=w.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};d.inherits(P,c.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return n.concat(this.buffers.map(w=>w.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let I=this.buffers[this.buffers.length-1];if(!I.full)return I}let w=new b(this.bufSize);return this.buffers.push(w),w},_pipe(w){return Zn(this,null,function*(){yield Promise.all(this.pipes.map(function(I){return new Promise(E=>{I.write(w.toBuffer(),()=>{E()})})}))})},_writeToBuffers(w){let I=0,E=w.length;for(;I1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(R),o.nextTick(E)):(yield this._pipe(R),E());else this.paused||this.emit("data",R.toBuffer()),this._writeToBuffers(R),this.emit("readable");return!0})},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(w,I,E){let R=G=>{G?E(G):(this._flush(),this.pipes.forEach(U=>{U.end()}),this.emit("finish"))};w?this.write(w,I,R):R()},read(w){let I;if(w){for(I=[];w&&this.buffers.length&&!this.buffers[0].eod;){let E=this.buffers[0],R=E.read(w);w-=R.length,I.push(R),E.eod&&E.full&&this.buffers.shift()}return n.concat(I)}return I=this.buffers.map(E=>E.toBuffer()).filter(Boolean),this.buffers=[],n.concat(I)},setEncoding(w){this.encoding=w},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(w){this.pipes.push(w),!this.paused&&this.buffers.length&&this.end()},unpipe(w){this.pipes=this.pipes.filter(I=>I!==w)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),a.exports=P}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,a,t){(function(o){(function(){"use strict";a.exports=class{constructor(n){this._buf=o.alloc(n&&n.size||16384),this._encoding=n&&n.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=o.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(n){n=n||0,this._buffer=void 0,this._inPos=n}_grow(n){let c=2*this._buf.length;for(;c=this._buf.length-4;)this._grow(this._inPos+n.length),c=this._inPos+this._buf.write(n,this._inPos,this._encoding);this._inPos=c}addStringBuf(n){n.length&&(this._buffer=void 0,this.length+n.length>this.capacity&&this._grow(this.length+n.length),n._buf.copy(this._buf,this._inPos,0,n.length),this._inPos+=n.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,a,t){"use strict";let{toString:o}=Object.prototype,n=/["&<>]/,c={each:function(d,u){d&&(Array.isArray(d)?d.forEach(u):Object.keys(d).forEach(g=>{u(d[g],g)}))},some:function(d,u){return!!d&&(Array.isArray(d)?d.some(u):Object.keys(d).some(g=>u(d[g],g)))},every:function(d,u){return!d||(Array.isArray(d)?d.every(u):Object.keys(d).every(g=>u(d[g],g)))},map:function(d,u){return d?Array.isArray(d)?d.map(u):Object.keys(d).map(g=>u(d[g],g)):[]},keyBy:(d,u)=>d.reduce((g,v)=>(g[v[u]]=v,g),{}),isEqual:function(d,u){let g=typeof d,v=typeof u,C=Array.isArray(d),b=Array.isArray(u),P;if(g!==v)return!1;switch(typeof d){case"object":if(C||b)return!(!C||!b)&&d.length===u.length&&d.every((T,w)=>{let I=u[w];return c.isEqual(T,I)});if(d===null||u===null)return d===u;if(P=Object.keys(d),Object.keys(u).length!==P.length)return!1;for(let T of P)if(!u.hasOwnProperty(T))return!1;return c.every(d,(T,w)=>{let I=u[w];return c.isEqual(T,I)});default:return d===u}},escapeHtml(d){let u=n.exec(d);if(!u)return d;let g="",v="",C=0,b=u.index;for(;b":v=">";break;default:continue}C!==b&&(g+=d.substring(C,b)),C=b+1,g+=v}return C!==b?g+d.substring(C,b):g},strcmp:(d,u)=>du?1:0,isUndefined:d=>o.call(d)==="[object Undefined]",isObject:d=>o.call(d)==="[object Object]",deepMerge(){let d=arguments[0]||{},{length:u}=arguments,g,v,C;function b(P,T){g=d[T],C=Array.isArray(P),c.isObject(P)||C?(C?(C=!1,v=g&&Array.isArray(g)?g:[]):v=g&&c.isObject(g)?g:{},d[T]=c.deepMerge(v,P)):c.isUndefined(P)||(d[T]=P)}for(let P=0;P&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,u={nop(){},promiseImmediate:g=>new Promise(v=>{o.setImmediate?n(()=>{v(g)}):setTimeout(()=>{v(g)},1)}),inherits:function(g,v,C,b){g.super_=v,b||(b=C,C=null),C&&Object.keys(C).forEach(T=>{Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(C,T))});let P={constructor:{value:g,enumerable:!1,writable:!1,configurable:!0}};b&&Object.keys(b).forEach(T=>{P[T]=Object.getOwnPropertyDescriptor(b,T)}),g.prototype=Object.create(v.prototype,P)},dateToExcel:(g,v)=>25569+g.getTime()/864e5-(v?1462:0),excelToDate(g,v){let C=Math.round(24*(g-25569+(v?1462:0))*3600*1e3);return new Date(C)},parsePath(g){let v=g.lastIndexOf("/");return{path:g.substring(0,v),name:g.substring(v+1)}},getRelsPath(g){let v=u.parsePath(g);return`${v.path}/_rels/${v.name}.rels`},xmlEncode(g){let v=d.exec(g);if(!v)return g;let C="",b="",P=0,T=v.index;for(;T=11&&w!==13)){b="";break}continue}P!==T&&(C+=g.substring(P,T)),P=T+1,b&&(C+=b)}return P!==T?C+g.substring(P,T):C},xmlDecode:g=>g.replace(/&([a-z]*);/g,v=>{switch(v){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return v}}),validInt(g){let v=parseInt(g,10);return Number.isNaN(v)?0:v},isDateFmt(g){return g?(g=(g=g.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:g=>new Promise(v=>{c.access(g,c.constants.F_OK,C=>{v(!C)})})},toIsoDateString:g=>g.toIsoString().subsstr(0,10),parseBoolean:g=>g===!0||g==="true"||g===1||g==="1"};a.exports=u}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,a,t){"use strict";let o=e("./under-dash"),n=e("./utils");function c(g,v,C){g.push(` ${v}="${n.xmlEncode(C.toString())}"`)}function d(g,v){if(v){let C=[];o.each(v,(b,P)=>{b!==void 0&&c(C,P,b)}),g.push(C.join(""))}}class u{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(v){let C=this._xml;C.push(" +}`;var uo=I6(function(){return Go(ct,yn+"return "+Bi).apply(e,Ft)});if(uo.source=Bi,CP(uo))throw uo;return uo}function kZ(A){return Qo(A).toLowerCase()}function BZ(A){return Qo(A).toUpperCase()}function RZ(A,V,te){if(A=Qo(A),A&&(te||V===e))return VE(A);if(!A||!(V=bl(V)))return A;var we=ds(A),He=ds(V),ct=qE(we,He),Ft=zE(we,He)+1;return $c(we,ct,Ft).join("")}function NZ(A,V,te){if(A=Qo(A),A&&(te||V===e))return A.slice(0,GE(A)+1);if(!A||!(V=bl(V)))return A;var we=ds(A),He=zE(we,ds(V))+1;return $c(we,0,He).join("")}function LZ(A,V,te){if(A=Qo(A),A&&(te||V===e))return A.replace(Rt,"");if(!A||!(V=bl(V)))return A;var we=ds(A),He=qE(we,ds(V));return $c(we,He).join("")}function VZ(A,V){var te=de,we=be;if(Ia(V)){var He="separator"in V?V.separator:He;te="length"in V?co(V.length):te,we="omission"in V?bl(V.omission):we}A=Qo(A);var ct=A.length;if(ud(A)){var Ft=ds(A);ct=Ft.length}if(te>=ct)return A;var $t=te-fd(we);if($t<1)return we;var Xt=Ft?$c(Ft,0,$t).join(""):A.slice(0,$t);if(He===e)return Xt+we;if(Ft&&($t+=Xt.length-$t),vP(He)){if(A.slice($t).search(He)){var Di,Ii=Xt;for(He.global||(He=BS(He.source,Qo(ln.exec(He))+"g")),He.lastIndex=0;Di=He.exec(Ii);)var Bi=Di.index;Xt=Xt.slice(0,Bi===e?$t:Bi)}}else if(A.indexOf(bl(He),$t)!=$t){var tn=Xt.lastIndexOf(He);tn>-1&&(Xt=Xt.slice(0,tn))}return Xt+we}function qZ(A){return A=Qo(A),A&&Un.test(A)?A.replace(En,hQ):A}var zZ=xd(function(A,V,te){return A+(te?" ":"")+V.toUpperCase()}),yP=OI("toUpperCase");function E6(A,V,te){return A=Qo(A),V=te?e:V,V===e?pQ(A)?CQ(A):tQ(A):A.match(V)||[]}var I6=_o(function(A,V){try{return vl(A,e,V)}catch(te){return CP(te)?te:new no(te)}}),HZ=pc(function(A,V){return Rl(V,function(te){te=Ns(te),sc(A,te,gP(A[te],A))}),A});function GZ(A){var V=A==null?0:A.length,te=Vn();return A=V?Ta(A,function(we){if(typeof we[1]!="function")throw new Nl(n);return[te(we[0]),we[1]]}):[],_o(function(we){for(var He=-1;++HeL)return[];var te=$,we=Lr(A,$);V=Vn(V),A-=$;for(var He=AS(we,V);++te0||V<0)?new To(te):(A<0?te=te.takeRight(-A):A&&(te=te.drop(A)),V!==e&&(V=co(V),te=V<0?te.dropRight(-V):te.take(V-A)),te)},To.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},To.prototype.toArray=function(){return this.take($)},Bs(To.prototype,function(A,V){var te=/^(?:filter|find|map|reject)|While$/.test(V),we=/^(?:head|last)$/.test(V),He=ot[we?"take"+(V=="last"?"Right":""):V],ct=we||/^find/.test(V);He&&(ot.prototype[V]=function(){var Ft=this.__wrapped__,$t=we?[1]:arguments,Xt=Ft instanceof To,Di=$t[0],Ii=Xt||lo(Ft),Bi=function(Po){var Io=He.apply(ot,Lc([Po],$t));return we&&tn?Io[0]:Io};Ii&&te&&typeof Di=="function"&&Di.length!=1&&(Xt=Ii=!1);var tn=this.__chain__,yn=!!this.__actions__.length,qn=ct&&!tn,uo=Xt&&!yn;if(!ct&&Ii){Ft=uo?Ft:new To(this);var zn=A.apply(Ft,$t);return zn.__actions__.push({func:L1,args:[Bi],thisArg:e}),new Ll(zn,tn)}return qn&&uo?A.apply(this,$t):(zn=this.thru(Bi),qn?we?zn.value()[0]:zn.value():zn)})}),Rl(["pop","push","shift","sort","splice","unshift"],function(A){var V=p1[A],te=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",we=/^(?:pop|shift)$/.test(A);ot.prototype[A]=function(){var He=arguments;if(we&&!this.__chain__){var ct=this.value();return V.apply(lo(ct)?ct:[],He)}return this[te](function(Ft){return V.apply(lo(Ft)?Ft:[],He)})}}),Bs(To.prototype,function(A,V){var te=ot[V];if(te){var we=te.name+"";Wo.call(_d,we)||(_d[we]=[]),_d[we].push({name:V,func:te})}}),_d[O1(e,I).name]=[{name:"wrapper",func:e}],To.prototype.clone=qQ,To.prototype.reverse=zQ,To.prototype.value=HQ,ot.prototype.at=_K,ot.prototype.chain=CK,ot.prototype.commit=vK,ot.prototype.next=xK,ot.prototype.plant=yK,ot.prototype.reverse=SK,ot.prototype.toJSON=ot.prototype.valueOf=ot.prototype.value=PK,ot.prototype.first=ot.prototype.head,H0&&(ot.prototype[H0]=bK),ot},qc=vQ();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fr._=qc,define(function(){return qc})):xm?((xm.exports=qc)._=qc,PS._=qc):fr._=qc}).call(Qd)});var $A=pt(Ag=>{"use strict";Ag.byteLength=lle;Ag.toByteArray=cle;Ag.fromByteArray=dle;var Ks=[],es=[],rle=typeof Uint8Array<"u"?Uint8Array:Array,_w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(qm=0,GA=_w.length;qm0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=a);var o=t===a?0:4-t%4;return[t,o]}function lle(e){var a=jA(e),t=a[0],o=a[1];return(t+o)*3/4-o}function sle(e,a,t){return(a+t)*3/4-t}function cle(e){var a,t=jA(e),o=t[0],n=t[1],c=new rle(sle(e,o,n)),d=0,u=n>0?o-4:o,g;for(g=0;g>16&255,c[d++]=a>>8&255,c[d++]=a&255;return n===2&&(a=es[e.charCodeAt(g)]<<2|es[e.charCodeAt(g+1)]>>4,c[d++]=a&255),n===1&&(a=es[e.charCodeAt(g)]<<10|es[e.charCodeAt(g+1)]<<4|es[e.charCodeAt(g+2)]>>2,c[d++]=a>>8&255,c[d++]=a&255),c}function ple(e){return Ks[e>>18&63]+Ks[e>>12&63]+Ks[e>>6&63]+Ks[e&63]}function mle(e,a,t){for(var o,n=[],c=a;cu?u:d+c));return o===1?(a=e[t-1],n.push(Ks[a>>2]+Ks[a<<4&63]+"==")):o===2&&(a=(e[t-2]<<8)+e[t-1],n.push(Ks[a>>10]+Ks[a>>4&63]+Ks[a<<2&63]+"=")),n.join("")}});var UA=pt(Cw=>{Cw.read=function(e,a,t,o,n){var c,d,u=n*8-o-1,g=(1<>1,C=-7,b=t?n-1:0,P=t?-1:1,T=e[a+b];for(b+=P,c=T&(1<<-C)-1,T>>=-C,C+=u;C>0;c=c*256+e[a+b],b+=P,C-=8);for(d=c&(1<<-C)-1,c>>=-C,C+=o;C>0;d=d*256+e[a+b],b+=P,C-=8);if(c===0)c=1-v;else{if(c===g)return d?NaN:(T?-1:1)*(1/0);d=d+Math.pow(2,o),c=c-v}return(T?-1:1)*d*Math.pow(2,c-o)};Cw.write=function(e,a,t,o,n,c){var d,u,g,v=c*8-n-1,C=(1<>1,P=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=o?0:c-1,w=o?1:-1,I=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(u=isNaN(a)?1:0,d=C):(d=Math.floor(Math.log(a)/Math.LN2),a*(g=Math.pow(2,-d))<1&&(d--,g*=2),d+b>=1?a+=P/g:a+=P*Math.pow(2,1-b),a*g>=2&&(d++,g/=2),d+b>=C?(u=0,d=C):d+b>=1?(u=(a*g-1)*Math.pow(2,n),d=d+b):(u=a*Math.pow(2,b-1)*Math.pow(2,n),d=0));n>=8;e[t+T]=u&255,T+=w,u/=256,n-=8);for(d=d<0;e[t+T]=d&255,T+=w,d/=256,v-=8);e[t+T-w]|=I*128}});var aF=pt(Kd=>{"use strict";var vw=$A(),Yd=UA(),WA=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Kd.Buffer=Ti;Kd.SlowBuffer=Cle;Kd.INSPECT_MAX_BYTES=50;var Fg=2147483647;Kd.kMaxLength=Fg;Ti.TYPED_ARRAY_SUPPORT=ule();!Ti.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ule(){try{var e=new Uint8Array(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,Uint8Array.prototype),Object.setPrototypeOf(e,a),e.foo()===42}catch{return!1}}Object.defineProperty(Ti.prototype,"parent",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.buffer}});Object.defineProperty(Ti.prototype,"offset",{enumerable:!0,get:function(){if(Ti.isBuffer(this))return this.byteOffset}});function yc(e){if(e>Fg)throw new RangeError('The value "'+e+'" is invalid for option "size"');var a=new Uint8Array(e);return Object.setPrototypeOf(a,Ti.prototype),a}function Ti(e,a,t){if(typeof e=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Sw(e)}return YA(e,a,t)}Ti.poolSize=8192;function YA(e,a,t){if(typeof e=="string")return hle(e,a);if(ArrayBuffer.isView(e))return gle(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Xs(e,ArrayBuffer)||e&&Xs(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Xs(e,SharedArrayBuffer)||e&&Xs(e.buffer,SharedArrayBuffer)))return bw(e,a,t);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return Ti.from(o,a,t);var n=_le(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Ti.from(e[Symbol.toPrimitive]("string"),a,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Ti.from=function(e,a,t){return YA(e,a,t)};Object.setPrototypeOf(Ti.prototype,Uint8Array.prototype);Object.setPrototypeOf(Ti,Uint8Array);function KA(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function fle(e,a,t){return KA(e),e<=0?yc(e):a!==void 0?typeof t=="string"?yc(e).fill(a,t):yc(e).fill(a):yc(e)}Ti.alloc=function(e,a,t){return fle(e,a,t)};function Sw(e){return KA(e),yc(e<0?0:Pw(e)|0)}Ti.allocUnsafe=function(e){return Sw(e)};Ti.allocUnsafeSlow=function(e){return Sw(e)};function hle(e,a){if((typeof a!="string"||a==="")&&(a="utf8"),!Ti.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var t=XA(e,a)|0,o=yc(t),n=o.write(e,a);return n!==t&&(o=o.slice(0,n)),o}function xw(e){for(var a=e.length<0?0:Pw(e.length)|0,t=yc(a),o=0;o=Fg)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Fg.toString(16)+" bytes");return e|0}function Cle(e){return+e!=e&&(e=0),Ti.alloc(+e)}Ti.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==Ti.prototype};Ti.compare=function(a,t){if(Xs(a,Uint8Array)&&(a=Ti.from(a,a.offset,a.byteLength)),Xs(t,Uint8Array)&&(t=Ti.from(t,t.offset,t.byteLength)),!Ti.isBuffer(a)||!Ti.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===t)return 0;for(var o=a.length,n=t.length,c=0,d=Math.min(o,n);cn.length?Ti.from(d).copy(n,c):Uint8Array.prototype.set.call(n,d,c);else if(Ti.isBuffer(d))d.copy(n,c);else throw new TypeError('"list" argument must be an Array of Buffers');c+=d.length}return n};function XA(e,a){if(Ti.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Xs(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var t=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&t===0)return 0;for(var n=!1;;)switch(a){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return yw(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return oF(e).length;default:if(n)return o?-1:yw(e).length;a=(""+a).toLowerCase(),n=!0}}Ti.byteLength=XA;function vle(e,a,t){var o=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,a>>>=0,t<=a))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ele(this,a,t);case"utf8":case"utf-8":return eF(this,a,t);case"ascii":return Mle(this,a,t);case"latin1":case"binary":return Dle(this,a,t);case"base64":return wle(this,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ile(this,a,t);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}Ti.prototype._isBuffer=!0;function zm(e,a,t){var o=e[a];e[a]=e[t],e[t]=o}Ti.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(a+=" ... "),""};WA&&(Ti.prototype[WA]=Ti.prototype.inspect);Ti.prototype.compare=function(a,t,o,n,c){if(Xs(a,Uint8Array)&&(a=Ti.from(a,a.offset,a.byteLength)),!Ti.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof a);if(t===void 0&&(t=0),o===void 0&&(o=a?a.length:0),n===void 0&&(n=0),c===void 0&&(c=this.length),t<0||o>a.length||n<0||c>this.length)throw new RangeError("out of range index");if(n>=c&&t>=o)return 0;if(n>=c)return-1;if(t>=o)return 1;if(t>>>=0,o>>>=0,n>>>=0,c>>>=0,this===a)return 0;for(var d=c-n,u=o-t,g=Math.min(d,u),v=this.slice(n,c),C=a.slice(t,o),b=0;b2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ww(t)&&(t=n?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(n)return-1;t=e.length-1}else if(t<0)if(n)t=0;else return-1;if(typeof a=="string"&&(a=Ti.from(a,o)),Ti.isBuffer(a))return a.length===0?-1:QA(e,a,t,o,n);if(typeof a=="number")return a=a&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,a,t):Uint8Array.prototype.lastIndexOf.call(e,a,t):QA(e,[a],t,o,n);throw new TypeError("val must be string, number or Buffer")}function QA(e,a,t,o,n){var c=1,d=e.length,u=a.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||a.length<2)return-1;c=2,d/=2,u/=2,t/=2}function g(T,w){return c===1?T[w]:T.readUInt16BE(w*c)}var v;if(n){var C=-1;for(v=t;vd&&(t=d-u),v=t;v>=0;v--){for(var b=!0,P=0;Pn&&(o=n)):o=n;var c=a.length;o>c/2&&(o=c/2);for(var d=0;d>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var c=this.length-t;if((o===void 0||o>c)&&(o=c),a.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return xle(this,a,t,o);case"utf8":case"utf-8":return ble(this,a,t,o);case"ascii":case"latin1":case"binary":return yle(this,a,t,o);case"base64":return Sle(this,a,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ple(this,a,t,o);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}};Ti.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wle(e,a,t){return a===0&&t===e.length?vw.fromByteArray(e):vw.fromByteArray(e.slice(a,t))}function eF(e,a,t){t=Math.min(e.length,t);for(var o=[],n=a;n239?4:c>223?3:c>191?2:1;if(n+u<=t){var g,v,C,b;switch(u){case 1:c<128&&(d=c);break;case 2:g=e[n+1],(g&192)===128&&(b=(c&31)<<6|g&63,b>127&&(d=b));break;case 3:g=e[n+1],v=e[n+2],(g&192)===128&&(v&192)===128&&(b=(c&15)<<12|(g&63)<<6|v&63,b>2047&&(b<55296||b>57343)&&(d=b));break;case 4:g=e[n+1],v=e[n+2],C=e[n+3],(g&192)===128&&(v&192)===128&&(C&192)===128&&(b=(c&15)<<18|(g&63)<<12|(v&63)<<6|C&63,b>65535&&b<1114112&&(d=b))}}d===null?(d=65533,u=1):d>65535&&(d-=65536,o.push(d>>>10&1023|55296),d=56320|d&1023),o.push(d),n+=u}return Tle(o)}var JA=4096;function Tle(e){var a=e.length;if(a<=JA)return String.fromCharCode.apply(String,e);for(var t="",o=0;oo)&&(t=o);for(var n="",c=a;co&&(a=o),t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),tt)throw new RangeError("Trying to access beyond buffer length")}Ti.prototype.readUintLE=Ti.prototype.readUIntLE=function(a,t,o){a=a>>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=this[a],c=1,d=0;++d>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=this[a+--t],c=1;t>0&&(c*=256);)n+=this[a+--t]*c;return n};Ti.prototype.readUint8=Ti.prototype.readUInt8=function(a,t){return a=a>>>0,t||Mr(a,1,this.length),this[a]};Ti.prototype.readUint16LE=Ti.prototype.readUInt16LE=function(a,t){return a=a>>>0,t||Mr(a,2,this.length),this[a]|this[a+1]<<8};Ti.prototype.readUint16BE=Ti.prototype.readUInt16BE=function(a,t){return a=a>>>0,t||Mr(a,2,this.length),this[a]<<8|this[a+1]};Ti.prototype.readUint32LE=Ti.prototype.readUInt32LE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216};Ti.prototype.readUint32BE=Ti.prototype.readUInt32BE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])};Ti.prototype.readIntLE=function(a,t,o){a=a>>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=this[a],c=1,d=0;++d=c&&(n-=Math.pow(2,8*t)),n};Ti.prototype.readIntBE=function(a,t,o){a=a>>>0,t=t>>>0,o||Mr(a,t,this.length);for(var n=t,c=1,d=this[a+--n];n>0&&(c*=256);)d+=this[a+--n]*c;return c*=128,d>=c&&(d-=Math.pow(2,8*t)),d};Ti.prototype.readInt8=function(a,t){return a=a>>>0,t||Mr(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]};Ti.prototype.readInt16LE=function(a,t){a=a>>>0,t||Mr(a,2,this.length);var o=this[a]|this[a+1]<<8;return o&32768?o|4294901760:o};Ti.prototype.readInt16BE=function(a,t){a=a>>>0,t||Mr(a,2,this.length);var o=this[a+1]|this[a]<<8;return o&32768?o|4294901760:o};Ti.prototype.readInt32LE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};Ti.prototype.readInt32BE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};Ti.prototype.readFloatLE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),Yd.read(this,a,!0,23,4)};Ti.prototype.readFloatBE=function(a,t){return a=a>>>0,t||Mr(a,4,this.length),Yd.read(this,a,!1,23,4)};Ti.prototype.readDoubleLE=function(a,t){return a=a>>>0,t||Mr(a,8,this.length),Yd.read(this,a,!0,52,8)};Ti.prototype.readDoubleBE=function(a,t){return a=a>>>0,t||Mr(a,8,this.length),Yd.read(this,a,!1,52,8)};function fl(e,a,t,o,n,c){if(!Ti.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>n||ae.length)throw new RangeError("Index out of range")}Ti.prototype.writeUintLE=Ti.prototype.writeUIntLE=function(a,t,o,n){if(a=+a,t=t>>>0,o=o>>>0,!n){var c=Math.pow(2,8*o)-1;fl(this,a,t,o,c,0)}var d=1,u=0;for(this[t]=a&255;++u>>0,o=o>>>0,!n){var c=Math.pow(2,8*o)-1;fl(this,a,t,o,c,0)}var d=o-1,u=1;for(this[t+d]=a&255;--d>=0&&(u*=256);)this[t+d]=a/u&255;return t+o};Ti.prototype.writeUint8=Ti.prototype.writeUInt8=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,1,255,0),this[t]=a&255,t+1};Ti.prototype.writeUint16LE=Ti.prototype.writeUInt16LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,65535,0),this[t]=a&255,this[t+1]=a>>>8,t+2};Ti.prototype.writeUint16BE=Ti.prototype.writeUInt16BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,65535,0),this[t]=a>>>8,this[t+1]=a&255,t+2};Ti.prototype.writeUint32LE=Ti.prototype.writeUInt32LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,4294967295,0),this[t+3]=a>>>24,this[t+2]=a>>>16,this[t+1]=a>>>8,this[t]=a&255,t+4};Ti.prototype.writeUint32BE=Ti.prototype.writeUInt32BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,4294967295,0),this[t]=a>>>24,this[t+1]=a>>>16,this[t+2]=a>>>8,this[t+3]=a&255,t+4};Ti.prototype.writeIntLE=function(a,t,o,n){if(a=+a,t=t>>>0,!n){var c=Math.pow(2,8*o-1);fl(this,a,t,o,c-1,-c)}var d=0,u=1,g=0;for(this[t]=a&255;++d>0)-g&255;return t+o};Ti.prototype.writeIntBE=function(a,t,o,n){if(a=+a,t=t>>>0,!n){var c=Math.pow(2,8*o-1);fl(this,a,t,o,c-1,-c)}var d=o-1,u=1,g=0;for(this[t+d]=a&255;--d>=0&&(u*=256);)a<0&&g===0&&this[t+d+1]!==0&&(g=1),this[t+d]=(a/u>>0)-g&255;return t+o};Ti.prototype.writeInt8=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,1,127,-128),a<0&&(a=255+a+1),this[t]=a&255,t+1};Ti.prototype.writeInt16LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,32767,-32768),this[t]=a&255,this[t+1]=a>>>8,t+2};Ti.prototype.writeInt16BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,2,32767,-32768),this[t]=a>>>8,this[t+1]=a&255,t+2};Ti.prototype.writeInt32LE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,2147483647,-2147483648),this[t]=a&255,this[t+1]=a>>>8,this[t+2]=a>>>16,this[t+3]=a>>>24,t+4};Ti.prototype.writeInt32BE=function(a,t,o){return a=+a,t=t>>>0,o||fl(this,a,t,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[t]=a>>>24,this[t+1]=a>>>16,this[t+2]=a>>>8,this[t+3]=a&255,t+4};function tF(e,a,t,o,n,c){if(t+o>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function iF(e,a,t,o,n){return a=+a,t=t>>>0,n||tF(e,a,t,4,34028234663852886e22,-34028234663852886e22),Yd.write(e,a,t,o,23,4),t+4}Ti.prototype.writeFloatLE=function(a,t,o){return iF(this,a,t,!0,o)};Ti.prototype.writeFloatBE=function(a,t,o){return iF(this,a,t,!1,o)};function nF(e,a,t,o,n){return a=+a,t=t>>>0,n||tF(e,a,t,8,17976931348623157e292,-17976931348623157e292),Yd.write(e,a,t,o,52,8),t+8}Ti.prototype.writeDoubleLE=function(a,t,o){return nF(this,a,t,!0,o)};Ti.prototype.writeDoubleBE=function(a,t,o){return nF(this,a,t,!1,o)};Ti.prototype.copy=function(a,t,o,n){if(!Ti.isBuffer(a))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),t>=a.length&&(t=a.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),a.length-t>>0,o=o===void 0?this.length:o>>>0,a||(a=0);var d;if(typeof a=="number")for(d=t;d55295&&t<57344){if(!n){if(t>56319){(a-=3)>-1&&c.push(239,191,189);continue}else if(d+1===o){(a-=3)>-1&&c.push(239,191,189);continue}n=t;continue}if(t<56320){(a-=3)>-1&&c.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(a-=3)>-1&&c.push(239,191,189);if(n=null,t<128){if((a-=1)<0)break;c.push(t)}else if(t<2048){if((a-=2)<0)break;c.push(t>>6|192,t&63|128)}else if(t<65536){if((a-=3)<0)break;c.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((a-=4)<0)break;c.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return c}function Fle(e){for(var a=[],t=0;t>8,n=t%256,c.push(n),c.push(o);return c}function oF(e){return vw.toByteArray(Ale(e))}function kg(e,a,t,o){for(var n=0;n=a.length||n>=e.length);++n)a[n+t]=e[n];return n}function Xs(e,a){return e instanceof a||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===a.name}function ww(e){return e!==e}var Ble=(function(){for(var e="0123456789abcdef",a=new Array(256),t=0;t<16;++t)for(var o=t*16,n=0;n<16;++n)a[o+n]=e[t]+e[n];return a})()});var Uk=pt((S1n,$k)=>{function qze(){this.__data__=[],this.size=0}$k.exports=qze});var Km=pt((P1n,Wk)=>{function zze(e,a){return e===a||e!==e&&a!==a}Wk.exports=zze});var af=pt((w1n,Qk)=>{var Hze=Km();function Gze(e,a){for(var t=e.length;t--;)if(Hze(e[t][0],a))return t;return-1}Qk.exports=Gze});var Yk=pt((T1n,Jk)=>{var jze=af(),$ze=Array.prototype,Uze=$ze.splice;function Wze(e){var a=this.__data__,t=jze(a,e);if(t<0)return!1;var o=a.length-1;return t==o?a.pop():Uze.call(a,t,1),--this.size,!0}Jk.exports=Wze});var Xk=pt((M1n,Kk)=>{var Qze=af();function Jze(e){var a=this.__data__,t=Qze(a,e);return t<0?void 0:a[t][1]}Kk.exports=Jze});var eB=pt((D1n,Zk)=>{var Yze=af();function Kze(e){return Yze(this.__data__,e)>-1}Zk.exports=Kze});var iB=pt((E1n,tB)=>{var Xze=af();function Zze(e,a){var t=this.__data__,o=Xze(t,e);return o<0?(++this.size,t.push([e,a])):t[o][1]=a,this}tB.exports=Zze});var rf=pt((I1n,nB)=>{var eHe=Uk(),tHe=Yk(),iHe=Xk(),nHe=eB(),oHe=iB();function s0(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a{var aHe=rf();function rHe(){this.__data__=new aHe,this.size=0}oB.exports=rHe});var lB=pt((A1n,rB)=>{function lHe(e){var a=this.__data__,t=a.delete(e);return this.size=a.size,t}rB.exports=lHe});var cB=pt((F1n,sB)=>{function sHe(e){return this.__data__.get(e)}sB.exports=sHe});var mB=pt((k1n,pB)=>{function cHe(e){return this.__data__.has(e)}pB.exports=cHe});var uT=pt((B1n,dB)=>{var pHe=typeof global=="object"&&global&&global.Object===Object&&global;dB.exports=pHe});var is=pt((R1n,uB)=>{var mHe=uT(),dHe=typeof self=="object"&&self&&self.Object===Object&&self,uHe=mHe||dHe||Function("return this")();uB.exports=uHe});var Xm=pt((N1n,fB)=>{var fHe=is(),hHe=fHe.Symbol;fB.exports=hHe});var CB=pt((L1n,_B)=>{var hB=Xm(),gB=Object.prototype,gHe=gB.hasOwnProperty,_He=gB.toString,lf=hB?hB.toStringTag:void 0;function CHe(e){var a=gHe.call(e,lf),t=e[lf];try{e[lf]=void 0;var o=!0}catch{}var n=_He.call(e);return o&&(a?e[lf]=t:delete e[lf]),n}_B.exports=CHe});var xB=pt((V1n,vB)=>{var vHe=Object.prototype,xHe=vHe.toString;function bHe(e){return xHe.call(e)}vB.exports=bHe});var vp=pt((q1n,SB)=>{var bB=Xm(),yHe=CB(),SHe=xB(),PHe="[object Null]",wHe="[object Undefined]",yB=bB?bB.toStringTag:void 0;function THe(e){return e==null?e===void 0?wHe:PHe:yB&&yB in Object(e)?yHe(e):SHe(e)}SB.exports=THe});var Ml=pt((z1n,PB)=>{function MHe(e){var a=typeof e;return e!=null&&(a=="object"||a=="function")}PB.exports=MHe});var c0=pt((H1n,wB)=>{var DHe=vp(),EHe=Ml(),IHe="[object AsyncFunction]",OHe="[object Function]",AHe="[object GeneratorFunction]",FHe="[object Proxy]";function kHe(e){if(!EHe(e))return!1;var a=DHe(e);return a==OHe||a==AHe||a==IHe||a==FHe}wB.exports=kHe});var MB=pt((G1n,TB)=>{var BHe=is(),RHe=BHe["__core-js_shared__"];TB.exports=RHe});var IB=pt((j1n,EB)=>{var fT=MB(),DB=(function(){var e=/[^.]+$/.exec(fT&&fT.keys&&fT.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function NHe(e){return!!DB&&DB in e}EB.exports=NHe});var hT=pt(($1n,OB)=>{var LHe=Function.prototype,VHe=LHe.toString;function qHe(e){if(e!=null){try{return VHe.call(e)}catch{}try{return e+""}catch{}}return""}OB.exports=qHe});var FB=pt((U1n,AB)=>{var zHe=c0(),HHe=IB(),GHe=Ml(),jHe=hT(),$He=/[\\^$.*+?()[\]{}|]/g,UHe=/^\[object .+?Constructor\]$/,WHe=Function.prototype,QHe=Object.prototype,JHe=WHe.toString,YHe=QHe.hasOwnProperty,KHe=RegExp("^"+JHe.call(YHe).replace($He,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function XHe(e){if(!GHe(e)||HHe(e))return!1;var a=zHe(e)?KHe:UHe;return a.test(jHe(e))}AB.exports=XHe});var BB=pt((W1n,kB)=>{function ZHe(e,a){return e?.[a]}kB.exports=ZHe});var xp=pt((Q1n,RB)=>{var eGe=FB(),tGe=BB();function iGe(e,a){var t=tGe(e,a);return eGe(t)?t:void 0}RB.exports=iGe});var Fv=pt((J1n,NB)=>{var nGe=xp(),oGe=is(),aGe=nGe(oGe,"Map");NB.exports=aGe});var sf=pt((Y1n,LB)=>{var rGe=xp(),lGe=rGe(Object,"create");LB.exports=lGe});var zB=pt((K1n,qB)=>{var VB=sf();function sGe(){this.__data__=VB?VB(null):{},this.size=0}qB.exports=sGe});var GB=pt((X1n,HB)=>{function cGe(e){var a=this.has(e)&&delete this.__data__[e];return this.size-=a?1:0,a}HB.exports=cGe});var $B=pt((Z1n,jB)=>{var pGe=sf(),mGe="__lodash_hash_undefined__",dGe=Object.prototype,uGe=dGe.hasOwnProperty;function fGe(e){var a=this.__data__;if(pGe){var t=a[e];return t===mGe?void 0:t}return uGe.call(a,e)?a[e]:void 0}jB.exports=fGe});var WB=pt((ehn,UB)=>{var hGe=sf(),gGe=Object.prototype,_Ge=gGe.hasOwnProperty;function CGe(e){var a=this.__data__;return hGe?a[e]!==void 0:_Ge.call(a,e)}UB.exports=CGe});var JB=pt((thn,QB)=>{var vGe=sf(),xGe="__lodash_hash_undefined__";function bGe(e,a){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=vGe&&a===void 0?xGe:a,this}QB.exports=bGe});var KB=pt((ihn,YB)=>{var yGe=zB(),SGe=GB(),PGe=$B(),wGe=WB(),TGe=JB();function p0(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a{var XB=KB(),MGe=rf(),DGe=Fv();function EGe(){this.size=0,this.__data__={hash:new XB,map:new(DGe||MGe),string:new XB}}ZB.exports=EGe});var iR=pt((ohn,tR)=>{function IGe(e){var a=typeof e;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?e!=="__proto__":e===null}tR.exports=IGe});var cf=pt((ahn,nR)=>{var OGe=iR();function AGe(e,a){var t=e.__data__;return OGe(a)?t[typeof a=="string"?"string":"hash"]:t.map}nR.exports=AGe});var aR=pt((rhn,oR)=>{var FGe=cf();function kGe(e){var a=FGe(this,e).delete(e);return this.size-=a?1:0,a}oR.exports=kGe});var lR=pt((lhn,rR)=>{var BGe=cf();function RGe(e){return BGe(this,e).get(e)}rR.exports=RGe});var cR=pt((shn,sR)=>{var NGe=cf();function LGe(e){return NGe(this,e).has(e)}sR.exports=LGe});var mR=pt((chn,pR)=>{var VGe=cf();function qGe(e,a){var t=VGe(this,e),o=t.size;return t.set(e,a),this.size+=t.size==o?0:1,this}pR.exports=qGe});var kv=pt((phn,dR)=>{var zGe=eR(),HGe=aR(),GGe=lR(),jGe=cR(),$Ge=mR();function m0(e){var a=-1,t=e==null?0:e.length;for(this.clear();++a{var UGe=rf(),WGe=Fv(),QGe=kv(),JGe=200;function YGe(e,a){var t=this.__data__;if(t instanceof UGe){var o=t.__data__;if(!WGe||o.length{var KGe=rf(),XGe=aB(),ZGe=lB(),eje=cB(),tje=mB(),ije=fR();function d0(e){var a=this.__data__=new KGe(e);this.size=a.size}d0.prototype.clear=XGe;d0.prototype.delete=ZGe;d0.prototype.get=eje;d0.prototype.has=tje;d0.prototype.set=ije;hR.exports=d0});var Bv=pt((uhn,gR)=>{function nje(e,a){for(var t=-1,o=e==null?0:e.length;++t{var oje=xp(),aje=(function(){try{var e=oje(Object,"defineProperty");return e({},"",{}),e}catch{}})();_R.exports=aje});var mf=pt((hhn,vR)=>{var CR=gT();function rje(e,a,t){a=="__proto__"&&CR?CR(e,a,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[a]=t}vR.exports=rje});var df=pt((ghn,xR)=>{var lje=mf(),sje=Km(),cje=Object.prototype,pje=cje.hasOwnProperty;function mje(e,a,t){var o=e[a];(!(pje.call(e,a)&&sje(o,t))||t===void 0&&!(a in e))&&lje(e,a,t)}xR.exports=mje});var u0=pt((_hn,bR)=>{var dje=df(),uje=mf();function fje(e,a,t,o){var n=!t;t||(t={});for(var c=-1,d=a.length;++c{function hje(e,a){for(var t=-1,o=Array(e);++t{function gje(e){return e!=null&&typeof e=="object"}PR.exports=gje});var TR=pt((xhn,wR)=>{var _je=vp(),Cje=Es(),vje="[object Arguments]";function xje(e){return Cje(e)&&_je(e)==vje}wR.exports=xje});var f0=pt((bhn,ER)=>{var MR=TR(),bje=Es(),DR=Object.prototype,yje=DR.hasOwnProperty,Sje=DR.propertyIsEnumerable,Pje=MR((function(){return arguments})())?MR:function(e){return bje(e)&&yje.call(e,"callee")&&!Sje.call(e,"callee")};ER.exports=Pje});var $a=pt((yhn,IR)=>{var wje=Array.isArray;IR.exports=wje});var AR=pt((Shn,OR)=>{function Tje(){return!1}OR.exports=Tje});var Zm=pt((uf,h0)=>{var Mje=is(),Dje=AR(),BR=typeof uf=="object"&&uf&&!uf.nodeType&&uf,FR=BR&&typeof h0=="object"&&h0&&!h0.nodeType&&h0,Eje=FR&&FR.exports===BR,kR=Eje?Mje.Buffer:void 0,Ije=kR?kR.isBuffer:void 0,Oje=Ije||Dje;h0.exports=Oje});var ff=pt((Phn,RR)=>{var Aje=9007199254740991,Fje=/^(?:0|[1-9]\d*)$/;function kje(e,a){var t=typeof e;return a=a??Aje,!!a&&(t=="number"||t!="symbol"&&Fje.test(e))&&e>-1&&e%1==0&&e{var Bje=9007199254740991;function Rje(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bje}NR.exports=Rje});var VR=pt((Thn,LR)=>{var Nje=vp(),Lje=Rv(),Vje=Es(),qje="[object Arguments]",zje="[object Array]",Hje="[object Boolean]",Gje="[object Date]",jje="[object Error]",$je="[object Function]",Uje="[object Map]",Wje="[object Number]",Qje="[object Object]",Jje="[object RegExp]",Yje="[object Set]",Kje="[object String]",Xje="[object WeakMap]",Zje="[object ArrayBuffer]",e$e="[object DataView]",t$e="[object Float32Array]",i$e="[object Float64Array]",n$e="[object Int8Array]",o$e="[object Int16Array]",a$e="[object Int32Array]",r$e="[object Uint8Array]",l$e="[object Uint8ClampedArray]",s$e="[object Uint16Array]",c$e="[object Uint32Array]",ba={};ba[t$e]=ba[i$e]=ba[n$e]=ba[o$e]=ba[a$e]=ba[r$e]=ba[l$e]=ba[s$e]=ba[c$e]=!0;ba[qje]=ba[zje]=ba[Zje]=ba[Hje]=ba[e$e]=ba[Gje]=ba[jje]=ba[$je]=ba[Uje]=ba[Wje]=ba[Qje]=ba[Jje]=ba[Yje]=ba[Kje]=ba[Xje]=!1;function p$e(e){return Vje(e)&&Lje(e.length)&&!!ba[Nje(e)]}LR.exports=p$e});var hf=pt((Mhn,qR)=>{function m$e(e){return function(a){return e(a)}}qR.exports=m$e});var Nv=pt((gf,g0)=>{var d$e=uT(),zR=typeof gf=="object"&&gf&&!gf.nodeType&&gf,_f=zR&&typeof g0=="object"&&g0&&!g0.nodeType&&g0,u$e=_f&&_f.exports===zR,_T=u$e&&d$e.process,f$e=(function(){try{var e=_f&&_f.require&&_f.require("util").types;return e||_T&&_T.binding&&_T.binding("util")}catch{}})();g0.exports=f$e});var _0=pt((Dhn,jR)=>{var h$e=VR(),g$e=hf(),HR=Nv(),GR=HR&&HR.isTypedArray,_$e=GR?g$e(GR):h$e;jR.exports=_$e});var CT=pt((Ehn,$R)=>{var C$e=SR(),v$e=f0(),x$e=$a(),b$e=Zm(),y$e=ff(),S$e=_0(),P$e=Object.prototype,w$e=P$e.hasOwnProperty;function T$e(e,a){var t=x$e(e),o=!t&&v$e(e),n=!t&&!o&&b$e(e),c=!t&&!o&&!n&&S$e(e),d=t||o||n||c,u=d?C$e(e.length,String):[],g=u.length;for(var v in e)(a||w$e.call(e,v))&&!(d&&(v=="length"||n&&(v=="offset"||v=="parent")||c&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||y$e(v,g)))&&u.push(v);return u}$R.exports=T$e});var Cf=pt((Ihn,UR)=>{var M$e=Object.prototype;function D$e(e){var a=e&&e.constructor,t=typeof a=="function"&&a.prototype||M$e;return e===t}UR.exports=D$e});var vT=pt((Ohn,WR)=>{function E$e(e,a){return function(t){return e(a(t))}}WR.exports=E$e});var JR=pt((Ahn,QR)=>{var I$e=vT(),O$e=I$e(Object.keys,Object);QR.exports=O$e});var Lv=pt((Fhn,YR)=>{var A$e=Cf(),F$e=JR(),k$e=Object.prototype,B$e=k$e.hasOwnProperty;function R$e(e){if(!A$e(e))return F$e(e);var a=[];for(var t in Object(e))B$e.call(e,t)&&t!="constructor"&&a.push(t);return a}YR.exports=R$e});var tc=pt((khn,KR)=>{var N$e=c0(),L$e=Rv();function V$e(e){return e!=null&&L$e(e.length)&&!N$e(e)}KR.exports=V$e});var Dc=pt((Bhn,XR)=>{var q$e=CT(),z$e=Lv(),H$e=tc();function G$e(e){return H$e(e)?q$e(e):z$e(e)}XR.exports=G$e});var e9=pt((Rhn,ZR)=>{var j$e=u0(),$$e=Dc();function U$e(e,a){return e&&j$e(a,$$e(a),e)}ZR.exports=U$e});var i9=pt((Nhn,t9)=>{function W$e(e){var a=[];if(e!=null)for(var t in Object(e))a.push(t);return a}t9.exports=W$e});var o9=pt((Lhn,n9)=>{var Q$e=Ml(),J$e=Cf(),Y$e=i9(),K$e=Object.prototype,X$e=K$e.hasOwnProperty;function Z$e(e){if(!Q$e(e))return Y$e(e);var a=J$e(e),t=[];for(var o in e)o=="constructor"&&(a||!X$e.call(e,o))||t.push(o);return t}n9.exports=Z$e});var bp=pt((Vhn,a9)=>{var eUe=CT(),tUe=o9(),iUe=tc();function nUe(e){return iUe(e)?eUe(e,!0):tUe(e)}a9.exports=nUe});var l9=pt((qhn,r9)=>{var oUe=u0(),aUe=bp();function rUe(e,a){return e&&oUe(a,aUe(a),e)}r9.exports=rUe});var xT=pt((vf,C0)=>{var lUe=is(),m9=typeof vf=="object"&&vf&&!vf.nodeType&&vf,s9=m9&&typeof C0=="object"&&C0&&!C0.nodeType&&C0,sUe=s9&&s9.exports===m9,c9=sUe?lUe.Buffer:void 0,p9=c9?c9.allocUnsafe:void 0;function cUe(e,a){if(a)return e.slice();var t=e.length,o=p9?p9(t):new e.constructor(t);return e.copy(o),o}C0.exports=cUe});var bT=pt((zhn,d9)=>{function pUe(e,a){var t=-1,o=e.length;for(a||(a=Array(o));++t{function mUe(e,a){for(var t=-1,o=e==null?0:e.length,n=0,c=[];++t{function dUe(){return[]}f9.exports=dUe});var Vv=pt((jhn,g9)=>{var uUe=yT(),fUe=ST(),hUe=Object.prototype,gUe=hUe.propertyIsEnumerable,h9=Object.getOwnPropertySymbols,_Ue=h9?function(e){return e==null?[]:(e=Object(e),uUe(h9(e),function(a){return gUe.call(e,a)}))}:fUe;g9.exports=_Ue});var C9=pt(($hn,_9)=>{var CUe=u0(),vUe=Vv();function xUe(e,a){return CUe(e,vUe(e),a)}_9.exports=xUe});var qv=pt((Uhn,v9)=>{function bUe(e,a){for(var t=-1,o=a.length,n=e.length;++t{var yUe=vT(),SUe=yUe(Object.getPrototypeOf,Object);x9.exports=SUe});var PT=pt((Qhn,b9)=>{var PUe=qv(),wUe=xf(),TUe=Vv(),MUe=ST(),DUe=Object.getOwnPropertySymbols,EUe=DUe?function(e){for(var a=[];e;)PUe(a,TUe(e)),e=wUe(e);return a}:MUe;b9.exports=EUe});var S9=pt((Jhn,y9)=>{var IUe=u0(),OUe=PT();function AUe(e,a){return IUe(e,OUe(e),a)}y9.exports=AUe});var wT=pt((Yhn,P9)=>{var FUe=qv(),kUe=$a();function BUe(e,a,t){var o=a(e);return kUe(e)?o:FUe(o,t(e))}P9.exports=BUe});var TT=pt((Khn,w9)=>{var RUe=wT(),NUe=Vv(),LUe=Dc();function VUe(e){return RUe(e,LUe,NUe)}w9.exports=VUe});var M9=pt((Xhn,T9)=>{var qUe=wT(),zUe=PT(),HUe=bp();function GUe(e){return qUe(e,HUe,zUe)}T9.exports=GUe});var E9=pt((Zhn,D9)=>{var jUe=xp(),$Ue=is(),UUe=jUe($Ue,"DataView");D9.exports=UUe});var O9=pt((egn,I9)=>{var WUe=xp(),QUe=is(),JUe=WUe(QUe,"Promise");I9.exports=JUe});var MT=pt((tgn,A9)=>{var YUe=xp(),KUe=is(),XUe=YUe(KUe,"Set");A9.exports=XUe});var k9=pt((ign,F9)=>{var ZUe=xp(),eWe=is(),tWe=ZUe(eWe,"WeakMap");F9.exports=tWe});var td=pt((ngn,z9)=>{var DT=E9(),ET=Fv(),IT=O9(),OT=MT(),AT=k9(),q9=vp(),v0=hT(),B9="[object Map]",iWe="[object Object]",R9="[object Promise]",N9="[object Set]",L9="[object WeakMap]",V9="[object DataView]",nWe=v0(DT),oWe=v0(ET),aWe=v0(IT),rWe=v0(OT),lWe=v0(AT),ed=q9;(DT&&ed(new DT(new ArrayBuffer(1)))!=V9||ET&&ed(new ET)!=B9||IT&&ed(IT.resolve())!=R9||OT&&ed(new OT)!=N9||AT&&ed(new AT)!=L9)&&(ed=function(e){var a=q9(e),t=a==iWe?e.constructor:void 0,o=t?v0(t):"";if(o)switch(o){case nWe:return V9;case oWe:return B9;case aWe:return R9;case rWe:return N9;case lWe:return L9}return a});z9.exports=ed});var G9=pt((ogn,H9)=>{var sWe=Object.prototype,cWe=sWe.hasOwnProperty;function pWe(e){var a=e.length,t=new e.constructor(a);return a&&typeof e[0]=="string"&&cWe.call(e,"index")&&(t.index=e.index,t.input=e.input),t}H9.exports=pWe});var FT=pt((agn,j9)=>{var mWe=is(),dWe=mWe.Uint8Array;j9.exports=dWe});var zv=pt((rgn,U9)=>{var $9=FT();function uWe(e){var a=new e.constructor(e.byteLength);return new $9(a).set(new $9(e)),a}U9.exports=uWe});var Q9=pt((lgn,W9)=>{var fWe=zv();function hWe(e,a){var t=a?fWe(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}W9.exports=hWe});var Y9=pt((sgn,J9)=>{var gWe=/\w*$/;function _We(e){var a=new e.constructor(e.source,gWe.exec(e));return a.lastIndex=e.lastIndex,a}J9.exports=_We});var tN=pt((cgn,eN)=>{var K9=Xm(),X9=K9?K9.prototype:void 0,Z9=X9?X9.valueOf:void 0;function CWe(e){return Z9?Object(Z9.call(e)):{}}eN.exports=CWe});var kT=pt((pgn,iN)=>{var vWe=zv();function xWe(e,a){var t=a?vWe(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}iN.exports=xWe});var oN=pt((mgn,nN)=>{var bWe=zv(),yWe=Q9(),SWe=Y9(),PWe=tN(),wWe=kT(),TWe="[object Boolean]",MWe="[object Date]",DWe="[object Map]",EWe="[object Number]",IWe="[object RegExp]",OWe="[object Set]",AWe="[object String]",FWe="[object Symbol]",kWe="[object ArrayBuffer]",BWe="[object DataView]",RWe="[object Float32Array]",NWe="[object Float64Array]",LWe="[object Int8Array]",VWe="[object Int16Array]",qWe="[object Int32Array]",zWe="[object Uint8Array]",HWe="[object Uint8ClampedArray]",GWe="[object Uint16Array]",jWe="[object Uint32Array]";function $We(e,a,t){var o=e.constructor;switch(a){case kWe:return bWe(e);case TWe:case MWe:return new o(+e);case BWe:return yWe(e,t);case RWe:case NWe:case LWe:case VWe:case qWe:case zWe:case HWe:case GWe:case jWe:return wWe(e,t);case DWe:return new o;case EWe:case AWe:return new o(e);case IWe:return SWe(e);case OWe:return new o;case FWe:return PWe(e)}}nN.exports=$We});var BT=pt((dgn,rN)=>{var UWe=Ml(),aN=Object.create,WWe=(function(){function e(){}return function(a){if(!UWe(a))return{};if(aN)return aN(a);e.prototype=a;var t=new e;return e.prototype=void 0,t}})();rN.exports=WWe});var RT=pt((ugn,lN)=>{var QWe=BT(),JWe=xf(),YWe=Cf();function KWe(e){return typeof e.constructor=="function"&&!YWe(e)?QWe(JWe(e)):{}}lN.exports=KWe});var cN=pt((fgn,sN)=>{var XWe=td(),ZWe=Es(),eQe="[object Map]";function tQe(e){return ZWe(e)&&XWe(e)==eQe}sN.exports=tQe});var uN=pt((hgn,dN)=>{var iQe=cN(),nQe=hf(),pN=Nv(),mN=pN&&pN.isMap,oQe=mN?nQe(mN):iQe;dN.exports=oQe});var hN=pt((ggn,fN)=>{var aQe=td(),rQe=Es(),lQe="[object Set]";function sQe(e){return rQe(e)&&aQe(e)==lQe}fN.exports=sQe});var vN=pt((_gn,CN)=>{var cQe=hN(),pQe=hf(),gN=Nv(),_N=gN&&gN.isSet,mQe=_N?pQe(_N):cQe;CN.exports=mQe});var NT=pt((Cgn,SN)=>{var dQe=pf(),uQe=Bv(),fQe=df(),hQe=e9(),gQe=l9(),_Qe=xT(),CQe=bT(),vQe=C9(),xQe=S9(),bQe=TT(),yQe=M9(),SQe=td(),PQe=G9(),wQe=oN(),TQe=RT(),MQe=$a(),DQe=Zm(),EQe=uN(),IQe=Ml(),OQe=vN(),AQe=Dc(),FQe=bp(),kQe=1,BQe=2,RQe=4,xN="[object Arguments]",NQe="[object Array]",LQe="[object Boolean]",VQe="[object Date]",qQe="[object Error]",bN="[object Function]",zQe="[object GeneratorFunction]",HQe="[object Map]",GQe="[object Number]",yN="[object Object]",jQe="[object RegExp]",$Qe="[object Set]",UQe="[object String]",WQe="[object Symbol]",QQe="[object WeakMap]",JQe="[object ArrayBuffer]",YQe="[object DataView]",KQe="[object Float32Array]",XQe="[object Float64Array]",ZQe="[object Int8Array]",eJe="[object Int16Array]",tJe="[object Int32Array]",iJe="[object Uint8Array]",nJe="[object Uint8ClampedArray]",oJe="[object Uint16Array]",aJe="[object Uint32Array]",Ca={};Ca[xN]=Ca[NQe]=Ca[JQe]=Ca[YQe]=Ca[LQe]=Ca[VQe]=Ca[KQe]=Ca[XQe]=Ca[ZQe]=Ca[eJe]=Ca[tJe]=Ca[HQe]=Ca[GQe]=Ca[yN]=Ca[jQe]=Ca[$Qe]=Ca[UQe]=Ca[WQe]=Ca[iJe]=Ca[nJe]=Ca[oJe]=Ca[aJe]=!0;Ca[qQe]=Ca[bN]=Ca[QQe]=!1;function Hv(e,a,t,o,n,c){var d,u=a&kQe,g=a&BQe,v=a&RQe;if(t&&(d=n?t(e,o,n,c):t(e)),d!==void 0)return d;if(!IQe(e))return e;var C=MQe(e);if(C){if(d=PQe(e),!u)return CQe(e,d)}else{var b=SQe(e),P=b==bN||b==zQe;if(DQe(e))return _Qe(e,u);if(b==yN||b==xN||P&&!n){if(d=g||P?{}:TQe(e),!u)return g?xQe(e,gQe(d,e)):vQe(e,hQe(d,e))}else{if(!Ca[b])return n?e:{};d=wQe(e,b,u)}}c||(c=new dQe);var T=c.get(e);if(T)return T;c.set(e,d),OQe(e)?e.forEach(function(E){d.add(Hv(E,a,t,E,e,c))}):EQe(e)&&e.forEach(function(E,R){d.set(R,Hv(E,a,t,R,e,c))});var w=v?g?yQe:bQe:g?FQe:AQe,I=C?void 0:w(e);return uQe(I||e,function(E,R){I&&(R=E,E=e[R]),fQe(d,R,Hv(E,a,t,R,e,c))}),d}SN.exports=Hv});var wN=pt((vgn,PN)=>{var rJe=NT(),lJe=4;function sJe(e){return rJe(e,lJe)}PN.exports=sJe});var Gv=pt((xgn,TN)=>{function cJe(e){return function(){return e}}TN.exports=cJe});var DN=pt((bgn,MN)=>{function pJe(e){return function(a,t,o){for(var n=-1,c=Object(a),d=o(a),u=d.length;u--;){var g=d[e?u:++n];if(t(c[g],g,c)===!1)break}return a}}MN.exports=pJe});var jv=pt((ygn,EN)=>{var mJe=DN(),dJe=mJe();EN.exports=dJe});var $v=pt((Sgn,IN)=>{var uJe=jv(),fJe=Dc();function hJe(e,a){return e&&uJe(e,a,fJe)}IN.exports=hJe});var AN=pt((Pgn,ON)=>{var gJe=tc();function _Je(e,a){return function(t,o){if(t==null)return t;if(!gJe(t))return e(t,o);for(var n=t.length,c=a?n:-1,d=Object(t);(a?c--:++c{var CJe=$v(),vJe=AN(),xJe=vJe(CJe);FN.exports=xJe});var yp=pt((Tgn,kN)=>{function bJe(e){return e}kN.exports=bJe});var LT=pt((Mgn,BN)=>{var yJe=yp();function SJe(e){return typeof e=="function"?e:yJe}BN.exports=SJe});var VT=pt((Dgn,RN)=>{var PJe=Bv(),wJe=bf(),TJe=LT(),MJe=$a();function DJe(e,a){var t=MJe(e)?PJe:wJe;return t(e,TJe(a))}RN.exports=DJe});var qT=pt((Egn,NN)=>{NN.exports=VT()});var VN=pt((Ign,LN)=>{var EJe=bf();function IJe(e,a){var t=[];return EJe(e,function(o,n,c){a(o,n,c)&&t.push(o)}),t}LN.exports=IJe});var zN=pt((Ogn,qN)=>{var OJe="__lodash_hash_undefined__";function AJe(e){return this.__data__.set(e,OJe),this}qN.exports=AJe});var GN=pt((Agn,HN)=>{function FJe(e){return this.__data__.has(e)}HN.exports=FJe});var zT=pt((Fgn,jN)=>{var kJe=kv(),BJe=zN(),RJe=GN();function Uv(e){var a=-1,t=e==null?0:e.length;for(this.__data__=new kJe;++a{function NJe(e,a){for(var t=-1,o=e==null?0:e.length;++t{function LJe(e,a){return e.has(a)}WN.exports=LJe});var GT=pt((Rgn,QN)=>{var VJe=zT(),qJe=UN(),zJe=HT(),HJe=1,GJe=2;function jJe(e,a,t,o,n,c){var d=t&HJe,u=e.length,g=a.length;if(u!=g&&!(d&&g>u))return!1;var v=c.get(e),C=c.get(a);if(v&&C)return v==a&&C==e;var b=-1,P=!0,T=t&GJe?new VJe:void 0;for(c.set(e,a),c.set(a,e);++b{function $Je(e){var a=-1,t=Array(e.size);return e.forEach(function(o,n){t[++a]=[n,o]}),t}JN.exports=$Je});var Wv=pt((Lgn,KN)=>{function UJe(e){var a=-1,t=Array(e.size);return e.forEach(function(o){t[++a]=o}),t}KN.exports=UJe});var iL=pt((Vgn,tL)=>{var XN=Xm(),ZN=FT(),WJe=Km(),QJe=GT(),JJe=YN(),YJe=Wv(),KJe=1,XJe=2,ZJe="[object Boolean]",eYe="[object Date]",tYe="[object Error]",iYe="[object Map]",nYe="[object Number]",oYe="[object RegExp]",aYe="[object Set]",rYe="[object String]",lYe="[object Symbol]",sYe="[object ArrayBuffer]",cYe="[object DataView]",eL=XN?XN.prototype:void 0,jT=eL?eL.valueOf:void 0;function pYe(e,a,t,o,n,c,d){switch(t){case cYe:if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case sYe:return!(e.byteLength!=a.byteLength||!c(new ZN(e),new ZN(a)));case ZJe:case eYe:case nYe:return WJe(+e,+a);case tYe:return e.name==a.name&&e.message==a.message;case oYe:case rYe:return e==a+"";case iYe:var u=JJe;case aYe:var g=o&KJe;if(u||(u=YJe),e.size!=a.size&&!g)return!1;var v=d.get(e);if(v)return v==a;o|=XJe,d.set(e,a);var C=QJe(u(e),u(a),o,n,c,d);return d.delete(e),C;case lYe:if(jT)return jT.call(e)==jT.call(a)}return!1}tL.exports=pYe});var aL=pt((qgn,oL)=>{var nL=TT(),mYe=1,dYe=Object.prototype,uYe=dYe.hasOwnProperty;function fYe(e,a,t,o,n,c){var d=t&mYe,u=nL(e),g=u.length,v=nL(a),C=v.length;if(g!=C&&!d)return!1;for(var b=g;b--;){var P=u[b];if(!(d?P in a:uYe.call(a,P)))return!1}var T=c.get(e),w=c.get(a);if(T&&w)return T==a&&w==e;var I=!0;c.set(e,a),c.set(a,e);for(var E=d;++b{var $T=pf(),hYe=GT(),gYe=iL(),_Ye=aL(),rL=td(),lL=$a(),sL=Zm(),CYe=_0(),vYe=1,cL="[object Arguments]",pL="[object Array]",Qv="[object Object]",xYe=Object.prototype,mL=xYe.hasOwnProperty;function bYe(e,a,t,o,n,c){var d=lL(e),u=lL(a),g=d?pL:rL(e),v=u?pL:rL(a);g=g==cL?Qv:g,v=v==cL?Qv:v;var C=g==Qv,b=v==Qv,P=g==v;if(P&&sL(e)){if(!sL(a))return!1;d=!0,C=!1}if(P&&!C)return c||(c=new $T),d||CYe(e)?hYe(e,a,t,o,n,c):gYe(e,a,g,t,o,n,c);if(!(t&vYe)){var T=C&&mL.call(e,"__wrapped__"),w=b&&mL.call(a,"__wrapped__");if(T||w){var I=T?e.value():e,E=w?a.value():a;return c||(c=new $T),n(I,E,t,o,c)}}return P?(c||(c=new $T),_Ye(e,a,t,o,n,c)):!1}dL.exports=bYe});var UT=pt((Hgn,gL)=>{var yYe=uL(),fL=Es();function hL(e,a,t,o,n){return e===a?!0:e==null||a==null||!fL(e)&&!fL(a)?e!==e&&a!==a:yYe(e,a,t,o,hL,n)}gL.exports=hL});var CL=pt((Ggn,_L)=>{var SYe=pf(),PYe=UT(),wYe=1,TYe=2;function MYe(e,a,t,o){var n=t.length,c=n,d=!o;if(e==null)return!c;for(e=Object(e);n--;){var u=t[n];if(d&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++n{var DYe=Ml();function EYe(e){return e===e&&!DYe(e)}vL.exports=EYe});var bL=pt(($gn,xL)=>{var IYe=WT(),OYe=Dc();function AYe(e){for(var a=OYe(e),t=a.length;t--;){var o=a[t],n=e[o];a[t]=[o,n,IYe(n)]}return a}xL.exports=AYe});var QT=pt((Ugn,yL)=>{function FYe(e,a){return function(t){return t==null?!1:t[e]===a&&(a!==void 0||e in Object(t))}}yL.exports=FYe});var PL=pt((Wgn,SL)=>{var kYe=CL(),BYe=bL(),RYe=QT();function NYe(e){var a=BYe(e);return a.length==1&&a[0][2]?RYe(a[0][0],a[0][1]):function(t){return t===e||kYe(t,e,a)}}SL.exports=NYe});var id=pt((Qgn,wL)=>{var LYe=vp(),VYe=Es(),qYe="[object Symbol]";function zYe(e){return typeof e=="symbol"||VYe(e)&&LYe(e)==qYe}wL.exports=zYe});var Jv=pt((Jgn,TL)=>{var HYe=$a(),GYe=id(),jYe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$Ye=/^\w*$/;function UYe(e,a){if(HYe(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||GYe(e)?!0:$Ye.test(e)||!jYe.test(e)||a!=null&&e in Object(a)}TL.exports=UYe});var EL=pt((Ygn,DL)=>{var ML=kv(),WYe="Expected a function";function JT(e,a){if(typeof e!="function"||a!=null&&typeof a!="function")throw new TypeError(WYe);var t=function(){var o=arguments,n=a?a.apply(this,o):o[0],c=t.cache;if(c.has(n))return c.get(n);var d=e.apply(this,o);return t.cache=c.set(n,d)||c,d};return t.cache=new(JT.Cache||ML),t}JT.Cache=ML;DL.exports=JT});var OL=pt((Kgn,IL)=>{var QYe=EL(),JYe=500;function YYe(e){var a=QYe(e,function(o){return t.size===JYe&&t.clear(),o}),t=a.cache;return a}IL.exports=YYe});var FL=pt((Xgn,AL)=>{var KYe=OL(),XYe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZYe=/\\(\\)?/g,eKe=KYe(function(e){var a=[];return e.charCodeAt(0)===46&&a.push(""),e.replace(XYe,function(t,o,n,c){a.push(n?c.replace(ZYe,"$1"):o||t)}),a});AL.exports=eKe});var yf=pt((Zgn,kL)=>{function tKe(e,a){for(var t=-1,o=e==null?0:e.length,n=Array(o);++t{var BL=Xm(),iKe=yf(),nKe=$a(),oKe=id(),aKe=1/0,RL=BL?BL.prototype:void 0,NL=RL?RL.toString:void 0;function LL(e){if(typeof e=="string")return e;if(nKe(e))return iKe(e,LL)+"";if(oKe(e))return NL?NL.call(e):"";var a=e+"";return a=="0"&&1/e==-aKe?"-0":a}VL.exports=LL});var YT=pt((t_n,zL)=>{var rKe=qL();function lKe(e){return e==null?"":rKe(e)}zL.exports=lKe});var Sf=pt((i_n,HL)=>{var sKe=$a(),cKe=Jv(),pKe=FL(),mKe=YT();function dKe(e,a){return sKe(e)?e:cKe(e,a)?[e]:pKe(mKe(e))}HL.exports=dKe});var x0=pt((n_n,GL)=>{var uKe=id(),fKe=1/0;function hKe(e){if(typeof e=="string"||uKe(e))return e;var a=e+"";return a=="0"&&1/e==-fKe?"-0":a}GL.exports=hKe});var Pf=pt((o_n,jL)=>{var gKe=Sf(),_Ke=x0();function CKe(e,a){a=gKe(a,e);for(var t=0,o=a.length;e!=null&&t{var vKe=Pf();function xKe(e,a,t){var o=e==null?void 0:vKe(e,a);return o===void 0?t:o}$L.exports=xKe});var QL=pt((r_n,WL)=>{function bKe(e,a){return e!=null&&a in Object(e)}WL.exports=bKe});var KT=pt((l_n,JL)=>{var yKe=Sf(),SKe=f0(),PKe=$a(),wKe=ff(),TKe=Rv(),MKe=x0();function DKe(e,a,t){a=yKe(a,e);for(var o=-1,n=a.length,c=!1;++o{var EKe=QL(),IKe=KT();function OKe(e,a){return e!=null&&IKe(e,a,EKe)}YL.exports=OKe});var XL=pt((c_n,KL)=>{var AKe=UT(),FKe=UL(),kKe=XT(),BKe=Jv(),RKe=WT(),NKe=QT(),LKe=x0(),VKe=1,qKe=2;function zKe(e,a){return BKe(e)&&RKe(a)?NKe(LKe(e),a):function(t){var o=FKe(t,e);return o===void 0&&o===a?kKe(t,e):AKe(a,o,VKe|qKe)}}KL.exports=zKe});var ZT=pt((p_n,ZL)=>{function HKe(e){return function(a){return a?.[e]}}ZL.exports=HKe});var tV=pt((m_n,eV)=>{var GKe=Pf();function jKe(e){return function(a){return GKe(a,e)}}eV.exports=jKe});var nV=pt((d_n,iV)=>{var $Ke=ZT(),UKe=tV(),WKe=Jv(),QKe=x0();function JKe(e){return WKe(e)?$Ke(QKe(e)):UKe(e)}iV.exports=JKe});var ic=pt((u_n,oV)=>{var YKe=PL(),KKe=XL(),XKe=yp(),ZKe=$a(),eXe=nV();function tXe(e){return typeof e=="function"?e:e==null?XKe:typeof e=="object"?ZKe(e)?KKe(e[0],e[1]):YKe(e):eXe(e)}oV.exports=tXe});var eM=pt((f_n,aV)=>{var iXe=yT(),nXe=VN(),oXe=ic(),aXe=$a();function rXe(e,a){var t=aXe(e)?iXe:nXe;return t(e,oXe(a,3))}aV.exports=rXe});var lV=pt((h_n,rV)=>{var lXe=Object.prototype,sXe=lXe.hasOwnProperty;function cXe(e,a){return e!=null&&sXe.call(e,a)}rV.exports=cXe});var tM=pt((g_n,sV)=>{var pXe=lV(),mXe=KT();function dXe(e,a){return e!=null&&mXe(e,a,pXe)}sV.exports=dXe});var pV=pt((__n,cV)=>{var uXe=Lv(),fXe=td(),hXe=f0(),gXe=$a(),_Xe=tc(),CXe=Zm(),vXe=Cf(),xXe=_0(),bXe="[object Map]",yXe="[object Set]",SXe=Object.prototype,PXe=SXe.hasOwnProperty;function wXe(e){if(e==null)return!0;if(_Xe(e)&&(gXe(e)||typeof e=="string"||typeof e.splice=="function"||CXe(e)||xXe(e)||hXe(e)))return!e.length;var a=fXe(e);if(a==bXe||a==yXe)return!e.size;if(vXe(e))return!uXe(e).length;for(var t in e)if(PXe.call(e,t))return!1;return!0}cV.exports=wXe});var iM=pt((C_n,mV)=>{function TXe(e){return e===void 0}mV.exports=TXe});var nM=pt((v_n,dV)=>{var MXe=bf(),DXe=tc();function EXe(e,a){var t=-1,o=DXe(e)?Array(e.length):[];return MXe(e,function(n,c,d){o[++t]=a(n,c,d)}),o}dV.exports=EXe});var oM=pt((x_n,uV)=>{var IXe=yf(),OXe=ic(),AXe=nM(),FXe=$a();function kXe(e,a){var t=FXe(e)?IXe:AXe;return t(e,OXe(a,3))}uV.exports=kXe});var hV=pt((b_n,fV)=>{function BXe(e,a,t,o){var n=-1,c=e==null?0:e.length;for(o&&c&&(t=e[++n]);++n{function RXe(e,a,t,o,n){return n(e,function(c,d,u){t=o?(o=!1,c):a(t,c,d,u)}),t}gV.exports=RXe});var aM=pt((S_n,CV)=>{var NXe=hV(),LXe=bf(),VXe=ic(),qXe=_V(),zXe=$a();function HXe(e,a,t){var o=zXe(e)?NXe:qXe,n=arguments.length<3;return o(e,VXe(a,4),t,n,LXe)}CV.exports=HXe});var xV=pt((P_n,vV)=>{var GXe=vp(),jXe=$a(),$Xe=Es(),UXe="[object String]";function WXe(e){return typeof e=="string"||!jXe(e)&&$Xe(e)&&GXe(e)==UXe}vV.exports=WXe});var yV=pt((w_n,bV)=>{var QXe=ZT(),JXe=QXe("length");bV.exports=JXe});var PV=pt((T_n,SV)=>{var YXe="\\ud800-\\udfff",KXe="\\u0300-\\u036f",XXe="\\ufe20-\\ufe2f",ZXe="\\u20d0-\\u20ff",eZe=KXe+XXe+ZXe,tZe="\\ufe0e\\ufe0f",iZe="\\u200d",nZe=RegExp("["+iZe+YXe+eZe+tZe+"]");function oZe(e){return nZe.test(e)}SV.exports=oZe});var FV=pt((M_n,AV)=>{var TV="\\ud800-\\udfff",aZe="\\u0300-\\u036f",rZe="\\ufe20-\\ufe2f",lZe="\\u20d0-\\u20ff",sZe=aZe+rZe+lZe,cZe="\\ufe0e\\ufe0f",pZe="["+TV+"]",rM="["+sZe+"]",lM="\\ud83c[\\udffb-\\udfff]",mZe="(?:"+rM+"|"+lM+")",MV="[^"+TV+"]",DV="(?:\\ud83c[\\udde6-\\uddff]){2}",EV="[\\ud800-\\udbff][\\udc00-\\udfff]",dZe="\\u200d",IV=mZe+"?",OV="["+cZe+"]?",uZe="(?:"+dZe+"(?:"+[MV,DV,EV].join("|")+")"+OV+IV+")*",fZe=OV+IV+uZe,hZe="(?:"+[MV+rM+"?",rM,DV,EV,pZe].join("|")+")",wV=RegExp(lM+"(?="+lM+")|"+hZe+fZe,"g");function gZe(e){for(var a=wV.lastIndex=0;wV.test(e);)++a;return a}AV.exports=gZe});var BV=pt((D_n,kV)=>{var _Ze=yV(),CZe=PV(),vZe=FV();function xZe(e){return CZe(e)?vZe(e):_Ze(e)}kV.exports=xZe});var NV=pt((E_n,RV)=>{var bZe=Lv(),yZe=td(),SZe=tc(),PZe=xV(),wZe=BV(),TZe="[object Map]",MZe="[object Set]";function DZe(e){if(e==null)return 0;if(SZe(e))return PZe(e)?wZe(e):e.length;var a=yZe(e);return a==TZe||a==MZe?e.size:bZe(e).length}RV.exports=DZe});var VV=pt((I_n,LV)=>{var EZe=Bv(),IZe=BT(),OZe=$v(),AZe=ic(),FZe=xf(),kZe=$a(),BZe=Zm(),RZe=c0(),NZe=Ml(),LZe=_0();function VZe(e,a,t){var o=kZe(e),n=o||BZe(e)||LZe(e);if(a=AZe(a,4),t==null){var c=e&&e.constructor;n?t=o?new c:[]:NZe(e)?t=RZe(c)?IZe(FZe(e)):{}:t={}}return(n?EZe:OZe)(e,function(d,u,g){return a(t,d,u,g)}),t}LV.exports=VZe});var GV=pt((O_n,HV)=>{var qV=Xm(),qZe=f0(),zZe=$a(),zV=qV?qV.isConcatSpreadable:void 0;function HZe(e){return zZe(e)||qZe(e)||!!(zV&&e&&e[zV])}HV.exports=HZe});var Yv=pt((A_n,$V)=>{var GZe=qv(),jZe=GV();function jV(e,a,t,o,n){var c=-1,d=e.length;for(t||(t=jZe),n||(n=[]);++c0&&t(u)?a>1?jV(u,a-1,t,o,n):GZe(n,u):o||(n[n.length]=u)}return n}$V.exports=jV});var WV=pt((F_n,UV)=>{function $Ze(e,a,t){switch(t.length){case 0:return e.call(a);case 1:return e.call(a,t[0]);case 2:return e.call(a,t[0],t[1]);case 3:return e.call(a,t[0],t[1],t[2])}return e.apply(a,t)}UV.exports=$Ze});var sM=pt((k_n,JV)=>{var UZe=WV(),QV=Math.max;function WZe(e,a,t){return a=QV(a===void 0?e.length-1:a,0),function(){for(var o=arguments,n=-1,c=QV(o.length-a,0),d=Array(c);++n{var QZe=Gv(),YV=gT(),JZe=yp(),YZe=YV?function(e,a){return YV(e,"toString",{configurable:!0,enumerable:!1,value:QZe(a),writable:!0})}:JZe;KV.exports=YZe});var eq=pt((R_n,ZV)=>{var KZe=800,XZe=16,ZZe=Date.now;function eet(e){var a=0,t=0;return function(){var o=ZZe(),n=XZe-(o-t);if(t=o,n>0){if(++a>=KZe)return arguments[0]}else a=0;return e.apply(void 0,arguments)}}ZV.exports=eet});var cM=pt((N_n,tq)=>{var tet=XV(),iet=eq(),net=iet(tet);tq.exports=net});var wf=pt((L_n,iq)=>{var oet=yp(),aet=sM(),ret=cM();function set(e,a){return ret(aet(e,a,oet),e+"")}iq.exports=set});var pM=pt((V_n,nq)=>{function cet(e,a,t,o){for(var n=e.length,c=t+(o?1:-1);o?c--:++c{function pet(e){return e!==e}oq.exports=pet});var lq=pt((z_n,rq)=>{function met(e,a,t){for(var o=t-1,n=e.length;++o{var det=pM(),uet=aq(),fet=lq();function het(e,a,t){return a===a?fet(e,a,t):det(e,uet,t)}sq.exports=het});var mq=pt((G_n,pq)=>{var get=cq();function _et(e,a){var t=e==null?0:e.length;return!!t&&get(e,a,0)>-1}pq.exports=_et});var uq=pt((j_n,dq)=>{function Cet(e,a,t){for(var o=-1,n=e==null?0:e.length;++o{function vet(){}fq.exports=vet});var _q=pt((U_n,gq)=>{var mM=MT(),xet=hq(),bet=Wv(),yet=1/0,Pet=mM&&1/bet(new mM([,-0]))[1]==yet?function(e){return new mM(e)}:xet;gq.exports=Pet});var vq=pt((W_n,Cq)=>{var wet=zT(),Tet=mq(),Met=uq(),Det=HT(),Eet=_q(),Iet=Wv(),Oet=200;function Aet(e,a,t){var o=-1,n=Tet,c=e.length,d=!0,u=[],g=u;if(t)d=!1,n=Met;else if(c>=Oet){var v=a?null:Eet(e);if(v)return Iet(v);d=!1,n=Det,g=new wet}else g=a?[]:u;e:for(;++o{var Fet=tc(),ket=Es();function Bet(e){return ket(e)&&Fet(e)}xq.exports=Bet});var yq=pt((J_n,bq)=>{var Ret=Yv(),Net=wf(),Let=vq(),Vet=dM(),qet=Net(function(e){return Let(Ret(e,1,Vet,!0))});bq.exports=qet});var Pq=pt((Y_n,Sq)=>{var zet=yf();function Het(e,a){return zet(a,function(t){return e[t]})}Sq.exports=Het});var uM=pt((K_n,wq)=>{var Get=Pq(),jet=Dc();function $et(e){return e==null?[]:Get(e,jet(e))}wq.exports=$et});var Dl=pt((X_n,Tq)=>{var Kv;if(typeof gs=="function")try{Kv={clone:wN(),constant:Gv(),each:qT(),filter:eM(),has:tM(),isArray:$a(),isEmpty:pV(),isFunction:c0(),isUndefined:iM(),keys:Dc(),map:oM(),reduce:aM(),size:NV(),transform:VV(),union:yq(),values:uM()}}catch{}Kv||(Kv=window._);Tq.exports=Kv});var Xv=pt((eCn,Iq)=>{"use strict";var ao=Dl();Iq.exports=So;var Uet="\0",nd="\0",Mq="";function So(e){this._isDirected=ao.has(e,"directed")?e.directed:!0,this._isMultigraph=ao.has(e,"multigraph")?e.multigraph:!1,this._isCompound=ao.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=ao.constant(void 0),this._defaultEdgeLabelFn=ao.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[nd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}So.prototype._nodeCount=0;So.prototype._edgeCount=0;So.prototype.isDirected=function(){return this._isDirected};So.prototype.isMultigraph=function(){return this._isMultigraph};So.prototype.isCompound=function(){return this._isCompound};So.prototype.setGraph=function(e){return this._label=e,this};So.prototype.graph=function(){return this._label};So.prototype.setDefaultNodeLabel=function(e){return ao.isFunction(e)||(e=ao.constant(e)),this._defaultNodeLabelFn=e,this};So.prototype.nodeCount=function(){return this._nodeCount};So.prototype.nodes=function(){return ao.keys(this._nodes)};So.prototype.sources=function(){var e=this;return ao.filter(this.nodes(),function(a){return ao.isEmpty(e._in[a])})};So.prototype.sinks=function(){var e=this;return ao.filter(this.nodes(),function(a){return ao.isEmpty(e._out[a])})};So.prototype.setNodes=function(e,a){var t=arguments,o=this;return ao.each(e,function(n){t.length>1?o.setNode(n,a):o.setNode(n)}),this};So.prototype.setNode=function(e,a){return ao.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=a),this):(this._nodes[e]=arguments.length>1?a:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=nd,this._children[e]={},this._children[nd][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};So.prototype.node=function(e){return this._nodes[e]};So.prototype.hasNode=function(e){return ao.has(this._nodes,e)};So.prototype.removeNode=function(e){var a=this;if(ao.has(this._nodes,e)){var t=function(o){a.removeEdge(a._edgeObjs[o])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],ao.each(this.children(e),function(o){a.setParent(o)}),delete this._children[e]),ao.each(ao.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],ao.each(ao.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};So.prototype.setParent=function(e,a){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ao.isUndefined(a))a=nd;else{a+="";for(var t=a;!ao.isUndefined(t);t=this.parent(t))if(t===e)throw new Error("Setting "+a+" as parent of "+e+" would create a cycle");this.setNode(a)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=a,this._children[a][e]=!0,this};So.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};So.prototype.parent=function(e){if(this._isCompound){var a=this._parent[e];if(a!==nd)return a}};So.prototype.children=function(e){if(ao.isUndefined(e)&&(e=nd),this._isCompound){var a=this._children[e];if(a)return ao.keys(a)}else{if(e===nd)return this.nodes();if(this.hasNode(e))return[]}};So.prototype.predecessors=function(e){var a=this._preds[e];if(a)return ao.keys(a)};So.prototype.successors=function(e){var a=this._sucs[e];if(a)return ao.keys(a)};So.prototype.neighbors=function(e){var a=this.predecessors(e);if(a)return ao.union(a,this.successors(e))};So.prototype.isLeaf=function(e){var a;return this.isDirected()?a=this.successors(e):a=this.neighbors(e),a.length===0};So.prototype.filterNodes=function(e){var a=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});a.setGraph(this.graph());var t=this;ao.each(this._nodes,function(c,d){e(d)&&a.setNode(d,c)}),ao.each(this._edgeObjs,function(c){a.hasNode(c.v)&&a.hasNode(c.w)&&a.setEdge(c,t.edge(c))});var o={};function n(c){var d=t.parent(c);return d===void 0||a.hasNode(d)?(o[c]=d,d):d in o?o[d]:n(d)}return this._isCompound&&ao.each(a.nodes(),function(c){a.setParent(c,n(c))}),a};So.prototype.setDefaultEdgeLabel=function(e){return ao.isFunction(e)||(e=ao.constant(e)),this._defaultEdgeLabelFn=e,this};So.prototype.edgeCount=function(){return this._edgeCount};So.prototype.edges=function(){return ao.values(this._edgeObjs)};So.prototype.setPath=function(e,a){var t=this,o=arguments;return ao.reduce(e,function(n,c){return o.length>1?t.setEdge(n,c,a):t.setEdge(n,c),c}),this};So.prototype.setEdge=function(){var e,a,t,o,n=!1,c=arguments[0];typeof c=="object"&&c!==null&&"v"in c?(e=c.v,a=c.w,t=c.name,arguments.length===2&&(o=arguments[1],n=!0)):(e=c,a=arguments[1],t=arguments[3],arguments.length>2&&(o=arguments[2],n=!0)),e=""+e,a=""+a,ao.isUndefined(t)||(t=""+t);var d=Tf(this._isDirected,e,a,t);if(ao.has(this._edgeLabels,d))return n&&(this._edgeLabels[d]=o),this;if(!ao.isUndefined(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(a),this._edgeLabels[d]=n?o:this._defaultEdgeLabelFn(e,a,t);var u=Wet(this._isDirected,e,a,t);return e=u.v,a=u.w,Object.freeze(u),this._edgeObjs[d]=u,Dq(this._preds[a],e),Dq(this._sucs[e],a),this._in[a][d]=u,this._out[e][d]=u,this._edgeCount++,this};So.prototype.edge=function(e,a,t){var o=arguments.length===1?fM(this._isDirected,arguments[0]):Tf(this._isDirected,e,a,t);return this._edgeLabels[o]};So.prototype.hasEdge=function(e,a,t){var o=arguments.length===1?fM(this._isDirected,arguments[0]):Tf(this._isDirected,e,a,t);return ao.has(this._edgeLabels,o)};So.prototype.removeEdge=function(e,a,t){var o=arguments.length===1?fM(this._isDirected,arguments[0]):Tf(this._isDirected,e,a,t),n=this._edgeObjs[o];return n&&(e=n.v,a=n.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Eq(this._preds[a],e),Eq(this._sucs[e],a),delete this._in[a][o],delete this._out[e][o],this._edgeCount--),this};So.prototype.inEdges=function(e,a){var t=this._in[e];if(t){var o=ao.values(t);return a?ao.filter(o,function(n){return n.v===a}):o}};So.prototype.outEdges=function(e,a){var t=this._out[e];if(t){var o=ao.values(t);return a?ao.filter(o,function(n){return n.w===a}):o}};So.prototype.nodeEdges=function(e,a){var t=this.inEdges(e,a);if(t)return t.concat(this.outEdges(e,a))};function Dq(e,a){e[a]?e[a]++:e[a]=1}function Eq(e,a){--e[a]||delete e[a]}function Tf(e,a,t,o){var n=""+a,c=""+t;if(!e&&n>c){var d=n;n=c,c=d}return n+Mq+c+Mq+(ao.isUndefined(o)?Uet:o)}function Wet(e,a,t,o){var n=""+a,c=""+t;if(!e&&n>c){var d=n;n=c,c=d}var u={v:n,w:c};return o&&(u.name=o),u}function fM(e,a){return Tf(e,a.v,a.w,a.name)}});var Aq=pt((tCn,Oq)=>{Oq.exports="2.1.8"});var kq=pt((iCn,Fq)=>{Fq.exports={Graph:Xv(),version:Aq()}});var Rq=pt((nCn,Bq)=>{var nc=Dl(),Qet=Xv();Bq.exports={write:Jet,read:Xet};function Jet(e){var a={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:Yet(e),edges:Ket(e)};return nc.isUndefined(e.graph())||(a.value=nc.clone(e.graph())),a}function Yet(e){return nc.map(e.nodes(),function(a){var t=e.node(a),o=e.parent(a),n={v:a};return nc.isUndefined(t)||(n.value=t),nc.isUndefined(o)||(n.parent=o),n})}function Ket(e){return nc.map(e.edges(),function(a){var t=e.edge(a),o={v:a.v,w:a.w};return nc.isUndefined(a.name)||(o.name=a.name),nc.isUndefined(t)||(o.value=t),o})}function Xet(e){var a=new Qet(e.options).setGraph(e.value);return nc.each(e.nodes,function(t){a.setNode(t.v,t.value),t.parent&&a.setParent(t.v,t.parent)}),nc.each(e.edges,function(t){a.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),a}});var Lq=pt((oCn,Nq)=>{var Zv=Dl();Nq.exports=Zet;function Zet(e){var a={},t=[],o;function n(c){Zv.has(a,c)||(a[c]=!0,o.push(c),Zv.each(e.successors(c),n),Zv.each(e.predecessors(c),n))}return Zv.each(e.nodes(),function(c){o=[],n(c),o.length&&t.push(o)}),t}});var hM=pt((aCn,qq)=>{var Vq=Dl();qq.exports=ns;function ns(){this._arr=[],this._keyIndices={}}ns.prototype.size=function(){return this._arr.length};ns.prototype.keys=function(){return this._arr.map(function(e){return e.key})};ns.prototype.has=function(e){return Vq.has(this._keyIndices,e)};ns.prototype.priority=function(e){var a=this._keyIndices[e];if(a!==void 0)return this._arr[a].priority};ns.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};ns.prototype.add=function(e,a){var t=this._keyIndices;if(e=String(e),!Vq.has(t,e)){var o=this._arr,n=o.length;return t[e]=n,o.push({key:e,priority:a}),this._decrease(n),!0}return!1};ns.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};ns.prototype.decrease=function(e,a){var t=this._keyIndices[e];if(a>this._arr[t].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[t].priority+" New: "+a);this._arr[t].priority=a,this._decrease(t)};ns.prototype._heapify=function(e){var a=this._arr,t=2*e,o=t+1,n=e;t>1,!(a[o].priority{var ett=Dl(),ttt=hM();zq.exports=ntt;var itt=ett.constant(1);function ntt(e,a,t,o){return ott(e,String(a),t||itt,o||function(n){return e.outEdges(n)})}function ott(e,a,t,o){var n={},c=new ttt,d,u,g=function(v){var C=v.v!==d?v.v:v.w,b=n[C],P=t(v),T=u.distance+P;if(P<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+v+" Weight: "+P);T0&&(d=c.removeMin(),u=n[d],u.distance!==Number.POSITIVE_INFINITY);)o(d).forEach(g);return n}});var Gq=pt((lCn,Hq)=>{var att=gM(),rtt=Dl();Hq.exports=ltt;function ltt(e,a,t){return rtt.transform(e.nodes(),function(o,n){o[n]=att(e,n,a,t)},{})}});var _M=pt((sCn,$q)=>{var jq=Dl();$q.exports=stt;function stt(e){var a=0,t=[],o={},n=[];function c(d){var u=o[d]={onStack:!0,lowlink:a,index:a++};if(t.push(d),e.successors(d).forEach(function(C){jq.has(o,C)?o[C].onStack&&(u.lowlink=Math.min(u.lowlink,o[C].index)):(c(C),u.lowlink=Math.min(u.lowlink,o[C].lowlink))}),u.lowlink===u.index){var g=[],v;do v=t.pop(),o[v].onStack=!1,g.push(v);while(d!==v);n.push(g)}}return e.nodes().forEach(function(d){jq.has(o,d)||c(d)}),n}});var Wq=pt((cCn,Uq)=>{var ctt=Dl(),ptt=_M();Uq.exports=mtt;function mtt(e){return ctt.filter(ptt(e),function(a){return a.length>1||a.length===1&&e.hasEdge(a[0],a[0])})}});var Jq=pt((pCn,Qq)=>{var dtt=Dl();Qq.exports=ftt;var utt=dtt.constant(1);function ftt(e,a,t){return htt(e,a||utt,t||function(o){return e.outEdges(o)})}function htt(e,a,t){var o={},n=e.nodes();return n.forEach(function(c){o[c]={},o[c][c]={distance:0},n.forEach(function(d){c!==d&&(o[c][d]={distance:Number.POSITIVE_INFINITY})}),t(c).forEach(function(d){var u=d.v===c?d.w:d.v,g=a(d);o[c][u]={distance:g,predecessor:c}})}),n.forEach(function(c){var d=o[c];n.forEach(function(u){var g=o[u];n.forEach(function(v){var C=g[c],b=d[v],P=g[v],T=C.distance+b.distance;T{var Mf=Dl();Kq.exports=Yq;Yq.CycleException=ex;function Yq(e){var a={},t={},o=[];function n(c){if(Mf.has(t,c))throw new ex;Mf.has(a,c)||(t[c]=!0,a[c]=!0,Mf.each(e.predecessors(c),n),delete t[c],o.push(c))}if(Mf.each(e.sinks(),n),Mf.size(a)!==e.nodeCount())throw new ex;return o}function ex(){}ex.prototype=new Error});var ez=pt((dCn,Zq)=>{var Xq=CM();Zq.exports=gtt;function gtt(e){try{Xq(e)}catch(a){if(a instanceof Xq.CycleException)return!1;throw a}return!0}});var vM=pt((uCn,iz)=>{var tx=Dl();iz.exports=_tt;function _tt(e,a,t){tx.isArray(a)||(a=[a]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),n=[],c={};return tx.each(a,function(d){if(!e.hasNode(d))throw new Error("Graph does not have node: "+d);tz(e,d,t==="post",c,o,n)}),n}function tz(e,a,t,o,n,c){tx.has(o,a)||(o[a]=!0,t||c.push(a),tx.each(n(a),function(d){tz(e,d,t,o,n,c)}),t&&c.push(a))}});var oz=pt((fCn,nz)=>{var Ctt=vM();nz.exports=vtt;function vtt(e,a){return Ctt(e,a,"post")}});var rz=pt((hCn,az)=>{var xtt=vM();az.exports=btt;function btt(e,a){return xtt(e,a,"pre")}});var cz=pt((gCn,sz)=>{var lz=Dl(),ytt=Xv(),Stt=hM();sz.exports=Ptt;function Ptt(e,a){var t=new ytt,o={},n=new Stt,c;function d(g){var v=g.v===c?g.w:g.v,C=n.priority(v);if(C!==void 0){var b=a(g);b0;){if(c=n.removeMin(),lz.has(o,c))t.setEdge(c,o[c]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(c).forEach(d)}return t}});var mz=pt((_Cn,pz)=>{pz.exports={components:Lq(),dijkstra:gM(),dijkstraAll:Gq(),findCycles:Wq(),floydWarshall:Jq(),isAcyclic:ez(),postorder:oz(),preorder:rz(),prim:cz(),tarjan:_M(),topsort:CM()}});var fz=pt((CCn,uz)=>{var dz=kq();uz.exports={Graph:dz.Graph,json:Rq(),alg:mz(),version:dz.version}});var os=pt((vCn,hz)=>{var ix;if(typeof gs=="function")try{ix=fz()}catch{}ix||(ix=window.graphlib);hz.exports=ix});var _z=pt((bCn,gz)=>{var wtt=NT(),Ttt=1,Mtt=4;function Dtt(e){return wtt(e,Ttt|Mtt)}gz.exports=Dtt});var Df=pt((yCn,Cz)=>{var Ett=Km(),Itt=tc(),Ott=ff(),Att=Ml();function Ftt(e,a,t){if(!Att(t))return!1;var o=typeof a;return(o=="number"?Itt(t)&&Ott(a,t.length):o=="string"&&a in t)?Ett(t[a],e):!1}Cz.exports=Ftt});var bz=pt((SCn,xz)=>{var ktt=wf(),Btt=Km(),Rtt=Df(),Ntt=bp(),vz=Object.prototype,Ltt=vz.hasOwnProperty,Vtt=ktt(function(e,a){e=Object(e);var t=-1,o=a.length,n=o>2?a[2]:void 0;for(n&&Rtt(a[0],a[1],n)&&(o=1);++t{var qtt=ic(),ztt=tc(),Htt=Dc();function Gtt(e){return function(a,t,o){var n=Object(a);if(!ztt(a)){var c=qtt(t,3);a=Htt(a),t=function(u){return c(n[u],u,n)}}var d=e(a,t,o);return d>-1?n[c?a[d]:d]:void 0}}yz.exports=Gtt});var wz=pt((wCn,Pz)=>{var jtt=/\s/;function $tt(e){for(var a=e.length;a--&&jtt.test(e.charAt(a)););return a}Pz.exports=$tt});var Mz=pt((TCn,Tz)=>{var Utt=wz(),Wtt=/^\s+/;function Qtt(e){return e&&e.slice(0,Utt(e)+1).replace(Wtt,"")}Tz.exports=Qtt});var Oz=pt((MCn,Iz)=>{var Jtt=Mz(),Dz=Ml(),Ytt=id(),Ez=NaN,Ktt=/^[-+]0x[0-9a-f]+$/i,Xtt=/^0b[01]+$/i,Ztt=/^0o[0-7]+$/i,eit=parseInt;function tit(e){if(typeof e=="number")return e;if(Ytt(e))return Ez;if(Dz(e)){var a=typeof e.valueOf=="function"?e.valueOf():e;e=Dz(a)?a+"":a}if(typeof e!="string")return e===0?e:+e;e=Jtt(e);var t=Xtt.test(e);return t||Ztt.test(e)?eit(e.slice(2),t?2:8):Ktt.test(e)?Ez:+e}Iz.exports=tit});var xM=pt((DCn,Fz)=>{var iit=Oz(),Az=1/0,nit=17976931348623157e292;function oit(e){if(!e)return e===0?e:0;if(e=iit(e),e===Az||e===-Az){var a=e<0?-1:1;return a*nit}return e===e?e:0}Fz.exports=oit});var Bz=pt((ECn,kz)=>{var ait=xM();function rit(e){var a=ait(e),t=a%1;return a===a?t?a-t:a:0}kz.exports=rit});var Nz=pt((ICn,Rz)=>{var lit=pM(),sit=ic(),cit=Bz(),pit=Math.max;function mit(e,a,t){var o=e==null?0:e.length;if(!o)return-1;var n=t==null?0:cit(t);return n<0&&(n=pit(o+n,0)),lit(e,sit(a,3),n)}Rz.exports=mit});var Vz=pt((OCn,Lz)=>{var dit=Sz(),uit=Nz(),fit=dit(uit);Lz.exports=fit});var bM=pt((ACn,qz)=>{var hit=Yv();function git(e){var a=e==null?0:e.length;return a?hit(e,1):[]}qz.exports=git});var Hz=pt((FCn,zz)=>{var _it=jv(),Cit=LT(),vit=bp();function xit(e,a){return e==null?e:_it(e,Cit(a),vit)}zz.exports=xit});var jz=pt((kCn,Gz)=>{function bit(e){var a=e==null?0:e.length;return a?e[a-1]:void 0}Gz.exports=bit});var Uz=pt((BCn,$z)=>{var yit=mf(),Sit=$v(),Pit=ic();function wit(e,a){var t={};return a=Pit(a,3),Sit(e,function(o,n,c){yit(t,n,a(o,n,c))}),t}$z.exports=wit});var nx=pt((RCn,Wz)=>{var Tit=id();function Mit(e,a,t){for(var o=-1,n=e.length;++o{function Dit(e,a){return e>a}Qz.exports=Dit});var Kz=pt((LCn,Yz)=>{var Eit=nx(),Iit=Jz(),Oit=yp();function Ait(e){return e&&e.length?Eit(e,Oit,Iit):void 0}Yz.exports=Ait});var yM=pt((VCn,Xz)=>{var Fit=mf(),kit=Km();function Bit(e,a,t){(t!==void 0&&!kit(e[a],t)||t===void 0&&!(a in e))&&Fit(e,a,t)}Xz.exports=Bit});var tH=pt((qCn,eH)=>{var Rit=vp(),Nit=xf(),Lit=Es(),Vit="[object Object]",qit=Function.prototype,zit=Object.prototype,Zz=qit.toString,Hit=zit.hasOwnProperty,Git=Zz.call(Object);function jit(e){if(!Lit(e)||Rit(e)!=Vit)return!1;var a=Nit(e);if(a===null)return!0;var t=Hit.call(a,"constructor")&&a.constructor;return typeof t=="function"&&t instanceof t&&Zz.call(t)==Git}eH.exports=jit});var SM=pt((zCn,iH)=>{function $it(e,a){if(!(a==="constructor"&&typeof e[a]=="function")&&a!="__proto__")return e[a]}iH.exports=$it});var oH=pt((HCn,nH)=>{var Uit=u0(),Wit=bp();function Qit(e){return Uit(e,Wit(e))}nH.exports=Qit});var pH=pt((GCn,cH)=>{var aH=yM(),Jit=xT(),Yit=kT(),Kit=bT(),Xit=RT(),rH=f0(),lH=$a(),Zit=dM(),ent=Zm(),tnt=c0(),int=Ml(),nnt=tH(),ont=_0(),sH=SM(),ant=oH();function rnt(e,a,t,o,n,c,d){var u=sH(e,t),g=sH(a,t),v=d.get(g);if(v){aH(e,t,v);return}var C=c?c(u,g,t+"",e,a,d):void 0,b=C===void 0;if(b){var P=lH(g),T=!P&&ent(g),w=!P&&!T&&ont(g);C=g,P||T||w?lH(u)?C=u:Zit(u)?C=Kit(u):T?(b=!1,C=Jit(g,!0)):w?(b=!1,C=Yit(g,!0)):C=[]:nnt(g)||rH(g)?(C=u,rH(u)?C=ant(u):(!int(u)||tnt(u))&&(C=Xit(g))):b=!1}b&&(d.set(g,C),n(C,g,o,c,d),d.delete(g)),aH(e,t,C)}cH.exports=rnt});var uH=pt((jCn,dH)=>{var lnt=pf(),snt=yM(),cnt=jv(),pnt=pH(),mnt=Ml(),dnt=bp(),unt=SM();function mH(e,a,t,o,n){e!==a&&cnt(a,function(c,d){if(n||(n=new lnt),mnt(c))pnt(e,a,d,t,mH,o,n);else{var u=o?o(unt(e,d),c,d+"",e,a,n):void 0;u===void 0&&(u=c),snt(e,d,u)}},dnt)}dH.exports=mH});var hH=pt(($Cn,fH)=>{var fnt=wf(),hnt=Df();function gnt(e){return fnt(function(a,t){var o=-1,n=t.length,c=n>1?t[n-1]:void 0,d=n>2?t[2]:void 0;for(c=e.length>3&&typeof c=="function"?(n--,c):void 0,d&&hnt(t[0],t[1],d)&&(c=n<3?void 0:c,n=1),a=Object(a);++o{var _nt=uH(),Cnt=hH(),vnt=Cnt(function(e,a,t){_nt(e,a,t)});gH.exports=vnt});var PM=pt((WCn,CH)=>{function xnt(e,a){return e{var bnt=nx(),ynt=PM(),Snt=yp();function Pnt(e){return e&&e.length?bnt(e,Snt,ynt):void 0}vH.exports=Pnt});var yH=pt((JCn,bH)=>{var wnt=nx(),Tnt=ic(),Mnt=PM();function Dnt(e,a){return e&&e.length?wnt(e,Tnt(a,2),Mnt):void 0}bH.exports=Dnt});var PH=pt((YCn,SH)=>{var Ent=is(),Int=function(){return Ent.Date.now()};SH.exports=Int});var MH=pt((KCn,TH)=>{var Ont=df(),Ant=Sf(),Fnt=ff(),wH=Ml(),knt=x0();function Bnt(e,a,t,o){if(!wH(e))return e;a=Ant(a,e);for(var n=-1,c=a.length,d=c-1,u=e;u!=null&&++n{var Rnt=Pf(),Nnt=MH(),Lnt=Sf();function Vnt(e,a,t){for(var o=-1,n=a.length,c={};++o{var qnt=EH(),znt=XT();function Hnt(e,a){return qnt(e,a,function(t,o){return znt(e,o)})}IH.exports=Hnt});var FH=pt((e2n,AH)=>{var Gnt=bM(),jnt=sM(),$nt=cM();function Unt(e){return $nt(jnt(e,void 0,Gnt),e+"")}AH.exports=Unt});var BH=pt((t2n,kH)=>{var Wnt=OH(),Qnt=FH(),Jnt=Qnt(function(e,a){return e==null?{}:Wnt(e,a)});kH.exports=Jnt});var NH=pt((i2n,RH)=>{var Ynt=Math.ceil,Knt=Math.max;function Xnt(e,a,t,o){for(var n=-1,c=Knt(Ynt((a-e)/(t||1)),0),d=Array(c);c--;)d[o?c:++n]=e,e+=t;return d}RH.exports=Xnt});var VH=pt((n2n,LH)=>{var Znt=NH(),eot=Df(),wM=xM();function tot(e){return function(a,t,o){return o&&typeof o!="number"&&eot(a,t,o)&&(t=o=void 0),a=wM(a),t===void 0?(t=a,a=0):t=wM(t),o=o===void 0?a{var iot=VH(),not=iot();qH.exports=not});var GH=pt((a2n,HH)=>{function oot(e,a){var t=e.length;for(e.sort(a);t--;)e[t]=e[t].value;return e}HH.exports=oot});var UH=pt((r2n,$H)=>{var jH=id();function aot(e,a){if(e!==a){var t=e!==void 0,o=e===null,n=e===e,c=jH(e),d=a!==void 0,u=a===null,g=a===a,v=jH(a);if(!u&&!v&&!c&&e>a||c&&d&&g&&!u&&!v||o&&d&&g||!t&&g||!n)return 1;if(!o&&!c&&!v&&e{var rot=UH();function lot(e,a,t){for(var o=-1,n=e.criteria,c=a.criteria,d=n.length,u=t.length;++o=u)return g;var v=t[o];return g*(v=="desc"?-1:1)}}return e.index-a.index}WH.exports=lot});var YH=pt((s2n,JH)=>{var TM=yf(),sot=Pf(),cot=ic(),pot=nM(),mot=GH(),dot=hf(),uot=QH(),fot=yp(),hot=$a();function got(e,a,t){a.length?a=TM(a,function(c){return hot(c)?function(d){return sot(d,c.length===1?c[0]:c)}:c}):a=[fot];var o=-1;a=TM(a,dot(cot));var n=pot(e,function(c,d,u){var g=TM(a,function(v){return v(c)});return{criteria:g,index:++o,value:c}});return mot(n,function(c,d){return uot(c,d,t)})}JH.exports=got});var ZH=pt((c2n,XH)=>{var _ot=Yv(),Cot=YH(),vot=wf(),KH=Df(),xot=vot(function(e,a){if(e==null)return[];var t=a.length;return t>1&&KH(e,a[0],a[1])?a=[]:t>2&&KH(a[0],a[1],a[2])&&(a=[a[0]]),Cot(e,_ot(a,1),[])});XH.exports=xot});var tG=pt((p2n,eG)=>{var bot=YT(),yot=0;function Sot(e){var a=++yot;return bot(e)+a}eG.exports=Sot});var nG=pt((m2n,iG)=>{function Pot(e,a,t){for(var o=-1,n=e.length,c=a.length,d={};++o{var wot=df(),Tot=nG();function Mot(e,a){return Tot(e||[],a||[],wot)}oG.exports=Mot});var ya=pt((u2n,rG)=>{var ox;if(typeof gs=="function")try{ox={cloneDeep:_z(),constant:Gv(),defaults:bz(),each:qT(),filter:eM(),find:Vz(),flatten:bM(),forEach:VT(),forIn:Hz(),has:tM(),isUndefined:iM(),last:jz(),map:oM(),mapValues:Uz(),max:Kz(),merge:_H(),min:xH(),minBy:yH(),now:PH(),pick:BH(),range:zH(),reduce:aM(),sortBy:ZH(),uniqueId:tG(),values:uM(),zipObject:aG()}}catch{}ox||(ox=window._);rG.exports=ox});var cG=pt((h2n,sG)=>{sG.exports=ax;function ax(){var e={};e._next=e._prev=e,this._sentinel=e}ax.prototype.dequeue=function(){var e=this._sentinel,a=e._prev;if(a!==e)return lG(a),a};ax.prototype.enqueue=function(e){var a=this._sentinel;e._prev&&e._next&&lG(e),e._next=a._next,a._next._prev=e,a._next=e,e._prev=a};ax.prototype.toString=function(){for(var e=[],a=this._sentinel,t=a._prev;t!==a;)e.push(JSON.stringify(t,Dot)),t=t._prev;return"["+e.join(", ")+"]"};function lG(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Dot(e,a){if(e!=="_next"&&e!=="_prev")return a}});var mG=pt((g2n,pG)=>{var Ec=ya(),Eot=os().Graph,Iot=cG();pG.exports=Aot;var Oot=Ec.constant(1);function Aot(e,a){if(e.nodeCount()<=1)return[];var t=kot(e,a||Oot),o=Fot(t.graph,t.buckets,t.zeroIdx);return Ec.flatten(Ec.map(o,function(n){return e.outEdges(n.v,n.w)}),!0)}function Fot(e,a,t){for(var o=[],n=a[a.length-1],c=a[0],d;e.nodeCount();){for(;d=c.dequeue();)MM(e,a,t,d);for(;d=n.dequeue();)MM(e,a,t,d);if(e.nodeCount()){for(var u=a.length-2;u>0;--u)if(d=a[u].dequeue(),d){o=o.concat(MM(e,a,t,d,!0));break}}}return o}function MM(e,a,t,o,n){var c=n?[]:void 0;return Ec.forEach(e.inEdges(o.v),function(d){var u=e.edge(d),g=e.node(d.v);n&&c.push({v:d.v,w:d.w}),g.out-=u,DM(a,t,g)}),Ec.forEach(e.outEdges(o.v),function(d){var u=e.edge(d),g=d.w,v=e.node(g);v.in-=u,DM(a,t,v)}),e.removeNode(o.v),c}function kot(e,a){var t=new Eot,o=0,n=0;Ec.forEach(e.nodes(),function(u){t.setNode(u,{v:u,in:0,out:0})}),Ec.forEach(e.edges(),function(u){var g=t.edge(u.v,u.w)||0,v=a(u),C=g+v;t.setEdge(u.v,u.w,C),n=Math.max(n,t.node(u.v).out+=v),o=Math.max(o,t.node(u.w).in+=v)});var c=Ec.range(n+o+3).map(function(){return new Iot}),d=o+1;return Ec.forEach(t.nodes(),function(u){DM(c,d,t.node(u))}),{graph:t,buckets:c,zeroIdx:d}}function DM(e,a,t){t.out?t.in?e[t.out-t.in+a].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}});var uG=pt((_2n,dG)=>{"use strict";var od=ya(),Bot=mG();dG.exports={run:Rot,undo:Lot};function Rot(e){var a=e.graph().acyclicer==="greedy"?Bot(e,t(e)):Not(e);od.forEach(a,function(o){var n=e.edge(o);e.removeEdge(o),n.forwardName=o.name,n.reversed=!0,e.setEdge(o.w,o.v,n,od.uniqueId("rev"))});function t(o){return function(n){return o.edge(n).weight}}}function Not(e){var a=[],t={},o={};function n(c){od.has(o,c)||(o[c]=!0,t[c]=!0,od.forEach(e.outEdges(c),function(d){od.has(t,d.w)?a.push(d):n(d.w)}),delete t[c])}return od.forEach(e.nodes(),n),a}function Lot(e){od.forEach(e.edges(),function(a){var t=e.edge(a);if(t.reversed){e.removeEdge(a);var o=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(a.w,a.v,t,o)}})}});var tl=pt((C2n,_G)=>{"use strict";var jo=ya(),fG=os().Graph;_G.exports={addDummyNode:hG,simplify:Vot,asNonCompoundGraph:qot,successorWeights:zot,predecessorWeights:Hot,intersectRect:Got,buildLayerMatrix:jot,normalizeRanks:$ot,removeEmptyRanks:Uot,addBorderNode:Wot,maxRank:gG,partition:Qot,time:Jot,notime:Yot};function hG(e,a,t,o){var n;do n=jo.uniqueId(o);while(e.hasNode(n));return t.dummy=a,e.setNode(n,t),n}function Vot(e){var a=new fG().setGraph(e.graph());return jo.forEach(e.nodes(),function(t){a.setNode(t,e.node(t))}),jo.forEach(e.edges(),function(t){var o=a.edge(t.v,t.w)||{weight:0,minlen:1},n=e.edge(t);a.setEdge(t.v,t.w,{weight:o.weight+n.weight,minlen:Math.max(o.minlen,n.minlen)})}),a}function qot(e){var a=new fG({multigraph:e.isMultigraph()}).setGraph(e.graph());return jo.forEach(e.nodes(),function(t){e.children(t).length||a.setNode(t,e.node(t))}),jo.forEach(e.edges(),function(t){a.setEdge(t,e.edge(t))}),a}function zot(e){var a=jo.map(e.nodes(),function(t){var o={};return jo.forEach(e.outEdges(t),function(n){o[n.w]=(o[n.w]||0)+e.edge(n).weight}),o});return jo.zipObject(e.nodes(),a)}function Hot(e){var a=jo.map(e.nodes(),function(t){var o={};return jo.forEach(e.inEdges(t),function(n){o[n.v]=(o[n.v]||0)+e.edge(n).weight}),o});return jo.zipObject(e.nodes(),a)}function Got(e,a){var t=e.x,o=e.y,n=a.x-t,c=a.y-o,d=e.width/2,u=e.height/2;if(!n&&!c)throw new Error("Not possible to find intersection inside of the rectangle");var g,v;return Math.abs(c)*d>Math.abs(n)*u?(c<0&&(u=-u),g=u*n/c,v=u):(n<0&&(d=-d),g=d,v=d*c/n),{x:t+g,y:o+v}}function jot(e){var a=jo.map(jo.range(gG(e)+1),function(){return[]});return jo.forEach(e.nodes(),function(t){var o=e.node(t),n=o.rank;jo.isUndefined(n)||(a[n][o.order]=t)}),a}function $ot(e){var a=jo.min(jo.map(e.nodes(),function(t){return e.node(t).rank}));jo.forEach(e.nodes(),function(t){var o=e.node(t);jo.has(o,"rank")&&(o.rank-=a)})}function Uot(e){var a=jo.min(jo.map(e.nodes(),function(c){return e.node(c).rank})),t=[];jo.forEach(e.nodes(),function(c){var d=e.node(c).rank-a;t[d]||(t[d]=[]),t[d].push(c)});var o=0,n=e.graph().nodeRankFactor;jo.forEach(t,function(c,d){jo.isUndefined(c)&&d%n!==0?--o:o&&jo.forEach(c,function(u){e.node(u).rank+=o})})}function Wot(e,a,t,o){var n={width:0,height:0};return arguments.length>=4&&(n.rank=t,n.order=o),hG(e,"border",n,a)}function gG(e){return jo.max(jo.map(e.nodes(),function(a){var t=e.node(a).rank;if(!jo.isUndefined(t))return t}))}function Qot(e,a){var t={lhs:[],rhs:[]};return jo.forEach(e,function(o){a(o)?t.lhs.push(o):t.rhs.push(o)}),t}function Jot(e,a){var t=jo.now();try{return a()}finally{console.log(e+" time: "+(jo.now()-t)+"ms")}}function Yot(e,a){return a()}});var xG=pt((v2n,vG)=>{"use strict";var CG=ya(),Kot=tl();vG.exports={run:Xot,undo:eat};function Xot(e){e.graph().dummyChains=[],CG.forEach(e.edges(),function(a){Zot(e,a)})}function Zot(e,a){var t=a.v,o=e.node(t).rank,n=a.w,c=e.node(n).rank,d=a.name,u=e.edge(a),g=u.labelRank;if(c!==o+1){e.removeEdge(a);var v,C,b;for(b=0,++o;o{"use strict";var rx=ya();bG.exports={longestPath:tat,slack:iat};function tat(e){var a={};function t(o){var n=e.node(o);if(rx.has(a,o))return n.rank;a[o]=!0;var c=rx.min(rx.map(e.outEdges(o),function(d){return t(d.w)-e.edge(d).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),n.rank=c}rx.forEach(e.sources(),t)}function iat(e,a){return e.node(a.w).rank-e.node(a.v).rank-e.edge(a).minlen}});var EM=pt((b2n,yG)=>{"use strict";var lx=ya(),nat=os().Graph,sx=Ef().slack;yG.exports=oat;function oat(e){var a=new nat({directed:!1}),t=e.nodes()[0],o=e.nodeCount();a.setNode(t,{});for(var n,c;aat(a,e){"use strict";var Ic=ya(),sat=EM(),cat=Ef().slack,pat=Ef().longestPath,mat=os().alg.preorder,dat=os().alg.postorder,uat=tl().simplify;EG.exports=ad;ad.initLowLimValues=OM;ad.initCutValues=IM;ad.calcCutValue=PG;ad.leaveEdge=TG;ad.enterEdge=MG;ad.exchangeEdges=DG;function ad(e){e=uat(e),pat(e);var a=sat(e);OM(a),IM(a,e);for(var t,o;t=TG(a);)o=MG(a,e,t),DG(a,e,t,o)}function IM(e,a){var t=dat(e,e.nodes());t=t.slice(0,t.length-1),Ic.forEach(t,function(o){fat(e,a,o)})}function fat(e,a,t){var o=e.node(t),n=o.parent;e.edge(t,n).cutvalue=PG(e,a,t)}function PG(e,a,t){var o=e.node(t),n=o.parent,c=!0,d=a.edge(t,n),u=0;return d||(c=!1,d=a.edge(n,t)),u=d.weight,Ic.forEach(a.nodeEdges(t),function(g){var v=g.v===t,C=v?g.w:g.v;if(C!==n){var b=v===c,P=a.edge(g).weight;if(u+=b?P:-P,gat(e,t,C)){var T=e.edge(t,C).cutvalue;u+=b?-T:T}}}),u}function OM(e,a){arguments.length<2&&(a=e.nodes()[0]),wG(e,{},1,a)}function wG(e,a,t,o,n){var c=t,d=e.node(o);return a[o]=!0,Ic.forEach(e.neighbors(o),function(u){Ic.has(a,u)||(t=wG(e,a,t,u,o))}),d.low=c,d.lim=t++,n?d.parent=n:delete d.parent,t}function TG(e){return Ic.find(e.edges(),function(a){return e.edge(a).cutvalue<0})}function MG(e,a,t){var o=t.v,n=t.w;a.hasEdge(o,n)||(o=t.w,n=t.v);var c=e.node(o),d=e.node(n),u=c,g=!1;c.lim>d.lim&&(u=d,g=!0);var v=Ic.filter(a.edges(),function(C){return g===SG(e,e.node(C.v),u)&&g!==SG(e,e.node(C.w),u)});return Ic.minBy(v,function(C){return cat(a,C)})}function DG(e,a,t,o){var n=t.v,c=t.w;e.removeEdge(n,c),e.setEdge(o.v,o.w,{}),OM(e),IM(e,a),hat(e,a)}function hat(e,a){var t=Ic.find(e.nodes(),function(n){return!a.node(n).parent}),o=mat(e,t);o=o.slice(1),Ic.forEach(o,function(n){var c=e.node(n).parent,d=a.edge(n,c),u=!1;d||(d=a.edge(c,n),u=!0),a.node(n).rank=a.node(c).rank+(u?d.minlen:-d.minlen)})}function gat(e,a,t){return e.hasEdge(a,t)}function SG(e,a,t){return t.low<=a.lim&&a.lim<=t.lim}});var kG=pt((S2n,FG)=>{"use strict";var _at=Ef(),AG=_at.longestPath,Cat=EM(),vat=IG();FG.exports=xat;function xat(e){switch(e.graph().ranker){case"network-simplex":OG(e);break;case"tight-tree":yat(e);break;case"longest-path":bat(e);break;default:OG(e)}}var bat=AG;function yat(e){AG(e),Cat(e)}function OG(e){vat(e)}});var RG=pt((P2n,BG)=>{var AM=ya();BG.exports=Sat;function Sat(e){var a=wat(e);AM.forEach(e.graph().dummyChains,function(t){for(var o=e.node(t),n=o.edgeObj,c=Pat(e,a,n.v,n.w),d=c.path,u=c.lca,g=0,v=d[g],C=!0;t!==n.w;){if(o=e.node(t),C){for(;(v=d[g])!==u&&e.node(v).maxRankd||u>a[g].lim));for(v=g,g=o;(g=e.parent(g))!==v;)c.push(g);return{path:n.concat(c.reverse()),lca:v}}function wat(e){var a={},t=0;function o(n){var c=t;AM.forEach(e.children(n),o),a[n]={low:c,lim:t++}}return AM.forEach(e.children(),o),a}});var VG=pt((w2n,LG)=>{var Oc=ya(),FM=tl();LG.exports={run:Tat,cleanup:Eat};function Tat(e){var a=FM.addDummyNode(e,"root",{},"_root"),t=Mat(e),o=Oc.max(Oc.values(t))-1,n=2*o+1;e.graph().nestingRoot=a,Oc.forEach(e.edges(),function(d){e.edge(d).minlen*=n});var c=Dat(e)+1;Oc.forEach(e.children(),function(d){NG(e,a,n,c,o,t,d)}),e.graph().nodeRankFactor=n}function NG(e,a,t,o,n,c,d){var u=e.children(d);if(!u.length){d!==a&&e.setEdge(a,d,{weight:0,minlen:t});return}var g=FM.addBorderNode(e,"_bt"),v=FM.addBorderNode(e,"_bb"),C=e.node(d);e.setParent(g,d),C.borderTop=g,e.setParent(v,d),C.borderBottom=v,Oc.forEach(u,function(b){NG(e,a,t,o,n,c,b);var P=e.node(b),T=P.borderTop?P.borderTop:b,w=P.borderBottom?P.borderBottom:b,I=P.borderTop?o:2*o,E=T!==w?1:n-c[d]+1;e.setEdge(g,T,{weight:I,minlen:E,nestingEdge:!0}),e.setEdge(w,v,{weight:I,minlen:E,nestingEdge:!0})}),e.parent(d)||e.setEdge(a,g,{weight:0,minlen:n+c[d]})}function Mat(e){var a={};function t(o,n){var c=e.children(o);c&&c.length&&Oc.forEach(c,function(d){t(d,n+1)}),a[o]=n}return Oc.forEach(e.children(),function(o){t(o,1)}),a}function Dat(e){return Oc.reduce(e.edges(),function(a,t){return a+e.edge(t).weight},0)}function Eat(e){var a=e.graph();e.removeNode(a.nestingRoot),delete a.nestingRoot,Oc.forEach(e.edges(),function(t){var o=e.edge(t);o.nestingEdge&&e.removeEdge(t)})}});var HG=pt((T2n,zG)=>{var kM=ya(),Iat=tl();zG.exports=Oat;function Oat(e){function a(t){var o=e.children(t),n=e.node(t);if(o.length&&kM.forEach(o,a),kM.has(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var c=n.minRank,d=n.maxRank+1;c{"use strict";var oc=ya();$G.exports={adjust:Aat,undo:Fat};function Aat(e){var a=e.graph().rankdir.toLowerCase();(a==="lr"||a==="rl")&&jG(e)}function Fat(e){var a=e.graph().rankdir.toLowerCase();(a==="bt"||a==="rl")&&kat(e),(a==="lr"||a==="rl")&&(Bat(e),jG(e))}function jG(e){oc.forEach(e.nodes(),function(a){GG(e.node(a))}),oc.forEach(e.edges(),function(a){GG(e.edge(a))})}function GG(e){var a=e.width;e.width=e.height,e.height=a}function kat(e){oc.forEach(e.nodes(),function(a){BM(e.node(a))}),oc.forEach(e.edges(),function(a){var t=e.edge(a);oc.forEach(t.points,BM),oc.has(t,"y")&&BM(t)})}function BM(e){e.y=-e.y}function Bat(e){oc.forEach(e.nodes(),function(a){RM(e.node(a))}),oc.forEach(e.edges(),function(a){var t=e.edge(a);oc.forEach(t.points,RM),oc.has(t,"x")&&RM(t)})}function RM(e){var a=e.x;e.x=e.y,e.y=a}});var QG=pt((D2n,WG)=>{"use strict";var Ac=ya();WG.exports=Rat;function Rat(e){var a={},t=Ac.filter(e.nodes(),function(u){return!e.children(u).length}),o=Ac.max(Ac.map(t,function(u){return e.node(u).rank})),n=Ac.map(Ac.range(o+1),function(){return[]});function c(u){if(!Ac.has(a,u)){a[u]=!0;var g=e.node(u);n[g.rank].push(u),Ac.forEach(e.successors(u),c)}}var d=Ac.sortBy(t,function(u){return e.node(u).rank});return Ac.forEach(d,c),n}});var YG=pt((E2n,JG)=>{"use strict";var Sp=ya();JG.exports=Nat;function Nat(e,a){for(var t=0,o=1;o0;)C%2&&(b+=u[C+1]),C=C-1>>1,u[C]+=v.weight;g+=v.weight*b})),g}});var ZG=pt((I2n,XG)=>{var KG=ya();XG.exports=Vat;function Vat(e,a){return KG.map(a,function(t){var o=e.inEdges(t);if(o.length){var n=KG.reduce(o,function(c,d){var u=e.edge(d),g=e.node(d.v);return{sum:c.sum+u.weight*g.order,weight:c.weight+u.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:t}})}});var tj=pt((O2n,ej)=>{"use strict";var El=ya();ej.exports=qat;function qat(e,a){var t={};El.forEach(e,function(n,c){var d=t[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:c};El.isUndefined(n.barycenter)||(d.barycenter=n.barycenter,d.weight=n.weight)}),El.forEach(a.edges(),function(n){var c=t[n.v],d=t[n.w];!El.isUndefined(c)&&!El.isUndefined(d)&&(d.indegree++,c.out.push(t[n.w]))});var o=El.filter(t,function(n){return!n.indegree});return zat(o)}function zat(e){var a=[];function t(c){return function(d){d.merged||(El.isUndefined(d.barycenter)||El.isUndefined(c.barycenter)||d.barycenter>=c.barycenter)&&Hat(c,d)}}function o(c){return function(d){d.in.push(c),--d.indegree===0&&e.push(d)}}for(;e.length;){var n=e.pop();a.push(n),El.forEach(n.in.reverse(),t(n)),El.forEach(n.out,o(n))}return El.map(El.filter(a,function(c){return!c.merged}),function(c){return El.pick(c,["vs","i","barycenter","weight"])})}function Hat(e,a){var t=0,o=0;e.weight&&(t+=e.barycenter*e.weight,o+=e.weight),a.weight&&(t+=a.barycenter*a.weight,o+=a.weight),e.vs=a.vs.concat(e.vs),e.barycenter=t/o,e.weight=o,e.i=Math.min(a.i,e.i),a.merged=!0}});var oj=pt((A2n,nj)=>{var If=ya(),Gat=tl();nj.exports=jat;function jat(e,a){var t=Gat.partition(e,function(C){return If.has(C,"barycenter")}),o=t.lhs,n=If.sortBy(t.rhs,function(C){return-C.i}),c=[],d=0,u=0,g=0;o.sort($at(!!a)),g=ij(c,n,g),If.forEach(o,function(C){g+=C.vs.length,c.push(C.vs),d+=C.barycenter*C.weight,u+=C.weight,g=ij(c,n,g)});var v={vs:If.flatten(c,!0)};return u&&(v.barycenter=d/u,v.weight=u),v}function ij(e,a,t){for(var o;a.length&&(o=If.last(a)).i<=t;)a.pop(),e.push(o.vs),t++;return t}function $at(e){return function(a,t){return a.barycentert.barycenter?1:e?t.i-a.i:a.i-t.i}}});var lj=pt((F2n,rj)=>{var Pp=ya(),Uat=ZG(),Wat=tj(),Qat=oj();rj.exports=aj;function aj(e,a,t,o){var n=e.children(a),c=e.node(a),d=c?c.borderLeft:void 0,u=c?c.borderRight:void 0,g={};d&&(n=Pp.filter(n,function(w){return w!==d&&w!==u}));var v=Uat(e,n);Pp.forEach(v,function(w){if(e.children(w.v).length){var I=aj(e,w.v,t,o);g[w.v]=I,Pp.has(I,"barycenter")&&Yat(w,I)}});var C=Wat(v,t);Jat(C,g);var b=Qat(C,o);if(d&&(b.vs=Pp.flatten([d,b.vs,u],!0),e.predecessors(d).length)){var P=e.node(e.predecessors(d)[0]),T=e.node(e.predecessors(u)[0]);Pp.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+P.order+T.order)/(b.weight+2),b.weight+=2}return b}function Jat(e,a){Pp.forEach(e,function(t){t.vs=Pp.flatten(t.vs.map(function(o){return a[o]?a[o].vs:o}),!0)})}function Yat(e,a){Pp.isUndefined(e.barycenter)?(e.barycenter=a.barycenter,e.weight=a.weight):(e.barycenter=(e.barycenter*e.weight+a.barycenter*a.weight)/(e.weight+a.weight),e.weight+=a.weight)}});var cj=pt((k2n,sj)=>{var Of=ya(),Kat=os().Graph;sj.exports=Xat;function Xat(e,a,t){var o=Zat(e),n=new Kat({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(c){return e.node(c)});return Of.forEach(e.nodes(),function(c){var d=e.node(c),u=e.parent(c);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(n.setNode(c),n.setParent(c,u||o),Of.forEach(e[t](c),function(g){var v=g.v===c?g.w:g.v,C=n.edge(v,c),b=Of.isUndefined(C)?0:C.weight;n.setEdge(v,c,{weight:e.edge(g).weight+b})}),Of.has(d,"minRank")&&n.setNode(c,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),n}function Zat(e){for(var a;e.hasNode(a=Of.uniqueId("_root")););return a}});var mj=pt((B2n,pj)=>{var ert=ya();pj.exports=trt;function trt(e,a,t){var o={},n;ert.forEach(t,function(c){for(var d=e.parent(c),u,g;d;){if(u=e.parent(d),u?(g=o[u],o[u]=d):(g=n,n=d),g&&g!==d){a.setEdge(g,d);return}d=u}})}});var gj=pt((R2n,hj)=>{"use strict";var wp=ya(),irt=QG(),nrt=YG(),ort=lj(),art=cj(),rrt=mj(),lrt=os().Graph,dj=tl();hj.exports=srt;function srt(e){var a=dj.maxRank(e),t=uj(e,wp.range(1,a+1),"inEdges"),o=uj(e,wp.range(a-1,-1,-1),"outEdges"),n=irt(e);fj(e,n);for(var c=Number.POSITIVE_INFINITY,d,u=0,g=0;g<4;++u,++g){crt(u%2?t:o,u%4>=2),n=dj.buildLayerMatrix(e);var v=nrt(e,n);v{"use strict";var ro=ya(),prt=os().Graph,mrt=tl();wj.exports={positionX:frt,findType1Conflicts:_j,findType2Conflicts:Cj,addConflict:NM,hasConflict:vj,verticalAlignment:xj,horizontalCompaction:bj,alignCoordinates:Sj,findSmallestWidthAlignment:yj,balance:Pj};function _j(e,a){var t={};function o(n,c){var d=0,u=0,g=n.length,v=ro.last(c);return ro.forEach(c,function(C,b){var P=drt(e,C),T=P?e.node(P).order:g;(P||C===v)&&(ro.forEach(c.slice(u,b+1),function(w){ro.forEach(e.predecessors(w),function(I){var E=e.node(I),R=E.order;(Rv)&&NM(t,P,C)})})}function n(c,d){var u=-1,g,v=0;return ro.forEach(d,function(C,b){if(e.node(C).dummy==="border"){var P=e.predecessors(C);P.length&&(g=e.node(P[0]).order,o(d,v,b,u,g),v=b,u=g)}o(d,v,d.length,g,c.length)}),d}return ro.reduce(a,n),t}function drt(e,a){if(e.node(a).dummy)return ro.find(e.predecessors(a),function(t){return e.node(t).dummy})}function NM(e,a,t){if(a>t){var o=a;a=t,t=o}var n=e[a];n||(e[a]=n={}),n[t]=!0}function vj(e,a,t){if(a>t){var o=a;a=t,t=o}return ro.has(e[a],t)}function xj(e,a,t,o){var n={},c={},d={};return ro.forEach(a,function(u){ro.forEach(u,function(g,v){n[g]=g,c[g]=g,d[g]=v})}),ro.forEach(a,function(u){var g=-1;ro.forEach(u,function(v){var C=o(v);if(C.length){C=ro.sortBy(C,function(I){return d[I]});for(var b=(C.length-1)/2,P=Math.floor(b),T=Math.ceil(b);P<=T;++P){var w=C[P];c[v]===v&&g{"use strict";var Af=ya(),Mj=tl(),_rt=Tj().positionX;Dj.exports=Crt;function Crt(e){e=Mj.asNonCompoundGraph(e),vrt(e),Af.forEach(_rt(e),function(a,t){e.node(t).x=a})}function vrt(e){var a=Mj.buildLayerMatrix(e),t=e.graph().ranksep,o=0;Af.forEach(a,function(n){var c=Af.max(Af.map(n,function(d){return e.node(d).height}));Af.forEach(n,function(d){e.node(d).y=o+c/2}),o+=c+t})}});var Bj=pt((V2n,kj)=>{"use strict";var vo=ya(),Ij=uG(),Oj=xG(),xrt=kG(),brt=tl().normalizeRanks,yrt=RG(),Srt=tl().removeEmptyRanks,Aj=VG(),Prt=HG(),Fj=UG(),wrt=gj(),Trt=Ej(),Tp=tl(),Mrt=os().Graph;kj.exports=Drt;function Drt(e,a){var t=a&&a.debugTiming?Tp.time:Tp.notime;t("layout",function(){var o=t(" buildLayoutGraph",function(){return Vrt(e)});t(" runLayout",function(){Ert(o,t)}),t(" updateInputGraph",function(){Irt(e,o)})})}function Ert(e,a){a(" makeSpaceForEdgeLabels",function(){qrt(e)}),a(" removeSelfEdges",function(){Jrt(e)}),a(" acyclic",function(){Ij.run(e)}),a(" nestingGraph.run",function(){Aj.run(e)}),a(" rank",function(){xrt(Tp.asNonCompoundGraph(e))}),a(" injectEdgeLabelProxies",function(){zrt(e)}),a(" removeEmptyRanks",function(){Srt(e)}),a(" nestingGraph.cleanup",function(){Aj.cleanup(e)}),a(" normalizeRanks",function(){brt(e)}),a(" assignRankMinMax",function(){Hrt(e)}),a(" removeEdgeLabelProxies",function(){Grt(e)}),a(" normalize.run",function(){Oj.run(e)}),a(" parentDummyChains",function(){yrt(e)}),a(" addBorderSegments",function(){Prt(e)}),a(" order",function(){wrt(e)}),a(" insertSelfEdges",function(){Yrt(e)}),a(" adjustCoordinateSystem",function(){Fj.adjust(e)}),a(" position",function(){Trt(e)}),a(" positionSelfEdges",function(){Krt(e)}),a(" removeBorderNodes",function(){Qrt(e)}),a(" normalize.undo",function(){Oj.undo(e)}),a(" fixupEdgeLabelCoords",function(){Urt(e)}),a(" undoCoordinateSystem",function(){Fj.undo(e)}),a(" translateGraph",function(){jrt(e)}),a(" assignNodeIntersects",function(){$rt(e)}),a(" reversePoints",function(){Wrt(e)}),a(" acyclic.undo",function(){Ij.undo(e)})}function Irt(e,a){vo.forEach(e.nodes(),function(t){var o=e.node(t),n=a.node(t);o&&(o.x=n.x,o.y=n.y,a.children(t).length&&(o.width=n.width,o.height=n.height))}),vo.forEach(e.edges(),function(t){var o=e.edge(t),n=a.edge(t);o.points=n.points,vo.has(n,"x")&&(o.x=n.x,o.y=n.y)}),e.graph().width=a.graph().width,e.graph().height=a.graph().height}var Ort=["nodesep","edgesep","ranksep","marginx","marginy"],Art={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Frt=["acyclicer","ranker","rankdir","align"],krt=["width","height"],Brt={width:0,height:0},Rrt=["minlen","weight","width","height","labeloffset"],Nrt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Lrt=["labelpos"];function Vrt(e){var a=new Mrt({multigraph:!0,compound:!0}),t=VM(e.graph());return a.setGraph(vo.merge({},Art,LM(t,Ort),vo.pick(t,Frt))),vo.forEach(e.nodes(),function(o){var n=VM(e.node(o));a.setNode(o,vo.defaults(LM(n,krt),Brt)),a.setParent(o,e.parent(o))}),vo.forEach(e.edges(),function(o){var n=VM(e.edge(o));a.setEdge(o,vo.merge({},Nrt,LM(n,Rrt),vo.pick(n,Lrt)))}),a}function qrt(e){var a=e.graph();a.ranksep/=2,vo.forEach(e.edges(),function(t){var o=e.edge(t);o.minlen*=2,o.labelpos.toLowerCase()!=="c"&&(a.rankdir==="TB"||a.rankdir==="BT"?o.width+=o.labeloffset:o.height+=o.labeloffset)})}function zrt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a);if(t.width&&t.height){var o=e.node(a.v),n=e.node(a.w),c={rank:(n.rank-o.rank)/2+o.rank,e:a};Tp.addDummyNode(e,"edge-proxy",c,"_ep")}})}function Hrt(e){var a=0;vo.forEach(e.nodes(),function(t){var o=e.node(t);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,a=vo.max(a,o.maxRank))}),e.graph().maxRank=a}function Grt(e){vo.forEach(e.nodes(),function(a){var t=e.node(a);t.dummy==="edge-proxy"&&(e.edge(t.e).labelRank=t.rank,e.removeNode(a))})}function jrt(e){var a=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,n=0,c=e.graph(),d=c.marginx||0,u=c.marginy||0;function g(v){var C=v.x,b=v.y,P=v.width,T=v.height;a=Math.min(a,C-P/2),t=Math.max(t,C+P/2),o=Math.min(o,b-T/2),n=Math.max(n,b+T/2)}vo.forEach(e.nodes(),function(v){g(e.node(v))}),vo.forEach(e.edges(),function(v){var C=e.edge(v);vo.has(C,"x")&&g(C)}),a-=d,o-=u,vo.forEach(e.nodes(),function(v){var C=e.node(v);C.x-=a,C.y-=o}),vo.forEach(e.edges(),function(v){var C=e.edge(v);vo.forEach(C.points,function(b){b.x-=a,b.y-=o}),vo.has(C,"x")&&(C.x-=a),vo.has(C,"y")&&(C.y-=o)}),c.width=t-a+d,c.height=n-o+u}function $rt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a),o=e.node(a.v),n=e.node(a.w),c,d;t.points?(c=t.points[0],d=t.points[t.points.length-1]):(t.points=[],c=n,d=o),t.points.unshift(Tp.intersectRect(o,c)),t.points.push(Tp.intersectRect(n,d))})}function Urt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a);if(vo.has(t,"x"))switch((t.labelpos==="l"||t.labelpos==="r")&&(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset;break}})}function Wrt(e){vo.forEach(e.edges(),function(a){var t=e.edge(a);t.reversed&&t.points.reverse()})}function Qrt(e){vo.forEach(e.nodes(),function(a){if(e.children(a).length){var t=e.node(a),o=e.node(t.borderTop),n=e.node(t.borderBottom),c=e.node(vo.last(t.borderLeft)),d=e.node(vo.last(t.borderRight));t.width=Math.abs(d.x-c.x),t.height=Math.abs(n.y-o.y),t.x=c.x+t.width/2,t.y=o.y+t.height/2}}),vo.forEach(e.nodes(),function(a){e.node(a).dummy==="border"&&e.removeNode(a)})}function Jrt(e){vo.forEach(e.edges(),function(a){if(a.v===a.w){var t=e.node(a.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:a,label:e.edge(a)}),e.removeEdge(a)}})}function Yrt(e){var a=Tp.buildLayerMatrix(e);vo.forEach(a,function(t){var o=0;vo.forEach(t,function(n,c){var d=e.node(n);d.order=c+o,vo.forEach(d.selfEdges,function(u){Tp.addDummyNode(e,"selfedge",{width:u.label.width,height:u.label.height,rank:d.rank,order:c+ ++o,e:u.e,label:u.label},"_se")}),delete d.selfEdges})})}function Krt(e){vo.forEach(e.nodes(),function(a){var t=e.node(a);if(t.dummy==="selfedge"){var o=e.node(t.e.v),n=o.x+o.width/2,c=o.y,d=t.x-n,u=o.height/2;e.setEdge(t.e,t.label),e.removeNode(a),t.label.points=[{x:n+2*d/3,y:c-u},{x:n+5*d/6,y:c-u},{x:n+d,y:c},{x:n+5*d/6,y:c+u},{x:n+2*d/3,y:c+u}],t.label.x=t.x,t.label.y=t.y}})}function LM(e,a){return vo.mapValues(vo.pick(e,a),Number)}function VM(e){var a={};return vo.forEach(e,function(t,o){a[o.toLowerCase()]=t}),a}});var Nj=pt((q2n,Rj)=>{var cx=ya(),Xrt=tl(),Zrt=os().Graph;Rj.exports={debugOrdering:elt};function elt(e){var a=Xrt.buildLayerMatrix(e),t=new Zrt({compound:!0,multigraph:!0}).setGraph({});return cx.forEach(e.nodes(),function(o){t.setNode(o,{label:o}),t.setParent(o,"layer"+e.node(o).rank)}),cx.forEach(e.edges(),function(o){t.setEdge(o.v,o.w,{},o.name)}),cx.forEach(a,function(o,n){var c="layer"+n;t.setNode(c,{rank:"same"}),cx.reduce(o,function(d,u){return t.setEdge(d,u,{style:"invis"}),u})}),t}});var Vj=pt((z2n,Lj)=>{Lj.exports="0.8.5"});var zj=pt((H2n,qj)=>{qj.exports={graphlib:os(),layout:Bj(),debug:Nj(),util:{time:tl().time,notime:tl().notime},version:Vj()}});var GM=pt(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var HM=(function(){function e(a,t,o){this.source=a,this.target=t,this.type=o}return e})();Mp.PowerEdge=HM;var f$=(function(){function e(a,t,o,n){var c=this;if(this.linkAccessor=o,this.modules=new Array(a),this.roots=[],n)this.initModulesFromGroup(n);else{this.roots.push(new b0);for(var d=0;d=this.R))return this.merge(o.a,o.b,a),!0}},e.prototype.nEdges=function(a,t){var o=a.incoming.intersection(t.incoming),n=a.outgoing.intersection(t.outgoing);return this.R-o.count()-n.count()},e.prototype.getGroupHierarchy=function(a){var t=this,o=[],n={};h$(this.roots[0],n,o);var c=this.allEdges();return c.forEach(function(d){var u=t.modules[d.source],g=t.modules[d.target];a.push(new HM(typeof u.gid>"u"?d.source:o[u.gid],typeof g.gid>"u"?d.target:o[g.gid],d.type))}),o},e.prototype.allEdges=function(){var a=[];return e.getEdges(this.roots[0],a),a},e.getEdges=function(a,t){a.forAll(function(o){o.getEdges(t),e.getEdges(o.children,t)})},e})();Mp.Configuration=f$;function h$(e,a,t){e.forAll(function(o){if(o.isLeaf())a.leaves||(a.leaves=[]),a.leaves.push(o.id);else{var n=a;if(o.gid=t.length,!o.isIsland()||o.isPredefined()){if(n={id:o.gid},o.isPredefined())for(var c in o.definition)n[c]=o.definition[c];a.groups||(a.groups=[]),a.groups.push(o.gid),t.push(n)}h$(o.children,n,t)}})}var Ff=(function(){function e(a,t,o,n,c){t===void 0&&(t=new kf),o===void 0&&(o=new kf),n===void 0&&(n=new b0),this.id=a,this.outgoing=t,this.incoming=o,this.children=n,this.definition=c}return e.prototype.getEdges=function(a){var t=this;this.outgoing.forAll(function(o,n){o.forAll(function(c){a.push(new HM(t.id,c.id,n))})})},e.prototype.isLeaf=function(){return this.children.count()===0},e.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},e.prototype.isPredefined=function(){return typeof this.definition<"u"},e})();Mp.Module=Ff;function rlt(e,a){var t={};for(var o in e)o in a&&(t[o]=e[o]);return t}var b0=(function(){function e(){this.table={}}return e.prototype.count=function(){return Object.keys(this.table).length},e.prototype.intersection=function(a){var t=new e;return t.table=rlt(this.table,a.table),t},e.prototype.intersectionCount=function(a){return this.intersection(a).count()},e.prototype.contains=function(a){return a in this.table},e.prototype.add=function(a){this.table[a.id]=a},e.prototype.remove=function(a){delete this.table[a.id]},e.prototype.forAll=function(a){for(var t in this.table)a(this.table[t])},e.prototype.modules=function(){var a=[];return this.forAll(function(t){t.isPredefined()||a.push(t)}),a},e})();Mp.ModuleSet=b0;var kf=(function(){function e(){this.sets={},this.n=0}return e.prototype.count=function(){return this.n},e.prototype.contains=function(a){var t=!1;return this.forAllModules(function(o){!t&&o.id==a&&(t=!0)}),t},e.prototype.add=function(a,t){var o=a in this.sets?this.sets[a]:this.sets[a]=new b0;o.add(t),++this.n},e.prototype.remove=function(a,t){var o=this.sets[a];o.remove(t),o.count()===0&&delete this.sets[a],--this.n},e.prototype.forAll=function(a){for(var t in this.sets)a(this.sets[t],Number(t))},e.prototype.forAllModules=function(a){this.forAll(function(t,o){return t.forAll(a)})},e.prototype.intersection=function(a){var t=new e;return this.forAll(function(o,n){if(n in a.sets){var c=o.intersection(a.sets[n]),d=c.count();d>0&&(t.sets[n]=c,t.n+=d)}}),t},e})();Mp.LinkSets=kf;function llt(e,a,t,o){for(var n=e.length,c=new f$(n,a,t,o);c.greedyMerge(););var d=[],u=c.getGroupHierarchy(d);return d.forEach(function(g){var v=function(C){var b=g[C];typeof b=="number"&&(g[C]=e[b])};v("source"),v("target")}),{groups:u,powerEdges:d}}Mp.getGroups=llt});var fx=pt(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});function g$(e,a){var t={};for(var o in e)t[o]={};for(var o in a)t[o]={};return Object.keys(t).length}function _$(e,a){var t=0;for(var o in e)typeof a[o]<"u"&&++t;return t}function slt(e,a){var t={},o=function(n,c){typeof t[n]>"u"&&(t[n]={}),t[n][c]={}};return e.forEach(function(n){var c=a.getSourceIndex(n),d=a.getTargetIndex(n);o(c,d),o(d,c)}),t}function C$(e,a,t,o){var n=slt(e,o);e.forEach(function(c){var d=n[o.getSourceIndex(c)],u=n[o.getTargetIndex(c)];o.setLength(c,1+a*t(d,u))})}function clt(e,a,t){t===void 0&&(t=1),C$(e,t,function(o,n){return Math.sqrt(g$(o,n)-_$(o,n))},a)}y0.symmetricDiffLinkLengths=clt;function plt(e,a,t){t===void 0&&(t=1),C$(e,t,function(o,n){return Math.min(Object.keys(o).length,Object.keys(n).length)<1.1?0:_$(o,n)/g$(o,n)},a)}y0.jaccardLinkLengths=plt;function mlt(e,a,t,o){var n=v$(e,a,o),c={};n.forEach(function(u,g){return u.forEach(function(v){return c[v]=g})});var d=[];return a.forEach(function(u){var g=o.getSourceIndex(u),v=o.getTargetIndex(u),C=c[g],b=c[v];C!==b&&d.push({axis:t,left:g,right:v,gap:o.getMinSeparation(u)})}),d}y0.generateDirectedEdgeConstraints=mlt;function v$(e,a,t){var o=[],n=0,c=[],d=[];function u(R){R.index=R.lowlink=n++,c.push(R),R.onStack=!0;for(var G=0,U=R.out;G"u"?(u(Z),R.lowlink=Math.min(R.lowlink,Z.lowlink)):Z.onStack&&(R.lowlink=Math.min(R.lowlink,Z.index))}if(R.lowlink===R.index){for(var he=[];c.length&&(Z=c.pop(),Z.onStack=!1,he.push(Z),Z!==R););d.push(he.map(function(re){return re.id}))}}for(var g=0;g"u"&&u(E)}return d}y0.stronglyConnectedComponents=v$});var hx=pt(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});var x$=(function(){function e(){this.locks={}}return e.prototype.add=function(a,t){this.locks[a]=t},e.prototype.clear=function(){this.locks={}},e.prototype.isEmpty=function(){for(var a in this.locks)return!1;return!0},e.prototype.apply=function(a){for(var t in this.locks)a(Number(t),this.locks[t])},e})();Bf.Locks=x$;var dlt=(function(){function e(a,t,o){o===void 0&&(o=null),this.D=t,this.G=o,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new b$,this.project=null,this.x=a,this.k=a.length;var n=this.n=a[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new x$,this.minD=Number.MAX_VALUE;for(var c=n,d;c--;)for(d=n;--d>c;){var u=t[c][d];u>0&&u1e-9)break;var w=this.offsetDir();for(n=0;n1&&I>E||!isFinite(E)){for(n=0;n1&&(R=1);var G=E*E,U=2*R*(I-E)/(G*I),Z=I*I*I,he=2*-R/(G*Z);for(isFinite(U)||console.log(U),n=0;n0?j-(O+1)*pe:j-(O-1)*pe;-re0;)for(var c=t;c-- >0;)o(n,c)},e.prototype.matrixApply=function(a){e.mApply(this.k,this.n,a)},e.prototype.computeNextPosition=function(a,t){var o=this;this.computeDerivatives(a);var n=this.computeStepSize(this.g);if(this.stepAndProject(a,t,this.g,n),this.project){this.matrixApply(function(d,u){return o.e[d][u]=a[d][u]-t[d][u]});var c=this.computeStepSize(this.e);c=Math.max(.2,Math.min(c,1)),this.stepAndProject(a,t,this.e,c)}},e.prototype.run=function(a){for(var t=Number.MAX_VALUE,o=!1;!o&&a-- >0;){var n=this.rungeKutta();o=Math.abs(t/n-1)>16)/this.range},e.prototype.getNextBetween=function(a,t){return a+this.getNext()*(t-a)},e})();Bf.PseudoRandom=b$});var Cx=pt(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});var y$=(function(){function e(a){this.scale=a,this.AB=0,this.AD=0,this.A2=0}return e.prototype.addVariable=function(a){var t=this.scale/a.scale,o=a.offset/a.scale,n=a.weight;this.AB+=n*t*o,this.AD+=n*t*a.desiredPosition,this.A2+=n*t*t},e.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},e})();Fc.PositionStats=y$;var gx=(function(){function e(a,t,o,n){n===void 0&&(n=!1),this.left=a,this.right=t,this.gap=o,this.equality=n,this.active=!1,this.unsatisfiable=!1,this.left=a,this.right=t,this.gap=o,this.equality=n}return e.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},e})();Fc.Constraint=gx;var _x=(function(){function e(a,t,o){t===void 0&&(t=1),o===void 0&&(o=1),this.desiredPosition=a,this.weight=t,this.scale=o,this.offset=0}return e.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},e.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},e.prototype.visitNeighbours=function(a,t){var o=function(n,c){return n.active&&a!==c&&t(n,c)};this.cOut.forEach(function(n){return o(n,n.right)}),this.cIn.forEach(function(n){return o(n,n.left)})},e})();Fc.Variable=_x;var jM=(function(){function e(a){this.vars=[],a.offset=0,this.ps=new y$(a.scale),this.addVariable(a)}return e.prototype.addVariable=function(a){a.block=this,this.vars.push(a),this.ps.addVariable(a),this.posn=this.ps.getPosn()},e.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var a=0,t=this.vars.length;a=0?this.inactive.push(a):this.bs.merge(a)}}},e.prototype.solve=function(){this.satisfy();for(var a=Number.MAX_VALUE,t=this.bs.cost();Math.abs(a-t)>1e-4;)this.satisfy(),a=t,t=this.bs.cost();return t},e.LAGRANGIAN_TOLERANCE=-1e-4,e.ZERO_UPPERBOUND=-1e-10,e})();Fc.Solver=UM;function ult(e,a,t){for(var o=e.map(function(E){return new _x(E.desiredCenter)}),n=[],c=e.length,d=0;d{"use strict";var flt=ld&&ld.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(ld,"__esModule",{value:!0});var S$=(function(){function e(){this.findIter=function(a){for(var t=this._root,o=this.iterator();t!==null;){var n=this._comparator(a,t.data);if(n===0)return o._cursor=t,o;o._ancestors.push(t),t=t.get_child(n>0)}return null}}return e.prototype.clear=function(){this._root=null,this.size=0},e.prototype.find=function(a){for(var t=this._root;t!==null;){var o=this._comparator(a,t.data);if(o===0)return t.data;t=t.get_child(o>0)}return null},e.prototype.lowerBound=function(a){return this._bound(a,this._comparator)},e.prototype.upperBound=function(a){var t=this._comparator;function o(n,c){return t(c,n)}return this._bound(a,o)},e.prototype.min=function(){var a=this._root;if(a===null)return null;for(;a.left!==null;)a=a.left;return a.data},e.prototype.max=function(){var a=this._root;if(a===null)return null;for(;a.right!==null;)a=a.right;return a.data},e.prototype.iterator=function(){return new P$(this)},e.prototype.each=function(a){for(var t=this.iterator(),o;(o=t.next())!==null;)a(o)},e.prototype.reach=function(a){for(var t=this.iterator(),o;(o=t.prev())!==null;)a(o)},e.prototype._bound=function(a,t){for(var o=this._root,n=this.iterator();o!==null;){var c=this._comparator(a,o.data);if(c===0)return n._cursor=o,n;n._ancestors.push(o),o=o.get_child(c>0)}for(var d=n._ancestors.length-1;d>=0;--d)if(o=n._ancestors[d],t(a,o.data)>0)return n._cursor=o,n._ancestors.length=d,n;return n._ancestors.length=0,n},e})();ld.TreeBase=S$;var P$=(function(){function e(a){this._tree=a,this._ancestors=[],this._cursor=null}return e.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},e.prototype.next=function(){if(this._cursor===null){var a=this._tree._root;a!==null&&this._minNode(a)}else if(this._cursor.right===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===t)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},e.prototype.prev=function(){if(this._cursor===null){var a=this._tree._root;a!==null&&this._maxNode(a)}else if(this._cursor.left===null){var t;do if(t=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===t)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},e.prototype._minNode=function(a){for(;a.left!==null;)this._ancestors.push(a),a=a.left;this._cursor=a},e.prototype._maxNode=function(a){for(;a.right!==null;)this._ancestors.push(a),a=a.right;this._cursor=a},e})();ld.Iterator=P$;var vx=(function(){function e(a){this.data=a,this.left=null,this.right=null,this.red=!0}return e.prototype.get_child=function(a){return a?this.right:this.left},e.prototype.set_child=function(a,t){a?this.right=t:this.left=t},e})(),hlt=(function(e){flt(a,e);function a(t){var o=e.call(this)||this;return o._root=null,o._comparator=t,o.size=0,o}return a.prototype.insert=function(t){var o=!1;if(this._root===null)this._root=new vx(t),o=!0,this.size++;else{var n=new vx(void 0),c=!1,d=!1,u=null,g=n,v=null,C=this._root;for(g.right=this._root;;){if(C===null?(C=new vx(t),v.set_child(c,C),o=!0,this.size++):a.is_red(C.left)&&a.is_red(C.right)&&(C.red=!0,C.left.red=!1,C.right.red=!1),a.is_red(C)&&a.is_red(v)){var b=g.right===u;C===v.get_child(d)?g.set_child(b,a.single_rotate(u,!d)):g.set_child(b,a.double_rotate(u,!d))}var P=this._comparator(C.data,t);if(P===0)break;d=c,c=P<0,u!==null&&(g=u),u=v,v=C,C=C.get_child(c)}this._root=n.right}return this._root.red=!1,o},a.prototype.remove=function(t){if(this._root===null)return!1;var o=new vx(void 0),n=o;n.right=this._root;for(var c=null,d=null,u=null,g=!0;n.get_child(g)!==null;){var v=g;d=c,c=n,n=n.get_child(g);var C=this._comparator(t,n.data);if(g=C>0,C===0&&(u=n),!a.is_red(n)&&!a.is_red(n.get_child(g))){if(a.is_red(n.get_child(!g))){var b=a.single_rotate(n,g);c.set_child(v,b),c=b}else if(!a.is_red(n.get_child(!g))){var P=c.get_child(!v);if(P!==null)if(!a.is_red(P.get_child(!v))&&!a.is_red(P.get_child(v)))c.red=!1,P.red=!0,n.red=!0;else{var T=d.right===c;a.is_red(P.get_child(v))?d.set_child(T,a.double_rotate(c,v)):a.is_red(P.get_child(!v))&&d.set_child(T,a.single_rotate(c,v));var w=d.get_child(T);w.red=!0,n.red=!0,w.left.red=!1,w.right.red=!1}}}}return u!==null&&(u.data=n.data,c.set_child(c.right===n,n.get_child(n.left===null)),this.size--),this._root=o.right,this._root!==null&&(this._root.red=!1),u!==null},a.is_red=function(t){return t!==null&&t.red},a.single_rotate=function(t,o){var n=t.get_child(!o);return t.set_child(!o,n.get_child(o)),n.set_child(o,t),t.red=!0,n.red=!1,n},a.double_rotate=function(t,o){return t.set_child(!o,a.single_rotate(t.get_child(!o),!o)),a.single_rotate(t,o)},a})(S$);ld.RBTree=hlt});var S0=pt(nl=>{"use strict";var glt=nl&&nl.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(nl,"__esModule",{value:!0});var kc=Cx(),_lt=WM();function Rf(e){return e.bounds=typeof e.leaves<"u"?e.leaves.reduce(function(a,t){return t.bounds.union(a)},Dp.empty()):Dp.empty(),typeof e.groups<"u"&&(e.bounds=e.groups.reduce(function(a,t){return Rf(t).union(a)},e.bounds)),e.bounds=e.bounds.inflate(e.padding),e.bounds}nl.computeGroupBounds=Rf;var Dp=(function(){function e(a,t,o,n){this.x=a,this.X=t,this.y=o,this.Y=n}return e.empty=function(){return new e(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},e.prototype.cx=function(){return(this.x+this.X)/2},e.prototype.cy=function(){return(this.y+this.Y)/2},e.prototype.overlapX=function(a){var t=this.cx(),o=a.cx();return t<=o&&a.x0?o[0]:null},e.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},e.lineIntersection=function(a,t,o,n,c,d,u,g){var v=o-a,C=u-c,b=n-t,P=g-d,T=P*v-C*b;if(T==0)return null;var w=a-c,I=t-d,E=C*I-P*w,R=E/T,G=v*I-b*w,U=G/T;return R>=0&&R<=1&&U>=0&&U<=1?{x:a+R*v,y:t+R*b}:null},e.prototype.inflate=function(a){return new e(this.x-a,this.X+a,this.y-a,this.Y+a)},e})();nl.Rectangle=Dp;function Clt(e,a,t){var o=e.rayIntersection(a.cx(),a.cy())||{x:e.cx(),y:e.cy()},n=a.rayIntersection(e.cx(),e.cy())||{x:a.cx(),y:a.cy()},c=n.x-o.x,d=n.y-o.y,u=Math.sqrt(c*c+d*d),g=u-t;return{sourceIntersection:o,targetIntersection:n,arrowStart:{x:o.x+g*c/u,y:o.y+g*d/u}}}nl.makeEdgeBetween=Clt;function vlt(e,a,t){var o=a.rayIntersection(e.x,e.y);o||(o={x:a.cx(),y:a.cy()});var n=o.x-e.x,c=o.y-e.y,d=Math.sqrt(n*n+c*c);return{x:o.x-t*n/d,y:o.y-t*c/d}}nl.makeEdgeTo=vlt;var xlt=(function(){function e(a,t,o){this.v=a,this.r=t,this.pos=o,this.prev=QM(),this.next=QM()}return e})(),w$=(function(){function e(a,t,o){this.isOpen=a,this.v=t,this.pos=o}return e})();function blt(e,a){return e.pos>a.pos?1:e.pos=c);var u=new Array(d);for(n=0;n0&&(e[o].insert(c),c[n].insert(e))};t("next","prev"),t("prev","next")}function D$(e,a){return YM(e,a,T$,1e-6)}nl.generateXConstraints=D$;function E$(e,a){return YM(e,a,M$,1e-6)}nl.generateYConstraints=E$;function I$(e){return JM(e,T$,1e-6)}nl.generateXGroupConstraints=I$;function O$(e){return JM(e,M$,1e-6)}nl.generateYGroupConstraints=O$;function Plt(e){var a=e.map(function(n){return new kc.Variable(n.cx())}),t=D$(e,a),o=new kc.Solver(a,t);o.solve(),a.forEach(function(n,c){return e[c].setXCentre(n.position())}),a=e.map(function(n){return new kc.Variable(n.cy())}),t=E$(e,a),o=new kc.Solver(a,t),o.solve(),a.forEach(function(n,c){return e[c].setYCentre(n.position())})}nl.removeOverlaps=Plt;var xx=(function(e){glt(a,e);function a(t,o){var n=e.call(this,0,o)||this;return n.index=t,n}return a})(kc.Variable);nl.IndexedVariable=xx;var wlt=(function(){function e(a,t,o,n,c){var d=this;if(o===void 0&&(o=null),n===void 0&&(n=null),c===void 0&&(c=!1),this.nodes=a,this.groups=t,this.rootGroup=o,this.avoidOverlaps=c,this.variables=a.map(function(g,v){return g.variable=new xx(v,1)}),n&&this.createConstraints(n),c&&o&&typeof o.groups<"u"){a.forEach(function(g){if(!g.width||!g.height){g.bounds=new Dp(g.x,g.x,g.y,g.y);return}var v=g.width/2,C=g.height/2;g.bounds=new Dp(g.x-v,g.x+v,g.y-C,g.y+C)}),Rf(o);var u=a.length;t.forEach(function(g){d.variables[u]=g.minVar=new xx(u++,typeof g.stiffness<"u"?g.stiffness:.01),d.variables[u]=g.maxVar=new xx(u++,typeof g.stiffness<"u"?g.stiffness:.01)})}}return e.prototype.createSeparation=function(a){return new kc.Constraint(this.nodes[a.left].variable,this.nodes[a.right].variable,a.gap,typeof a.equality<"u"?a.equality:!1)},e.prototype.makeFeasible=function(a){var t=this;if(this.avoidOverlaps){var o="x",n="width";a.axis==="x"&&(o="y",n="height");var c=a.offsets.map(function(u){return t.nodes[u.node]}).sort(function(u,g){return u[o]-g[o]}),d=null;c.forEach(function(u){if(d){var g=d[o]+d[n];g>u[o]&&(u[o]=g)}d=u})}},e.prototype.createAlignment=function(a){var t=this,o=this.nodes[a.offsets[0].node].variable;this.makeFeasible(a);var n=a.axis==="x"?this.xConstraints:this.yConstraints;a.offsets.slice(1).forEach(function(c){var d=t.nodes[c.node].variable;n.push(new kc.Constraint(o,d,c.offset,!0))})},e.prototype.createConstraints=function(a){var t=this,o=function(n){return typeof n.type>"u"||n.type==="separation"};this.xConstraints=a.filter(function(n){return n.axis==="x"&&o(n)}).map(function(n){return t.createSeparation(n)}),this.yConstraints=a.filter(function(n){return n.axis==="y"&&o(n)}).map(function(n){return t.createSeparation(n)}),a.filter(function(n){return n.type==="alignment"}).forEach(function(n){return t.createAlignment(n)})},e.prototype.setupVariablesAndBounds=function(a,t,o,n){this.nodes.forEach(function(c,d){c.fixed?(c.variable.weight=c.fixedWeight?c.fixedWeight:1e3,o[d]=n(c)):c.variable.weight=1;var u=(c.width||0)/2,g=(c.height||0)/2,v=a[d],C=t[d];c.bounds=new Dp(v-u,v+u,C-g,C+g)})},e.prototype.xProject=function(a,t,o){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(a,t,a,o,function(n){return n.px},this.xConstraints,I$,function(n){return n.bounds.setXCentre(o[n.variable.index]=n.variable.position())},function(n){var c=o[n.minVar.index]=n.minVar.position(),d=o[n.maxVar.index]=n.maxVar.position(),u=n.padding/2;n.bounds.x=c-u,n.bounds.X=d+u})},e.prototype.yProject=function(a,t,o){!this.rootGroup&&!this.yConstraints||this.project(a,t,t,o,function(n){return n.py},this.yConstraints,O$,function(n){return n.bounds.setYCentre(o[n.variable.index]=n.variable.position())},function(n){var c=o[n.minVar.index]=n.minVar.position(),d=o[n.maxVar.index]=n.maxVar.position(),u=n.padding/2;n.bounds.y=c-u,n.bounds.Y=d+u})},e.prototype.projectFunctions=function(){var a=this;return[function(t,o,n){return a.xProject(t,o,n)},function(t,o,n){return a.yProject(t,o,n)}]},e.prototype.project=function(a,t,o,n,c,d,u,g,v){this.setupVariablesAndBounds(a,t,n,c),this.rootGroup&&this.avoidOverlaps&&(Rf(this.rootGroup),d=d.concat(u(this.rootGroup))),this.solve(this.variables,d,o,n),this.nodes.forEach(g),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach(v),Rf(this.rootGroup))},e.prototype.solve=function(a,t,o,n){var c=new kc.Solver(a,t);c.setStartingPositions(o),c.setDesiredPositions(n),c.solve()},e})();nl.Projection=wlt});var KM=pt(bx=>{"use strict";Object.defineProperty(bx,"__esModule",{value:!0});var A$=(function(){function e(a){this.elem=a,this.subheaps=[]}return e.prototype.toString=function(a){for(var t="",o=!1,n=0;n{"use strict";Object.defineProperty(XM,"__esModule",{value:!0});var F$=KM(),k$=(function(){function e(a,t){this.id=a,this.distance=t}return e})(),Mlt=(function(){function e(a){this.id=a,this.neighbours=[]}return e})(),B$=(function(){function e(a,t,o){this.node=a,this.prev=t,this.d=o}return e})(),Dlt=(function(){function e(a,t,o,n,c){this.n=a,this.es=t,this.neighbours=new Array(this.n);for(var d=this.n;d--;)this.neighbours[d]=new Mlt(d);for(d=this.es.length;d--;){var u=this.es[d],g=o(u),v=n(u),C=c(u);this.neighbours[g].neighbours.push(new k$(v,C)),this.neighbours[v].neighbours.push(new k$(g,C))}}return e.prototype.DistanceMatrix=function(){for(var a=new Array(this.n),t=0;tb&&(v.d=b,v.prev=u,o.reduceKey(v.q,v,function(T,w){return T.q=w}))}}return c},e})();XM.Calculator=Dlt});var i5=pt(Oa=>{"use strict";var N$=Oa&&Oa.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(Oa,"__esModule",{value:!0});var Elt=S0(),e5=(function(){function e(){}return e})();Oa.Point=e5;var t5=(function(){function e(a,t,o,n){this.x1=a,this.y1=t,this.x2=o,this.y2=n}return e})();Oa.LineSegment=t5;var Ilt=(function(e){N$(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a})(e5);Oa.PolyPoint=Ilt;function Il(e,a,t){return(a.x-e.x)*(t.y-e.y)-(t.x-e.x)*(a.y-e.y)}Oa.isLeft=Il;function Os(e,a,t){return Il(e,a,t)>0}function as(e,a,t){return Il(e,a,t)<0}function Olt(e){var a=e.slice(0).sort(function(P,T){return P.x!==T.x?T.x-P.x:T.y-P.y}),t=e.length,o,n=0,c=a[0].x;for(o=1;o=0&&a[o].x===C;o--);for(g=o+1,o=d;++o<=g;)if(!(Il(a[n],a[g],a[o])>=0&&o1&&!(Il(u[u.length-2],u[u.length-1],a[o])>0);)u.length-=1;o!=n&&u.push(a[o])}v!=g&&u.push(a[v]);var b=u.length;for(o=g;--o>=d;)if(!(Il(a[v],a[d],a[o])>=0&&o>d)){for(;u.length>b&&!(Il(u[u.length-2],u[u.length-1],a[o])>0);)u.length-=1;o!=n&&u.push(a[o])}}return u}Oa.ConvexHull=Olt;function Alt(e,a,t){a.slice(0).sort(function(o,n){return Math.atan2(o.y-e.y,o.x-e.x)-Math.atan2(n.y-e.y,n.x-e.x)}).forEach(t)}Oa.clockwiseRadialSweep=Alt;function Flt(e,a){var t=a.slice(0);return t.push(a[0]),{rtan:Sx(e,t),ltan:Px(e,t)}}function Sx(e,a){var t=a.length-1,o,n,c,d,u;if(as(e,a[1],a[0])&&!Os(e,a[t-1],a[0]))return 0;for(o=0,n=t;;){if(n-o===1)return Os(e,a[o],a[n])?o:n;if(c=Math.floor((o+n)/2),u=as(e,a[c+1],a[c]),u&&!Os(e,a[c-1],a[c]))return c;d=Os(e,a[o+1],a[o]),d?u||Os(e,a[o],a[c])?n=c:o=c:u&&as(e,a[o],a[c])?n=c:o=c}}function Px(e,a){var t=a.length-1,o,n,c,d,u;if(Os(e,a[t-1],a[0])&&!as(e,a[1],a[0]))return 0;for(o=0,n=t;;){if(n-o===1)return as(e,a[o],a[n])?o:n;if(c=Math.floor((o+n)/2),u=as(e,a[c+1],a[c]),Os(e,a[c-1],a[c])&&!u)return c;d=as(e,a[o+1],a[o]),d?u?as(e,a[o],a[c])?n=c:o=c:n=c:u?o=c:Os(e,a[o],a[c])?n=c:o=c}}function wx(e,a,t,o,n,c){var d,u;d=t(a[0],e),u=o(e[d],a);for(var g=!1;!g;){for(g=!0;d===e.length-1&&(d=0),!n(a[u],e[d],e[d+1]);)++d;for(;u===0&&(u=a.length-1),!c(e[d],a[u],a[u-1]);)--u,g=!1}return{t1:d,t2:u}}Oa.tangent_PolyPolyC=wx;function klt(e,a){var t=L$(a,e);return{t1:t.t2,t2:t.t1}}Oa.LRtangent_PolyPolyC=klt;function L$(e,a){return wx(e,a,Sx,Px,Os,as)}Oa.RLtangent_PolyPolyC=L$;function Blt(e,a){return wx(e,a,Px,Px,as,as)}Oa.LLtangent_PolyPolyC=Blt;function Rlt(e,a){return wx(e,a,Sx,Sx,Os,Os)}Oa.RRtangent_PolyPolyC=Rlt;var Lf=(function(){function e(a,t){this.t1=a,this.t2=t}return e})();Oa.BiTangent=Lf;var V$=(function(){function e(){}return e})();Oa.BiTangents=V$;var Nlt=(function(e){N$(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a})(e5);Oa.TVGPoint=Nlt;var ZM=(function(){function e(a,t,o,n){this.id=a,this.polyid=t,this.polyvertid=o,this.p=n,n.vv=this}return e})();Oa.VisibilityVertex=ZM;var yx=(function(){function e(a,t){this.source=a,this.target=t}return e.prototype.length=function(){var a=this.source.p.x-this.target.p.x,t=this.source.p.y-this.target.p.y;return Math.sqrt(a*a+t*t)},e})();Oa.VisibilityEdge=yx;var Llt=(function(){function e(a,t){if(this.P=a,this.V=[],this.E=[],t)this.V=t.V.slice(0),this.E=t.E.slice(0);else{for(var o=a.length,n=0;n0&&this.E.push(new yx(c[d-1].vv,g))}c.length>1&&this.E.push(new yx(c[0].vv,c[c.length-1].vv))}for(var n=0;n0)return!0;return!1},e})();Oa.TangentVisibilityGraph=Llt;function q$(e,a){for(var t=[],o=1,n=a.length;o=0&&w>=0&&I<0&&E>=0&&R>=0&&G<0?n.ll=new Lf(c,d):T<=0&&w<=0&&I>0&&E<=0&&R<=0&&G>0?n.rr=new Lf(c,d):T<=0&&w>0&&I<=0&&E>=0&&R<0&&G>=0?n.rl=new Lf(c,d):T>=0&&w<0&&I>=0&&E<=0&&R>0&&G<=0&&(n.lr=new Lf(c,d))}return n}Oa.tangents=z$;function Vlt(e,a){for(var t=1,o=a.length;t0)return!0}return!1}Oa.polysOverlap=qlt});var n5=pt(Tx=>{"use strict";Object.defineProperty(Tx,"__esModule",{value:!0});var rs={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4,MAX_INERATIONS:100};function zlt(e,a,t,b,C,c){C===void 0&&(C=1),c===void 0&&(c=!0);var d=0,u=0,g=a,v=t,C=typeof C<"u"?C:1,b=typeof b<"u"?b:0,P=0,T=0,w=0,I=0,E=[];if(e.length==0)return;R(e),U(e,C),c&&G(e);function R(de){de.forEach(function(ue){be(ue)});function be(ue){var j=Number.MAX_VALUE,Q=Number.MAX_VALUE,le=0,O=0;ue.array.forEach(function(k){var L=typeof k.width<"u"?k.width:b,N=typeof k.height<"u"?k.height:b;L/=2,N/=2,le=Math.max(k.x+L,le),j=Math.min(k.x-L,j),O=Math.max(k.y+N,O),Q=Math.min(k.y-N,Q)}),ue.width=le-j,ue.height=O-Q}}function G(de){de.forEach(function(be){var ue={x:0,y:0};be.array.forEach(function(le){ue.x+=le.x,ue.y+=le.y}),ue.x/=be.array.length,ue.y/=be.array.length;var j={x:ue.x-be.width/2,y:ue.y-be.height/2},Q={x:be.x-j.x+g/2-P/2,y:be.y-j.y+v/2-T/2};be.array.forEach(function(le){le.x+=Q.x,le.y+=Q.y})})}function U(de,be){var ue=Number.POSITIVE_INFINITY,j=0;de.sort(function(ye,Le){return Le.height-ye.height}),w=de.reduce(function(ye,Le){return ye.widthw||$>rs.FLOAT_EPSILON;){if(N!=1)var ne=le-(le-Q)/rs.GOLDEN_SECTION,k=Z(de,ne);if(N!=0)var xe=Q+(le-Q)/rs.GOLDEN_SECTION,L=Z(de,xe);if(H=Math.abs(ne-xe),$=Math.abs(k-L),kL?(Q=ne,ne=xe,k=L,N=1):(le=xe,xe=ne,L=k,N=0),O++>100)break}Z(de,j)}function Z(de,be){E=[],P=0,T=0,I=u;for(var ue=0;ue=de.height&&E[j].x+E[j].width+de.width+rs.PADDING-be<=rs.FLOAT_EPSILON){ue=E[j];break}E.push(de),ue!==void 0?(de.x=ue.x+ue.width+rs.PADDING,de.y=ue.bottom,de.space_left=de.height,de.bottom=de.y,ue.space_left-=de.height+rs.PADDING,ue.bottom+=de.height+rs.PADDING):(de.y=I,I+=de.height+rs.PADDING,de.x=d,de.bottom=de.y,de.space_left=de.height),de.y+de.height-T>-rs.FLOAT_EPSILON&&(T=de.y+de.height-u),de.x+de.width-P>-rs.FLOAT_EPSILON&&(P=de.x+de.width-d)}function re(de){var be=0;return de.forEach(function(ue){return be+=ue.width+rs.PADDING}),be}function pe(){return P/T}}Tx.applyPacking=zlt;function Hlt(e,a){for(var t={},o={},n=[],c=0,d=0;d{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var Glt=GM(),o5=fx(),Mx=hx(),Dx=S0(),H$=Nf(),G$=i5(),j$=n5(),Vf;(function(e){e[e.start=0]="start",e[e.tick=1]="tick",e[e.end=2]="end"})(Vf=qf.EventType||(qf.EventType={}));function Ex(e){return typeof e.leaves<"u"||typeof e.groups<"u"}var jlt=(function(){function e(){var a=this;this._canvasSize=[1,1],this._linkDistance=20,this._defaultNodeSize=10,this._linkLengthCalculator=null,this._linkType=null,this._avoidOverlaps=!1,this._handleDisconnected=!0,this._running=!1,this._nodes=[],this._groups=[],this._rootGroup=null,this._links=[],this._constraints=[],this._distanceMatrix=null,this._descent=null,this._directedLinkConstraints=null,this._threshold=.01,this._visibilityGraph=null,this._groupCompactness=1e-6,this.event=null,this.linkAccessor={getSourceIndex:e.getSourceIndex,getTargetIndex:e.getTargetIndex,setLength:e.setLinkLength,getType:function(t){return typeof a._linkType=="function"?a._linkType(t):0}}}return e.prototype.on=function(a,t){return this.event||(this.event={}),typeof a=="string"?this.event[Vf[a]]=t:this.event[a]=t,this},e.prototype.trigger=function(a){this.event&&typeof this.event[a.type]<"u"&&this.event[a.type](a)},e.prototype.kick=function(){for(;!this.tick(););},e.prototype.tick=function(){if(this._alpha"u"||typeof o.py>"u")&&(o.px=o.x,o.py=o.y);var c=[o.px,o.py];this._descent.locks.add(n,c)}var d=this._descent.rungeKutta();return d===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=d),this._lastStress=d,this.updateNodePositions(),this.trigger({type:Vf.tick,alpha:this._alpha,stress:this._lastStress}),!1},e.prototype.updateNodePositions=function(){for(var a=this._descent.x[0],t=this._descent.x[1],o,n=this._nodes.length;n--;)o=this._nodes[n],o.x=a[n],o.y=t[n]},e.prototype.nodes=function(a){if(!a){if(this._nodes.length===0&&this._links.length>0){var t=0;this._links.forEach(function(n){t=Math.max(t,n.source,n.target)}),this._nodes=new Array(++t);for(var o=0;o"u"&&(o.padding=1),typeof o.leaves<"u"&&o.leaves.forEach(function(n,c){typeof n=="number"&&((o.leaves[c]=t._nodes[n]).parent=o)}),typeof o.groups<"u"&&o.groups.forEach(function(n,c){typeof n=="number"&&((o.groups[c]=t._groups[n]).parent=o)})}),this._rootGroup.leaves=this._nodes.filter(function(o){return typeof o.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(o){return typeof o.parent>"u"}),this):this._groups},e.prototype.powerGraphGroups=function(a){var t=Glt.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(t.groups),a(t),this},e.prototype.avoidOverlaps=function(a){return arguments.length?(this._avoidOverlaps=a,this):this._avoidOverlaps},e.prototype.handleDisconnected=function(a){return arguments.length?(this._handleDisconnected=a,this):this._handleDisconnected},e.prototype.flowLayout=function(a,t){return arguments.length||(a="y"),this._directedLinkConstraints={axis:a,getMinSeparation:typeof t=="number"?function(){return t}:t},this},e.prototype.links=function(a){return arguments.length?(this._links=a,this):this._links},e.prototype.constraints=function(a){return arguments.length?(this._constraints=a,this):this._constraints},e.prototype.distanceMatrix=function(a){return arguments.length?(this._distanceMatrix=a,this):this._distanceMatrix},e.prototype.size=function(a){return a?(this._canvasSize=a,this):this._canvasSize},e.prototype.defaultNodeSize=function(a){return a?(this._defaultNodeSize=a,this):this._defaultNodeSize},e.prototype.groupCompactness=function(a){return a?(this._groupCompactness=a,this):this._groupCompactness},e.prototype.linkDistance=function(a){return a?(this._linkDistance=typeof a=="function"?a:+a,this._linkLengthCalculator=null,this):this._linkDistance},e.prototype.linkType=function(a){return this._linkType=a,this},e.prototype.convergenceThreshold=function(a){return a?(this._threshold=typeof a=="function"?a:+a,this):this._threshold},e.prototype.alpha=function(a){return arguments.length?(a=+a,this._alpha?a>0?this._alpha=a:this._alpha=0:a>0&&(this._running||(this._running=!0,this.trigger({type:Vf.start,alpha:this._alpha=a}),this.kick())),this):this._alpha},e.prototype.getLinkLength=function(a){return typeof this._linkDistance=="function"?+this._linkDistance(a):this._linkDistance},e.setLinkLength=function(a,t){a.length=t},e.prototype.getLinkType=function(a){return typeof this._linkType=="function"?this._linkType(a):0},e.prototype.symmetricDiffLinkLengths=function(a,t){var o=this;return t===void 0&&(t=1),this.linkDistance(function(n){return a*n.length}),this._linkLengthCalculator=function(){return o5.symmetricDiffLinkLengths(o._links,o.linkAccessor,t)},this},e.prototype.jaccardLinkLengths=function(a,t){var o=this;return t===void 0&&(t=1),this.linkDistance(function(n){return a*n.length}),this._linkLengthCalculator=function(){return o5.jaccardLinkLengths(o._links,o.linkAccessor,t)},this},e.prototype.start=function(a,t,o,n,c,d){var u=this;a===void 0&&(a=0),t===void 0&&(t=0),o===void 0&&(o=0),n===void 0&&(n=0),c===void 0&&(c=!0),d===void 0&&(d=!0);var g,v,C=this.nodes().length,b=C+2*this._groups.length,P=this._links.length,T=this._canvasSize[0],w=this._canvasSize[1],I=new Array(b),E=new Array(b),R=null,G=this._avoidOverlaps;this._nodes.forEach(function(ue,j){ue.index=j,typeof ue.x>"u"&&(ue.x=T/2,ue.y=w/2),I[j]=ue.x,E[j]=ue.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var U;this._distanceMatrix?U=this._distanceMatrix:(U=new H$.Calculator(b,this._links,e.getSourceIndex,e.getTargetIndex,function(ue){return u.getLinkLength(ue)}).DistanceMatrix(),R=Mx.Descent.createSquareMatrix(b,function(){return 2}),this._links.forEach(function(ue){typeof ue.source=="number"&&(ue.source=u._nodes[ue.source]),typeof ue.target=="number"&&(ue.target=u._nodes[ue.target])}),this._links.forEach(function(ue){var j=e.getSourceIndex(ue),Q=e.getTargetIndex(ue);R[j][Q]=R[Q][j]=ue.weight||1}));var Z=Mx.Descent.createSquareMatrix(b,function(ue,j){return U[ue][j]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var g=C,he=function(j,Q,le,O){R[j][Q]=R[Q][j]=le,Z[j][Q]=Z[Q][j]=O};this._groups.forEach(function(j){he(g,g+1,u._groupCompactness,.1),I[g]=0,E[g++]=0,I[g]=0,E[g++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var re=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,re=re.concat(o5.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new Mx.Descent([I,E],Z),this._descent.locks.clear();for(var g=0;g0&&(this._descent.project=new Dx.Projection(this._nodes,this._groups,this._rootGroup,re).projectFunctions()),this._descent.run(t),this.separateOverlappingComponents(T,w,d),this.avoidOverlaps(G),G&&(this._nodes.forEach(function(ue,j){ue.x=I[j],ue.y=E[j]}),this._descent.project=new Dx.Projection(this._nodes,this._groups,this._rootGroup,re,!0).projectFunctions(),this._nodes.forEach(function(ue,j){I[j]=ue.x,E[j]=ue.y})),this._descent.G=R,this._descent.run(o),n){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=C,this._descent.scaleSnapByMaxH=C!=b;var be=Mx.Descent.createSquareMatrix(b,function(ue,j){return ue>=C||j>=C?R[ue][j]:0});this._descent.G=be,this._descent.run(n)}return this.updateNodePositions(),this.separateOverlappingComponents(T,w,d),c?this.resume():this},e.prototype.initialLayout=function(a,t,o){if(this._groups.length>0&&a>0){var n=this._nodes.length,c=this._links.map(function(u){return{source:u.source.index,target:u.target.index}}),d=this._nodes.map(function(u){return{index:u.index}});this._groups.forEach(function(u,g){d.push({index:u.index=n+g})}),this._groups.forEach(function(u,g){typeof u.leaves<"u"&&u.leaves.forEach(function(v){return c.push({source:u.index,target:v.index})}),typeof u.groups<"u"&&u.groups.forEach(function(v){return c.push({source:u.index,target:v.index})})}),new e().size(this.size()).nodes(d).links(c).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(a,0,0,0,!1),this._nodes.forEach(function(u){t[u.index]=d[u.index].x,o[u.index]=d[u.index].y})}else this._descent.run(a)},e.prototype.separateOverlappingComponents=function(a,t,o){var n=this;if(o===void 0&&(o=!0),!this._distanceMatrix&&this._handleDisconnected){var c=this._descent.x[0],d=this._descent.x[1];this._nodes.forEach(function(g,v){g.x=c[v],g.y=d[v]});var u=j$.separateGraphs(this._nodes,this._links);j$.applyPacking(u,a,t,this._defaultNodeSize,1,o),this._nodes.forEach(function(g,v){n._descent.x[0][v]=g.x,n._descent.x[1][v]=g.y,g.bounds&&(g.bounds.setXCentre(g.x),g.bounds.setYCentre(g.y))})}},e.prototype.resume=function(){return this.alpha(.1)},e.prototype.stop=function(){return this.alpha(0)},e.prototype.prepareEdgeRouting=function(a){a===void 0&&(a=0),this._visibilityGraph=new G$.TangentVisibilityGraph(this._nodes.map(function(t){return t.bounds.inflate(-a).vertices()}))},e.prototype.routeEdge=function(a,t,o){t===void 0&&(t=5);var n=[],c=new G$.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),d={x:a.source.x,y:a.source.y},u={x:a.target.x,y:a.target.y},g=c.addPoint(d,a.source.index),v=c.addPoint(u,a.target.index);c.addEdgeIfVisible(d,u,a.source.index,a.target.index),typeof o<"u"&&o(c);var C=function(Z){return Z.source.id},b=function(Z){return Z.target.id},P=function(Z){return Z.length()},T=new H$.Calculator(c.V.length,c.E,C,b,P),w=T.PathFromNodeToNode(g.id,v.id);if(w.length===1||w.length===c.V.length){var I=Dx.makeEdgeBetween(a.source.innerBounds,a.target.innerBounds,t);n=[I.sourceIntersection,I.arrowStart]}else{for(var E=w.length-2,R=c.V[w[E]].p,G=c.V[w[0]].p,n=[a.source.innerBounds.rayIntersection(R.x,R.y)],U=E;U>=0;--U)n.push(c.V[w[U]].p);n.push(Dx.makeEdgeTo(G,a.target.innerBounds,t))}return n},e.getSourceIndex=function(a){return typeof a.source=="number"?a.source:a.source.index},e.getTargetIndex=function(a){return typeof a.target=="number"?a.target:a.target.index},e.linkId=function(a){return e.getSourceIndex(a)+"-"+e.getTargetIndex(a)},e.dragStart=function(a){Ex(a)?e.storeOffset(a,e.dragOrigin(a)):(e.stopNode(a),a.fixed|=2)},e.stopNode=function(a){a.px=a.x,a.py=a.y},e.storeOffset=function(a,t){typeof a.leaves<"u"&&a.leaves.forEach(function(o){o.fixed|=2,e.stopNode(o),o._dragGroupOffsetX=o.x-t.x,o._dragGroupOffsetY=o.y-t.y}),typeof a.groups<"u"&&a.groups.forEach(function(o){return e.storeOffset(o,t)})},e.dragOrigin=function(a){return Ex(a)?{x:a.bounds.cx(),y:a.bounds.cy()}:a},e.drag=function(a,t){Ex(a)?(typeof a.leaves<"u"&&a.leaves.forEach(function(o){a.bounds.setXCentre(t.x),a.bounds.setYCentre(t.y),o.px=o._dragGroupOffsetX+t.x,o.py=o._dragGroupOffsetY+t.y}),typeof a.groups<"u"&&a.groups.forEach(function(o){return e.drag(o,t)})):(a.px=t.x,a.py=t.y)},e.dragEnd=function(a){Ex(a)?(typeof a.leaves<"u"&&a.leaves.forEach(function(t){e.dragEnd(t),delete t._dragGroupOffsetX,delete t._dragGroupOffsetY}),typeof a.groups<"u"&&a.groups.forEach(e.dragEnd)):a.fixed&=-7},e.mouseOver=function(a){a.fixed|=4,a.px=a.x,a.py=a.y},e.mouseOut=function(a){a.fixed&=-5},e})();qf.Layout=jlt});var U$=pt(w0=>{"use strict";var $lt=w0&&w0.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(w0,"__esModule",{value:!0});var a5=P0(),$$=(function(e){$lt(a,e);function a(t){var o=e.call(this)||this,n=o,c=t;return c.trigger&&(o.trigger=c.trigger),c.kick&&(o.kick=c.kick),c.drag&&(o.drag=c.drag),c.on&&(o.on=c.on),o.dragstart=o.dragStart=a5.Layout.dragStart,o.dragend=o.dragEnd=a5.Layout.dragEnd,o}return a.prototype.trigger=function(t){},a.prototype.kick=function(){},a.prototype.drag=function(){},a.prototype.on=function(t,o){return this},a})(a5.Layout);w0.LayoutAdaptor=$$;function Ult(e){return new $$(e)}w0.adaptor=Ult});var Q$=pt(T0=>{"use strict";var Wlt=T0&&T0.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(T0,"__esModule",{value:!0});var Ol=P0(),W$=(function(e){Wlt(a,e);function a(){var t=e.call(this)||this;t.event=d3.dispatch(Ol.EventType[Ol.EventType.start],Ol.EventType[Ol.EventType.tick],Ol.EventType[Ol.EventType.end]);var o=t,n;return t.drag=function(){if(!c)var c=d3.behavior.drag().origin(Ol.Layout.dragOrigin).on("dragstart.d3adaptor",Ol.Layout.dragStart).on("drag.d3adaptor",function(d){Ol.Layout.drag(d,d3.event),o.resume()}).on("dragend.d3adaptor",Ol.Layout.dragEnd);if(!arguments.length)return c;this.call(c)},t}return a.prototype.trigger=function(t){var o={type:Ol.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event[o.type](o)},a.prototype.kick=function(){var t=this;d3.timer(function(){return e.prototype.tick.call(t)})},a.prototype.on=function(t,o){return typeof t=="string"?this.event.on(t,o):this.event.on(Ol.EventType[t],o),this},a})(Ol.Layout);T0.D3StyleLayoutAdaptor=W$;function Qlt(){return new W$}T0.d3adaptor=Qlt});var J$=pt(zf=>{"use strict";var Jlt=zf&&zf.__extends||(function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c])},e(a,t)};return function(a,t){e(a,t);function o(){this.constructor=a}a.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}})();Object.defineProperty(zf,"__esModule",{value:!0});var Al=P0(),Ylt=(function(e){Jlt(a,e);function a(t){var o=e.call(this)||this;o.d3Context=t,o.event=t.dispatch(Al.EventType[Al.EventType.start],Al.EventType[Al.EventType.tick],Al.EventType[Al.EventType.end]);var n=o,c;return o.drag=function(){if(!d)var d=t.drag().subject(Al.Layout.dragOrigin).on("start.d3adaptor",Al.Layout.dragStart).on("drag.d3adaptor",function(u){Al.Layout.drag(u,t.event),n.resume()}).on("end.d3adaptor",Al.Layout.dragEnd);if(!arguments.length)return d;arguments[0].call(d)},o}return a.prototype.trigger=function(t){var o={type:Al.EventType[t.type],alpha:t.alpha,stress:t.stress};this.event.call(o.type,o)},a.prototype.kick=function(){var t=this,o=this.d3Context.timer(function(){return e.prototype.tick.call(t)&&o.stop()})},a.prototype.on=function(t,o){return typeof t=="string"?this.event.on(t,o):this.event.on(Al.EventType[t],o),this},a})(Al.Layout);zf.D3StyleLayoutAdaptor=Ylt});var Y$=pt(r5=>{"use strict";Object.defineProperty(r5,"__esModule",{value:!0});var Klt=Q$(),Xlt=J$();function Zlt(e){return!e||est(e)?new Klt.D3StyleLayoutAdaptor:new Xlt.D3StyleLayoutAdaptor(e)}r5.d3adaptor=Zlt;function est(e){var a=/^3\./;return e.version&&e.version.match(a)!==null}});var p5=pt(M0=>{"use strict";Object.defineProperty(M0,"__esModule",{value:!0});var tst=S0(),l5=Cx(),ist=Nf(),K$=(function(){function e(a,t,o){this.id=a,this.rect=t,this.children=o,this.leaf=typeof o>"u"||o.length===0}return e})();M0.NodeWrapper=K$;var s5=(function(){function e(a,t,o,n,c){n===void 0&&(n=null),c===void 0&&(c=null),this.id=a,this.x=t,this.y=o,this.node=n,this.line=c}return e})();M0.Vert=s5;var c5=(function(){function e(a,t){this.s=a,this.t=t;var o=e.findMatch(a,t),n=t.slice(0).reverse(),c=e.findMatch(a,n);o.length>=c.length?(this.length=o.length,this.si=o.si,this.ti=o.ti,this.reversed=!1):(this.length=c.length,this.si=c.si,this.ti=t.length-c.ti-c.length,this.reversed=!0)}return e.findMatch=function(a,t){for(var o=a.length,n=t.length,c={length:0,si:-1,ti:-1},d=new Array(o),u=0;uc.length&&(c.length=v,c.si=u-v+1,c.ti=g-v+1)}else d[u][g]=0}return c},e.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},e})();M0.LongestCommonSubsequence=c5;var nst=(function(){function e(a,t,o){var n=this;o===void 0&&(o=12),this.originalnodes=a,this.groupPadding=o,this.leaves=null,this.nodes=a.map(function(I,E){return new K$(E,t.getBounds(I),t.getChildren(I))}),this.leaves=this.nodes.filter(function(I){return I.leaf}),this.groups=this.nodes.filter(function(I){return!I.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(I){return I.children.forEach(function(E){return n.nodes[E].parent=I})}),this.root={children:[]},this.nodes.forEach(function(I){typeof I.parent>"u"&&(I.parent=n.root,n.root.children.push(I.id)),I.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(I,E){return n.getDepth(I)-n.getDepth(E)});var c=this.backToFront.slice(0).reverse().filter(function(I){return!I.leaf});c.forEach(function(I){var E=tst.Rectangle.empty();I.children.forEach(function(R){return E=E.union(n.nodes[R].rect)}),I.rect=E.inflate(n.groupPadding)});var d=this.midPoints(this.cols.map(function(I){return I.pos})),u=this.midPoints(this.rows.map(function(I){return I.pos})),g=d[0],v=d[d.length-1],C=u[0],b=u[u.length-1],P=this.rows.map(function(I){return{x1:g,x2:v,y1:I.pos,y2:I.pos}}).concat(u.map(function(I){return{x1:g,x2:v,y1:I,y2:I}})),T=this.cols.map(function(I){return{x1:I.pos,x2:I.pos,y1:C,y2:b}}).concat(d.map(function(I){return{x1:I,x2:I,y1:C,y2:b}})),w=P.concat(T);w.forEach(function(I){return I.verts=[]}),this.verts=[],this.edges=[],P.forEach(function(I){return T.forEach(function(E){var R=new s5(n.verts.length,E.x1,I.y1);I.verts.push(R),E.verts.push(R),n.verts.push(R);for(var G=n.backToFront.length;G-- >0;){var U=n.backToFront[G],Z=U.rect,he=Math.abs(R.x-Z.cx()),re=Math.abs(R.y-Z.cy());if(he0;){var n=o.filter(function(d){return d.rect["overlap"+a.toUpperCase()](o[0].rect)}),c={nodes:n,pos:this.avg(n.map(function(d){return d.rect["c"+a]()}))};t.push(c),c.nodes.forEach(function(d){return o.splice(o.indexOf(d),1)})}return t.sort(function(d,u){return d.pos-u.pos}),t},e.prototype.getDepth=function(a){for(var t=0;a.parent!==this.root;)t++,a=a.parent;return t},e.prototype.midPoints=function(a){for(var t=a[1]-a[0],o=[a[0]-t/2],n=1;n.1)&&(b={pos:g[0][t],segments:[]},C.push(b)),b.segments.push(g)}return C},e.nudgeSegs=function(a,t,o,n,c,d){var u=n.length;if(!(u<=1)){for(var g=n.map(function(U){return new l5.Variable(U[0][a])}),v=[],C=0;C=0&&v.push(new l5.Constraint(g[E],g[R],d))}var G=new l5.Solver(g,v);G.solve(),g.forEach(function(U,Z){var he=n[Z],re=U.position();he[0][a]=he[1][a]=re;var pe=o[he.edgeid];he.i>0&&(pe[he.i-1][1][a]=re),he.iMath.PI||c<-Math.PI)&&(c=n-o),c},e.isLeft=function(a,t,o){return(t.x-a.x)*(o.y-a.y)-(t.y-a.y)*(o.x-a.x)<=0},e.getOrder=function(a){for(var t={},o=0;o"u"&&(t[n.l]={}),t[n.l][n.r]=!0}return function(c,d){return typeof t[c]<"u"&&t[c][d]}},e.orderEdges=function(a){for(var t=[],o=0;o=c.length||u.ti+u.length>=d.length)){t.push({l:o,r:n});continue}u.si+u.length>=c.length||u.ti+u.length>=d.length?(g=c[u.si+1],C=c[u.si-1],v=d[u.ti-1]):(g=c[u.si+u.length-2],v=c[u.si+u.length],C=d[u.ti+u.length]),e.isLeft(g,v,C)?t.push({l:n,r:o}):t.push({l:o,r:n})}}return e.getOrder(t)},e.makeSegments=function(a){function t(v){return{x:v.x,y:v.y}}for(var o=function(v,C,b){return Math.abs((C.x-v.x)*(b.y-v.y)-(C.y-v.y)*(b.x-v.x))<.001},n=[],c=t(a[0]),d=1;d1&&de>1?1e3:0},I=T.PathFromNodeToNodeWithPrevCost(n.ports[0].id,c.ports[0].id,w),E=I.reverse().map(function(R){return o.verts[R]});return E.push(this.nodes[c.id].ports[0]),E.filter(function(R,G){return!(G0&&R.node===c&&E[G-1].node===c)})},e.getRoutePath=function(a,t,o,n){var c={routepath:"M "+a[0][0].x+" "+a[0][0].y+" ",arrowpath:""};if(a.length>1)for(var d=0;d0?g-=C/Math.abs(C)*t:v-=b/Math.abs(b)*t,c.routepath+="L "+g+" "+v+" ";var P=a[d+1],T=P[0].x,w=P[0].y,I=P[1].x,E=P[1].y;C=I-T,b=E-w;var R=e.angleBetween2Lines(u,P)<0?1:0,G,U;Math.abs(C)>0?(G=T+C/Math.abs(C)*t,U=w):(G=T,U=w+b/Math.abs(b)*t);var Z=Math.abs(G-g),he=Math.abs(U-v);c.routepath+="A "+Z+" "+he+" 0 0 "+R+" "+G+" "+U+" "}else{var re=[g,v],pe,de;Math.abs(C)>0?(g-=C/Math.abs(C)*n,pe=[g,v+o],de=[g,v-o]):(v-=b/Math.abs(b)*n,pe=[g+o,v],de=[g-o,v]),c.routepath+="L "+g+" "+v+" ",n>0&&(c.arrowpath="M "+re[0]+" "+re[1]+" L "+pe[0]+" "+pe[1]+" L "+de[0]+" "+de[1])}}else{var u=a[0],g=u[1].x,v=u[1].y,C=g-u[0].x,b=v-u[0].y,re=[g,v],pe,de;Math.abs(C)>0?(g-=C/Math.abs(C)*n,pe=[g,v+o],de=[g,v-o]):(v-=b/Math.abs(b)*n,pe=[g+o,v],de=[g-o,v]),c.routepath+="L "+g+" "+v+" ",n>0&&(c.arrowpath="M "+re[0]+" "+re[1]+" L "+pe[0]+" "+pe[1]+" L "+de[0]+" "+de[1])}return c},e})();M0.GridRouter=nst});var X$=pt(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var ost=Nf(),m5=hx(),ast=S0(),rst=fx(),lst=(function(){function e(a,t){this.source=a,this.target=t}return e.prototype.actualLength=function(a){var t=this;return Math.sqrt(a.reduce(function(o,n){var c=n[t.target]-n[t.source];return o+c*c},0))},e})();Hf.Link3D=lst;var sst=(function(){function e(a,t,o){a===void 0&&(a=0),t===void 0&&(t=0),o===void 0&&(o=0),this.x=a,this.y=t,this.z=o}return e})();Hf.Node3D=sst;var cst=(function(){function e(a,t,o){var n=this;o===void 0&&(o=1),this.nodes=a,this.links=t,this.idealLinkLength=o,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(e.k);for(var c=0;c"u"&&(d[C]=Math.random())}n.result[0][u]=d.x,n.result[1][u]=d.y,n.result[2][u]=d.z})}return e.prototype.linkLength=function(a){return a.actualLength(this.result)},e.prototype.start=function(a){var t=this;a===void 0&&(a=100);var o=this.nodes.length,n=new pst;this.useJaccardLinkLengths&&rst.jaccardLinkLengths(this.links,n,1.5),this.links.forEach(function(C){return C.length*=t.idealLinkLength});var c=new ost.Calculator(o,this.links,function(C){return C.source},function(C){return C.target},function(C){return C.length}).DistanceMatrix(),d=m5.Descent.createSquareMatrix(o,function(C,b){return c[C][b]}),u=m5.Descent.createSquareMatrix(o,function(){return 2});this.links.forEach(function(C){var b=C.source,P=C.target;return u[b][P]=u[P][b]=1}),this.descent=new m5.Descent(this.result,d),this.descent.threshold=.001,this.descent.G=u,this.constraints&&(this.descent.project=new ast.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var g=0;g{"use strict";Object.defineProperty(Ix,"__esModule",{value:!0});var d5=P0(),mst=p5();function dst(e,a,t,o){e.cola.start(0,0,0,10,!1);var n=ust(e.cola.nodes(),e.cola.groups(),t,o);return n.routeEdges(e.powerGraph.powerEdges,a,function(c){return c.source.routerNode.id},function(c){return c.target.routerNode.id})}Ix.gridify=dst;function ust(e,a,t,o){e.forEach(function(c){c.routerNode={name:c.name,bounds:c.bounds.inflate(-t)}}),a.forEach(function(c){c.routerNode={bounds:c.bounds.inflate(-o),children:(typeof c.groups<"u"?c.groups.map(function(d){return e.length+d.id}):[]).concat(typeof c.leaves<"u"?c.leaves.map(function(d){return d.index}):[])}});var n=e.concat(a).map(function(c,d){return c.routerNode.id=d,c.routerNode});return new mst.GridRouter(n,{getChildren:function(c){return c.children},getBounds:function(c){return c.bounds}},t-o)}function fst(e,a,t){var o;e.nodes.forEach(function(u,g){return u.index=g}),new d5.Layout().avoidOverlaps(!1).nodes(e.nodes).links(e.links).powerGraphGroups(function(u){o=u,o.groups.forEach(function(g){return g.padding=t})});var n=e.nodes.length,c=[],d=e.nodes.slice(0);return d.forEach(function(u,g){return u.index=g}),o.groups.forEach(function(u){var g=u.index=u.id+n;d.push(u),typeof u.leaves<"u"&&u.leaves.forEach(function(v){return c.push({source:g,target:v.index})}),typeof u.groups<"u"&&u.groups.forEach(function(v){return c.push({source:g,target:v.id+n})})}),o.powerEdges.forEach(function(u){c.push({source:u.source.index,target:u.target.index})}),new d5.Layout().size(a).nodes(d).links(c).avoidOverlaps(!1).linkDistance(30).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(100,0,0,0,!1),{cola:new d5.Layout().convergenceThreshold(.001).size(a).avoidOverlaps(!0).nodes(e.nodes).links(e.links).groupCompactness(1e-4).linkDistance(30).symmetricDiffLinkLengths(5).powerGraphGroups(function(u){o=u,o.groups.forEach(function(g){g.padding=t})}).start(50,0,100,0,!1),powerGraph:o}}Ix.powerGraphGridLayout=fst});var eU=pt(Ox=>{"use strict";function $r(e){for(var a in e)Ox.hasOwnProperty(a)||(Ox[a]=e[a])}Object.defineProperty(Ox,"__esModule",{value:!0});$r(U$());$r(Y$());$r(hx());$r(i5());$r(p5());$r(n5());$r(P0());$r(X$());$r(fx());$r(GM());$r(KM());$r(WM());$r(S0());$r(Nf());$r(Cx());$r(Z$())});var mE=pt((pW,pE)=>{(function(e){typeof pW=="object"&&typeof pE<"u"?pE.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e()})(function(){return(function e(a,t,o){function n(u,g){if(!t[u]){if(!a[u]){var v=typeof gs=="function"&&gs;if(!g&&v)return v(u,!0);if(c)return c(u,!0);var C=new Error("Cannot find module '"+u+"'");throw C.code="MODULE_NOT_FOUND",C}var b=t[u]={exports:{}};a[u][0].call(b.exports,function(P){return n(a[u][1][P]||P)},b,b.exports,e,a,t,o)}return t[u].exports}for(var c=typeof gs=="function"&&gs,d=0;d{let I=this.workbook.addWorksheet(P.sheetName),E=P.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],R=P.map||function(U){if(U==="")return null;let Z=Number(U);if(!Number.isNaN(Z)&&Z!==1/0)return Z;let he=E.reduce((pe,de)=>{if(pe)return pe;let be=u(U,de,!0);return be.isValid()?be:null},null);if(he)return new Date(he.valueOf());let re=C[U];return re!==void 0?re:U},G=n.parse(P.parserOptions).on("data",U=>{I.addRow(U.map(R))}).on("end",()=>{G.emit("worksheet",I)});G.on("worksheet",T).on("error",w),b.pipe(G)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(b,P){return new Promise((T,w)=>{P=P||{};let I=this.workbook.getWorksheet(P.sheetName||P.sheetId),E=n.format(P.formatterOptions);b.on("finish",()=>{T()}),E.on("error",w),E.pipe(b);let{dateFormat:R,dateUTC:G}=P,U=P.map||(re=>{if(re){if(re.text||re.hyperlink)return re.hyperlink||re.text||"";if(re.formula||re.result)return re.result||"";if(re instanceof Date)return R?G?u.utc(re).format(R):u(re).format(R):G?u.utc(re).format():u(re).format();if(re.error)return re.error;if(typeof re=="object")return JSON.stringify(re)}return re}),Z=P.includeEmptyRows===void 0||P.includeEmptyRows,he=1;I&&I.eachRow((re,pe)=>{if(Z)for(;he++2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=d,u)if(typeof u=="string"){let v=o.decodeAddress(u);this.nativeCol=v.col+g,this.nativeColOff=0,this.nativeRow=v.row+g,this.nativeRowOff=0}else u.nativeCol!==void 0?(this.nativeCol=u.nativeCol||0,this.nativeColOff=u.nativeColOff||0,this.nativeRow=u.nativeRow||0,this.nativeRowOff=u.nativeRowOff||0):u.col!==void 0?(this.col=u.col+g,this.row=u.row+g):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(d){return d instanceof n||d==null?d:new n(d)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(d){this.nativeCol=Math.floor(d),this.nativeColOff=Math.floor((d-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(d){this.nativeRow=Math.floor(d),this.nativeRowOff=Math.floor((d-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(d){this.nativeCol=d.nativeCol,this.nativeColOff=d.nativeColOff,this.nativeRow=d.nativeRow,this.nativeRowOff=d.nativeRowOff}}a.exports=n},{"../utils/col-cache":19}],3:[function(e,a,t){"use strict";let o=e("../utils/col-cache"),n=e("../utils/under-dash"),c=e("./enums"),{slideFormula:d}=e("../utils/shared-formula"),u=e("./note");class g{constructor(b,P,T){if(!b||!P)throw new Error("A Cell needs a Row");this._row=b,this._column=P,o.validateAddress(T),this._address=T,this._value=v.create(g.Types.Null,this),this.style=this._mergeStyle(b.style,P.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(b){this.style.numFmt=b}get font(){return this.style.font}set font(b){this.style.font=b}get alignment(){return this.style.alignment}set alignment(b){this.style.alignment=b}get border(){return this.style.border}set border(b){this.style.border=b}get fill(){return this.style.fill}set fill(b){this.style.fill=b}get protection(){return this.style.protection}set protection(b){this.style.protection=b}_mergeStyle(b,P,T){let w=b&&b.numFmt||P&&P.numFmt;w&&(T.numFmt=w);let I=b&&b.font||P&&P.font;I&&(T.font=I);let E=b&&b.alignment||P&&P.alignment;E&&(T.alignment=E);let R=b&&b.border||P&&P.border;R&&(T.border=R);let G=b&&b.fill||P&&P.fill;G&&(T.fill=G);let U=b&&b.protection||P&&P.protection;return U&&(T.protection=U),T}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===g.Types.Merge}merge(b,P){this._value.release(),this._value=v.create(g.Types.Merge,this,b),P||(this.style=b.style)}unmerge(){this.type===g.Types.Merge&&(this._value.release(),this._value=v.create(g.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(b){return this._value.type===g.Types.Merge&&this._value.isMergedTo(b)}get master(){return this.type===g.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===g.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(b){this.type!==g.Types.Merge?(this._value.release(),this._value=v.create(v.getType(b),this,b)):this._value.master.value=b}get note(){return this._comment&&this._comment.note}set note(b){this._comment=new u(b)}get text(){return this._value.toString()}get html(){return n.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(b){this.type===g.Types.String&&(this._value=v.create(g.Types.Hyperlink,this,{text:this._value.value,hyperlink:b}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:b}=this._row;return{sheetName:b.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(b){this.names=[b]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(b){let{definedNames:P}=this.workbook;P.removeAllNames(this.fullAddress),b.forEach(T=>{P.addEx(this.fullAddress,T)})}addName(b){this.workbook.definedNames.addEx(this.fullAddress,b)}removeName(b){this.workbook.definedNames.removeEx(this.fullAddress,b)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(b){this._dataValidations.add(this.address,b)}get model(){let{model:b}=this._value;return b.style=this.style,this._comment&&(b.comment=this._comment.model),b}set model(b){if(this._value.release(),this._value=v.create(b.type,this),this._value.model=b,b.comment)switch(b.comment.type){case"note":this._comment=u.fromModel(b.comment)}b.style?this.style=b.style:this.style={}}}g.Types=c.ValueType;let v={getType:C=>C==null?g.Types.Null:C instanceof String||typeof C=="string"?g.Types.String:typeof C=="number"?g.Types.Number:typeof C=="boolean"?g.Types.Boolean:C instanceof Date?g.Types.Date:C.text&&C.hyperlink?g.Types.Hyperlink:C.formula||C.sharedFormula?g.Types.Formula:C.richText?g.Types.RichText:C.sharedString?g.Types.SharedString:C.error?g.Types.Error:g.Types.JSON,types:[{t:g.Types.Null,f:class{constructor(C){this.model={address:C.address,type:g.Types.Null}}get value(){return null}set value(C){}get type(){return g.Types.Null}get effectiveType(){return g.Types.Null}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){}toString(){return""}}},{t:g.Types.Number,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Number,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Number}get effectiveType(){return g.Types.Number}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.String,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.String,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.String}get effectiveType(){return g.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:g.Types.Date,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Date,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Date}get effectiveType(){return g.Types.Date}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.Hyperlink,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Hyperlink,text:b?b.text:void 0,hyperlink:b?b.hyperlink:void 0},b&&b.tooltip&&(this.model.tooltip=b.tooltip)}get value(){let C={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(C.tooltip=this.model.tooltip),C}set value(C){this.model={text:C.text,hyperlink:C.hyperlink},C.tooltip&&(this.model.tooltip=C.tooltip)}get text(){return this.model.text}set text(C){this.model.text=C}get hyperlink(){return this.model.hyperlink}set hyperlink(C){this.model.hyperlink=C}get type(){return g.Types.Hyperlink}get effectiveType(){return g.Types.Hyperlink}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:g.Types.Formula,f:class{constructor(C,b){this.cell=C,this.model={address:C.address,type:g.Types.Formula,shareType:b?b.shareType:void 0,ref:b?b.ref:void 0,formula:b?b.formula:void 0,sharedFormula:b?b.sharedFormula:void 0,result:b?b.result:void 0}}_copyModel(C){let b={},P=T=>{let w=C[T];w&&(b[T]=w)};return P("formula"),P("result"),P("ref"),P("shareType"),P("sharedFormula"),b}get value(){return this._copyModel(this.model)}set value(C){this.model=this._copyModel(C)}validate(C){switch(v.getType(C)){case g.Types.Null:case g.Types.String:case g.Types.Number:case g.Types.Date:break;case g.Types.Hyperlink:case g.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(C){this.model.formula=C}get formulaType(){return this.model.formula?c.FormulaType.Master:this.model.sharedFormula?c.FormulaType.Shared:c.FormulaType.None}get result(){return this.model.result}set result(C){this.model.result=C}get type(){return g.Types.Formula}get effectiveType(){let C=this.model.result;return C==null?c.ValueType.Null:C instanceof String||typeof C=="string"?c.ValueType.String:typeof C=="number"?c.ValueType.Number:C instanceof Date?c.ValueType.Date:C.text&&C.hyperlink?c.ValueType.Hyperlink:C.formula?c.ValueType.Formula:c.ValueType.Null}get address(){return this.model.address}set address(C){this.model.address=C}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:C}=this.cell,b=C.findCell(this.model.sharedFormula);this._translatedFormula=b&&d(b.formula,b.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:g.Types.Merge,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Merge,master:b?b.address:void 0},this._master=b,b&&b.addMergeRef()}get value(){return this._master.value}set value(C){C instanceof g?(this._master&&this._master.releaseMergeRef(),C.addMergeRef(),this._master=C):this._master.value=C}isMergedTo(C){return C===this._master}get master(){return this._master}get type(){return g.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:g.Types.JSON,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.String,value:JSON.stringify(b),rawValue:b}}get value(){return this.model.rawValue}set value(C){this.model.rawValue=C,this.model.value=JSON.stringify(C)}get type(){return g.Types.String}get effectiveType(){return g.Types.String}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:g.Types.SharedString,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.SharedString,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.SharedString}get effectiveType(){return g.Types.SharedString}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.RichText,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.String,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}toString(){return this.model.value.richText.map(C=>C.text).join("")}get type(){return g.Types.RichText}get effectiveType(){return g.Types.RichText}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:g.Types.Boolean,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Boolean,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Boolean}get effectiveType(){return g.Types.Boolean}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:g.Types.Error,f:class{constructor(C,b){this.model={address:C.address,type:g.Types.Error,value:b}}get value(){return this.model.value}set value(C){this.model.value=C}get type(){return g.Types.Error}get effectiveType(){return g.Types.Error}get address(){return this.model.address}set address(C){this.model.address=C}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((C,b)=>(C[b.t]=b.f,C),[]),create(C,b,P){let T=this.types[C];if(!T)throw new Error("Could not create Value of type "+C);return new T(b,P)}};a.exports=g},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,a,t){"use strict";let o=e("../utils/under-dash"),n=e("./enums"),c=e("../utils/col-cache");class d{constructor(g,v,C){this._worksheet=g,this._number=v,C!==!1&&(this.defn=C)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return c.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(g){g?(this.key=g.key,this.width=g.width!==void 0?g.width:9,this.outlineLevel=g.outlineLevel,g.style?this.style=g.style:this.style={},this.header=g.header,this._hidden=!!g.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(g){g!==void 0?(this._header=g,this.headers.forEach((v,C)=>{this._worksheet.getCell(C+1,this.number).value=v})):this._header=void 0}get key(){return this._key}set key(g){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=g,g&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(g){this._hidden=g}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(g){this._outlineLevel=g}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(g){return this.width===g.width&&this.hidden===g.hidden&&this.outlineLevel===g.outlineLevel&&o.isEqual(this.style,g.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;let g=this.style;return!g||!(g.font||g.numFmt||g.alignment||g.border||g.fill||g.protection)}get headerCount(){return this.headers.length}eachCell(g,v){let C=this.number;v||(v=g,g=null),this._worksheet.eachRow(g,(b,P)=>{v(b.getCell(C),P)})}get values(){let g=[];return this.eachCell((v,C)=>{v&&v.type!==n.ValueType.Null&&(g[C]=v.value)}),g}set values(g){if(!g)return;let v=this.number,C=0;g.hasOwnProperty("0")&&(C=1),g.forEach((b,P)=>{this._worksheet.getCell(P+C,v).value=b})}_applyStyle(g,v){return this.style[g]=v,this.eachCell(C=>{C[g]=v}),v}get numFmt(){return this.style.numFmt}set numFmt(g){this._applyStyle("numFmt",g)}get font(){return this.style.font}set font(g){this._applyStyle("font",g)}get alignment(){return this.style.alignment}set alignment(g){this._applyStyle("alignment",g)}get protection(){return this.style.protection}set protection(g){this._applyStyle("protection",g)}get border(){return this.style.border}set border(g){this._applyStyle("border",g)}get fill(){return this.style.fill}set fill(g){this._applyStyle("fill",g)}static toModel(g){let v=[],C=null;return g&&g.forEach((b,P)=>{b.isDefault?C&&(C=null):C&&b.equivalentTo(C)?C.max=P+1:(C={min:P+1,max:P+1,width:b.width!==void 0?b.width:9,style:b.style,isCustomWidth:b.isCustomWidth,hidden:b.hidden,outlineLevel:b.outlineLevel,collapsed:b.collapsed},v.push(C))}),v.length?v:void 0}static fromModel(g,v){let C=[],b=1,P=0;for(v=(v=v||[]).sort(function(T,w){return T.min-w.min});P{v.removeCellEx(g)})}forEach(g){o.each(this.matrixMap,(v,C)=>{v.forEach(b=>{g(C,b)})})}getNames(g){return this.getNamesEx(n.decodeEx(g))}getNamesEx(g){return o.map(this.matrixMap,(v,C)=>v.findCellEx(g)&&C).filter(Boolean)}_explore(g,v){v.mark=!1;let{sheetName:C}=v,b=new d(v.row,v.col,v.row,v.col,C),P,T;function w(E,R){let G=g.findCellAt(C,E,v.col);return!(!G||!G.mark)&&(b[R]=E,G.mark=!1,!0)}for(T=v.row-1;w(T,"top");T--);for(T=v.row+1;w(T,"bottom");T++);function I(E,R){let G=[];for(T=b.top;T<=b.bottom;T++){let U=g.findCellAt(C,T,E);if(!U||!U.mark)return!1;G.push(U)}b[R]=E;for(let U=0;U{C.mark=!0}),{name:g,ranges:v.map(C=>C.mark&&this._explore(v,C)).filter(Boolean).map(C=>C.$shortRange)}):{name:g,ranges:[]}}normaliseMatrix(g,v){g.forEachInSheet(v,(C,b,P)=>{C&&(C.row===b&&C.col===P||(C.row=b,C.col=P,C.address=n.n2l(P)+b))})}spliceRows(g,v,C,b){o.each(this.matrixMap,P=>{P.spliceRows(g,v,C,b),this.normaliseMatrix(P,g)})}spliceColumns(g,v,C,b){o.each(this.matrixMap,P=>{P.spliceColumns(g,v,C,b),this.normaliseMatrix(P,g)})}get model(){return o.map(this.matrixMap,(g,v)=>this.getRanges(v,g)).filter(g=>g.ranges.length)}set model(g){let v=this.matrixMap={};g.forEach(C=>{let b=v[C.name]=new c;C.ranges.forEach(P=>{u.test(P.split("!").pop()||"")&&b.addCell(P)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,a,t){"use strict";a.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,a,t){"use strict";let o=e("../utils/col-cache"),n=e("./anchor");a.exports=class{constructor(c,d){this.worksheet=c,this.model=d}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(c){let{type:d,imageId:u,range:g,hyperlinks:v}=c;if(this.type=d,this.imageId=u,d==="image")if(typeof g=="string"){let C=o.decode(g);this.range={tl:new n(this.worksheet,{col:C.left,row:C.top},-1),br:new n(this.worksheet,{col:C.right,row:C.bottom},0),editAs:"oneCell"}}else this.range={tl:new n(this.worksheet,g.tl,0),br:g.br&&new n(this.worksheet,g.br,0),ext:g.ext,editAs:g.editAs,hyperlinks:v||g.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,a,t){"use strict";let o=e("../utils/under-dash");class n{constructor(d){this.note=d}get model(){let d=null;switch(typeof this.note){case"string":d={type:"note",note:{texts:[{text:this.note}]}};break;default:d={type:"note",note:this.note}}return o.deepMerge({},n.DEFAULT_CONFIGS,d)}set model(d){let{note:u}=d,{texts:g}=u;g.length===1&&Object.keys(g[0]).length===1?this.note=g[0].text:this.note=u}static fromModel(d){let u=new n;return u.model=d,u}}n.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},a.exports=n},{"../utils/under-dash":26}],10:[function(e,a,t){"use strict";let o=e("../utils/col-cache");class n{constructor(){this.decode(arguments)}setTLBR(d,u,g,v,C){if(arguments.length<4){let b=o.decodeAddress(d),P=o.decodeAddress(u);this.model={top:Math.min(b.row,P.row),left:Math.min(b.col,P.col),bottom:Math.max(b.row,P.row),right:Math.max(b.col,P.col),sheetName:g},this.setTLBR(b.row,b.col,P.row,P.col,C)}else this.model={top:Math.min(d,g),left:Math.min(u,v),bottom:Math.max(d,g),right:Math.max(u,v),sheetName:C}}decode(d){switch(d.length){case 5:this.setTLBR(d[0],d[1],d[2],d[3],d[4]);break;case 4:this.setTLBR(d[0],d[1],d[2],d[3]);break;case 3:this.setTLBR(d[0],d[1],d[2]);break;case 2:this.setTLBR(d[0],d[1]);break;case 1:{let u=d[0];if(u instanceof n)this.model={top:u.model.top,left:u.model.left,bottom:u.model.bottom,right:u.model.right,sheetName:u.sheetName};else if(u instanceof Array)this.decode(u);else if(u.top&&u.left&&u.bottom&&u.right)this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName};else{let g=o.decodeEx(u);g.top?this.model={top:g.top,left:g.left,bottom:g.bottom,right:g.right,sheetName:g.sheetName}:this.model={top:g.row,left:g.col,bottom:g.row,right:g.col,sheetName:g.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+d.length)}}get top(){return this.model.top||1}set top(d){this.model.top=d}get left(){return this.model.left||1}set left(d){this.model.left=d}get bottom(){return this.model.bottom||1}set bottom(d){this.model.bottom=d}get right(){return this.model.right||1}set right(d){this.model.right=d}get sheetName(){return this.model.sheetName}set sheetName(d){this.model.sheetName=d}get _serialisedSheetName(){let{sheetName:d}=this.model;return d?/^[a-zA-Z0-9]*$/.test(d)?d+"!":`'${d}'!`:""}expand(d,u,g,v){(!this.model.top||dthis.bottom)&&(this.bottom=g),(!this.model.right||v>this.right)&&(this.right=v)}expandRow(d){if(d){let{dimensions:u,number:g}=d;u&&this.expand(g,u.min,g,u.max)}}expandToAddress(d){let u=o.decodeEx(d);this.expand(u.row,u.col,u.row,u.col)}get tl(){return o.n2l(this.left)+this.top}get $t$l(){return`$${o.n2l(this.left)}$${this.top}`}get br(){return o.n2l(this.right)+this.bottom}get $b$r(){return`$${o.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&!(d.bottomthis.bottom)&&!(d.rightthis.right)}contains(d){let u=o.decodeEx(d);return this.containsEx(u)}containsEx(d){return(!d.sheetName||!this.sheetName||d.sheetName===this.sheetName)&&d.row>=this.top&&d.row<=this.bottom&&d.col>=this.left&&d.col<=this.right}forEachAddress(d){for(let u=this.left;u<=this.right;u++)for(let g=this.top;g<=this.bottom;g++)d(o.encodeAddress(g,u),g,u)}}a.exports=n},{"../utils/col-cache":19}],11:[function(e,a,t){"use strict";let o=e("../utils/under-dash"),n=e("./enums"),c=e("../utils/col-cache"),d=e("./cell");a.exports=class{constructor(u,g){this._worksheet=u,this._number=g,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(u){return this._cells[u-1]}getCellEx(u){let g=this._cells[u.col-1];if(!g){let v=this._worksheet.getColumn(u.col);g=new d(this,v,u.address),this._cells[u.col-1]=g}return g}getCell(u){if(typeof u=="string"){let g=this._worksheet.getColumnKey(u);u=g?g.number:c.l2n(u)}return this._cells[u-1]||this.getCellEx({address:c.encodeAddress(this._number,u),row:this._number,col:u})}splice(u,g){let v=u+g;for(var C=arguments.length,b=new Array(C>2?C-2:0),P=2;P0)for(I=w;I>=v;I--)E=this._cells[I-1],E?(R=this.getCell(I+T),R.value=E.value,R.style=E.style,R._comment=E._comment):this._cells[I+T-1]=void 0;for(I=0;I{v&&v.type!==n.ValueType.Null&&g(v,C+1)})}addPageBreak(u,g){let v=this._worksheet,C=Math.max(0,u-1)||0,b=Math.max(0,g-1)||16838,P={id:this._number,max:b,man:1};C&&(P.min=C),v.rowBreaks.push(P)}get values(){let u=[];return this._cells.forEach(g=>{g&&g.type!==n.ValueType.Null&&(u[g.col]=g.value)}),u}set values(u){if(this._cells=[],u)if(u instanceof Array){let g=0;u.hasOwnProperty("0")&&(g=1),u.forEach((v,C)=>{v!==void 0&&(this.getCellEx({address:c.encodeAddress(this._number,C+g),row:this._number,col:C+g}).value=v)})}else this._worksheet.eachColumnKey((g,v)=>{u[v]!==void 0&&(this.getCellEx({address:c.encodeAddress(this._number,g.number),row:this._number,col:g.number}).value=u[v])})}get hasValues(){return o.some(this._cells,u=>u&&u.type!==n.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let u=0;return this.eachCell(()=>{u++}),u}get dimensions(){let u=0,g=0;return this._cells.forEach(v=>{v&&v.type!==n.ValueType.Null&&((!u||u>v.col)&&(u=v.col),g0?{min:u,max:g}:null}_applyStyle(u,g){return this.style[u]=g,this._cells.forEach(v=>{v&&(v[u]=g)}),g}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let u=[],g=0,v=0;return this._cells.forEach(C=>{if(C){let b=C.model;b&&((!g||g>C.col)&&(g=C.col),v{switch(v.type){case d.Types.Merge:break;default:{let C;if(v.address)C=c.decodeAddress(v.address);else if(g){let{row:b}=g,P=g.col+1;C={row:b,col:P,address:c.encodeAddress(b,P),$col$row:`$${c.n2l(P)}$${b}`}}g=C,this.getCellEx(C).model=v;break}}}),u.height?this.height=u.height:delete this.height,this.hidden=u.hidden,this.outlineLevel=u.outlineLevel||0,this.style=u.style&&JSON.parse(JSON.stringify(u.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,a,t){"use strict";let o=e("../utils/col-cache");class n{constructor(d,u,g){this.table=d,this.column=u,this.index=g}_set(d,u){this.table.cacheState(),this.column[d]=u}get name(){return this.column.name}set name(d){this._set("name",d)}get filterButton(){return this.column.filterButton}set filterButton(d){this.column.filterButton=d}get style(){return this.column.style}set style(d){this.column.style=d}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(d){this._set("totalsRowLabel",d)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(d){this._set("totalsRowFunction",d)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(d){this._set("totalsRowResult",d)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(d){this._set("totalsRowFormula",d)}}a.exports=class{constructor(c,d){this.worksheet=c,d&&(this.table=d,this.validate(),this.store())}getFormula(c){switch(c.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${c.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${c.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${c.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${c.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${c.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${c.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${c.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${c.name}])`;case"custom":return c.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+c.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:c}=this,d=(T,w,I)=>{T[w]===void 0&&(T[w]=I)};d(c,"headerRow",!0),d(c,"totalsRow",!1),d(c,"style",{}),d(c.style,"theme","TableStyleMedium2"),d(c.style,"showFirstColumn",!1),d(c.style,"showLastColumn",!1),d(c.style,"showRowStripes",!1),d(c.style,"showColumnStripes",!1);let u=(T,w)=>{if(!T)throw new Error(w)};u(c.ref,"Table must have ref"),u(c.columns,"Table must have column definitions"),u(c.rows,"Table must have row definitions"),c.tl=o.decodeAddress(c.ref);let{row:g,col:v}=c.tl;u(g>0,"Table must be on valid row"),u(v>0,"Table must be on valid col");let{width:C,filterHeight:b,tableHeight:P}=this;c.autoFilterRef=o.encode(g,v,g+b-1,v+C-1),c.tableRef=o.encode(g,v,g+P-1,v+C-1),c.columns.forEach((T,w)=>{u(T.name,`Column ${w} must have a name`),w===0?d(T,"totalsRowLabel","Total"):(d(T,"totalsRowFunction","none"),T.totalsRowFormula=this.getFormula(T))})}store(){let c=(b,P)=>{P&&Object.keys(P).forEach(T=>{b[T]=P[T]})},{worksheet:d,table:u}=this,{row:g,col:v}=u.tl,C=0;if(u.headerRow){let b=d.getRow(g+C++);u.columns.forEach((P,T)=>{let{style:w,name:I}=P,E=b.getCell(v+T);E.value=I,c(E,w)})}if(u.rows.forEach(b=>{let P=d.getRow(g+C++);b.forEach((T,w)=>{let I=P.getCell(v+w);I.value=T,c(I,u.columns[w].style)})}),u.totalsRow){let b=d.getRow(g+C++);u.columns.forEach((P,T)=>{let w=b.getCell(v+T);if(T===0)w.value=P.totalsRowLabel;else{let I=this.getFormula(P);w.value=I?{formula:P.totalsRowFormula,result:P.totalsRowResult}:null}c(w,P.style)})}}load(c){let{table:d}=this,{row:u,col:g}=d.tl,v=0;if(d.headerRow){let C=c.getRow(u+v++);d.columns.forEach((b,P)=>{C.getCell(g+P).value=b.name})}if(d.rows.forEach(C=>{let b=c.getRow(u+v++);C.forEach((P,T)=>{b.getCell(g+T).value=P})}),d.totalsRow){let C=c.getRow(u+v++);d.columns.forEach((b,P)=>{let T=C.getCell(g+P);P===0?T.value=b.totalsRowLabel:this.getFormula(b)&&(T.value={formula:b.totalsRowFormula,result:b.totalsRowResult})})}}get model(){return this.table}set model(c){this.table=c}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();let c=o.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let d=0;d1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(c,d)}getColumn(c){let d=this.table.columns[c];return new n(this,d,c)}addColumn(c,d,u){this.cacheState(),u===void 0?(this.table.columns.push(c),this.table.rows.forEach((g,v)=>{g.push(d[v])})):(this.table.columns.splice(u,0,c),this.table.rows.forEach((g,v)=>{g.splice(u,0,d[v])}))}removeColumns(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(c,d),this.table.rows.forEach(u=>{u.splice(c,d)})}_assign(c,d,u){this.cacheState(),c[d]=u}get ref(){return this.table.ref}set ref(c){this._assign(this.table,"ref",c)}get name(){return this.table.name}set name(c){this.table.name=c}get displayName(){return this.table.displyName||this.table.name}set displayNamename(c){this.table.displayName=c}get headerRow(){return this.table.headerRow}set headerRow(c){this._assign(this.table,"headerRow",c)}get totalsRow(){return this.table.totalsRow}set totalsRow(c){this._assign(this.table,"totalsRow",c)}get theme(){return this.table.style.name}set theme(c){this.table.style.name=c}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(c){this.table.style.showFirstColumn=c}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(c){this.table.style.showLastColumn=c}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(c){this.table.style.showRowStripes=c}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(c){this.table.style.showColumnStripes=c}}},{"../utils/col-cache":19}],13:[function(e,a,t){"use strict";let o=e("./worksheet"),n=e("./defined-names"),c=e("../xlsx/xlsx"),d=e("../csv/csv");a.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new n}get xlsx(){return this._xlsx||(this._xlsx=new c(this)),this._xlsx}get csv(){return this._csv||(this._csv=new d(this)),this._csv}get nextId(){for(let u=1;u(w&&w.orderNo)>T?w.orderNo:T,0),b=Object.assign({},g,{id:v,name:u,orderNo:C+1,workbook:this}),P=new o(b);return this._worksheets[v]=P,P}removeWorksheetEx(u){delete this._worksheets[u.id]}removeWorksheet(u){let g=this.getWorksheet(u);g&&g.destroy()}getWorksheet(u){return u===void 0?this._worksheets.find(Boolean):typeof u=="number"?this._worksheets[u]:typeof u=="string"?this._worksheets.find(g=>g&&g.name===u):void 0}get worksheets(){return this._worksheets.slice(1).sort((u,g)=>u.orderNo-g.orderNo).filter(Boolean)}eachSheet(u){this.worksheets.forEach(g=>{u(g,g.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(u){let g=this.media.length;return this.media.push(Object.assign({},u,{type:"image"})),g}getImage(u){return this.media[u]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(u=>u.model),sheets:this.worksheets.map(u=>u.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(u){this.creator=u.creator,this.lastModifiedBy=u.lastModifiedBy,this.lastPrinted=u.lastPrinted,this.created=u.created,this.modified=u.modified,this.company=u.company,this.manager=u.manager,this.title=u.title,this.subject=u.subject,this.keywords=u.keywords,this.category=u.category,this.description=u.description,this.language=u.language,this.revision=u.revision,this.contentStatus=u.contentStatus,this.properties=u.properties,this.calcProperties=u.calcProperties,this._worksheets=[],u.worksheets.forEach(g=>{let{id:v,name:C,state:b}=g,P=u.sheets&&u.sheets.findIndex(T=>T.id===v);(this._worksheets[v]=new o({id:v,name:C,orderNo:P,state:b,workbook:this})).model=g}),this._definedNames.model=u.definedNames,this.views=u.views,this._themes=u.themes,this.media=u.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,a,t){"use strict";let o=e("../utils/under-dash"),n=e("../utils/col-cache"),c=e("./range"),d=e("./row"),u=e("./column"),g=e("./enums"),v=e("./image"),C=e("./table"),b=e("./data-validations"),P=e("../utils/encryptor"),{copyStyle:T}=e("../utils/copy-style");a.exports=class{constructor(w){w=w||{},this._workbook=w.workbook,this.id=w.id,this.orderNo=w.orderNo,this.name=w.name,this.state=w.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},w.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!w.pageSetup||!w.pageSetup.fitToWidth&&!w.pageSetup.fitToHeight||w.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},w.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},w.headerFooter),this.dataValidations=new b,this.views=w.views||[],this.autoFilter=w.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(w){if(w===void 0&&(w="sheet"+this.id),this._name!==w){if(typeof w!="string")throw new Error("The name has to be a string.");if(w==="")throw new Error("The name can't be empty.");if(w==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(w))throw new Error(`Worksheet name ${w} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(w))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+w);if(w&&w.length>31&&(console.warn(`Worksheet name ${w} exceeds 31 chars. This will be truncated`),w=w.substring(0,31)),this._workbook._worksheets.find(I=>I&&I.name.toLowerCase()===w.toLowerCase()))throw new Error("Worksheet name already exists: "+w);this._name=w}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){let w=new c;return this._rows.forEach(I=>{if(I){let E=I.dimensions;E&&w.expand(I.number,E.min,I.number,E.max)}}),w}get columns(){return this._columns}set columns(w){this._headerRowCount=w.reduce((R,G)=>{let U=(G.header?1:G.headers&&G.headers.length)||0;return Math.max(R,U)},0);let I=1,E=this._columns=[];w.forEach(R=>{let G=new u(this,I++,!1);E.push(G),G.defn=R})}getColumnKey(w){return this._keys[w]}setColumnKey(w,I){this._keys[w]=I}deleteColumnKey(w){delete this._keys[w]}eachColumnKey(w){o.each(this._keys,w)}getColumn(w){if(typeof w=="string"){let I=this._keys[w];if(I)return I;w=n.l2n(w)}if(this._columns||(this._columns=[]),w>this._columns.length){let I=this._columns.length+1;for(;I<=w;)this._columns.push(new u(this,I++))}return this._columns[w-1]}spliceColumns(w,I){let E=this._rows.length;for(var R=arguments.length,G=new Array(R>2?R-2:0),U=2;U0)for(let pe=0;pe{de.push(ue[pe]||null)});let be=this.getRow(pe+1);be.splice.apply(be,de)}else this._rows.forEach(pe=>{pe&&pe.splice(w,I)});let Z=G.length-I,he=w+I,re=this._columns.length;if(Z<0)for(let pe=w+G.length;pe<=re;pe++)this.getColumn(pe).defn=this.getColumn(pe-Z).defn;else if(Z>0)for(let pe=re;pe>=he;pe--)this.getColumn(pe+Z).defn=this.getColumn(pe).defn;for(let pe=w;pe{w=Math.max(w,I.cellCount)}),w}get actualColumnCount(){let w=[],I=0;return this.eachRow(E=>{E.eachCell(R=>{let{col:G}=R;w[G]||(w[G]=!0,I++)})}),I}_commitRow(){}get _lastRowNumber(){let w=this._rows,I=w.length;for(;I>0&&w[I-1]===void 0;)I--;return I}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(w){return this._rows[w-1]}findRows(w,I){return this._rows.slice(w-1,w-1+I)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let w=0;return this.eachRow(()=>{w++}),w}getRow(w){let I=this._rows[w-1];return I||(I=this._rows[w-1]=new d(this,w)),I}getRows(w,I){if(I<1)return;let E=[];for(let R=w;R1&&arguments[1]!==void 0?arguments[1]:"n",E=this._nextRow,R=this.getRow(E);return R.values=w,this._setStyleOption(E,I[0]==="i"?I:"n"),R}addRows(w){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",E=[];return w.forEach(R=>{E.push(this.addRow(R,I))}),E}insertRow(w,I){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(w,0,I),this._setStyleOption(w,E),this.getRow(w)}insertRows(w,I){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(w,0,...I),E!=="n")for(let R=0;R1&&arguments[1]!==void 0?arguments[1]:"n";I[0]==="o"&&this.findRow(w+1)!==void 0?this._copyStyle(w+1,w,I[1]==="+"):I[0]==="i"&&this.findRow(w-1)!==void 0&&this._copyStyle(w-1,w,I[1]==="+")}_copyStyle(w,I){let E=arguments.length>2&&arguments[2]!==void 0&&arguments[2],R=this.getRow(w),G=this.getRow(I);G.style=T(R.style),R.eachCell({includeEmpty:E},(U,Z)=>{G.getCell(Z).style=T(U.style)}),G.height=R.height}duplicateRow(w,I){let E=arguments.length>2&&arguments[2]!==void 0&&arguments[2],R=this._rows[w-1],G=new Array(I).fill(R.values);this.spliceRows(w+1,E?0:I,...G);for(let U=0;U{Z.getCell(re).style=he.style})}}spliceRows(w,I){let E=w+I;for(var R=arguments.length,G=new Array(R>2?R-2:0),U=2;U{be.getCell(j).style=ue.style}),this._rows[pe-1]=void 0}else this._rows[pe+he-1]=void 0;else if(he>0)for(pe=re;pe>=E;pe--)if(de=this._rows[pe-1],de){let be=this.getRow(pe+he);be.values=de.values,be.style=de.style,be.height=de.height,de.eachCell({includeEmpty:!0},(ue,j)=>{if(be.getCell(j).style=ue.style,ue._value.constructor.name==="MergeValue"){let Q=this.getRow(ue._row._number+Z).getCell(j),le=ue._value._master,O=this.getRow(le._row._number+Z).getCell(le._column._number);Q.merge(O)}})}else this._rows[pe+he-1]=void 0;for(pe=0;pe{E&&E.hasValues&&I(E,E.number)})}getSheetValues(){let w=[];return this._rows.forEach(I=>{I&&(w[I.number]=I.values)}),w}findCell(w,I){let E=n.getAddress(w,I),R=this._rows[E.row-1];return R?R.findCell(E.col):void 0}getCell(w,I){let E=n.getAddress(w,I);return this.getRow(E.row).getCellEx(E)}mergeCells(){for(var w=arguments.length,I=new Array(w),E=0;E{if(R.intersects(w))throw new Error("Cannot merge already merged cells")});let E=this.getCell(w.top,w.left);for(let R=w.top;R<=w.bottom;R++)for(let G=w.left;G<=w.right;G++)(R>w.top||G>w.left)&&this.getCell(R,G).merge(E,I);this._merges[E.address]=w}_unMergeMaster(w){let I=this._merges[w.address];if(I){for(let E=I.top;E<=I.bottom;E++)for(let R=I.left;R<=I.right;R++)this.getCell(E,R).unmerge();delete this._merges[w.address]}}get hasMerges(){return o.some(this._merges,Boolean)}unMergeCells(){for(var w=arguments.length,I=new Array(w),E=0;E3&&arguments[3]!==void 0?arguments[3]:"shared",G=n.decode(w),{top:U,left:Z,bottom:he,right:re}=G,pe=re-Z+1,de=n.encodeAddress(U,Z),be=R==="shared",ue;ue=typeof E=="function"?E:Array.isArray(E)?Array.isArray(E[0])?(Q,le)=>E[Q-U][le-Z]:(Q,le)=>E[(Q-U)*pe+(le-Z)]:()=>{};let j=!0;for(let Q=U;Q<=he;Q++)for(let le=Z;le<=re;le++)j?(this.getCell(Q,le).value={shareType:R,formula:I,ref:w,result:ue(Q,le)},j=!1):this.getCell(Q,le).value=be?{sharedFormula:de,result:ue(Q,le)}:ue(Q,le)}addImage(w,I){let E={type:"image",imageId:w,range:I};this._media.push(new v(this,E))}getImages(){return this._media.filter(w=>w.type==="image")}addBackgroundImage(w){let I={type:"background",imageId:w};this._media.push(new v(this,I))}getBackgroundImageId(){let w=this._media.find(I=>I.type==="background");return w&&w.imageId}protect(w,I){return new Promise(E=>{this.sheetProtection={sheet:!0},I&&"spinCount"in I&&(I.spinCount=Number.isFinite(I.spinCount)?Math.round(Math.max(0,I.spinCount)):1e5),w&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=P.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=I&&"spinCount"in I?I.spinCount:1e5,this.sheetProtection.hashValue=P.convertPasswordToHash(w,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),I&&(this.sheetProtection=Object.assign(this.sheetProtection,I),!w&&"spinCount"in I&&delete this.sheetProtection.spinCount),E()})}unprotect(){this.sheetProtection=null}addTable(w){let I=new C(this,w);return this.tables[w.name]=I,I}getTable(w){return this.tables[w]}removeTable(w){delete this.tables[w]}getTables(){return Object.values(this.tables)}addConditionalFormatting(w){this.conditionalFormattings.push(w)}removeConditionalFormatting(w){typeof w=="number"?this.conditionalFormattings.splice(w,1):this.conditionalFormattings=w instanceof Function?this.conditionalFormattings.filter(w):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(w){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=w}get model(){let w={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(R=>R.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(R=>R.model),conditionalFormattings:this.conditionalFormattings};w.cols=u.toModel(this.columns);let I=w.rows=[],E=w.dimensions=new c;return this._rows.forEach(R=>{let G=R&&R.model;G&&(E.expand(G.number,G.min,G.number,G.max),I.push(G))}),w.merges=[],o.each(this._merges,R=>{w.merges.push(R.range)}),w}_parseRows(w){this._rows=[],w.rows.forEach(I=>{let E=new d(this,I.number);this._rows[E.number-1]=E,E.model=I})}_parseMergeCells(w){o.each(w.mergeCells,I=>{this.mergeCellsWithoutStyle(I)})}set model(w){this.name=w.name,this._columns=u.fromModel(this,w.cols),this._parseRows(w),this._parseMergeCells(w),this.dataValidations=new b(w.dataValidations),this.properties=w.properties,this.pageSetup=w.pageSetup,this.headerFooter=w.headerFooter,this.views=w.views,this.autoFilter=w.autoFilter,this._media=w.media.map(I=>new v(this,I)),this.sheetProtection=w.sheetProtection,this.tables=w.tables.reduce((I,E)=>{let R=new C;return R.model=E,I[E.name]=R,I},{}),this.conditionalFormattings=w.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,a,t){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");let o={Workbook:e("./doc/workbook")},n=e("./doc/enums");Object.keys(n).forEach(c=>{o[c]=n[c]}),a.exports=o},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(e,a,t){"use strict";let o=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");t.bufferToString=function(n){return typeof n=="string"?n:o?o.decode(n):n.toString()}},{}],17:[function(e,a,t){"use strict";let o=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:n}=e("buffer");t.stringToBuffer=function(c){return typeof c!="string"?c:o?n.from(o.encode(c).buffer):n.from(c)}},{buffer:220}],18:[function(e,a,t){"use strict";let o=e("./under-dash"),n=e("./col-cache");a.exports=class{constructor(c){this.template=c,this.sheets={}}addCell(c){this.addCellEx(n.decodeEx(c))}getCell(c){return this.findCellEx(n.decodeEx(c),!0)}findCell(c){return this.findCellEx(n.decodeEx(c),!1)}findCellAt(c,d,u){let g=this.sheets[c],v=g&&g[d];return v&&v[u]}addCellEx(c){if(c.top)for(let d=c.top;d<=c.bottom;d++)for(let u=c.left;u<=c.right;u++)this.getCellAt(c.sheetName,d,u);else this.findCellEx(c,!0)}getCellEx(c){return this.findCellEx(c,!0)}findCellEx(c,d){let u=this.findSheet(c,d),g=this.findSheetRow(u,c,d);return this.findRowCell(g,c,d)}getCellAt(c,d,u){let g=this.sheets[c]||(this.sheets[c]=[]),v=g[d]||(g[d]=[]);return v[u]||(v[u]={sheetName:c,address:n.n2l(u)+d,row:d,col:u})}removeCellEx(c){let d=this.findSheet(c);if(!d)return;let u=this.findSheetRow(d,c);u&&delete u[c.col]}forEachInSheet(c,d){let u=this.sheets[c];u&&u.forEach((g,v)=>{g&&g.forEach((C,b)=>{C&&d(C,v,b)})})}forEach(c){o.each(this.sheets,(d,u)=>{this.forEachInSheet(u,c)})}map(c){let d=[];return this.forEach(u=>{d.push(c(u))}),d}findSheet(c,d){let u=c.sheetName;return this.sheets[u]?this.sheets[u]:d?this.sheets[u]=[]:void 0}findSheetRow(c,d,u){let{row:g}=d;return c&&c[g]?c[g]:u?c[g]=[]:void 0}findRowCell(c,d,u){let{col:g}=d;return c&&c[g]?c[g]:u?c[g]=this.template?Object.assign(d,JSON.parse(JSON.stringify(this.template))):d:void 0}spliceRows(c,d,u,g){let v=this.sheets[c];if(v){let C=[];for(let b=0;b{b.splice(d,u,...C)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,a,t){"use strict";let o=/^[A-Z]+\d+$/,n={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:c=>c<=26?1:c<=676?2:3,_fill(c){let d,u,g,v,C,b=1;if(c>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&c>=1){for(;b<=26;)d=this._dictionary[b-1],this._n2l[b]=d,this._l2n[d]=b,b++;this._l2nFill=1}if(this._l2nFill<2&&c>=2){for(b=27;b<=702;)u=b-27,g=u%26,v=Math.floor(u/26),d=this._dictionary[v]+this._dictionary[g],this._n2l[b]=d,this._l2n[d]=b,b++;this._l2nFill=2}if(this._l2nFill<3&&c>=3){for(b=703;b<=16384;)u=b-703,g=u%26,v=Math.floor(u/26)%26,C=Math.floor(u/676),d=this._dictionary[C]+this._dictionary[v]+this._dictionary[g],this._n2l[b]=d,this._l2n[d]=b,b++;this._l2nFill=3}},l2n(c){if(this._l2n[c]||this._fill(c.length),!this._l2n[c])throw new Error("Out of bounds. Invalid column letter: "+c);return this._l2n[c]},n2l(c){if(c<1||c>16384)throw new Error(c+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[c]||this._fill(this._level(c)),this._n2l[c]},_hash:{},validateAddress(c){if(!o.test(c))throw new Error("Invalid Address: "+c);return!0},decodeAddress(c){let d=c.length<5&&this._hash[c];if(d)return d;let u=!1,g="",v=0,C=!1,b="",P=0;for(let w,I=0;I=65&&w<=90)u=!0,g+=c[I],v=26*v+w-64;else if(w>=48&&w<=57)C=!0,b+=c[I],P=10*P+w-48;else if(C&&u&&w!==36)break;if(u){if(v>16384)throw new Error("Out of bounds. Invalid column letter: "+g)}else v=void 0;C||(P=void 0);let T={address:c=g+b,col:v,row:P,$col$row:`$${g}$${b}`};return v<=100&&P<=100&&(this._hash[c]=T,this._hash[T.$col$row]=T),T},getAddress(c,d){if(d){let u=this.n2l(d)+c;return this.decodeAddress(u)}return this.decodeAddress(c)},decode(c){let d=c.split(":");if(d.length===2){let u=this.decodeAddress(d[0]),g=this.decodeAddress(d[1]),v={top:Math.min(u.row,g.row),left:Math.min(u.col,g.col),bottom:Math.max(u.row,g.row),right:Math.max(u.col,g.col)};return v.tl=this.n2l(v.left)+v.top,v.br=this.n2l(v.right)+v.bottom,v.dimensions=`${v.tl}:${v.br}`,v}return this.decodeAddress(c)},decodeEx(c){let d=c.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),u=d[1]||d[2],g=d[3],v=g.split(":");if(v.length>1){let b=this.decodeAddress(v[0]),P=this.decodeAddress(v[1]),T=Math.min(b.row,P.row),w=Math.min(b.col,P.col),I=Math.max(b.row,P.row),E=Math.max(b.col,P.col);return b=this.n2l(w)+T,P=this.n2l(E)+I,{top:T,left:w,bottom:I,right:E,sheetName:u,tl:{address:b,col:w,row:T,$col$row:`$${this.n2l(w)}$${T}`,sheetName:u},br:{address:P,col:E,row:I,$col$row:`$${this.n2l(E)}$${I}`,sheetName:u},dimensions:`${b}:${P}`}}if(g.startsWith("#"))return u?{sheetName:u,error:g}:{error:g};let C=this.decodeAddress(g);return u?rt({sheetName:u},C):C},encodeAddress:(c,d)=>n.n2l(d)+c,encode(){switch(arguments.length){case 2:return n.encodeAddress(arguments[0],arguments[1]);case 4:return`${n.encodeAddress(arguments[0],arguments[1])}:${n.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(c,d){let[u,g,,v,C]=c,[b,P]=d;return b>=u&&b<=v&&P>=g&&P<=C}};a.exports=n},{}],20:[function(e,a,t){"use strict";let o=(c,d)=>rt(rt({},c),d.reduce((u,g)=>(c[g]&&(u[g]=rt({},c[g])),u),{})),n=function(c,d,u){let g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];c[u]&&(d[u]=o(c[u],g))};t.copyStyle=c=>{if(!c)return c;if(d=c,Object.keys(d).length===0)return{};var d;let u=rt({},c);return n(c,u,"font",["color"]),n(c,u,"alignment"),n(c,u,"protection"),c.border&&(n(c,u,"border"),n(c.border,u.border,"top",["color"]),n(c.border,u.border,"left",["color"]),n(c.border,u.border,"bottom",["color"]),n(c.border,u.border,"right",["color"]),n(c.border,u.border,"diagonal",["color"])),c.fill&&(n(c,u,"fill",["fgColor","bgColor","center"]),c.fill.stops&&(u.fill.stops=c.fill.stops.map(g=>o(g,["color"])))),u}},{}],21:[function(e,a,t){(function(o){(function(){"use strict";let n=e("crypto"),c={hash(d){let u=n.createHash(d);for(var g=arguments.length,v=new Array(g>1?g-1:0),C=1;Cn.randomBytes(d)};a.exports=c}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,a,t){"use strict";let{SaxesParser:o}=e("saxes"),{PassThrough:n}=e("readable-stream"),{bufferToString:c}=e("./browser-buffer-decode");a.exports=function(d){return F6(this,null,function*(){d.pipe&&!d[Symbol.asyncIterator]&&(d=d.pipe(new n));let u=new o,g;u.on("error",w=>{g=w});let v=[];u.on("opentag",w=>v.push({eventType:"opentag",value:w})),u.on("text",w=>v.push({eventType:"text",value:w})),u.on("closetag",w=>v.push({eventType:"closetag",value:w}));try{for(var C=W1(d),b,P,T;b=!(P=yield new IP(C.next())).done;b=!1){let w=P.value;if(u.write(c(w)),g)throw g;yield v,v=[]}}catch{T=[P]}finally{try{b&&(P=C.return)&&(yield new IP(P.call(C)))}finally{if(T)throw T[0]}}})}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,a,t){"use strict";let o=e("./col-cache"),n=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,c=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;a.exports={slideFormula:function(d,u,g){let v=o.decode(u),C=o.decode(g);return d.replace(n,(b,P,T,w,I)=>{if(I)return b;let E=c.exec(w);if(E){let R=E[1],G=E[2].toUpperCase(),U=E[3],Z=E[4];if(G.length>3||G.length===3&&G>"XFD")return b;let he=o.l2n(G),re=parseInt(Z,10);return R||(he+=C.col-v.col),U||(re+=C.row-v.row),(P||"")+(R||"")+o.n2l(he)+(U||"")+re}return b})}}},{"./col-cache":19}],24:[function(e,a,t){(function(o,n){(function(){"use strict";let c=e("readable-stream"),d=e("./utils"),u=e("./string-buf");class g{constructor(I,E){this._data=I,this._encoding=E}get length(){return this.toBuffer().length}copy(I,E,R,G){return this.toBuffer().copy(I,E,R,G)}toBuffer(){return this._buffer||(this._buffer=n.from(this._data,this._encoding)),this._buffer}}class v{constructor(I){this._data=I}get length(){return this._data.length}copy(I,E,R,G){return this._data._buf.copy(I,E,R,G)}toBuffer(){return this._data.toBuffer()}}class C{constructor(I){this._data=I}get length(){return this._data.length}copy(I,E,R,G){this._data.copy(I,E,R,G)}toBuffer(){return this._data}}class b{constructor(I){this.size=I,this.buffer=n.alloc(I),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let I=n.alloc(this.iWrite-this.iRead);return this.buffer.copy(I,0,this.iRead,this.iWrite),I}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(I){let E;return I===0?null:I===void 0||I>=this.length?(E=this.toBuffer(),this.iRead=this.iWrite,E):(E=n.alloc(I),this.buffer.copy(E,0,this.iRead,I),this.iRead+=I,E)}write(I,E,R){let G=Math.min(R,this.size-this.iWrite);return I.copy(this.buffer,this.iWrite,E,E+G),this.iWrite+=G,G}}let P=function(w){w=w||{},this.bufSize=w.bufSize||1048576,this.buffers=[],this.batch=w.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};d.inherits(P,c.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return n.concat(this.buffers.map(w=>w.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let I=this.buffers[this.buffers.length-1];if(!I.full)return I}let w=new b(this.bufSize);return this.buffers.push(w),w},_pipe(w){return Zn(this,null,function*(){yield Promise.all(this.pipes.map(function(I){return new Promise(E=>{I.write(w.toBuffer(),()=>{E()})})}))})},_writeToBuffers(w){let I=0,E=w.length;for(;I1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(R),o.nextTick(E)):(yield this._pipe(R),E());else this.paused||this.emit("data",R.toBuffer()),this._writeToBuffers(R),this.emit("readable");return!0})},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(w,I,E){let R=G=>{G?E(G):(this._flush(),this.pipes.forEach(U=>{U.end()}),this.emit("finish"))};w?this.write(w,I,R):R()},read(w){let I;if(w){for(I=[];w&&this.buffers.length&&!this.buffers[0].eod;){let E=this.buffers[0],R=E.read(w);w-=R.length,I.push(R),E.eod&&E.full&&this.buffers.shift()}return n.concat(I)}return I=this.buffers.map(E=>E.toBuffer()).filter(Boolean),this.buffers=[],n.concat(I)},setEncoding(w){this.encoding=w},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(w){this.pipes.push(w),!this.paused&&this.buffers.length&&this.end()},unpipe(w){this.pipes=this.pipes.filter(I=>I!==w)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),a.exports=P}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,a,t){(function(o){(function(){"use strict";a.exports=class{constructor(n){this._buf=o.alloc(n&&n.size||16384),this._encoding=n&&n.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=o.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(n){n=n||0,this._buffer=void 0,this._inPos=n}_grow(n){let c=2*this._buf.length;for(;c=this._buf.length-4;)this._grow(this._inPos+n.length),c=this._inPos+this._buf.write(n,this._inPos,this._encoding);this._inPos=c}addStringBuf(n){n.length&&(this._buffer=void 0,this.length+n.length>this.capacity&&this._grow(this.length+n.length),n._buf.copy(this._buf,this._inPos,0,n.length),this._inPos+=n.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,a,t){"use strict";let{toString:o}=Object.prototype,n=/["&<>]/,c={each:function(d,u){d&&(Array.isArray(d)?d.forEach(u):Object.keys(d).forEach(g=>{u(d[g],g)}))},some:function(d,u){return!!d&&(Array.isArray(d)?d.some(u):Object.keys(d).some(g=>u(d[g],g)))},every:function(d,u){return!d||(Array.isArray(d)?d.every(u):Object.keys(d).every(g=>u(d[g],g)))},map:function(d,u){return d?Array.isArray(d)?d.map(u):Object.keys(d).map(g=>u(d[g],g)):[]},keyBy:(d,u)=>d.reduce((g,v)=>(g[v[u]]=v,g),{}),isEqual:function(d,u){let g=typeof d,v=typeof u,C=Array.isArray(d),b=Array.isArray(u),P;if(g!==v)return!1;switch(typeof d){case"object":if(C||b)return!(!C||!b)&&d.length===u.length&&d.every((T,w)=>{let I=u[w];return c.isEqual(T,I)});if(d===null||u===null)return d===u;if(P=Object.keys(d),Object.keys(u).length!==P.length)return!1;for(let T of P)if(!u.hasOwnProperty(T))return!1;return c.every(d,(T,w)=>{let I=u[w];return c.isEqual(T,I)});default:return d===u}},escapeHtml(d){let u=n.exec(d);if(!u)return d;let g="",v="",C=0,b=u.index;for(;b":v=">";break;default:continue}C!==b&&(g+=d.substring(C,b)),C=b+1,g+=v}return C!==b?g+d.substring(C,b):g},strcmp:(d,u)=>du?1:0,isUndefined:d=>o.call(d)==="[object Undefined]",isObject:d=>o.call(d)==="[object Object]",deepMerge(){let d=arguments[0]||{},{length:u}=arguments,g,v,C;function b(P,T){g=d[T],C=Array.isArray(P),c.isObject(P)||C?(C?(C=!1,v=g&&Array.isArray(g)?g:[]):v=g&&c.isObject(g)?g:{},d[T]=c.deepMerge(v,P)):c.isUndefined(P)||(d[T]=P)}for(let P=0;P&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,u={nop(){},promiseImmediate:g=>new Promise(v=>{o.setImmediate?n(()=>{v(g)}):setTimeout(()=>{v(g)},1)}),inherits:function(g,v,C,b){g.super_=v,b||(b=C,C=null),C&&Object.keys(C).forEach(T=>{Object.defineProperty(g,T,Object.getOwnPropertyDescriptor(C,T))});let P={constructor:{value:g,enumerable:!1,writable:!1,configurable:!0}};b&&Object.keys(b).forEach(T=>{P[T]=Object.getOwnPropertyDescriptor(b,T)}),g.prototype=Object.create(v.prototype,P)},dateToExcel:(g,v)=>25569+g.getTime()/864e5-(v?1462:0),excelToDate(g,v){let C=Math.round(24*(g-25569+(v?1462:0))*3600*1e3);return new Date(C)},parsePath(g){let v=g.lastIndexOf("/");return{path:g.substring(0,v),name:g.substring(v+1)}},getRelsPath(g){let v=u.parsePath(g);return`${v.path}/_rels/${v.name}.rels`},xmlEncode(g){let v=d.exec(g);if(!v)return g;let C="",b="",P=0,T=v.index;for(;T=11&&w!==13)){b="";break}continue}P!==T&&(C+=g.substring(P,T)),P=T+1,b&&(C+=b)}return P!==T?C+g.substring(P,T):C},xmlDecode:g=>g.replace(/&([a-z]*);/g,v=>{switch(v){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return v}}),validInt(g){let v=parseInt(g,10);return Number.isNaN(v)?0:v},isDateFmt(g){return g?(g=(g=g.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:g=>new Promise(v=>{c.access(g,c.constants.F_OK,C=>{v(!C)})})},toIsoDateString:g=>g.toIsoString().subsstr(0,10),parseBoolean:g=>g===!0||g==="true"||g===1||g==="1"};a.exports=u}).call(this)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,a,t){"use strict";let o=e("./under-dash"),n=e("./utils");function c(g,v,C){g.push(` ${v}="${n.xmlEncode(C.toString())}"`)}function d(g,v){if(v){let C=[];o.each(v,(b,P)=>{b!==void 0&&c(C,P,b)}),g.push(C.join(""))}}class u{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(v){let C=this._xml;C.push(" `)}openNode(v,C){let b=this.tos,P=this._xml;b&&this.open&&P.push(">"),this._stack.push(v),P.push("<"),P.push(v),d(P,C),this.leaf=!0,this.open=!0}addAttribute(v,C){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");C!==void 0&&c(this._xml,v,C)}addAttributes(v){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");d(this._xml,v)}writeText(v){let C=this._xml;this.open&&(C.push(">"),this.open=!1),this.leaf=!1,C.push(n.xmlEncode(v.toString()))}writeXml(v){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(v)}closeNode(){let v=this._stack.pop(),C=this._xml;this.leaf?C.push("/>"):(C.push("")),this.open=!1,this.leaf=!1}leafNode(v,C,b){this.openNode(v,C),b!==void 0&&this.writeText(b),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){let v=this._rollbacks.pop();this._xml.length>v.xml&&this._xml.splice(v.xml,this._xml.length-v.xml),this._stack.length>v.stack&&this._stack.splice(v.stack,this._stack.length-v.stack),this.leaf=v.leaf,this.open=v.open}get xml(){return this.closeAll(),this._xml.join("")}}u.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},a.exports=u},{"./under-dash":26,"./utils":27}],29:[function(e,a,t){(function(o){(function(){"use strict";let n=e("events"),c=e("jszip"),d=e("./stream-buf"),{stringToBuffer:u}=e("./browser-buffer-encode");class g extends n.EventEmitter{constructor(C){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},C),this.zip=new c,this.stream=new d}append(C,b){b.hasOwnProperty("base64")&&b.base64?this.zip.file(b.name,C,{base64:!0}):(o.browser&&typeof C=="string"&&(C=u(C)),this.zip.file(b.name,C))}finalize(){return Zn(this,null,function*(){let C=yield this.zip.generateAsync(this.options);this.stream.end(C),this.emit("finish")})}read(C){return this.stream.read(C)}setEncoding(C){return this.stream.setEncoding(C)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(C,b){return this.stream.pipe(C,b)}unpipe(C){return this.stream.unpipe(C)}unshift(C){return this.stream.unshift(C)}wrap(C){return this.stream.wrap(C)}}a.exports={ZipWriter:g}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,a,t){"use strict";a.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(e,a,t){"use strict";a.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(e,a,t){"use strict";let o=e("../../utils/parse-sax"),n=e("../../utils/xml-stream");class c{prepare(){}render(){}parseOpen(u){}parseText(u){}parseClose(u){}reconcile(u,g){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(u=>{u instanceof c?u.reset():u.xform&&u.xform.reset()})}mergeModel(u){this.model=Object.assign(this.model||{},u)}parse(u){return Zn(this,null,function*(){try{for(var g=W1(u),v,C,b;v=!(C=yield g.next()).done;v=!1){let P=C.value;for(let{eventType:T,value:w}of P)if(T==="opentag")this.parseOpen(w);else if(T==="text")this.parseText(w);else if(T==="closetag"&&!this.parseClose(w.name))return this.model}}catch{b=[C]}finally{try{v&&(C=g.return)&&(yield C.call(g))}finally{if(b)throw b[0]}}return this.model})}parseStream(u){return Zn(this,null,function*(){return this.parse(o(u))})}get xml(){return this.toXml(this.model)}toXml(u){let g=new n;return this.render(g,u),g.xml}static toAttribute(u,g){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(v)return g}else if(v||u!==g)return u.toString()}static toStringAttribute(u,g){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return c.toAttribute(u,g,v)}static toStringValue(u,g){return u===void 0?g:u}static toBoolAttribute(u,g){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u===void 0){if(v)return g}else if(v||u!==g)return u?"1":"0"}static toBoolValue(u,g){return u===void 0?g:u==="1"}static toIntAttribute(u,g){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return c.toAttribute(u,g,v)}static toIntValue(u,g){return u===void 0?g:parseInt(u,10)}static toFloatAttribute(u,g){let v=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return c.toAttribute(u,g,v)}static toFloatValue(u,g){return u===void 0?g:parseFloat(u)}}a.exports=c},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../../../utils/col-cache");function c(u){try{return n.decodeEx(u),!0}catch{return!1}}function d(u){let g=[],v=!1,C="";return u.split(",").forEach(b=>{if(!b)return;let P=(b.match(/'/g)||[]).length;if(!P)return void(v?C+=b+",":c(b)&&g.push(b));let T=P%2==0;!v&&T&&c(b)?g.push(b):v&&!T?(v=!1,c(C+b)&&g.push(C+b),C=""):(v=!0,C+=b+",")}),g}a.exports=class extends o{render(u,g){u.openNode("definedName",{name:g.name,localSheetId:g.localSheetId}),u.writeText(g.ranges.join(",")),u.closeNode()}parseOpen(u){switch(u.name){case"definedName":return this._parsedName=u.attributes.name,this._parsedLocalSheetId=u.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(u){this._parsedText.push(u)}parseClose(){return this.model={name:this._parsedName,ranges:d(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,a,t){"use strict";let o=e("../../../utils/utils"),n=e("../base-xform");a.exports=class extends n{render(c,d){c.leafNode("sheet",{sheetId:d.id,name:d.name,state:d.state,"r:id":d.rId})}parseOpen(c){return c.name==="sheet"&&(this.model={name:o.xmlDecode(c.attributes.name),id:parseInt(c.attributes.sheetId,10),state:c.attributes.state,rId:c.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{render(n,c){n.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:c.fullCalcOnLoad?1:void 0})}parseOpen(n){return n.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{render(n,c){n.leafNode("workbookPr",{date1904:c.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(n){return n.name==="workbookPr"&&(this.model={date1904:n.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{render(n,c){let d={xWindow:c.x||0,yWindow:c.y||0,windowWidth:c.width||12e3,windowHeight:c.height||24e3,firstSheet:c.firstSheet,activeTab:c.activeTab};c.visibility&&c.visibility!=="visible"&&(d.visibility=c.visibility),n.leafNode("workbookView",d)}parseOpen(n){if(n.name==="workbookView"){let c=this.model={},d=function(g,v,C){let b=v!==void 0?c[g]=v:C;b!==void 0&&(c[g]=b)},u=function(g,v,C){let b=v!==void 0?c[g]=parseInt(v,10):C;b!==void 0&&(c[g]=b)};return u("x",n.attributes.xWindow,0),u("y",n.attributes.yWindow,0),u("width",n.attributes.windowWidth,25e3),u("height",n.attributes.windowHeight,1e4),d("visibility",n.attributes.visibility,"visible"),u("activeTab",n.attributes.activeTab,void 0),u("firstSheet",n.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../../../utils/col-cache"),c=e("../../../utils/xml-stream"),d=e("../base-xform"),u=e("../static-xform"),g=e("../list-xform"),v=e("./defined-name-xform"),C=e("./sheet-xform"),b=e("./workbook-view-xform"),P=e("./workbook-properties-xform"),T=e("./workbook-calc-properties-xform");class w extends d{constructor(){super(),this.map={fileVersion:w.STATIC_XFORMS.fileVersion,workbookPr:new P,bookViews:new g({tag:"bookViews",count:!1,childXform:new b}),sheets:new g({tag:"sheets",count:!1,childXform:new C}),definedNames:new g({tag:"definedNames",count:!1,childXform:new v}),calcPr:new T}}prepare(E){E.sheets=E.worksheets;let R=[],G=0;E.sheets.forEach(U=>{if(U.pageSetup&&U.pageSetup.printArea&&U.pageSetup.printArea.split("&&").forEach(Z=>{let he=Z.split(":"),re={name:"_xlnm.Print_Area",ranges:[`'${U.name}'!$${he[0]}:$${he[1]}`],localSheetId:G};R.push(re)}),U.pageSetup&&(U.pageSetup.printTitlesRow||U.pageSetup.printTitlesColumn)){let Z=[];if(U.pageSetup.printTitlesColumn){let re=U.pageSetup.printTitlesColumn.split(":");Z.push(`'${U.name}'!$${re[0]}:$${re[1]}`)}if(U.pageSetup.printTitlesRow){let re=U.pageSetup.printTitlesRow.split(":");Z.push(`'${U.name}'!$${re[0]}:$${re[1]}`)}let he={name:"_xlnm.Print_Titles",ranges:Z,localSheetId:G};R.push(he)}G++}),R.length&&(E.definedNames=E.definedNames.concat(R)),(E.media||[]).forEach((U,Z)=>{U.name=U.type+(Z+1)})}render(E,R){E.openXml(c.StdDocAttributes),E.openNode("workbook",w.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(E),this.map.workbookPr.render(E,R.properties),this.map.bookViews.render(E,R.views),this.map.sheets.render(E,R.sheets),this.map.definedNames.render(E,R.definedNames),this.map.calcPr.render(E,R.calcProperties),E.closeNode()}parseOpen(E){if(this.parser)return this.parser.parseOpen(E),!0;switch(E.name){case"workbook":return!0;default:return this.parser=this.map[E.name],this.parser&&this.parser.parseOpen(E),!0}}parseText(E){this.parser&&this.parser.parseText(E)}parseClose(E){if(this.parser)return this.parser.parseClose(E)||(this.parser=void 0),!0;switch(E){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(E){let R=(E.workbookRels||[]).reduce((re,pe)=>(re[pe.Id]=pe,re),{}),G=[],U,Z=0;(E.sheets||[]).forEach(re=>{let pe=R[re.rId];pe&&(U=E.worksheetHash["xl/"+pe.Target.replace(/^(\s|\/xl\/)+/,"")],U&&(U.name=re.name,U.id=re.id,U.state=re.state,G[Z++]=U))});let he=[];o.each(E.definedNames,re=>{if(re.name==="_xlnm.Print_Area"){if(U=G[re.localSheetId],U){U.pageSetup||(U.pageSetup={});let pe=n.decodeEx(re.ranges[0]);U.pageSetup.printArea=U.pageSetup.printArea?`${U.pageSetup.printArea}&&${pe.dimensions}`:pe.dimensions}}else if(re.name==="_xlnm.Print_Titles"){if(U=G[re.localSheetId],U){U.pageSetup||(U.pageSetup={});let pe=re.ranges.join(","),de=/\$/g,be=/\$\d+:\$\d+/,ue=pe.match(be);if(ue&&ue.length){let le=ue[0];U.pageSetup.printTitlesRow=le.replace(de,"")}let j=/\$[A-Z]+:\$[A-Z]+/,Q=pe.match(j);if(Q&&Q.length){let le=Q[0];U.pageSetup.printTitlesColumn=le.replace(de,"")}}}else he.push(re)}),E.definedNames=he,E.media.forEach((re,pe)=>{re.index=pe})}}w.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},w.STATIC_XFORMS={fileVersion:new u({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},a.exports=w},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(e,a,t){"use strict";let o=e("../strings/rich-text-xform"),n=e("../../../utils/utils"),c=e("../base-xform"),d=a.exports=function(u){this.model=u};n.inherits(d,c,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new o),this._richTextXform},render(u,g){g=g||this.model,u.openNode("comment",{ref:g.ref,authorId:0}),u.openNode("text"),g&&g.note&&g.note.texts&&g.note.texts.forEach(v=>{this.richTextXform.render(u,v)}),u.closeNode(),u.closeNode()},parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"comment":return this.model=rt({type:"note",note:{texts:[]}},u.attributes),!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(u),!0;default:return!1}},parseText(u){this.parser&&this.parser.parseText(u)},parseClose(u){switch(u){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../../../utils/utils"),c=e("../base-xform"),d=e("./comment-xform"),u=a.exports=function(){this.map={comment:new d}};n.inherits(u,c,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(g,v){v=v||this.model,g.openXml(o.StdDocAttributes),g.openNode("comments",u.COMMENTS_ATTRIBUTES),g.openNode("authors"),g.leafNode("author",null,"Author"),g.closeNode(),g.openNode("commentList"),v.comments.forEach(C=>{this.map.comment.render(g,C)}),g.closeNode(),g.closeNode()},parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(g),!0;default:return!1}},parseText(g){this.parser&&this.parser.parseText(g)},parseClose(g){switch(g){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(g),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{constructor(n){super(),this._model=n}get tag(){return this._model&&this._model.tag}render(n,c,d){(c===d[2]||this.tag==="x:SizeWithCells"&&c===d[1])&&n.leafNode(this.tag)}parseOpen(n){switch(n.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{constructor(n){super(),this._model=n}get tag(){return this._model&&this._model.tag}render(n,c){n.leafNode(this.tag,null,c)}parseOpen(n){switch(n.name){case this.tag:return this.text="",!0;default:return!1}}parseText(n){this.text=n}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"x:Anchor"}getAnchorRect(n){let c=Math.floor(n.left),d=Math.floor(68*(n.left-c)),u=Math.floor(n.top),g=Math.floor(18*(n.top-u)),v=Math.floor(n.right),C=Math.floor(68*(n.right-v)),b=Math.floor(n.bottom);return[c,d,u,g,v,C,b,Math.floor(18*(n.bottom-b))]}getDefaultRect(n){let c=n.col,d=Math.max(n.row-2,0);return[c,6,d,14,c+2,2,d+4,16]}render(n,c){let d=c.anchor?this.getAnchorRect(c.anchor):this.getDefaultRect(c.refAddress);n.leafNode("x:Anchor",null,d.join(", "))}parseOpen(n){switch(n.name){case this.tag:return this.text="",!0;default:return!1}}parseText(n){this.text=n}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./vml-anchor-xform"),c=e("./style/vml-protection-xform"),d=e("./style/vml-position-xform"),u=["twoCells","oneCells","absolute"];a.exports=class extends o{constructor(){super(),this.map={"x:Anchor":new n,"x:Locked":new c({tag:"x:Locked"}),"x:LockText":new c({tag:"x:LockText"}),"x:SizeWithCells":new d({tag:"x:SizeWithCells"}),"x:MoveWithCells":new d({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(g,v){let{protection:C,editAs:b}=v.note;g.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(g,b,u),this.map["x:SizeWithCells"].render(g,b,u),this.map["x:Anchor"].render(g,v),this.map["x:Locked"].render(g,C.locked),g.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(g,C.lockText),g.leafNode("x:Row",null,v.refAddress.row-1),g.leafNode("x:Column",null,v.refAddress.col-1),g.closeNode()}parseOpen(g){switch(g.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g)}return!0}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.parser=void 0),!0;switch(g){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){let g=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),v=Object.keys(g).length;this.model.editAs=u[v],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform"),c=e("./vml-shape-xform");class d extends n{constructor(){super(),this.map={"v:shape":new c}}get tag(){return"xml"}render(g,v){g.openXml(o.StdDocAttributes),g.openNode(this.tag,d.DRAWING_ATTRIBUTES),g.openNode("o:shapelayout",{"v:ext":"edit"}),g.leafNode("o:idmap",{"v:ext":"edit",data:1}),g.closeNode(),g.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),g.leafNode("v:stroke",{joinstyle:"miter"}),g.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),g.closeNode(),v.comments.forEach((C,b)=>{this.map["v:shape"].render(g,C,b)}),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g)}return!0}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(g){case this.tag:return!1;default:return!0}}reconcile(g,v){g.anchors.forEach(C=>{C.br?this.map["xdr:twoCellAnchor"].reconcile(C,v):this.map["xdr:oneCellAnchor"].reconcile(C,v)})}}d.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},a.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./vml-textbox-xform"),c=e("./vml-client-data-xform");class d extends o{constructor(){super(),this.map={"v:textbox":new n,"x:ClientData":new c}}get tag(){return"v:shape"}render(g,v,C){g.openNode("v:shape",d.V_SHAPE_ATTRIBUTES(v,C)),g.leafNode("v:fill",{color2:"infoBackground [80]"}),g.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),g.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(g,v),this.map["x:ClientData"].render(g,v),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case this.tag:this.reset(),this.model={margins:{insetmode:g.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g)}return!0}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.parser=void 0),!0;switch(g){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}d.V_SHAPE_ATTRIBUTES=(u,g)=>({id:"_x0000_s"+(1025+g),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":u.note.margins&&u.note.margins.insetmode}),a.exports=d},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"v:textbox"}conversionUnit(n,c,d){return`${parseFloat(n)*c.toFixed(2)}${d}`}reverseConversionUnit(n){return(n||"").split(",").map(c=>Number(parseFloat(this.conversionUnit(parseFloat(c),.1,"")).toFixed(2)))}render(n,c){let d={style:"mso-direction-alt:auto"};if(c&&c.note){let{inset:u}=c.note&&c.note.margins;Array.isArray(u)&&(u=u.map(g=>this.conversionUnit(g,10,"mm")).join(",")),u&&(d.inset=u)}n.openNode("v:textbox",d),n.leafNode("div",{style:"text-align:left"}),n.closeNode()}parseOpen(n){switch(n.name){case this.tag:return this.model={inset:this.reverseConversionUnit(n.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(n){switch(n){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(e,a,t){"use strict";let o=e("./base-xform");a.exports=class extends o{createNewModel(n){return{}}parseOpen(n){return this.parser=this.parser||this.map[n.name],this.parser?(this.parser.parseOpen(n),!0):n.name===this.tag&&(this.model=this.createNewModel(n),!0)}parseText(n){this.parser&&this.parser.parseText(n)}onParserClose(n,c){this.model[n]=c.model}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.onParserClose(n,this.parser),this.parser=void 0),!0):n!==this.tag}}},{"./base-xform":32}],49:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{render(n,c){n.openNode("HeadingPairs"),n.openNode("vt:vector",{size:2,baseType:"variant"}),n.openNode("vt:variant"),n.leafNode("vt:lpstr",void 0,"Worksheets"),n.closeNode(),n.openNode("vt:variant"),n.leafNode("vt:i4",void 0,c.length),n.closeNode(),n.closeNode(),n.closeNode()}parseOpen(n){return n.name==="HeadingPairs"}parseText(){}parseClose(n){return n!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{render(n,c){n.openNode("TitlesOfParts"),n.openNode("vt:vector",{size:c.length,baseType:"lpstr"}),c.forEach(d=>{n.leafNode("vt:lpstr",void 0,d.name)}),n.closeNode(),n.closeNode()}parseOpen(n){return n.name==="TitlesOfParts"}parseText(){}parseClose(n){return n!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform"),c=e("../simple/string-xform"),d=e("./app-heading-pairs-xform"),u=e("./app-titles-of-parts-xform");class g extends n{constructor(){super(),this.map={Company:new c({tag:"Company"}),Manager:new c({tag:"Manager"}),HeadingPairs:new d,TitleOfParts:new u}}render(C,b){C.openXml(o.StdDocAttributes),C.openNode("Properties",g.PROPERTY_ATTRIBUTES),C.leafNode("Application",void 0,"Microsoft Excel"),C.leafNode("DocSecurity",void 0,"0"),C.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(C,b.worksheets),this.map.TitleOfParts.render(C,b.worksheets),this.map.Company.render(C,b.company||""),this.map.Manager.render(C,b.manager),C.leafNode("LinksUpToDate",void 0,"false"),C.leafNode("SharedDoc",void 0,"false"),C.leafNode("HyperlinksChanged",void 0,"false"),C.leafNode("AppVersion",void 0,"16.0300"),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"Properties":return!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}g.DateFormat=function(v){return v.toISOString().replace(/[.]\d{3,6}/,"")},g.DateAttrs={"xsi:type":"dcterms:W3CDTF"},g.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},a.exports=g},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform");class c extends n{render(u,g){u.openXml(o.StdDocAttributes),u.openNode("Types",c.PROPERTY_ATTRIBUTES);let v={};(g.media||[]).forEach(C=>{if(C.type==="image"){let b=C.extension;v[b]||(v[b]=!0,u.leafNode("Default",{Extension:b,ContentType:"image/"+b}))}}),u.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),u.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),u.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),g.worksheets.forEach(C=>{let b=`/xl/worksheets/sheet${C.id}.xml`;u.leafNode("Override",{PartName:b,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),u.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),u.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),g.sharedStrings&&g.sharedStrings.count&&u.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),g.tables&&g.tables.forEach(C=>{u.leafNode("Override",{PartName:"/xl/tables/"+C.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),g.drawings&&g.drawings.forEach(C=>{u.leafNode("Override",{PartName:`/xl/drawings/${C.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),g.commentRefs&&(u.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),g.commentRefs.forEach(C=>{let{commentName:b}=C;u.leafNode("Override",{PartName:`/xl/${b}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),u.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),u.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),u.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}c.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},a.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform"),c=e("../simple/date-xform"),d=e("../simple/string-xform"),u=e("../simple/integer-xform");class g extends n{constructor(){super(),this.map={"dc:creator":new d({tag:"dc:creator"}),"dc:title":new d({tag:"dc:title"}),"dc:subject":new d({tag:"dc:subject"}),"dc:description":new d({tag:"dc:description"}),"dc:identifier":new d({tag:"dc:identifier"}),"dc:language":new d({tag:"dc:language"}),"cp:keywords":new d({tag:"cp:keywords"}),"cp:category":new d({tag:"cp:category"}),"cp:lastModifiedBy":new d({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new c({tag:"cp:lastPrinted",format:g.DateFormat}),"cp:revision":new u({tag:"cp:revision"}),"cp:version":new d({tag:"cp:version"}),"cp:contentStatus":new d({tag:"cp:contentStatus"}),"cp:contentType":new d({tag:"cp:contentType"}),"dcterms:created":new c({tag:"dcterms:created",attrs:g.DateAttrs,format:g.DateFormat}),"dcterms:modified":new c({tag:"dcterms:modified",attrs:g.DateAttrs,format:g.DateFormat})}}render(C,b){C.openXml(o.StdDocAttributes),C.openNode("cp:coreProperties",g.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(C,b.creator),this.map["dc:title"].render(C,b.title),this.map["dc:subject"].render(C,b.subject),this.map["dc:description"].render(C,b.description),this.map["dc:identifier"].render(C,b.identifier),this.map["dc:language"].render(C,b.language),this.map["cp:keywords"].render(C,b.keywords),this.map["cp:category"].render(C,b.category),this.map["cp:lastModifiedBy"].render(C,b.lastModifiedBy),this.map["cp:lastPrinted"].render(C,b.lastPrinted),this.map["cp:revision"].render(C,b.revision),this.map["cp:version"].render(C,b.version),this.map["cp:contentStatus"].render(C,b.contentStatus),this.map["cp:contentType"].render(C,b.contentType),this.map["dcterms:created"].render(C,b.created),this.map["dcterms:modified"].render(C,b.modified),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[C.name],this.parser)return this.parser.parseOpen(C),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(C))}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.parser=void 0),!0;switch(C){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+C)}}}g.DateFormat=function(v){return v.toISOString().replace(/[.]\d{3}/,"")},g.DateAttrs={"xsi:type":"dcterms:W3CDTF"},g.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},a.exports=g},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{render(n,c){n.leafNode("Relationship",c)}parseOpen(n){switch(n.name){case"Relationship":return this.model=n.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform"),c=e("./relationship-xform");class d extends n{constructor(){super(),this.map={Relationship:new c}}render(g,v){v=v||this._values,g.openXml(o.StdDocAttributes),g.openNode("Relationships",d.RELATIONSHIPS_ATTRIBUTES),v.forEach(C=>{this.map.Relationship.render(g,C)}),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[g.name],this.parser)return this.parser.parseOpen(g),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(g))}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(g){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+g)}}}d.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},a.exports=d},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={range:{editAs:n.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(n){this.parser&&this.parser.parseText(n)}reconcilePicture(n,c){if(n&&n.rId){let d=c.rels[n.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(d){let u=d[1],g=c.mediaIndex[u];return c.media[g]}}}}},{"../base-xform":32}],57:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./blip-xform");a.exports=class extends o{constructor(){super(),this.map={"a:blip":new n}}get tag(){return"xdr:blipFill"}render(c,d){c.openNode(this.tag),this.map["a:blip"].render(c,d),c.openNode("a:stretch"),c.leafNode("a:fillRect"),c.closeNode(),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:this.reset();break;default:this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)}return!0}parseText(){}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"a:blip"}render(n,c){n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":c.rId,cstate:"print"})}parseOpen(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(n){switch(n){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"xdr:cNvPicPr"}render(n){n.openNode(this.tag),n.leafNode("a:picLocks",{noChangeAspect:"1"}),n.closeNode()}parseOpen(n){switch(n.name){case this.tag:default:return!0}}parseText(){}parseClose(n){switch(n){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./hlink-click-xform"),c=e("./ext-lst-xform");a.exports=class extends o{constructor(){super(),this.map={"a:hlinkClick":new n,"a:extLst":new c}}get tag(){return"xdr:cNvPr"}render(d,u){d.openNode(this.tag,{id:u.index,name:"Picture "+u.index}),this.map["a:hlinkClick"].render(d,u),this.map["a:extLst"].render(d,u),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../simple/integer-xform");a.exports=class extends o{constructor(c){super(),this.tag=c.tag,this.map={"xdr:col":new n({tag:"xdr:col",zero:!0}),"xdr:colOff":new n({tag:"xdr:colOff",zero:!0}),"xdr:row":new n({tag:"xdr:row",zero:!0}),"xdr:rowOff":new n({tag:"xdr:rowOff",zero:!0})}}render(c,d){c.openNode(this.tag),this.map["xdr:col"].render(c,d.nativeCol),this.map["xdr:colOff"].render(c,d.nativeColOff),this.map["xdr:row"].render(c,d.nativeRow),this.map["xdr:rowOff"].render(c,d.nativeRowOff),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:this.reset();break;default:this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)}return!0}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,a,t){"use strict";let o=e("../../../utils/col-cache"),n=e("../../../utils/xml-stream"),c=e("../base-xform"),d=e("./two-cell-anchor-xform"),u=e("./one-cell-anchor-xform");class g extends c{constructor(){super(),this.map={"xdr:twoCellAnchor":new d,"xdr:oneCellAnchor":new u}}prepare(C){C.anchors.forEach((b,P)=>{b.anchorType=(function(T){return(typeof T.range=="string"?o.decode(T.range):T.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(b),this.map[b.anchorType].prepare(b,{index:P})})}get tag(){return"xdr:wsDr"}render(C,b){C.openXml(n.StdDocAttributes),C.openNode(this.tag,g.DRAWING_ATTRIBUTES),b.anchors.forEach(P=>{this.map[P.anchorType].render(C,P)}),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C)}return!0}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){if(this.parser)return this.parser.parseClose(C)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(C){case this.tag:return!1;default:return!0}}reconcile(C,b){C.anchors.forEach(P=>{P.br?this.map["xdr:twoCellAnchor"].reconcile(P,b):this.map["xdr:oneCellAnchor"].reconcile(P,b)})}}g.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},a.exports=g},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"a:extLst"}render(n){n.openNode(this.tag),n.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),n.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),n.closeNode(),n.closeNode()}parseOpen(n){switch(n.name){case this.tag:default:return!0}}parseText(){}parseClose(n){switch(n){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.map={}}render(n,c){n.openNode(this.tag);let d=Math.floor(9525*c.width),u=Math.floor(9525*c.height);n.addAttribute("cx",d),n.addAttribute("cy",u),n.closeNode()}parseOpen(n){return n.name===this.tag&&(this.model={width:parseInt(n.attributes.cx||"0",10)/9525,height:parseInt(n.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"a:hlinkClick"}render(n,c){c.hyperlinks&&c.hyperlinks.rId&&n.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":c.hyperlinks.rId,tooltip:c.hyperlinks.tooltip})}parseOpen(n){switch(n.name){case this.tag:return this.model={hyperlinks:{rId:n.attributes["r:id"],tooltip:n.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./c-nv-pr-xform"),c=e("./c-nv-pic-pr-xform");a.exports=class extends o{constructor(){super(),this.map={"xdr:cNvPr":new n,"xdr:cNvPicPr":new c}}get tag(){return"xdr:nvPicPr"}render(d,u){d.openNode(this.tag),this.map["xdr:cNvPr"].render(d,u),this.map["xdr:cNvPicPr"].render(d,u),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset();break;default:this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)}return!0}parseText(){}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,a,t){"use strict";let o=e("./base-cell-anchor-xform"),n=e("../static-xform"),c=e("./cell-position-xform"),d=e("./ext-xform"),u=e("./pic-xform");a.exports=class extends o{constructor(){super(),this.map={"xdr:from":new c({tag:"xdr:from"}),"xdr:ext":new d({tag:"xdr:ext"}),"xdr:pic":new u,"xdr:clientData":new n({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(g,v){this.map["xdr:pic"].prepare(g.picture,v)}render(g,v){g.openNode(this.tag,{editAs:v.range.editAs||"oneCell"}),this.map["xdr:from"].render(g,v.range.tl),this.map["xdr:ext"].render(g,v.range.ext),this.map["xdr:pic"].render(g,v.picture),this.map["xdr:clientData"].render(g,{}),g.closeNode()}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.parser=void 0),!0;switch(g){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(g,v){g.medium=this.reconcilePicture(g.picture,v)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../static-xform"),c=e("./blip-fill-xform"),d=e("./nv-pic-pr-xform"),u=e("./sp-pr");a.exports=class extends o{constructor(){super(),this.map={"xdr:nvPicPr":new d,"xdr:blipFill":new c,"xdr:spPr":new n(u)}}get tag(){return"xdr:pic"}prepare(g,v){g.index=v.index+1}render(g,v){g.openNode(this.tag),this.map["xdr:nvPicPr"].render(g,v),this.map["xdr:blipFill"].render(g,v),this.map["xdr:spPr"].render(g,v),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case this.tag:this.reset();break;default:this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g)}return!0}parseText(){}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(g){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,a,t){"use strict";a.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(e,a,t){"use strict";let o=e("./base-cell-anchor-xform"),n=e("../static-xform"),c=e("./cell-position-xform"),d=e("./pic-xform");a.exports=class extends o{constructor(){super(),this.map={"xdr:from":new c({tag:"xdr:from"}),"xdr:to":new c({tag:"xdr:to"}),"xdr:pic":new d,"xdr:clientData":new n({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(u,g){this.map["xdr:pic"].prepare(u.picture,g)}render(u,g){u.openNode(this.tag,{editAs:g.range.editAs||"oneCell"}),this.map["xdr:from"].render(u,g.range.tl),this.map["xdr:to"].render(u,g.range.br),this.map["xdr:pic"].render(u,g.picture),this.map["xdr:clientData"].render(u,{}),u.closeNode()}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(u,g){u.medium=this.reconcilePicture(u.picture,g)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,a,t){"use strict";let o=e("./base-xform");a.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.always=!!n.always,this.count=n.count,this.empty=n.empty,this.$count=n.$count||"count",this.$=n.$,this.childXform=n.childXform,this.maxItems=n.maxItems}prepare(n,c){let{childXform:d}=this;n&&n.forEach((u,g)=>{c.index=g,d.prepare(u,c)})}render(n,c){if(this.always||c&&c.length){n.openNode(this.tag,this.$),this.count&&n.addAttribute(this.$count,c&&c.length||0);let{childXform:d}=this;(c||[]).forEach((u,g)=>{d.render(n,u,g)}),n.closeNode()}else this.empty&&n.leafNode(this.tag)}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(n)&&(this.parser=this.childXform,!0)}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser){if(!this.parser.parseClose(n)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(n,c){if(n){let{childXform:d}=this;n.forEach(u=>{d.reconcile(u,c)})}}}},{"./base-xform":32}],72:[function(e,a,t){"use strict";let o=e("../../../utils/col-cache"),n=e("../base-xform");a.exports=class extends n{get tag(){return"autoFilter"}render(c,d){if(d)if(typeof d=="string")c.leafNode("autoFilter",{ref:d});else{let u=function(C){return typeof C=="string"?C:o.getAddress(C.row,C.column).address},g=u(d.from),v=u(d.to);g&&v&&c.leafNode("autoFilter",{ref:`${g}:${v}`})}}parseOpen(c){c.name==="autoFilter"&&(this.model=c.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,a,t){"use strict";let o=e("../../../utils/utils"),n=e("../base-xform"),c=e("../../../doc/range"),d=e("../../../doc/enums"),u=e("../strings/rich-text-xform");function g(v){if(v==null)return d.ValueType.Null;if(v instanceof String||typeof v=="string")return d.ValueType.String;if(typeof v=="number")return d.ValueType.Number;if(typeof v=="boolean")return d.ValueType.Boolean;if(v instanceof Date)return d.ValueType.Date;if(v.text&&v.hyperlink)return d.ValueType.Hyperlink;if(v.formula)return d.ValueType.Formula;if(v.error)return d.ValueType.Error;throw new Error("I could not understand type of value")}a.exports=class extends n{constructor(){super(),this.richTextXForm=new u}get tag(){return"c"}prepare(v,C){let b=C.styles.addStyleModel(v.style||{},(function(P){switch(P.type){case d.ValueType.Formula:return g(P.result);default:return P.type}})(v));switch(b&&(v.styleId=b),v.comment&&C.comments.push(qt(rt({},v.comment),{ref:v.address})),v.type){case d.ValueType.String:case d.ValueType.RichText:C.sharedStrings&&(v.ssId=C.sharedStrings.add(v.value));break;case d.ValueType.Date:C.date1904&&(v.date1904=!0);break;case d.ValueType.Hyperlink:C.sharedStrings&&v.text!==void 0&&v.text!==null&&(v.ssId=C.sharedStrings.add(v.text)),C.hyperlinks.push({address:v.address,target:v.hyperlink,tooltip:v.tooltip});break;case d.ValueType.Merge:C.merges.add(v);break;case d.ValueType.Formula:if(C.date1904&&(v.date1904=!0),v.shareType==="shared"&&(v.si=C.siFormulae++),v.formula)C.formulae[v.address]=v;else if(v.sharedFormula){let P=C.formulae[v.sharedFormula];if(!P)throw new Error("Shared Formula master must exist above and or left of clone for cell "+v.address);P.si===void 0?(P.shareType="shared",P.si=C.siFormulae++,P.range=new c(P.address,v.address)):P.range&&P.range.expandToAddress(v.address),v.si=P.si}}}renderFormula(v,C){let b=null;switch(C.shareType){case"shared":b={t:"shared",ref:C.ref||C.range.range,si:C.si};break;case"array":b={t:"array",ref:C.ref};break;default:C.si!==void 0&&(b={t:"shared",si:C.si})}switch(g(C.result)){case d.ValueType.Null:v.leafNode("f",b,C.formula);break;case d.ValueType.String:v.addAttribute("t","str"),v.leafNode("f",b,C.formula),v.leafNode("v",null,C.result);break;case d.ValueType.Number:v.leafNode("f",b,C.formula),v.leafNode("v",null,C.result);break;case d.ValueType.Boolean:v.addAttribute("t","b"),v.leafNode("f",b,C.formula),v.leafNode("v",null,C.result?1:0);break;case d.ValueType.Error:v.addAttribute("t","e"),v.leafNode("f",b,C.formula),v.leafNode("v",null,C.result.error);break;case d.ValueType.Date:v.leafNode("f",b,C.formula),v.leafNode("v",null,o.dateToExcel(C.result,C.date1904));break;default:throw new Error("I could not understand type of value")}}render(v,C){if(C.type!==d.ValueType.Null||C.styleId){switch(v.openNode("c"),v.addAttribute("r",C.address),C.styleId&&v.addAttribute("s",C.styleId),C.type){case d.ValueType.Null:break;case d.ValueType.Number:v.leafNode("v",null,C.value);break;case d.ValueType.Boolean:v.addAttribute("t","b"),v.leafNode("v",null,C.value?"1":"0");break;case d.ValueType.Error:v.addAttribute("t","e"),v.leafNode("v",null,C.value.error);break;case d.ValueType.String:case d.ValueType.RichText:C.ssId!==void 0?(v.addAttribute("t","s"),v.leafNode("v",null,C.ssId)):C.value&&C.value.richText?(v.addAttribute("t","inlineStr"),v.openNode("is"),C.value.richText.forEach(b=>{this.richTextXForm.render(v,b)}),v.closeNode("is")):(v.addAttribute("t","str"),v.leafNode("v",null,C.value));break;case d.ValueType.Date:v.leafNode("v",null,o.dateToExcel(C.value,C.date1904));break;case d.ValueType.Hyperlink:C.ssId!==void 0?(v.addAttribute("t","s"),v.leafNode("v",null,C.ssId)):(v.addAttribute("t","str"),v.leafNode("v",null,C.text));break;case d.ValueType.Formula:this.renderFormula(v,C);break;case d.ValueType.Merge:}v.closeNode()}}parseOpen(v){if(this.parser)return this.parser.parseOpen(v),!0;switch(v.name){case"c":return this.model={address:v.attributes.r},this.t=v.attributes.t,v.attributes.s&&(this.model.styleId=parseInt(v.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=v.attributes.si,this.model.shareType=v.attributes.t,this.model.ref=v.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(v),!0;default:return!1}}parseText(v){if(this.parser)this.parser.parseText(v);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+v:v;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+v:v:this.model.value=this.model.value?this.model.value+v:v}}parseClose(v){switch(v){case"c":{let{model:C}=this;if(C.formula||C.shareType)C.type=d.ValueType.Formula,C.value&&(this.t==="str"?C.result=o.xmlDecode(C.value):this.t==="b"?C.result=parseInt(C.value,10)!==0:this.t==="e"?C.result={error:C.value}:C.result=parseFloat(C.value),C.value=void 0);else if(C.value!==void 0)switch(this.t){case"s":C.type=d.ValueType.String,C.value=parseInt(C.value,10);break;case"str":C.type=d.ValueType.String,C.value=o.xmlDecode(C.value);break;case"inlineStr":C.type=d.ValueType.String;break;case"b":C.type=d.ValueType.Boolean,C.value=parseInt(C.value,10)!==0;break;case"e":C.type=d.ValueType.Error,C.value={error:C.value};break;default:C.type=d.ValueType.Number,C.value=parseFloat(C.value)}else C.styleId?C.type=d.ValueType.Null:C.type=d.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(v),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(v),!0)}}reconcile(v,C){let b=v.styleId&&C.styles&&C.styles.getStyleModel(v.styleId);switch(b&&(v.style=b),v.styleId!==void 0&&(v.styleId=void 0),v.type){case d.ValueType.String:typeof v.value=="number"&&C.sharedStrings&&(v.value=C.sharedStrings.getString(v.value)),v.value.richText&&(v.type=d.ValueType.RichText);break;case d.ValueType.Number:b&&o.isDateFmt(b.numFmt)&&(v.type=d.ValueType.Date,v.value=o.excelToDate(v.value,C.date1904));break;case d.ValueType.Formula:v.result!==void 0&&b&&o.isDateFmt(b.numFmt)&&(v.result=o.excelToDate(v.result,C.date1904)),v.shareType==="shared"&&(v.ref?C.formulae[v.si]=v.address:(v.sharedFormula=C.formulae[v.si],delete v.shareType),delete v.si)}let P=C.hyperlinkMap[v.address];P&&(v.type===d.ValueType.Formula?(v.text=v.result,v.result=void 0):(v.text=v.value,v.value=void 0),v.type=d.ValueType.Hyperlink,v.hyperlink=P);let T=C.commentsMap&&C.commentsMap[v.address];T&&(v.comment=T)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{get tag(){return"x14:cfIcon"}render(n,c){n.leafNode(this.tag,{iconSet:c.iconSet,iconId:c.iconId})}parseOpen(n){let{attributes:c}=n;this.model={iconSet:c.iconSet,iconId:o.toIntValue(c.iconId)}}parseClose(n){return n!==this.tag}}},{"../../base-xform":32}],75:[function(e,a,t){"use strict";let{v4:o}=e("uuid"),n=e("../../base-xform"),c=e("../../composite-xform"),d=e("./databar-ext-xform"),u=e("./icon-set-ext-xform"),g={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class v extends c{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new d,"x14:iconSet":this.iconSetXform=new u}}get tag(){return"x14:cfRule"}static isExt(b){return b.type==="dataBar"?d.isExt(b):!(b.type!=="iconSet"||!b.custom&&!g[b.iconSet])}prepare(b){v.isExt(b)&&(b.x14Id=`{${o()}}`.toUpperCase())}render(b,P){if(v.isExt(P))switch(P.type){case"dataBar":this.renderDataBar(b,P);break;case"iconSet":this.renderIconSet(b,P)}}renderDataBar(b,P){b.openNode(this.tag,{type:"dataBar",id:P.x14Id}),this.databarXform.render(b,P),b.closeNode()}renderIconSet(b,P){b.openNode(this.tag,{type:"iconSet",priority:P.priority,id:P.x14Id||`{${o()}}`}),this.iconSetXform.render(b,P),b.closeNode()}createNewModel(b){let{attributes:P}=b;return{type:P.type,x14Id:P.id,priority:n.toIntValue(P.priority)}}onParserClose(b,P){Object.assign(this.model,P.model)}}a.exports=v},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,a,t){"use strict";let o=e("../../composite-xform"),n=e("./f-ext-xform");a.exports=class extends o{constructor(){super(),this.map={"xm:f":this.fExtXform=new n}}get tag(){return"x14:cfvo"}render(c,d){c.openNode(this.tag,{type:d.type}),d.value!==void 0&&this.fExtXform.render(c,d.value),c.closeNode()}createNewModel(c){return{type:c.attributes.type}}onParserClose(c,d){switch(c){case"xm:f":this.model.value=d.model?parseFloat(d.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,a,t){"use strict";let o=e("../../composite-xform"),n=e("./sqref-ext-xform"),c=e("./cf-rule-ext-xform");a.exports=class extends o{constructor(){super(),this.map={"xm:sqref":this.sqRef=new n,"x14:cfRule":this.cfRule=new c}}get tag(){return"x14:conditionalFormatting"}prepare(d,u){d.rules.forEach(g=>{this.cfRule.prepare(g,u)})}render(d,u){u.rules.some(c.isExt)&&(d.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),u.rules.filter(c.isExt).forEach(g=>this.cfRule.render(d,g)),this.sqRef.render(d,u.ref),d.closeNode())}createNewModel(){return{rules:[]}}onParserClose(d,u){switch(d){case"xm:sqref":this.model.ref=u.model;break;case"x14:cfRule":this.model.rules.push(u.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,a,t){"use strict";let o=e("../../composite-xform"),n=e("./cf-rule-ext-xform"),c=e("./conditional-formatting-ext-xform");a.exports=class extends o{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new c}}get tag(){return"x14:conditionalFormattings"}hasContent(d){return d.hasExtContent===void 0&&(d.hasExtContent=d.some(u=>u.rules.some(n.isExt))),d.hasExtContent}prepare(d,u){d.forEach(g=>{this.cfXform.prepare(g,u)})}render(d,u){this.hasContent(u)&&(d.openNode(this.tag),u.forEach(g=>this.cfXform.render(d,g)),d.closeNode())}createNewModel(){return[]}onParserClose(d,u){this.model.push(u.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,a,t){"use strict";let o=e("../../base-xform"),n=e("../../composite-xform"),c=e("../../style/color-xform"),d=e("./cfvo-ext-xform");a.exports=class extends n{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new d,"x14:borderColor":this.borderColorXform=new c("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new c("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new c("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new c("x14:axisColor")}}static isExt(u){return!u.gradient}get tag(){return"x14:dataBar"}render(u,g){u.openNode(this.tag,{minLength:o.toIntAttribute(g.minLength,0,!0),maxLength:o.toIntAttribute(g.maxLength,100,!0),border:o.toBoolAttribute(g.border,!1),gradient:o.toBoolAttribute(g.gradient,!0),negativeBarColorSameAsPositive:o.toBoolAttribute(g.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:o.toBoolAttribute(g.negativeBarBorderColorSameAsPositive,!0),axisPosition:o.toAttribute(g.axisPosition,"auto"),direction:o.toAttribute(g.direction,"leftToRight")}),g.cfvo.forEach(v=>{this.cfvoXform.render(u,v)}),this.borderColorXform.render(u,g.borderColor),this.negativeBorderColorXform.render(u,g.negativeBorderColor),this.negativeFillColorXform.render(u,g.negativeFillColor),this.axisColorXform.render(u,g.axisColor),u.closeNode()}createNewModel(u){let{attributes:g}=u;return{cfvo:[],minLength:o.toIntValue(g.minLength,0),maxLength:o.toIntValue(g.maxLength,100),border:o.toBoolValue(g.border,!1),gradient:o.toBoolValue(g.gradient,!0),negativeBarColorSameAsPositive:o.toBoolValue(g.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:o.toBoolValue(g.negativeBarBorderColorSameAsPositive,!0),axisPosition:o.toStringValue(g.axisPosition,"auto"),direction:o.toStringValue(g.direction,"leftToRight")}}onParserClose(u,g){let[,v]=u.split(":");switch(v){case"cfvo":this.model.cfvo.push(g.model);break;default:this.model[v]=g.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{get tag(){return"xm:f"}render(n,c){n.leafNode(this.tag,null,c)}parseOpen(){this.model=""}parseText(n){this.model+=n}parseClose(n){return n!==this.tag}}},{"../../base-xform":32}],81:[function(e,a,t){"use strict";let o=e("../../base-xform"),n=e("../../composite-xform"),c=e("./cfvo-ext-xform"),d=e("./cf-icon-ext-xform");a.exports=class extends n{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new c,"x14:cfIcon":this.cfIconXform=new d}}get tag(){return"x14:iconSet"}render(u,g){u.openNode(this.tag,{iconSet:o.toStringAttribute(g.iconSet),reverse:o.toBoolAttribute(g.reverse,!1),showValue:o.toBoolAttribute(g.showValue,!0),custom:o.toBoolAttribute(g.icons,!1)}),g.cfvo.forEach(v=>{this.cfvoXform.render(u,v)}),g.icons&&g.icons.forEach((v,C)=>{v.iconId=C,this.cfIconXform.render(u,v)}),u.closeNode()}createNewModel(u){let{attributes:g}=u;return{cfvo:[],iconSet:o.toStringValue(g.iconSet,"3TrafficLights"),reverse:o.toBoolValue(g.reverse,!1),showValue:o.toBoolValue(g.showValue,!0)}}onParserClose(u,g){let[,v]=u.split(":");switch(v){case"cfvo":this.model.cfvo.push(g.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(g.model);break;default:this.model[v]=g.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{get tag(){return"xm:sqref"}render(n,c){n.leafNode(this.tag,null,c)}parseOpen(){this.model=""}parseText(n){this.model+=n}parseClose(n){return n!==this.tag}}},{"../../base-xform":32}],83:[function(e,a,t){"use strict";let o=e("../../base-xform"),n=e("../../composite-xform"),c=e("../../../../doc/range"),d=e("./databar-xform"),u=e("./ext-lst-ref-xform"),g=e("./formula-xform"),v=e("./color-scale-xform"),C=e("./icon-set-xform"),b={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},P=w=>{let{type:I,operator:E}=w;switch(I){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:I};default:return{type:I,operator:E}}};class T extends n{constructor(){super(),this.map={dataBar:this.databarXform=new d,extLst:this.extLstRefXform=new u,formula:this.formulaXform=new g,colorScale:this.colorScaleXform=new v,iconSet:this.iconSetXform=new C}}get tag(){return"cfRule"}static isPrimitive(I){return I.type!=="iconSet"||!I.custom&&!b[I.iconSet]}render(I,E){switch(E.type){case"expression":this.renderExpression(I,E);break;case"cellIs":this.renderCellIs(I,E);break;case"top10":this.renderTop10(I,E);break;case"aboveAverage":this.renderAboveAverage(I,E);break;case"dataBar":this.renderDataBar(I,E);break;case"colorScale":this.renderColorScale(I,E);break;case"iconSet":this.renderIconSet(I,E);break;case"containsText":this.renderText(I,E);break;case"timePeriod":this.renderTimePeriod(I,E)}}renderExpression(I,E){I.openNode(this.tag,{type:"expression",dxfId:E.dxfId,priority:E.priority}),this.formulaXform.render(I,E.formulae[0]),I.closeNode()}renderCellIs(I,E){I.openNode(this.tag,{type:"cellIs",dxfId:E.dxfId,priority:E.priority,operator:E.operator}),E.formulae.forEach(R=>{this.formulaXform.render(I,R)}),I.closeNode()}renderTop10(I,E){I.leafNode(this.tag,{type:"top10",dxfId:E.dxfId,priority:E.priority,percent:o.toBoolAttribute(E.percent,!1),bottom:o.toBoolAttribute(E.bottom,!1),rank:o.toIntValue(E.rank,10,!0)})}renderAboveAverage(I,E){I.leafNode(this.tag,{type:"aboveAverage",dxfId:E.dxfId,priority:E.priority,aboveAverage:o.toBoolAttribute(E.aboveAverage,!0)})}renderDataBar(I,E){I.openNode(this.tag,{type:"dataBar",priority:E.priority}),this.databarXform.render(I,E),this.extLstRefXform.render(I,E),I.closeNode()}renderColorScale(I,E){I.openNode(this.tag,{type:"colorScale",priority:E.priority}),this.colorScaleXform.render(I,E),I.closeNode()}renderIconSet(I,E){T.isPrimitive(E)&&(I.openNode(this.tag,{type:"iconSet",priority:E.priority}),this.iconSetXform.render(I,E),I.closeNode())}renderText(I,E){I.openNode(this.tag,{type:E.operator,dxfId:E.dxfId,priority:E.priority,operator:o.toStringAttribute(E.operator,"containsText")});let R=(G=>{if(G.formulae&&G.formulae[0])return G.formulae[0];let U=new c(G.ref),{tl:Z}=U;switch(G.operator){case"containsText":return`NOT(ISERROR(SEARCH("${G.text}",${Z})))`;case"containsBlanks":return`LEN(TRIM(${Z}))=0`;case"notContainsBlanks":return`LEN(TRIM(${Z}))>0`;case"containsErrors":return`ISERROR(${Z})`;case"notContainsErrors":return`NOT(ISERROR(${Z}))`;default:return}})(E);R&&this.formulaXform.render(I,R),I.closeNode()}renderTimePeriod(I,E){I.openNode(this.tag,{type:"timePeriod",dxfId:E.dxfId,priority:E.priority,timePeriod:E.timePeriod});let R=(G=>{if(G.formulae&&G.formulae[0])return G.formulae[0];let U=new c(G.ref),{tl:Z}=U;switch(G.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${Z},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${Z},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${Z},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${Z},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${Z},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${Z},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${Z},1)=TODAY()-1`;case"today":return`FLOOR(${Z},1)=TODAY()`;case"tomorrow":return`FLOOR(${Z},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${Z},1)<=6,FLOOR(${Z},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${Z})=MONTH(EDATE(TODAY(),0-1)),YEAR(${Z})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${Z})=MONTH(TODAY()),YEAR(${Z})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${Z})=MONTH(EDATE(TODAY(),0+1)),YEAR(${Z})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(E);R&&this.formulaXform.render(I,R),I.closeNode()}createNewModel(I){let{attributes:E}=I;return qt(rt({},P(E)),{dxfId:o.toIntValue(E.dxfId),priority:o.toIntValue(E.priority),timePeriod:E.timePeriod,percent:o.toBoolValue(E.percent),bottom:o.toBoolValue(E.bottom),rank:o.toIntValue(E.rank),aboveAverage:o.toBoolValue(E.aboveAverage)})}onParserClose(I,E){switch(I){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,E.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(E.model)}}}a.exports=T},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{get tag(){return"cfvo"}render(n,c){n.leafNode(this.tag,{type:c.type,val:c.value})}parseOpen(n){this.model={type:n.attributes.type,value:o.toFloatValue(n.attributes.val)}}parseClose(n){return n!==this.tag}}},{"../../base-xform":32}],85:[function(e,a,t){"use strict";let o=e("../../composite-xform"),n=e("../../style/color-xform"),c=e("./cfvo-xform");a.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new c,color:this.colorXform=new n}}get tag(){return"colorScale"}render(d,u){d.openNode(this.tag),u.cfvo.forEach(g=>{this.cfvoXform.render(d,g)}),u.color.forEach(g=>{this.colorXform.render(d,g)}),d.closeNode()}createNewModel(d){return{cfvo:[],color:[]}}onParserClose(d,u){this.model[d].push(u.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,a,t){"use strict";let o=e("../../composite-xform"),n=e("./cf-rule-xform");a.exports=class extends o{constructor(){super(),this.map={cfRule:new n}}get tag(){return"conditionalFormatting"}render(c,d){d.rules.some(n.isPrimitive)&&(c.openNode(this.tag,{sqref:d.ref}),d.rules.forEach(u=>{n.isPrimitive(u)&&(u.ref=d.ref,this.map.cfRule.render(c,u))}),c.closeNode())}createNewModel(c){let{attributes:d}=c;return{ref:d.sqref,rules:[]}}onParserClose(c,d){this.model.rules.push(d.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,a,t){"use strict";let o=e("../../base-xform"),n=e("./conditional-formatting-xform");a.exports=class extends o{constructor(){super(),this.cfXform=new n}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(c,d){let u=c.reduce((g,v)=>Math.max(g,...v.rules.map(C=>C.priority||0)),1);c.forEach(g=>{g.rules.forEach(v=>{v.priority||(v.priority=u++),v.style&&(v.dxfId=d.styles.addDxfStyle(v.style))})})}render(c,d){d.forEach(u=>{this.cfXform.render(c,u)})}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(c),!0;default:return!1}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){return!!this.parser&&(!!this.parser.parseClose(c)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(c,d){c.forEach(u=>{u.rules.forEach(g=>{g.dxfId!==void 0&&(g.style=d.styles.getDxfStyle(g.dxfId),delete g.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,a,t){"use strict";let o=e("../../composite-xform"),n=e("../../style/color-xform"),c=e("./cfvo-xform");a.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new c,color:this.colorXform=new n}}get tag(){return"dataBar"}render(d,u){d.openNode(this.tag),u.cfvo.forEach(g=>{this.cfvoXform.render(d,g)}),this.colorXform.render(d,u.color),d.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(d,u){switch(d){case"cfvo":this.model.cfvo.push(u.model);break;case"color":this.model.color=u.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,a,t){"use strict";let o=e("../../base-xform"),n=e("../../composite-xform");class c extends o{get tag(){return"x14:id"}render(g,v){g.leafNode(this.tag,null,v)}parseOpen(){this.model=""}parseText(g){this.model+=g}parseClose(g){return g!==this.tag}}class d extends n{constructor(){super(),this.map={"x14:id":this.idXform=new c}}get tag(){return"ext"}render(g,v){g.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(g,v.x14Id),g.closeNode()}createNewModel(){return{}}onParserClose(g,v){this.model.x14Id=v.model}}a.exports=class extends n{constructor(){super(),this.map={ext:new d}}get tag(){return"extLst"}render(u,g){u.openNode(this.tag),this.map.ext.render(u,g),u.closeNode()}createNewModel(){return{}}onParserClose(u,g){Object.assign(this.model,g.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,a,t){"use strict";let o=e("../../base-xform");a.exports=class extends o{get tag(){return"formula"}render(n,c){n.leafNode(this.tag,null,c)}parseOpen(){this.model=""}parseText(n){this.model+=n}parseClose(n){return n!==this.tag}}},{"../../base-xform":32}],91:[function(e,a,t){"use strict";let o=e("../../base-xform"),n=e("../../composite-xform"),c=e("./cfvo-xform");a.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new c}}get tag(){return"iconSet"}render(d,u){d.openNode(this.tag,{iconSet:o.toStringAttribute(u.iconSet,"3TrafficLights"),reverse:o.toBoolAttribute(u.reverse,!1),showValue:o.toBoolAttribute(u.showValue,!0)}),u.cfvo.forEach(g=>{this.cfvoXform.render(d,g)}),d.closeNode()}createNewModel(d){let{attributes:u}=d;return{iconSet:o.toStringValue(u.iconSet,"3TrafficLights"),reverse:o.toBoolValue(u.reverse),showValue:o.toBoolValue(u.showValue),cfvo:[]}}onParserClose(d,u){this.model[d].push(u.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,a,t){"use strict";let o=e("../../../utils/utils"),n=e("../base-xform");a.exports=class extends n{get tag(){return"col"}prepare(c,d){let u=d.styles.addStyleModel(c.style||{});u&&(c.styleId=u)}render(c,d){c.openNode("col"),c.addAttribute("min",d.min),c.addAttribute("max",d.max),d.width&&c.addAttribute("width",d.width),d.styleId&&c.addAttribute("style",d.styleId),d.hidden&&c.addAttribute("hidden","1"),d.bestFit&&c.addAttribute("bestFit","1"),d.outlineLevel&&c.addAttribute("outlineLevel",d.outlineLevel),d.collapsed&&c.addAttribute("collapsed","1"),c.addAttribute("customWidth","1"),c.closeNode()}parseOpen(c){if(c.name==="col"){let d=this.model={min:parseInt(c.attributes.min||"0",10),max:parseInt(c.attributes.max||"0",10),width:c.attributes.width===void 0?void 0:parseFloat(c.attributes.width||"0")};return c.attributes.style&&(d.styleId=parseInt(c.attributes.style,10)),o.parseBoolean(c.attributes.hidden)&&(d.hidden=!0),o.parseBoolean(c.attributes.bestFit)&&(d.bestFit=!0),c.attributes.outlineLevel&&(d.outlineLevel=parseInt(c.attributes.outlineLevel,10)),o.parseBoolean(c.attributes.collapsed)&&(d.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(c,d){c.styleId&&(c.style=d.styles.getStyleModel(c.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../../../utils/utils"),c=e("../../../utils/col-cache"),d=e("../base-xform"),u=e("../../../doc/range");function g(C,b,P,T){let w=b[P];w!==void 0?C[P]=w:T!==void 0&&(C[P]=T)}function v(C,b,P,T){let w=b[P];w!==void 0?C[P]=n.parseBoolean(w):T!==void 0&&(C[P]=T)}a.exports=class extends d{get tag(){return"dataValidations"}render(C,b){let P=(function(T){let w=o.map(T,(R,G)=>({address:G,dataValidation:R,marked:!1})).sort((R,G)=>o.strcmp(R.address,G.address)),I=o.keyBy(w,"address"),E=(R,G,U)=>{for(let Z=0;Z{if(!R.marked){let G=c.decodeEx(R.address);if(G.dimensions)return I[G.dimensions].marked=!0,qt(rt({},R.dataValidation),{sqref:R.address});let U=1,Z=c.encodeAddress(G.row+U,G.col);for(;T[Z]&&o.isEqual(R.dataValidation,T[Z]);)U++,Z=c.encodeAddress(G.row+U,G.col);let he=1;for(;E(G,U,G.col+he);)he++;for(let re=0;re1||he>1){let re=G.row+(U-1),pe=G.col+(he-1);return qt(rt({},R.dataValidation),{sqref:`${R.address}:${c.encodeAddress(re,pe)}`})}return qt(rt({},R.dataValidation),{sqref:R.address})}return null}).filter(Boolean)})(b);P.length&&(C.openNode("dataValidations",{count:P.length}),P.forEach(T=>{C.openNode("dataValidation"),T.type!=="any"&&(C.addAttribute("type",T.type),T.operator&&T.type!=="list"&&T.operator!=="between"&&C.addAttribute("operator",T.operator),T.allowBlank&&C.addAttribute("allowBlank","1")),T.showInputMessage&&C.addAttribute("showInputMessage","1"),T.promptTitle&&C.addAttribute("promptTitle",T.promptTitle),T.prompt&&C.addAttribute("prompt",T.prompt),T.showErrorMessage&&C.addAttribute("showErrorMessage","1"),T.errorStyle&&C.addAttribute("errorStyle",T.errorStyle),T.errorTitle&&C.addAttribute("errorTitle",T.errorTitle),T.error&&C.addAttribute("error",T.error),C.addAttribute("sqref",T.sqref),(T.formulae||[]).forEach((w,I)=>{C.openNode("formula"+(I+1)),T.type==="date"?C.writeText(n.dateToExcel(new Date(w))):C.writeText(w),C.closeNode()}),C.closeNode()}),C.closeNode())}parseOpen(C){switch(C.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=C.attributes.sqref;let b={type:C.attributes.type||"any",formulae:[]};switch(C.attributes.type&&v(b,C.attributes,"allowBlank"),v(b,C.attributes,"showInputMessage"),v(b,C.attributes,"showErrorMessage"),b.type){case"any":case"list":case"custom":break;default:g(b,C.attributes,"operator","between")}return g(b,C.attributes,"promptTitle"),g(b,C.attributes,"prompt"),g(b,C.attributes,"errorStyle"),g(b,C.attributes,"errorTitle"),g(b,C.attributes,"error"),this._dataValidation=b,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(C){this._formula&&this._formula.push(C)}parseClose(C){switch(C){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(b=>{b.includes(":")?new u(b).forEachAddress(P=>{this.model[P]=this._dataValidation}):this.model[b]=this._dataValidation}),!0;case"formula1":case"formula2":{let b=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":b=parseInt(b,10);break;case"decimal":b=parseFloat(b);break;case"date":b=n.excelToDate(parseFloat(b))}return this._dataValidation.formulae.push(b),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"dimension"}render(n,c){c&&n.leafNode("dimension",{ref:c})}parseOpen(n){return n.name==="dimension"&&(this.model=n.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"drawing"}render(n,c){c&&n.leafNode(this.tag,{"r:id":c.rId})}parseOpen(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,a,t){"use strict";let o=e("../composite-xform"),n=e("./cf-ext/conditional-formattings-ext-xform");class c extends o{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new n}}get tag(){return"ext"}hasContent(u){return this.conditionalFormattings.hasContent(u.conditionalFormattings)}prepare(u,g){this.conditionalFormattings.prepare(u.conditionalFormattings,g)}render(u,g){u.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(u,g.conditionalFormattings),u.closeNode()}createNewModel(){return{}}onParserClose(u,g){this.model[u]=g.model}}a.exports=class extends o{constructor(){super(),this.map={ext:this.ext=new c}}get tag(){return"extLst"}prepare(d,u){this.ext.prepare(d,u)}hasContent(d){return this.ext.hasContent(d)}render(d,u){this.hasContent(u)&&(d.openNode("extLst"),this.ext.render(d,u),d.closeNode())}createNewModel(){return{}}onParserClose(d,u){Object.assign(this.model,u.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"headerFooter"}render(n,c){if(c){n.addRollback();let d=!1;n.openNode("headerFooter"),c.differentFirst&&(n.addAttribute("differentFirst","1"),d=!0),c.differentOddEven&&(n.addAttribute("differentOddEven","1"),d=!0),c.oddHeader&&typeof c.oddHeader=="string"&&(n.leafNode("oddHeader",null,c.oddHeader),d=!0),c.oddFooter&&typeof c.oddFooter=="string"&&(n.leafNode("oddFooter",null,c.oddFooter),d=!0),c.evenHeader&&typeof c.evenHeader=="string"&&(n.leafNode("evenHeader",null,c.evenHeader),d=!0),c.evenFooter&&typeof c.evenFooter=="string"&&(n.leafNode("evenFooter",null,c.evenFooter),d=!0),c.firstHeader&&typeof c.firstHeader=="string"&&(n.leafNode("firstHeader",null,c.firstHeader),d=!0),c.firstFooter&&typeof c.firstFooter=="string"&&(n.leafNode("firstFooter",null,c.firstFooter),d=!0),d?(n.closeNode(),n.commit()):n.rollback()}}parseOpen(n){switch(n.name){case"headerFooter":return this.model={},n.attributes.differentFirst&&(this.model.differentFirst=parseInt(n.attributes.differentFirst,0)===1),n.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(n.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(n){switch(this.currentNode){case"oddHeader":this.model.oddHeader=n;break;case"oddFooter":this.model.oddFooter=n;break;case"evenHeader":this.model.evenHeader=n;break;case"evenFooter":this.model.evenFooter=n;break;case"firstHeader":this.model.firstHeader=n;break;case"firstFooter":this.model.firstFooter=n}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"hyperlink"}render(n,c){this.isInternalLink(c)?n.leafNode("hyperlink",{ref:c.address,"r:id":c.rId,tooltip:c.tooltip,location:c.target}):n.leafNode("hyperlink",{ref:c.address,"r:id":c.rId,tooltip:c.tooltip})}parseOpen(n){return n.name==="hyperlink"&&(this.model={address:n.attributes.ref,rId:n.attributes["r:id"],tooltip:n.attributes.tooltip},n.attributes.location&&(this.model.target=n.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(n){return n.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(n.target)}}},{"../base-xform":32}],99:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"mergeCell"}render(n,c){n.leafNode("mergeCell",{ref:c})}parseOpen(n){return n.name==="mergeCell"&&(this.model=n.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../../../doc/range"),c=e("../../../utils/col-cache"),d=e("../../../doc/enums");a.exports=class{constructor(){this.merges={}}add(u){if(this.merges[u.master])this.merges[u.master].expandToAddress(u.address);else{let g=`${u.master}:${u.address}`;this.merges[u.master]=new n(g)}}get mergeCells(){return o.map(this.merges,u=>u.range)}reconcile(u,g){o.each(u,v=>{let C=c.decode(v);for(let b=C.top;b<=C.bottom;b++){let P=g[b-1];for(let T=C.left;T<=C.right;T++){let w=P.cells[T-1];w?w.type===d.ValueType.Merge&&(w.master=C.tl):P.cells[T]={type:d.ValueType.Null,address:c.encodeAddress(b,T)}}}})}getMasterAddress(u){let g=this.hash[u];return g&&g.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,a,t){"use strict";let o=e("../base-xform"),n=c=>c!==void 0;a.exports=class extends o{get tag(){return"outlinePr"}render(c,d){return!(!d||!n(d.summaryBelow)&&!n(d.summaryRight))&&(c.leafNode(this.tag,{summaryBelow:n(d.summaryBelow)?Number(d.summaryBelow):void 0,summaryRight:n(d.summaryRight)?Number(d.summaryRight):void 0}),!0)}parseOpen(c){return c.name===this.tag&&(this.model={summaryBelow:n(c.attributes.summaryBelow)?!!Number(c.attributes.summaryBelow):void 0,summaryRight:n(c.attributes.summaryRight)?!!Number(c.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"brk"}render(n,c){n.leafNode("brk",c)}parseOpen(n){return n.name==="brk"&&(this.model=n.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../base-xform");a.exports=class extends n{get tag(){return"pageMargins"}render(c,d){if(d){let u={left:d.left,right:d.right,top:d.top,bottom:d.bottom,header:d.header,footer:d.footer};o.some(u,g=>g!==void 0)&&c.leafNode(this.tag,u)}}parseOpen(c){switch(c.name){case this.tag:return this.model={left:parseFloat(c.attributes.left||.7),right:parseFloat(c.attributes.right||.7),top:parseFloat(c.attributes.top||.75),bottom:parseFloat(c.attributes.bottom||.75),header:parseFloat(c.attributes.header||.3),footer:parseFloat(c.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"pageSetUpPr"}render(n,c){return!(!c||!c.fitToPage)&&(n.leafNode(this.tag,{fitToPage:c.fitToPage?"1":void 0}),!0)}parseOpen(n){return n.name===this.tag&&(this.model={fitToPage:n.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../base-xform");function c(v){return v?"1":void 0}function d(v){switch(v){case"overThenDown":return v;default:return}}function u(v){switch(v){case"atEnd":case"asDisplyed":return v;default:return}}function g(v){switch(v){case"dash":case"blank":case"NA":return v;default:return}}a.exports=class extends n{get tag(){return"pageSetup"}render(v,C){if(C){let b={paperSize:C.paperSize,orientation:C.orientation,horizontalDpi:C.horizontalDpi,verticalDpi:C.verticalDpi,pageOrder:d(C.pageOrder),blackAndWhite:c(C.blackAndWhite),draft:c(C.draft),cellComments:u(C.cellComments),errors:g(C.errors),scale:C.scale,fitToWidth:C.fitToWidth,fitToHeight:C.fitToHeight,firstPageNumber:C.firstPageNumber,useFirstPageNumber:c(C.firstPageNumber),usePrinterDefaults:c(C.usePrinterDefaults),copies:C.copies};o.some(b,P=>P!==void 0)&&v.leafNode(this.tag,b)}}parseOpen(v){switch(v.name){case this.tag:return this.model={paperSize:(C=v.attributes.paperSize,C!==void 0?parseInt(C,10):void 0),orientation:v.attributes.orientation||"portrait",horizontalDpi:parseInt(v.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(v.attributes.verticalDpi||"4294967295",10),pageOrder:v.attributes.pageOrder||"downThenOver",blackAndWhite:v.attributes.blackAndWhite==="1",draft:v.attributes.draft==="1",cellComments:v.attributes.cellComments||"None",errors:v.attributes.errors||"displayed",scale:parseInt(v.attributes.scale||"100",10),fitToWidth:parseInt(v.attributes.fitToWidth||"1",10),fitToHeight:parseInt(v.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(v.attributes.firstPageNumber||"1",10),useFirstPageNumber:v.attributes.useFirstPageNumber==="1",usePrinterDefaults:v.attributes.usePrinterDefaults==="1",copies:parseInt(v.attributes.copies||"1",10)},!0;default:return!1}var C}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"picture"}render(n,c){c&&n.leafNode(this.tag,{"r:id":c.rId})}parseOpen(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../base-xform");function c(d){return d?"1":void 0}a.exports=class extends n{get tag(){return"printOptions"}render(d,u){if(u){let g={headings:c(u.showRowColHeaders),gridLines:c(u.showGridLines),horizontalCentered:c(u.horizontalCentered),verticalCentered:c(u.verticalCentered)};o.some(g,v=>v!==void 0)&&d.leafNode(this.tag,g)}}parseOpen(d){switch(d.name){case this.tag:return this.model={showRowColHeaders:d.attributes.headings==="1",showGridLines:d.attributes.gridLines==="1",horizontalCentered:d.attributes.horizontalCentered==="1",verticalCentered:d.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,a,t){"use strict";let o=e("./page-breaks-xform"),n=e("../list-xform");a.exports=class extends n{constructor(){super({tag:"rowBreaks",count:!0,childXform:new o})}render(c,d){if(d&&d.length){c.openNode(this.tag,this.$),this.count&&(c.addAttribute(this.$count,d.length),c.addAttribute("manualBreakCount",d.length));let{childXform:u}=this;d.forEach(g=>{u.render(c,g)}),c.closeNode()}else this.empty&&c.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../../../utils/utils"),c=e("./cell-xform");a.exports=class extends o{constructor(d){super(),this.maxItems=d&&d.maxItems,this.map={c:new c}}get tag(){return"row"}prepare(d,u){let g=u.styles.addStyleModel(d.style);g&&(d.styleId=g);let v=this.map.c;d.cells.forEach(C=>{v.prepare(C,u)})}render(d,u,g){d.openNode("row"),d.addAttribute("r",u.number),u.height&&(d.addAttribute("ht",u.height),d.addAttribute("customHeight","1")),u.hidden&&d.addAttribute("hidden","1"),u.min>0&&u.max>0&&u.min<=u.max&&d.addAttribute("spans",`${u.min}:${u.max}`),u.styleId&&(d.addAttribute("s",u.styleId),d.addAttribute("customFormat","1")),d.addAttribute("x14ac:dyDescent","0.25"),u.outlineLevel&&d.addAttribute("outlineLevel",u.outlineLevel),u.collapsed&&d.addAttribute("collapsed","1");let v=this.map.c;u.cells.forEach(C=>{v.render(d,C,g)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;if(d.name==="row"){this.numRowsSeen+=1;let u=d.attributes.spans?d.attributes.spans.split(":").map(v=>parseInt(v,10)):[void 0,void 0],g=this.model={number:parseInt(d.attributes.r,10),min:u[0],max:u[1],cells:[]};return d.attributes.s&&(g.styleId=parseInt(d.attributes.s,10)),n.parseBoolean(d.attributes.hidden)&&(g.hidden=!0),n.parseBoolean(d.attributes.bestFit)&&(g.bestFit=!0),d.attributes.ht&&(g.height=parseFloat(d.attributes.ht)),d.attributes.outlineLevel&&(g.outlineLevel=parseInt(d.attributes.outlineLevel,10)),n.parseBoolean(d.attributes.collapsed)&&(g.collapsed=!0),!0}return this.parser=this.map[d.name],!!this.parser&&(this.parser.parseOpen(d),!0)}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser){if(!this.parser.parseClose(d)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(d,u){d.style=d.styleId?u.styles.getStyleModel(d.styleId):{},d.styleId!==void 0&&(d.styleId=void 0);let g=this.map.c;d.cells.forEach(v=>{g.reconcile(v,u)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../base-xform");a.exports=class extends n{get tag(){return"sheetFormatPr"}render(c,d){if(d){let u={defaultRowHeight:d.defaultRowHeight,outlineLevelRow:d.outlineLevelRow,outlineLevelCol:d.outlineLevelCol,"x14ac:dyDescent":d.dyDescent};d.defaultColWidth&&(u.defaultColWidth=d.defaultColWidth),d.defaultRowHeight&&d.defaultRowHeight===15||(u.customHeight="1"),o.some(u,g=>g!==void 0)&&c.leafNode("sheetFormatPr",u)}}parseOpen(c){return c.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(c.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(c.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(c.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(c.attributes.outlineLevelCol||"0",10)},c.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(c.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../style/color-xform"),c=e("./page-setup-properties-xform"),d=e("./outline-properties-xform");a.exports=class extends o{constructor(){super(),this.map={tabColor:new n("tabColor"),pageSetUpPr:new c,outlinePr:new d}}get tag(){return"sheetPr"}render(u,g){if(g){u.addRollback(),u.openNode("sheetPr");let v=!1;v=this.map.tabColor.render(u,g.tabColor)||v,v=this.map.pageSetUpPr.render(u,g.pageSetup)||v,v=this.map.outlinePr.render(u,g.outlineProperties)||v,v?(u.closeNode(),u.commit()):u.rollback()}}parseOpen(u){return this.parser?(this.parser.parseOpen(u),!0):u.name===this.tag?(this.reset(),!0):!!this.map[u.name]&&(this.parser=this.map[u.name],this.parser.parseOpen(u),!0)}parseText(u){return!!this.parser&&(this.parser.parseText(u),!0)}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../base-xform");function c(u,g){return u?g:void 0}function d(u,g){return u===g||void 0}a.exports=class extends n{get tag(){return"sheetProtection"}render(u,g){if(g){let v={sheet:c(g.sheet,"1"),selectLockedCells:g.selectLockedCells===!1?"1":void 0,selectUnlockedCells:g.selectUnlockedCells===!1?"1":void 0,formatCells:c(g.formatCells,"0"),formatColumns:c(g.formatColumns,"0"),formatRows:c(g.formatRows,"0"),insertColumns:c(g.insertColumns,"0"),insertRows:c(g.insertRows,"0"),insertHyperlinks:c(g.insertHyperlinks,"0"),deleteColumns:c(g.deleteColumns,"0"),deleteRows:c(g.deleteRows,"0"),sort:c(g.sort,"0"),autoFilter:c(g.autoFilter,"0"),pivotTables:c(g.pivotTables,"0")};g.sheet&&(v.algorithmName=g.algorithmName,v.hashValue=g.hashValue,v.saltValue=g.saltValue,v.spinCount=g.spinCount,v.objects=c(g.objects===!1,"1"),v.scenarios=c(g.scenarios===!1,"1")),o.some(v,C=>C!==void 0)&&u.leafNode(this.tag,v)}}parseOpen(u){switch(u.name){case this.tag:return this.model={sheet:d(u.attributes.sheet,"1"),objects:u.attributes.objects!=="1"&&void 0,scenarios:u.attributes.scenarios!=="1"&&void 0,selectLockedCells:u.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:u.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:d(u.attributes.formatCells,"0"),formatColumns:d(u.attributes.formatColumns,"0"),formatRows:d(u.attributes.formatRows,"0"),insertColumns:d(u.attributes.insertColumns,"0"),insertRows:d(u.attributes.insertRows,"0"),insertHyperlinks:d(u.attributes.insertHyperlinks,"0"),deleteColumns:d(u.attributes.deleteColumns,"0"),deleteRows:d(u.attributes.deleteRows,"0"),sort:d(u.attributes.sort,"0"),autoFilter:d(u.attributes.autoFilter,"0"),pivotTables:d(u.attributes.pivotTables,"0")},u.attributes.algorithmName&&(this.model.algorithmName=u.attributes.algorithmName,this.model.hashValue=u.attributes.hashValue,this.model.saltValue=u.attributes.saltValue,this.model.spinCount=parseInt(u.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,a,t){"use strict";let o=e("../../../utils/col-cache"),n=e("../base-xform"),c={frozen:"frozen",frozenSplit:"frozen",split:"split"};a.exports=class extends n{get tag(){return"sheetView"}prepare(d){switch(d.state){case"frozen":case"split":break;default:d.state="normal"}}render(d,u){d.openNode("sheetView",{workbookViewId:u.workbookViewId||0});let g=function(T,w,I){I&&d.addAttribute(T,w)},v,C,b,P;switch(g("rightToLeft","1",u.rightToLeft===!0),g("tabSelected","1",u.tabSelected),g("showRuler","0",u.showRuler===!1),g("showRowColHeaders","0",u.showRowColHeaders===!1),g("showGridLines","0",u.showGridLines===!1),g("zoomScale",u.zoomScale,u.zoomScale),g("zoomScaleNormal",u.zoomScaleNormal,u.zoomScaleNormal),g("view",u.style,u.style),u.state){case"frozen":C=u.xSplit||0,b=u.ySplit||0,v=u.topLeftCell||o.getAddress(b+1,C+1).address,P=(u.xSplit&&u.ySplit?"bottomRight":u.xSplit&&"topRight")||"bottomLeft",d.leafNode("pane",{xSplit:u.xSplit||void 0,ySplit:u.ySplit||void 0,topLeftCell:v,activePane:P,state:"frozen"}),d.leafNode("selection",{pane:P,activeCell:u.activeCell,sqref:u.activeCell});break;case"split":u.activePane==="topLeft"&&(u.activePane=void 0),d.leafNode("pane",{xSplit:u.xSplit||void 0,ySplit:u.ySplit||void 0,topLeftCell:u.topLeftCell,activePane:u.activePane}),d.leafNode("selection",{pane:u.activePane,activeCell:u.activeCell,sqref:u.activeCell});break;case"normal":u.activeCell&&d.leafNode("selection",{activeCell:u.activeCell,sqref:u.activeCell})}d.closeNode()}parseOpen(d){switch(d.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(d.attributes.workbookViewId,10),rightToLeft:d.attributes.rightToLeft==="1",tabSelected:d.attributes.tabSelected==="1",showRuler:d.attributes.showRuler!=="0",showRowColHeaders:d.attributes.showRowColHeaders!=="0",showGridLines:d.attributes.showGridLines!=="0",zoomScale:parseInt(d.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(d.attributes.zoomScaleNormal||"100",10),style:d.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(d.attributes.xSplit||"0",10),ySplit:parseInt(d.attributes.ySplit||"0",10),topLeftCell:d.attributes.topLeftCell,activePane:d.attributes.activePane||"topLeft",state:d.attributes.state},!0;case"selection":{let u=d.attributes.pane||"topLeft";return this.selections[u]={pane:u,activeCell:d.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(d){let u,g;switch(d){case"sheetView":return this.sheetView&&this.pane?(u=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:c[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(u.activePane=this.pane.activePane),g=this.selections[this.pane.activePane],g&&g.activeCell&&(u.activeCell=g.activeCell),this.sheetView.style&&(u.style=this.sheetView.style)):(u=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},g=this.selections.topLeft,g&&g.activeCell&&(u.activeCell=g.activeCell),this.sheetView.style&&(u.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"tablePart"}render(n,c){c&&n.leafNode(this.tag,{"r:id":c.rId})}parseOpen(n){switch(n.name){case this.tag:return this.model={rId:n.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../../../utils/col-cache"),c=e("../../../utils/xml-stream"),d=e("../../rel-type"),u=e("./merges"),g=e("../base-xform"),v=e("../list-xform"),C=e("./row-xform"),b=e("./col-xform"),P=e("./dimension-xform"),T=e("./hyperlink-xform"),w=e("./merge-cell-xform"),I=e("./data-validations-xform"),E=e("./sheet-properties-xform"),R=e("./sheet-format-properties-xform"),G=e("./sheet-view-xform"),U=e("./sheet-protection-xform"),Z=e("./page-margins-xform"),he=e("./page-setup-xform"),re=e("./print-options-xform"),pe=e("./auto-filter-xform"),de=e("./picture-xform"),be=e("./drawing-xform"),ue=e("./table-part-xform"),j=e("./row-breaks-xform"),Q=e("./header-footer-xform"),le=e("./cf/conditional-formattings-xform"),O=e("./ext-lst-xform"),k=(N,H)=>{if(!H||!H.length)return N;if(!N||!N.length)return H;let $={},ne={};return N.forEach(xe=>{$[xe.ref]=xe,xe.rules.forEach(ye=>{let{x14Id:Le}=ye;Le&&(ne[Le]=ye)})}),H.forEach(xe=>{xe.rules.forEach(ye=>{let Le=ne[ye.x14Id];Le?((ee,Ae)=>{Object.keys(Ae).forEach(X=>{let W=ee[X],_e=Ae[X];W===void 0&&_e!==void 0&&(ee[X]=_e)})})(Le,ye):$[xe.ref]?$[xe.ref].rules.push(ye):N.push({ref:xe.ref,rules:[ye]})})}),N};class L extends g{constructor(H){super();let{maxRows:$,maxCols:ne,ignoreNodes:xe}=H||{};this.ignoreNodes=xe||[],this.map={sheetPr:new E,dimension:new P,sheetViews:new v({tag:"sheetViews",count:!1,childXform:new G}),sheetFormatPr:new R,cols:new v({tag:"cols",count:!1,childXform:new b}),sheetData:new v({tag:"sheetData",count:!1,empty:!0,childXform:new C({maxItems:ne}),maxItems:$}),autoFilter:new pe,mergeCells:new v({tag:"mergeCells",count:!0,childXform:new w}),rowBreaks:new j,hyperlinks:new v({tag:"hyperlinks",count:!1,childXform:new T}),pageMargins:new Z,dataValidations:new I,pageSetup:new he,headerFooter:new Q,printOptions:new re,picture:new de,drawing:new be,sheetProtection:new U,tableParts:new v({tag:"tableParts",count:!0,childXform:new ue}),conditionalFormatting:new le,extLst:new O}}prepare(H,$){$.merges=new u,H.hyperlinks=$.hyperlinks=[],H.comments=$.comments=[],$.formulae={},$.siFormulae=0,this.map.cols.prepare(H.cols,$),this.map.sheetData.prepare(H.rows,$),this.map.conditionalFormatting.prepare(H.conditionalFormattings,$),H.mergeCells=$.merges.mergeCells;let ne=H.rels=[];function xe(ee){return"rId"+(ee.length+1)}if(H.hyperlinks.forEach(ee=>{let Ae=xe(ne);ee.rId=Ae,ne.push({Id:Ae,Type:d.Hyperlink,Target:ee.target,TargetMode:"External"})}),H.comments.length>0){let ee={Id:xe(ne),Type:d.Comments,Target:`../comments${H.id}.xml`};ne.push(ee);let Ae={Id:xe(ne),Type:d.VmlDrawing,Target:`../drawings/vmlDrawing${H.id}.vml`};ne.push(Ae),H.comments.forEach(X=>{X.refAddress=n.decodeAddress(X.ref)}),$.commentRefs.push({commentName:"comments"+H.id,vmlDrawing:"vmlDrawing"+H.id})}let ye=[],Le;H.media.forEach(ee=>{if(ee.type==="background"){let Ae=xe(ne);Le=$.media[ee.imageId],ne.push({Id:Ae,Type:d.Image,Target:`../media/${Le.name}.${Le.extension}`}),H.background={rId:Ae},H.image=$.media[ee.imageId]}else if(ee.type==="image"){let{drawing:Ae}=H;Le=$.media[ee.imageId],Ae||(Ae=H.drawing={rId:xe(ne),name:"drawing"+ ++$.drawingsCount,anchors:[],rels:[]},$.drawings.push(Ae),ne.push({Id:Ae.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${Ae.name}.xml`}));let X=this.preImageId===ee.imageId?ye[ee.imageId]:ye[Ae.rels.length];X||(X=xe(Ae.rels),ye[Ae.rels.length]=X,Ae.rels.push({Id:X,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${Le.name}.${Le.extension}`}));let W={picture:{rId:X},range:ee.range};if(ee.hyperlinks&&ee.hyperlinks.hyperlink){let _e=xe(Ae.rels);ye[Ae.rels.length]=_e,W.picture.hyperlinks={tooltip:ee.hyperlinks.tooltip,rId:_e},Ae.rels.push({Id:_e,Type:d.Hyperlink,Target:ee.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=ee.imageId,Ae.anchors.push(W)}}),H.tables.forEach(ee=>{let Ae=xe(ne);ee.rId=Ae,ne.push({Id:Ae,Type:d.Table,Target:"../tables/"+ee.target}),ee.columns.forEach(X=>{let{style:W}=X;W&&(X.dxfId=$.styles.addDxfStyle(W))})}),this.map.extLst.prepare(H,$)}render(H,$){H.openXml(c.StdDocAttributes),H.openNode("worksheet",L.WORKSHEET_ATTRIBUTES);let ne=$.properties?{defaultRowHeight:$.properties.defaultRowHeight,dyDescent:$.properties.dyDescent,outlineLevelCol:$.properties.outlineLevelCol,outlineLevelRow:$.properties.outlineLevelRow}:void 0;$.properties&&$.properties.defaultColWidth&&(ne.defaultColWidth=$.properties.defaultColWidth);let xe={outlineProperties:$.properties&&$.properties.outlineProperties,tabColor:$.properties&&$.properties.tabColor,pageSetup:$.pageSetup&&$.pageSetup.fitToPage?{fitToPage:$.pageSetup.fitToPage}:void 0},ye=$.pageSetup&&$.pageSetup.margins,Le={showRowColHeaders:$.pageSetup&&$.pageSetup.showRowColHeaders,showGridLines:$.pageSetup&&$.pageSetup.showGridLines,horizontalCentered:$.pageSetup&&$.pageSetup.horizontalCentered,verticalCentered:$.pageSetup&&$.pageSetup.verticalCentered},ee=$.sheetProtection;this.map.sheetPr.render(H,xe),this.map.dimension.render(H,$.dimensions),this.map.sheetViews.render(H,$.views),this.map.sheetFormatPr.render(H,ne),this.map.cols.render(H,$.cols),this.map.sheetData.render(H,$.rows),this.map.sheetProtection.render(H,ee),this.map.autoFilter.render(H,$.autoFilter),this.map.mergeCells.render(H,$.mergeCells),this.map.conditionalFormatting.render(H,$.conditionalFormattings),this.map.dataValidations.render(H,$.dataValidations),this.map.hyperlinks.render(H,$.hyperlinks),this.map.printOptions.render(H,Le),this.map.pageMargins.render(H,ye),this.map.pageSetup.render(H,$.pageSetup),this.map.headerFooter.render(H,$.headerFooter),this.map.rowBreaks.render(H,$.rowBreaks),this.map.drawing.render(H,$.drawing),this.map.picture.render(H,$.background),this.map.tableParts.render(H,$.tables),this.map.extLst.render(H,$),$.rels&&$.rels.forEach(Ae=>{Ae.Type===d.VmlDrawing&&H.leafNode("legacyDrawing",{"r:id":Ae.Id})}),H.closeNode()}parseOpen(H){return this.parser?(this.parser.parseOpen(H),!0):H.name==="worksheet"?(o.each(this.map,$=>{$.reset()}),!0):(this.map[H.name]&&!this.ignoreNodes.includes(H.name)&&(this.parser=this.map[H.name],this.parser.parseOpen(H)),!0)}parseText(H){this.parser&&this.parser.parseText(H)}parseClose(H){if(this.parser)return this.parser.parseClose(H)||(this.parser=void 0),!0;switch(H){case"worksheet":{let $=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&($.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&($.outlineProperties=this.map.sheetPr.model.outlineProperties);let ne={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},xe=Object.assign(ne,this.map.pageSetup.model,this.map.printOptions.model),ye=k(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:$,views:this.map.sheetViews.model,pageSetup:xe,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:ye},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(H,$){let ne=(H.relationships||[]).reduce((ye,Le)=>{if(ye[Le.Id]=Le,Le.Type===d.Comments&&(H.comments=$.comments[Le.Target].comments),Le.Type===d.VmlDrawing&&H.comments&&H.comments.length){let ee=$.vmlDrawings[Le.Target].comments;H.comments.forEach((Ae,X)=>{Ae.note=Object.assign({},Ae.note,ee[X])})}return ye},{});if($.commentsMap=(H.comments||[]).reduce((ye,Le)=>(Le.ref&&(ye[Le.ref]=Le),ye),{}),$.hyperlinkMap=(H.hyperlinks||[]).reduce((ye,Le)=>(Le.rId&&(ye[Le.address]=ne[Le.rId].Target),ye),{}),$.formulae={},H.rows=H.rows&&H.rows.filter(Boolean)||[],H.rows.forEach(ye=>{ye.cells=ye.cells&&ye.cells.filter(Boolean)||[]}),this.map.cols.reconcile(H.cols,$),this.map.sheetData.reconcile(H.rows,$),this.map.conditionalFormatting.reconcile(H.conditionalFormattings,$),H.media=[],H.drawing){let ye=ne[H.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(ye){let Le=ye[1];$.drawings[Le].anchors.forEach(ee=>{if(ee.medium){let Ae={type:"image",imageId:ee.medium.index,range:ee.range,hyperlinks:ee.picture.hyperlinks};H.media.push(Ae)}})}}let xe=H.background&&ne[H.background.rId];if(xe){let ye=xe.Target.split("/media/")[1],Le=$.mediaIndex&&$.mediaIndex[ye];Le!==void 0&&H.media.push({type:"background",imageId:Le})}H.tables=(H.tables||[]).map(ye=>{let Le=ne[ye.rId];return $.tables[Le.Target]}),delete H.relationships,delete H.hyperlinks,delete H.comments}}L.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},a.exports=L},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.attr=n.attr}render(n,c){c&&(n.openNode(this.tag),n.closeNode())}parseOpen(n){n.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.attr=n.attr,this.attrs=n.attrs,this._format=n.format||function(c){try{return Number.isNaN(c.getTime())?"":c.toISOString()}catch{return""}},this._parse=n.parse||function(c){return new Date(c)}}render(n,c){c&&(n.openNode(this.tag),this.attrs&&n.addAttributes(this.attrs),this.attr?n.addAttribute(this.attr,this._format(c)):n.writeText(this._format(c)),n.closeNode())}parseOpen(n){n.name===this.tag&&(this.attr?this.model=this._parse(n.attributes[this.attr]):this.text=[])}parseText(n){this.attr||this.text.push(n)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.attr=n.attr,this.attrs=n.attrs,this.zero=n.zero}render(n,c){(c||this.zero)&&(n.openNode(this.tag),this.attrs&&n.addAttributes(this.attrs),this.attr?n.addAttribute(this.attr,c):n.writeText(c),n.closeNode())}parseOpen(n){return n.name===this.tag&&(this.attr?this.model=parseInt(n.attributes[this.attr],10):this.text=[],!0)}parseText(n){this.attr||this.text.push(n)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{constructor(n){super(),this.tag=n.tag,this.attr=n.attr,this.attrs=n.attrs}render(n,c){c!==void 0&&(n.openNode(this.tag),this.attrs&&n.addAttributes(this.attrs),this.attr?n.addAttribute(this.attr,c):n.writeText(c),n.closeNode())}parseOpen(n){n.name===this.tag&&(this.attr?this.model=n.attributes[this.attr]:this.text=[])}parseText(n){this.attr||this.text.push(n)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,a,t){"use strict";let o=e("./base-xform"),n=e("../../utils/xml-stream");a.exports=class extends o{constructor(c){super(),this._model=c}render(c){if(!this._xml){let d=new n;(function u(g,v){g.openNode(v.tag,v.$),v.c&&v.c.forEach(C=>{u(g,C)}),v.t&&g.writeText(v.t),g.closeNode()})(d,this._model),this._xml=d.xml}c.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(c){switch(c){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,a,t){"use strict";let o=e("./text-xform"),n=e("./rich-text-xform"),c=e("../base-xform");a.exports=class extends c{constructor(){super(),this.map={r:new n,t:new o}}get tag(){return"rPh"}render(d,u){if(d.openNode(this.tag,{sb:u.sb||0,eb:u.eb||0}),u&&u.hasOwnProperty("richText")&&u.richText){let{r:g}=this.map;u.richText.forEach(v=>{g.render(d,v)})}else u&&this.map.t.render(d,u.text);d.closeNode()}parseOpen(d){let{name:u}=d;return this.parser?(this.parser.parseOpen(d),!0):u===this.tag?(this.model={sb:parseInt(d.attributes.sb,10),eb:parseInt(d.attributes.eb,10)},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(d),!0))}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser){if(!this.parser.parseClose(d)){switch(d){case"r":{let u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(d){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,a,t){"use strict";let o=e("./text-xform"),n=e("../style/font-xform"),c=e("../base-xform");class d extends c{constructor(g){super(),this.model=g}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new o)}get fontXform(){return this._fontXform||(this._fontXform=new n(d.FONT_OPTIONS))}render(g,v){v=v||this.model,g.openNode("r"),v.font&&this.fontXform.render(g,v.font),this.textXform.render(g,v.text),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(g),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(g),!0;default:return!1}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){switch(g){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(g),!0}}}d.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},a.exports=d},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,a,t){"use strict";let o=e("./text-xform"),n=e("./rich-text-xform"),c=e("./phonetic-text-xform"),d=e("../base-xform");a.exports=class extends d{constructor(u){super(),this.model=u,this.map={r:new n,t:new o,rPh:new c}}get tag(){return"si"}render(u,g){u.openNode(this.tag),g&&g.hasOwnProperty("richText")&&g.richText?g.richText.length?g.richText.forEach(v=>{this.map.r.render(u,v)}):this.map.t.render(u,""):g!=null&&this.map.t.render(u,g),u.closeNode()}parseOpen(u){let{name:g}=u;return this.parser?(this.parser.parseOpen(u),!0):g===this.tag?(this.model={},!0):(this.parser=this.map[g],!!this.parser&&(this.parser.parseOpen(u),!0))}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser){if(!this.parser.parseClose(u)){switch(u){case"r":{let g=this.model.richText;g||(g=this.model.richText=[]),g.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(u){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform"),c=e("./shared-string-xform");a.exports=class extends n{constructor(d){super(),this.model=d||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new c)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(d){return this.model.values[d]}add(d){return d.richText?this.addRichText(d):this.addText(d)}addText(d){let u=this.hash[d];return u===void 0&&(u=this.hash[d]=this.model.values.length,this.model.values.push(d)),this.model.count++,u}addRichText(d){let u=this.sharedStringXform.toXml(d),g=this.rich[u];return g===void 0&&(g=this.rich[u]=this.model.values.length,this.model.values.push(d)),this.model.count++,g}render(d,u){u=u||this._values,d.openXml(o.StdDocAttributes),d.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:u.count,uniqueCount:u.values.length});let g=this.sharedStringXform;u.values.forEach(v=>{g.render(d,v)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(d),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(d))}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(d){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+d)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"t"}render(n,c){n.openNode("t"),/^\s|\n|\s$/.test(c)&&n.addAttribute("xml:space","preserve"),n.writeText(c),n.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(n,c)=>String.fromCharCode(parseInt(c,16)))}parseOpen(n){switch(n.name){case"t":return this._text=[],!0;default:return!1}}parseText(n){this._text.push(n)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,a,t){"use strict";let o=e("../../../doc/enums"),n=e("../../../utils/utils"),c=e("../base-xform"),d={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((g,v)=>(g[v]=!0,g),{}),horizontal(g){return this.horizontalValues[g]?g:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((g,v)=>(g[v]=!0,g),{}),vertical(g){return g==="middle"?"center":this.verticalValues[g]?g:void 0},wrapText:g=>!!g||void 0,shrinkToFit:g=>!!g||void 0,textRotation(g){switch(g){case"vertical":return g;default:return(g=n.validInt(g))>=-90&&g<=90?g:void 0}},indent:g=>(g=n.validInt(g),Math.max(0,g)),readingOrder(g){switch(g){case"ltr":return o.ReadingOrder.LeftToRight;case"rtl":return o.ReadingOrder.RightToLeft;default:return}}},u={toXml(g){if(g=d.textRotation(g)){if(g==="vertical")return 255;let v=Math.round(g);if(v>=0&&v<=90)return v;if(v<0&&v>=-90)return 90-v}},toModel(g){let v=n.validInt(g);if(v!==void 0){if(v===255)return"vertical";if(v>=0&&v<=90)return v;if(v>90&&v<=180)return 90-v}}};a.exports=class extends c{get tag(){return"alignment"}render(g,v){g.addRollback(),g.openNode("alignment");let C=!1;function b(P,T){T&&(g.addAttribute(P,T),C=!0)}b("horizontal",d.horizontal(v.horizontal)),b("vertical",d.vertical(v.vertical)),b("wrapText",!!d.wrapText(v.wrapText)&&"1"),b("shrinkToFit",!!d.shrinkToFit(v.shrinkToFit)&&"1"),b("indent",d.indent(v.indent)),b("textRotation",u.toXml(v.textRotation)),b("readingOrder",d.readingOrder(v.readingOrder)),g.closeNode(),C?g.commit():g.rollback()}parseOpen(g){let v={},C=!1;function b(P,T,w){P&&(v[T]=w,C=!0)}b(g.attributes.horizontal,"horizontal",g.attributes.horizontal),b(g.attributes.vertical,"vertical",g.attributes.vertical==="center"?"middle":g.attributes.vertical),b(g.attributes.wrapText,"wrapText",n.parseBoolean(g.attributes.wrapText)),b(g.attributes.shrinkToFit,"shrinkToFit",n.parseBoolean(g.attributes.shrinkToFit)),b(g.attributes.indent,"indent",parseInt(g.attributes.indent,10)),b(g.attributes.textRotation,"textRotation",u.toModel(g.attributes.textRotation)),b(g.attributes.readingOrder,"readingOrder",g.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=C?v:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../../../utils/utils"),c=e("./color-xform");class d extends o{constructor(g){super(),this.name=g,this.map={color:new c}}get tag(){return this.name}render(g,v,C){let b=v&&v.color||C||this.defaultColor;g.openNode(this.name),v&&v.style&&(g.addAttribute("style",v.style),b&&this.map.color.render(g,b)),g.closeNode()}parseOpen(g){if(this.parser)return this.parser.parseOpen(g),!0;switch(g.name){case this.name:{let{style:v}=g.attributes;return this.model=v?{style:v}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(g),!0;default:return!1}}parseText(g){this.parser&&this.parser.parseText(g)}parseClose(g){return this.parser?(this.parser.parseClose(g)||(this.parser=void 0),!0):(g===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(g){return d.validStyleValues[g]}}d.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((u,g)=>(u[g]=!0,u),{}),a.exports=class extends o{constructor(){super(),this.map={top:new d("top"),left:new d("left"),bottom:new d("bottom"),right:new d("right"),diagonal:new d("diagonal")}}render(u,g){let{color:v}=g;function C(b,P){b&&!b.color&&g.color&&(b=qt(rt({},b),{color:g.color})),P.render(u,b,v)}u.openNode("border"),g.diagonal&&g.diagonal.style&&(g.diagonal.up&&u.addAttribute("diagonalUp","1"),g.diagonal.down&&u.addAttribute("diagonalDown","1")),C(g.left,this.map.left),C(g.right,this.map.right),C(g.top,this.map.top),C(g.bottom,this.map.bottom),C(g.diagonal,this.map.diagonal),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"border":return this.reset(),this.diagonalUp=n.parseBoolean(u.attributes.diagonalUp),this.diagonalDown=n.parseBoolean(u.attributes.diagonalDown),!0;default:return this.parser=this.map[u.name],!!this.parser&&(this.parser.parseOpen(u),!0)}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;if(u==="border"){let g=this.model={},v=function(C,b,P){b&&(P&&Object.assign(b,P),g[C]=b)};v("left",this.map.left.model),v("right",this.map.right.model),v("top",this.map.top.model),v("bottom",this.map.bottom.model),v("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{constructor(n){super(),this.name=n||"color"}get tag(){return this.name}render(n,c){return!!c&&(n.openNode(this.name),c.argb?n.addAttribute("rgb",c.argb):c.theme!==void 0?(n.addAttribute("theme",c.theme),c.tint!==void 0&&n.addAttribute("tint",c.tint)):c.indexed!==void 0?n.addAttribute("indexed",c.indexed):n.addAttribute("auto","1"),n.closeNode(),!0)}parseOpen(n){return n.name===this.name&&(n.attributes.rgb?this.model={argb:n.attributes.rgb}:n.attributes.theme?(this.model={theme:parseInt(n.attributes.theme,10)},n.attributes.tint&&(this.model.tint=parseFloat(n.attributes.tint))):n.attributes.indexed?this.model={indexed:parseInt(n.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./alignment-xform"),c=e("./border-xform"),d=e("./fill-xform"),u=e("./font-xform"),g=e("./numfmt-xform"),v=e("./protection-xform");a.exports=class extends o{constructor(){super(),this.map={alignment:new n,border:new c,fill:new d,font:new u,numFmt:new g,protection:new v}}get tag(){return"dxf"}render(C,b){if(C.openNode(this.tag),b.font&&this.map.font.render(C,b.font),b.numFmt&&b.numFmtId){let P={id:b.numFmtId,formatCode:b.numFmt};this.map.numFmt.render(C,P)}b.fill&&this.map.fill.render(C,b.fill),b.alignment&&this.map.alignment.render(C,b.alignment),b.border&&this.map.border.render(C,b.border),b.protection&&this.map.protection.render(C,b.protection),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[C.name],this.parser&&this.parser.parseOpen(C),!0}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return this.parser?(this.parser.parseClose(C)||(this.parser=void 0),!0):C!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./color-xform");class c extends o{constructor(){super(),this.map={color:new n}}get tag(){return"stop"}render(C,b){C.openNode("stop"),C.addAttribute("position",b.position),this.map.color.render(C,b.color),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"stop":return this.model={position:parseFloat(C.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(C),!0;default:return!1}}parseText(){}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class d extends o{constructor(){super(),this.map={fgColor:new n("fgColor"),bgColor:new n("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(C,b){C.openNode("patternFill"),C.addAttribute("patternType",b.pattern),b.fgColor&&this.map.fgColor.render(C,b.fgColor),b.bgColor&&this.map.bgColor.render(C,b.bgColor),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"patternFill":return this.model={type:"pattern",pattern:C.attributes.patternType},!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.parser.model&&(this.model[C]=this.parser.model),this.parser=void 0),!0)}}class u extends o{constructor(){super(),this.map={stop:new c}}get name(){return"gradient"}get tag(){return"gradientFill"}render(C,b){switch(C.openNode("gradientFill"),b.gradient){case"angle":C.addAttribute("degree",b.degree);break;case"path":C.addAttribute("type","path"),b.center.left&&(C.addAttribute("left",b.center.left),b.center.right===void 0&&C.addAttribute("right",b.center.left)),b.center.right&&C.addAttribute("right",b.center.right),b.center.top&&(C.addAttribute("top",b.center.top),b.center.bottom===void 0&&C.addAttribute("bottom",b.center.top)),b.center.bottom&&C.addAttribute("bottom",b.center.bottom)}let P=this.map.stop;b.stops.forEach(T=>{P.render(C,T)}),C.closeNode()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"gradientFill":{let b=this.model={stops:[]};return C.attributes.degree?(b.gradient="angle",b.degree=parseInt(C.attributes.degree,10)):C.attributes.type==="path"&&(b.gradient="path",b.center={left:C.attributes.left?parseFloat(C.attributes.left):0,top:C.attributes.top?parseFloat(C.attributes.top):0},C.attributes.right!==C.attributes.left&&(b.center.right=C.attributes.right?parseFloat(C.attributes.right):0),C.attributes.bottom!==C.attributes.top&&(b.center.bottom=C.attributes.bottom?parseFloat(C.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(C),!0;default:return!1}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class g extends o{constructor(){super(),this.map={patternFill:new d,gradientFill:new u}}get tag(){return"fill"}render(C,b){switch(C.addRollback(),C.openNode("fill"),b.type){case"pattern":this.map.patternFill.render(C,b);break;case"gradient":this.map.gradientFill.render(C,b);break;default:return void C.rollback()}C.closeNode(),C.commit()}parseOpen(C){if(this.parser)return this.parser.parseOpen(C),!0;switch(C.name){case"fill":return this.model={},!0;default:return this.parser=this.map[C.name],!!this.parser&&(this.parser.parseOpen(C),!0)}}parseText(C){this.parser&&this.parser.parseText(C)}parseClose(C){return!!this.parser&&(this.parser.parseClose(C)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(C){return g.validPatternValues[C]}}g.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((v,C)=>(v[C]=!0,v),{}),g.StopXform=c,g.PatternFillXform=d,g.GradientFillXform=u,a.exports=g},{"../base-xform":32,"./color-xform":128}],131:[function(e,a,t){"use strict";let o=e("./color-xform"),n=e("../simple/boolean-xform"),c=e("../simple/integer-xform"),d=e("../simple/string-xform"),u=e("./underline-xform"),g=e("../../../utils/under-dash"),v=e("../base-xform");class C extends v{constructor(P){super(),this.options=P||C.OPTIONS,this.map={b:{prop:"bold",xform:new n({tag:"b",attr:"val"})},i:{prop:"italic",xform:new n({tag:"i",attr:"val"})},u:{prop:"underline",xform:new u},charset:{prop:"charset",xform:new c({tag:"charset",attr:"val"})},color:{prop:"color",xform:new o},condense:{prop:"condense",xform:new n({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new n({tag:"extend",attr:"val"})},family:{prop:"family",xform:new c({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new n({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new d({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new d({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new n({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new n({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new c({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new d({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(P,T){let{map:w}=this;P.openNode(this.options.tagName),g.each(this.map,(I,E)=>{w[E].xform.render(P,T[I.prop])}),P.closeNode()}parseOpen(P){if(this.parser)return this.parser.parseOpen(P),!0;if(this.map[P.name])return this.parser=this.map[P.name].xform,this.parser.parseOpen(P);switch(P.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(P){this.parser&&this.parser.parseText(P)}parseClose(P){if(this.parser&&!this.parser.parseClose(P)){let T=this.map[P];return this.parser.model&&(this.model[T.prop]=this.parser.model),this.parser=void 0,!0}switch(P){case this.options.tagName:return!1;default:return!0}}}C.OPTIONS={tagName:"font",fontNameTag:"name"},a.exports=C},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(e,a,t){"use strict";let o=e("../../../utils/under-dash"),n=e("../../defaultnumformats"),c=e("../base-xform"),d=(function(){let g={};return o.each(n,(v,C)=>{v.f&&(g[v.f]=parseInt(C,10))}),g})();class u extends c{constructor(v,C){super(),this.id=v,this.formatCode=C}get tag(){return"numFmt"}render(v,C){v.leafNode("numFmt",{numFmtId:C.id,formatCode:C.formatCode})}parseOpen(v){switch(v.name){case"numFmt":return this.model={id:parseInt(v.attributes.numFmtId,10),formatCode:v.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}u.getDefaultFmtId=function(g){return d[g]},u.getDefaultFmtCode=function(g){return n[g]&&n[g].f},a.exports=u},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,a,t){"use strict";let o=e("../base-xform"),n={boolean:(c,d)=>c===void 0?d:c};a.exports=class extends o{get tag(){return"protection"}render(c,d){c.addRollback(),c.openNode("protection");let u=!1;function g(v,C){C!==void 0&&(c.addAttribute(v,C),u=!0)}g("locked",n.boolean(d.locked,!0)?void 0:"0"),g("hidden",n.boolean(d.hidden,!1)?"1":void 0),c.closeNode(),u?c.commit():c.rollback()}parseOpen(c){let d={locked:c.attributes.locked!=="0",hidden:c.attributes.hidden==="1"},u=!d.locked||d.hidden;this.model=u?d:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./alignment-xform"),c=e("./protection-xform");a.exports=class extends o{constructor(d){super(),this.xfId=!(!d||!d.xfId),this.map={alignment:new n,protection:new c}}get tag(){return"xf"}render(d,u){d.openNode("xf",{numFmtId:u.numFmtId||0,fontId:u.fontId||0,fillId:u.fillId||0,borderId:u.borderId||0}),this.xfId&&d.addAttribute("xfId",u.xfId||0),u.numFmtId&&d.addAttribute("applyNumberFormat","1"),u.fontId&&d.addAttribute("applyFont","1"),u.fillId&&d.addAttribute("applyFill","1"),u.borderId&&d.addAttribute("applyBorder","1"),u.alignment&&d.addAttribute("applyAlignment","1"),u.protection&&d.addAttribute("applyProtection","1"),u.alignment&&this.map.alignment.render(d,u.alignment),u.protection&&this.map.protection.render(d,u.protection),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"xf":return this.model={numFmtId:parseInt(d.attributes.numFmtId,10),fontId:parseInt(d.attributes.fontId,10),fillId:parseInt(d.attributes.fillId,10),borderId:parseInt(d.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(d.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(d),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return this.parser?(this.parser.parseClose(d)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):d!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,a,t){"use strict";let o=e("../../../doc/enums"),n=e("../../../utils/xml-stream"),c=e("../base-xform"),d=e("../static-xform"),u=e("../list-xform"),g=e("./font-xform"),v=e("./fill-xform"),C=e("./border-xform"),b=e("./numfmt-xform"),P=e("./style-xform"),T=e("./dxf-xform");class w extends c{constructor(E){super(),this.map={numFmts:new u({tag:"numFmts",count:!0,childXform:new b}),fonts:new u({tag:"fonts",count:!0,childXform:new g,$:{"x14ac:knownFonts":1}}),fills:new u({tag:"fills",count:!0,childXform:new v}),borders:new u({tag:"borders",count:!0,childXform:new C}),cellStyleXfs:new u({tag:"cellStyleXfs",count:!0,childXform:new P}),cellXfs:new u({tag:"cellXfs",count:!0,childXform:new P({xfId:!0})}),dxfs:new u({tag:"dxfs",always:!0,count:!0,childXform:new T}),numFmt:new b,font:new g,fill:new v,border:new C,style:new P({xfId:!0}),cellStyles:w.STATIC_XFORMS.cellStyles,tableStyles:w.STATIC_XFORMS.tableStyles,extLst:w.STATIC_XFORMS.extLst},E&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(E,R){R=R||this.model,E.openXml(n.StdDocAttributes),E.openNode("styleSheet",w.STYLESHEET_ATTRIBUTES),this.index?(R.numFmts&&R.numFmts.length&&(E.openNode("numFmts",{count:R.numFmts.length}),R.numFmts.forEach(G=>{E.writeXml(G)}),E.closeNode()),R.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),E.openNode("fonts",{count:R.fonts.length,"x14ac:knownFonts":1}),R.fonts.forEach(G=>{E.writeXml(G)}),E.closeNode(),E.openNode("fills",{count:R.fills.length}),R.fills.forEach(G=>{E.writeXml(G)}),E.closeNode(),E.openNode("borders",{count:R.borders.length}),R.borders.forEach(G=>{E.writeXml(G)}),E.closeNode(),this.map.cellStyleXfs.render(E,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),E.openNode("cellXfs",{count:R.styles.length}),R.styles.forEach(G=>{E.writeXml(G)}),E.closeNode()):(this.map.numFmts.render(E,R.numFmts),this.map.fonts.render(E,R.fonts),this.map.fills.render(E,R.fills),this.map.borders.render(E,R.borders),this.map.cellStyleXfs.render(E,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(E,R.styles)),w.STATIC_XFORMS.cellStyles.render(E),this.map.dxfs.render(E,R.dxfs),w.STATIC_XFORMS.tableStyles.render(E),w.STATIC_XFORMS.extLst.render(E),E.closeNode()}parseOpen(E){if(this.parser)return this.parser.parseOpen(E),!0;switch(E.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[E.name],this.parser&&this.parser.parseOpen(E),!0}}parseText(E){this.parser&&this.parser.parseText(E)}parseClose(E){if(this.parser)return this.parser.parseClose(E)||(this.parser=void 0),!0;switch(E){case"styleSheet":{this.model={};let R=(G,U)=>{U.model&&U.model.length&&(this.model[G]=U.model)};if(R("numFmts",this.map.numFmts),R("fonts",this.map.fonts),R("fills",this.map.fills),R("borders",this.map.borders),R("styles",this.map.cellXfs),R("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let G=this.index.numFmt;this.model.numFmts.forEach(U=>{G[U.id]=U.formatCode})}return!1}default:return!0}}addStyleModel(E,R){if(!E)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(E))return this.weakMap.get(E);let G={};if(R=R||o.ValueType.Number,E.numFmt)G.numFmtId=this._addNumFmtStr(E.numFmt);else switch(R){case o.ValueType.Number:G.numFmtId=this._addNumFmtStr("General");break;case o.ValueType.Date:G.numFmtId=this._addNumFmtStr("mm-dd-yy")}E.font&&(G.fontId=this._addFont(E.font)),E.border&&(G.borderId=this._addBorder(E.border)),E.fill&&(G.fillId=this._addFill(E.fill)),E.alignment&&(G.alignment=E.alignment),E.protection&&(G.protection=E.protection);let U=this._addStyle(G);return this.weakMap&&this.weakMap.set(E,U),U}getStyleModel(E){let R=this.model.styles[E];if(!R)return null;let G=this.index.model[E];if(G)return G;if(G=this.index.model[E]={},R.numFmtId){let Z=this.index.numFmt[R.numFmtId]||b.getDefaultFmtCode(R.numFmtId);Z&&(G.numFmt=Z)}function U(Z,he,re){if(re||re===0){let pe=he[re];pe&&(G[Z]=pe)}}return U("font",this.model.fonts,R.fontId),U("border",this.model.borders,R.borderId),U("fill",this.model.fills,R.fillId),R.alignment&&(G.alignment=R.alignment),R.protection&&(G.protection=R.protection),G}addDxfStyle(E){return E.numFmt&&(E.numFmtId=this._addNumFmtStr(E.numFmt)),this.model.dxfs.push(E),this.model.dxfs.length-1}getDxfStyle(E){return this.model.dxfs[E]}_addStyle(E){let R=this.map.style.toXml(E),G=this.index.style[R];return G===void 0&&(G=this.index.style[R]=this.model.styles.length,this.model.styles.push(R)),G}_addNumFmtStr(E){let R=b.getDefaultFmtId(E);if(R!==void 0||(R=this.index.numFmt[E],R!==void 0))return R;R=this.index.numFmt[E]=164+this.model.numFmts.length;let G=this.map.numFmt.toXml({id:R,formatCode:E});return this.model.numFmts.push(G),R}_addFont(E){let R=this.map.font.toXml(E),G=this.index.font[R];return G===void 0&&(G=this.index.font[R]=this.model.fonts.length,this.model.fonts.push(R)),G}_addBorder(E){let R=this.map.border.toXml(E),G=this.index.border[R];return G===void 0&&(G=this.index.border[R]=this.model.borders.length,this.model.borders.push(R)),G}_addFill(E){let R=this.map.fill.toXml(E),G=this.index.fill[R];return G===void 0&&(G=this.index.fill[R]=this.model.fills.length,this.model.fills.push(R)),G}}w.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},w.STATIC_XFORMS={cellStyles:new d({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new d({tag:"dxfs",$:{count:0}}),tableStyles:new d({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new d({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},w.Mock=class extends w{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(I){return I.autodrain(),Promise.resolve()}addStyleModel(I,E){switch(E){case o.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){let I={numFmtId:b.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(I)}return this._dateStyleId}getStyleModel(){return{}}},a.exports=w},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(e,a,t){"use strict";let o=e("../base-xform");class n extends o{constructor(d){super(),this.model=d}get tag(){return"u"}render(d,u){if((u=u||this.model)===!0)d.leafNode("u");else{let g=n.Attributes[u];g&&d.leafNode("u",g)}}parseOpen(d){d.name==="u"&&(this.model=d.attributes.val||!0)}parseText(){}parseClose(){return!1}}n.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},a.exports=n},{"../base-xform":32}],137:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("./filter-column-xform");a.exports=class extends o{constructor(){super(),this.map={filterColumn:new n}}get tag(){return"autoFilter"}prepare(c){c.columns.forEach((d,u)=>{this.map.filterColumn.prepare(d,{index:u})})}render(c,d){return c.openNode(this.tag,{ref:d.autoFilterRef}),d.columns.forEach(u=>{this.map.filterColumn.render(c,u)}),c.closeNode(),!0}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:return this.model={autoFilterRef:c.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[c.name],this.parser)return this.parseOpen(c),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(c))}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(c){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+c)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"customFilter"}render(n,c){n.leafNode(this.tag,{val:c.val,operator:c.operator})}parseOpen(n){return n.name===this.tag&&(this.model={val:n.attributes.val,operator:n.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,a,t){"use strict";let o=e("../base-xform"),n=e("../list-xform"),c=e("./custom-filter-xform"),d=e("./filter-xform");a.exports=class extends o{constructor(){super(),this.map={customFilters:new n({tag:"customFilters",count:!1,empty:!0,childXform:new c}),filters:new n({tag:"filters",count:!1,empty:!0,childXform:new d})}}get tag(){return"filterColumn"}prepare(u,g){u.colId=g.index.toString()}render(u,g){return g.customFilters?(u.openNode(this.tag,{colId:g.colId,hiddenButton:g.filterButton?"0":"1"}),this.map.customFilters.render(u,g.customFilters),u.closeNode(),!0):(u.leafNode(this.tag,{colId:g.colId,hiddenButton:g.filterButton?"0":"1"}),!0)}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;let{attributes:g}=u;switch(u.name){case this.tag:return this.model={filterButton:g.hiddenButton==="0"},!0;default:if(this.parser=this.map[u.name],this.parser)return this.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"filter"}render(n,c){n.leafNode(this.tag,{val:c.val})}parseOpen(n){return n.name===this.tag&&(this.model={val:n.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"tableColumn"}prepare(n,c){n.id=c.index+1}render(n,c){return n.leafNode(this.tag,{id:c.id.toString(),name:c.name,totalsRowLabel:c.totalsRowLabel,totalsRowFunction:c.totalsRowFunction,dxfId:c.dxfId}),!0}parseOpen(n){if(n.name===this.tag){let{attributes:c}=n;return this.model={name:c.name,totalsRowLabel:c.totalsRowLabel,totalsRowFunction:c.totalsRowFunction,dxfId:c.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,a,t){"use strict";let o=e("../base-xform");a.exports=class extends o{get tag(){return"tableStyleInfo"}render(n,c){return n.leafNode(this.tag,{name:c.theme?c.theme:void 0,showFirstColumn:c.showFirstColumn?"1":"0",showLastColumn:c.showLastColumn?"1":"0",showRowStripes:c.showRowStripes?"1":"0",showColumnStripes:c.showColumnStripes?"1":"0"}),!0}parseOpen(n){if(n.name===this.tag){let{attributes:c}=n;return this.model={theme:c.name?c.name:null,showFirstColumn:c.showFirstColumn==="1",showLastColumn:c.showLastColumn==="1",showRowStripes:c.showRowStripes==="1",showColumnStripes:c.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,a,t){"use strict";let o=e("../../../utils/xml-stream"),n=e("../base-xform"),c=e("../list-xform"),d=e("./auto-filter-xform"),u=e("./table-column-xform"),g=e("./table-style-info-xform");class v extends n{constructor(){super(),this.map={autoFilter:new d,tableColumns:new c({tag:"tableColumns",count:!0,empty:!0,childXform:new u}),tableStyleInfo:new g}}prepare(b,P){this.map.autoFilter.prepare(b),this.map.tableColumns.prepare(b.columns,P)}get tag(){return"table"}render(b,P){b.openXml(o.StdDocAttributes),b.openNode(this.tag,qt(rt({},v.TABLE_ATTRIBUTES),{id:P.id,name:P.name,displayName:P.displayName||P.name,ref:P.tableRef,totalsRowCount:P.totalsRow?"1":void 0,totalsRowShown:P.totalsRow?void 0:"1",headerRowCount:P.headerRow?"1":"0"})),this.map.autoFilter.render(b,P),this.map.tableColumns.render(b,P.columns),this.map.tableStyleInfo.render(b,P.style),b.closeNode()}parseOpen(b){if(this.parser)return this.parser.parseOpen(b),!0;let{name:P,attributes:T}=b;switch(P){case this.tag:this.reset(),this.model={name:T.name,displayName:T.displayName||T.name,tableRef:T.ref,totalsRow:T.totalsRowCount==="1",headerRow:T.headerRowCount==="1"};break;default:this.parser=this.map[b.name],this.parser&&this.parser.parseOpen(b)}return!0}parseText(b){this.parser&&this.parser.parseText(b)}parseClose(b){if(this.parser)return this.parser.parseClose(b)||(this.parser=void 0),!0;switch(b){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((P,T)=>{this.model.columns[T].filterButton=P.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(b,P){b.columns.forEach(T=>{T.dxfId!==void 0&&(T.style=P.styles.getDxfStyle(T.dxfId))})}}v.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},a.exports=v},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(e,a,t){(function(o,n){(function(){"use strict";let c=e("fs"),d=e("jszip"),{PassThrough:u}=e("readable-stream"),g=e("../utils/zip-stream"),v=e("../utils/stream-buf"),C=e("../utils/utils"),b=e("../utils/xml-stream"),{bufferToString:P}=e("../utils/browser-buffer-decode"),T=e("./xform/style/styles-xform"),w=e("./xform/core/core-xform"),I=e("./xform/strings/shared-strings-xform"),E=e("./xform/core/relationships-xform"),R=e("./xform/core/content-types-xform"),G=e("./xform/core/app-xform"),U=e("./xform/book/workbook-xform"),Z=e("./xform/sheet/worksheet-xform"),he=e("./xform/drawing/drawing-xform"),re=e("./xform/table/table-xform"),pe=e("./xform/comment/comments-xform"),de=e("./xform/comment/vml-notes-xform"),be=e("./xml/theme1");class ue{constructor(Q){this.workbook=Q}readFile(Q,le){return Zn(this,null,function*(){if(!(yield C.fs.exists(Q)))throw new Error("File not found: "+Q);let O=c.createReadStream(Q);try{let k=yield this.read(O,le);return O.close(),k}catch(k){throw O.close(),k}})}parseRels(Q){return new E().parseStream(Q)}parseWorkbook(Q){return new U().parseStream(Q)}parseSharedStrings(Q){return new I().parseStream(Q)}reconcile(Q,le){let O=new U,k=new Z(le),L=new he,N=new re;O.reconcile(Q);let H={media:Q.media,mediaIndex:Q.mediaIndex};Object.keys(Q.drawings).forEach(xe=>{let ye=Q.drawings[xe],Le=Q.drawingRels[xe];Le&&(H.rels=Le.reduce((ee,Ae)=>(ee[Ae.Id]=Ae,ee),{}),(ye.anchors||[]).forEach(ee=>{let Ae=ee.picture&&ee.picture.hyperlinks;Ae&&H.rels[Ae.rId]&&(Ae.hyperlink=H.rels[Ae.rId].Target,delete Ae.rId)}),L.reconcile(ye,H))});let $={styles:Q.styles};Object.values(Q.tables).forEach(xe=>{N.reconcile(xe,$)});let ne={styles:Q.styles,sharedStrings:Q.sharedStrings,media:Q.media,mediaIndex:Q.mediaIndex,date1904:Q.properties&&Q.properties.date1904,drawings:Q.drawings,comments:Q.comments,tables:Q.tables,vmlDrawings:Q.vmlDrawings};Q.worksheets.forEach(xe=>{xe.relationships=Q.worksheetRels[xe.sheetNo],k.reconcile(xe,ne)}),delete Q.worksheetHash,delete Q.worksheetRels,delete Q.globalRels,delete Q.sharedStrings,delete Q.workbookRels,delete Q.sheetDefs,delete Q.styles,delete Q.mediaIndex,delete Q.drawings,delete Q.drawingRels,delete Q.vmlDrawings}_processWorksheetEntry(Q,le,O,k,L){return Zn(this,null,function*(){let N=new Z(k),H=yield N.parseStream(Q);H.sheetNo=O,le.worksheetHash[L]=H,le.worksheets.push(H)})}_processCommentEntry(Q,le,O){return Zn(this,null,function*(){let k=new pe,L=yield k.parseStream(Q);le.comments[`../${O}.xml`]=L})}_processTableEntry(Q,le,O){return Zn(this,null,function*(){let k=new re,L=yield k.parseStream(Q);le.tables[`../tables/${O}.xml`]=L})}_processWorksheetRelsEntry(Q,le,O){return Zn(this,null,function*(){let k=new E,L=yield k.parseStream(Q);le.worksheetRels[O]=L})}_processMediaEntry(Q,le,O){return Zn(this,null,function*(){let k=O.lastIndexOf(".");if(k>=1){let L=O.substr(k+1),N=O.substr(0,k);yield new Promise((H,$)=>{let ne=new v;ne.on("finish",()=>{le.mediaIndex[O]=le.media.length,le.mediaIndex[N]=le.media.length;let xe={type:"image",name:N,extension:L,buffer:ne.toBuffer()};le.media.push(xe),H()}),Q.on("error",xe=>{$(xe)}),Q.pipe(ne)})}})}_processDrawingEntry(Q,le,O){return Zn(this,null,function*(){let k=new he,L=yield k.parseStream(Q);le.drawings[O]=L})}_processDrawingRelsEntry(Q,le,O){return Zn(this,null,function*(){let k=new E,L=yield k.parseStream(Q);le.drawingRels[O]=L})}_processVmlDrawingEntry(Q,le,O){return Zn(this,null,function*(){let k=new de,L=yield k.parseStream(Q);le.vmlDrawings[`../drawings/${O}.vml`]=L})}_processThemeEntry(Q,le,O){return Zn(this,null,function*(){yield new Promise((k,L)=>{let N=new v;Q.on("error",L),N.on("error",L),N.on("finish",()=>{le.themes[O]=N.read().toString(),k()}),Q.pipe(N)})})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}read(Q,le){return Zn(this,null,function*(){!Q[Symbol.asyncIterator]&&Q.pipe&&(Q=Q.pipe(new u));let O=[];try{for(var k=W1(Q),L,N,H;L=!(N=yield k.next()).done;L=!1){let $=N.value;O.push($)}}catch{H=[N]}finally{try{L&&(N=k.return)&&(yield N.call(k))}finally{if(H)throw H[0]}}return this.load(n.concat(O),le)})}load(Q,le){return Zn(this,null,function*(){let O;O=le&&le.base64?n.from(Q.toString(),"base64"):Q;let k={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},L=yield d.loadAsync(O);for(let N of Object.values(L.files))if(!N.dir){let H,$=N.name;if($[0]==="/"&&($=$.substr(1)),$.match(/xl\/media\//)||$.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))H=new u,H.write(yield N.async("nodebuffer"));else{let ne;H=new u({writableObjectMode:!0,readableObjectMode:!0}),ne=o.browser?P(yield N.async("nodebuffer")):yield N.async("string");let xe=16384;for(let ye=0;yeZn(null,null,function*(){if(O.type==="image"){let k=`xl/media/${O.name}.${O.extension}`;if(O.filename){let L=yield(function(N,H){return new Promise(($,ne)=>{c.readFile(N,H,(xe,ye)=>{xe?ne(xe):$(ye)})})})(O.filename);return Q.append(L,{name:k})}if(O.buffer)return Q.append(O.buffer,{name:k});if(O.base64){let L=O.base64,N=L.substring(L.indexOf(",")+1);return Q.append(N,{name:k,base64:!0})}}throw new Error("Unsupported media")})))})}addDrawings(Q,le){let O=new he,k=new E;le.worksheets.forEach(L=>{let{drawing:N}=L;if(N){O.prepare(N,{});let H=O.toXml(N);Q.append(H,{name:`xl/drawings/${N.name}.xml`}),H=k.toXml(N.rels),Q.append(H,{name:`xl/drawings/_rels/${N.name}.xml.rels`})}})}addTables(Q,le){let O=new re;le.worksheets.forEach(k=>{let{tables:L}=k;L.forEach(N=>{O.prepare(N,{});let H=O.toXml(N);Q.append(H,{name:"xl/tables/"+N.target})})})}addContentTypes(Q,le){return Zn(this,null,function*(){let O=new R().toXml(le);Q.append(O,{name:"[Content_Types].xml"})})}addApp(Q,le){return Zn(this,null,function*(){let O=new G().toXml(le);Q.append(O,{name:"docProps/app.xml"})})}addCore(Q,le){return Zn(this,null,function*(){let O=new w;Q.append(O.toXml(le),{name:"docProps/core.xml"})})}addThemes(Q,le){return Zn(this,null,function*(){let O=le.themes||{theme1:be};Object.keys(O).forEach(k=>{let L=O[k],N=`xl/theme/${k}.xml`;Q.append(L,{name:N})})})}addOfficeRels(Q){return Zn(this,null,function*(){let le=new E().toXml([{Id:"rId1",Type:ue.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:ue.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:ue.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);Q.append(le,{name:"_rels/.rels"})})}addWorkbookRels(Q,le){return Zn(this,null,function*(){let O=1,k=[{Id:"rId"+O++,Type:ue.RelType.Styles,Target:"styles.xml"},{Id:"rId"+O++,Type:ue.RelType.Theme,Target:"theme/theme1.xml"}];le.sharedStrings.count&&k.push({Id:"rId"+O++,Type:ue.RelType.SharedStrings,Target:"sharedStrings.xml"}),le.worksheets.forEach(N=>{N.rId="rId"+O++,k.push({Id:N.rId,Type:ue.RelType.Worksheet,Target:`worksheets/sheet${N.id}.xml`})});let L=new E().toXml(k);Q.append(L,{name:"xl/_rels/workbook.xml.rels"})})}addSharedStrings(Q,le){return Zn(this,null,function*(){le.sharedStrings&&le.sharedStrings.count&&Q.append(le.sharedStrings.xml,{name:"xl/sharedStrings.xml"})})}addStyles(Q,le){return Zn(this,null,function*(){let{xml:O}=le.styles;O&&Q.append(O,{name:"xl/styles.xml"})})}addWorkbook(Q,le){return Zn(this,null,function*(){let O=new U;Q.append(O.toXml(le),{name:"xl/workbook.xml"})})}addWorksheets(Q,le){return Zn(this,null,function*(){let O=new Z,k=new E,L=new pe,N=new de;le.worksheets.forEach(H=>{let $=new b;O.render($,H),Q.append($.xml,{name:`xl/worksheets/sheet${H.id}.xml`}),H.rels&&H.rels.length&&($=new b,k.render($,H.rels),Q.append($.xml,{name:`xl/worksheets/_rels/sheet${H.id}.xml.rels`})),H.comments.length>0&&($=new b,L.render($,H),Q.append($.xml,{name:`xl/comments${H.id}.xml`}),$=new b,N.render($,H),Q.append($.xml,{name:`xl/drawings/vmlDrawing${H.id}.vml`}))})})}_finalize(Q){return new Promise((le,O)=>{Q.on("finish",()=>{le(this)}),Q.on("error",O),Q.finalize()})}prepareModel(Q,le){Q.creator=Q.creator||"ExcelJS",Q.lastModifiedBy=Q.lastModifiedBy||"ExcelJS",Q.created=Q.created||new Date,Q.modified=Q.modified||new Date,Q.useSharedStrings=le.useSharedStrings===void 0||le.useSharedStrings,Q.useStyles=le.useStyles===void 0||le.useStyles,Q.sharedStrings=new I,Q.styles=Q.useStyles?new T(!0):new T.Mock;let O=new U,k=new Z;O.prepare(Q);let L={sharedStrings:Q.sharedStrings,styles:Q.styles,date1904:Q.properties.date1904,drawingsCount:0,media:Q.media};L.drawings=Q.drawings=[],L.commentRefs=Q.commentRefs=[];let N=0;Q.tables=[],Q.worksheets.forEach(H=>{H.tables.forEach($=>{N++,$.target=`table${N}.xml`,$.id=N,Q.tables.push($)}),k.prepare(H,L)})}write(Q,le){return Zn(this,null,function*(){le=le||{};let{model:O}=this.workbook,k=new g.ZipWriter(le.zip);return k.pipe(Q),this.prepareModel(O,le),yield this.addContentTypes(k,O),yield this.addOfficeRels(k,O),yield this.addWorkbookRels(k,O),yield this.addWorksheets(k,O),yield this.addSharedStrings(k,O),yield this.addDrawings(k,O),yield this.addTables(k,O),yield Promise.all([this.addThemes(k,O),this.addStyles(k,O)]),yield this.addMedia(k,O),yield Promise.all([this.addApp(k,O),this.addCore(k,O)]),yield this.addWorkbook(k,O),this._finalize(k)})}writeFile(Q,le){let O=c.createWriteStream(Q);return new Promise((k,L)=>{O.on("finish",()=>{k()}),O.on("error",N=>{L(N)}),this.write(O,le).then(()=>{O.end()}).catch(N=>{L(N)})})}writeBuffer(Q){return Zn(this,null,function*(){let le=new v;return yield this.write(le,Q),le.read()})}}ue.RelType=e("./rel-type"),a.exports=ue}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(e,a,t){"use strict";a.exports=` `},{}],146:[function(e,a,t){(function(o){(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvFormatterStream=void 0;let n=e("stream"),c=e("./formatter");class d extends n.Transform{constructor(g){super({writableObjectMode:g.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=g,this.rowFormatter=new c.RowFormatter(g),this.hasWrittenBOM=!g.writeBOM}transform(g){return this.rowFormatter.rowTransform=g,this}_transform(g,v,C){let b=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(g,(P,T)=>P?(b=!0,C(P)):(T&&T.forEach(w=>{this.push(o.from(w,"utf8"))}),b=!0,C()))}catch(P){if(b)throw P;C(P)}}_flush(g){this.rowFormatter.finish((v,C)=>v?g(v):(C&&C.forEach(b=>{this.push(o.from(b,"utf8"))}),g()))}}t.CsvFormatterStream=d}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormatterOptions=void 0,t.FormatterOptions=class{constructor(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,o||{}),o?.quoteHeaders===void 0&&(this.quoteHeaders=this.quoteColumns),o?.quote===!0?this.quote='"':o?.quote===!1&&(this.quote=""),typeof o?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((n=o.writeHeaders)===null||n===void 0||n),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,a,t){"use strict";var o=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=void 0;let n=o(e("lodash.isboolean")),c=o(e("lodash.isnil")),d=o(e("lodash.escaperegexp"));t.FieldFormatter=class{constructor(u){this._headers=null,this.formatterOptions=u,u.headers!==null&&(this.headers=u.headers),this.REPLACE_REGEXP=new RegExp(u.quote,"g");let g=`[${u.delimiter}${d.default(u.rowDelimiter)}|\r| ]`;this.ESCAPE_REGEXP=new RegExp(g)}set headers(u){this._headers=u}shouldQuote(u,g){let v=g?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return n.default(v)?v:Array.isArray(v)?v[u]:this._headers!==null&&v[this._headers[u]]}format(u,g,v){let C=(""+(c.default(u)?"":u)).replace(/\0/g,""),{formatterOptions:b}=this;return b.quote!==""&&C.indexOf(b.quote)!==-1?this.quoteField(C.replace(this.REPLACE_REGEXP,b.escapedQuote)):C.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(g,v)?this.quoteField(C):C}quoteField(u){let{quote:g}=this.formatterOptions;return`${g}${u}${g}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,a,t){"use strict";var o=function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowFormatter=void 0;let n=o(e("lodash.isfunction")),c=o(e("lodash.isequal")),d=e("./FieldFormatter"),u=e("../types");class g{constructor(C){this.rowCount=0,this.formatterOptions=C,this.fieldFormatter=new d.FieldFormatter(C),this.headers=C.headers,this.shouldWriteHeaders=C.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),C.transform&&(this.rowTransform=C.transform)}static isRowHashArray(C){return!!Array.isArray(C)&&Array.isArray(C[0])&&C[0].length===2}static isRowArray(C){return Array.isArray(C)&&!this.isRowHashArray(C)}static gatherHeaders(C){return g.isRowHashArray(C)?C.map(b=>b[0]):Array.isArray(C)?C:Object.keys(C)}static createTransform(C){return u.isSyncTransform(C)?(b,P)=>{let T=null;try{T=C(b)}catch(w){return P(w)}return P(null,T)}:(b,P)=>{C(b,P)}}set rowTransform(C){if(!n.default(C))throw new TypeError("The transform should be a function");this._rowTransform=g.createTransform(C)}format(C,b){this.callTransformer(C,(P,T)=>{if(P)return b(P);if(!C)return b(null);let w=[];if(T){let{shouldFormatColumns:I,headers:E}=this.checkHeaders(T);if(this.shouldWriteHeaders&&E&&!this.hasWrittenHeaders&&(w.push(this.formatColumns(E,!0)),this.hasWrittenHeaders=!0),I){let R=this.gatherColumns(T);w.push(this.formatColumns(R,!1))}}return b(null,w)})}finish(C){let b=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return C(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));b.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&b.push(this.formatterOptions.rowDelimiter),C(null,b)}checkHeaders(C){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};let b=g.gatherHeaders(C);return this.headers=b,this.fieldFormatter.headers=b,this.shouldWriteHeaders?{shouldFormatColumns:!c.default(b,C),headers:b}:{shouldFormatColumns:!0,headers:null}}gatherColumns(C){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(C)?g.isRowHashArray(C)?this.headers.map((b,P)=>{let T=C[P];return T?T[1]:""}):g.isRowArray(C)&&!this.shouldWriteHeaders?C:this.headers.map((b,P)=>C[P]):this.headers.map(b=>C[b])}callTransformer(C,b){return this._rowTransform?this._rowTransform(C,b):b(null,C)}formatColumns(C,b){let P=C.map((w,I)=>this.fieldFormatter.format(w,I,b)).join(this.formatterOptions.delimiter),{rowCount:T}=this;return this.rowCount+=1,T?[this.formatterOptions.rowDelimiter,P].join(""):P}}t.RowFormatter=g},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldFormatter=t.RowFormatter=void 0;var o=e("./RowFormatter");Object.defineProperty(t,"RowFormatter",{enumerable:!0,get:function(){return o.RowFormatter}});var n=e("./FieldFormatter");Object.defineProperty(t,"FieldFormatter",{enumerable:!0,get:function(){return n.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,a,t){(function(o){(function(){"use strict";var n=Object.create?function(I,E,R,G){G===void 0&&(G=R),Object.defineProperty(I,G,{enumerable:!0,get:function(){return E[R]}})}:function(I,E,R,G){G===void 0&&(G=R),I[G]=E[R]},c=Object.create?function(I,E){Object.defineProperty(I,"default",{enumerable:!0,value:E})}:function(I,E){I.default=E},d=function(I){if(I&&I.__esModule)return I;var E={};if(I!=null)for(var R in I)R!=="default"&&Object.prototype.hasOwnProperty.call(I,R)&&n(E,I,R);return c(E,I),E},u=function(I,E){for(var R in I)R==="default"||Object.prototype.hasOwnProperty.call(E,R)||n(E,I,R)};Object.defineProperty(t,"__esModule",{value:!0}),t.writeToPath=t.writeToString=t.writeToBuffer=t.writeToStream=t.write=t.format=t.FormatterOptions=t.CsvFormatterStream=void 0;let g=e("util"),v=e("stream"),C=d(e("fs")),b=e("./FormatterOptions"),P=e("./CsvFormatterStream");u(e("./types"),t);var T=e("./CsvFormatterStream");Object.defineProperty(t,"CsvFormatterStream",{enumerable:!0,get:function(){return T.CsvFormatterStream}});var w=e("./FormatterOptions");Object.defineProperty(t,"FormatterOptions",{enumerable:!0,get:function(){return w.FormatterOptions}}),t.format=I=>new P.CsvFormatterStream(new b.FormatterOptions(I)),t.write=(I,E)=>{let R=t.format(E),G=g.promisify((U,Z)=>{R.write(U,void 0,Z)});return I.reduce((U,Z)=>U.then(()=>G(Z)),Promise.resolve()).then(()=>R.end()).catch(U=>{R.emit("error",U)}),R},t.writeToStream=(I,E,R)=>t.write(E,R).pipe(I),t.writeToBuffer=function(I){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=[],G=new v.Writable({write(U,Z,he){R.push(U),he()}});return new Promise((U,Z)=>{G.on("error",Z).on("finish",()=>U(o.concat(R))),t.write(I,E).pipe(G)})},t.writeToString=(I,E)=>t.writeToBuffer(I,E).then(R=>R.toString()),t.writeToPath=(I,E,R)=>{let G=C.createWriteStream(I,{encoding:"utf8"});return t.write(E,R).pipe(G)}}).call(this)}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncTransform=void 0,t.isSyncTransform=o=>o.length===1},{}],153:[function(e,a,t){(function(o){(function(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsvParserStream=void 0;let n=e("string_decoder"),c=e("stream"),d=e("./transforms"),u=e("./parser");class g extends c.Transform{constructor(C){super({objectMode:C.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=C,this.parser=new u.Parser(C),this.headerTransformer=new d.HeaderTransformer(C),this.decoder=new n.StringDecoder(C.encoding),this.rowTransformerValidator=new d.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(C){return this.rowTransformerValidator.rowTransform=C,this}validate(C){return this.rowTransformerValidator.rowValidator=C,this}emit(C){if(C==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var b=arguments.length,P=new Array(b>1?b-1:0),T=1;T{let I=G=>G?b(G):w%100!=0?T(w+1):void o(()=>T(w+1));if(this.checkAndEmitHeaders(),w>=P||this.hasHitRowLimit)return b();if(this.parsedLineCount+=1,this.shouldSkipLine)return I();let E=C[w];this.rowCount+=1,this.parsedRowCount+=1;let R=this.rowCount;return this.transformRow(E,(G,U)=>{if(G)return this.rowCount-=1,I(G);if(!U)return I(new Error("expected transform result"));if(U.isValid){if(U.row)return this.pushRow(U.row,I)}else this.emit("data-invalid",U.row,R,U.reason);return I()})};T(0)}transformRow(C,b){try{this.headerTransformer.transform(C,(P,T)=>P?b(P):T?T.isValid?T.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(T.row,b):this.skipRow(b):(this.rowCount-=1,this.parsedRowCount-=1,b(null,{row:null,isValid:!0})):this.shouldEmitRows?b(null,{isValid:!1,row:C}):this.skipRow(b):b(new Error("Expected result from header transform")))}catch(P){b(P)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(C){return this.rowCount-=1,C(null,{row:null,isValid:!0})}pushRow(C,b){try{this.parserOptions.objectMode?this.push(C):this.push(JSON.stringify(C)),b()}catch(P){b(P)}}static wrapDoneCallback(C){let b=!1;return function(P){if(P){if(b)throw P;return b=!0,void C(P)}for(var T=arguments.length,w=new Array(T>1?T-1:0),I=1;I1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=n.default(this.delimiter),this.escapeChar=(u=this.escape)!==null&&u!==void 0?u:this.quote,this.supportsComments=!c.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(e,a,t){"use strict";var o=Object.create?function(T,w,I,E){E===void 0&&(E=I),Object.defineProperty(T,E,{enumerable:!0,get:function(){return w[I]}})}:function(T,w,I,E){E===void 0&&(E=I),T[E]=w[I]},n=Object.create?function(T,w){Object.defineProperty(T,"default",{enumerable:!0,value:w})}:function(T,w){T.default=w},c=function(T){if(T&&T.__esModule)return T;var w={};if(T!=null)for(var I in T)I!=="default"&&Object.prototype.hasOwnProperty.call(T,I)&&o(w,T,I);return n(w,T),w},d=function(T,w){for(var I in T)I==="default"||Object.prototype.hasOwnProperty.call(w,I)||o(w,T,I)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseString=t.parseFile=t.parseStream=t.parse=t.ParserOptions=t.CsvParserStream=void 0;let u=c(e("fs")),g=e("stream"),v=e("./ParserOptions"),C=e("./CsvParserStream");d(e("./types"),t);var b=e("./CsvParserStream");Object.defineProperty(t,"CsvParserStream",{enumerable:!0,get:function(){return b.CsvParserStream}});var P=e("./ParserOptions");Object.defineProperty(t,"ParserOptions",{enumerable:!0,get:function(){return P.ParserOptions}}),t.parse=T=>new C.CsvParserStream(new v.ParserOptions(T)),t.parseStream=(T,w)=>T.pipe(new C.CsvParserStream(new v.ParserOptions(w))),t.parseFile=function(T){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return u.createReadStream(T).pipe(new C.CsvParserStream(new v.ParserOptions(w)))},t.parseString=(T,w)=>{let I=new g.Readable;return I.push(T),I.push(null),I.pipe(new C.CsvParserStream(new v.ParserOptions(w)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;let o=e("./Scanner"),n=e("./RowParser"),c=e("./Token");class d{constructor(g){this.parserOptions=g,this.rowParser=new n.RowParser(this.parserOptions)}static removeBOM(g){return g&&g.charCodeAt(0)===65279?g.slice(1):g}parse(g,v){let C=new o.Scanner({line:d.removeBOM(g),parserOptions:this.parserOptions,hasMoreData:v});return this.parserOptions.supportsComments?this.parseWithComments(C):this.parseWithoutComments(C)}parseWithoutComments(g){let v=[],C=!0;for(;C;)C=this.parseRow(g,v);return{line:g.line,rows:v}}parseWithComments(g){let{parserOptions:v}=this,C=[];for(let b=g.nextCharacterToken;b!==null;b=g.nextCharacterToken)if(c.Token.isTokenComment(b,v)){if(g.advancePastLine()===null)return{line:g.lineFromCursor,rows:C};if(!g.hasMoreCharacters)return{line:g.lineFromCursor,rows:C};g.truncateToCursor()}else if(!this.parseRow(g,C))break;return{line:g.line,rows:C}}parseRow(g,v){if(!g.nextNonSpaceToken)return!1;let C=this.rowParser.parse(g);return C!==null&&(this.parserOptions.ignoreEmpty&&n.RowParser.isEmptyRow(C)||v.push(C),!0)}}t.Parser=d},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RowParser=void 0;let o=e("./column"),n=e("./Token");t.RowParser=class{constructor(c){this.parserOptions=c,this.columnParser=new o.ColumnParser(c)}static isEmptyRow(c){return c.join("").replace(/\s+/g,"")===""}parse(c){let{parserOptions:d}=this,{hasMoreData:u}=c,g=c,v=[],C=this.getStartToken(g,v);for(;C;){if(n.Token.isTokenRowDelimiter(C))return g.advancePastToken(C),!g.hasMoreCharacters&&n.Token.isTokenCarriageReturn(C,d)&&u?null:(g.truncateToCursor(),v);if(!this.shouldSkipColumnParse(g,C,v)){let b=this.columnParser.parse(g);if(b===null)return null;v.push(b)}C=g.nextNonSpaceToken}return u?null:(g.truncateToCursor(),v)}getStartToken(c,d){let u=c.nextNonSpaceToken;return u!==null&&n.Token.isTokenDelimiter(u,this.parserOptions)?(d.push(""),c.nextNonSpaceToken):u}shouldSkipColumnParse(c,d,u){let{parserOptions:g}=this;if(n.Token.isTokenDelimiter(d,g)){c.advancePastToken(d);let v=c.nextCharacterToken;if(!c.hasMoreCharacters||v!==null&&n.Token.isTokenRowDelimiter(v)||v!==null&&n.Token.isTokenDelimiter(v,g))return u.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=void 0;let o=e("./Token"),n=/((?:\r\n)|\n|\r)/;t.Scanner=class{constructor(c){this.cursor=0,this.line=c.line,this.lineLength=this.line.length,this.parserOptions=c.parserOptions,this.hasMoreData=c.hasMoreData,this.cursor=c.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:c}=this,d=this.parserOptions.NEXT_TOKEN_REGEXP;if(c.search(d)===-1)return null;let u=d.exec(c);if(u==null)return null;let g=u[1],v=this.cursor+(u.index||0);return new o.Token({token:g,startCursor:v,endCursor:v+g.length-1})}get nextCharacterToken(){let{cursor:c,lineLength:d}=this;return d<=c?null:new o.Token({token:this.line[c],startCursor:c,endCursor:c})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let c=n.exec(this.lineFromCursor);return c?(this.cursor+=(c.index||0)+c[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(c){return this.cursor=c,this}advanceToToken(c){return this.cursor=c.startCursor,this}advancePastToken(c){return this.cursor=c.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0,t.Token=class{constructor(o){this.token=o.token,this.startCursor=o.startCursor,this.endCursor=o.endCursor}static isTokenRowDelimiter(o){let n=o.token;return n==="\r"||n===` `||n===`\r `}static isTokenCarriageReturn(o,n){return o.token===n.carriageReturn}static isTokenComment(o,n){return n.supportsComments&&!!o&&o.token===n.comment}static isTokenEscapeCharacter(o,n){return o.token===n.escapeChar}static isTokenQuote(o,n){return o.token===n.quote}static isTokenDelimiter(o,n){return o.token===n.delimiter}}},{}],160:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=void 0,t.ColumnFormatter=class{constructor(o){o.trim?this.format=n=>n.trim():o.ltrim?this.format=n=>n.trimLeft():o.rtrim?this.format=n=>n.trimRight():this.format=n=>n}}},{}],161:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnParser=void 0;let o=e("./NonQuotedColumnParser"),n=e("./QuotedColumnParser"),c=e("../Token");t.ColumnParser=class{constructor(d){this.parserOptions=d,this.quotedColumnParser=new n.QuotedColumnParser(d),this.nonQuotedColumnParser=new o.NonQuotedColumnParser(d)}parse(d){let{nextNonSpaceToken:u}=d;return u!==null&&c.Token.isTokenQuote(u,this.parserOptions)?(d.advanceToToken(u),this.quotedColumnParser.parse(d)):this.nonQuotedColumnParser.parse(d)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonQuotedColumnParser=void 0;let o=e("./ColumnFormatter"),n=e("../Token");t.NonQuotedColumnParser=class{constructor(c){this.parserOptions=c,this.columnFormatter=new o.ColumnFormatter(c)}parse(c){if(!c.hasMoreCharacters)return null;let{parserOptions:d}=this,u=[],g=c.nextCharacterToken;for(;g&&!n.Token.isTokenDelimiter(g,d)&&!n.Token.isTokenRowDelimiter(g);g=c.nextCharacterToken)u.push(g.token),c.advancePastToken(g);return this.columnFormatter.format(u.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=void 0;let o=e("./ColumnFormatter"),n=e("../Token");t.QuotedColumnParser=class{constructor(c){this.parserOptions=c,this.columnFormatter=new o.ColumnFormatter(c)}parse(c){if(!c.hasMoreCharacters)return null;let d=c.cursor,{foundClosingQuote:u,col:g}=this.gatherDataBetweenQuotes(c);if(!u){if(c.advanceTo(d),!c.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${c.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(c),g}gatherDataBetweenQuotes(c){let{parserOptions:d}=this,u=!1,g=!1,v=[],C=c.nextCharacterToken;for(;!g&&C!==null;C=c.nextCharacterToken){let b=n.Token.isTokenQuote(C,d);if(!u&&b)u=!0;else if(u)if(n.Token.isTokenEscapeCharacter(C,d)){c.advancePastToken(C);let P=c.nextCharacterToken;P!==null&&(n.Token.isTokenQuote(P,d)||n.Token.isTokenEscapeCharacter(P,d))?(v.push(P.token),C=P):b?g=!0:v.push(C.token)}else b?g=!0:v.push(C.token);c.advancePastToken(C)}return{col:this.columnFormatter.format(v.join("")),foundClosingQuote:g}}checkForMalformedColumn(c){let{parserOptions:d}=this,{nextNonSpaceToken:u}=c;if(u){let g=n.Token.isTokenDelimiter(u,d),v=n.Token.isTokenRowDelimiter(u);if(!g&&!v){let C=c.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${d.escapedDelimiter}' OR new line got: '${u.token}'. at '${C}`)}c.advanceToToken(u)}else c.hasMoreData||c.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColumnFormatter=t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=void 0;var o=e("./ColumnParser");Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return o.ColumnParser}});var n=e("./NonQuotedColumnParser");Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return n.NonQuotedColumnParser}});var c=e("./QuotedColumnParser");Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return c.QuotedColumnParser}});var d=e("./ColumnFormatter");Object.defineProperty(t,"ColumnFormatter",{enumerable:!0,get:function(){return d.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuotedColumnParser=t.NonQuotedColumnParser=t.ColumnParser=t.Token=t.Scanner=t.RowParser=t.Parser=void 0;var o=e("./Parser");Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return o.Parser}});var n=e("./RowParser");Object.defineProperty(t,"RowParser",{enumerable:!0,get:function(){return n.RowParser}});var c=e("./Scanner");Object.defineProperty(t,"Scanner",{enumerable:!0,get:function(){return c.Scanner}});var d=e("./Token");Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return d.Token}});var u=e("./column");Object.defineProperty(t,"ColumnParser",{enumerable:!0,get:function(){return u.ColumnParser}}),Object.defineProperty(t,"NonQuotedColumnParser",{enumerable:!0,get:function(){return u.NonQuotedColumnParser}}),Object.defineProperty(t,"QuotedColumnParser",{enumerable:!0,get:function(){return u.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,a,t){"use strict";var o=function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=void 0;let n=o(e("lodash.isundefined")),c=o(e("lodash.isfunction")),d=o(e("lodash.uniq")),u=o(e("lodash.groupby"));t.HeaderTransformer=class{constructor(g){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=g,g.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(g.headers)?this.setHeaders(g.headers):c.default(g.headers)&&(this.headersTransform=g.headers)}transform(g,v){return this.shouldMapRow(g)?v(null,this.processRow(g)):v(null,{row:null,isValid:!0})}shouldMapRow(g){let{parserOptions:v}=this;if(!this.headersTransform&&v.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(g)){if(this.headersTransform)this.setHeaders(this.headersTransform(g));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(g)}return!1}return!0}processRow(g){if(!this.headers)return{row:g,isValid:!0};let{parserOptions:v}=this;if(!v.discardUnmappedColumns&&g.length>this.headersLength){if(!v.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${g.length}`);return{row:g,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${g.length}`}}return v.strictColumnHandling&&g.length!!b);if(d.default(C).length!==C.length){let b=u.default(C),P=Object.keys(b).filter(T=>b[T].length>1);throw new Error("Duplicate headers found "+JSON.stringify(P))}this.headers=g,this.receivedHeaders=!0,this.headersLength=((v=this.headers)===null||v===void 0?void 0:v.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,a,t){"use strict";var o=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.RowTransformerValidator=void 0;let n=o(e("lodash.isfunction")),c=e("../types");class d{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(g){return c.isSyncTransform(g)?(v,C)=>{let b=null;try{b=g(v)}catch(P){return C(P)}return C(null,b)}:g}static createValidator(g){return c.isSyncValidate(g)?(v,C)=>{C(null,{row:v,isValid:g(v)})}:(v,C)=>{g(v,(b,P,T)=>b?C(b):C(null,P?{row:v,isValid:P,reason:T}:{row:v,isValid:!1,reason:T}))}}set rowTransform(g){if(!n.default(g))throw new TypeError("The transform should be a function");this._rowTransform=d.createTransform(g)}set rowValidator(g){if(!n.default(g))throw new TypeError("The validate should be a function");this._rowValidator=d.createValidator(g)}transformAndValidate(g,v){return this.callTransformer(g,(C,b)=>C?v(C):b?this.callValidator(b,(P,T)=>P?v(P):T&&!T.isValid?v(null,{row:b,isValid:!1,reason:T.reason}):v(null,{row:b,isValid:!0})):v(null,{row:null,isValid:!0}))}callTransformer(g,v){return this._rowTransform?this._rowTransform(g,v):v(null,g)}callValidator(g,v){return this._rowValidator?this._rowValidator(g,v):v(null,{row:g,isValid:!0})}}t.RowTransformerValidator=d},{"../types":169,"lodash.isfunction":446}],168:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderTransformer=t.RowTransformerValidator=void 0;var o=e("./RowTransformerValidator");Object.defineProperty(t,"RowTransformerValidator",{enumerable:!0,get:function(){return o.RowTransformerValidator}});var n=e("./HeaderTransformer");Object.defineProperty(t,"HeaderTransformer",{enumerable:!0,get:function(){return n.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSyncValidate=t.isSyncTransform=void 0,t.isSyncTransform=o=>o.length===1,t.isSyncValidate=o=>o.length===1},{}],170:[function(e,a,t){"use strict";let o=t;o.bignum=e("bn.js"),o.define=e("./asn1/api").define,o.base=e("./asn1/base"),o.constants=e("./asn1/constants"),o.decoders=e("./asn1/decoders"),o.encoders=e("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(e,a,t){"use strict";let o=e("./encoders"),n=e("./decoders"),c=e("inherits");function d(u,g){this.name=u,this.body=g,this.decoders={},this.encoders={}}t.define=function(u,g){return new d(u,g)},d.prototype._createNamed=function(u){let g=this.name;function v(C){this._initNamed(C,g)}return c(v,u),v.prototype._initNamed=function(C,b){u.call(this,C,b)},new v(this)},d.prototype._getDecoder=function(u){return u=u||"der",this.decoders.hasOwnProperty(u)||(this.decoders[u]=this._createNamed(n[u])),this.decoders[u]},d.prototype.decode=function(u,g,v){return this._getDecoder(g).decode(u,v)},d.prototype._getEncoder=function(u){return u=u||"der",this.encoders.hasOwnProperty(u)||(this.encoders[u]=this._createNamed(o[u])),this.encoders[u]},d.prototype.encode=function(u,g,v){return this._getEncoder(g).encode(u,v)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,a,t){"use strict";let o=e("inherits"),n=e("../base/reporter").Reporter,c=e("safer-buffer").Buffer;function d(g,v){n.call(this,v),c.isBuffer(g)?(this.base=g,this.offset=0,this.length=g.length):this.error("Input not Buffer")}function u(g,v){if(Array.isArray(g))this.length=0,this.value=g.map(function(C){return u.isEncoderBuffer(C)||(C=new u(C,v)),this.length+=C.length,C},this);else if(typeof g=="number"){if(!(0<=g&&g<=255))return v.error("non-byte EncoderBuffer value");this.value=g,this.length=1}else if(typeof g=="string")this.value=g,this.length=c.byteLength(g);else{if(!c.isBuffer(g))return v.error("Unsupported type: "+typeof g);this.value=g,this.length=g.length}}o(d,n),t.DecoderBuffer=d,d.isDecoderBuffer=function(g){return g instanceof d?!0:typeof g=="object"&&c.isBuffer(g.base)&&g.constructor.name==="DecoderBuffer"&&typeof g.offset=="number"&&typeof g.length=="number"&&typeof g.save=="function"&&typeof g.restore=="function"&&typeof g.isEmpty=="function"&&typeof g.readUInt8=="function"&&typeof g.skip=="function"&&typeof g.raw=="function"},d.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},d.prototype.restore=function(g){let v=new d(this.base);return v.offset=g.offset,v.length=this.offset,this.offset=g.offset,n.prototype.restore.call(this,g.reporter),v},d.prototype.isEmpty=function(){return this.offset===this.length},d.prototype.readUInt8=function(g){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(g||"DecoderBuffer overrun")},d.prototype.skip=function(g,v){if(!(this.offset+g<=this.length))return this.error(v||"DecoderBuffer overrun");let C=new d(this.base);return C._reporterState=this._reporterState,C.offset=this.offset,C.length=this.offset+g,this.offset+=g,C},d.prototype.raw=function(g){return this.base.slice(g?g.offset:this.offset,this.length)},t.EncoderBuffer=u,u.isEncoderBuffer=function(g){return g instanceof u?!0:typeof g=="object"&&g.constructor.name==="EncoderBuffer"&&typeof g.length=="number"&&typeof g.join=="function"},u.prototype.join=function(g,v){return g||(g=c.alloc(this.length)),v||(v=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(C){C.join(g,v),v+=C.length}):(typeof this.value=="number"?g[v]=this.value:typeof this.value=="string"?g.write(this.value,v):c.isBuffer(this.value)&&this.value.copy(g,v),v+=this.length)),g}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,a,t){"use strict";let o=t;o.Reporter=e("./reporter").Reporter,o.DecoderBuffer=e("./buffer").DecoderBuffer,o.EncoderBuffer=e("./buffer").EncoderBuffer,o.Node=e("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(e,a,t){"use strict";let o=e("../base/reporter").Reporter,n=e("../base/buffer").EncoderBuffer,c=e("../base/buffer").DecoderBuffer,d=e("minimalistic-assert"),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],g=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function v(b,P,T){let w={};this._baseState=w,w.name=T,w.enc=b,w.parent=P||null,w.children=null,w.tag=null,w.args=null,w.reverseArgs=null,w.choice=null,w.optional=!1,w.any=!1,w.obj=!1,w.use=null,w.useDecoder=null,w.key=null,w.default=null,w.explicit=null,w.implicit=null,w.contains=null,w.parent||(w.children=[],this._wrap())}a.exports=v;let C=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];v.prototype.clone=function(){let b=this._baseState,P={};C.forEach(function(w){P[w]=b[w]});let T=new this.constructor(P.parent);return T._baseState=P,T},v.prototype._wrap=function(){let b=this._baseState;g.forEach(function(P){this[P]=function(){let T=new this.constructor(this);return b.children.push(T),T[P].apply(T,arguments)}},this)},v.prototype._init=function(b){let P=this._baseState;d(P.parent===null),b.call(this),P.children=P.children.filter(function(T){return T._baseState.parent===this},this),d.equal(P.children.length,1,"Root node can have only one child")},v.prototype._useArgs=function(b){let P=this._baseState,T=b.filter(function(w){return w instanceof this.constructor},this);b=b.filter(function(w){return!(w instanceof this.constructor)},this),T.length!==0&&(d(P.children===null),P.children=T,T.forEach(function(w){w._baseState.parent=this},this)),b.length!==0&&(d(P.args===null),P.args=b,P.reverseArgs=b.map(function(w){if(typeof w!="object"||w.constructor!==Object)return w;let I={};return Object.keys(w).forEach(function(E){E==(0|E)&&(E|=0);let R=w[E];I[R]=E}),I}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(b){v.prototype[b]=function(){let P=this._baseState;throw new Error(b+" not implemented for encoding: "+P.enc)}}),u.forEach(function(b){v.prototype[b]=function(){let P=this._baseState,T=Array.prototype.slice.call(arguments);return d(P.tag===null),P.tag=b,this._useArgs(T),this}}),v.prototype.use=function(b){d(b);let P=this._baseState;return d(P.use===null),P.use=b,this},v.prototype.optional=function(){return this._baseState.optional=!0,this},v.prototype.def=function(b){let P=this._baseState;return d(P.default===null),P.default=b,P.optional=!0,this},v.prototype.explicit=function(b){let P=this._baseState;return d(P.explicit===null&&P.implicit===null),P.explicit=b,this},v.prototype.implicit=function(b){let P=this._baseState;return d(P.explicit===null&&P.implicit===null),P.implicit=b,this},v.prototype.obj=function(){let b=this._baseState,P=Array.prototype.slice.call(arguments);return b.obj=!0,P.length!==0&&this._useArgs(P),this},v.prototype.key=function(b){let P=this._baseState;return d(P.key===null),P.key=b,this},v.prototype.any=function(){return this._baseState.any=!0,this},v.prototype.choice=function(b){let P=this._baseState;return d(P.choice===null),P.choice=b,this._useArgs(Object.keys(b).map(function(T){return b[T]})),this},v.prototype.contains=function(b){let P=this._baseState;return d(P.use===null),P.contains=b,this},v.prototype._decode=function(b,P){let T=this._baseState;if(T.parent===null)return b.wrapResult(T.children[0]._decode(b,P));let w,I=T.default,E=!0,R=null;if(T.key!==null&&(R=b.enterKey(T.key)),T.optional){let G=null;if(T.explicit!==null?G=T.explicit:T.implicit!==null?G=T.implicit:T.tag!==null&&(G=T.tag),G!==null||T.any){if(E=this._peekTag(b,G,T.any),b.isError(E))return E}else{let U=b.save();try{T.choice===null?this._decodeGeneric(T.tag,b,P):this._decodeChoice(b,P),E=!0}catch{E=!1}b.restore(U)}}if(T.obj&&E&&(w=b.enterObject()),E){if(T.explicit!==null){let U=this._decodeTag(b,T.explicit);if(b.isError(U))return U;b=U}let G=b.offset;if(T.use===null&&T.choice===null){let U;T.any&&(U=b.save());let Z=this._decodeTag(b,T.implicit!==null?T.implicit:T.tag,T.any);if(b.isError(Z))return Z;T.any?I=b.raw(U):b=Z}if(P&&P.track&&T.tag!==null&&P.track(b.path(),G,b.length,"tagged"),P&&P.track&&T.tag!==null&&P.track(b.path(),b.offset,b.length,"content"),T.any||(I=T.choice===null?this._decodeGeneric(T.tag,b,P):this._decodeChoice(b,P)),b.isError(I))return I;if(T.any||T.choice!==null||T.children===null||T.children.forEach(function(U){U._decode(b,P)}),T.contains&&(T.tag==="octstr"||T.tag==="bitstr")){let U=new c(I);I=this._getUse(T.contains,b._reporterState.obj)._decode(U,P)}}return T.obj&&E&&(I=b.leaveObject(w)),T.key===null||I===null&&E!==!0?R!==null&&b.exitKey(R):b.leaveKey(R,T.key,I),I},v.prototype._decodeGeneric=function(b,P,T){let w=this._baseState;return b==="seq"||b==="set"?null:b==="seqof"||b==="setof"?this._decodeList(P,b,w.args[0],T):/str$/.test(b)?this._decodeStr(P,b,T):b==="objid"&&w.args?this._decodeObjid(P,w.args[0],w.args[1],T):b==="objid"?this._decodeObjid(P,null,null,T):b==="gentime"||b==="utctime"?this._decodeTime(P,b,T):b==="null_"?this._decodeNull(P,T):b==="bool"?this._decodeBool(P,T):b==="objDesc"?this._decodeStr(P,b,T):b==="int"||b==="enum"?this._decodeInt(P,w.args&&w.args[0],T):w.use!==null?this._getUse(w.use,P._reporterState.obj)._decode(P,T):P.error("unknown tag: "+b)},v.prototype._getUse=function(b,P){let T=this._baseState;return T.useDecoder=this._use(b,P),d(T.useDecoder._baseState.parent===null),T.useDecoder=T.useDecoder._baseState.children[0],T.implicit!==T.useDecoder._baseState.implicit&&(T.useDecoder=T.useDecoder.clone(),T.useDecoder._baseState.implicit=T.implicit),T.useDecoder},v.prototype._decodeChoice=function(b,P){let T=this._baseState,w=null,I=!1;return Object.keys(T.choice).some(function(E){let R=b.save(),G=T.choice[E];try{let U=G._decode(b,P);if(b.isError(U))return!1;w={type:E,value:U},I=!0}catch{return b.restore(R),!1}return!0},this),I?w:b.error("Choice not matched")},v.prototype._createEncoderBuffer=function(b){return new n(b,this.reporter)},v.prototype._encode=function(b,P,T){let w=this._baseState;if(w.default!==null&&w.default===b)return;let I=this._encodeValue(b,P,T);return I===void 0||this._skipDefault(I,P,T)?void 0:I},v.prototype._encodeValue=function(b,P,T){let w=this._baseState;if(w.parent===null)return w.children[0]._encode(b,P||new o);let I=null;if(this.reporter=P,w.optional&&b===void 0){if(w.default===null)return;b=w.default}let E=null,R=!1;if(w.any)I=this._createEncoderBuffer(b);else if(w.choice)I=this._encodeChoice(b,P);else if(w.contains)E=this._getUse(w.contains,T)._encode(b,P),R=!0;else if(w.children)E=w.children.map(function(G){if(G._baseState.tag==="null_")return G._encode(null,P,b);if(G._baseState.key===null)return P.error("Child should have a key");let U=P.enterKey(G._baseState.key);if(typeof b!="object")return P.error("Child expected, but input is not object");let Z=G._encode(b[G._baseState.key],P,b);return P.leaveKey(U),Z},this).filter(function(G){return G}),E=this._createEncoderBuffer(E);else if(w.tag==="seqof"||w.tag==="setof"){if(!w.args||w.args.length!==1)return P.error("Too many args for : "+w.tag);if(!Array.isArray(b))return P.error("seqof/setof, but data is not Array");let G=this.clone();G._baseState.implicit=null,E=this._createEncoderBuffer(b.map(function(U){let Z=this._baseState;return this._getUse(Z.args[0],b)._encode(U,P)},G))}else w.use!==null?I=this._getUse(w.use,T)._encode(b,P):(E=this._encodePrimitive(w.tag,b),R=!0);if(!w.any&&w.choice===null){let G=w.implicit!==null?w.implicit:w.tag,U=w.implicit===null?"universal":"context";G===null?w.use===null&&P.error("Tag could be omitted only for .use()"):w.use===null&&(I=this._encodeComposite(G,R,U,E))}return w.explicit!==null&&(I=this._encodeComposite(w.explicit,!1,"context",I)),I},v.prototype._encodeChoice=function(b,P){let T=this._baseState,w=T.choice[b.type];return w||d(!1,b.type+" not found in "+JSON.stringify(Object.keys(T.choice))),w._encode(b.value,P)},v.prototype._encodePrimitive=function(b,P){let T=this._baseState;if(/str$/.test(b))return this._encodeStr(P,b);if(b==="objid"&&T.args)return this._encodeObjid(P,T.reverseArgs[0],T.args[1]);if(b==="objid")return this._encodeObjid(P,null,null);if(b==="gentime"||b==="utctime")return this._encodeTime(P,b);if(b==="null_")return this._encodeNull();if(b==="int"||b==="enum")return this._encodeInt(P,T.args&&T.reverseArgs[0]);if(b==="bool")return this._encodeBool(P);if(b==="objDesc")return this._encodeStr(P,b);throw new Error("Unsupported tag: "+b)},v.prototype._isNumstr=function(b){return/^[0-9 ]*$/.test(b)},v.prototype._isPrintstr=function(b){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(b)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,a,t){"use strict";let o=e("inherits");function n(d){this._reporterState={obj:null,path:[],options:d||{},errors:[]}}function c(d,u){this.path=d,this.rethrow(u)}t.Reporter=n,n.prototype.isError=function(d){return d instanceof c},n.prototype.save=function(){let d=this._reporterState;return{obj:d.obj,pathLen:d.path.length}},n.prototype.restore=function(d){let u=this._reporterState;u.obj=d.obj,u.path=u.path.slice(0,d.pathLen)},n.prototype.enterKey=function(d){return this._reporterState.path.push(d)},n.prototype.exitKey=function(d){let u=this._reporterState;u.path=u.path.slice(0,d-1)},n.prototype.leaveKey=function(d,u,g){let v=this._reporterState;this.exitKey(d),v.obj!==null&&(v.obj[u]=g)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){let d=this._reporterState,u=d.obj;return d.obj={},u},n.prototype.leaveObject=function(d){let u=this._reporterState,g=u.obj;return u.obj=d,g},n.prototype.error=function(d){let u,g=this._reporterState,v=d instanceof c;if(u=v?d:new c(g.path.map(function(C){return"["+JSON.stringify(C)+"]"}).join(""),d.message||d,d.stack),!g.options.partial)throw u;return v||g.errors.push(u),u},n.prototype.wrapResult=function(d){let u=this._reporterState;return u.options.partial?{result:this.isError(d)?null:d,errors:u.errors}:d},o(c,Error),c.prototype.rethrow=function(d){if(this.message=d+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,c),!this.stack)try{throw new Error(this.message)}catch(u){this.stack=u.stack}return this}},{inherits:440}],176:[function(e,a,t){"use strict";function o(n){let c={};return Object.keys(n).forEach(function(d){(0|d)==d&&(d|=0);let u=n[d];c[u]=d}),c}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=o(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=o(t.tag)},{}],177:[function(e,a,t){"use strict";let o=t;o._reverse=function(n){let c={};return Object.keys(n).forEach(function(d){(0|d)==d&&(d|=0);let u=n[d];c[u]=d}),c},o.der=e("./der")},{"./der":176}],178:[function(e,a,t){"use strict";let o=e("inherits"),n=e("bn.js"),c=e("../base/buffer").DecoderBuffer,d=e("../base/node"),u=e("../constants/der");function g(P){this.enc="der",this.name=P.name,this.entity=P,this.tree=new v,this.tree._init(P.body)}function v(P){d.call(this,"der",P)}function C(P,T){let w=P.readUInt8(T);if(P.isError(w))return w;let I=u.tagClass[w>>6],E=(32&w)==0;if((31&w)==31){let R=w;for(w=0;(128&R)==128;){if(R=P.readUInt8(T),P.isError(R))return R;w<<=7,w|=127&R}}else w&=31;return{cls:I,primitive:E,tag:w,tagStr:u.tag[w]}}function b(P,T,w){let I=P.readUInt8(w);if(P.isError(I))return I;if(!T&&I===128)return null;if((128&I)==0)return I;let E=127&I;if(E>4)return P.error("length octect is too long");I=0;for(let R=0;R=31?Z.error("Multi-octet tag encoding unsupported"):(G||(he|=32),he|=d.tagClassByName[U||"universal"]<<6,he)})(C,b,P,this.reporter);if(T.length<128){let R=n.alloc(2);return R[0]=w,R[1]=T.length,this._createEncoderBuffer([R,T])}let I=1;for(let R=T.length;R>=256;R>>=8)I++;let E=n.alloc(2+I);E[0]=w,E[1]=128|I;for(let R=1+I,G=T.length;G>0;R--,G>>=8)E[R]=255&G;return this._createEncoderBuffer([E,T])},g.prototype._encodeStr=function(C,b){if(b==="bitstr")return this._createEncoderBuffer([0|C.unused,C.data]);if(b==="bmpstr"){let P=n.alloc(2*C.length);for(let T=0;T=40)return this.reporter.error("Second objid identifier OOB");C.splice(0,2,40*C[0]+C[1])}let T=0;for(let E=0;E=128;R>>=7)T++}let w=n.alloc(T),I=w.length-1;for(let E=C.length-1;E>=0;E--){let R=C[E];for(w[I--]=127&R;(R>>=7)>0;)w[I--]=128|127&R}return this._createEncoderBuffer(w)},g.prototype._encodeTime=function(C,b){let P,T=new Date(C);return b==="gentime"?P=[v(T.getUTCFullYear()),v(T.getUTCMonth()+1),v(T.getUTCDate()),v(T.getUTCHours()),v(T.getUTCMinutes()),v(T.getUTCSeconds()),"Z"].join(""):b==="utctime"?P=[v(T.getUTCFullYear()%100),v(T.getUTCMonth()+1),v(T.getUTCDate()),v(T.getUTCHours()),v(T.getUTCMinutes()),v(T.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+b+" time is not supported yet"),this._encodeStr(P,"octstr")},g.prototype._encodeNull=function(){return this._createEncoderBuffer("")},g.prototype._encodeInt=function(C,b){if(typeof C=="string"){if(!b)return this.reporter.error("String int or enum given, but no values map");if(!b.hasOwnProperty(C))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(C));C=b[C]}if(typeof C!="number"&&!n.isBuffer(C)){let w=C.toArray();!C.sign&&128&w[0]&&w.unshift(0),C=n.from(w)}if(n.isBuffer(C)){let w=C.length;C.length===0&&w++;let I=n.alloc(w);return C.copy(I),C.length===0&&(I[0]=0),this._createEncoderBuffer(I)}if(C<128)return this._createEncoderBuffer(C);if(C<256)return this._createEncoderBuffer([0,C]);let P=1;for(let w=C;w>=256;w>>=8)P++;let T=new Array(P);for(let w=T.length-1;w>=0;w--)T[w]=255&C,C>>=8;return 128&T[0]&&T.unshift(0),this._createEncoderBuffer(n.from(T))},g.prototype._encodeBool=function(C){return this._createEncoderBuffer(C?255:0)},g.prototype._use=function(C,b){return typeof C=="function"&&(C=C(b)),C._getEncoder("der").tree},g.prototype._skipDefault=function(C,b,P){let T=this._baseState,w;if(T.default===null)return!1;let I=C.join();if(T.defaultBuffer===void 0&&(T.defaultBuffer=this._encodeValue(T.default,b,P).join()),I.length!==T.defaultBuffer.length)return!1;for(w=0;w=65&&le<=70?le-55:le>=97&&le<=102?le-87:le-48&15}function C(j,Q,le){var O=v(j,le);return le-1>=Q&&(O|=v(j,le-1)<<4),O}function b(j,Q,le,O){for(var k=0,L=Math.min(j.length,le),N=Q;N=49?H-49+10:H>=17?H-17+10:H}return k}u.isBN=function(j){return j instanceof u||j!==null&&typeof j=="object"&&j.constructor.wordSize===u.wordSize&&Array.isArray(j.words)},u.max=function(j,Q){return j.cmp(Q)>0?j:Q},u.min=function(j,Q){return j.cmp(Q)<0?j:Q},u.prototype._init=function(j,Q,le){if(typeof j=="number")return this._initNumber(j,Q,le);if(typeof j=="object")return this._initArray(j,Q,le);Q==="hex"&&(Q=16),c(Q===(0|Q)&&Q>=2&&Q<=36);var O=0;(j=j.toString().replace(/\s+/g,""))[0]==="-"&&(O++,this.negative=1),O=0;O-=3)L=j[O]|j[O-1]<<8|j[O-2]<<16,this.words[k]|=L<>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);else if(le==="le")for(O=0,k=0;O>>26-N&67108863,(N+=24)>=26&&(N-=26,k++);return this.strip()},u.prototype._parseHex=function(j,Q,le){this.length=Math.ceil((j.length-Q)/6),this.words=new Array(this.length);for(var O=0;O=Q;O-=2)k=C(j,Q,O)<=18?(L-=18,N+=1,this.words[N]|=k>>>26):L+=8;else for(O=(j.length-Q)%2==0?Q+1:Q;O=18?(L-=18,N+=1,this.words[N]|=k>>>26):L+=8;this.strip()},u.prototype._parseBase=function(j,Q,le){this.words=[0],this.length=1;for(var O=0,k=1;k<=67108863;k*=Q)O++;O--,k=k/Q|0;for(var L=j.length-le,N=L%O,H=Math.min(L,L-N)+le,$=0,ne=le;ne1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var P=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function I(j,Q,le){le.negative=Q.negative^j.negative;var O=j.length+Q.length|0;le.length=O,O=O-1|0;var k=0|j.words[0],L=0|Q.words[0],N=k*L,H=67108863&N,$=N/67108864|0;le.words[0]=H;for(var ne=1;ne>>26,ye=67108863&$,Le=Math.min(ne,Q.length-1),ee=Math.max(0,ne-j.length+1);ee<=Le;ee++){var Ae=ne-ee|0;xe+=(N=(k=0|j.words[Ae])*(L=0|Q.words[ee])+ye)/67108864|0,ye=67108863&N}le.words[ne]=0|ye,$=0|xe}return $!==0?le.words[ne]=0|$:le.length--,le.strip()}u.prototype.toString=function(j,Q){var le;if(Q=0|Q||1,(j=j||10)===16||j==="hex"){le="";for(var O=0,k=0,L=0;L>>24-O&16777215)!==0||L!==this.length-1?P[6-H.length]+H+le:H+le,(O+=2)>=26&&(O-=26,L--)}for(k!==0&&(le=k.toString(16)+le);le.length%Q!=0;)le="0"+le;return this.negative!==0&&(le="-"+le),le}if(j===(0|j)&&j>=2&&j<=36){var $=T[j],ne=w[j];le="";var xe=this.clone();for(xe.negative=0;!xe.isZero();){var ye=xe.modn(ne).toString(j);le=(xe=xe.idivn(ne)).isZero()?ye+le:P[$-ye.length]+ye+le}for(this.isZero()&&(le="0"+le);le.length%Q!=0;)le="0"+le;return this.negative!==0&&(le="-"+le),le}c(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var j=this.words[0];return this.length===2?j+=67108864*this.words[1]:this.length===3&&this.words[2]===1?j+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-j:j},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(j,Q){return c(g!==void 0),this.toArrayLike(g,j,Q)},u.prototype.toArray=function(j,Q){return this.toArrayLike(Array,j,Q)},u.prototype.toArrayLike=function(j,Q,le){var O=this.byteLength(),k=le||Math.max(1,O);c(O<=k,"byte array longer than desired length"),c(k>0,"Requested array length <= 0"),this.strip();var L,N,H=Q==="le",$=new j(k),ne=this.clone();if(H){for(N=0;!ne.isZero();N++)L=ne.andln(255),ne.iushrn(8),$[N]=L;for(;N=4096&&(le+=13,Q>>>=13),Q>=64&&(le+=7,Q>>>=7),Q>=8&&(le+=4,Q>>>=4),Q>=2&&(le+=2,Q>>>=2),le+Q},u.prototype._zeroBits=function(j){if(j===0)return 26;var Q=j,le=0;return(8191&Q)==0&&(le+=13,Q>>>=13),(127&Q)==0&&(le+=7,Q>>>=7),(15&Q)==0&&(le+=4,Q>>>=4),(3&Q)==0&&(le+=2,Q>>>=2),(1&Q)==0&&le++,le},u.prototype.bitLength=function(){var j=this.words[this.length-1],Q=this._countBits(j);return 26*(this.length-1)+Q},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var j=0,Q=0;Qj.length?this.clone().ior(j):j.clone().ior(this)},u.prototype.uor=function(j){return this.length>j.length?this.clone().iuor(j):j.clone().iuor(this)},u.prototype.iuand=function(j){var Q;Q=this.length>j.length?j:this;for(var le=0;lej.length?this.clone().iand(j):j.clone().iand(this)},u.prototype.uand=function(j){return this.length>j.length?this.clone().iuand(j):j.clone().iuand(this)},u.prototype.iuxor=function(j){var Q,le;this.length>j.length?(Q=this,le=j):(Q=j,le=this);for(var O=0;Oj.length?this.clone().ixor(j):j.clone().ixor(this)},u.prototype.uxor=function(j){return this.length>j.length?this.clone().iuxor(j):j.clone().iuxor(this)},u.prototype.inotn=function(j){c(typeof j=="number"&&j>=0);var Q=0|Math.ceil(j/26),le=j%26;this._expand(Q),le>0&&Q--;for(var O=0;O0&&(this.words[O]=~this.words[O]&67108863>>26-le),this.strip()},u.prototype.notn=function(j){return this.clone().inotn(j)},u.prototype.setn=function(j,Q){c(typeof j=="number"&&j>=0);var le=j/26|0,O=j%26;return this._expand(le+1),this.words[le]=Q?this.words[le]|1<j.length?(le=this,O=j):(le=j,O=this);for(var k=0,L=0;L>>26;for(;k!==0&&L>>26;if(this.length=le.length,k!==0)this.words[this.length]=k,this.length++;else if(le!==this)for(;Lj.length?this.clone().iadd(j):j.clone().iadd(this)},u.prototype.isub=function(j){if(j.negative!==0){j.negative=0;var Q=this.iadd(j);return j.negative=1,Q._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(j),this.negative=1,this._normSign();var le,O,k=this.cmp(j);if(k===0)return this.negative=0,this.length=1,this.words[0]=0,this;k>0?(le=this,O=j):(le=j,O=this);for(var L=0,N=0;N>26,this.words[N]=67108863&Q;for(;L!==0&&N>26,this.words[N]=67108863&Q;if(L===0&&N>>13,ee=0|N[1],Ae=8191&ee,X=ee>>>13,W=0|N[2],_e=8191&W,qe=W>>>13,mt=0|N[3],Je=8191&mt,at=mt>>>13,Qt=0|N[4],Gt=8191&Qt,Qe=Qt>>>13,Vt=0|N[5],Bt=8191&Vt,Ut=Vt>>>13,Yt=0|N[6],ei=8191&Yt,ni=Yt>>>13,Ei=0|N[7],Fi=8191&Ei,Ni=Ei>>>13,un=0|N[8],ji=8191&un,Ki=un>>>13,io=0|N[9],Cn=8191&io,Zi=io>>>13,vn=0|H[0],zi=8191&vn,Li=vn>>>13,Xn=0|H[1],dn=8191&Xn,Tn=Xn>>>13,Cl=0|H[2],Pn=8191&Cl,En=Cl>>>13,Ea=0|H[3],Un=8191&Ea,Wn=Ea>>>13,Wr=0|H[4],kn=8191&Wr,In=Wr>>>13,ar=0|H[5],$n=8191&ar,On=ar>>>13,Qr=0|H[6],Qn=8191&Qr,Rt=Qr>>>13,ui=0|H[7],_i=8191&ui,ki=ui>>>13,wo=0|H[8],Ji=8191&wo,mn=wo>>>13,Ho=0|H[9],Mn=8191&Ho,rn=Ho>>>13;le.negative=j.negative^Q.negative,le.length=19;var No=(ne+(O=Math.imul(ye,zi))|0)+((8191&(k=(k=Math.imul(ye,Li))+Math.imul(Le,zi)|0))<<13)|0;ne=((L=Math.imul(Le,Li))+(k>>>13)|0)+(No>>>26)|0,No&=67108863,O=Math.imul(Ae,zi),k=(k=Math.imul(Ae,Li))+Math.imul(X,zi)|0,L=Math.imul(X,Li);var po=(ne+(O=O+Math.imul(ye,dn)|0)|0)+((8191&(k=(k=k+Math.imul(ye,Tn)|0)+Math.imul(Le,dn)|0))<<13)|0;ne=((L=L+Math.imul(Le,Tn)|0)+(k>>>13)|0)+(po>>>26)|0,po&=67108863,O=Math.imul(_e,zi),k=(k=Math.imul(_e,Li))+Math.imul(qe,zi)|0,L=Math.imul(qe,Li),O=O+Math.imul(Ae,dn)|0,k=(k=k+Math.imul(Ae,Tn)|0)+Math.imul(X,dn)|0,L=L+Math.imul(X,Tn)|0;var mo=(ne+(O=O+Math.imul(ye,Pn)|0)|0)+((8191&(k=(k=k+Math.imul(ye,En)|0)+Math.imul(Le,Pn)|0))<<13)|0;ne=((L=L+Math.imul(Le,En)|0)+(k>>>13)|0)+(mo>>>26)|0,mo&=67108863,O=Math.imul(Je,zi),k=(k=Math.imul(Je,Li))+Math.imul(at,zi)|0,L=Math.imul(at,Li),O=O+Math.imul(_e,dn)|0,k=(k=k+Math.imul(_e,Tn)|0)+Math.imul(qe,dn)|0,L=L+Math.imul(qe,Tn)|0,O=O+Math.imul(Ae,Pn)|0,k=(k=k+Math.imul(Ae,En)|0)+Math.imul(X,Pn)|0,L=L+Math.imul(X,En)|0;var $o=(ne+(O=O+Math.imul(ye,Un)|0)|0)+((8191&(k=(k=k+Math.imul(ye,Wn)|0)+Math.imul(Le,Un)|0))<<13)|0;ne=((L=L+Math.imul(Le,Wn)|0)+(k>>>13)|0)+($o>>>26)|0,$o&=67108863,O=Math.imul(Gt,zi),k=(k=Math.imul(Gt,Li))+Math.imul(Qe,zi)|0,L=Math.imul(Qe,Li),O=O+Math.imul(Je,dn)|0,k=(k=k+Math.imul(Je,Tn)|0)+Math.imul(at,dn)|0,L=L+Math.imul(at,Tn)|0,O=O+Math.imul(_e,Pn)|0,k=(k=k+Math.imul(_e,En)|0)+Math.imul(qe,Pn)|0,L=L+Math.imul(qe,En)|0,O=O+Math.imul(Ae,Un)|0,k=(k=k+Math.imul(Ae,Wn)|0)+Math.imul(X,Un)|0,L=L+Math.imul(X,Wn)|0;var Pa=(ne+(O=O+Math.imul(ye,kn)|0)|0)+((8191&(k=(k=k+Math.imul(ye,In)|0)+Math.imul(Le,kn)|0))<<13)|0;ne=((L=L+Math.imul(Le,In)|0)+(k>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,O=Math.imul(Bt,zi),k=(k=Math.imul(Bt,Li))+Math.imul(Ut,zi)|0,L=Math.imul(Ut,Li),O=O+Math.imul(Gt,dn)|0,k=(k=k+Math.imul(Gt,Tn)|0)+Math.imul(Qe,dn)|0,L=L+Math.imul(Qe,Tn)|0,O=O+Math.imul(Je,Pn)|0,k=(k=k+Math.imul(Je,En)|0)+Math.imul(at,Pn)|0,L=L+Math.imul(at,En)|0,O=O+Math.imul(_e,Un)|0,k=(k=k+Math.imul(_e,Wn)|0)+Math.imul(qe,Un)|0,L=L+Math.imul(qe,Wn)|0,O=O+Math.imul(Ae,kn)|0,k=(k=k+Math.imul(Ae,In)|0)+Math.imul(X,kn)|0,L=L+Math.imul(X,In)|0;var Ua=(ne+(O=O+Math.imul(ye,$n)|0)|0)+((8191&(k=(k=k+Math.imul(ye,On)|0)+Math.imul(Le,$n)|0))<<13)|0;ne=((L=L+Math.imul(Le,On)|0)+(k>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,O=Math.imul(ei,zi),k=(k=Math.imul(ei,Li))+Math.imul(ni,zi)|0,L=Math.imul(ni,Li),O=O+Math.imul(Bt,dn)|0,k=(k=k+Math.imul(Bt,Tn)|0)+Math.imul(Ut,dn)|0,L=L+Math.imul(Ut,Tn)|0,O=O+Math.imul(Gt,Pn)|0,k=(k=k+Math.imul(Gt,En)|0)+Math.imul(Qe,Pn)|0,L=L+Math.imul(Qe,En)|0,O=O+Math.imul(Je,Un)|0,k=(k=k+Math.imul(Je,Wn)|0)+Math.imul(at,Un)|0,L=L+Math.imul(at,Wn)|0,O=O+Math.imul(_e,kn)|0,k=(k=k+Math.imul(_e,In)|0)+Math.imul(qe,kn)|0,L=L+Math.imul(qe,In)|0,O=O+Math.imul(Ae,$n)|0,k=(k=k+Math.imul(Ae,On)|0)+Math.imul(X,$n)|0,L=L+Math.imul(X,On)|0;var rr=(ne+(O=O+Math.imul(ye,Qn)|0)|0)+((8191&(k=(k=k+Math.imul(ye,Rt)|0)+Math.imul(Le,Qn)|0))<<13)|0;ne=((L=L+Math.imul(Le,Rt)|0)+(k>>>13)|0)+(rr>>>26)|0,rr&=67108863,O=Math.imul(Fi,zi),k=(k=Math.imul(Fi,Li))+Math.imul(Ni,zi)|0,L=Math.imul(Ni,Li),O=O+Math.imul(ei,dn)|0,k=(k=k+Math.imul(ei,Tn)|0)+Math.imul(ni,dn)|0,L=L+Math.imul(ni,Tn)|0,O=O+Math.imul(Bt,Pn)|0,k=(k=k+Math.imul(Bt,En)|0)+Math.imul(Ut,Pn)|0,L=L+Math.imul(Ut,En)|0,O=O+Math.imul(Gt,Un)|0,k=(k=k+Math.imul(Gt,Wn)|0)+Math.imul(Qe,Un)|0,L=L+Math.imul(Qe,Wn)|0,O=O+Math.imul(Je,kn)|0,k=(k=k+Math.imul(Je,In)|0)+Math.imul(at,kn)|0,L=L+Math.imul(at,In)|0,O=O+Math.imul(_e,$n)|0,k=(k=k+Math.imul(_e,On)|0)+Math.imul(qe,$n)|0,L=L+Math.imul(qe,On)|0,O=O+Math.imul(Ae,Qn)|0,k=(k=k+Math.imul(Ae,Rt)|0)+Math.imul(X,Qn)|0,L=L+Math.imul(X,Rt)|0;var za=(ne+(O=O+Math.imul(ye,_i)|0)|0)+((8191&(k=(k=k+Math.imul(ye,ki)|0)+Math.imul(Le,_i)|0))<<13)|0;ne=((L=L+Math.imul(Le,ki)|0)+(k>>>13)|0)+(za>>>26)|0,za&=67108863,O=Math.imul(ji,zi),k=(k=Math.imul(ji,Li))+Math.imul(Ki,zi)|0,L=Math.imul(Ki,Li),O=O+Math.imul(Fi,dn)|0,k=(k=k+Math.imul(Fi,Tn)|0)+Math.imul(Ni,dn)|0,L=L+Math.imul(Ni,Tn)|0,O=O+Math.imul(ei,Pn)|0,k=(k=k+Math.imul(ei,En)|0)+Math.imul(ni,Pn)|0,L=L+Math.imul(ni,En)|0,O=O+Math.imul(Bt,Un)|0,k=(k=k+Math.imul(Bt,Wn)|0)+Math.imul(Ut,Un)|0,L=L+Math.imul(Ut,Wn)|0,O=O+Math.imul(Gt,kn)|0,k=(k=k+Math.imul(Gt,In)|0)+Math.imul(Qe,kn)|0,L=L+Math.imul(Qe,In)|0,O=O+Math.imul(Je,$n)|0,k=(k=k+Math.imul(Je,On)|0)+Math.imul(at,$n)|0,L=L+Math.imul(at,On)|0,O=O+Math.imul(_e,Qn)|0,k=(k=k+Math.imul(_e,Rt)|0)+Math.imul(qe,Qn)|0,L=L+Math.imul(qe,Rt)|0,O=O+Math.imul(Ae,_i)|0,k=(k=k+Math.imul(Ae,ki)|0)+Math.imul(X,_i)|0,L=L+Math.imul(X,ki)|0;var Wa=(ne+(O=O+Math.imul(ye,Ji)|0)|0)+((8191&(k=(k=k+Math.imul(ye,mn)|0)+Math.imul(Le,Ji)|0))<<13)|0;ne=((L=L+Math.imul(Le,mn)|0)+(k>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,O=Math.imul(Cn,zi),k=(k=Math.imul(Cn,Li))+Math.imul(Zi,zi)|0,L=Math.imul(Zi,Li),O=O+Math.imul(ji,dn)|0,k=(k=k+Math.imul(ji,Tn)|0)+Math.imul(Ki,dn)|0,L=L+Math.imul(Ki,Tn)|0,O=O+Math.imul(Fi,Pn)|0,k=(k=k+Math.imul(Fi,En)|0)+Math.imul(Ni,Pn)|0,L=L+Math.imul(Ni,En)|0,O=O+Math.imul(ei,Un)|0,k=(k=k+Math.imul(ei,Wn)|0)+Math.imul(ni,Un)|0,L=L+Math.imul(ni,Wn)|0,O=O+Math.imul(Bt,kn)|0,k=(k=k+Math.imul(Bt,In)|0)+Math.imul(Ut,kn)|0,L=L+Math.imul(Ut,In)|0,O=O+Math.imul(Gt,$n)|0,k=(k=k+Math.imul(Gt,On)|0)+Math.imul(Qe,$n)|0,L=L+Math.imul(Qe,On)|0,O=O+Math.imul(Je,Qn)|0,k=(k=k+Math.imul(Je,Rt)|0)+Math.imul(at,Qn)|0,L=L+Math.imul(at,Rt)|0,O=O+Math.imul(_e,_i)|0,k=(k=k+Math.imul(_e,ki)|0)+Math.imul(qe,_i)|0,L=L+Math.imul(qe,ki)|0,O=O+Math.imul(Ae,Ji)|0,k=(k=k+Math.imul(Ae,mn)|0)+Math.imul(X,Ji)|0,L=L+Math.imul(X,mn)|0;var ht=(ne+(O=O+Math.imul(ye,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(ye,rn)|0)+Math.imul(Le,Mn)|0))<<13)|0;ne=((L=L+Math.imul(Le,rn)|0)+(k>>>13)|0)+(ht>>>26)|0,ht&=67108863,O=Math.imul(Cn,dn),k=(k=Math.imul(Cn,Tn))+Math.imul(Zi,dn)|0,L=Math.imul(Zi,Tn),O=O+Math.imul(ji,Pn)|0,k=(k=k+Math.imul(ji,En)|0)+Math.imul(Ki,Pn)|0,L=L+Math.imul(Ki,En)|0,O=O+Math.imul(Fi,Un)|0,k=(k=k+Math.imul(Fi,Wn)|0)+Math.imul(Ni,Un)|0,L=L+Math.imul(Ni,Wn)|0,O=O+Math.imul(ei,kn)|0,k=(k=k+Math.imul(ei,In)|0)+Math.imul(ni,kn)|0,L=L+Math.imul(ni,In)|0,O=O+Math.imul(Bt,$n)|0,k=(k=k+Math.imul(Bt,On)|0)+Math.imul(Ut,$n)|0,L=L+Math.imul(Ut,On)|0,O=O+Math.imul(Gt,Qn)|0,k=(k=k+Math.imul(Gt,Rt)|0)+Math.imul(Qe,Qn)|0,L=L+Math.imul(Qe,Rt)|0,O=O+Math.imul(Je,_i)|0,k=(k=k+Math.imul(Je,ki)|0)+Math.imul(at,_i)|0,L=L+Math.imul(at,ki)|0,O=O+Math.imul(_e,Ji)|0,k=(k=k+Math.imul(_e,mn)|0)+Math.imul(qe,Ji)|0,L=L+Math.imul(qe,mn)|0;var oi=(ne+(O=O+Math.imul(Ae,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(Ae,rn)|0)+Math.imul(X,Mn)|0))<<13)|0;ne=((L=L+Math.imul(X,rn)|0)+(k>>>13)|0)+(oi>>>26)|0,oi&=67108863,O=Math.imul(Cn,Pn),k=(k=Math.imul(Cn,En))+Math.imul(Zi,Pn)|0,L=Math.imul(Zi,En),O=O+Math.imul(ji,Un)|0,k=(k=k+Math.imul(ji,Wn)|0)+Math.imul(Ki,Un)|0,L=L+Math.imul(Ki,Wn)|0,O=O+Math.imul(Fi,kn)|0,k=(k=k+Math.imul(Fi,In)|0)+Math.imul(Ni,kn)|0,L=L+Math.imul(Ni,In)|0,O=O+Math.imul(ei,$n)|0,k=(k=k+Math.imul(ei,On)|0)+Math.imul(ni,$n)|0,L=L+Math.imul(ni,On)|0,O=O+Math.imul(Bt,Qn)|0,k=(k=k+Math.imul(Bt,Rt)|0)+Math.imul(Ut,Qn)|0,L=L+Math.imul(Ut,Rt)|0,O=O+Math.imul(Gt,_i)|0,k=(k=k+Math.imul(Gt,ki)|0)+Math.imul(Qe,_i)|0,L=L+Math.imul(Qe,ki)|0,O=O+Math.imul(Je,Ji)|0,k=(k=k+Math.imul(Je,mn)|0)+Math.imul(at,Ji)|0,L=L+Math.imul(at,mn)|0;var Mi=(ne+(O=O+Math.imul(_e,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(_e,rn)|0)+Math.imul(qe,Mn)|0))<<13)|0;ne=((L=L+Math.imul(qe,rn)|0)+(k>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,O=Math.imul(Cn,Un),k=(k=Math.imul(Cn,Wn))+Math.imul(Zi,Un)|0,L=Math.imul(Zi,Wn),O=O+Math.imul(ji,kn)|0,k=(k=k+Math.imul(ji,In)|0)+Math.imul(Ki,kn)|0,L=L+Math.imul(Ki,In)|0,O=O+Math.imul(Fi,$n)|0,k=(k=k+Math.imul(Fi,On)|0)+Math.imul(Ni,$n)|0,L=L+Math.imul(Ni,On)|0,O=O+Math.imul(ei,Qn)|0,k=(k=k+Math.imul(ei,Rt)|0)+Math.imul(ni,Qn)|0,L=L+Math.imul(ni,Rt)|0,O=O+Math.imul(Bt,_i)|0,k=(k=k+Math.imul(Bt,ki)|0)+Math.imul(Ut,_i)|0,L=L+Math.imul(Ut,ki)|0,O=O+Math.imul(Gt,Ji)|0,k=(k=k+Math.imul(Gt,mn)|0)+Math.imul(Qe,Ji)|0,L=L+Math.imul(Qe,mn)|0;var bi=(ne+(O=O+Math.imul(Je,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(Je,rn)|0)+Math.imul(at,Mn)|0))<<13)|0;ne=((L=L+Math.imul(at,rn)|0)+(k>>>13)|0)+(bi>>>26)|0,bi&=67108863,O=Math.imul(Cn,kn),k=(k=Math.imul(Cn,In))+Math.imul(Zi,kn)|0,L=Math.imul(Zi,In),O=O+Math.imul(ji,$n)|0,k=(k=k+Math.imul(ji,On)|0)+Math.imul(Ki,$n)|0,L=L+Math.imul(Ki,On)|0,O=O+Math.imul(Fi,Qn)|0,k=(k=k+Math.imul(Fi,Rt)|0)+Math.imul(Ni,Qn)|0,L=L+Math.imul(Ni,Rt)|0,O=O+Math.imul(ei,_i)|0,k=(k=k+Math.imul(ei,ki)|0)+Math.imul(ni,_i)|0,L=L+Math.imul(ni,ki)|0,O=O+Math.imul(Bt,Ji)|0,k=(k=k+Math.imul(Bt,mn)|0)+Math.imul(Ut,Ji)|0,L=L+Math.imul(Ut,mn)|0;var Vi=(ne+(O=O+Math.imul(Gt,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(Gt,rn)|0)+Math.imul(Qe,Mn)|0))<<13)|0;ne=((L=L+Math.imul(Qe,rn)|0)+(k>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,O=Math.imul(Cn,$n),k=(k=Math.imul(Cn,On))+Math.imul(Zi,$n)|0,L=Math.imul(Zi,On),O=O+Math.imul(ji,Qn)|0,k=(k=k+Math.imul(ji,Rt)|0)+Math.imul(Ki,Qn)|0,L=L+Math.imul(Ki,Rt)|0,O=O+Math.imul(Fi,_i)|0,k=(k=k+Math.imul(Fi,ki)|0)+Math.imul(Ni,_i)|0,L=L+Math.imul(Ni,ki)|0,O=O+Math.imul(ei,Ji)|0,k=(k=k+Math.imul(ei,mn)|0)+Math.imul(ni,Ji)|0,L=L+Math.imul(ni,mn)|0;var fn=(ne+(O=O+Math.imul(Bt,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(Bt,rn)|0)+Math.imul(Ut,Mn)|0))<<13)|0;ne=((L=L+Math.imul(Ut,rn)|0)+(k>>>13)|0)+(fn>>>26)|0,fn&=67108863,O=Math.imul(Cn,Qn),k=(k=Math.imul(Cn,Rt))+Math.imul(Zi,Qn)|0,L=Math.imul(Zi,Rt),O=O+Math.imul(ji,_i)|0,k=(k=k+Math.imul(ji,ki)|0)+Math.imul(Ki,_i)|0,L=L+Math.imul(Ki,ki)|0,O=O+Math.imul(Fi,Ji)|0,k=(k=k+Math.imul(Fi,mn)|0)+Math.imul(Ni,Ji)|0,L=L+Math.imul(Ni,mn)|0;var _n=(ne+(O=O+Math.imul(ei,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(ei,rn)|0)+Math.imul(ni,Mn)|0))<<13)|0;ne=((L=L+Math.imul(ni,rn)|0)+(k>>>13)|0)+(_n>>>26)|0,_n&=67108863,O=Math.imul(Cn,_i),k=(k=Math.imul(Cn,ki))+Math.imul(Zi,_i)|0,L=Math.imul(Zi,ki),O=O+Math.imul(ji,Ji)|0,k=(k=k+Math.imul(ji,mn)|0)+Math.imul(Ki,Ji)|0,L=L+Math.imul(Ki,mn)|0;var go=(ne+(O=O+Math.imul(Fi,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(Fi,rn)|0)+Math.imul(Ni,Mn)|0))<<13)|0;ne=((L=L+Math.imul(Ni,rn)|0)+(k>>>13)|0)+(go>>>26)|0,go&=67108863,O=Math.imul(Cn,Ji),k=(k=Math.imul(Cn,mn))+Math.imul(Zi,Ji)|0,L=Math.imul(Zi,mn);var Jn=(ne+(O=O+Math.imul(ji,Mn)|0)|0)+((8191&(k=(k=k+Math.imul(ji,rn)|0)+Math.imul(Ki,Mn)|0))<<13)|0;ne=((L=L+Math.imul(Ki,rn)|0)+(k>>>13)|0)+(Jn>>>26)|0,Jn&=67108863;var Ln=(ne+(O=Math.imul(Cn,Mn))|0)+((8191&(k=(k=Math.imul(Cn,rn))+Math.imul(Zi,Mn)|0))<<13)|0;return ne=((L=Math.imul(Zi,rn))+(k>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,$[0]=No,$[1]=po,$[2]=mo,$[3]=$o,$[4]=Pa,$[5]=Ua,$[6]=rr,$[7]=za,$[8]=Wa,$[9]=ht,$[10]=oi,$[11]=Mi,$[12]=bi,$[13]=Vi,$[14]=fn,$[15]=_n,$[16]=go,$[17]=Jn,$[18]=Ln,ne!==0&&($[19]=ne,le.length++),le};function R(j,Q,le){return new G().mulp(j,Q,le)}function G(j,Q){this.x=j,this.y=Q}Math.imul||(E=I),u.prototype.mulTo=function(j,Q){var le=this.length+j.length;return this.length===10&&j.length===10?E(this,j,Q):le<63?I(this,j,Q):le<1024?(function(O,k,L){L.negative=k.negative^O.negative,L.length=O.length+k.length;for(var N=0,H=0,$=0;$>>26)|0)>>>26,ne&=67108863}L.words[$]=xe,N=ne,ne=H}return N!==0?L.words[$]=N:L.length--,L.strip()})(this,j,Q):R(this,j,Q)},G.prototype.makeRBT=function(j){for(var Q=new Array(j),le=u.prototype._countBits(j)-1,O=0;O>=1;return O},G.prototype.permute=function(j,Q,le,O,k,L){for(var N=0;N>>=1)k++;return 1<>>=13,le[2*L+1]=8191&k,k>>>=13;for(L=2*Q;L>=26,Q+=O/67108864|0,Q+=k>>>26,this.words[le]=67108863&k}return Q!==0&&(this.words[le]=Q,this.length++),this},u.prototype.muln=function(j){return this.clone().imuln(j)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(j){var Q=(function(L){for(var N=new Array(L.bitLength()),H=0;H>>ne}return N})(j);if(Q.length===0)return new u(1);for(var le=this,O=0;O=0);var Q,le=j%26,O=(j-le)/26,k=67108863>>>26-le<<26-le;if(le!==0){var L=0;for(Q=0;Q>>26-le}L&&(this.words[Q]=L,this.length++)}if(O!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+O]=this.words[Q];for(Q=0;Q=0),O=Q?(Q-Q%26)/26:0;var k=j%26,L=Math.min((j-k)/26,this.length),N=67108863^67108863>>>k<L)for(this.length-=L,$=0;$=0&&(ne!==0||$>=O);$--){var xe=0|this.words[$];this.words[$]=ne<<26-k|xe>>>k,ne=xe&N}return H&&ne!==0&&(H.words[H.length++]=ne),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(j,Q,le){return c(this.negative===0),this.iushrn(j,Q,le)},u.prototype.shln=function(j){return this.clone().ishln(j)},u.prototype.ushln=function(j){return this.clone().iushln(j)},u.prototype.shrn=function(j){return this.clone().ishrn(j)},u.prototype.ushrn=function(j){return this.clone().iushrn(j)},u.prototype.testn=function(j){c(typeof j=="number"&&j>=0);var Q=j%26,le=(j-Q)/26,O=1<=0);var Q=j%26,le=(j-Q)/26;if(c(this.negative===0,"imaskn works only with positive numbers"),this.length<=le)return this;if(Q!==0&&le++,this.length=Math.min(le,this.length),Q!==0){var O=67108863^67108863>>>Q<=67108864;Q++)this.words[Q]-=67108864,Q===this.length-1?this.words[Q+1]=1:this.words[Q+1]++;return this.length=Math.max(this.length,Q+1),this},u.prototype.isubn=function(j){if(c(typeof j=="number"),c(j<67108864),j<0)return this.iaddn(-j);if(this.negative!==0)return this.negative=0,this.iaddn(j),this.negative=1,this;if(this.words[0]-=j,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Q=0;Q>26)-(H/67108864|0),this.words[O+le]=67108863&k}for(;O>26,this.words[O+le]=67108863&k;if(N===0)return this.strip();for(c(N===-1),N=0,O=0;O>26,this.words[O]=67108863&k;return this.negative=1,this.strip()},u.prototype._wordDiv=function(j,Q){var le=(this.length,j.length),O=this.clone(),k=j,L=0|k.words[k.length-1];(le=26-this._countBits(L))!==0&&(k=k.ushln(le),O.iushln(le),L=0|k.words[k.length-1]);var N,H=O.length-k.length;if(Q!=="mod"){(N=new u(null)).length=H+1,N.words=new Array(N.length);for(var $=0;$=0;xe--){var ye=67108864*(0|O.words[k.length+xe])+(0|O.words[k.length+xe-1]);for(ye=Math.min(ye/L|0,67108863),O._ishlnsubmul(k,ye,xe);O.negative!==0;)ye--,O.negative=0,O._ishlnsubmul(k,1,xe),O.isZero()||(O.negative^=1);N&&(N.words[xe]=ye)}return N&&N.strip(),O.strip(),Q!=="div"&&le!==0&&O.iushrn(le),{div:N||null,mod:O}},u.prototype.divmod=function(j,Q,le){return c(!j.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:this.negative!==0&&j.negative===0?(L=this.neg().divmod(j,Q),Q!=="mod"&&(O=L.div.neg()),Q!=="div"&&(k=L.mod.neg(),le&&k.negative!==0&&k.iadd(j)),{div:O,mod:k}):this.negative===0&&j.negative!==0?(L=this.divmod(j.neg(),Q),Q!=="mod"&&(O=L.div.neg()),{div:O,mod:L.mod}):(this.negative&j.negative)!=0?(L=this.neg().divmod(j.neg(),Q),Q!=="div"&&(k=L.mod.neg(),le&&k.negative!==0&&k.isub(j)),{div:L.div,mod:k}):j.length>this.length||this.cmp(j)<0?{div:new u(0),mod:this}:j.length===1?Q==="div"?{div:this.divn(j.words[0]),mod:null}:Q==="mod"?{div:null,mod:new u(this.modn(j.words[0]))}:{div:this.divn(j.words[0]),mod:new u(this.modn(j.words[0]))}:this._wordDiv(j,Q);var O,k,L},u.prototype.div=function(j){return this.divmod(j,"div",!1).div},u.prototype.mod=function(j){return this.divmod(j,"mod",!1).mod},u.prototype.umod=function(j){return this.divmod(j,"mod",!0).mod},u.prototype.divRound=function(j){var Q=this.divmod(j);if(Q.mod.isZero())return Q.div;var le=Q.div.negative!==0?Q.mod.isub(j):Q.mod,O=j.ushrn(1),k=j.andln(1),L=le.cmp(O);return L<0||k===1&&L===0?Q.div:Q.div.negative!==0?Q.div.isubn(1):Q.div.iaddn(1)},u.prototype.modn=function(j){c(j<=67108863);for(var Q=(1<<26)%j,le=0,O=this.length-1;O>=0;O--)le=(Q*le+(0|this.words[O]))%j;return le},u.prototype.idivn=function(j){c(j<=67108863);for(var Q=0,le=this.length-1;le>=0;le--){var O=(0|this.words[le])+67108864*Q;this.words[le]=O/j|0,Q=O%j}return this.strip()},u.prototype.divn=function(j){return this.clone().idivn(j)},u.prototype.egcd=function(j){c(j.negative===0),c(!j.isZero());var Q=this,le=j.clone();Q=Q.negative!==0?Q.umod(j):Q.clone();for(var O=new u(1),k=new u(0),L=new u(0),N=new u(1),H=0;Q.isEven()&&le.isEven();)Q.iushrn(1),le.iushrn(1),++H;for(var $=le.clone(),ne=Q.clone();!Q.isZero();){for(var xe=0,ye=1;(Q.words[0]&ye)==0&&xe<26;++xe,ye<<=1);if(xe>0)for(Q.iushrn(xe);xe-- >0;)(O.isOdd()||k.isOdd())&&(O.iadd($),k.isub(ne)),O.iushrn(1),k.iushrn(1);for(var Le=0,ee=1;(le.words[0]&ee)==0&&Le<26;++Le,ee<<=1);if(Le>0)for(le.iushrn(Le);Le-- >0;)(L.isOdd()||N.isOdd())&&(L.iadd($),N.isub(ne)),L.iushrn(1),N.iushrn(1);Q.cmp(le)>=0?(Q.isub(le),O.isub(L),k.isub(N)):(le.isub(Q),L.isub(O),N.isub(k))}return{a:L,b:N,gcd:le.iushln(H)}},u.prototype._invmp=function(j){c(j.negative===0),c(!j.isZero());var Q=this,le=j.clone();Q=Q.negative!==0?Q.umod(j):Q.clone();for(var O,k=new u(1),L=new u(0),N=le.clone();Q.cmpn(1)>0&&le.cmpn(1)>0;){for(var H=0,$=1;(Q.words[0]&$)==0&&H<26;++H,$<<=1);if(H>0)for(Q.iushrn(H);H-- >0;)k.isOdd()&&k.iadd(N),k.iushrn(1);for(var ne=0,xe=1;(le.words[0]&xe)==0&&ne<26;++ne,xe<<=1);if(ne>0)for(le.iushrn(ne);ne-- >0;)L.isOdd()&&L.iadd(N),L.iushrn(1);Q.cmp(le)>=0?(Q.isub(le),k.isub(L)):(le.isub(Q),L.isub(k))}return(O=Q.cmpn(1)===0?k:L).cmpn(0)<0&&O.iadd(j),O},u.prototype.gcd=function(j){if(this.isZero())return j.abs();if(j.isZero())return this.abs();var Q=this.clone(),le=j.clone();Q.negative=0,le.negative=0;for(var O=0;Q.isEven()&&le.isEven();O++)Q.iushrn(1),le.iushrn(1);for(;;){for(;Q.isEven();)Q.iushrn(1);for(;le.isEven();)le.iushrn(1);var k=Q.cmp(le);if(k<0){var L=Q;Q=le,le=L}else if(k===0||le.cmpn(1)===0)break;Q.isub(le)}return le.iushln(O)},u.prototype.invm=function(j){return this.egcd(j).a.umod(j)},u.prototype.isEven=function(){return(1&this.words[0])==0},u.prototype.isOdd=function(){return(1&this.words[0])==1},u.prototype.andln=function(j){return this.words[0]&j},u.prototype.bincn=function(j){c(typeof j=="number");var Q=j%26,le=(j-Q)/26,O=1<>>26,N&=67108863,this.words[L]=N}return k!==0&&(this.words[L]=k,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(j){var Q,le=j<0;if(this.negative!==0&&!le)return-1;if(this.negative===0&&le)return 1;if(this.strip(),this.length>1)Q=1;else{le&&(j=-j),c(j<=67108863,"Number is too big");var O=0|this.words[0];Q=O===j?0:Oj.length)return 1;if(this.length=0;le--){var O=0|this.words[le],k=0|j.words[le];if(O!==k){Ok&&(Q=1);break}}return Q},u.prototype.gtn=function(j){return this.cmpn(j)===1},u.prototype.gt=function(j){return this.cmp(j)===1},u.prototype.gten=function(j){return this.cmpn(j)>=0},u.prototype.gte=function(j){return this.cmp(j)>=0},u.prototype.ltn=function(j){return this.cmpn(j)===-1},u.prototype.lt=function(j){return this.cmp(j)===-1},u.prototype.lten=function(j){return this.cmpn(j)<=0},u.prototype.lte=function(j){return this.cmp(j)<=0},u.prototype.eqn=function(j){return this.cmpn(j)===0},u.prototype.eq=function(j){return this.cmp(j)===0},u.red=function(j){return new be(j)},u.prototype.toRed=function(j){return c(!this.red,"Already a number in reduction context"),c(this.negative===0,"red works only with positives"),j.convertTo(this)._forceRed(j)},u.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(j){return this.red=j,this},u.prototype.forceRed=function(j){return c(!this.red,"Already a number in reduction context"),this._forceRed(j)},u.prototype.redAdd=function(j){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,j)},u.prototype.redIAdd=function(j){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,j)},u.prototype.redSub=function(j){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,j)},u.prototype.redISub=function(j){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,j)},u.prototype.redShl=function(j){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,j)},u.prototype.redMul=function(j){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.mul(this,j)},u.prototype.redIMul=function(j){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,j),this.red.imul(this,j)},u.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(j){return c(this.red&&!j.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,j)};var U={k256:null,p224:null,p192:null,p25519:null};function Z(j,Q){this.name=j,this.p=new u(Q,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function he(){Z.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function re(){Z.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function pe(){Z.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function de(){Z.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function be(j){if(typeof j=="string"){var Q=u._prime(j);this.m=Q.p,this.prime=Q}else c(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}function ue(j){be.call(this,j),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Z.prototype._tmp=function(){var j=new u(null);return j.words=new Array(Math.ceil(this.n/13)),j},Z.prototype.ireduce=function(j){var Q,le=j;do this.split(le,this.tmp),Q=(le=(le=this.imulK(le)).iadd(this.tmp)).bitLength();while(Q>this.n);var O=Q0?le.isub(this.p):le.strip!==void 0?le.strip():le._strip(),le},Z.prototype.split=function(j,Q){j.iushrn(this.n,0,Q)},Z.prototype.imulK=function(j){return j.imul(this.k)},d(he,Z),he.prototype.split=function(j,Q){for(var le=Math.min(j.length,9),O=0;O>>22,k=L}k>>>=22,j.words[O-10]=k,k===0&&j.length>10?j.length-=10:j.length-=9},he.prototype.imulK=function(j){j.words[j.length]=0,j.words[j.length+1]=0,j.length+=2;for(var Q=0,le=0;le>>=26,j.words[le]=k,Q=O}return Q!==0&&(j.words[j.length++]=Q),j},u._prime=function(j){if(U[j])return U[j];var Q;if(j==="k256")Q=new he;else if(j==="p224")Q=new re;else if(j==="p192")Q=new pe;else{if(j!=="p25519")throw new Error("Unknown prime "+j);Q=new de}return U[j]=Q,Q},be.prototype._verify1=function(j){c(j.negative===0,"red works only with positives"),c(j.red,"red works only with red numbers")},be.prototype._verify2=function(j,Q){c((j.negative|Q.negative)==0,"red works only with positives"),c(j.red&&j.red===Q.red,"red works only with red numbers")},be.prototype.imod=function(j){return this.prime?this.prime.ireduce(j)._forceRed(this):j.umod(this.m)._forceRed(this)},be.prototype.neg=function(j){return j.isZero()?j.clone():this.m.sub(j)._forceRed(this)},be.prototype.add=function(j,Q){this._verify2(j,Q);var le=j.add(Q);return le.cmp(this.m)>=0&&le.isub(this.m),le._forceRed(this)},be.prototype.iadd=function(j,Q){this._verify2(j,Q);var le=j.iadd(Q);return le.cmp(this.m)>=0&&le.isub(this.m),le},be.prototype.sub=function(j,Q){this._verify2(j,Q);var le=j.sub(Q);return le.cmpn(0)<0&&le.iadd(this.m),le._forceRed(this)},be.prototype.isub=function(j,Q){this._verify2(j,Q);var le=j.isub(Q);return le.cmpn(0)<0&&le.iadd(this.m),le},be.prototype.shl=function(j,Q){return this._verify1(j),this.imod(j.ushln(Q))},be.prototype.imul=function(j,Q){return this._verify2(j,Q),this.imod(j.imul(Q))},be.prototype.mul=function(j,Q){return this._verify2(j,Q),this.imod(j.mul(Q))},be.prototype.isqr=function(j){return this.imul(j,j.clone())},be.prototype.sqr=function(j){return this.mul(j,j)},be.prototype.sqrt=function(j){if(j.isZero())return j.clone();var Q=this.m.andln(3);if(c(Q%2==1),Q===3){var le=this.m.add(new u(1)).iushrn(2);return this.pow(j,le)}for(var O=this.m.subn(1),k=0;!O.isZero()&&O.andln(1)===0;)k++,O.iushrn(1);c(!O.isZero());var L=new u(1).toRed(this),N=L.redNeg(),H=this.m.subn(1).iushrn(1),$=this.m.bitLength();for($=new u(2*$*$).toRed(this);this.pow($,H).cmp(N)!==0;)$.redIAdd(N);for(var ne=this.pow($,O),xe=this.pow(j,O.addn(1).iushrn(1)),ye=this.pow(j,O),Le=k;ye.cmp(L)!==0;){for(var ee=ye,Ae=0;ee.cmp(L)!==0;Ae++)ee=ee.redSqr();c(Ae=0;O--){for(var $=Q.words[O],ne=H-1;ne>=0;ne--){var xe=$>>ne&1;k!==le[0]&&(k=this.sqr(k)),xe!==0||L!==0?(L<<=1,L|=xe,(++N===4||O===0&&ne===0)&&(k=this.mul(k,le[L]),N=0,L=0)):N=0}H=26}return k},be.prototype.convertTo=function(j){var Q=j.umod(this.m);return Q===j?Q.clone():Q},be.prototype.convertFrom=function(j){var Q=j.clone();return Q.red=null,Q},u.mont=function(j){return new ue(j)},d(ue,be),ue.prototype.convertTo=function(j){return this.imod(j.ushln(this.shift))},ue.prototype.convertFrom=function(j){var Q=this.imod(j.mul(this.rinv));return Q.red=null,Q},ue.prototype.imul=function(j,Q){if(j.isZero()||Q.isZero())return j.words[0]=0,j.length=1,j;var le=j.imul(Q),O=le.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=le.isub(O).iushrn(this.shift),L=k;return k.cmp(this.m)>=0?L=k.isub(this.m):k.cmpn(0)<0&&(L=k.iadd(this.m)),L._forceRed(this)},ue.prototype.mul=function(j,Q){if(j.isZero()||Q.isZero())return new u(0)._forceRed(this);var le=j.mul(Q),O=le.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=le.isub(O).iushrn(this.shift),L=k;return k.cmp(this.m)>=0?L=k.isub(this.m):k.cmpn(0)<0&&(L=k.iadd(this.m)),L._forceRed(this)},ue.prototype.invm=function(j){return this.imod(j._invmp(this.m).mul(this.r2))._forceRed(this)}})(a===void 0||a)},{buffer:188}],185:[function(e,a,t){"use strict";t.byteLength=function(b){var P=v(b),T=P[0],w=P[1];return 3*(T+w)/4-w},t.toByteArray=function(b){var P,T,w=v(b),I=w[0],E=w[1],R=new c((function(Z,he,re){return 3*(he+re)/4-re})(0,I,E)),G=0,U=E>0?I-4:I;for(T=0;T>16&255,R[G++]=P>>8&255,R[G++]=255&P;return E===2&&(P=n[b.charCodeAt(T)]<<2|n[b.charCodeAt(T+1)]>>4,R[G++]=255&P),E===1&&(P=n[b.charCodeAt(T)]<<10|n[b.charCodeAt(T+1)]<<4|n[b.charCodeAt(T+2)]>>2,R[G++]=P>>8&255,R[G++]=255&P),R},t.fromByteArray=function(b){for(var P,T=b.length,w=T%3,I=[],E=0,R=T-w;ER?R:E+16383));return w===1?(P=b[T-1],I.push(o[P>>2]+o[P<<4&63]+"==")):w===2&&(P=(b[T-2]<<8)+b[T-1],I.push(o[P>>10]+o[P>>4&63]+o[P<<2&63]+"=")),I.join("")};for(var o=[],n=[],c=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,g=d.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var T=b.indexOf("=");return T===-1&&(T=P),[T,T===P?0:4-T%4]}function C(b,P,T){for(var w,I,E=[],R=P;R>18&63]+o[I>>12&63]+o[I>>6&63]+o[63&I]);return E.join("")}n[45]=62,n[95]=63},{}],186:[function(e,a,t){"use strict";(function(o,n){function c(O,k){if(!O)throw new Error(k||"Assertion failed")}function d(O,k){O.super_=k;var L=function(){};L.prototype=k.prototype,O.prototype=new L,O.prototype.constructor=O}function u(O,k,L){if(u.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&(k!=="le"&&k!=="be"||(L=k,k=10),this._init(O||0,k||10,L||"be"))}var g;typeof o=="object"?o.exports=u:(void 0).BN=u,u.BN=u,u.wordSize=26;try{g=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer}catch{}function v(O,k){var L=O.charCodeAt(k);return L>=48&&L<=57?L-48:L>=65&&L<=70?L-55:L>=97&&L<=102?L-87:void c(!1,"Invalid character in "+O)}function C(O,k,L){var N=v(O,L);return L-1>=k&&(N|=v(O,L-1)<<4),N}function b(O,k,L,N){for(var H=0,$=0,ne=Math.min(O.length,L),xe=k;xe=49?ye-49+10:ye>=17?ye-17+10:ye,c(ye>=0&&$0?O:k},u.min=function(O,k){return O.cmp(k)<0?O:k},u.prototype._init=function(O,k,L){if(typeof O=="number")return this._initNumber(O,k,L);if(typeof O=="object")return this._initArray(O,k,L);k==="hex"&&(k=16),c(k===(0|k)&&k>=2&&k<=36);var N=0;(O=O.toString().replace(/\s+/g,""))[0]==="-"&&(N++,this.negative=1),N=0;N-=3)$=O[N]|O[N-1]<<8|O[N-2]<<16,this.words[H]|=$<>>26-ne&67108863,(ne+=24)>=26&&(ne-=26,H++);else if(L==="le")for(N=0,H=0;N>>26-ne&67108863,(ne+=24)>=26&&(ne-=26,H++);return this._strip()},u.prototype._parseHex=function(O,k,L){this.length=Math.ceil((O.length-k)/6),this.words=new Array(this.length);for(var N=0;N=k;N-=2)H=C(O,k,N)<<$,this.words[ne]|=67108863&H,$>=18?($-=18,ne+=1,this.words[ne]|=H>>>26):$+=8;else for(N=(O.length-k)%2==0?k+1:k;N=18?($-=18,ne+=1,this.words[ne]|=H>>>26):$+=8;this._strip()},u.prototype._parseBase=function(O,k,L){this.words=[0],this.length=1;for(var N=0,H=1;H<=67108863;H*=k)N++;N--,H=H/k|0;for(var $=O.length-L,ne=$%N,xe=Math.min($,$-ne)+L,ye=0,Le=L;Le1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{u.prototype[Symbol.for("nodejs.util.inspect.custom")]=T}catch{u.prototype.inspect=T}else u.prototype.inspect=T;function T(){return(this.red?""}var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];u.prototype.toString=function(O,k){var L;if(k=0|k||1,(O=O||10)===16||O==="hex"){L="";for(var N=0,H=0,$=0;$>>24-N&16777215,(N+=2)>=26&&(N-=26,$--),L=H!==0||$!==this.length-1?w[6-xe.length]+xe+L:xe+L}for(H!==0&&(L=H.toString(16)+L);L.length%k!=0;)L="0"+L;return this.negative!==0&&(L="-"+L),L}if(O===(0|O)&&O>=2&&O<=36){var ye=I[O],Le=E[O];L="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var Ae=ee.modrn(Le).toString(O);L=(ee=ee.idivn(Le)).isZero()?Ae+L:w[ye-Ae.length]+Ae+L}for(this.isZero()&&(L="0"+L);L.length%k!=0;)L="0"+L;return this.negative!==0&&(L="-"+L),L}c(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=67108864*this.words[1]:this.length===3&&this.words[2]===1?O+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},u.prototype.toJSON=function(){return this.toString(16,2)},g&&(u.prototype.toBuffer=function(O,k){return this.toArrayLike(g,O,k)}),u.prototype.toArray=function(O,k){return this.toArrayLike(Array,O,k)};function R(O,k,L){L.negative=k.negative^O.negative;var N=O.length+k.length|0;L.length=N,N=N-1|0;var H=0|O.words[0],$=0|k.words[0],ne=H*$,xe=67108863&ne,ye=ne/67108864|0;L.words[0]=xe;for(var Le=1;Le>>26,Ae=67108863&ye,X=Math.min(Le,k.length-1),W=Math.max(0,Le-O.length+1);W<=X;W++){var _e=Le-W|0;ee+=(ne=(H=0|O.words[_e])*($=0|k.words[W])+Ae)/67108864|0,Ae=67108863&ne}L.words[Le]=0|Ae,ye=0|ee}return ye!==0?L.words[Le]=0|ye:L.length--,L._strip()}u.prototype.toArrayLike=function(O,k,L){this._strip();var N=this.byteLength(),H=L||Math.max(1,N);c(N<=H,"byte array longer than desired length"),c(H>0,"Requested array length <= 0");var $=(function(ne,xe){return ne.allocUnsafe?ne.allocUnsafe(xe):new ne(xe)})(O,H);return this["_toArrayLike"+(k==="le"?"LE":"BE")]($,N),$},u.prototype._toArrayLikeLE=function(O,k){for(var L=0,N=0,H=0,$=0;H>8&255),L>16&255),$===6?(L>24&255),N=0,$=0):(N=ne>>>24,$+=2)}if(L=0&&(O[L--]=ne>>8&255),L>=0&&(O[L--]=ne>>16&255),$===6?(L>=0&&(O[L--]=ne>>24&255),N=0,$=0):(N=ne>>>24,$+=2)}if(L>=0)for(O[L--]=N;L>=0;)O[L--]=0},Math.clz32?u.prototype._countBits=function(O){return 32-Math.clz32(O)}:u.prototype._countBits=function(O){var k=O,L=0;return k>=4096&&(L+=13,k>>>=13),k>=64&&(L+=7,k>>>=7),k>=8&&(L+=4,k>>>=4),k>=2&&(L+=2,k>>>=2),L+k},u.prototype._zeroBits=function(O){if(O===0)return 26;var k=O,L=0;return(8191&k)==0&&(L+=13,k>>>=13),(127&k)==0&&(L+=7,k>>>=7),(15&k)==0&&(L+=4,k>>>=4),(3&k)==0&&(L+=2,k>>>=2),(1&k)==0&&L++,L},u.prototype.bitLength=function(){var O=this.words[this.length-1],k=this._countBits(O);return 26*(this.length-1)+k},u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,k=0;kO.length?this.clone().ior(O):O.clone().ior(this)},u.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},u.prototype.iuand=function(O){var k;k=this.length>O.length?O:this;for(var L=0;LO.length?this.clone().iand(O):O.clone().iand(this)},u.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},u.prototype.iuxor=function(O){var k,L;this.length>O.length?(k=this,L=O):(k=O,L=this);for(var N=0;NO.length?this.clone().ixor(O):O.clone().ixor(this)},u.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},u.prototype.inotn=function(O){c(typeof O=="number"&&O>=0);var k=0|Math.ceil(O/26),L=O%26;this._expand(k),L>0&&k--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-L),this._strip()},u.prototype.notn=function(O){return this.clone().inotn(O)},u.prototype.setn=function(O,k){c(typeof O=="number"&&O>=0);var L=O/26|0,N=O%26;return this._expand(L+1),this.words[L]=k?this.words[L]|1<O.length?(L=this,N=O):(L=O,N=this);for(var H=0,$=0;$>>26;for(;H!==0&&$>>26;if(this.length=L.length,H!==0)this.words[this.length]=H,this.length++;else if(L!==this)for(;$O.length?this.clone().iadd(O):O.clone().iadd(this)},u.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var k=this.iadd(O);return O.negative=1,k._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var L,N,H=this.cmp(O);if(H===0)return this.negative=0,this.length=1,this.words[0]=0,this;H>0?(L=this,N=O):(L=O,N=this);for(var $=0,ne=0;ne>26,this.words[ne]=67108863&k;for(;$!==0&&ne>26,this.words[ne]=67108863&k;if($===0&&ne>>13,W=0|ne[1],_e=8191&W,qe=W>>>13,mt=0|ne[2],Je=8191&mt,at=mt>>>13,Qt=0|ne[3],Gt=8191&Qt,Qe=Qt>>>13,Vt=0|ne[4],Bt=8191&Vt,Ut=Vt>>>13,Yt=0|ne[5],ei=8191&Yt,ni=Yt>>>13,Ei=0|ne[6],Fi=8191&Ei,Ni=Ei>>>13,un=0|ne[7],ji=8191&un,Ki=un>>>13,io=0|ne[8],Cn=8191&io,Zi=io>>>13,vn=0|ne[9],zi=8191&vn,Li=vn>>>13,Xn=0|xe[0],dn=8191&Xn,Tn=Xn>>>13,Cl=0|xe[1],Pn=8191&Cl,En=Cl>>>13,Ea=0|xe[2],Un=8191&Ea,Wn=Ea>>>13,Wr=0|xe[3],kn=8191&Wr,In=Wr>>>13,ar=0|xe[4],$n=8191&ar,On=ar>>>13,Qr=0|xe[5],Qn=8191&Qr,Rt=Qr>>>13,ui=0|xe[6],_i=8191&ui,ki=ui>>>13,wo=0|xe[7],Ji=8191&wo,mn=wo>>>13,Ho=0|xe[8],Mn=8191&Ho,rn=Ho>>>13,No=0|xe[9],po=8191&No,mo=No>>>13;L.negative=O.negative^k.negative,L.length=19;var $o=(Le+(N=Math.imul(Ae,dn))|0)+((8191&(H=(H=Math.imul(Ae,Tn))+Math.imul(X,dn)|0))<<13)|0;Le=(($=Math.imul(X,Tn))+(H>>>13)|0)+($o>>>26)|0,$o&=67108863,N=Math.imul(_e,dn),H=(H=Math.imul(_e,Tn))+Math.imul(qe,dn)|0,$=Math.imul(qe,Tn);var Pa=(Le+(N=N+Math.imul(Ae,Pn)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,En)|0)+Math.imul(X,Pn)|0))<<13)|0;Le=(($=$+Math.imul(X,En)|0)+(H>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,N=Math.imul(Je,dn),H=(H=Math.imul(Je,Tn))+Math.imul(at,dn)|0,$=Math.imul(at,Tn),N=N+Math.imul(_e,Pn)|0,H=(H=H+Math.imul(_e,En)|0)+Math.imul(qe,Pn)|0,$=$+Math.imul(qe,En)|0;var Ua=(Le+(N=N+Math.imul(Ae,Un)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,Wn)|0)+Math.imul(X,Un)|0))<<13)|0;Le=(($=$+Math.imul(X,Wn)|0)+(H>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,N=Math.imul(Gt,dn),H=(H=Math.imul(Gt,Tn))+Math.imul(Qe,dn)|0,$=Math.imul(Qe,Tn),N=N+Math.imul(Je,Pn)|0,H=(H=H+Math.imul(Je,En)|0)+Math.imul(at,Pn)|0,$=$+Math.imul(at,En)|0,N=N+Math.imul(_e,Un)|0,H=(H=H+Math.imul(_e,Wn)|0)+Math.imul(qe,Un)|0,$=$+Math.imul(qe,Wn)|0;var rr=(Le+(N=N+Math.imul(Ae,kn)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,In)|0)+Math.imul(X,kn)|0))<<13)|0;Le=(($=$+Math.imul(X,In)|0)+(H>>>13)|0)+(rr>>>26)|0,rr&=67108863,N=Math.imul(Bt,dn),H=(H=Math.imul(Bt,Tn))+Math.imul(Ut,dn)|0,$=Math.imul(Ut,Tn),N=N+Math.imul(Gt,Pn)|0,H=(H=H+Math.imul(Gt,En)|0)+Math.imul(Qe,Pn)|0,$=$+Math.imul(Qe,En)|0,N=N+Math.imul(Je,Un)|0,H=(H=H+Math.imul(Je,Wn)|0)+Math.imul(at,Un)|0,$=$+Math.imul(at,Wn)|0,N=N+Math.imul(_e,kn)|0,H=(H=H+Math.imul(_e,In)|0)+Math.imul(qe,kn)|0,$=$+Math.imul(qe,In)|0;var za=(Le+(N=N+Math.imul(Ae,$n)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,On)|0)+Math.imul(X,$n)|0))<<13)|0;Le=(($=$+Math.imul(X,On)|0)+(H>>>13)|0)+(za>>>26)|0,za&=67108863,N=Math.imul(ei,dn),H=(H=Math.imul(ei,Tn))+Math.imul(ni,dn)|0,$=Math.imul(ni,Tn),N=N+Math.imul(Bt,Pn)|0,H=(H=H+Math.imul(Bt,En)|0)+Math.imul(Ut,Pn)|0,$=$+Math.imul(Ut,En)|0,N=N+Math.imul(Gt,Un)|0,H=(H=H+Math.imul(Gt,Wn)|0)+Math.imul(Qe,Un)|0,$=$+Math.imul(Qe,Wn)|0,N=N+Math.imul(Je,kn)|0,H=(H=H+Math.imul(Je,In)|0)+Math.imul(at,kn)|0,$=$+Math.imul(at,In)|0,N=N+Math.imul(_e,$n)|0,H=(H=H+Math.imul(_e,On)|0)+Math.imul(qe,$n)|0,$=$+Math.imul(qe,On)|0;var Wa=(Le+(N=N+Math.imul(Ae,Qn)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,Rt)|0)+Math.imul(X,Qn)|0))<<13)|0;Le=(($=$+Math.imul(X,Rt)|0)+(H>>>13)|0)+(Wa>>>26)|0,Wa&=67108863,N=Math.imul(Fi,dn),H=(H=Math.imul(Fi,Tn))+Math.imul(Ni,dn)|0,$=Math.imul(Ni,Tn),N=N+Math.imul(ei,Pn)|0,H=(H=H+Math.imul(ei,En)|0)+Math.imul(ni,Pn)|0,$=$+Math.imul(ni,En)|0,N=N+Math.imul(Bt,Un)|0,H=(H=H+Math.imul(Bt,Wn)|0)+Math.imul(Ut,Un)|0,$=$+Math.imul(Ut,Wn)|0,N=N+Math.imul(Gt,kn)|0,H=(H=H+Math.imul(Gt,In)|0)+Math.imul(Qe,kn)|0,$=$+Math.imul(Qe,In)|0,N=N+Math.imul(Je,$n)|0,H=(H=H+Math.imul(Je,On)|0)+Math.imul(at,$n)|0,$=$+Math.imul(at,On)|0,N=N+Math.imul(_e,Qn)|0,H=(H=H+Math.imul(_e,Rt)|0)+Math.imul(qe,Qn)|0,$=$+Math.imul(qe,Rt)|0;var ht=(Le+(N=N+Math.imul(Ae,_i)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,ki)|0)+Math.imul(X,_i)|0))<<13)|0;Le=(($=$+Math.imul(X,ki)|0)+(H>>>13)|0)+(ht>>>26)|0,ht&=67108863,N=Math.imul(ji,dn),H=(H=Math.imul(ji,Tn))+Math.imul(Ki,dn)|0,$=Math.imul(Ki,Tn),N=N+Math.imul(Fi,Pn)|0,H=(H=H+Math.imul(Fi,En)|0)+Math.imul(Ni,Pn)|0,$=$+Math.imul(Ni,En)|0,N=N+Math.imul(ei,Un)|0,H=(H=H+Math.imul(ei,Wn)|0)+Math.imul(ni,Un)|0,$=$+Math.imul(ni,Wn)|0,N=N+Math.imul(Bt,kn)|0,H=(H=H+Math.imul(Bt,In)|0)+Math.imul(Ut,kn)|0,$=$+Math.imul(Ut,In)|0,N=N+Math.imul(Gt,$n)|0,H=(H=H+Math.imul(Gt,On)|0)+Math.imul(Qe,$n)|0,$=$+Math.imul(Qe,On)|0,N=N+Math.imul(Je,Qn)|0,H=(H=H+Math.imul(Je,Rt)|0)+Math.imul(at,Qn)|0,$=$+Math.imul(at,Rt)|0,N=N+Math.imul(_e,_i)|0,H=(H=H+Math.imul(_e,ki)|0)+Math.imul(qe,_i)|0,$=$+Math.imul(qe,ki)|0;var oi=(Le+(N=N+Math.imul(Ae,Ji)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,mn)|0)+Math.imul(X,Ji)|0))<<13)|0;Le=(($=$+Math.imul(X,mn)|0)+(H>>>13)|0)+(oi>>>26)|0,oi&=67108863,N=Math.imul(Cn,dn),H=(H=Math.imul(Cn,Tn))+Math.imul(Zi,dn)|0,$=Math.imul(Zi,Tn),N=N+Math.imul(ji,Pn)|0,H=(H=H+Math.imul(ji,En)|0)+Math.imul(Ki,Pn)|0,$=$+Math.imul(Ki,En)|0,N=N+Math.imul(Fi,Un)|0,H=(H=H+Math.imul(Fi,Wn)|0)+Math.imul(Ni,Un)|0,$=$+Math.imul(Ni,Wn)|0,N=N+Math.imul(ei,kn)|0,H=(H=H+Math.imul(ei,In)|0)+Math.imul(ni,kn)|0,$=$+Math.imul(ni,In)|0,N=N+Math.imul(Bt,$n)|0,H=(H=H+Math.imul(Bt,On)|0)+Math.imul(Ut,$n)|0,$=$+Math.imul(Ut,On)|0,N=N+Math.imul(Gt,Qn)|0,H=(H=H+Math.imul(Gt,Rt)|0)+Math.imul(Qe,Qn)|0,$=$+Math.imul(Qe,Rt)|0,N=N+Math.imul(Je,_i)|0,H=(H=H+Math.imul(Je,ki)|0)+Math.imul(at,_i)|0,$=$+Math.imul(at,ki)|0,N=N+Math.imul(_e,Ji)|0,H=(H=H+Math.imul(_e,mn)|0)+Math.imul(qe,Ji)|0,$=$+Math.imul(qe,mn)|0;var Mi=(Le+(N=N+Math.imul(Ae,Mn)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,rn)|0)+Math.imul(X,Mn)|0))<<13)|0;Le=(($=$+Math.imul(X,rn)|0)+(H>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,N=Math.imul(zi,dn),H=(H=Math.imul(zi,Tn))+Math.imul(Li,dn)|0,$=Math.imul(Li,Tn),N=N+Math.imul(Cn,Pn)|0,H=(H=H+Math.imul(Cn,En)|0)+Math.imul(Zi,Pn)|0,$=$+Math.imul(Zi,En)|0,N=N+Math.imul(ji,Un)|0,H=(H=H+Math.imul(ji,Wn)|0)+Math.imul(Ki,Un)|0,$=$+Math.imul(Ki,Wn)|0,N=N+Math.imul(Fi,kn)|0,H=(H=H+Math.imul(Fi,In)|0)+Math.imul(Ni,kn)|0,$=$+Math.imul(Ni,In)|0,N=N+Math.imul(ei,$n)|0,H=(H=H+Math.imul(ei,On)|0)+Math.imul(ni,$n)|0,$=$+Math.imul(ni,On)|0,N=N+Math.imul(Bt,Qn)|0,H=(H=H+Math.imul(Bt,Rt)|0)+Math.imul(Ut,Qn)|0,$=$+Math.imul(Ut,Rt)|0,N=N+Math.imul(Gt,_i)|0,H=(H=H+Math.imul(Gt,ki)|0)+Math.imul(Qe,_i)|0,$=$+Math.imul(Qe,ki)|0,N=N+Math.imul(Je,Ji)|0,H=(H=H+Math.imul(Je,mn)|0)+Math.imul(at,Ji)|0,$=$+Math.imul(at,mn)|0,N=N+Math.imul(_e,Mn)|0,H=(H=H+Math.imul(_e,rn)|0)+Math.imul(qe,Mn)|0,$=$+Math.imul(qe,rn)|0;var bi=(Le+(N=N+Math.imul(Ae,po)|0)|0)+((8191&(H=(H=H+Math.imul(Ae,mo)|0)+Math.imul(X,po)|0))<<13)|0;Le=(($=$+Math.imul(X,mo)|0)+(H>>>13)|0)+(bi>>>26)|0,bi&=67108863,N=Math.imul(zi,Pn),H=(H=Math.imul(zi,En))+Math.imul(Li,Pn)|0,$=Math.imul(Li,En),N=N+Math.imul(Cn,Un)|0,H=(H=H+Math.imul(Cn,Wn)|0)+Math.imul(Zi,Un)|0,$=$+Math.imul(Zi,Wn)|0,N=N+Math.imul(ji,kn)|0,H=(H=H+Math.imul(ji,In)|0)+Math.imul(Ki,kn)|0,$=$+Math.imul(Ki,In)|0,N=N+Math.imul(Fi,$n)|0,H=(H=H+Math.imul(Fi,On)|0)+Math.imul(Ni,$n)|0,$=$+Math.imul(Ni,On)|0,N=N+Math.imul(ei,Qn)|0,H=(H=H+Math.imul(ei,Rt)|0)+Math.imul(ni,Qn)|0,$=$+Math.imul(ni,Rt)|0,N=N+Math.imul(Bt,_i)|0,H=(H=H+Math.imul(Bt,ki)|0)+Math.imul(Ut,_i)|0,$=$+Math.imul(Ut,ki)|0,N=N+Math.imul(Gt,Ji)|0,H=(H=H+Math.imul(Gt,mn)|0)+Math.imul(Qe,Ji)|0,$=$+Math.imul(Qe,mn)|0,N=N+Math.imul(Je,Mn)|0,H=(H=H+Math.imul(Je,rn)|0)+Math.imul(at,Mn)|0,$=$+Math.imul(at,rn)|0;var Vi=(Le+(N=N+Math.imul(_e,po)|0)|0)+((8191&(H=(H=H+Math.imul(_e,mo)|0)+Math.imul(qe,po)|0))<<13)|0;Le=(($=$+Math.imul(qe,mo)|0)+(H>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,N=Math.imul(zi,Un),H=(H=Math.imul(zi,Wn))+Math.imul(Li,Un)|0,$=Math.imul(Li,Wn),N=N+Math.imul(Cn,kn)|0,H=(H=H+Math.imul(Cn,In)|0)+Math.imul(Zi,kn)|0,$=$+Math.imul(Zi,In)|0,N=N+Math.imul(ji,$n)|0,H=(H=H+Math.imul(ji,On)|0)+Math.imul(Ki,$n)|0,$=$+Math.imul(Ki,On)|0,N=N+Math.imul(Fi,Qn)|0,H=(H=H+Math.imul(Fi,Rt)|0)+Math.imul(Ni,Qn)|0,$=$+Math.imul(Ni,Rt)|0,N=N+Math.imul(ei,_i)|0,H=(H=H+Math.imul(ei,ki)|0)+Math.imul(ni,_i)|0,$=$+Math.imul(ni,ki)|0,N=N+Math.imul(Bt,Ji)|0,H=(H=H+Math.imul(Bt,mn)|0)+Math.imul(Ut,Ji)|0,$=$+Math.imul(Ut,mn)|0,N=N+Math.imul(Gt,Mn)|0,H=(H=H+Math.imul(Gt,rn)|0)+Math.imul(Qe,Mn)|0,$=$+Math.imul(Qe,rn)|0;var fn=(Le+(N=N+Math.imul(Je,po)|0)|0)+((8191&(H=(H=H+Math.imul(Je,mo)|0)+Math.imul(at,po)|0))<<13)|0;Le=(($=$+Math.imul(at,mo)|0)+(H>>>13)|0)+(fn>>>26)|0,fn&=67108863,N=Math.imul(zi,kn),H=(H=Math.imul(zi,In))+Math.imul(Li,kn)|0,$=Math.imul(Li,In),N=N+Math.imul(Cn,$n)|0,H=(H=H+Math.imul(Cn,On)|0)+Math.imul(Zi,$n)|0,$=$+Math.imul(Zi,On)|0,N=N+Math.imul(ji,Qn)|0,H=(H=H+Math.imul(ji,Rt)|0)+Math.imul(Ki,Qn)|0,$=$+Math.imul(Ki,Rt)|0,N=N+Math.imul(Fi,_i)|0,H=(H=H+Math.imul(Fi,ki)|0)+Math.imul(Ni,_i)|0,$=$+Math.imul(Ni,ki)|0,N=N+Math.imul(ei,Ji)|0,H=(H=H+Math.imul(ei,mn)|0)+Math.imul(ni,Ji)|0,$=$+Math.imul(ni,mn)|0,N=N+Math.imul(Bt,Mn)|0,H=(H=H+Math.imul(Bt,rn)|0)+Math.imul(Ut,Mn)|0,$=$+Math.imul(Ut,rn)|0;var _n=(Le+(N=N+Math.imul(Gt,po)|0)|0)+((8191&(H=(H=H+Math.imul(Gt,mo)|0)+Math.imul(Qe,po)|0))<<13)|0;Le=(($=$+Math.imul(Qe,mo)|0)+(H>>>13)|0)+(_n>>>26)|0,_n&=67108863,N=Math.imul(zi,$n),H=(H=Math.imul(zi,On))+Math.imul(Li,$n)|0,$=Math.imul(Li,On),N=N+Math.imul(Cn,Qn)|0,H=(H=H+Math.imul(Cn,Rt)|0)+Math.imul(Zi,Qn)|0,$=$+Math.imul(Zi,Rt)|0,N=N+Math.imul(ji,_i)|0,H=(H=H+Math.imul(ji,ki)|0)+Math.imul(Ki,_i)|0,$=$+Math.imul(Ki,ki)|0,N=N+Math.imul(Fi,Ji)|0,H=(H=H+Math.imul(Fi,mn)|0)+Math.imul(Ni,Ji)|0,$=$+Math.imul(Ni,mn)|0,N=N+Math.imul(ei,Mn)|0,H=(H=H+Math.imul(ei,rn)|0)+Math.imul(ni,Mn)|0,$=$+Math.imul(ni,rn)|0;var go=(Le+(N=N+Math.imul(Bt,po)|0)|0)+((8191&(H=(H=H+Math.imul(Bt,mo)|0)+Math.imul(Ut,po)|0))<<13)|0;Le=(($=$+Math.imul(Ut,mo)|0)+(H>>>13)|0)+(go>>>26)|0,go&=67108863,N=Math.imul(zi,Qn),H=(H=Math.imul(zi,Rt))+Math.imul(Li,Qn)|0,$=Math.imul(Li,Rt),N=N+Math.imul(Cn,_i)|0,H=(H=H+Math.imul(Cn,ki)|0)+Math.imul(Zi,_i)|0,$=$+Math.imul(Zi,ki)|0,N=N+Math.imul(ji,Ji)|0,H=(H=H+Math.imul(ji,mn)|0)+Math.imul(Ki,Ji)|0,$=$+Math.imul(Ki,mn)|0,N=N+Math.imul(Fi,Mn)|0,H=(H=H+Math.imul(Fi,rn)|0)+Math.imul(Ni,Mn)|0,$=$+Math.imul(Ni,rn)|0;var Jn=(Le+(N=N+Math.imul(ei,po)|0)|0)+((8191&(H=(H=H+Math.imul(ei,mo)|0)+Math.imul(ni,po)|0))<<13)|0;Le=(($=$+Math.imul(ni,mo)|0)+(H>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,N=Math.imul(zi,_i),H=(H=Math.imul(zi,ki))+Math.imul(Li,_i)|0,$=Math.imul(Li,ki),N=N+Math.imul(Cn,Ji)|0,H=(H=H+Math.imul(Cn,mn)|0)+Math.imul(Zi,Ji)|0,$=$+Math.imul(Zi,mn)|0,N=N+Math.imul(ji,Mn)|0,H=(H=H+Math.imul(ji,rn)|0)+Math.imul(Ki,Mn)|0,$=$+Math.imul(Ki,rn)|0;var Ln=(Le+(N=N+Math.imul(Fi,po)|0)|0)+((8191&(H=(H=H+Math.imul(Fi,mo)|0)+Math.imul(Ni,po)|0))<<13)|0;Le=(($=$+Math.imul(Ni,mo)|0)+(H>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,N=Math.imul(zi,Ji),H=(H=Math.imul(zi,mn))+Math.imul(Li,Ji)|0,$=Math.imul(Li,mn),N=N+Math.imul(Cn,Mn)|0,H=(H=H+Math.imul(Cn,rn)|0)+Math.imul(Zi,Mn)|0,$=$+Math.imul(Zi,rn)|0;var Yn=(Le+(N=N+Math.imul(ji,po)|0)|0)+((8191&(H=(H=H+Math.imul(ji,mo)|0)+Math.imul(Ki,po)|0))<<13)|0;Le=(($=$+Math.imul(Ki,mo)|0)+(H>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,N=Math.imul(zi,Mn),H=(H=Math.imul(zi,rn))+Math.imul(Li,Mn)|0,$=Math.imul(Li,rn);var va=(Le+(N=N+Math.imul(Cn,po)|0)|0)+((8191&(H=(H=H+Math.imul(Cn,mo)|0)+Math.imul(Zi,po)|0))<<13)|0;Le=(($=$+Math.imul(Zi,mo)|0)+(H>>>13)|0)+(va>>>26)|0,va&=67108863;var wa=(Le+(N=Math.imul(zi,po))|0)+((8191&(H=(H=Math.imul(zi,mo))+Math.imul(Li,po)|0))<<13)|0;return Le=(($=Math.imul(Li,mo))+(H>>>13)|0)+(wa>>>26)|0,wa&=67108863,ye[0]=$o,ye[1]=Pa,ye[2]=Ua,ye[3]=rr,ye[4]=za,ye[5]=Wa,ye[6]=ht,ye[7]=oi,ye[8]=Mi,ye[9]=bi,ye[10]=Vi,ye[11]=fn,ye[12]=_n,ye[13]=go,ye[14]=Jn,ye[15]=Ln,ye[16]=Yn,ye[17]=va,ye[18]=wa,Le!==0&&(ye[19]=Le,L.length++),L};function U(O,k,L){L.negative=k.negative^O.negative,L.length=O.length+k.length;for(var N=0,H=0,$=0;$>>26)|0)>>>26,ne&=67108863}L.words[$]=xe,N=ne,ne=H}return N!==0?L.words[$]=N:L.length--,L._strip()}function Z(O,k,L){return U(O,k,L)}function he(O,k){this.x=O,this.y=k}Math.imul||(G=R),u.prototype.mulTo=function(O,k){var L=this.length+O.length;return this.length===10&&O.length===10?G(this,O,k):L<63?R(this,O,k):L<1024?U(this,O,k):Z(this,O,k)},he.prototype.makeRBT=function(O){for(var k=new Array(O),L=u.prototype._countBits(O)-1,N=0;N>=1;return N},he.prototype.permute=function(O,k,L,N,H,$){for(var ne=0;ne<$;ne++)N[ne]=k[O[ne]],H[ne]=L[O[ne]]},he.prototype.transform=function(O,k,L,N,H,$){this.permute($,O,k,L,N,H);for(var ne=1;ne>>=1)H++;return 1<>>=13,L[2*$+1]=8191&H,H>>>=13;for($=2*k;$>=26,L+=H/67108864|0,L+=$>>>26,this.words[N]=67108863&$}return L!==0&&(this.words[N]=L,this.length++),k?this.ineg():this},u.prototype.muln=function(O){return this.clone().imuln(O)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(O){var k=(function($){for(var ne=new Array($.bitLength()),xe=0;xe>>Le&1}return ne})(O);if(k.length===0)return new u(1);for(var L=this,N=0;N=0);var k,L=O%26,N=(O-L)/26,H=67108863>>>26-L<<26-L;if(L!==0){var $=0;for(k=0;k>>26-L}$&&(this.words[k]=$,this.length++)}if(N!==0){for(k=this.length-1;k>=0;k--)this.words[k+N]=this.words[k];for(k=0;k=0),N=k?(k-k%26)/26:0;var H=O%26,$=Math.min((O-H)/26,this.length),ne=67108863^67108863>>>H<$)for(this.length-=$,ye=0;ye=0&&(Le!==0||ye>=N);ye--){var ee=0|this.words[ye];this.words[ye]=Le<<26-H|ee>>>H,Le=ee&ne}return xe&&Le!==0&&(xe.words[xe.length++]=Le),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},u.prototype.ishrn=function(O,k,L){return c(this.negative===0),this.iushrn(O,k,L)},u.prototype.shln=function(O){return this.clone().ishln(O)},u.prototype.ushln=function(O){return this.clone().iushln(O)},u.prototype.shrn=function(O){return this.clone().ishrn(O)},u.prototype.ushrn=function(O){return this.clone().iushrn(O)},u.prototype.testn=function(O){c(typeof O=="number"&&O>=0);var k=O%26,L=(O-k)/26,N=1<=0);var k=O%26,L=(O-k)/26;if(c(this.negative===0,"imaskn works only with positive numbers"),this.length<=L)return this;if(k!==0&&L++,this.length=Math.min(L,this.length),k!==0){var N=67108863^67108863>>>k<=67108864;k++)this.words[k]-=67108864,k===this.length-1?this.words[k+1]=1:this.words[k+1]++;return this.length=Math.max(this.length,k+1),this},u.prototype.isubn=function(O){if(c(typeof O=="number"),c(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var k=0;k>26)-(xe/67108864|0),this.words[N+L]=67108863&H}for(;N>26,this.words[N+L]=67108863&H;if(ne===0)return this._strip();for(c(ne===-1),ne=0,N=0;N>26,this.words[N]=67108863&H;return this.negative=1,this._strip()},u.prototype._wordDiv=function(O,k){var L=(this.length,O.length),N=this.clone(),H=O,$=0|H.words[H.length-1];(L=26-this._countBits($))!==0&&(H=H.ushln(L),N.iushln(L),$=0|H.words[H.length-1]);var ne,xe=N.length-H.length;if(k!=="mod"){(ne=new u(null)).length=xe+1,ne.words=new Array(ne.length);for(var ye=0;ye=0;ee--){var Ae=67108864*(0|N.words[H.length+ee])+(0|N.words[H.length+ee-1]);for(Ae=Math.min(Ae/$|0,67108863),N._ishlnsubmul(H,Ae,ee);N.negative!==0;)Ae--,N.negative=0,N._ishlnsubmul(H,1,ee),N.isZero()||(N.negative^=1);ne&&(ne.words[ee]=Ae)}return ne&&ne._strip(),N._strip(),k!=="div"&&L!==0&&N.iushrn(L),{div:ne||null,mod:N}},u.prototype.divmod=function(O,k,L){return c(!O.isZero()),this.isZero()?{div:new u(0),mod:new u(0)}:this.negative!==0&&O.negative===0?($=this.neg().divmod(O,k),k!=="mod"&&(N=$.div.neg()),k!=="div"&&(H=$.mod.neg(),L&&H.negative!==0&&H.iadd(O)),{div:N,mod:H}):this.negative===0&&O.negative!==0?($=this.divmod(O.neg(),k),k!=="mod"&&(N=$.div.neg()),{div:N,mod:$.mod}):(this.negative&O.negative)!=0?($=this.neg().divmod(O.neg(),k),k!=="div"&&(H=$.mod.neg(),L&&H.negative!==0&&H.isub(O)),{div:$.div,mod:H}):O.length>this.length||this.cmp(O)<0?{div:new u(0),mod:this}:O.length===1?k==="div"?{div:this.divn(O.words[0]),mod:null}:k==="mod"?{div:null,mod:new u(this.modrn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new u(this.modrn(O.words[0]))}:this._wordDiv(O,k);var N,H,$},u.prototype.div=function(O){return this.divmod(O,"div",!1).div},u.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},u.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},u.prototype.divRound=function(O){var k=this.divmod(O);if(k.mod.isZero())return k.div;var L=k.div.negative!==0?k.mod.isub(O):k.mod,N=O.ushrn(1),H=O.andln(1),$=L.cmp(N);return $<0||H===1&&$===0?k.div:k.div.negative!==0?k.div.isubn(1):k.div.iaddn(1)},u.prototype.modrn=function(O){var k=O<0;k&&(O=-O),c(O<=67108863);for(var L=(1<<26)%O,N=0,H=this.length-1;H>=0;H--)N=(L*N+(0|this.words[H]))%O;return k?-N:N},u.prototype.modn=function(O){return this.modrn(O)},u.prototype.idivn=function(O){var k=O<0;k&&(O=-O),c(O<=67108863);for(var L=0,N=this.length-1;N>=0;N--){var H=(0|this.words[N])+67108864*L;this.words[N]=H/O|0,L=H%O}return this._strip(),k?this.ineg():this},u.prototype.divn=function(O){return this.clone().idivn(O)},u.prototype.egcd=function(O){c(O.negative===0),c(!O.isZero());var k=this,L=O.clone();k=k.negative!==0?k.umod(O):k.clone();for(var N=new u(1),H=new u(0),$=new u(0),ne=new u(1),xe=0;k.isEven()&&L.isEven();)k.iushrn(1),L.iushrn(1),++xe;for(var ye=L.clone(),Le=k.clone();!k.isZero();){for(var ee=0,Ae=1;(k.words[0]&Ae)==0&&ee<26;++ee,Ae<<=1);if(ee>0)for(k.iushrn(ee);ee-- >0;)(N.isOdd()||H.isOdd())&&(N.iadd(ye),H.isub(Le)),N.iushrn(1),H.iushrn(1);for(var X=0,W=1;(L.words[0]&W)==0&&X<26;++X,W<<=1);if(X>0)for(L.iushrn(X);X-- >0;)($.isOdd()||ne.isOdd())&&($.iadd(ye),ne.isub(Le)),$.iushrn(1),ne.iushrn(1);k.cmp(L)>=0?(k.isub(L),N.isub($),H.isub(ne)):(L.isub(k),$.isub(N),ne.isub(H))}return{a:$,b:ne,gcd:L.iushln(xe)}},u.prototype._invmp=function(O){c(O.negative===0),c(!O.isZero());var k=this,L=O.clone();k=k.negative!==0?k.umod(O):k.clone();for(var N,H=new u(1),$=new u(0),ne=L.clone();k.cmpn(1)>0&&L.cmpn(1)>0;){for(var xe=0,ye=1;(k.words[0]&ye)==0&&xe<26;++xe,ye<<=1);if(xe>0)for(k.iushrn(xe);xe-- >0;)H.isOdd()&&H.iadd(ne),H.iushrn(1);for(var Le=0,ee=1;(L.words[0]&ee)==0&&Le<26;++Le,ee<<=1);if(Le>0)for(L.iushrn(Le);Le-- >0;)$.isOdd()&&$.iadd(ne),$.iushrn(1);k.cmp(L)>=0?(k.isub(L),H.isub($)):(L.isub(k),$.isub(H))}return(N=k.cmpn(1)===0?H:$).cmpn(0)<0&&N.iadd(O),N},u.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var k=this.clone(),L=O.clone();k.negative=0,L.negative=0;for(var N=0;k.isEven()&&L.isEven();N++)k.iushrn(1),L.iushrn(1);for(;;){for(;k.isEven();)k.iushrn(1);for(;L.isEven();)L.iushrn(1);var H=k.cmp(L);if(H<0){var $=k;k=L,L=$}else if(H===0||L.cmpn(1)===0)break;k.isub(L)}return L.iushln(N)},u.prototype.invm=function(O){return this.egcd(O).a.umod(O)},u.prototype.isEven=function(){return(1&this.words[0])==0},u.prototype.isOdd=function(){return(1&this.words[0])==1},u.prototype.andln=function(O){return this.words[0]&O},u.prototype.bincn=function(O){c(typeof O=="number");var k=O%26,L=(O-k)/26,N=1<>>26,ne&=67108863,this.words[$]=ne}return H!==0&&(this.words[$]=H,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(O){var k,L=O<0;if(this.negative!==0&&!L)return-1;if(this.negative===0&&L)return 1;if(this._strip(),this.length>1)k=1;else{L&&(O=-O),c(O<=67108863,"Number is too big");var N=0|this.words[0];k=N===O?0:NO.length)return 1;if(this.length=0;L--){var N=0|this.words[L],H=0|O.words[L];if(N!==H){NH&&(k=1);break}}return k},u.prototype.gtn=function(O){return this.cmpn(O)===1},u.prototype.gt=function(O){return this.cmp(O)===1},u.prototype.gten=function(O){return this.cmpn(O)>=0},u.prototype.gte=function(O){return this.cmp(O)>=0},u.prototype.ltn=function(O){return this.cmpn(O)===-1},u.prototype.lt=function(O){return this.cmp(O)===-1},u.prototype.lten=function(O){return this.cmpn(O)<=0},u.prototype.lte=function(O){return this.cmp(O)<=0},u.prototype.eqn=function(O){return this.cmpn(O)===0},u.prototype.eq=function(O){return this.cmp(O)===0},u.red=function(O){return new Q(O)},u.prototype.toRed=function(O){return c(!this.red,"Already a number in reduction context"),c(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},u.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(O){return this.red=O,this},u.prototype.forceRed=function(O){return c(!this.red,"Already a number in reduction context"),this._forceRed(O)},u.prototype.redAdd=function(O){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},u.prototype.redIAdd=function(O){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},u.prototype.redSub=function(O){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},u.prototype.redISub=function(O){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},u.prototype.redShl=function(O){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},u.prototype.redMul=function(O){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},u.prototype.redIMul=function(O){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},u.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(O){return c(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var re={k256:null,p224:null,p192:null,p25519:null};function pe(O,k){this.name=O,this.p=new u(k,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function de(){pe.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function be(){pe.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function ue(){pe.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function j(){pe.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Q(O){if(typeof O=="string"){var k=u._prime(O);this.m=k.p,this.prime=k}else c(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}function le(O){Q.call(this,O),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}pe.prototype._tmp=function(){var O=new u(null);return O.words=new Array(Math.ceil(this.n/13)),O},pe.prototype.ireduce=function(O){var k,L=O;do this.split(L,this.tmp),k=(L=(L=this.imulK(L)).iadd(this.tmp)).bitLength();while(k>this.n);var N=k0?L.isub(this.p):L.strip!==void 0?L.strip():L._strip(),L},pe.prototype.split=function(O,k){O.iushrn(this.n,0,k)},pe.prototype.imulK=function(O){return O.imul(this.k)},d(de,pe),de.prototype.split=function(O,k){for(var L=Math.min(O.length,9),N=0;N>>22,H=$}H>>>=22,O.words[N-10]=H,H===0&&O.length>10?O.length-=10:O.length-=9},de.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var k=0,L=0;L>>=26,O.words[L]=H,k=N}return k!==0&&(O.words[O.length++]=k),O},u._prime=function(O){if(re[O])return re[O];var k;if(O==="k256")k=new de;else if(O==="p224")k=new be;else if(O==="p192")k=new ue;else{if(O!=="p25519")throw new Error("Unknown prime "+O);k=new j}return re[O]=k,k},Q.prototype._verify1=function(O){c(O.negative===0,"red works only with positives"),c(O.red,"red works only with red numbers")},Q.prototype._verify2=function(O,k){c((O.negative|k.negative)==0,"red works only with positives"),c(O.red&&O.red===k.red,"red works only with red numbers")},Q.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):(P(O,O.umod(this.m)._forceRed(this)),O)},Q.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},Q.prototype.add=function(O,k){this._verify2(O,k);var L=O.add(k);return L.cmp(this.m)>=0&&L.isub(this.m),L._forceRed(this)},Q.prototype.iadd=function(O,k){this._verify2(O,k);var L=O.iadd(k);return L.cmp(this.m)>=0&&L.isub(this.m),L},Q.prototype.sub=function(O,k){this._verify2(O,k);var L=O.sub(k);return L.cmpn(0)<0&&L.iadd(this.m),L._forceRed(this)},Q.prototype.isub=function(O,k){this._verify2(O,k);var L=O.isub(k);return L.cmpn(0)<0&&L.iadd(this.m),L},Q.prototype.shl=function(O,k){return this._verify1(O),this.imod(O.ushln(k))},Q.prototype.imul=function(O,k){return this._verify2(O,k),this.imod(O.imul(k))},Q.prototype.mul=function(O,k){return this._verify2(O,k),this.imod(O.mul(k))},Q.prototype.isqr=function(O){return this.imul(O,O.clone())},Q.prototype.sqr=function(O){return this.mul(O,O)},Q.prototype.sqrt=function(O){if(O.isZero())return O.clone();var k=this.m.andln(3);if(c(k%2==1),k===3){var L=this.m.add(new u(1)).iushrn(2);return this.pow(O,L)}for(var N=this.m.subn(1),H=0;!N.isZero()&&N.andln(1)===0;)H++,N.iushrn(1);c(!N.isZero());var $=new u(1).toRed(this),ne=$.redNeg(),xe=this.m.subn(1).iushrn(1),ye=this.m.bitLength();for(ye=new u(2*ye*ye).toRed(this);this.pow(ye,xe).cmp(ne)!==0;)ye.redIAdd(ne);for(var Le=this.pow(ye,N),ee=this.pow(O,N.addn(1).iushrn(1)),Ae=this.pow(O,N),X=H;Ae.cmp($)!==0;){for(var W=Ae,_e=0;W.cmp($)!==0;_e++)W=W.redSqr();c(_e=0;N--){for(var ye=k.words[N],Le=xe-1;Le>=0;Le--){var ee=ye>>Le&1;H!==L[0]&&(H=this.sqr(H)),ee!==0||$!==0?($<<=1,$|=ee,(++ne===4||N===0&&Le===0)&&(H=this.mul(H,L[$]),ne=0,$=0)):ne=0}xe=26}return H},Q.prototype.convertTo=function(O){var k=O.umod(this.m);return k===O?k.clone():k},Q.prototype.convertFrom=function(O){var k=O.clone();return k.red=null,k},u.mont=function(O){return new le(O)},d(le,Q),le.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},le.prototype.convertFrom=function(O){var k=this.imod(O.mul(this.rinv));return k.red=null,k},le.prototype.imul=function(O,k){if(O.isZero()||k.isZero())return O.words[0]=0,O.length=1,O;var L=O.imul(k),N=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),H=L.isub(N).iushrn(this.shift),$=H;return H.cmp(this.m)>=0?$=H.isub(this.m):H.cmpn(0)<0&&($=H.iadd(this.m)),$._forceRed(this)},le.prototype.mul=function(O,k){if(O.isZero()||k.isZero())return new u(0)._forceRed(this);var L=O.mul(k),N=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),H=L.isub(N).iushrn(this.shift),$=H;return H.cmp(this.m)>=0?$=H.isub(this.m):H.cmpn(0)<0&&($=H.iadd(this.m)),$._forceRed(this)},le.prototype.invm=function(O){return this.imod(O._invmp(this.m).mul(this.r2))._forceRed(this)}})(a===void 0||a)},{buffer:188}],187:[function(e,a,t){"use strict";var o;function n(d){this.rand=d}if(a.exports=function(d){return o||(o=new n(null)),o.generate(d)},a.exports.Rand=n,n.prototype.generate=function(d){return this._rand(d)},n.prototype._rand=function(d){if(this.rand.getBytes)return this.rand.getBytes(d);for(var u=new Uint8Array(d),g=0;g>>24]^Z[de>>>16&255]^he[be>>>8&255]^re[255&ue]^b[j++],E=U[de>>>24]^Z[be>>>16&255]^he[ue>>>8&255]^re[255&pe]^b[j++],R=U[be>>>24]^Z[ue>>>16&255]^he[pe>>>8&255]^re[255&de]^b[j++],G=U[ue>>>24]^Z[pe>>>16&255]^he[de>>>8&255]^re[255&be]^b[j++],pe=I,de=E,be=R,ue=G;return I=(T[pe>>>24]<<24|T[de>>>16&255]<<16|T[be>>>8&255]<<8|T[255&ue])^b[j++],E=(T[de>>>24]<<24|T[be>>>16&255]<<16|T[ue>>>8&255]<<8|T[255&pe])^b[j++],R=(T[be>>>24]<<24|T[ue>>>16&255]<<16|T[pe>>>8&255]<<8|T[255&de])^b[j++],G=(T[ue>>>24]<<24|T[pe>>>16&255]<<16|T[de>>>8&255]<<8|T[255&be])^b[j++],[I>>>=0,E>>>=0,R>>>=0,G>>>=0]}var u=[0,1,2,4,8,16,32,64,128,27,54],g=(function(){for(var C=new Array(256),b=0;b<256;b++)C[b]=b<128?b<<1:b<<1^283;for(var P=[],T=[],w=[[],[],[],[]],I=[[],[],[],[]],E=0,R=0,G=0;G<256;++G){var U=R^R<<1^R<<2^R<<3^R<<4;U=U>>>8^255&U^99,P[E]=U,T[U]=E;var Z=C[E],he=C[Z],re=C[he],pe=257*C[U]^16843008*U;w[0][E]=pe<<24|pe>>>8,w[1][E]=pe<<16|pe>>>16,w[2][E]=pe<<8|pe>>>24,w[3][E]=pe,pe=16843009*re^65537*he^257*Z^16843008*E,I[0][U]=pe<<24|pe>>>8,I[1][U]=pe<<16|pe>>>16,I[2][U]=pe<<8|pe>>>24,I[3][U]=pe,E===0?E=R=1:(E=Z^C[C[C[re^Z]]],R^=C[C[R]])}return{SBOX:P,INV_SBOX:T,SUB_MIX:w,INV_SUB_MIX:I}})();function v(C){this._key=n(C),this._reset()}v.blockSize=16,v.keySize=32,v.prototype.blockSize=v.blockSize,v.prototype.keySize=v.keySize,v.prototype._reset=function(){for(var C=this._key,b=C.length,P=b+6,T=4*(P+1),w=[],I=0;I>>24,E=g.SBOX[E>>>24]<<24|g.SBOX[E>>>16&255]<<16|g.SBOX[E>>>8&255]<<8|g.SBOX[255&E],E^=u[I/b|0]<<24):b>6&&I%b==4&&(E=g.SBOX[E>>>24]<<24|g.SBOX[E>>>16&255]<<16|g.SBOX[E>>>8&255]<<8|g.SBOX[255&E]),w[I]=w[I-b]^E}for(var R=[],G=0;G>>24]]^g.INV_SUB_MIX[1][g.SBOX[Z>>>16&255]]^g.INV_SUB_MIX[2][g.SBOX[Z>>>8&255]]^g.INV_SUB_MIX[3][g.SBOX[255&Z]]}this._nRounds=P,this._keySchedule=w,this._invKeySchedule=R},v.prototype.encryptBlockRaw=function(C){return d(C=n(C),this._keySchedule,g.SUB_MIX,g.SBOX,this._nRounds)},v.prototype.encryptBlock=function(C){var b=this.encryptBlockRaw(C),P=o.allocUnsafe(16);return P.writeUInt32BE(b[0],0),P.writeUInt32BE(b[1],4),P.writeUInt32BE(b[2],8),P.writeUInt32BE(b[3],12),P},v.prototype.decryptBlock=function(C){var b=(C=n(C))[1];C[1]=C[3],C[3]=b;var P=d(C,this._invKeySchedule,g.INV_SUB_MIX,g.INV_SBOX,this._nRounds),T=o.allocUnsafe(16);return T.writeUInt32BE(P[0],0),T.writeUInt32BE(P[3],4),T.writeUInt32BE(P[2],8),T.writeUInt32BE(P[1],12),T},v.prototype.scrub=function(){c(this._keySchedule),c(this._invKeySchedule),c(this._key)},a.exports.AES=v},{"safe-buffer":494}],190:[function(e,a,t){"use strict";var o=e("./aes"),n=e("safe-buffer").Buffer,c=e("cipher-base"),d=e("inherits"),u=e("./ghash"),g=e("buffer-xor"),v=e("./incr32");function C(b,P,T,w){c.call(this);var I=n.alloc(4,0);this._cipher=new o.AES(P);var E=this._cipher.encryptBlock(I);this._ghash=new u(E),T=(function(R,G,U){if(G.length===12)return R._finID=n.concat([G,n.from([0,0,0,1])]),n.concat([G,n.from([0,0,0,2])]);var Z=new u(U),he=G.length,re=he%16;Z.update(G),re&&(re=16-re,Z.update(n.alloc(re,0))),Z.update(n.alloc(8,0));var pe=8*he,de=n.alloc(8);de.writeUIntBE(pe,0,8),Z.update(de),R._finID=Z.state;var be=n.from(R._finID);return v(be),be})(this,T,E),this._prev=n.from(T),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=w,this._alen=0,this._len=0,this._mode=b,this._authTag=null,this._called=!1}d(C,c),C.prototype._update=function(b){if(!this._called&&this._alen){var P=16-this._alen%16;P<16&&(P=n.alloc(P,0),this._ghash.update(P))}this._called=!0;var T=this._mode.encrypt(this,b);return this._decrypt?this._ghash.update(b):this._ghash.update(T),this._len+=b.length,T},C.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var b=g(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&(function(P,T){var w=0;P.length!==T.length&&w++;for(var I=Math.min(P.length,T.length),E=0;E16)throw new Error("unable to decrypt data");for(var E=-1;++E16)return w=this.cache.slice(0,16),this.cache=this.cache.slice(16),w}else if(this.cache.length>=16)return w=this.cache.slice(0,16),this.cache=this.cache.slice(16),w;return null},b.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(T,w){var I=c[T.toLowerCase()];if(!I)throw new TypeError("invalid suite type");var E=v(w,!1,I.key,I.iv);return P(T,E.key,E.iv)},t.createDecipheriv=P},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(e,a,t){"use strict";var o=e("./modes"),n=e("./authCipher"),c=e("safe-buffer").Buffer,d=e("./streamCipher"),u=e("cipher-base"),g=e("./aes"),v=e("evp_bytestokey");function C(w,I,E){u.call(this),this._cache=new P,this._cipher=new g.AES(I),this._prev=c.from(E),this._mode=w,this._autopadding=!0}e("inherits")(C,u),C.prototype._update=function(w){var I,E;this._cache.add(w);for(var R=[];I=this._cache.get();)E=this._mode.encrypt(this,I),R.push(E);return c.concat(R)};var b=c.alloc(16,16);function P(){this.cache=c.allocUnsafe(0)}function T(w,I,E){var R=o[w.toLowerCase()];if(!R)throw new TypeError("invalid suite type");if(typeof I=="string"&&(I=c.from(I)),I.length!==R.key/8)throw new TypeError("invalid key length "+I.length);if(typeof E=="string"&&(E=c.from(E)),R.mode!=="GCM"&&E.length!==R.iv)throw new TypeError("invalid iv length "+E.length);return R.type==="stream"?new d(R.module,I,E):R.type==="auth"?new n(R.module,I,E):new C(R.module,I,E)}C.prototype._final=function(){var w=this._cache.flush();if(this._autopadding)return w=this._mode.encrypt(this,w),this._cipher.scrub(),w;if(!w.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},C.prototype.setAutoPadding=function(w){return this._autopadding=!!w,this},P.prototype.add=function(w){this.cache=c.concat([this.cache,w])},P.prototype.get=function(){if(this.cache.length>15){var w=this.cache.slice(0,16);return this.cache=this.cache.slice(16),w}return null},P.prototype.flush=function(){for(var w=16-this.cache.length,I=c.allocUnsafe(w),E=-1;++E>>0,0),g.writeUInt32BE(u[1]>>>0,4),g.writeUInt32BE(u[2]>>>0,8),g.writeUInt32BE(u[3]>>>0,12),g}function d(u){this.h=u,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}d.prototype.ghash=function(u){for(var g=-1;++g0;g--)C[g]=C[g]>>>1|(1&C[g-1])<<31;C[0]=C[0]>>>1,v&&(C[0]=C[0]^225<<24)}this.state=c(b)},d.prototype.update=function(u){var g;for(this.cache=o.concat([this.cache,u]);this.cache.length>=16;)g=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(g)},d.prototype.final=function(u,g){return this.cache.length&&this.ghash(o.concat([this.cache,n],16)),this.ghash(c([0,u,0,g])),this.state},a.exports=d},{"safe-buffer":494}],195:[function(e,a,t){"use strict";a.exports=function(o){for(var n,c=o.length;c--;){if((n=o.readUInt8(c))!==255){n++,o.writeUInt8(n,c);break}o.writeUInt8(0,c)}}},{}],196:[function(e,a,t){"use strict";var o=e("buffer-xor");t.encrypt=function(n,c){var d=o(c,n._prev);return n._prev=n._cipher.encryptBlock(d),n._prev},t.decrypt=function(n,c){var d=n._prev;n._prev=c;var u=n._cipher.decryptBlock(c);return o(u,d)}},{"buffer-xor":219}],197:[function(e,a,t){"use strict";var o=e("safe-buffer").Buffer,n=e("buffer-xor");function c(d,u,g){var v=u.length,C=n(u,d._cache);return d._cache=d._cache.slice(v),d._prev=o.concat([d._prev,g?u:C]),C}t.encrypt=function(d,u,g){for(var v,C=o.allocUnsafe(0);u.length;){if(d._cache.length===0&&(d._cache=d._cipher.encryptBlock(d._prev),d._prev=o.allocUnsafe(0)),!(d._cache.length<=u.length)){C=o.concat([C,c(d,u,g)]);break}v=d._cache.length,C=o.concat([C,c(d,u.slice(0,v),g)]),u=u.slice(v)}return C}},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,a,t){"use strict";var o=e("safe-buffer").Buffer;function n(d,u,g){for(var v,C,b=-1,P=0;++b<8;)v=u&1<<7-b?128:0,P+=(128&(C=d._cipher.encryptBlock(d._prev)[0]^v))>>b%8,d._prev=c(d._prev,g?v:C);return P}function c(d,u){var g=d.length,v=-1,C=o.allocUnsafe(d.length);for(d=o.concat([d,o.from([u])]);++v>7;return C}t.encrypt=function(d,u,g){for(var v=u.length,C=o.allocUnsafe(v),b=-1;++b=0||!v.umod(g.prime1)||!v.umod(g.prime2));return v}function u(g,v){var C=(function(he){var re=d(he);return{blinder:re.toRed(n.mont(he.modulus)).redPow(new n(he.publicExponent)).fromRed(),unblinder:re.invm(he.modulus)}})(v),b=v.modulus.byteLength(),P=new n(g).mul(C.blinder).umod(v.modulus),T=P.toRed(n.mont(v.prime1)),w=P.toRed(n.mont(v.prime2)),I=v.coefficient,E=v.prime1,R=v.prime2,G=T.redPow(v.exponent1).fromRed(),U=w.redPow(v.exponent2).fromRed(),Z=G.isub(U).imul(I).umod(E).imul(R);return U.iadd(Z).imul(C.unblinder).umod(v.modulus).toArrayLike(o,"be",b)}u.getr=d,a.exports=u}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(e,a,t){"use strict";a.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(e,a,t){a.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],212:[function(e,a,t){a.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],213:[function(e,a,t){"use strict";var o=e("safe-buffer").Buffer,n=e("create-hash"),c=e("readable-stream"),d=e("inherits"),u=e("./sign"),g=e("./verify"),v=e("./algorithms.json");function C(w){c.Writable.call(this);var I=v[w];if(!I)throw new Error("Unknown message digest");this._hashType=I.hash,this._hash=n(I.hash),this._tag=I.id,this._signType=I.sign}function b(w){c.Writable.call(this);var I=v[w];if(!I)throw new Error("Unknown message digest");this._hash=n(I.hash),this._tag=I.id,this._signType=I.sign}function P(w){return new C(w)}function T(w){return new b(w)}Object.keys(v).forEach(function(w){v[w].id=o.from(v[w].id,"hex"),v[w.toLowerCase()]=v[w]}),d(C,c.Writable),C.prototype._write=function(w,I,E){this._hash.update(w),E()},C.prototype.update=function(w,I){return typeof w=="string"&&(w=o.from(w,I)),this._hash.update(w),this},C.prototype.sign=function(w,I){this.end();var E=this._hash.digest(),R=u(E,w,this._hashType,this._signType,this._tag);return I?R.toString(I):R},d(b,c.Writable),b.prototype._write=function(w,I,E){this._hash.update(w),E()},b.prototype.update=function(w,I){return typeof w=="string"&&(w=o.from(w,I)),this._hash.update(w),this},b.prototype.verify=function(w,I,E){typeof I=="string"&&(I=o.from(I,E)),this.end();var R=this._hash.digest();return g(I,R,w,this._signType,this._tag)},a.exports={Sign:P,Verify:T,createSign:P,createVerify:T}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(e,a,t){"use strict";var o=e("safe-buffer").Buffer,n=e("create-hmac"),c=e("browserify-rsa"),d=e("elliptic").ec,u=e("bn.js"),g=e("parse-asn1"),v=e("./curves.json");function C(w,I,E,R){if((w=o.from(w.toArray())).length0&&E.ishrn(R),E}function P(w,I,E){var R,G;do{for(R=o.alloc(0);8*R.length=C)throw new Error("invalid sig")}a.exports=function(v,C,b,P,T){var w=d(b);if(w.type==="ec"){if(P!=="ecdsa"&&P!=="ecdsa/rsa")throw new Error("wrong public key type");return(function(he,re,pe){var de=u[pe.data.algorithm.curve.join(".")];if(!de)throw new Error("unknown curve "+pe.data.algorithm.curve.join("."));var be=new c(de),ue=pe.data.subjectPrivateKey.data;return be.verify(re,he,ue)})(v,C,w)}if(w.type==="dsa"){if(P!=="dsa")throw new Error("wrong public key type");return(function(he,re,pe){var de=pe.data.p,be=pe.data.q,ue=pe.data.g,j=pe.data.pub_key,Q=d.signature.decode(he,"der"),le=Q.s,O=Q.r;g(le,be),g(O,be);var k=n.mont(de),L=le.invm(be);return ue.toRed(k).redPow(new n(re).mul(L).mod(be)).fromRed().mul(j.toRed(k).redPow(O.mul(L).mod(be)).fromRed()).mod(de).mod(be).cmp(O)===0})(v,C,w)}if(P!=="rsa"&&P!=="ecdsa/rsa")throw new Error("wrong public key type");C=o.concat([T,C]);for(var I=w.modulus.byteLength(),E=[1],R=0;C.length+E.length+2>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function u(w){var I=this.lastTotal-this.lastNeed,E=(function(R,G,U){if((192&G[0])!=128)return R.lastNeed=0,"\uFFFD";if(R.lastNeed>1&&G.length>1){if((192&G[1])!=128)return R.lastNeed=1,"\uFFFD";if(R.lastNeed>2&&G.length>2&&(192&G[2])!=128)return R.lastNeed=2,"\uFFFD"}})(this,w);return E!==void 0?E:this.lastNeed<=w.length?(w.copy(this.lastChar,I,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,I,0,w.length),void(this.lastNeed-=w.length))}function g(w,I){if((w.length-I)%2==0){var E=w.toString("utf16le",I);if(E){var R=E.charCodeAt(E.length-1);if(R>=55296&&R<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",I,w.length-1)}function v(w){var I=w&&w.length?this.write(w):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return I+this.lastChar.toString("utf16le",0,E)}return I}function C(w,I){var E=(w.length-I)%3;return E===0?w.toString("base64",I):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",I,w.length-E))}function b(w){var I=w&&w.length?this.write(w):"";return this.lastNeed?I+this.lastChar.toString("base64",0,3-this.lastNeed):I}function P(w){return w.toString(this.encoding)}function T(w){return w&&w.length?this.write(w):""}t.StringDecoder=c,c.prototype.write=function(w){if(w.length===0)return"";var I,E;if(this.lastNeed){if((I=this.fillLast(w))===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E=0?(re>0&&(G.lastNeed=re-1),re):--he=0?(re>0&&(G.lastNeed=re-2),re):--he=0?(re>0&&(re===2?re=0:G.lastNeed=re-3),re):0})(this,w,I);if(!this.lastNeed)return w.toString("utf8",I);this.lastTotal=E;var R=w.length-(E-this.lastNeed);return w.copy(this.lastChar,0,R),w.toString("utf8",I,R)},c.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},{"safe-buffer":217}],219:[function(e,a,t){(function(o){(function(){"use strict";a.exports=function(n,c){for(var d=Math.min(n.length,c.length),u=new o(d),g=0;g2147483647)throw new RangeError('The value "'+X+'" is invalid for option "size"');var W=new Uint8Array(X);return W.__proto__=u.prototype,W}function u(X,W,_e){if(typeof X=="number"){if(typeof W=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(X)}return g(X,W,_e)}function g(X,W,_e){if(typeof X=="string")return(function(Je,at){if(typeof at=="string"&&at!==""||(at="utf8"),!u.isEncoding(at))throw new TypeError("Unknown encoding: "+at);var Qt=0|T(Je,at),Gt=d(Qt),Qe=Gt.write(Je,at);return Qe!==Qt&&(Gt=Gt.slice(0,Qe)),Gt})(X,W);if(ArrayBuffer.isView(X))return b(X);if(X==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(ee(X,ArrayBuffer)||X&&ee(X.buffer,ArrayBuffer))return(function(Je,at,Qt){if(at<0||Je.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|X}function T(X,W){if(u.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||ee(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);var _e=X.length,qe=arguments.length>2&&arguments[2]===!0;if(!qe&&_e===0)return 0;for(var mt=!1;;)switch(W){case"ascii":case"latin1":case"binary":return _e;case"utf8":case"utf-8":return xe(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*_e;case"hex":return _e>>>1;case"base64":return ye(X).length;default:if(mt)return qe?-1:xe(X).length;W=(""+W).toLowerCase(),mt=!0}}function w(X,W,_e){var qe=!1;if((W===void 0||W<0)&&(W=0),W>this.length||((_e===void 0||_e>this.length)&&(_e=this.length),_e<=0)||(_e>>>=0)<=(W>>>=0))return"";for(X||(X="utf8");;)switch(X){case"hex":return Q(this,W,_e);case"utf8":case"utf-8":return be(this,W,_e);case"ascii":return ue(this,W,_e);case"latin1":case"binary":return j(this,W,_e);case"base64":return de(this,W,_e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,W,_e);default:if(qe)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),qe=!0}}function I(X,W,_e){var qe=X[W];X[W]=X[_e],X[_e]=qe}function E(X,W,_e,qe,mt){if(X.length===0)return-1;if(typeof _e=="string"?(qe=_e,_e=0):_e>2147483647?_e=2147483647:_e<-2147483648&&(_e=-2147483648),Ae(_e=+_e)&&(_e=mt?0:X.length-1),_e<0&&(_e=X.length+_e),_e>=X.length){if(mt)return-1;_e=X.length-1}else if(_e<0){if(!mt)return-1;_e=0}if(typeof W=="string"&&(W=u.from(W,qe)),u.isBuffer(W))return W.length===0?-1:R(X,W,_e,qe,mt);if(typeof W=="number")return W&=255,typeof Uint8Array.prototype.indexOf=="function"?mt?Uint8Array.prototype.indexOf.call(X,W,_e):Uint8Array.prototype.lastIndexOf.call(X,W,_e):R(X,[W],_e,qe,mt);throw new TypeError("val must be string, number or Buffer")}function R(X,W,_e,qe,mt){var Je,at=1,Qt=X.length,Gt=W.length;if(qe!==void 0&&((qe=String(qe).toLowerCase())==="ucs2"||qe==="ucs-2"||qe==="utf16le"||qe==="utf-16le")){if(X.length<2||W.length<2)return-1;at=2,Qt/=2,Gt/=2,_e/=2}function Qe(Yt,ei){return at===1?Yt[ei]:Yt.readUInt16BE(ei*at)}if(mt){var Vt=-1;for(Je=_e;JeQt&&(_e=Qt-Gt),Je=_e;Je>=0;Je--){for(var Bt=!0,Ut=0;Utmt&&(qe=mt):qe=mt;var Je=W.length;qe>Je/2&&(qe=Je/2);for(var at=0;at>8,Gt=at%256,Qe.push(Gt),Qe.push(Qt);return Qe})(W,X.length-_e),X,_e,qe)}function de(X,W,_e){return W===0&&_e===X.length?n.fromByteArray(X):n.fromByteArray(X.slice(W,_e))}function be(X,W,_e){_e=Math.min(X.length,_e);for(var qe=[],mt=W;mt<_e;){var Je,at,Qt,Gt,Qe=X[mt],Vt=null,Bt=Qe>239?4:Qe>223?3:Qe>191?2:1;if(mt+Bt<=_e)switch(Bt){case 1:Qe<128&&(Vt=Qe);break;case 2:(192&(Je=X[mt+1]))==128&&(Gt=(31&Qe)<<6|63&Je)>127&&(Vt=Gt);break;case 3:Je=X[mt+1],at=X[mt+2],(192&Je)==128&&(192&at)==128&&(Gt=(15&Qe)<<12|(63&Je)<<6|63&at)>2047&&(Gt<55296||Gt>57343)&&(Vt=Gt);break;case 4:Je=X[mt+1],at=X[mt+2],Qt=X[mt+3],(192&Je)==128&&(192&at)==128&&(192&Qt)==128&&(Gt=(15&Qe)<<18|(63&Je)<<12|(63&at)<<6|63&Qt)>65535&&Gt<1114112&&(Vt=Gt)}Vt===null?(Vt=65533,Bt=1):Vt>65535&&(Vt-=65536,qe.push(Vt>>>10&1023|55296),Vt=56320|1023&Vt),qe.push(Vt),mt+=Bt}return(function(Ut){var Yt=Ut.length;if(Yt<=4096)return String.fromCharCode.apply(String,Ut);for(var ei="",ni=0;ni"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),u.poolSize=8192,u.from=function(X,W,_e){return g(X,W,_e)},u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,u.alloc=function(X,W,_e){return(function(qe,mt,Je){return v(qe),qe<=0?d(qe):mt!==void 0?typeof Je=="string"?d(qe).fill(mt,Je):d(qe).fill(mt):d(qe)})(X,W,_e)},u.allocUnsafe=function(X){return C(X)},u.allocUnsafeSlow=function(X){return C(X)},u.isBuffer=function(X){return X!=null&&X._isBuffer===!0&&X!==u.prototype},u.compare=function(X,W){if(ee(X,Uint8Array)&&(X=u.from(X,X.offset,X.byteLength)),ee(W,Uint8Array)&&(W=u.from(W,W.offset,W.byteLength)),!u.isBuffer(X)||!u.isBuffer(W))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(X===W)return 0;for(var _e=X.length,qe=W.length,mt=0,Je=Math.min(_e,qe);mtW&&(X+=" ... "),""},u.prototype.compare=function(X,W,_e,qe,mt){if(ee(X,Uint8Array)&&(X=u.from(X,X.offset,X.byteLength)),!u.isBuffer(X))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof X);if(W===void 0&&(W=0),_e===void 0&&(_e=X?X.length:0),qe===void 0&&(qe=0),mt===void 0&&(mt=this.length),W<0||_e>X.length||qe<0||mt>this.length)throw new RangeError("out of range index");if(qe>=mt&&W>=_e)return 0;if(qe>=mt)return-1;if(W>=_e)return 1;if(this===X)return 0;for(var Je=(mt>>>=0)-(qe>>>=0),at=(_e>>>=0)-(W>>>=0),Qt=Math.min(Je,at),Gt=this.slice(qe,mt),Qe=X.slice(W,_e),Vt=0;Vt>>=0,isFinite(_e)?(_e>>>=0,qe===void 0&&(qe="utf8")):(qe=_e,_e=void 0)}var mt=this.length-W;if((_e===void 0||_e>mt)&&(_e=mt),X.length>0&&(_e<0||W<0)||W>this.length)throw new RangeError("Attempt to write outside buffer bounds");qe||(qe="utf8");for(var Je=!1;;)switch(qe){case"hex":return G(this,X,W,_e);case"utf8":case"utf-8":return U(this,X,W,_e);case"ascii":return Z(this,X,W,_e);case"latin1":case"binary":return he(this,X,W,_e);case"base64":return re(this,X,W,_e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,X,W,_e);default:if(Je)throw new TypeError("Unknown encoding: "+qe);qe=(""+qe).toLowerCase(),Je=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(X,W,_e){var qe="";_e=Math.min(X.length,_e);for(var mt=W;mt<_e;++mt)qe+=String.fromCharCode(127&X[mt]);return qe}function j(X,W,_e){var qe="";_e=Math.min(X.length,_e);for(var mt=W;mt<_e;++mt)qe+=String.fromCharCode(X[mt]);return qe}function Q(X,W,_e){var qe=X.length;(!W||W<0)&&(W=0),(!_e||_e<0||_e>qe)&&(_e=qe);for(var mt="",Je=W;Je<_e;++Je)mt+=ne(X[Je]);return mt}function le(X,W,_e){for(var qe=X.slice(W,_e),mt="",Je=0;Je_e)throw new RangeError("Trying to access beyond buffer length")}function k(X,W,_e,qe,mt,Je){if(!u.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>mt||WX.length)throw new RangeError("Index out of range")}function L(X,W,_e,qe,mt,Je){if(_e+qe>X.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("Index out of range")}function N(X,W,_e,qe,mt){return W=+W,_e>>>=0,mt||L(X,0,_e,4),c.write(X,W,_e,qe,23,4),_e+4}function H(X,W,_e,qe,mt){return W=+W,_e>>>=0,mt||L(X,0,_e,8),c.write(X,W,_e,qe,52,8),_e+8}u.prototype.slice=function(X,W){var _e=this.length;(X=~~X)<0?(X+=_e)<0&&(X=0):X>_e&&(X=_e),(W=W===void 0?_e:~~W)<0?(W+=_e)<0&&(W=0):W>_e&&(W=_e),W>>=0,W>>>=0,_e||O(X,W,this.length);for(var qe=this[X],mt=1,Je=0;++Je>>=0,W>>>=0,_e||O(X,W,this.length);for(var qe=this[X+--W],mt=1;W>0&&(mt*=256);)qe+=this[X+--W]*mt;return qe},u.prototype.readUInt8=function(X,W){return X>>>=0,W||O(X,1,this.length),this[X]},u.prototype.readUInt16LE=function(X,W){return X>>>=0,W||O(X,2,this.length),this[X]|this[X+1]<<8},u.prototype.readUInt16BE=function(X,W){return X>>>=0,W||O(X,2,this.length),this[X]<<8|this[X+1]},u.prototype.readUInt32LE=function(X,W){return X>>>=0,W||O(X,4,this.length),(this[X]|this[X+1]<<8|this[X+2]<<16)+16777216*this[X+3]},u.prototype.readUInt32BE=function(X,W){return X>>>=0,W||O(X,4,this.length),16777216*this[X]+(this[X+1]<<16|this[X+2]<<8|this[X+3])},u.prototype.readIntLE=function(X,W,_e){X>>>=0,W>>>=0,_e||O(X,W,this.length);for(var qe=this[X],mt=1,Je=0;++Je=(mt*=128)&&(qe-=Math.pow(2,8*W)),qe},u.prototype.readIntBE=function(X,W,_e){X>>>=0,W>>>=0,_e||O(X,W,this.length);for(var qe=W,mt=1,Je=this[X+--qe];qe>0&&(mt*=256);)Je+=this[X+--qe]*mt;return Je>=(mt*=128)&&(Je-=Math.pow(2,8*W)),Je},u.prototype.readInt8=function(X,W){return X>>>=0,W||O(X,1,this.length),128&this[X]?-1*(255-this[X]+1):this[X]},u.prototype.readInt16LE=function(X,W){X>>>=0,W||O(X,2,this.length);var _e=this[X]|this[X+1]<<8;return 32768&_e?4294901760|_e:_e},u.prototype.readInt16BE=function(X,W){X>>>=0,W||O(X,2,this.length);var _e=this[X+1]|this[X]<<8;return 32768&_e?4294901760|_e:_e},u.prototype.readInt32LE=function(X,W){return X>>>=0,W||O(X,4,this.length),this[X]|this[X+1]<<8|this[X+2]<<16|this[X+3]<<24},u.prototype.readInt32BE=function(X,W){return X>>>=0,W||O(X,4,this.length),this[X]<<24|this[X+1]<<16|this[X+2]<<8|this[X+3]},u.prototype.readFloatLE=function(X,W){return X>>>=0,W||O(X,4,this.length),c.read(this,X,!0,23,4)},u.prototype.readFloatBE=function(X,W){return X>>>=0,W||O(X,4,this.length),c.read(this,X,!1,23,4)},u.prototype.readDoubleLE=function(X,W){return X>>>=0,W||O(X,8,this.length),c.read(this,X,!0,52,8)},u.prototype.readDoubleBE=function(X,W){return X>>>=0,W||O(X,8,this.length),c.read(this,X,!1,52,8)},u.prototype.writeUIntLE=function(X,W,_e,qe){X=+X,W>>>=0,_e>>>=0,qe||k(this,X,W,_e,Math.pow(2,8*_e)-1,0);var mt=1,Je=0;for(this[W]=255&X;++Je<_e&&(mt*=256);)this[W+Je]=X/mt&255;return W+_e},u.prototype.writeUIntBE=function(X,W,_e,qe){X=+X,W>>>=0,_e>>>=0,qe||k(this,X,W,_e,Math.pow(2,8*_e)-1,0);var mt=_e-1,Je=1;for(this[W+mt]=255&X;--mt>=0&&(Je*=256);)this[W+mt]=X/Je&255;return W+_e},u.prototype.writeUInt8=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,1,255,0),this[W]=255&X,W+1},u.prototype.writeUInt16LE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,2,65535,0),this[W]=255&X,this[W+1]=X>>>8,W+2},u.prototype.writeUInt16BE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,2,65535,0),this[W]=X>>>8,this[W+1]=255&X,W+2},u.prototype.writeUInt32LE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,4,4294967295,0),this[W+3]=X>>>24,this[W+2]=X>>>16,this[W+1]=X>>>8,this[W]=255&X,W+4},u.prototype.writeUInt32BE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,4,4294967295,0),this[W]=X>>>24,this[W+1]=X>>>16,this[W+2]=X>>>8,this[W+3]=255&X,W+4},u.prototype.writeIntLE=function(X,W,_e,qe){if(X=+X,W>>>=0,!qe){var mt=Math.pow(2,8*_e-1);k(this,X,W,_e,mt-1,-mt)}var Je=0,at=1,Qt=0;for(this[W]=255&X;++Je<_e&&(at*=256);)X<0&&Qt===0&&this[W+Je-1]!==0&&(Qt=1),this[W+Je]=(X/at>>0)-Qt&255;return W+_e},u.prototype.writeIntBE=function(X,W,_e,qe){if(X=+X,W>>>=0,!qe){var mt=Math.pow(2,8*_e-1);k(this,X,W,_e,mt-1,-mt)}var Je=_e-1,at=1,Qt=0;for(this[W+Je]=255&X;--Je>=0&&(at*=256);)X<0&&Qt===0&&this[W+Je+1]!==0&&(Qt=1),this[W+Je]=(X/at>>0)-Qt&255;return W+_e},u.prototype.writeInt8=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,1,127,-128),X<0&&(X=255+X+1),this[W]=255&X,W+1},u.prototype.writeInt16LE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,2,32767,-32768),this[W]=255&X,this[W+1]=X>>>8,W+2},u.prototype.writeInt16BE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,2,32767,-32768),this[W]=X>>>8,this[W+1]=255&X,W+2},u.prototype.writeInt32LE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,4,2147483647,-2147483648),this[W]=255&X,this[W+1]=X>>>8,this[W+2]=X>>>16,this[W+3]=X>>>24,W+4},u.prototype.writeInt32BE=function(X,W,_e){return X=+X,W>>>=0,_e||k(this,X,W,4,2147483647,-2147483648),X<0&&(X=4294967295+X+1),this[W]=X>>>24,this[W+1]=X>>>16,this[W+2]=X>>>8,this[W+3]=255&X,W+4},u.prototype.writeFloatLE=function(X,W,_e){return N(this,X,W,!0,_e)},u.prototype.writeFloatBE=function(X,W,_e){return N(this,X,W,!1,_e)},u.prototype.writeDoubleLE=function(X,W,_e){return H(this,X,W,!0,_e)},u.prototype.writeDoubleBE=function(X,W,_e){return H(this,X,W,!1,_e)},u.prototype.copy=function(X,W,_e,qe){if(!u.isBuffer(X))throw new TypeError("argument should be a Buffer");if(_e||(_e=0),qe||qe===0||(qe=this.length),W>=X.length&&(W=X.length),W||(W=0),qe>0&&qe<_e&&(qe=_e),qe===_e||X.length===0||this.length===0)return 0;if(W<0)throw new RangeError("targetStart out of bounds");if(_e<0||_e>=this.length)throw new RangeError("Index out of range");if(qe<0)throw new RangeError("sourceEnd out of bounds");qe>this.length&&(qe=this.length),X.length-W=0;--Je)X[Je+W]=this[Je+_e];else Uint8Array.prototype.set.call(X,this.subarray(_e,qe),W);return mt},u.prototype.fill=function(X,W,_e,qe){if(typeof X=="string"){if(typeof W=="string"?(qe=W,W=0,_e=this.length):typeof _e=="string"&&(qe=_e,_e=this.length),qe!==void 0&&typeof qe!="string")throw new TypeError("encoding must be a string");if(typeof qe=="string"&&!u.isEncoding(qe))throw new TypeError("Unknown encoding: "+qe);if(X.length===1){var mt=X.charCodeAt(0);(qe==="utf8"&&mt<128||qe==="latin1")&&(X=mt)}}else typeof X=="number"&&(X&=255);if(W<0||this.length>>=0,_e=_e===void 0?this.length:_e>>>0,X||(X=0),typeof X=="number")for(Je=W;Je<_e;++Je)this[Je]=X;else{var at=u.isBuffer(X)?X:u.from(X,qe),Qt=at.length;if(Qt===0)throw new TypeError('The value "'+X+'" is invalid for argument "value"');for(Je=0;Je<_e-W;++Je)this[Je+W]=at[Je%Qt]}return this};var $=/[^+/0-9A-Za-z-_]/g;function ne(X){return X<16?"0"+X.toString(16):X.toString(16)}function xe(X,W){var _e;W=W||1/0;for(var qe=X.length,mt=null,Je=[],at=0;at55295&&_e<57344){if(!mt){if(_e>56319){(W-=3)>-1&&Je.push(239,191,189);continue}if(at+1===qe){(W-=3)>-1&&Je.push(239,191,189);continue}mt=_e;continue}if(_e<56320){(W-=3)>-1&&Je.push(239,191,189),mt=_e;continue}_e=65536+(mt-55296<<10|_e-56320)}else mt&&(W-=3)>-1&&Je.push(239,191,189);if(mt=null,_e<128){if((W-=1)<0)break;Je.push(_e)}else if(_e<2048){if((W-=2)<0)break;Je.push(_e>>6|192,63&_e|128)}else if(_e<65536){if((W-=3)<0)break;Je.push(_e>>12|224,_e>>6&63|128,63&_e|128)}else{if(!(_e<1114112))throw new Error("Invalid code point");if((W-=4)<0)break;Je.push(_e>>18|240,_e>>12&63|128,_e>>6&63|128,63&_e|128)}}return Je}function ye(X){return n.toByteArray((function(W){if((W=(W=W.split("=")[0]).trim().replace($,"")).length<2)return"";for(;W.length%4!=0;)W+="=";return W})(X))}function Le(X,W,_e,qe){for(var mt=0;mt=W.length||mt>=X.length);++mt)W[mt+_e]=X[mt];return mt}function ee(X,W){return X instanceof W||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===W.name}function Ae(X){return X!=X}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(e,a,t){"use strict";var o=e("safe-buffer").Buffer,n=e("stream").Transform,c=e("string_decoder").StringDecoder;function d(u){n.call(this),this.hashMode=typeof u=="string",this.hashMode?this[u]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(d,n),d.prototype.update=function(u,g,v){typeof u=="string"&&(u=o.from(u,g));var C=this._update(u);return this.hashMode?this:(v&&(C=this._toString(C,v)),C)},d.prototype.setAutoPadding=function(){},d.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},d.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},d.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},d.prototype._transform=function(u,g,v){var C;try{this.hashMode?this._update(u):this.push(this._update(u))}catch(b){C=b}finally{v(C)}},d.prototype._flush=function(u){var g;try{this.push(this.__final())}catch(v){g=v}u(g)},d.prototype._finalOrDigest=function(u){var g=this.__final()||o.alloc(0);return u&&(g=this._toString(g,u,!0)),g},d.prototype._toString=function(u,g,v){if(this._decoder||(this._decoder=new c(g),this._encoding=g),this._encoding!==g)throw new Error("can't switch encodings");var C=this._decoder.write(u);return v&&(C+=this._decoder.end()),C},a.exports=d},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(e,a,t){"use strict";var o=e("../internals/is-callable"),n=e("../internals/try-to-string"),c=TypeError;a.exports=function(d){if(o(d))return d;throw new c(n(d)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(e,a,t){"use strict";var o=e("../internals/is-constructor"),n=e("../internals/try-to-string"),c=TypeError;a.exports=function(d){if(o(d))return d;throw new c(n(d)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(e,a,t){"use strict";var o=e("../internals/is-callable"),n=String,c=TypeError;a.exports=function(d){if(typeof d=="object"||o(d))return d;throw new c("Can't set "+n(d)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(e,a,t){"use strict";var o=e("../internals/well-known-symbol"),n=e("../internals/object-create"),c=e("../internals/object-define-property").f,d=o("unscopables"),u=Array.prototype;u[d]===void 0&&c(u,d,{configurable:!0,value:n(null)}),a.exports=function(g){u[d][g]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(e,a,t){"use strict";var o=e("../internals/object-is-prototype-of"),n=TypeError;a.exports=function(c,d){if(o(d,c))return c;throw new n("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(e,a,t){"use strict";var o=e("../internals/is-object"),n=String,c=TypeError;a.exports=function(d){if(o(d))return d;throw new c(n(d)+" is not an object")}},{"../internals/is-object":289}],228:[function(e,a,t){"use strict";var o=e("../internals/to-indexed-object"),n=e("../internals/to-absolute-index"),c=e("../internals/length-of-array-like"),d=function(u){return function(g,v,C){var b,P=o(g),T=c(P),w=n(C,T);if(u&&v!=v){for(;T>w;)if((b=P[w++])!=b)return!0}else for(;T>w;w++)if((u||w in P)&&P[w]===v)return u||w||0;return!u&&-1}};a.exports={includes:d(!0),indexOf:d(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(e,a,t){"use strict";var o=e("../internals/function-bind-context"),n=e("../internals/function-uncurry-this"),c=e("../internals/indexed-object"),d=e("../internals/to-object"),u=e("../internals/length-of-array-like"),g=e("../internals/array-species-create"),v=n([].push),C=function(b){var P=b===1,T=b===2,w=b===3,I=b===4,E=b===6,R=b===7,G=b===5||E;return function(U,Z,he,re){for(var pe,de,be=d(U),ue=c(be),j=o(Z,he),Q=u(ue),le=0,O=re||g,k=P?O(U,Q):T||R?O(U,0):void 0;Q>le;le++)if((G||le in ue)&&(de=j(pe=ue[le],le,be),b))if(P)k[le]=de;else if(de)switch(b){case 3:return!0;case 5:return pe;case 6:return le;case 2:v(k,pe)}else switch(b){case 4:return!1;case 7:v(k,pe)}return E?-1:w||I?I:k}};a.exports={forEach:C(0),map:C(1),filter:C(2),some:C(3),every:C(4),find:C(5),findIndex:C(6),filterReject:C(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(e,a,t){"use strict";var o=e("../internals/to-absolute-index"),n=e("../internals/length-of-array-like"),c=e("../internals/create-property"),d=Array,u=Math.max;a.exports=function(g,v,C){for(var b=n(g),P=o(v,b),T=o(C===void 0?b:C,b),w=d(u(T-P,0)),I=0;P0&&o[0]<4?1:+(o[0]+o[1])),!n&&d&&(!(o=d.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=d.match(/Chrome\/(\d+)/))&&(n=+o[1]),a.exports=n},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(e,a,t){"use strict";a.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(e,a,t){"use strict";var o=e("../internals/global"),n=e("../internals/object-get-own-property-descriptor").f,c=e("../internals/create-non-enumerable-property"),d=e("../internals/define-built-in"),u=e("../internals/define-global-property"),g=e("../internals/copy-constructor-properties"),v=e("../internals/is-forced");a.exports=function(C,b){var P,T,w,I,E,R=C.target,G=C.global,U=C.stat;if(P=G?o:U?o[R]||u(R,{}):(o[R]||{}).prototype)for(T in b){if(I=b[T],w=C.dontCallGetSet?(E=n(P,T))&&E.value:P[T],!v(G?T:R+(U?".":"#")+T,C.forced)&&w!==void 0){if(typeof I==typeof w)continue;g(I,w)}(C.sham||w&&w.sham)&&c(I,"sham",!0),d(P,T,I,C)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(e,a,t){"use strict";a.exports=function(o){try{return!!o()}catch{return!0}}},{}],261:[function(e,a,t){"use strict";var o=e("../internals/function-bind-native"),n=Function.prototype,c=n.apply,d=n.call;a.exports=typeof Reflect=="object"&&Reflect.apply||(o?d.bind(c):function(){return d.apply(c,arguments)})},{"../internals/function-bind-native":263}],262:[function(e,a,t){"use strict";var o=e("../internals/function-uncurry-this-clause"),n=e("../internals/a-callable"),c=e("../internals/function-bind-native"),d=o(o.bind);a.exports=function(u,g){return n(u),g===void 0?u:c?d(u,g):function(){return u.apply(g,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,a,t){"use strict";var o=e("../internals/fails");a.exports=!o(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(e,a,t){"use strict";var o=e("../internals/function-bind-native"),n=Function.prototype.call;a.exports=o?n.bind(n):function(){return n.apply(n,arguments)}},{"../internals/function-bind-native":263}],265:[function(e,a,t){"use strict";var o=e("../internals/descriptors"),n=e("../internals/has-own-property"),c=Function.prototype,d=o&&Object.getOwnPropertyDescriptor,u=n(c,"name"),g=u&&function(){}.name==="something",v=u&&(!o||o&&d(c,"name").configurable);a.exports={EXISTS:u,PROPER:g,CONFIGURABLE:v}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(e,a,t){"use strict";var o=e("../internals/function-uncurry-this"),n=e("../internals/a-callable");a.exports=function(c,d,u){try{return o(n(Object.getOwnPropertyDescriptor(c,d)[u]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(e,a,t){"use strict";var o=e("../internals/classof-raw"),n=e("../internals/function-uncurry-this");a.exports=function(c){if(o(c)==="Function")return n(c)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,a,t){"use strict";var o=e("../internals/function-bind-native"),n=Function.prototype,c=n.call,d=o&&n.bind.bind(c,c);a.exports=o?d:function(u){return function(){return c.apply(u,arguments)}}},{"../internals/function-bind-native":263}],269:[function(e,a,t){"use strict";var o=e("../internals/global"),n=e("../internals/is-callable"),c=function(d){return n(d)?d:void 0};a.exports=function(d,u){return arguments.length<2?c(o[d]):o[d]&&o[d][u]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,a,t){"use strict";var o=e("../internals/classof"),n=e("../internals/get-method"),c=e("../internals/is-null-or-undefined"),d=e("../internals/iterators"),u=e("../internals/well-known-symbol")("iterator");a.exports=function(g){if(!c(g))return n(g,u)||n(g,"@@iterator")||d[o(g)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(e,a,t){"use strict";var o=e("../internals/function-call"),n=e("../internals/a-callable"),c=e("../internals/an-object"),d=e("../internals/try-to-string"),u=e("../internals/get-iterator-method"),g=TypeError;a.exports=function(v,C){var b=arguments.length<2?u(v):C;if(n(b))return c(o(b,v));throw new g(d(v)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(e,a,t){"use strict";var o=e("../internals/function-uncurry-this"),n=e("../internals/is-array"),c=e("../internals/is-callable"),d=e("../internals/classof-raw"),u=e("../internals/to-string"),g=o([].push);a.exports=function(v){if(c(v))return v;if(n(v)){for(var C=v.length,b=[],P=0;Phe;he++)if((pe=N(E[he]))&&v(I,pe))return pe;return new w(!1)}U=C(E,Z)}for(de=Q?E.next:U.next;!(be=n(de,U)).done;){try{pe=N(be.value)}catch(H){P(U,"throw",H)}if(typeof pe=="object"&&pe&&v(I,pe))return pe}return new w(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(e,a,t){"use strict";var o=e("../internals/function-call"),n=e("../internals/an-object"),c=e("../internals/get-method");a.exports=function(d,u,g){var v,C;n(d);try{if(!(v=c(d,"return"))){if(u==="throw")throw g;return g}v=o(v,d)}catch(b){C=!0,v=b}if(u==="throw")throw g;if(C)throw v;return n(v),g}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(e,a,t){"use strict";var o=e("../internals/iterators-core").IteratorPrototype,n=e("../internals/object-create"),c=e("../internals/create-property-descriptor"),d=e("../internals/set-to-string-tag"),u=e("../internals/iterators"),g=function(){return this};a.exports=function(v,C,b,P){var T=C+" Iterator";return v.prototype=n(o,{next:c(+!P,b)}),d(v,T,!1,!0),u[T]=g,v}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(e,a,t){"use strict";var o=e("../internals/export"),n=e("../internals/function-call"),c=e("../internals/is-pure"),d=e("../internals/function-name"),u=e("../internals/is-callable"),g=e("../internals/iterator-create-constructor"),v=e("../internals/object-get-prototype-of"),C=e("../internals/object-set-prototype-of"),b=e("../internals/set-to-string-tag"),P=e("../internals/create-non-enumerable-property"),T=e("../internals/define-built-in"),w=e("../internals/well-known-symbol"),I=e("../internals/iterators"),E=e("../internals/iterators-core"),R=d.PROPER,G=d.CONFIGURABLE,U=E.IteratorPrototype,Z=E.BUGGY_SAFARI_ITERATORS,he=w("iterator"),re=function(){return this};a.exports=function(pe,de,be,ue,j,Q,le){g(be,de,ue);var O,k,L,N=function(ee){if(ee===j&&ye)return ye;if(!Z&&ee&&ee in ne)return ne[ee];switch(ee){case"keys":case"values":case"entries":return function(){return new be(this,ee)}}return function(){return new be(this)}},H=de+" Iterator",$=!1,ne=pe.prototype,xe=ne[he]||ne["@@iterator"]||j&&ne[j],ye=!Z&&xe||N(j),Le=de==="Array"&&ne.entries||xe;if(Le&&(O=v(Le.call(new pe)))!==Object.prototype&&O.next&&(c||v(O)===U||(C?C(O,U):u(O[he])||T(O,he,re)),b(O,H,!0,!0),c&&(I[H]=re)),R&&j==="values"&&xe&&xe.name!=="values"&&(!c&&G?P(ne,"name","values"):($=!0,ye=function(){return n(xe,this)})),j)if(k={values:N("values"),keys:Q?ye:N("keys"),entries:N("entries")},le)for(L in k)(Z||$||!(L in ne))&&T(ne,L,k[L]);else o({target:de,proto:!0,forced:Z||$},k);return c&&!le||ne[he]===ye||T(ne,he,ye,{name:j}),I[de]=ye,k}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(e,a,t){"use strict";var o,n,c,d=e("../internals/fails"),u=e("../internals/is-callable"),g=e("../internals/is-object"),v=e("../internals/object-create"),C=e("../internals/object-get-prototype-of"),b=e("../internals/define-built-in"),P=e("../internals/well-known-symbol"),T=e("../internals/is-pure"),w=P("iterator"),I=!1;[].keys&&("next"in(c=[].keys())?(n=C(C(c)))!==Object.prototype&&(o=n):I=!0),!g(o)||d(function(){var E={};return o[w].call(E)!==E})?o={}:T&&(o=v(o)),u(o[w])||b(o,w,function(){return this}),a.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:I}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(e,a,t){arguments[4][276][0].apply(t,arguments)},{dup:276}],299:[function(e,a,t){"use strict";var o=e("../internals/to-length");a.exports=function(n){return o(n.length)}},{"../internals/to-length":343}],300:[function(e,a,t){"use strict";var o=e("../internals/function-uncurry-this"),n=e("../internals/fails"),c=e("../internals/is-callable"),d=e("../internals/has-own-property"),u=e("../internals/descriptors"),g=e("../internals/function-name").CONFIGURABLE,v=e("../internals/inspect-source"),C=e("../internals/internal-state"),b=C.enforce,P=C.get,T=String,w=Object.defineProperty,I=o("".slice),E=o("".replace),R=o([].join),G=u&&!n(function(){return w(function(){},"length",{value:8}).length!==8}),U=String(String).split("String"),Z=a.exports=function(he,re,pe){I(T(re),0,7)==="Symbol("&&(re="["+E(T(re),/^Symbol\(([^)]*)\)/,"$1")+"]"),pe&&pe.getter&&(re="get "+re),pe&&pe.setter&&(re="set "+re),(!d(he,"name")||g&&he.name!==re)&&(u?w(he,"name",{value:re,configurable:!0}):he.name=re),G&&pe&&d(pe,"arity")&&he.length!==pe.arity&&w(he,"length",{value:pe.arity});try{pe&&d(pe,"constructor")&&pe.constructor?u&&w(he,"prototype",{writable:!1}):he.prototype&&(he.prototype=void 0)}catch{}var de=b(he);return d(de,"source")||(de.source=R(U,typeof re=="string"?re:"")),he};Function.prototype.toString=Z(function(){return c(this)&&P(this).source||v(this)},"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(e,a,t){"use strict";var o=Math.ceil,n=Math.floor;a.exports=Math.trunc||function(c){var d=+c;return(d>0?n:o)(d)}},{}],302:[function(e,a,t){"use strict";var o,n,c,d,u,g=e("../internals/global"),v=e("../internals/function-bind-context"),C=e("../internals/object-get-own-property-descriptor").f,b=e("../internals/task").set,P=e("../internals/queue"),T=e("../internals/engine-is-ios"),w=e("../internals/engine-is-ios-pebble"),I=e("../internals/engine-is-webos-webkit"),E=e("../internals/engine-is-node"),R=g.MutationObserver||g.WebKitMutationObserver,G=g.document,U=g.process,Z=g.Promise,he=C(g,"queueMicrotask"),re=he&&he.value;if(!re){var pe=new P,de=function(){var be,ue;for(E&&(be=U.domain)&&be.exit();ue=pe.get();)try{ue()}catch(j){throw pe.head&&o(),j}be&&be.enter()};T||E||I||!R||!G?!w&&Z&&Z.resolve?((d=Z.resolve(void 0)).constructor=Z,u=v(d.then,d),o=function(){u(de)}):E?o=function(){U.nextTick(de)}:(b=v(b,g),o=function(){b(de)}):(n=!0,c=G.createTextNode(""),new R(de).observe(c,{characterData:!0}),o=function(){c.data=n=!n}),re=function(be){pe.head||o(),pe.add(be)}}a.exports=re},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(e,a,t){"use strict";var o=e("../internals/a-callable"),n=TypeError,c=function(d){var u,g;this.promise=new d(function(v,C){if(u!==void 0||g!==void 0)throw new n("Bad Promise constructor");u=v,g=C}),this.resolve=o(u),this.reject=o(g)};a.exports.f=function(d){return new c(d)}},{"../internals/a-callable":222}],304:[function(e,a,t){"use strict";var o=e("../internals/is-regexp"),n=TypeError;a.exports=function(c){if(o(c))throw new n("The method doesn't accept regular expressions");return c}},{"../internals/is-regexp":291}],305:[function(e,a,t){"use strict";var o=e("../internals/descriptors"),n=e("../internals/function-uncurry-this"),c=e("../internals/function-call"),d=e("../internals/fails"),u=e("../internals/object-keys"),g=e("../internals/object-get-own-property-symbols"),v=e("../internals/object-property-is-enumerable"),C=e("../internals/to-object"),b=e("../internals/indexed-object"),P=Object.assign,T=Object.defineProperty,w=n([].concat);a.exports=!P||d(function(){if(o&&P({b:1},P(T({},"a",{enumerable:!0,get:function(){T(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},E={},R=Symbol("assign detection");return I[R]=7,"abcdefghijklmnopqrst".split("").forEach(function(G){E[G]=G}),P({},I)[R]!==7||u(P({},E)).join("")!=="abcdefghijklmnopqrst"})?function(I,E){for(var R=C(I),G=arguments.length,U=1,Z=g.f,he=v.f;G>U;)for(var re,pe=b(arguments[U++]),de=Z?w(u(pe),Z(pe)):u(pe),be=de.length,ue=0;be>ue;)re=de[ue++],o&&!c(he,pe,re)||(R[re]=pe[re]);return R}:P},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(e,a,t){"use strict";var o,n=e("../internals/an-object"),c=e("../internals/object-define-properties"),d=e("../internals/enum-bug-keys"),u=e("../internals/hidden-keys"),g=e("../internals/html"),v=e("../internals/document-create-element"),C=e("../internals/shared-key"),b=C("IE_PROTO"),P=function(){},T=function(E){return"