You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/angular/646.4d1e1dc02d21b483a9c9.js

1 line
321 KiB
JavaScript

(self.webpackChunkrtl=self.webpackChunkrtl||[]).push([[646],{5646:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CLModule:()=>Kc});var i=n(1511),a=n(6853),o=n(2865),s=n(1572),l=n(3722),r=n(5994);function c(e,t){1&e&&s._UZ(0,"mat-progress-bar",3)}let u=(()=>{class e{constructor(e){this.router=e,this.loading=!1,this.router.events.subscribe(e=>{switch(!0){case e instanceof a.OD:this.loading=!0;break;case e instanceof a.m2:case e instanceof a.gk:case e instanceof a.Q3:this.loading=!1}})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,c,1,0,"mat-progress-bar",1),s._UZ(2,"router-outlet",null,2),s.qZA()),2&e&&(s.xp6(1),s.Q6J("ngIf",t.loading))},directives:[l.xw,l.yH,l.Wh,i.O5,a.lC,r.pW],styles:[""],data:{animation:[o.g]}}),e})();var d=n(9666),h=n(9568),m=n(8868),p=n(7810),f=n(5291),g=n(9421),x=n(9939),Z=n(3869),y=n(964),A=n(5573),w=n(1084),T=n(7592),v=n(7271),b=n(7439),q=n(8055),C=n(5980),_=n(3691),S=n(377);const L=function(e){return{backgroundColor:e}};function U(e,t){if(1&e&&s._UZ(0,"span",6),2&e){const e=s.oxw();s.Q6J("ngStyle",s.VKq(1,L,"#"+e.information.color))}}function F(e,t){if(1&e&&(s.TgZ(0,"div"),s.TgZ(1,"h4",1),s._uU(2,"Color"),s.qZA(),s.TgZ(3,"div",2),s._UZ(4,"span",7),s._uU(5),s.ALo(6,"uppercase"),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(4),s.Q6J("ngStyle",s.VKq(4,L,"#"+e.information.color)),s.xp6(1),s.hij(" ",s.lcZ(6,2,e.information.color)," ")}}function k(e,t){if(1&e&&(s.TgZ(0,"span",2),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(e)}}let N=(()=>{class e{constructor(e){this.commonService=e,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(e=>{this.chains.push(this.commonService.titleCase(e.chain)+" "+this.commonService.titleCase(e.network))}))}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(w.v))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[s.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Alias"),s.qZA(),s.TgZ(4,"div",2),s._uU(5),s.YNc(6,U,1,3,"span",3),s.qZA(),s.qZA(),s.YNc(7,F,7,6,"div",4),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"Implementation"),s.qZA(),s.TgZ(11,"div",2),s._uU(12),s.qZA(),s.qZA(),s.TgZ(13,"div"),s.TgZ(14,"h4",1),s._uU(15,"Chain"),s.qZA(),s.YNc(16,k,2,1,"span",5),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.hij(" ",t.information.alias," "),s.xp6(1),s.Q6J("ngIf",!t.showColorFieldSeparately),s.xp6(1),s.Q6J("ngIf",t.showColorFieldSeparately),s.xp6(5),s.Oqu(t.information.lnImplementation||t.information.version?t.information.lnImplementation+" "+t.information.version:""),s.xp6(4),s.Q6J("ngForOf",t.chains))},directives:[l.xw,l.yH,l.Wh,i.O5,i.sg,i.PC,S.Zl],pipes:[i.gd],styles:[""]}),e})(),J=(()=>{class e{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-balances-info"]],inputs:{balances:"balances"},decls:21,vars:11,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["mode","determinate",1,"dashboard-progress-bar",3,"value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Lightning"),s.qZA(),s.TgZ(4,"div",2),s._uU(5),s.ALo(6,"number"),s.qZA(),s._UZ(7,"mat-progress-bar",3),s.qZA(),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"On-chain"),s.qZA(),s.TgZ(11,"div",2),s._uU(12),s.ALo(13,"number"),s.qZA(),s._UZ(14,"mat-progress-bar",3),s.qZA(),s.TgZ(15,"div"),s.TgZ(16,"h4",1),s._uU(17,"Total"),s.qZA(),s.TgZ(18,"div",2),s._uU(19),s.ALo(20,"number"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.hij("",s.lcZ(6,5,t.balances.lightning)," Sats"),s.xp6(2),s.s9C("value",t.balances.lightning/t.balances.total*100),s.xp6(5),s.hij("",s.lcZ(13,7,t.balances.onchain)," Sats"),s.xp6(2),s.s9C("value",t.balances.onchain/t.balances.total*100),s.xp6(5),s.hij("",s.lcZ(20,9,t.balances.total)," Sats"))},directives:[l.xw,l.yH,l.Wh,r.pW],pipes:[i.JJ],styles:[""]}),e})();var D=n(6283),O=n(6828),R=n(7679),M=n(7038);function Y(e,t){if(1&e&&(s.TgZ(0,"div",17),s.TgZ(1,"span",18),s._uU(2),s.ALo(3,"slice"),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-hint",19),s.TgZ(6,"strong",5),s._uU(7,"Local:"),s.qZA(),s._uU(8),s.ALo(9,"number"),s.qZA(),s.TgZ(10,"mat-hint",20),s._UZ(11,"fa-icon",21),s._uU(12),s.ALo(13,"number"),s.qZA(),s.TgZ(14,"mat-hint",22),s.TgZ(15,"strong",5),s._uU(16,"Remote:"),s.qZA(),s._uU(17),s.ALo(18,"number"),s.qZA(),s.qZA(),s._UZ(19,"mat-progress-bar",23),s.qZA()),2&e){const e=t.$implicit,n=s.oxw(2);s.xp6(1),s.s9C("matTooltip",e.alias||e.id),s.s9C("matTooltipDisabled",(e.alias||e.id).length<26),s.xp6(1),s.AsE("",s.Dn7(3,9,e.alias||e.id,0,24),"",(e.alias||e.id).length>25?"...":"",""),s.xp6(6),s.hij("",s.xi3(9,13,e.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),s.xp6(3),s.Q6J("icon",n.faBalanceScale),s.xp6(1),s.hij(" (",s.lcZ(13,16,e.balancedness||0),") "),s.xp6(5),s.hij("",s.xi3(18,18,e.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),s.xp6(2),s.s9C("value",e.msatoshi_to_us&&e.msatoshi_to_us>0?+e.msatoshi_to_us/(+e.msatoshi_to_us+ +e.msatoshi_to_them)*100:0)}}function Q(e,t){if(1&e&&(s.TgZ(0,"div",15),s.YNc(1,Y,20,21,"div",16),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngForOf",e.allChannels)}}function I(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",24),s._uU(1," No channels available. "),s.TgZ(2,"button",25),s.NdJ("click",function(){return s.CHM(e),s.oxw().goToChannels()}),s._uU(3,"Open Channel"),s.qZA(),s.qZA()}}let P=(()=>{class e{constructor(e){this.router=e,this.faBalanceScale=f.DL8,this.faDumbbell=f.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy"},decls:26,vars:15,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["fxLayout","column","fxFlex","100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"matTooltip","matTooltipDisabled"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90","color-primary"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90","color-primary"],["matTooltip","Balance Score",1,"color-primary","mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90","color-primary"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start",1,"mt-1","w-100"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"span",2),s._uU(3,"Total Capacity"),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-hint",4),s.TgZ(6,"strong",5),s._uU(7,"Local:"),s.qZA(),s._uU(8),s.ALo(9,"number"),s.qZA(),s.TgZ(10,"mat-hint",6),s._UZ(11,"fa-icon",7),s._uU(12),s.ALo(13,"number"),s.qZA(),s.TgZ(14,"mat-hint",8),s.TgZ(15,"strong",5),s._uU(16,"Remote:"),s.qZA(),s._uU(17),s.ALo(18,"number"),s.qZA(),s.qZA(),s._UZ(19,"mat-progress-bar",9),s.qZA(),s.TgZ(20,"div",10),s._UZ(21,"mat-divider",11),s.qZA(),s.TgZ(22,"div",12),s.YNc(23,Q,2,1,"div",13),s.qZA(),s.qZA(),s.YNc(24,I,4,0,"ng-template",null,14,s.W1O)),2&e){const e=s.MAs(25);s.xp6(8),s.hij("",s.xi3(9,7,t.channelBalances.localBalance||0,"1.0-0")," Sats"),s.xp6(3),s.Q6J("icon",t.faBalanceScale),s.xp6(1),s.hij(" (",s.lcZ(13,10,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),s.xp6(5),s.hij("",s.xi3(18,12,t.channelBalances.remoteBalance||0,"1.0-0")," Sats"),s.xp6(2),s.s9C("value",t.channelBalances.localBalance&&t.channelBalances.localBalance>0?+t.channelBalances.localBalance/(+t.channelBalances.localBalance+ +t.channelBalances.remoteBalance)*100:0),s.xp6(4),s.Q6J("ngIf",t.allChannels&&t.allChannels.length>0)("ngIfElse",e)}},directives:[l.xw,l.Wh,l.yH,D.bx,T.BN,O.gM,r.pW,R.d,M.$V,i.O5,i.sg,C.lW],pipes:[i.JJ,i.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),e})(),E=(()=>{class e{constructor(){this.totalFees=[{name:"Total",value:0}]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-fee-info"]],inputs:{fees:"fees"},decls:14,vars:6,consts:[["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Total"),s.qZA(),s.TgZ(4,"div",2),s._uU(5),s.ALo(6,"number"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",0),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"Transactions"),s.qZA(),s.TgZ(11,"div",2),s._uU(12),s.ALo(13,"number"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.hij("",s.lcZ(6,2,(null==t.fees?null:t.fees.feeCollected)/1e3)," Sats"),s.xp6(7),s.Oqu(s.lcZ(13,4,null==t.fees?null:t.fees.totalTxCount)))},directives:[l.xw,l.yH,l.Wh],pipes:[i.JJ],styles:[""]}),e})(),B=(()=>{class e{constructor(){this.channelsStatus={}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus"},decls:41,vars:18,consts:[["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],[1,"dot","tiny-dot","green"],[1,"dot","tiny-dot","yellow"],[1,"dot","tiny-dot","grey"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div"),s.TgZ(2,"h4",1),s._uU(3,"Active"),s.qZA(),s.TgZ(4,"div",2),s._UZ(5,"span",3),s._uU(6),s.ALo(7,"number"),s.qZA(),s.qZA(),s.TgZ(8,"div"),s.TgZ(9,"h4",1),s._uU(10,"Pending"),s.qZA(),s.TgZ(11,"div",2),s._UZ(12,"span",4),s._uU(13),s.ALo(14,"number"),s.qZA(),s.qZA(),s.TgZ(15,"div"),s.TgZ(16,"h4",1),s._uU(17,"Inactive"),s.qZA(),s.TgZ(18,"div",2),s._UZ(19,"span",5),s._uU(20),s.ALo(21,"number"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(22,"div",0),s.TgZ(23,"div"),s.TgZ(24,"h4",1),s._uU(25,"Capacity"),s.qZA(),s.TgZ(26,"div",2),s._uU(27),s.ALo(28,"number"),s.qZA(),s.qZA(),s.TgZ(29,"div"),s.TgZ(30,"h4",1),s._uU(31,"Capacity"),s.qZA(),s.TgZ(32,"div",2),s._uU(33),s.ALo(34,"number"),s.qZA(),s.qZA(),s.TgZ(35,"div"),s.TgZ(36,"h4",1),s._uU(37,"Capacity"),s.qZA(),s.TgZ(38,"div",2),s._uU(39),s.ALo(40,"number"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(6),s.Oqu(s.lcZ(7,6,t.channelsStatus.active.channels||0)),s.xp6(7),s.Oqu(s.lcZ(14,8,t.channelsStatus.pending.channels||0)),s.xp6(7),s.Oqu(s.lcZ(21,10,t.channelsStatus.inactive.channels||0)),s.xp6(7),s.hij("",s.lcZ(28,12,t.channelsStatus.active.capacity||0)," Sats"),s.xp6(6),s.hij("",s.lcZ(34,14,t.channelsStatus.pending.capacity||0)," Sats"),s.xp6(6),s.hij("",s.lcZ(40,16,t.channelsStatus.inactive.capacity||0)," Sats"))},directives:[l.xw,l.yH,l.Wh],pipes:[i.JJ],styles:[""]}),e})();function H(e,t){if(1&e&&(s.TgZ(0,"mat-hint",17),s.TgZ(1,"strong",18),s._uU(2,"Capacity: "),s.qZA(),s._uU(3),s.ALo(4,"number"),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(3),s.hij("",s.xi3(4,1,e.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function V(e,t){if(1&e&&(s.TgZ(0,"mat-hint",17),s.TgZ(1,"strong",18),s._uU(2,"Capacity: "),s.qZA(),s._uU(3),s.ALo(4,"number"),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(3),s.hij("",s.xi3(4,1,e.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function z(e,t){if(1&e&&s._UZ(0,"mat-progress-bar",19),2&e){const e=s.oxw().$implicit,t=s.oxw(2);s.s9C("value",t.totalLiquidity>0?(+e.msatoshi_to_them/1e3||0)/t.totalLiquidity*100:0)}}function G(e,t){if(1&e&&s._UZ(0,"mat-progress-bar",19),2&e){const e=s.oxw().$implicit,t=s.oxw(2);s.s9C("value",t.totalLiquidity>0?(+e.msatoshi_to_us/1e3||0)/t.totalLiquidity*100:0)}}function X(e,t){if(1&e&&(s.TgZ(0,"div",12),s.TgZ(1,"span",13),s._uU(2),s.ALo(3,"slice"),s.qZA(),s.TgZ(4,"div",14),s.YNc(5,H,5,4,"mat-hint",15),s.YNc(6,V,5,4,"mat-hint",15),s.qZA(),s.YNc(7,z,1,1,"mat-progress-bar",16),s.YNc(8,G,1,1,"mat-progress-bar",16),s.qZA()),2&e){const e=t.$implicit,n=s.oxw(2);s.xp6(1),s.s9C("matTooltip",e.alias||e.id),s.s9C("matTooltipDisabled",(e.alias||e.id).length<26),s.xp6(1),s.AsE("",s.Dn7(3,8,e.alias||e.id,0,24),"",(e.alias||e.id).length>25?"...":"",""),s.xp6(3),s.Q6J("ngIf","In"===n.direction),s.xp6(1),s.Q6J("ngIf","Out"===n.direction),s.xp6(1),s.Q6J("ngIf","In"===n.direction),s.xp6(1),s.Q6J("ngIf","Out"===n.direction)}}function $(e,t){if(1&e&&(s.TgZ(0,"div",10),s.YNc(1,X,9,12,"div",11),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngForOf",e.allChannels)}}function K(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",22),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).goToChannels()}),s._uU(1,"Open Channel"),s.qZA()}}function W(e,t){if(1&e&&(s.TgZ(0,"div",20),s._uU(1," No channels available. "),s.YNc(2,K,2,0,"button",21),s.qZA()),2&e){const e=s.oxw();s.xp6(2),s.Q6J("ngIf","Out"===e.direction)}}const j=function(e,t,n){return{"mb-4":e,"mb-2":t,"mb-1":n}};let ee=(()=>{class e{constructor(e,t){this.router=e,this.commonService=t,this.screenSize="",this.screenSizeEnum=g.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cl/connections")}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(a.F0),s.Y36(w.v))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels"},decls:14,vars:11,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["fxLayout","column","fxFlex","100",1,"w-100"],["class","mt-2",4,"ngFor","ngForOf"],[1,"mt-2"],[1,"dashboard-capacity-header",3,"matTooltip","matTooltipDisabled"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","100","fxLayoutAlign","start center","class","font-size-90 color-primary",4,"ngIf"],["class","dashboard-progress-bar","mode","determinate",3,"value",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"font-size-90","color-primary"],[1,"font-weight-900","mr-5px"],["mode","determinate",1,"dashboard-progress-bar",3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","1",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary","tabindex","1",3,"click"]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"span",2),s._uU(3,"Total Capacity"),s.qZA(),s.TgZ(4,"mat-hint",3),s._uU(5),s.ALo(6,"number"),s.qZA(),s._UZ(7,"mat-progress-bar",4),s.qZA(),s.TgZ(8,"div",5),s._UZ(9,"mat-divider",6),s.qZA(),s.TgZ(10,"div",7),s.YNc(11,$,2,1,"div",8),s.qZA(),s.qZA(),s.YNc(12,W,3,1,"ng-template",null,9,s.W1O)),2&e){const e=s.MAs(13);s.Q6J("ngClass",s.kEZ(7,j,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),s.xp6(5),s.hij("",s.xi3(6,4,t.totalLiquidity,"1.0-0")," Sats"),s.xp6(6),s.Q6J("ngIf",t.allChannels&&t.allChannels.length>0)("ngIfElse",e)}},directives:[l.xw,l.Wh,l.yH,i.mk,S.oO,D.bx,r.pW,R.d,M.$V,i.O5,i.sg,O.gM,C.lW],pipes:[i.JJ,i.OU],styles:[""]}),e})();var te=n(5109),ne=n(3005),ie=n(2464),ae=n(7033),oe=n(4608),se=n(3929),le=n(6073),re=n(6756),ce=n(6880),ue=n(5095),de=n(4786),he=n(7521),me=n(1522);function pe(e,t){if(1&e&&(s.TgZ(0,"mat-option",26),s._uU(1),s.ALo(2,"titlecase"),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.Oqu(s.lcZ(2,2,e))}}function fe(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Oqu(e.invoiceError)}}function ge(e,t){if(1&e&&(s.TgZ(0,"div",27),s._UZ(1,"fa-icon",28),s.YNc(2,fe,2,1,"span",29),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==e.invoiceError)}}let xe=(()=>{class e{constructor(e,t,n,i,a,o){this.dialogRef=e,this.data=t,this.store=n,this.decimalPipe=i,this.commonService=a,this.actions$=o,this.faExclamationTriangle=f.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=g.IV,this.timeUnitEnum=g.Qk,this.timeUnits=g.LO,this.selTimeUnit=g.Qk.SECS,this.invoiceError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e.nodeSettings,this.information=e.information}),this.actions$.pipe((0,h.R)(this.unSubs[1]),(0,m.h)(e=>e.type===x.at||e.type===x.G0)).subscribe(e=>{e.type===x.G0&&this.dialogRef.close(),e.type===x.at&&"SaveNewInvoice"===e.payload.action&&(this.invoiceError=e.payload.message)})}onAddInvoice(e){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let t=this.expiry?this.expiry:3600;this.selTimeUnit!==g.Qk.SECS&&(t=this.commonService.convertTime(this.expiry,this.selTimeUnit,g.Qk.SECS)),this.store.dispatch(new se.Fk("Adding Invoice...")),this.store.dispatch(new x.H1({label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:t,private:this.private}))}resetData(){this.description="",this.invoiceValue=void 0,this.private=!1,this.expiry=void 0,this.invoiceValueHint="",this.selTimeUnit=g.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,g.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,g.Xz.OTHER)+" "+e.unit}))}onTimeUnitChange(e){this.expiry&&this.selTimeUnit!==e.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,e.value)),this.selTimeUnit=e.value}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(oe.so),s.Y36(oe.WI),s.Y36(y.yh),s.Y36(i.JJ),s.Y36(w.v),s.Y36(A.eX))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-create-invoices"]],decls:37,vars:18,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","matTooltip","Include routing hints for private channels","name","private",3,"ngModel","matTooltipPosition","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Create Invoice"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"form",7,8),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"input",10),s.NdJ("ngModelChange",function(e){return t.description=e}),s.qZA(),s.qZA(),s.TgZ(13,"div",11),s.TgZ(14,"mat-form-field",12),s.TgZ(15,"input",13),s.NdJ("ngModelChange",function(e){return t.invoiceValue=e})("keyup",function(){return t.onInvoiceValueChange()}),s.qZA(),s.TgZ(16,"span",14),s._uU(17),s.qZA(),s.TgZ(18,"mat-hint"),s._uU(19),s.qZA(),s.qZA(),s.TgZ(20,"mat-form-field",15),s.TgZ(21,"input",16),s.NdJ("ngModelChange",function(e){return t.expiry=e}),s.qZA(),s.TgZ(22,"span",14),s._uU(23),s.ALo(24,"titlecase"),s.qZA(),s.qZA(),s.TgZ(25,"mat-form-field",17),s.TgZ(26,"mat-select",18),s.NdJ("selectionChange",function(e){return t.onTimeUnitChange(e)}),s.YNc(27,pe,3,4,"mat-option",19),s.qZA(),s.qZA(),s.qZA(),s.TgZ(28,"div",20),s.TgZ(29,"mat-slide-toggle",21),s.NdJ("ngModelChange",function(e){return t.private=e}),s._uU(30,"Private Routing Hints"),s.qZA(),s.qZA(),s.YNc(31,ge,3,2,"div",22),s.TgZ(32,"div",23),s.TgZ(33,"button",24),s.NdJ("click",function(){return t.resetData()}),s._uU(34,"Clear Field"),s.qZA(),s.TgZ(35,"button",25),s.NdJ("click",function(){s.CHM(e);const n=s.MAs(10);return t.onAddInvoice(n)}),s._uU(36,"Create Invoice"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}2&e&&(s.xp6(6),s.Q6J("mat-dialog-close",!1),s.xp6(6),s.Q6J("ngModel",t.description),s.xp6(3),s.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),s.xp6(2),s.hij(" ",null==t.information?null:t.information.smaller_currency_unit," "),s.xp6(2),s.Oqu(t.invoiceValueHint),s.xp6(2),s.Q6J("ngModel",t.expiry)("step",t.selTimeUnit===t.timeUnitEnum.SECS?300:t.selTimeUnit===t.timeUnitEnum.MINS?10:t.selTimeUnit===t.timeUnitEnum.HOURS?2:1)("min",1),s.xp6(2),s.hij(" ",s.lcZ(24,16,t.selTimeUnit)," "),s.xp6(3),s.Q6J("value",t.selTimeUnit),s.xp6(1),s.Q6J("ngForOf",t.timeUnits),s.xp6(2),s.Q6J("ngModel",t.private)("matTooltipPosition","above"),s.xp6(2),s.Q6J("ngIf",""!==t.invoiceError))},directives:[l.xw,l.yH,b.dk,l.Wh,C.lW,oe.ZT,b.dn,le._Y,le.JL,le.F,D.KE,re.Nt,le.Fj,ce.h,le.JJ,le.On,le.wV,le.qQ,ue.q,D.R9,D.bx,de.gD,i.sg,he.Rr,O.gM,i.O5,me.ey,T.BN],pipes:[i.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),e})();var Ze=n(3793),ye=n(4636),Ae=n(8914);function we(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4,5),s.TgZ(2,"mat-form-field",6),s.TgZ(3,"input",7),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().description=t}),s.qZA(),s.qZA(),s.TgZ(4,"mat-form-field",8),s.TgZ(5,"input",9),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().invoiceValue=t})("keyup",function(){return s.CHM(e),s.oxw().onInvoiceValueChange()}),s.qZA(),s.TgZ(6,"span",10),s._uU(7),s.qZA(),s.TgZ(8,"mat-hint"),s._uU(9),s.qZA(),s.qZA(),s.TgZ(10,"div",11),s.TgZ(11,"button",12),s.NdJ("click",function(){return s.CHM(e),s.oxw().resetData()}),s._uU(12,"Clear Field"),s.qZA(),s.TgZ(13,"button",13),s.NdJ("click",function(){s.CHM(e);const t=s.MAs(1);return s.oxw().onAddInvoice(t)}),s._uU(14,"Create Invoice"),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngModel",e.description),s.xp6(2),s.Q6J("ngModel",e.invoiceValue)("step",100)("min",1),s.xp6(2),s.hij(" ",null==e.information?null:e.information.smaller_currency_unit," "),s.xp6(2),s.Oqu(e.invoiceValueHint)}}function Te(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",14),s.TgZ(1,"button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw().onDeleteExpiredInvoices()}),s._uU(2,"Delete Expired"),s.qZA(),s.TgZ(3,"button",16),s.NdJ("click",function(){return s.CHM(e),s.oxw().openCreateInvoiceModal()}),s._uU(4,"Create Invoice"),s.qZA(),s.qZA()}}function ve(e,t){1&e&&s._UZ(0,"mat-progress-bar",45)}function be(e,t){1&e&&(s.TgZ(0,"th",46),s._uU(1," Expiry Date "),s.qZA())}const qe=function(e){return{"mr-0":e}};function Ce(e,t){if(1&e&&s._UZ(0,"span",50),2&e){const e=s.oxw(3);s.Q6J("ngClass",s.VKq(1,qe,e.screenSize===e.screenSizeEnum.XS))}}function _e(e,t){if(1&e&&s._UZ(0,"span",51),2&e){const e=s.oxw(3);s.Q6J("ngClass",s.VKq(1,qe,e.screenSize===e.screenSizeEnum.XS))}}function Se(e,t){if(1&e&&(s.TgZ(0,"td",47),s.YNc(1,Ce,1,3,"span",48),s.YNc(2,_e,1,3,"span",49),s._uU(3),s.ALo(4,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("ngIf","paid"===e.status),s.xp6(1),s.Q6J("ngIf","paid"!==e.status),s.xp6(1),s.hij(" ",s.xi3(4,3,1e3*e.expires_at,"dd/MMM/YYYY HH:mm")," ")}}function Le(e,t){1&e&&(s.TgZ(0,"th",46),s._uU(1," Date Settled "),s.qZA())}function Ue(e,t){if(1&e&&(s.TgZ(0,"td",47),s._uU(1),s.ALo(2,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,1e3*e.paid_at,"dd/MMM/YYYY HH:mm")||"-")}}function Fe(e,t){1&e&&(s.TgZ(0,"th",46),s._uU(1," Description "),s.qZA())}const ke=function(e){return{"max-width":e}};function Ne(e,t){if(1&e&&(s.TgZ(0,"td",47),s.TgZ(1,"div",52),s.TgZ(2,"span",53),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw(2);s.xp6(1),s.Q6J("ngStyle",s.VKq(2,ke,n.screenSize===n.screenSizeEnum.XS?"10rem":"32rem")),s.xp6(2),s.Oqu(e.description)}}function Je(e,t){1&e&&(s.TgZ(0,"th",54),s._uU(1," Amount (Sats) "),s.qZA())}function De(e,t){if(1&e&&(s.TgZ(0,"td",47),s.TgZ(1,"span",55),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,e.msatoshi/1e3,e.msatoshi<1e3?"1.0-4":"1.0-0"),"")}}function Oe(e,t){1&e&&(s.TgZ(0,"th",54),s._uU(1," Amount Settled (Sats) "),s.qZA())}function Re(e,t){if(1&e&&(s.TgZ(0,"td",47),s.TgZ(1,"span",55),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,e.msatoshi_received/1e3,e.msatoshi_received<1e3?"1.0-4":"1.0-0"),"")}}function Me(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",56),s.TgZ(1,"div",57),s.TgZ(2,"mat-select",58),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",59),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}const Ye=function(e){return{"px-3":e}};function Qe(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",60),s.TgZ(1,"button",61),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw(2).onInvoiceClick(n,t)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Ye,e.screenSize!==e.screenSizeEnum.XS))}}function Ie(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No invoices available."),s.qZA())}function Pe(e,t){if(1&e&&(s.TgZ(0,"td",62),s.YNc(1,Ie,2,0,"p",63),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=e.invoices&&e.invoices.data)||(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)<1)}}const Ee=function(e){return{"display-none":e}};function Be(e,t){if(1&e&&s._UZ(0,"tr",64),2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Ee,(null==e.invoices?null:e.invoices.data)&&(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)>0))}}function He(e,t){1&e&&s._UZ(0,"tr",65)}function Ve(e,t){if(1&e&&s._UZ(0,"tr",66),2&e){const e=t.$implicit,n=s.oxw(2);s.Q6J("@newlyAddedRowAnimation",e.label===n.newlyAddedInvoiceMemo&&e.value===n.newlyAddedInvoiceValue&&n.flgAnimate?"added":"notAdded")}}const ze=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}},Ge=function(){return["no_invoice"]};function Xe(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",17),s.TgZ(1,"div",18),s.TgZ(2,"div",19),s._UZ(3,"fa-icon",20),s.TgZ(4,"span",21),s._uU(5,"Invoices History"),s.qZA(),s.qZA(),s.TgZ(6,"mat-form-field",22),s.TgZ(7,"input",23),s.NdJ("keyup",function(t){return s.CHM(e),s.oxw().applyFilter(t.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",24),s.YNc(9,ve,1,0,"mat-progress-bar",25),s.TgZ(10,"table",26,27),s.ynx(12,28),s.YNc(13,be,2,0,"th",29),s.YNc(14,Se,5,6,"td",30),s.BQk(),s.ynx(15,31),s.YNc(16,Le,2,0,"th",29),s.YNc(17,Ue,3,4,"td",30),s.BQk(),s.ynx(18,32),s.YNc(19,Fe,2,0,"th",29),s.YNc(20,Ne,4,4,"td",30),s.BQk(),s.ynx(21,33),s.YNc(22,Je,2,0,"th",34),s.YNc(23,De,4,4,"td",30),s.BQk(),s.ynx(24,35),s.YNc(25,Oe,2,0,"th",34),s.YNc(26,Re,4,4,"td",30),s.BQk(),s.ynx(27,36),s.YNc(28,Me,6,0,"th",37),s.YNc(29,Qe,3,3,"td",38),s.BQk(),s.ynx(30,39),s.YNc(31,Pe,2,1,"td",40),s.BQk(),s.YNc(32,Be,1,3,"tr",41),s.YNc(33,He,1,0,"tr",42),s.YNc(34,Ve,1,1,"tr",43),s.qZA(),s.qZA(),s._UZ(35,"mat-paginator",44),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("icon",e.faHistory),s.xp6(6),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.invoices)("ngClass",s.VKq(11,ze,"error"===e.flgLoading[0])),s.xp6(22),s.Q6J("matFooterRowDef",s.DdM(13,Ge)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let $e=(()=>{class e{constructor(e,t,n,i,a,o){this.logger=e,this.store=t,this.decimalPipe=n,this.commonService=i,this.rtlEffects=a,this.datePipe=o,this.calledFrom="transactions",this.faHistory=f.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.flgAnimate=!0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgLoading=[!0],this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["expires_at","msatoshi","actions"]):this.screenSize===g.cu.SM?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","actions"]):this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","msatoshi_received","actions"]):(this.flgSticky=!0,this.displayedColumns=["expires_at","paid_at","description","msatoshi","msatoshi_received","actions"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchInvoices"===e.action&&(this.flgLoading[0]="error")}),this.selNode=e.nodeSettings,this.information=e.information,this.invoiceJSONArr=e.invoices.invoices&&e.invoices.invoices.length>0?e.invoices.invoices:[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),setTimeout(()=>{this.flgAnimate=!1},5e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!e.invoices),this.logger.info(e)})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch(new se.wu({data:{pageSize:this.pageSize,component:xe}}))}onAddInvoice(e){this.invoiceValue||(this.invoiceValue=0);let t=this.expiry?this.expiry:3600;this.flgAnimate=!0,this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch(new se.Fk("Adding Invoice...")),this.store.dispatch(new x.H1({label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:t,private:this.private})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch(new se.b_({data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{e&&(this.store.dispatch(new se.Fk("Deleting Invoices...")),this.store.dispatch(new x.nB))})}onInvoiceClick(e,t){this.store.dispatch(new se.wu({data:{invoice:{msatoshi:e.msatoshi,label:e.label,expires_at:e.expires_at,paid_at:e.paid_at,bolt11:e.bolt11,payment_hash:e.payment_hash,description:e.description,status:e.status,msatoshi_received:e.msatoshi_received},newlyAdded:!1,component:Ze.$}}))}resetData(){this.description="",this.invoiceValue=void 0,this.private=!1,this.expiry=void 0,this.invoiceValueHint=""}applyFilter(e){this.invoices.filter=e.value.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,g.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,g.Xz.OTHER)+" "+e.unit}))}loadInvoicesTable(e){this.invoices=new ae.by(e?[...e]:[]),this.invoices.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(e,t)=>((e.paid_at?this.datePipe.transform(new Date(1e3*e.paid_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(e.expires_at?this.datePipe.transform(new Date(1e3*e.expires_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(e).toLowerCase()).includes(t),this.invoices.paginator=this.paginator}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(i.JJ),s.Y36(w.v),s.Y36(Ae.V),s.Y36(i.uU))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-lightning-invoices"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},inputs:{calledFrom:"calledFrom"},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","expires_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","paid_at"],["matColumnDef","description"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Settled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unsettled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Settled","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unsettled","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,we,15,6,"form",1),s.YNc(2,Te,5,0,"div",2),s.YNc(3,Xe,36,14,"div",3),s.qZA()),2&e&&(s.xp6(1),s.Q6J("ngIf","home"===t.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===t.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===t.calledFrom))},directives:[l.xw,l.yH,l.Wh,i.O5,le._Y,le.JL,le.F,D.KE,re.Nt,le.Fj,le.JJ,le.On,le.wV,le.qQ,ue.q,D.R9,D.bx,C.lW,T.BN,M.$V,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ne.NW,r.pW,ae.ge,ie.nU,ae.ev,O.gM,i.PC,S.Zl,de.gD,de.$L,me.ey,ae.yh,ae.Q2,ae.XQ,ae.Gk],pipes:[i.uU,i.JJ],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[ye.Q]}}),e})();var Ke=n(9056),We=n(8640),je=n(4810);const et=["paymentReq"];function tt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-radio-group",17),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().paymentType=t})("change",function(){return s.CHM(e),s.oxw().onPaymentTypeChange()}),s.TgZ(1,"mat-radio-button",18),s._uU(2,"Invoice Payment"),s.qZA(),s.TgZ(3,"mat-radio-button",19),s._uU(4,"Keysend Payment"),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("ngModel",e.paymentType)}}function nt(e,t){1&e&&s.GkF(0)}function it(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Oqu(e.paymentError)}}function at(e,t){if(1&e&&(s.TgZ(0,"div",20),s._UZ(1,"fa-icon",21),s.YNc(2,it,2,1,"span",22),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==e.paymentError)}}function ot(e,t){if(1&e&&(s.TgZ(0,"mat-hint"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Oqu(e.paymentDecodedHint)}}function st(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Payment request is required."),s.qZA())}function lt(e,t){if(1&e&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Oqu(e.paymentDecodedHint)}}function rt(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Payment amount is required."),s.qZA())}function ct(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-form-field",1),s.TgZ(1,"input",26,27),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).paymentAmount=t})("change",function(t){return s.CHM(e),s.oxw(2).onAmountChange(t)}),s.qZA(),s.TgZ(3,"mat-hint"),s._uU(4,"It is a zero amount invoice, enter amount to be paid."),s.qZA(),s.YNc(5,rt,2,0,"mat-error",22),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngModel",e.paymentAmount),s.xp6(4),s.Q6J("ngIf",!e.paymentAmount)}}function ut(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-form-field",1),s.TgZ(1,"textarea",23,24),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().onPaymentRequestEntry(t)})("matTextareaAutosize",function(){return!0}),s.qZA(),s.YNc(3,ot,2,1,"mat-hint",22),s.YNc(4,st,2,0,"mat-error",22),s.YNc(5,lt,2,1,"mat-error",22),s.qZA(),s.YNc(6,ct,6,2,"mat-form-field",25)}if(2&e){const e=s.MAs(2),t=s.oxw();s.xp6(1),s.Q6J("ngModel",t.paymentRequest),s.xp6(2),s.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),s.xp6(1),s.Q6J("ngIf",!t.paymentRequest),s.xp6(1),s.Q6J("ngIf",null==e.errors?null:e.errors.decodeError),s.xp6(1),s.Q6J("ngIf",t.zeroAmtInvoice)}}function dt(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Pubkey is required."),s.qZA())}function ht(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Keysend amount is required."),s.qZA())}function mt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-form-field",1),s.TgZ(1,"input",28),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().pubkey=t}),s.qZA(),s.YNc(2,dt,2,0,"mat-error",22),s.qZA(),s.TgZ(3,"mat-form-field",1),s.TgZ(4,"input",29,30),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().keysendAmount=t}),s.qZA(),s.YNc(6,ht,2,0,"mat-error",22),s.qZA()}if(2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngModel",e.pubkey),s.xp6(1),s.Q6J("ngIf",!e.pubkey),s.xp6(2),s.Q6J("ngModel",e.keysendAmount),s.xp6(2),s.Q6J("ngIf",!e.keysendAmount)}}let pt=(()=>{class e{constructor(e,t,n,i,a,o,s,l){this.dialogRef=e,this.store=t,this.clEffects=n,this.logger=i,this.commonService=a,this.decimalPipe=o,this.actions$=s,this.rtlEffects=l,this.faExclamationTriangle=f.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentType="invoice",this.pubkey="",this.keysendAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=g.Vc[0],this.feeLimitTypes=g.Vc,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}set payReq(e){e&&(this.paymentReq=e)}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e.nodeSettings,this.activeChannels=e.allChannels.filter(e=>"CHANNELD_NORMAL"===e.state&&e.connected),this.isCompatibleVersion=this.commonService.isVersionCompatible(e.information.version,"0.9.0")&&this.commonService.isVersionCompatible(e.information.api_version,"0.4.0"),this.logger.info(e)}),this.actions$.pipe((0,h.R)(this.unSubs[1]),(0,m.h)(e=>e.type===x.at||e.type===x.zm)).subscribe(e=>{e.type===x.zm&&this.dialogRef.close(),e.type===x.at&&("SendPayment"===e.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=e.payload.message),"DecodePayment"===e.payload.action&&(this.paymentDecodedHint="ERROR: "+e.payload.message,this.paymentReq.control.setErrors({decodeError:!0})))})}onSendPayment(){if("invoice"===this.paymentType&&!this.paymentRequest||"keysend"===this.paymentType&&(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0))return!0;"keysend"===this.paymentType?this.keysendPayment():this.paymentDecoded.created_at?this.sendPayment():(this.paymentAmount=null,this.paymentError="",this.paymentDecodedHint="",this.paymentReq.control.setErrors(null),this.store.dispatch(new se.Fk("Decoding Payment...")),this.store.dispatch(new x.pu({routeParam:this.paymentRequest,fromDialog:!0})),this.clEffects.setDecodedPaymentCL.pipe((0,Ke.q)(1)).subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,g.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+e.symbol+this.decimalPipe.transform(e.OTHER?e.OTHER:0,g.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description}))}))}keysendPayment(){this.store.dispatch(new se.Fk("Sending Keysend Payment...")),this.store.dispatch(new x.Ar({pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}))}sendPayment(){this.store.dispatch(new se.Fk("Sending Payment...")),this.store.dispatch(new x.Ar(this.zeroAmtInvoice?{invoice:this.paymentRequest,amount:1e3*this.paymentAmount,fromDialog:!0}:{invoice:this.paymentRequest,fromDialog:!0}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.store.dispatch(new se.Fk("Decoding Payment...")),this.store.dispatch(new x.pu({routeParam:this.paymentRequest,fromDialog:!0})),this.clEffects.setDecodedPaymentCL.subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,g.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+e.symbol+this.decimalPipe.transform(e.OTHER?e.OTHER:0,g.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description}))}))}onAmountChange(e){delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=e}onPaymentTypeChange(){this.paymentError=""}resetData(){"keysend"===this.paymentType?(this.pubkey="",this.keysendAmount=null):(this.paymentDecoded={},this.paymentRequest="",this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=g.Vc[0],this.paymentReq.control.setErrors(null),this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null),this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(oe.so),s.Y36(y.yh),s.Y36(We.s),s.Y36(Z.mQ),s.Y36(w.v),s.Y36(i.JJ),s.Y36(A.eX),s.Y36(Ae.V))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-lightning-send-payments"]],viewQuery:function(e,t){if(1&e&&s.Gf(et,5),2&e){let e;s.iGM(e=s.CRH())&&(t.payReq=e.first)}},decls:23,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start stretch",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","8","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","7",3,"click"],["invoiceBlock",""],["keysendBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start stretch",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","25","tabindex","1","value","invoice",1,"mr-2"],["fxFlex","25","tabindex","2","value","keysend"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","3","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","4","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","5","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","6","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Send Payment"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.YNc(9,tt,5,1,"mat-radio-group",7),s.TgZ(10,"form",8,9),s.YNc(12,nt,1,0,"ng-container",10),s.YNc(13,at,3,2,"div",11),s.TgZ(14,"div",12),s.TgZ(15,"button",13),s.NdJ("click",function(){return t.resetData()}),s._uU(16,"Clear Fields"),s.qZA(),s.TgZ(17,"button",14),s.NdJ("click",function(){return t.onSendPayment()}),s._uU(18,"Send Payment"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(19,ut,7,5,"ng-template",null,15,s.W1O),s.YNc(21,mt,7,4,"ng-template",null,16,s.W1O)),2&e){const e=s.MAs(20),n=s.MAs(22);s.xp6(6),s.Q6J("mat-dialog-close",!1),s.xp6(3),s.Q6J("ngIf",t.isCompatibleVersion),s.xp6(3),s.Q6J("ngTemplateOutlet","keysend"===t.paymentType?n:e),s.xp6(1),s.Q6J("ngIf",""!==t.paymentError)}},directives:[l.xw,l.yH,b.dk,l.Wh,C.lW,oe.ZT,b.dn,i.O5,le._Y,le.JL,le.F,i.tP,je.VQ,le.JJ,le.On,je.U0,T.BN,D.KE,re.Nt,le.Fj,re.D7,ce.h,le.Q7,D.bx,D.TO],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),e})();const ft=["sendPaymentForm"];function gt(e,t){if(1&e&&(s.TgZ(0,"mat-hint"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Oqu(e.paymentDecodedHint)}}function xt(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Payment request is required."),s.qZA())}function Zt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",4,5),s.TgZ(2,"mat-form-field",6),s.TgZ(3,"textarea",7,8),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().onPaymentRequestEntry(t)})("matTextareaAutosize",function(){return!0}),s.qZA(),s.YNc(5,gt,2,1,"mat-hint",9),s.YNc(6,xt,2,0,"mat-error",9),s.qZA(),s.TgZ(7,"div",10),s.TgZ(8,"button",11),s.NdJ("click",function(){return s.CHM(e),s.oxw().resetData()}),s._uU(9,"Clear Field"),s.qZA(),s.TgZ(10,"button",12),s.NdJ("click",function(){return s.CHM(e),s.oxw().onSendPayment()}),s._uU(11,"Send Payment"),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngModel",e.paymentRequest),s.xp6(2),s.Q6J("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),s.xp6(1),s.Q6J("ngIf",!e.paymentRequest)}}function yt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",13),s.TgZ(1,"button",12),s.NdJ("click",function(){return s.CHM(e),s.oxw().openSendPaymentModal()}),s._uU(2,"Send Payment"),s.qZA(),s.qZA()}}function At(e,t){1&e&&s._UZ(0,"mat-progress-bar",47)}function wt(e,t){1&e&&(s.TgZ(0,"th",48),s._uU(1,"Created At"),s.qZA())}const Tt=function(e){return{"mr-0":e}};function vt(e,t){if(1&e&&s._UZ(0,"span",52),2&e){const e=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Tt,e.screenSize===e.screenSizeEnum.XS))}}function bt(e,t){if(1&e&&s._UZ(0,"span",53),2&e){const e=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Tt,e.screenSize===e.screenSizeEnum.XS))}}function qt(e,t){if(1&e&&(s.TgZ(0,"td",49),s.YNc(1,vt,1,3,"span",50),s.YNc(2,bt,1,3,"span",51),s._uU(3),s.ALo(4,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("ngIf","complete"===e.status),s.xp6(1),s.Q6J("ngIf","complete"!==e.status),s.xp6(1),s.hij(" ",s.xi3(4,3,1e3*(null==e?null:e.created_at),"dd/MMM/YYYY HH:mm")," ")}}function Ct(e,t){1&e&&(s.TgZ(0,"th",48),s._uU(1,"Payment Hash"),s.qZA())}function _t(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"div"),s._uU(2),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(null==e?null:e.payment_hash)}}function St(e,t){1&e&&(s.TgZ(0,"th",54),s._uU(1,"Sats Sent"),s.qZA())}function Lt(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"span",55),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,1,(null==e?null:e.msatoshi_sent)/1e3,(null==e?null:e.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function Ut(e,t){1&e&&(s.TgZ(0,"th",54),s._uU(1,"Sats Received"),s.qZA())}function Ft(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"span",55),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,1,(null==e?null:e.msatoshi)/1e3,(null==e?null:e.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function kt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",56),s.TgZ(1,"div",57),s.TgZ(2,"mat-select",58),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",59),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Nt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",60),s.TgZ(1,"button",61),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).onPaymentClick(t)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function Jt(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No payments available."),s.qZA())}function Dt(e,t){if(1&e&&(s.TgZ(0,"td",62),s.YNc(1,Jt,2,0,"p",9),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=e.payments&&e.payments.data)||(null==e.payments||null==e.payments.data?null:e.payments.data.length)<1)}}function Ot(e,t){if(1&e&&s._UZ(0,"span",66),2&e){const e=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Tt,e.screenSize===e.screenSizeEnum.XS))}}function Rt(e,t){if(1&e&&s._UZ(0,"span",67),2&e){const e=s.oxw(3);s.Q6J("ngClass",s.VKq(1,Tt,e.screenSize===e.screenSizeEnum.XS))}}function Mt(e,t){if(1&e&&s._UZ(0,"span",66),2&e){const e=s.oxw(5);s.Q6J("ngClass",s.VKq(1,Tt,e.screenSize===e.screenSizeEnum.XS))}}function Yt(e,t){if(1&e&&s._UZ(0,"span",67),2&e){const e=s.oxw(5);s.Q6J("ngClass",s.VKq(1,Tt,e.screenSize===e.screenSizeEnum.XS))}}function Qt(e,t){if(1&e&&(s.TgZ(0,"span",69),s.YNc(1,Mt,1,3,"span",64),s.YNc(2,Yt,1,3,"span",65),s._uU(3),s.ALo(4,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("ngIf","complete"===e.status),s.xp6(1),s.Q6J("ngIf","complete"!==e.status),s.xp6(1),s.hij(" ",s.xi3(4,3,1e3*e.created_at,"dd/MMM/YYYY HH:mm")," ")}}function It(e,t){if(1&e&&(s.ynx(0),s.YNc(1,Qt,5,6,"span",68),s.BQk()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==e?null:e.mpps)}}function Pt(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"span",63),s.YNc(2,Ot,1,3,"span",64),s.YNc(3,Rt,1,3,"span",65),s._uU(4),s.qZA(),s.YNc(5,It,2,1,"ng-container",9),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Q6J("ngIf","complete"===e.status),s.xp6(1),s.Q6J("ngIf","complete"!==e.status),s.xp6(1),s.hij(" Total Attempts: ",null==e?null:e.total_parts," "),s.xp6(1),s.Q6J("ngIf",e.is_expanded)}}function Et(e,t){if(1&e&&(s.TgZ(0,"span",63),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" Part ID ",e.partid?e.partid:0," ")}}function Bt(e,t){if(1&e&&(s.TgZ(0,"span"),s.YNc(1,Et,2,1,"span",70),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==e?null:e.mpps)}}function Ht(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"span",63),s._uU(2),s.qZA(),s.YNc(3,Bt,2,1,"span",9),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(null==e?null:e.payment_hash),s.xp6(1),s.Q6J("ngIf",e.is_expanded)}}function Vt(e,t){if(1&e&&(s.TgZ(0,"span",71),s._uU(1),s.ALo(2,"number"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",s.xi3(2,1,e.msatoshi_sent/1e3,e.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function zt(e,t){if(1&e&&(s.TgZ(0,"span"),s.YNc(1,Vt,3,4,"span",72),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==e?null:e.mpps)}}function Gt(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"span",71),s._uU(2),s.ALo(3,"number"),s.qZA(),s.YNc(4,zt,2,1,"span",9),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,2,(null==e?null:e.msatoshi_sent)/1e3,(null==e?null:e.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),s.xp6(2),s.Q6J("ngIf",e.is_expanded)}}function Xt(e,t){if(1&e&&(s.TgZ(0,"span",71),s._uU(1),s.ALo(2,"number"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",s.xi3(2,1,e.msatoshi/1e3,e.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function $t(e,t){if(1&e&&(s.TgZ(0,"span"),s.YNc(1,Xt,3,4,"span",72),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==e?null:e.mpps)}}function Kt(e,t){if(1&e&&(s.TgZ(0,"td",49),s.TgZ(1,"span",71),s._uU(2),s.ALo(3,"number"),s.qZA(),s.YNc(4,$t,2,1,"span",9),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,2,(null==e?null:e.msatoshi)/1e3,(null==e?null:e.msatoshi)<1e3?"1.0-4":"1.0-0")),s.xp6(2),s.Q6J("ngIf",e.is_expanded)}}function Wt(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",55),s.TgZ(1,"button",76),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(4).onPaymentClick(t)}),s._uU(2),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit;s.xp6(2),s.hij("View ",e.partid?e.partid:0,"")}}function jt(e,t){if(1&e&&(s.TgZ(0,"div"),s.YNc(1,Wt,3,1,"div",75),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Q6J("ngForOf",null==e?null:e.mpps)}}function en(e,t){if(1&e&&(s.TgZ(0,"td",73),s.TgZ(1,"span",55),s.TgZ(2,"button",74),s.NdJ("click",function(){const e=t.$implicit;return e.is_expanded=!e.is_expanded}),s._uU(3),s.qZA(),s.qZA(),s.YNc(4,jt,2,1,"div",9),s.qZA()),2&e){const e=t.$implicit;s.xp6(3),s.Oqu(e.is_expanded?"Hide":"Show"),s.xp6(1),s.Q6J("ngIf",e.is_expanded)}}function tn(e,t){if(1&e&&s._UZ(0,"tr",77),2&e){const e=t.$implicit,n=s.oxw(2);s.Q6J("@newlyAddedRowAnimation",e.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const nn=function(e){return{"display-none":e}};function an(e,t){if(1&e&&s._UZ(0,"tr",78),2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,nn,(null==e.payments?null:e.payments.data)&&(null==e.payments||null==e.payments.data?null:e.payments.data.length)>0))}}function on(e,t){1&e&&s._UZ(0,"tr",79)}function sn(e,t){if(1&e&&s._UZ(0,"tr",77),2&e){const e=t.$implicit,n=s.oxw(2);s.Q6J("@newlyAddedRowAnimation",e.payment_hash===n.newlyAddedPayment&&n.flgAnimate?"added":"notAdded")}}const ln=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}},rn=function(){return["no_payment"]};function cn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",14),s.TgZ(1,"div",15),s.TgZ(2,"div",16),s._UZ(3,"fa-icon",17),s.TgZ(4,"span",18),s._uU(5,"Payments History"),s.qZA(),s.qZA(),s.TgZ(6,"mat-form-field",19),s.TgZ(7,"input",20),s.NdJ("keyup",function(t){return s.CHM(e),s.oxw().applyFilter(t.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",21),s.YNc(9,At,1,0,"mat-progress-bar",22),s.TgZ(10,"table",23,24),s.ynx(12,25),s.YNc(13,wt,2,0,"th",26),s.YNc(14,qt,5,6,"td",27),s.BQk(),s.ynx(15,28),s.YNc(16,Ct,2,0,"th",26),s.YNc(17,_t,3,1,"td",27),s.BQk(),s.ynx(18,29),s.YNc(19,St,2,0,"th",30),s.YNc(20,Lt,4,4,"td",27),s.BQk(),s.ynx(21,31),s.YNc(22,Ut,2,0,"th",30),s.YNc(23,Ft,4,4,"td",27),s.BQk(),s.ynx(24,32),s.YNc(25,kt,6,0,"th",33),s.YNc(26,Nt,3,0,"td",34),s.BQk(),s.ynx(27,35),s.YNc(28,Dt,2,1,"td",36),s.BQk(),s.ynx(29,37),s.YNc(30,Pt,6,4,"td",27),s.BQk(),s.ynx(31,38),s.YNc(32,Ht,4,2,"td",27),s.BQk(),s.ynx(33,39),s.YNc(34,Gt,5,5,"td",27),s.BQk(),s.ynx(35,40),s.YNc(36,Kt,5,5,"td",27),s.BQk(),s.ynx(37,41),s.YNc(38,en,5,2,"td",42),s.BQk(),s.YNc(39,tn,1,1,"tr",43),s.YNc(40,an,1,3,"tr",44),s.YNc(41,on,1,0,"tr",45),s.YNc(42,sn,1,1,"tr",43),s.qZA(),s.qZA(),s._UZ(43,"mat-paginator",46),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("icon",e.faHistory),s.xp6(6),s.Q6J("ngIf",!0===e.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",e.payments)("ngClass",s.VKq(14,ln,"error"===e.flgLoading[0])),s.xp6(29),s.Q6J("matRowDefColumns",e.mppColumns)("matRowDefWhen",e.is_group),s.xp6(1),s.Q6J("matFooterRowDef",s.DdM(16,rn)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns)("matRowDefWhen",!e.is_group),s.xp6(1),s.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let un=(()=>{class e{constructor(e,t,n,i,a,o,s,l){this.logger=e,this.commonService=t,this.store=n,this.rtlEffects=i,this.clEffects=a,this.decimalPipe=o,this.titleCasePipe=s,this.datePipe=l,this.calledFrom="transactions",this.faHistory=f.qO$,this.newlyAddedPayment="",this.flgAnimate=!0,this.selNode={},this.flgLoading=[!0],this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["created_at","actions"],this.mppColumns=["groupTotal","groupAction"]):this.screenSize===g.cu.SM?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtRecv","groupAction"]):this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtSent","groupAmtRecv","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["created_at","payment_hash","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupHash","groupAmtSent","groupAmtRecv","groupAction"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchPayments"===e.action&&(this.flgLoading[0]="error")}),this.information=e.information,this.selNode=e.nodeSettings,this.paymentJSONArr=e.payments&&e.payments.length>0?e.payments:[],this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr),setTimeout(()=>{this.flgAnimate=!1},3e3),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.paymentJSONArr),this.logger.info(e)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(e,t){return t.is_group}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at?this.sendPayment():(this.store.dispatch(new se.Fk("Decoding Payment...")),this.store.dispatch(new x.pu({routeParam:this.paymentRequest,fromDialog:!1})),this.clEffects.setDecodedPaymentCL.pipe((0,Ke.q)(1)).subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.created_at?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()}))}sendPayment(){this.flgAnimate=!0,this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:50,type:g.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:g.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:g.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}})),this.rtlEffects.closeConfirm.pipe((0,Ke.q)(1)).subscribe(e=>{e&&(this.store.dispatch(new se.Fk("Sending Payment...")),this.store.dispatch(new x.Ar({invoice:this.paymentRequest,fromDialog:!1})),this.resetData())})):(this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:40,type:g.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:g.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:g.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}})),this.rtlEffects.closeConfirm.pipe((0,Ke.q)(1)).subscribe(e=>{e&&(this.paymentDecoded.msatoshi=e[0].inputValue,this.store.dispatch(new se.Fk("Sending Payment...")),this.store.dispatch(new x.Ar({invoice:this.paymentRequest,amount:1e3*e[0].inputValue,fromDialog:!1})),this.resetData())}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&(this.store.dispatch(new se.Fk("Decoding Payment...")),this.store.dispatch(new x.pu({routeParam:this.paymentRequest,fromDialog:!1})),this.clEffects.setDecodedPaymentCL.subscribe(e=>{this.paymentDecoded=e,this.paymentDecoded.msatoshi?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,g.NT.SATS,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.paymentDecodedHint=this.selNode.fiatConversion?"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+e.symbol+this.decimalPipe.transform(e.OTHER?e.OTHER:0,g.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description:"Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description}):this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description}))}openSendPaymentModal(){this.store.dispatch(new se.wu({data:{component:pt}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(e){const t=[[{key:"bolt11",value:e.bolt11,title:"Bolt 11",width:100,type:g.Gi.STRING}],[{key:"payment_preimage",value:e.payment_preimage,title:"Payment Preimage",width:100,type:g.Gi.STRING}],[{key:"id",value:e.id,title:"ID",width:20,type:g.Gi.STRING},{key:"destination",value:e.destination,title:"Destination",width:80,type:g.Gi.STRING}],[{key:"created_at",value:e.created_at,title:"Creation Date",width:50,type:g.Gi.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(e.status),title:"Status",width:50,type:g.Gi.STRING}],[{key:"msatoshi",value:e.msatoshi,title:"Amount (mSats)",width:50,type:g.Gi.NUMBER},{key:"msatoshi_sent",value:e.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:g.Gi.NUMBER}]];e.memo&&""!==e.memo&&t.splice(2,0,[{key:"memo",value:e.memo,title:"Memo",width:100,type:g.Gi.STRING}]),e.hasOwnProperty("partid")?t.unshift([{key:"payment_hash",value:e.payment_hash,title:"Payment Hash",width:80,type:g.Gi.STRING},{key:"partid",value:e.partid,title:"Part ID",width:20,type:g.Gi.STRING}]):t.unshift([{key:"payment_hash",value:e.payment_hash,title:"Payment Hash",width:100,type:g.Gi.STRING}]),this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"Payment Information",message:t}}))}applyFilter(e){this.payments.filter=e.value.trim().toLowerCase()}loadPaymentsTable(e){this.payments=new ae.by(e?[...e]:[]),this.payments.data=this.paymentJSONArr,this.payments.sort=this.sort,this.payments.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.payments.filterPredicate=(e,t)=>JSON.stringify(e).toLowerCase().includes(t),this.payments.filterPredicate=(e,t)=>((e.created_at?this.datePipe.transform(new Date(1e3*e.created_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(e).toLowerCase()).includes(t),this.payments.paginator=this.paginator}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){let e=JSON.parse(JSON.stringify(this.payments.data)).reduce((e,t)=>t.mpps?e.concat(t.mpps):(delete t.is_group,delete t.is_expanded,delete t.total_parts,e.concat(t)),[]);this.commonService.downloadFile(e,"Payments")}}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(Ae.V),s.Y36(We.s),s.Y36(i.JJ),s.Y36(i.rS),s.Y36(i.uU))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-lightning-payments"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ft,5),s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.form=e.first),s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},inputs:{calledFrom:"calledFrom"},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","created_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","payment_hash"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupHash"],["matColumnDef","groupAmtSent"],["matColumnDef","groupAmtRecv"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"mpp-row-span"],["class","dot green mt-0","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow mt-0","matTooltip","Incomplete/Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green","mt-0",3,"ngClass"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow","mt-0",3,"ngClass"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,Zt,12,3,"form",1),s.YNc(2,yt,3,0,"div",2),s.YNc(3,cn,44,17,"div",3),s.qZA()),2&e&&(s.xp6(1),s.Q6J("ngIf","home"===t.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===t.calledFrom),s.xp6(1),s.Q6J("ngIf","transactions"===t.calledFrom))},directives:[l.xw,l.yH,l.Wh,i.O5,le._Y,le.JL,le.F,D.KE,re.Nt,le.Fj,re.D7,le.Q7,M.$V,le.JJ,le.On,C.lW,D.bx,D.TO,T.BN,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.mD,ae.nj,ae.Ke,ae.as,ne.NW,r.pW,ae.ge,ie.nU,ae.ev,O.gM,de.gD,de.$L,me.ey,ae.yh,i.sg,ae.Gk,ae.Q2,ae.XQ],pipes:[i.uU,i.JJ],styles:[".mat-column-bolt11[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"],data:{animation:[ye.Q]}}),e})();function dn(e,t){if(1&e&&(s.TgZ(0,"button",25),s.TgZ(1,"mat-icon"),s._uU(2,"more_vert"),s.qZA(),s.qZA()),2&e){s.oxw();const e=s.MAs(11);s.Q6J("matMenuTriggerFor",e)}}function hn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).onNavigateTo("/cl/reports")}),s._uU(1,"Fees Summary"),s.qZA()}}function mn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw(3).onsortChannelsBy()}),s._uU(1),s.qZA()}if(2&e){const e=s.oxw(3);s.xp6(1),s.hij("Sort By ","Balance Score"===e.sortField?"Capacity":"Balance Score","")}}const pn=function(e){return{"error-border":e}};function fn(e,t){if(1&e&&s._UZ(0,"rtl-cl-node-info",26),2&e){const e=s.oxw(3);s.Q6J("information",e.information)("showColorFieldSeparately",!1)("ngClass",s.VKq(3,pn,"error"===e.flgLoading[0]))}}function gn(e,t){if(1&e&&s._UZ(0,"rtl-cl-balances-info",27),2&e){const e=s.oxw(3);s.Q6J("balances",e.balances)("ngClass",s.VKq(2,pn,"error"===e.flgLoading[2]))}}function xn(e,t){if(1&e&&s._UZ(0,"rtl-cl-channel-capacity-info",28),2&e){const e=s.oxw(3);s.Q6J("sortBy",e.sortField)("channelBalances",e.channelBalances)("allChannels",e.allChannelsCapacity)("ngClass",s.VKq(4,pn,"error"===e.flgLoading[5]))}}function Zn(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-info",29),2&e){const e=s.oxw(3);s.Q6J("fees",e.fees)("ngClass",s.VKq(2,pn,"error"===e.flgLoading[1]))}}function yn(e,t){if(1&e&&s._UZ(0,"rtl-cl-channel-status-info",30),2&e){const e=s.oxw(3);s.Q6J("channelsStatus",e.channelsStatus)("ngClass",s.VKq(2,pn,"error"===e.flgLoading[0]))}}function An(e,t){1&e&&(s.TgZ(0,"h3"),s._uU(1,"Error! Unable to find information!"),s.qZA())}function wn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-grid-tile",8),s.TgZ(1,"mat-card",9),s.TgZ(2,"mat-card-header"),s.TgZ(3,"mat-card-title",10),s.TgZ(4,"div"),s._UZ(5,"fa-icon",11),s.TgZ(6,"span"),s._uU(7),s.qZA(),s.qZA(),s.TgZ(8,"div"),s.YNc(9,dn,3,1,"button",12),s.TgZ(10,"mat-menu",13,14),s.TgZ(12,"button",15),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw(2).onNavigateTo(t.link)}),s._uU(13),s.qZA(),s.YNc(14,hn,2,0,"button",16),s.YNc(15,mn,2,1,"button",16),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(16,"mat-card-content",17),s.TgZ(17,"div",18),s.YNc(18,fn,1,5,"rtl-cl-node-info",19),s.YNc(19,gn,1,4,"rtl-cl-balances-info",20),s.YNc(20,xn,1,6,"rtl-cl-channel-capacity-info",21),s.YNc(21,Zn,1,4,"rtl-cl-fee-info",22),s.YNc(22,yn,1,4,"rtl-cl-channel-status-info",23),s.YNc(23,An,2,0,"h3",24),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit;s.Q6J("colspan",e.cols)("rowspan",e.rows),s.xp6(5),s.Q6J("icon",e.icon),s.xp6(2),s.Oqu(e.title),s.xp6(2),s.Q6J("ngIf",e.link),s.xp6(4),s.hij("Go To ",e.goTo,""),s.xp6(1),s.Q6J("ngIf","fee"===e.id),s.xp6(1),s.Q6J("ngIf","capacity"===e.id),s.xp6(1),s.s9C("fxFlex","capacity"===e.id?90:70),s.xp6(1),s.Q6J("ngSwitch",e.id),s.xp6(1),s.Q6J("ngSwitchCase","node"),s.xp6(1),s.Q6J("ngSwitchCase","balance"),s.xp6(1),s.Q6J("ngSwitchCase","capacity"),s.xp6(1),s.Q6J("ngSwitchCase","fee"),s.xp6(1),s.Q6J("ngSwitchCase","status")}}function Tn(e,t){if(1&e&&(s.TgZ(0,"div",2),s.TgZ(1,"div",3),s._UZ(2,"fa-icon",4),s.TgZ(3,"span",5),s._uU(4),s.qZA(),s.qZA(),s.TgZ(5,"mat-grid-list",6),s.YNc(6,wn,24,15,"mat-grid-tile",7),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(2),s.Q6J("icon",e.flgLoading[0]?e.faFrown:e.faSmile),s.xp6(2),s.Oqu(e.flgLoading[0]?"Error! Please check the server connection.":"Welcome "+e.information.alias+"! Your node is up and running."),s.xp6(1),s.Q6J("rowHeight",e.operatorCardHeight),s.xp6(1),s.Q6J("ngForOf",e.operatorCards)}}function vn(e,t){if(1&e&&(s.TgZ(0,"button",25),s.TgZ(1,"mat-icon"),s._uU(2,"more_vert"),s.qZA(),s.qZA()),2&e){s.oxw();const e=s.MAs(9);s.Q6J("matMenuTriggerFor",e)}}function bn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-card-header"),s.TgZ(1,"mat-card-title",10),s.TgZ(2,"div"),s._UZ(3,"fa-icon",11),s.TgZ(4,"span"),s._uU(5),s.qZA(),s.qZA(),s.TgZ(6,"div"),s.YNc(7,vn,3,1,"button",12),s.TgZ(8,"mat-menu",13,39),s.TgZ(10,"button",15),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw(2).onNavigateTo(t.link)}),s._uU(11),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw().$implicit;s.xp6(3),s.Q6J("icon",e.icon),s.xp6(2),s.Oqu(e.title),s.xp6(2),s.Q6J("ngIf",e.link),s.xp6(4),s.hij("Go To ",e.goTo,"")}}function qn(e,t){if(1&e&&s._UZ(0,"rtl-cl-node-info",40),2&e){const e=s.oxw(3);s.Q6J("information",e.information)("ngClass",s.VKq(2,pn,"error"===e.flgLoading[0]))}}function Cn(e,t){if(1&e&&s._UZ(0,"rtl-cl-balances-info",27),2&e){const e=s.oxw(3);s.Q6J("balances",e.balances)("ngClass",s.VKq(2,pn,"error"===e.flgLoading[2]))}}function _n(e,t){if(1&e&&s._UZ(0,"rtl-cl-channel-liquidity-info",41),2&e){const e=s.oxw(3);s.Q6J("direction","In")("totalLiquidity",e.totalInboundLiquidity)("allChannels",e.allInboundChannels)("ngClass",s.VKq(4,pn,"error"===e.flgLoading[5]))}}function Sn(e,t){if(1&e&&s._UZ(0,"rtl-cl-channel-liquidity-info",41),2&e){const e=s.oxw(3);s.Q6J("direction","Out")("totalLiquidity",e.totalOutboundLiquidity)("allChannels",e.allOutboundChannels)("ngClass",s.VKq(4,pn,"error"===e.flgLoading[5]))}}function Ln(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",50),s.TgZ(1,"mat-icon"),s._uU(2,"more_vert"),s.qZA(),s.qZA(),s.TgZ(3,"mat-menu",13,51),s.TgZ(5,"button",15),s.NdJ("click",function(){s.CHM(e);const t=s.oxw(2).$implicit;return s.oxw(2).onNavigateTo(t.link)}),s._uU(6),s.qZA(),s.TgZ(7,"button",15),s.NdJ("click",function(){return s.CHM(e),s.oxw(4).onNavigateTo("/cl/reports/transactions")}),s._uU(8,"Transactions Summary"),s.qZA(),s.qZA()}if(2&e){const e=s.MAs(4),t=s.oxw(2).$implicit;s.Q6J("matMenuTriggerFor",e),s.xp6(6),s.hij("Go To ",t.goTo,"")}}function Un(e,t){1&e&&(s.TgZ(0,"span",42),s.TgZ(1,"mat-tab-group",43),s.TgZ(2,"mat-tab",44),s._UZ(3,"rtl-cl-lightning-invoices",45),s.qZA(),s.TgZ(4,"mat-tab",46),s._UZ(5,"rtl-cl-lightning-payments",47),s.qZA(),s.TgZ(6,"mat-tab",48),s.YNc(7,Ln,9,2,"ng-template",49),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("calledFrom","home"),s.xp6(2),s.Q6J("calledFrom","home"),s.xp6(1),s.Q6J("disabled",!0))}function Fn(e,t){1&e&&(s.TgZ(0,"h3"),s._uU(1,"Error! Unable to find information!"),s.qZA())}const kn=function(e){return{"p-0":e}};function Nn(e,t){if(1&e&&(s.TgZ(0,"mat-grid-tile",8),s.TgZ(1,"mat-card",33),s.YNc(2,bn,12,4,"mat-card-header",34),s.TgZ(3,"mat-card-content",35),s.TgZ(4,"div",18),s.YNc(5,qn,1,4,"rtl-cl-node-info",36),s.YNc(6,Cn,1,4,"rtl-cl-balances-info",20),s.YNc(7,_n,1,6,"rtl-cl-channel-liquidity-info",37),s.YNc(8,Sn,1,6,"rtl-cl-channel-liquidity-info",37),s.YNc(9,Un,8,3,"span",38),s.YNc(10,Fn,2,0,"h3",24),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.Q6J("colspan",e.cols)("rowspan",e.rows),s.xp6(1),s.Q6J("ngClass",s.VKq(11,kn,"transactions"===e.id)),s.xp6(1),s.Q6J("ngIf","transactions"!==e.id),s.xp6(1),s.s9C("fxFlex","transactions"===e.id?100:"balance"===e.id?70:90),s.xp6(1),s.Q6J("ngSwitch",e.id),s.xp6(1),s.Q6J("ngSwitchCase","node"),s.xp6(1),s.Q6J("ngSwitchCase","balance"),s.xp6(1),s.Q6J("ngSwitchCase","inboundLiq"),s.xp6(1),s.Q6J("ngSwitchCase","outboundLiq"),s.xp6(1),s.Q6J("ngSwitchCase","transactions")}}function Jn(e,t){if(1&e&&(s.TgZ(0,"div",31),s._UZ(1,"fa-icon",4),s.TgZ(2,"span",5),s._uU(3),s.qZA(),s.qZA(),s.TgZ(4,"mat-grid-list",32),s.YNc(5,Nn,11,13,"mat-grid-tile",7),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("icon",e.faSmile),s.xp6(2),s.hij("Welcome ",e.information.alias,"! Your node is up and running."),s.xp6(1),s.Q6J("rowHeight",e.merchantCardHeight),s.xp6(1),s.Q6J("ngForOf",e.merchantCards)}}let Dn=(()=>{class e{constructor(e,t,n,i,a){this.logger=e,this.store=t,this.actions$=n,this.commonService=i,this.router=a,this.faSmile=p.I3,this.faFrown=p.Kf,this.faAngleDoubleDown=f.Sbq,this.faAngleDoubleUp=f.Vfw,this.faChartPie=f.OS1,this.faBolt=f.BDt,this.faServer=f.xf3,this.faNetworkWired=f.kXW,this.flgChildInfoUpdated=!1,this.userPersonaEnum=g.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.allChannels=[],this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.feeRatesPerKB={},this.feeRatesPerKW={},this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.flgLoading=[!0,!0,!0,!0,!0,!0,!0,!0],this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:10,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:10,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:10,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:10,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:6,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:6,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:6,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:6,rows:8}]):this.screenSize===g.cu.SM||this.screenSize===g.cu.MD?(this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:5,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:5,rows:1},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:5,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:5,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:10,rows:2}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:4},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:3,rows:4},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:3,rows:8},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:3,rows:8}]):(this.operatorCardHeight=.77*window.screen.height/2+"px",this.merchantCardHeight=.76*window.screen.height/10+"px",this.operatorCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:3,rows:1},{id:"capacity",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels Capacity",cols:4,rows:2},{id:"fee",goTo:"Routing",link:"/cl/routing",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1},{id:"status",goTo:"Channels",link:"/cl/connections",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1}],this.merchantCards=[{id:"balance",goTo:"On-Chain",link:"/cl/onchain",icon:this.faChartPie,title:"Balances",cols:2,rows:5},{id:"inboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleDown,title:"In-Bound Liquidity",cols:2,rows:10},{id:"outboundLiq",goTo:"Channels",link:"/cl/connections",icon:this.faAngleDoubleUp,title:"Out-Bound Liquidity",cols:2,rows:10},{id:"transactions",goTo:"Transactions",link:"/cl/transactions",title:"",cols:2,rows:5}])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.flgLoading=[!0,!0,!0,!0,!0,!0,!0,!0],e.effectErrors.forEach(e=>{"FetchInfo"===e.action&&(this.flgLoading[0]="error"),"FetchFees"===e.action&&(this.flgLoading[1]="error"),"FetchBalance"===e.action&&(this.flgLoading[2]="error"),"FetchLocalRemoteBalance"===e.action&&(this.flgLoading[3]="error"),"FetchFeeRates"===e.action&&(this.flgLoading[4]="error"),"FetchChannels"===e.action&&(this.flgLoading[5]="error")}),this.selNode=e.nodeSettings,this.information=e.information,"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.information.id),this.fees=e.fees,"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!this.fees.feeCollected),this.totalBalance=e.balance,this.balances.onchain=e.balance.totalBalance,this.balances.lightning=e.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances),"error"!==this.flgLoading[2]&&(this.flgLoading[2]=""===this.totalBalance);let t=e.localRemoteBalance.localBalance?+e.localRemoteBalance.localBalance:0,n=e.localRemoteBalance.remoteBalance?+e.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:t,remoteBalance:n,balancedness:+(1-Math.abs((t-n)/(t+n))).toFixed(3)},"error"!==this.flgLoading[3]&&(this.flgLoading[3]=!e.localRemoteBalance.localBalance),this.feeRatesPerKB=e.feeRatesPerKB,this.feeRatesPerKW=e.feeRatesPerKW,"error"!==this.flgLoading[4]&&(this.flgLoading[4]=!this.feeRatesPerKB||!this.feeRatesPerKW),this.channelsStatus={active:{channels:e.information.num_active_channels,capacity:e.localRemoteBalance.localBalance},pending:{channels:e.information.num_pending_channels,capacity:0|e.localRemoteBalance.pendingBalance},inactive:{channels:e.information.num_inactive_channels,capacity:0|e.localRemoteBalance.inactiveBalance}},this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannels=e.allChannels.filter(e=>"CHANNELD_NORMAL"===e.state&&e.connected),this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(e=>e.msatoshi_to_them>0),"msatoshi_to_them"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(e=>e.msatoshi_to_us>0),"msatoshi_to_us"))),this.allChannels.forEach(e=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(e.msatoshi_to_them/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(e.msatoshi_to_us/1e3)}),"error"!==this.flgLoading[5]&&(this.flgLoading[5]=!this.allChannels||!this.allChannels.length),this.flgChildInfoUpdated=this.balances.lightning>=0&&this.balances.onchain>=0&&this.fees.feeCollected>=0,this.logger.info(e)}),this.actions$.pipe((0,h.R)(this.unSubs[2]),(0,m.h)(e=>e.type===x.yA||e.type===x.iK)).subscribe(e=>{e.type===x.yA&&(this.flgChildInfoUpdated=!1),e.type===x.iK&&(this.flgChildInfoUpdated=!0)})}onNavigateTo(e){this.router.navigateByUrl(e)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.allChannels.sort(function(e,t){const n=+e.msatoshi_to_us+ +e.msatoshi_to_them,i=+t.msatoshi_to_them+ +t.msatoshi_to_them;return n>i?-1:n<i?1:0})):(this.sortField="Balance Score",this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels,"balancedness"))))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(A.eX),s.Y36(w.v),s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"click",4,"ngIf"],["fxLayout","column",1,"dashboard-card-content",3,"fxFlex"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"balances","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"fees","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","ngClass",4,"ngSwitchCase"],[4,"ngSwitchDefault"],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",3,"matMenuTriggerFor"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass"],["fxFlex","100",3,"balances","ngClass"],["fxFlex","100",3,"sortBy","channelBalances","allChannels","ngClass"],["fxFlex","100",3,"fees","ngClass"],["fxFlex","100",3,"channelsStatus","ngClass"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",1,"dashboard-card-content",3,"fxFlex"],["fxFlex","100",3,"information","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","ngClass",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information","ngClass"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","ngClass"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["mat-icon-button","","aria-label","Toggle menu",1,"more-button",2,"max-width","20px",3,"matMenuTriggerFor"],["menuTransactions","matMenu"]],template:function(e,t){if(1&e&&(s.YNc(0,Tn,7,4,"div",0),s.YNc(1,Jn,6,4,"ng-template",null,1,s.W1O)),2&e){const e=s.MAs(2);s.Q6J("ngIf",t.selNode.userPersona===t.userPersonaEnum.OPERATOR)("ngIfElse",e)}},directives:[i.O5,l.xw,l.Wh,T.BN,v.Il,i.sg,v.DX,b.a8,l.yH,b.dk,b.n5,q.VK,q.OP,b.dn,i.RF,i.n9,i.ED,C.lW,q.p6,_.Hw,N,i.mk,S.oO,J,P,E,B,ee,te.SP,te.uX,$e,un,te.uD],styles:[""]}),e})();var On=n(5868),Rn=n(1339),Mn=n(1403),Yn=n(9236),Qn=n(5001),In=n(7753);const Pn=["form"],En=["formSweepAll"],Bn=["stepper"];function Hn(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Bitcoin address is required."),s.qZA())}function Vn(e,t){1&e&&(s.TgZ(0,"mat-hint"),s._uU(1,"Amount replaced by UTXO balance"),s.qZA())}function zn(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function Gn(e,t){if(1&e&&(s.TgZ(0,"mat-option",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.Oqu(e)}}function Xn(e,t){if(1&e&&(s.TgZ(0,"mat-option",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.feeRateId),s.xp6(1),s.hij(" ",e.feeRateType," ")}}function $n(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Min Confirmation Blocks is required."),s.qZA())}function Kn(e,t){if(1&e&&(s.TgZ(0,"mat-option",36),s._uU(1),s.ALo(2,"number"),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.hij("",s.lcZ(2,2,e.value)," Sats")}}function Wn(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",37),s.TgZ(1,"mat-expansion-panel",38),s.NdJ("closed",function(){return s.CHM(e),s.oxw(2).onAdvancedPanelToggle(!0)})("opened",function(){return s.CHM(e),s.oxw(2).onAdvancedPanelToggle(!1)}),s.TgZ(2,"mat-expansion-panel-header"),s.TgZ(3,"mat-panel-title"),s.TgZ(4,"span"),s._uU(5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(6,"div",31),s.TgZ(7,"div",39),s.TgZ(8,"mat-form-field",40),s.TgZ(9,"mat-select",41),s.NdJ("selectionChange",function(t){return s.CHM(e),s.oxw(2).onUTXOSelectionChange(t)})("valueChange",function(t){return s.CHM(e),s.oxw(2).selUTXOs=t}),s.TgZ(10,"mat-select-trigger"),s._uU(11),s.ALo(12,"number"),s.qZA(),s.YNc(13,Kn,3,4,"mat-option",21),s.qZA(),s.qZA(),s.TgZ(14,"mat-slide-toggle",42),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw(2).flgUseAllBalance=t})("change",function(){return s.CHM(e),s.oxw(2).onUTXOAllBalanceChange()}),s._uU(15," Use selected UTXOs balance "),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(5),s.Oqu(e.advancedTitle),s.xp6(4),s.Q6J("value",e.selUTXOs),s.xp6(2),s.AsE("",s.lcZ(12,7,e.totalSelectedUTXOAmount)," Sats (",e.selUTXOs.length>1?e.selUTXOs.length+" UTXOs":"1 UTXO",")"),s.xp6(2),s.Q6J("ngForOf",e.utxos),s.xp6(1),s.Q6J("ngModel",e.flgUseAllBalance)("disabled",e.selUTXOs.length<1)}}function jn(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(3);s.xp6(1),s.Oqu(e.sendFundError)}}function ei(e,t){if(1&e&&(s.TgZ(0,"div",43),s._UZ(1,"fa-icon",44),s.YNc(2,jn,2,1,"span",14),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==e.sendFundError)}}function ti(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"form",9,10),s.NdJ("submit",function(){return s.CHM(e),s.oxw().onSendFunds()})("reset",function(){return s.CHM(e),s.oxw().resetData()}),s.TgZ(2,"mat-form-field",11),s.TgZ(3,"input",12,13),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().transaction.address=t}),s.qZA(),s.YNc(5,Hn,2,0,"mat-error",14),s.qZA(),s.TgZ(6,"mat-form-field",15),s.TgZ(7,"input",16,17),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().transaction.satoshis=t}),s.qZA(),s.YNc(9,Vn,2,0,"mat-hint",14),s.TgZ(10,"span",18),s._uU(11),s.qZA(),s.YNc(12,zn,2,0,"mat-error",14),s.qZA(),s.TgZ(13,"mat-form-field",19),s.TgZ(14,"mat-select",20),s.NdJ("selectionChange",function(t){return s.CHM(e),s.oxw().onAmountUnitChange(t)}),s.YNc(15,Gn,2,2,"mat-option",21),s.qZA(),s.qZA(),s.TgZ(16,"div",22),s.TgZ(17,"mat-form-field",23),s.TgZ(18,"mat-select",24),s.NdJ("valueChange",function(t){return s.CHM(e),s.oxw().transaction.feeRate=t}),s.YNc(19,Xn,2,2,"mat-option",21),s.qZA(),s.qZA(),s.TgZ(20,"div",25),s.TgZ(21,"mat-checkbox",26),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().flgMinConf=t})("change",function(){s.CHM(e);const t=s.oxw();return t.flgMinConf?t.transaction.feeRate=null:t.transaction.minconf=null}),s.qZA(),s.TgZ(22,"mat-form-field",27),s.TgZ(23,"input",28,29),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().transaction.minconf=t}),s.qZA(),s.YNc(25,$n,2,0,"mat-error",14),s.qZA(),s.qZA(),s.qZA(),s.YNc(26,Wn,16,9,"div",30),s._UZ(27,"div",31),s.YNc(28,ei,3,2,"div",32),s.TgZ(29,"div",33),s.TgZ(30,"button",34),s._uU(31,"Clear Fields"),s.qZA(),s.TgZ(32,"button",35),s._uU(33,"Send Funds"),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngModel",e.transaction.address),s.xp6(2),s.Q6J("ngIf",!e.transaction.address),s.xp6(2),s.Q6J("ngModel",e.transaction.satoshis)("type",e.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",e.flgUseAllBalance),s.xp6(2),s.Q6J("ngIf",e.flgUseAllBalance),s.xp6(2),s.hij(" ",e.selAmountUnit," "),s.xp6(1),s.Q6J("ngIf",!e.transaction.satoshis),s.xp6(2),s.Q6J("value",e.selAmountUnit)("disabled",e.flgUseAllBalance),s.xp6(1),s.Q6J("ngForOf",e.amountUnits),s.xp6(3),s.Q6J("value",e.transaction.feeRate)("disabled",e.flgMinConf),s.xp6(1),s.Q6J("ngForOf",e.feeRateTypes),s.xp6(2),s.Q6J("ngModel",e.flgMinConf),s.xp6(2),s.Q6J("ngModel",e.transaction.minconf)("step",1)("min",0)("required",e.flgMinConf)("disabled",!e.flgMinConf),s.xp6(2),s.Q6J("ngIf",e.flgMinConf&&!e.transaction.minconf),s.xp6(1),s.Q6J("ngIf",e.isCompatibleVersion),s.xp6(2),s.Q6J("ngIf",""!==e.sendFundError)}}function ni(e,t){if(1&e&&s._uU(0),2&e){const e=s.oxw(3);s.Oqu(e.passwordFormLabel)}}function ii(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Password is required."),s.qZA())}function ai(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-step",49),s.TgZ(1,"form",69),s.YNc(2,ni,1,1,"ng-template",63),s.TgZ(3,"div",0),s.TgZ(4,"mat-form-field",1),s._UZ(5,"input",70),s.YNc(6,ii,2,0,"mat-error",14),s.qZA(),s.qZA(),s.TgZ(7,"div",71),s.TgZ(8,"button",72),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).onAuthenticate()}),s._uU(9,"Confirm"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.Q6J("stepControl",e.passwordFormGroup)("editable",e.flgEditable),s.xp6(1),s.Q6J("formGroup",e.passwordFormGroup),s.xp6(5),s.Q6J("ngIf",null==e.passwordFormGroup.controls.password.errors?null:e.passwordFormGroup.controls.password.errors.required)}}function oi(e,t){if(1&e&&s._uU(0),2&e){const e=s.oxw(2);s.Oqu(e.sendFundFormLabel)}}function si(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Bitcoin address is required."),s.qZA())}function li(e,t){if(1&e&&(s.TgZ(0,"mat-option",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.feeRateId),s.xp6(1),s.hij(" ",e.feeRateType," ")}}function ri(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Fees Rate is required."),s.qZA())}function ci(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Min confirmation blocks is required."),s.qZA())}function ui(e,t){if(1&e&&s._uU(0),2&e){const e=s.oxw(2);s.Oqu(e.confirmFormLabel)}}function di(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(3);s.xp6(1),s.Oqu(e.sendFundError)}}function hi(e,t){if(1&e&&(s.TgZ(0,"div",43),s._UZ(1,"fa-icon",44),s.YNc(2,di,2,1,"span",14),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==e.sendFundError)}}function mi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",45),s.TgZ(1,"mat-vertical-stepper",46,47),s.NdJ("selectionChange",function(t){return s.CHM(e),s.oxw().stepSelectionChanged(t)}),s.YNc(3,ai,10,4,"mat-step",48),s.TgZ(4,"mat-step",49),s.TgZ(5,"form",50),s.YNc(6,oi,1,1,"ng-template",51),s.TgZ(7,"div",31),s.TgZ(8,"mat-form-field",1),s._UZ(9,"input",52),s.YNc(10,si,2,0,"mat-error",14),s.qZA(),s.TgZ(11,"div",53),s.TgZ(12,"mat-form-field",54),s.TgZ(13,"mat-select",55),s.YNc(14,li,2,2,"mat-option",21),s.qZA(),s.YNc(15,ri,2,0,"mat-error",14),s.qZA(),s.TgZ(16,"div",56),s._UZ(17,"mat-checkbox",57),s.TgZ(18,"mat-form-field",27),s._UZ(19,"input",58),s.YNc(20,ci,2,0,"mat-error",14),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(21,"div",59),s.TgZ(22,"button",60),s._uU(23,"Next"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(24,"mat-step",61),s.TgZ(25,"form",62),s.YNc(26,ui,1,1,"ng-template",63),s.TgZ(27,"div",45),s.TgZ(28,"div",64),s._UZ(29,"fa-icon",65),s.TgZ(30,"span"),s._uU(31,"You are about to sweep all funds from RTL. Are you sure?"),s.qZA(),s.qZA(),s.YNc(32,hi,3,2,"div",32),s.TgZ(33,"div",59),s.TgZ(34,"button",66),s.NdJ("click",function(){return s.CHM(e),s.oxw().onSendFunds()}),s._uU(35,"Sweep All Funds"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(36,"div",67),s.TgZ(37,"button",68),s._uU(38),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(1),s.Q6J("linear",!0),s.xp6(2),s.Q6J("ngIf",!e.appConfig.sso.rtlSSO),s.xp6(1),s.Q6J("stepControl",e.sendFundFormGroup)("editable",e.flgEditable),s.xp6(1),s.Q6J("formGroup",e.sendFundFormGroup),s.xp6(5),s.Q6J("ngIf",null==e.sendFundFormGroup.controls.transactionAddress.errors?null:e.sendFundFormGroup.controls.transactionAddress.errors.required),s.xp6(4),s.Q6J("ngForOf",e.feeRateTypes),s.xp6(1),s.Q6J("ngIf",null==e.sendFundFormGroup.controls.transactionFeeRate.errors?null:e.sendFundFormGroup.controls.transactionFeeRate.errors.required),s.xp6(4),s.Q6J("step",1)("min",0),s.xp6(1),s.Q6J("ngIf",null==e.sendFundFormGroup.controls.transactionBlocks.errors?null:e.sendFundFormGroup.controls.transactionBlocks.errors.required),s.xp6(4),s.Q6J("stepControl",e.confirmFormGroup),s.xp6(1),s.Q6J("formGroup",e.confirmFormGroup),s.xp6(4),s.Q6J("icon",e.faExclamationTriangle),s.xp6(3),s.Q6J("ngIf",""!==e.sendFundError),s.xp6(5),s.Q6J("mat-dialog-close",!1),s.xp6(1),s.Oqu(e.flgValidated?"Close":"Cancel")}}let pi=(()=>{class e{constructor(e,t,n,i,a,o,s,l,r,c){this.dialogRef=e,this.data=t,this.logger=n,this.store=i,this.commonService=a,this.decimalPipe=o,this.actions$=s,this.formBuilder=l,this.rtlEffects=r,this.snackBar=c,this.faExclamationTriangle=f.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.flgLoadingWallet=!0,this.selectedAddress=g._t[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=g.vn,this.flgMinConf=!1,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=g.uA,this.selAmountUnit=g.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=g.Xz,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[le.kI.required]],password:["",[le.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",le.kI.required],transactionFeeRate:[null],flgMinConf:[!1],transactionBlocks:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{e?(this.sendFundFormGroup.controls.transactionBlocks.enable(),this.sendFundFormGroup.controls.transactionBlocks.setValidators([le.kI.required]),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionFeeRate.disable(),this.sendFundFormGroup.controls.transactionFeeRate.setValue(null)):(this.sendFundFormGroup.controls.transactionBlocks.disable(),this.sendFundFormGroup.controls.transactionBlocks.setValidators(null),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionBlocks.setErrors(null),this.sendFundFormGroup.controls.transactionFeeRate.enable(),this.sendFundFormGroup.controls.transactionFeeRate.setValue(null))}),(0,On.a)(this.store.select("root"),this.store.select("cl")).pipe((0,h.R)(this.unSubs[0])).subscribe(([e,t])=>{this.fiatConversion=e.selNode.settings.fiatConversion,this.amountUnits=e.selNode.settings.currencyUnits,this.appConfig=e.appConfig,this.nodeData=e.nodeData,this.information=t.information,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0"),this.utxos=this.commonService.sortAscByKey(t.utxos.filter(e=>"confirmed"===e.status),"value"),this.logger.info(e),this.logger.info(t)}),this.actions$.pipe((0,h.R)(this.unSubs[1]),(0,m.h)(e=>e.type===x.at||e.type===x.ob)).subscribe(e=>{e.type===x.ob&&(this.store.dispatch(new se.Lw("Fund Sent Successfully!")),this.dialogRef.close()),e.type===x.at&&"SetChannelTransaction"===e.payload.action&&(this.sendFundError=e.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch(new se.ZF(Rn(this.passwordFormGroup.controls.password.value))),this.rtlEffects.isAuthorizedRes.pipe((0,Ke.q)(1)).subscribe(e=>{"ERROR"!==e?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(e=>this.transaction.utxos.push(e.txid+":"+e.output))),this.store.dispatch(new se.Fk("Sending Funds...")),this.sweepAll?(this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.transactionBlocks.value):(delete this.transaction.minconf,this.sendFundFormGroup.controls.transactionFeeRate.value?this.transaction.feeRate=this.sendFundFormGroup.controls.transactionFeeRate.value:delete this.transaction.feeRate),delete this.transaction.utxos,this.store.dispatch(new x.uj(this.transaction))):this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==g.NT.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?g.NT.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.transaction.satoshis=e[g.NT.SATS],this.selAmountUnit=g.NT.SATS,this.store.dispatch(new x.uj(this.transaction))}):this.store.dispatch(new x.uj(this.transaction))}get invalidValues(){return this.sweepAll?!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.transactionBlocks.value||this.sendFundFormGroup.controls.transactionBlocks.value<=0):!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=g.uA[0]}stepSelectionChanged(e){switch(this.sendFundError="",e.selectedIndex){case 0:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.transactionBlocks.value:this.sendFundFormGroup.controls.transactionFeeRate.value?" | Fee Rate: "+this.feeRateTypes.find(e=>e.feeRateId===this.sendFundFormGroup.controls.transactionFeeRate.value).feeRateType:"");break;default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds"}e.selectedIndex<e.previouslySelectedIndex&&0===e.selectedIndex&&this.passwordFormGroup.controls.hiddenPassword.setValue("")}onUTXOSelectionChange(e){let t={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((e,n)=>(t.value=e.value+n.value,t)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=g.uA[0]):this.transaction.satoshis=null}onAmountUnitChange(e){let t=this,n=e.value===this.amountUnits[2]?g.NT.OTHER:e.value;this.transaction.satoshis&&this.selAmountUnit!==e.value&&this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?g.NT.OTHER:this.selAmountUnit,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{t.transaction.satoshis=t.decimalPipe.transform(e[n],t.currencyUnitFormats[n]).replace(/,/g,"")}),this.selAmountUnit=e.value}onAdvancedPanelToggle(e){this.advancedTitle=e&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(oe.so),s.Y36(oe.WI),s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(w.v),s.Y36(i.JJ),s.Y36(A.eX),s.Y36(le.qu),s.Y36(Ae.V),s.Y36(Mn.ux))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-on-chain-send-modal"]],viewQuery:function(e,t){if(1&e&&(s.Gf(Pn,7),s.Gf(En,5),s.Gf(Bn,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.form=e.first),s.iGM(e=s.CRH())&&(t.formSweepAll=e.first),s.iGM(e=s.CRH())&&(t.stepper=e.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxFlex","48","fxLayoutAlign","start end"],["tabindex","6","placeholder","Fee Rate",3,"value","disabled","valueChange"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","7","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",1,"mr-2",3,"ngModel","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["mat-flat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","tabindex","9","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex.gt-sm","48","fxLayoutAlign","start end"],["tabindex","5","placeholder","Fee Rate","formControlName","transactionFeeRate"],["fxFlex.gt-sm","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","6","color","primary","formControlName","flgMinConf","name","flgMinCon",1,"mr-2"],["matInput","","formControlName","transactionBlocks","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","7","required","",3,"step","min"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-stroked-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","default",3,"click"]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.YNc(9,ti,34,25,"form",7),s.qZA(),s.qZA(),s.qZA(),s.YNc(10,mi,39,17,"ng-template",null,8,s.W1O)),2&e){const e=s.MAs(11);s.xp6(5),s.Oqu(t.sweepAll?"Sweep All Funds":"Send Funds"),s.xp6(1),s.Q6J("mat-dialog-close",!1),s.xp6(3),s.Q6J("ngIf",!t.sweepAll)("ngIfElse",e)}},directives:[l.xw,l.yH,b.dk,l.Wh,C.lW,oe.ZT,b.dn,i.O5,le._Y,le.JL,le.F,D.KE,re.Nt,le.Fj,ce.h,le.Q7,le.JJ,le.On,ue.q,D.R9,de.gD,i.sg,Yn.oG,le.wV,le.qQ,D.TO,D.bx,me.ey,Qn.ib,Qn.yz,Qn.yK,de.$L,he.Rr,O.gM,T.BN,In.Vq,In.C0,le.sg,In.VY,le.u,In.Ic],pipes:[i.JJ],styles:[""]}),e})();var fi=n(882);function gi(e,t){1&e&&s._UZ(0,"mat-progress-bar",27)}function xi(e,t){1&e&&(s.TgZ(0,"th",28),s._uU(1," Transaction ID "),s.qZA())}function Zi(e,t){1&e&&(s.TgZ(0,"span",36),s.TgZ(1,"mat-icon",37),s._uU(2,"warning"),s.qZA(),s.qZA())}function yi(e,t){if(1&e&&(s.TgZ(0,"span"),s.YNc(1,Zi,3,0,"span",35),s.qZA()),2&e){const e=s.oxw().$implicit;s.oxw();const t=s.MAs(32);s.xp6(1),s.Q6J("ngIf",e.value<1e3)("ngIfElse",t)}}function Ai(e,t){1&e&&s._UZ(0,"span",38)}function wi(e,t){if(1&e&&(s._UZ(0,"span",39),s.ALo(1,"titlecase")),2&e){const e=s.oxw().$implicit;s.s9C("matTooltip",s.lcZ(1,1,e.status))}}const Ti=function(e){return{"max-width":e}};function vi(e,t){if(1&e&&(s.TgZ(0,"td",29),s.TgZ(1,"span",30),s.YNc(2,yi,2,2,"span",31),s.YNc(3,Ai,1,0,"span",32),s.YNc(4,wi,2,3,"span",33),s.TgZ(5,"span",34),s._uU(6),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(5,Ti,n.screenSize===n.screenSizeEnum.XS?"10rem":"50rem")),s.xp6(1),s.Q6J("ngIf",n.numDustUTXOs>0&&!n.isDustUTXO),s.xp6(1),s.Q6J("ngIf","confirmed"===e.status),s.xp6(1),s.Q6J("ngIf","confirmed"!==e.status),s.xp6(2),s.Oqu(e.txid)}}function bi(e,t){1&e&&(s.TgZ(0,"th",40),s._uU(1," Output "),s.qZA())}function qi(e,t){if(1&e&&(s.TgZ(0,"td",29),s.TgZ(1,"span",41),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.output)," ")}}function Ci(e,t){1&e&&(s.TgZ(0,"th",40),s._uU(1," Value (Sats) "),s.qZA())}function _i(e,t){if(1&e&&(s.TgZ(0,"span",41),s._uU(1),s.ALo(2,"number"),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.Oqu(s.lcZ(2,1,e.value))}}function Si(e,t){if(1&e&&(s.TgZ(0,"span",44),s._uU(1),s.ALo(2,"number"),s.qZA()),2&e){const e=s.oxw().$implicit;s.xp6(1),s.hij("(",s.lcZ(2,1,-1*e.value),")")}}function Li(e,t){if(1&e&&(s.TgZ(0,"td",29),s.YNc(1,_i,3,3,"span",42),s.YNc(2,Si,3,3,"span",43),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Q6J("ngIf",e.value>0||0===e.value),s.xp6(1),s.Q6J("ngIf",e.value<0)}}function Ui(e,t){1&e&&(s.TgZ(0,"th",40),s._uU(1," Blockheight "),s.qZA())}function Fi(e,t){if(1&e&&(s.TgZ(0,"td",29),s.TgZ(1,"span",41),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.blockheight)," ")}}function ki(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",45),s.TgZ(1,"div",46),s.TgZ(2,"mat-select",47),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",48),s.NdJ("click",function(){return s.CHM(e),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Ni(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",49),s.TgZ(1,"button",50),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw().onUTXOClick(n,t)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function Ji(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No utxos available."),s.qZA())}function Di(e,t){if(1&e&&(s.TgZ(0,"td",51),s.YNc(1,Ji,2,0,"p",31),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf",!(null!=e.listUTXOs&&e.listUTXOs.data)||(null==e.listUTXOs||null==e.listUTXOs.data?null:e.listUTXOs.data.length)<1)}}const Oi=function(e){return{"display-none":e}};function Ri(e,t){if(1&e&&s._UZ(0,"tr",52),2&e){const e=s.oxw();s.Q6J("ngClass",s.VKq(1,Oi,(null==e.listUTXOs?null:e.listUTXOs.data)&&(null==e.listUTXOs||null==e.listUTXOs.data?null:e.listUTXOs.data.length)>0))}}function Mi(e,t){1&e&&s._UZ(0,"tr",53)}function Yi(e,t){1&e&&s._UZ(0,"tr",54)}function Qi(e,t){1&e&&s._UZ(0,"mat-icon",37)}const Ii=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}},Pi=function(){return["no_utxo"]};let Ei=(()=>{class e{constructor(e,t,n,i){this.logger=e,this.commonService=t,this.store=n,this.actions$=i,this.numDustUTXOs=0,this.isDustUTXO=!1,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["txid","value","actions"]):this.screenSize===g.cu.SM||this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["txid","output","value","blockheight","actions"]):(this.flgSticky=!0,this.displayedColumns=["txid","output","value","blockheight","actions"])}ngAfterViewInit(){this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos)}ngOnChanges(){this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos)}applyFilter(e){this.listUTXOs.filter=e.value.trim().toLowerCase()}onUTXOClick(e,t){const n=[[{key:"txid",value:e.txid,title:"Transaction ID",width:100}],[{key:"output",value:e.output,title:"Output",width:50,type:g.Gi.NUMBER},{key:"value",value:e.value,title:"Value (Sats)",width:50,type:g.Gi.NUMBER}],[{key:"status",value:this.commonService.titleCase(e.status),title:"Status",width:50,type:g.Gi.STRING},{key:"blockheight",value:e.blockheight,title:"Blockheight",width:50,type:g.Gi.NUMBER}],[{key:"address",value:e.address,title:"Address",width:100}]];this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"UTXO Information",message:n}}))}loadUTXOsTable(e){this.listUTXOs=new ae.by([...e]),this.listUTXOs.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(e,t)=>JSON.stringify(e).toLowerCase().includes(t),this.listUTXOs.paginator=this.paginator,this.logger.info(this.listUTXOs)}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(A.eX))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-on-chain-utxos"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},inputs:{numDustUTXOs:"numDustUTXOs",isDustUTXO:"isDustUTXO",utxos:"utxos",errorLoading:"errorLoading"},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("UTXOs")}]),s.TTD],decls:33,vars:13,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","txid"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_utxo"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[4,"ngIf"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"mr-1"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"div",2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"input",4),s.NdJ("keyup",function(e){return t.applyFilter(e.target)}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.TgZ(6,"div",6),s.YNc(7,gi,1,0,"mat-progress-bar",7),s.TgZ(8,"table",8,9),s.ynx(10,10),s.YNc(11,xi,2,0,"th",11),s.YNc(12,vi,7,7,"td",12),s.BQk(),s.ynx(13,13),s.YNc(14,bi,2,0,"th",14),s.YNc(15,qi,4,3,"td",12),s.BQk(),s.ynx(16,15),s.YNc(17,Ci,2,0,"th",14),s.YNc(18,Li,3,2,"td",12),s.BQk(),s.ynx(19,16),s.YNc(20,Ui,2,0,"th",14),s.YNc(21,Fi,4,3,"td",12),s.BQk(),s.ynx(22,17),s.YNc(23,ki,6,0,"th",18),s.YNc(24,Ni,3,0,"td",19),s.BQk(),s.ynx(25,20),s.YNc(26,Di,2,1,"td",21),s.BQk(),s.YNc(27,Ri,1,3,"tr",22),s.YNc(28,Mi,1,0,"tr",23),s.YNc(29,Yi,1,0,"tr",24),s.qZA(),s._UZ(30,"mat-paginator",25),s.qZA(),s.qZA(),s.qZA(),s.YNc(31,Qi,1,0,"ng-template",null,26,s.W1O)),2&e&&(s.xp6(7),s.Q6J("ngIf",!0===t.errorLoading),s.xp6(1),s.Q6J("dataSource",t.listUTXOs)("ngClass",s.VKq(10,Ii,"error"===t.errorLoading)),s.xp6(19),s.Q6J("matFooterRowDef",s.DdM(12,Pi)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,D.KE,re.Nt,M.$V,i.O5,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ne.NW,r.pW,ae.ge,ie.nU,ae.ev,i.PC,S.Zl,O.gM,_.Hw,de.gD,de.$L,me.ey,C.lW,ae.yh,ae.Q2,ae.XQ,ae.Gk],pipes:[i.rS,i.JJ],styles:[".mat-column-txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),e})();var Bi=n(1050);function Hi(e,t){if(1&e&&(s.TgZ(0,"span",5),s._uU(1,"UTXOs"),s.qZA()),2&e){const e=s.oxw();s.s9C("matBadge",e.numUtxos)}}function Vi(e,t){if(1&e&&(s.TgZ(0,"span",5),s._uU(1,"Dust UTXOs"),s.qZA()),2&e){const e=s.oxw();s.s9C("matBadge",e.numDustUtxos)}}let zi=(()=>{class e{constructor(e,t){this.logger=e,this.store=t,this.selectedTableIndex=0,this.selectedTableIndexChange=new s.vpe,this.utxos=[],this.numUtxos=0,this.dustUtxos=[],this.numDustUtxos=0,this.flgLoading=[!0,!0],this.unSubs=[new d.x]}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchUTXOs"===e.action&&(this.flgLoading[1]="error")}),e.utxos&&e.utxos.length>0&&(this.utxos=e.utxos,this.numUtxos=this.utxos.length,this.dustUtxos=e.utxos.filter(e=>+e.value<1e3),this.numDustUtxos=this.dustUtxos.length),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!e.utxos),e.utxos&&e.utxos.length>0&&(this.utxos=e.utxos,this.numUtxos=this.utxos.length),"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!e.utxos),this.logger.info(e)})}onSelectedIndexChanged(e){this.selectedTableIndexChange.emit(e)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:8,vars:9,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["xLayout","row","fxFlex","100",3,"utxos","errorLoading","numDustUTXOs","isDustUTXO"],["fxLayout","row","fxFlex","100",3,"utxos","errorLoading","numDustUTXOs","isDustUTXO"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"mat-tab-group",1),s.NdJ("selectedIndexChange",function(e){return t.onSelectedIndexChanged(e)}),s.TgZ(2,"mat-tab"),s.YNc(3,Hi,2,1,"ng-template",2),s._UZ(4,"rtl-cl-on-chain-utxos",3),s.qZA(),s.TgZ(5,"mat-tab"),s.YNc(6,Vi,2,1,"ng-template",2),s._UZ(7,"rtl-cl-on-chain-utxos",4),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("selectedIndex",t.selectedTableIndex),s.xp6(3),s.Q6J("utxos",t.utxos)("errorLoading",t.flgLoading[0])("numDustUTXOs",t.numDustUtxos)("isDustUTXO",!1),s.xp6(3),s.Q6J("utxos",t.dustUtxos)("errorLoading",t.flgLoading[0])("numDustUTXOs",t.numDustUtxos)("isDustUTXO",!0))},directives:[l.xw,l.yH,l.Wh,te.SP,te.uX,te.uD,Ei,Bi.k],styles:[""]}),e})();const Gi=function(e,t){return[e,t]};function Xi(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",12),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().activeLink=t.link}),s._uU(1),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.Q6J("active",n.activeLink===e.link)("routerLink",s.WLB(3,Gi,e.link,n.selectedTable.name)),s.xp6(1),s.Oqu(e.name)}}let $i=(()=>{class e{constructor(e,t,n){this.store=e,this.router=t,this.activatedRoute=n,this.selNode={},this.faExchangeAlt=f.Ssp,this.faChartPie=f.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){let e=this.links.find(e=>this.router.url.includes(e.link));this.activeLink=e?e.link:this.links[0].link,this.selectedTable=this.tables.find(e=>e.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{let t=this.links.find(t=>e.urlAfterRedirects.includes(t.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(t=>t.name===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("cl").pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.selNode=e.nodeSettings,this.balances=[{title:"Total Balance",dataValue:e.balance.totalBalance||0},{title:"Confirmed",dataValue:e.balance.confBalance},{title:"Unconfirmed",dataValue:e.balance.unconfBalance}]})}openSendFundsModal(e){this.store.dispatch(new se.wu({data:{sweepAll:e,component:pi}}))}onSelectedTableIndexChanged(e){this.selectedTable=this.tables.find(t=>t.id===e),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh),s.Y36(a.F0),s.Y36(a.gz))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-on-chain"]],decls:21,vars:5,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"On-chain Balance"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s._UZ(7,"rtl-currency-unit-converter",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s._UZ(9,"fa-icon",1),s.TgZ(10,"span",2),s._uU(11,"On-chain Transactions"),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s.TgZ(13,"mat-card"),s.TgZ(14,"mat-card-content",4),s.TgZ(15,"nav",7),s.YNc(16,Xi,2,6,"div",8),s.qZA(),s.TgZ(17,"div",9),s._UZ(18,"router-outlet"),s.qZA(),s.TgZ(19,"div",10),s.TgZ(20,"rtl-cl-utxo-tables",11),s.NdJ("selectedTableIndexChange",function(e){return t.onSelectedTableIndexChanged(e)}),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("icon",t.faChartPie),s.xp6(6),s.Q6J("values",t.balances),s.xp6(2),s.Q6J("icon",t.faExchangeAlt),s.xp6(7),s.Q6J("ngForOf",t.links),s.xp6(4),s.Q6J("selectedTableIndex",t.selectedTable.id))},directives:[l.xw,l.Wh,T.BN,b.a8,b.dn,fi.D,te.BU,i.sg,l.yH,a.lC,zi,te.Nj,a.rH],styles:[""]}),e})();function Ki(e,t){if(1&e&&(s.TgZ(0,"span",10),s._uU(1,"Channels"),s.qZA()),2&e){const e=s.oxw();s.s9C("matBadge",e.activeChannels)}}function Wi(e,t){if(1&e&&(s.TgZ(0,"span",10),s._uU(1,"Peers"),s.qZA()),2&e){const e=s.oxw();s.s9C("matBadge",e.activePeers)}}let ji=(()=>{class e{constructor(e,t,n,i){this.store=e,this.logger=t,this.commonService=n,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=f.FVb,this.faChartPie=f.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{this.activeLink=this.links.findIndex(t=>t.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("cl").pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activePeers=e.peers&&e.peers.length?e.peers.length:0,this.activeChannels=e.information.num_active_channels,this.balances=[{title:"Total Balance",dataValue:e.balance.totalBalance||0},{title:"Confirmed",dataValue:e.balance.confBalance},{title:"Unconfirmed",dataValue:e.balance.unconfBalance}],this.logger.info(e)})}onSelectedTabChange(e){this.router.navigateByUrl("/cl/connections/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh),s.Y36(Z.mQ),s.Y36(w.v),s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"On-chain Balance"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s._UZ(7,"rtl-currency-unit-converter",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",0),s._UZ(9,"fa-icon",1),s.TgZ(10,"span",2),s._uU(11,"Connections"),s.qZA(),s.qZA(),s.TgZ(12,"div",6),s.TgZ(13,"mat-card"),s.TgZ(14,"mat-card-content",4),s.TgZ(15,"mat-tab-group",7),s.NdJ("selectedIndexChange",function(e){return t.activeLink=e})("selectedTabChange",function(e){return t.onSelectedTabChange(e)}),s.TgZ(16,"mat-tab"),s.YNc(17,Ki,2,1,"ng-template",8),s.qZA(),s.TgZ(18,"mat-tab"),s.YNc(19,Wi,2,1,"ng-template",8),s.qZA(),s.qZA(),s.TgZ(20,"div",9),s._UZ(21,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("icon",t.faChartPie),s.xp6(6),s.Q6J("values",t.balances),s.xp6(2),s.Q6J("icon",t.faUsers),s.xp6(6),s.Q6J("selectedIndex",t.activeLink))},directives:[l.xw,l.Wh,T.BN,b.a8,b.dn,fi.D,te.SP,te.uX,te.uD,l.yH,a.lC,Bi.k],styles:[""]}),e})();function ea(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",11),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().activeLink=t.link}),s._uU(1),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.s9C("routerLink",e.link),s.Q6J("active",n.activeLink===e.link),s.xp6(1),s.Oqu(e.name)}}let ta=(()=>{class e{constructor(e,t,n){this.logger=e,this.store=t,this.router=n,this.faExchangeAlt=f.Ssp,this.faChartPie=f.OS1,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){let e=this.links.find(e=>this.router.url.includes(e.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{let t=this.links.find(t=>e.urlAfterRedirects.includes(t.link));this.activeLink=t?t.link:this.links[0].link}),this.store.select("cl").pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.currencyUnits=e.nodeSettings.currencyUnits,this.balances=e.nodeSettings.userPersona===g.ol.OPERATOR?[{title:"Local Capacity",dataValue:e.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:e.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:e.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:e.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(e)})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"Lightning Balance"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s._UZ(7,"rtl-currency-unit-converter",5),s.qZA(),s.qZA(),s.qZA(),s.TgZ(8,"div",6),s._UZ(9,"fa-icon",1),s.TgZ(10,"span",2),s._uU(11,"Lightning Transactions"),s.qZA(),s.qZA(),s.TgZ(12,"div",7),s.TgZ(13,"mat-card"),s.TgZ(14,"mat-card-content",4),s.TgZ(15,"nav",8),s.YNc(16,ea,2,3,"div",9),s.qZA(),s.TgZ(17,"div",10),s._UZ(18,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("icon",t.faChartPie),s.xp6(6),s.Q6J("values",t.balances),s.xp6(2),s.Q6J("icon",t.faExchangeAlt),s.xp6(7),s.Q6J("ngForOf",t.links))},directives:[l.xw,l.Wh,T.BN,b.a8,b.dn,fi.D,te.BU,i.sg,l.yH,a.lC,te.Nj,a.rH],styles:[""]}),e})();function na(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",11),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().activeLink=t.link}),s._uU(1),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.s9C("routerLink",e.link),s.Q6J("active",n.activeLink===e.link),s.xp6(1),s.Oqu(e.name)}}let ia=(()=>{class e{constructor(e,t){this.store=e,this.router=t,this.faMapSigns=f.SuH,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"failedtransactions",name:"Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x]}ngOnInit(){let e=this.links.find(e=>this.router.url.includes(e.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{let t=this.links.find(t=>e.urlAfterRedirects.includes(t.link));this.activeLink=t?t.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh),s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-routing"]],decls:13,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"fa-icon",2),s.TgZ(3,"span",3),s._uU(4,"Routing"),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"mat-card",5),s.TgZ(7,"mat-card-content",6),s.TgZ(8,"div",7),s.TgZ(9,"nav",8),s.YNc(10,na,2,3,"div",9),s.qZA(),s.qZA(),s.TgZ(11,"div",10),s._UZ(12,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(2),s.Q6J("icon",t.faMapSigns),s.xp6(8),s.Q6J("ngForOf",t.links))},directives:[l.xw,l.Wh,T.BN,l.yH,b.a8,b.dn,te.BU,i.sg,a.lC,te.Nj,a.rH],styles:[""]}),e})();var aa=n(2609);function oa(e,t){1&e&&(s.TgZ(0,"th",26),s._uU(1,"Type"),s.qZA())}function sa(e,t){if(1&e&&(s.TgZ(0,"td",27),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.type," ")}}function la(e,t){1&e&&(s.TgZ(0,"th",26),s._uU(1,"Address"),s.qZA())}function ra(e,t){if(1&e&&(s.TgZ(0,"td",27),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.address," ")}}function ca(e,t){1&e&&(s.TgZ(0,"th",26),s._uU(1,"Port"),s.qZA())}function ua(e,t){if(1&e&&(s.TgZ(0,"td",27),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.port," ")}}function da(e,t){1&e&&(s.TgZ(0,"th",28),s.TgZ(1,"span",29),s._uU(2,"Actions"),s.qZA(),s.qZA())}function ha(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",30),s.TgZ(1,"span",29),s.TgZ(2,"button",31),s.NdJ("copied",function(t){return s.CHM(e),s.oxw(2).onCopyNodeURI(t)}),s._uU(3,"Copy Node URI"),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw(2);s.xp6(2),s.Q6J("payload",n.lookupResult.nodeid+"@"+e.address+":"+e.port)}}function ma(e,t){1&e&&s._UZ(0,"tr",32)}function pa(e,t){1&e&&s._UZ(0,"tr",33)}const fa=function(e){return{"background-color":e}};function ga(e,t){if(1&e&&(s.TgZ(0,"div",1),s._UZ(1,"mat-divider",2),s.TgZ(2,"div",3),s.TgZ(3,"h4",4),s._uU(4,"Pub Key"),s.qZA(),s.TgZ(5,"span",5),s._uU(6),s.qZA(),s.qZA(),s._UZ(7,"mat-divider",6),s.TgZ(8,"div",7),s.TgZ(9,"div",3),s.TgZ(10,"h4",4),s._uU(11,"Alias"),s.qZA(),s.TgZ(12,"span",8),s._uU(13),s.TgZ(14,"span",9),s._uU(15),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s._UZ(16,"mat-divider",6),s.TgZ(17,"div",7),s.TgZ(18,"div",10),s.TgZ(19,"h4",4),s._uU(20,"Last Update"),s.qZA(),s.TgZ(21,"span",8),s._uU(22),s.ALo(23,"date"),s.qZA(),s.qZA(),s.TgZ(24,"div",10),s.TgZ(25,"h4",4),s._uU(26,"Features"),s.qZA(),s.TgZ(27,"span",8),s._uU(28),s.qZA(),s.qZA(),s.qZA(),s._UZ(29,"mat-divider",6),s.TgZ(30,"div",11),s.TgZ(31,"h4",12),s._uU(32,"Addresses"),s.qZA(),s.TgZ(33,"div",13),s.TgZ(34,"table",14,15),s.ynx(36,16),s.YNc(37,oa,2,0,"th",17),s.YNc(38,sa,2,1,"td",18),s.BQk(),s.ynx(39,19),s.YNc(40,la,2,0,"th",17),s.YNc(41,ra,2,1,"td",18),s.BQk(),s.ynx(42,20),s.YNc(43,ca,2,0,"th",17),s.YNc(44,ua,2,1,"td",18),s.BQk(),s.ynx(45,21),s.YNc(46,da,3,0,"th",22),s.YNc(47,ha,4,1,"td",23),s.BQk(),s.YNc(48,ma,1,0,"tr",24),s.YNc(49,pa,1,0,"tr",25),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult.nodeid),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(e.lookupResult.alias),s.xp6(1),s.Q6J("ngStyle",s.VKq(16,fa,"#"+e.lookupResult.color)),s.xp6(1),s.Oqu(e.lookupResult.color?"#"+e.lookupResult.color:""),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(s.xi3(23,13,1e3*e.lookupResult.last_timestamp,"dd/MMM/YYYY HH:mm")),s.xp6(6),s.Oqu(e.lookupResult.features),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Q6J("dataSource",e.addresses),s.xp6(14),s.Q6J("matHeaderRowDef",e.displayedColumns),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns)}}let xa=(()=>{class e{constructor(e,t){this.logger=e,this.snackBar=t,this.displayedColumns=["type","address","port","actions"]}ngOnInit(){this.addresses=new ae.by(this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses?this.lookupResult.addresses:[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null}onCopyNodeURI(e){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+e)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(Mn.ux))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-node-lookup"]],viewQuery:function(e,t){if(1&e&&s.Gf(ie.YE,5),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","column","fxFlex","100","fxLayoutAlign","end start",1,"my-1"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text","w-100"],[1,"my-1",3,"inset"],["fxLayout","row"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxLayout","column","fxFlex","50","fxLayoutAlign","end start",1,"my-1"],["fxLayout","column",1,"mt-2"],["fxFlex","100","fxLayoutAlign","start",1,"font-bold-500","mb-1"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","port"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&s.YNc(0,ga,50,18,"div",0),2&e&&s.Q6J("ngIf",t.lookupResult)},directives:[i.O5,l.xw,R.d,l.yH,l.Wh,i.PC,S.Zl,M.$V,ae.BZ,ie.YE,ae.w1,ae.fO,ae.Dz,ae.as,ae.nj,ae.ge,ie.nU,ae.ev,C.lW,aa.y,ae.XQ,ae.Gk],pipes:[i.uU],styles:[""]}),e})();function Za(e,t){1&e&&(s.TgZ(0,"h3",11),s._uU(1,"Node 1"),s.qZA())}function ya(e,t){1&e&&(s.TgZ(0,"h3",11),s._uU(1,"Node 1 (Your Node)"),s.qZA())}function Aa(e,t){1&e&&(s.TgZ(0,"h3",11),s._uU(1,"Node 2"),s.qZA())}function wa(e,t){1&e&&(s.TgZ(0,"h3",11),s._uU(1,"Node 2 (Your Node)"),s.qZA())}function Ta(e,t){if(1&e&&(s.TgZ(0,"div",1),s._UZ(1,"mat-divider"),s.TgZ(2,"div",2),s.TgZ(3,"div",3),s.TgZ(4,"div",4),s.YNc(5,Za,2,0,"h3",5),s.YNc(6,ya,2,0,"h3",5),s.qZA(),s._UZ(7,"mat-divider",6),s.TgZ(8,"div",7),s.TgZ(9,"h4",8),s._uU(10,"Short Channel Id"),s.qZA(),s.TgZ(11,"span",9),s._uU(12),s.qZA(),s.qZA(),s._UZ(13,"mat-divider",6),s.TgZ(14,"div",10),s.TgZ(15,"h4",8),s._uU(16,"Active"),s.qZA(),s.TgZ(17,"span",9),s._uU(18),s.qZA(),s.qZA(),s._UZ(19,"mat-divider",6),s.TgZ(20,"div",10),s.TgZ(21,"h4",8),s._uU(22,"Last Update"),s.qZA(),s.TgZ(23,"span",9),s._uU(24),s.qZA(),s.qZA(),s._UZ(25,"mat-divider",6),s.TgZ(26,"div",10),s.TgZ(27,"h4",8),s._uU(28,"Amount (mSats)"),s.qZA(),s.TgZ(29,"span",9),s._uU(30),s.qZA(),s.qZA(),s._UZ(31,"mat-divider",6),s.TgZ(32,"div",10),s.TgZ(33,"h4",8),s._uU(34,"Base Fee (mSats)"),s.qZA(),s.TgZ(35,"span",9),s._uU(36),s.ALo(37,"number"),s.qZA(),s.qZA(),s._UZ(38,"mat-divider",6),s.TgZ(39,"div",10),s.TgZ(40,"h4",8),s._uU(41,"Channel Flags"),s.qZA(),s.TgZ(42,"span",9),s._uU(43),s.ALo(44,"number"),s.qZA(),s.qZA(),s._UZ(45,"mat-divider",6),s.TgZ(46,"div",10),s.TgZ(47,"h4",8),s._uU(48,"Delay"),s.qZA(),s.TgZ(49,"span",9),s._uU(50),s.ALo(51,"number"),s.qZA(),s.qZA(),s._UZ(52,"mat-divider",6),s.TgZ(53,"div",10),s.TgZ(54,"h4",8),s._uU(55,"Destination"),s.qZA(),s.TgZ(56,"span",9),s._uU(57),s.qZA(),s.qZA(),s._UZ(58,"mat-divider",6),s.TgZ(59,"div",10),s.TgZ(60,"h4",8),s._uU(61,"Fee/Millionth"),s.qZA(),s.TgZ(62,"span",9),s._uU(63),s.ALo(64,"number"),s.qZA(),s.qZA(),s._UZ(65,"mat-divider",6),s.TgZ(66,"div",10),s.TgZ(67,"h4",8),s._uU(68,"Max Htlc (mSat)"),s.qZA(),s.TgZ(69,"span",9),s._uU(70),s.qZA(),s.qZA(),s._UZ(71,"mat-divider",6),s.TgZ(72,"div",10),s.TgZ(73,"h4",8),s._uU(74,"Min Htlc (mSat)"),s.qZA(),s.TgZ(75,"span",9),s._uU(76),s.qZA(),s.qZA(),s._UZ(77,"mat-divider",6),s.TgZ(78,"div",10),s.TgZ(79,"h4",8),s._uU(80,"Message Flags"),s.qZA(),s.TgZ(81,"span",9),s._uU(82),s.ALo(83,"number"),s.qZA(),s.qZA(),s._UZ(84,"mat-divider",6),s.TgZ(85,"div",10),s.TgZ(86,"h4",8),s._uU(87,"Public"),s.qZA(),s.TgZ(88,"span",9),s._uU(89),s.qZA(),s.qZA(),s._UZ(90,"mat-divider",6),s.TgZ(91,"div",10),s.TgZ(92,"h4",8),s._uU(93,"Satoshis"),s.qZA(),s.TgZ(94,"span",9),s._uU(95),s.ALo(96,"number"),s.qZA(),s.qZA(),s._UZ(97,"mat-divider",6),s.TgZ(98,"div",10),s.TgZ(99,"h4",8),s._uU(100,"Source"),s.qZA(),s.TgZ(101,"span",9),s._uU(102),s.qZA(),s.qZA(),s.qZA(),s.TgZ(103,"div",3),s.TgZ(104,"div"),s.YNc(105,Aa,2,0,"h3",5),s.YNc(106,wa,2,0,"h3",5),s.qZA(),s._UZ(107,"mat-divider",6),s.TgZ(108,"div",7),s.TgZ(109,"h4",8),s._uU(110,"Short Channel Id"),s.qZA(),s.TgZ(111,"span",9),s._uU(112),s.qZA(),s.qZA(),s._UZ(113,"mat-divider",6),s.TgZ(114,"div",10),s.TgZ(115,"h4",8),s._uU(116,"Active"),s.qZA(),s.TgZ(117,"span",9),s._uU(118),s.qZA(),s.qZA(),s._UZ(119,"mat-divider",6),s.TgZ(120,"div",10),s.TgZ(121,"h4",8),s._uU(122,"Last Update"),s.qZA(),s.TgZ(123,"span",9),s._uU(124),s.ALo(125,"date"),s.qZA(),s.qZA(),s._UZ(126,"mat-divider",6),s.TgZ(127,"div",10),s.TgZ(128,"h4",8),s._uU(129,"Amount (mSats)"),s.qZA(),s.TgZ(130,"span",9),s._uU(131),s.qZA(),s.qZA(),s._UZ(132,"mat-divider",6),s.TgZ(133,"div",10),s.TgZ(134,"h4",8),s._uU(135,"Base Fee (mSats)"),s.qZA(),s.TgZ(136,"span",9),s._uU(137),s.ALo(138,"number"),s.qZA(),s.qZA(),s._UZ(139,"mat-divider",6),s.TgZ(140,"div",10),s.TgZ(141,"h4",8),s._uU(142,"Channel Flags"),s.qZA(),s.TgZ(143,"span",9),s._uU(144),s.ALo(145,"number"),s.qZA(),s.qZA(),s._UZ(146,"mat-divider",6),s.TgZ(147,"div",10),s.TgZ(148,"h4",8),s._uU(149,"Delay"),s.qZA(),s.TgZ(150,"span",9),s._uU(151),s.ALo(152,"number"),s.qZA(),s.qZA(),s._UZ(153,"mat-divider",6),s.TgZ(154,"div",10),s.TgZ(155,"h4",8),s._uU(156,"Destination"),s.qZA(),s.TgZ(157,"span",9),s._uU(158),s.qZA(),s.qZA(),s._UZ(159,"mat-divider",6),s.TgZ(160,"div",10),s.TgZ(161,"h4",8),s._uU(162,"Fee/Millionth"),s.qZA(),s.TgZ(163,"span",9),s._uU(164),s.ALo(165,"number"),s.qZA(),s.qZA(),s._UZ(166,"mat-divider",6),s.TgZ(167,"div",10),s.TgZ(168,"h4",8),s._uU(169,"Max Htlc (mSat)"),s.qZA(),s.TgZ(170,"span",9),s._uU(171),s.qZA(),s.qZA(),s._UZ(172,"mat-divider",6),s.TgZ(173,"div",10),s.TgZ(174,"h4",8),s._uU(175,"Min Htlc (mSat)"),s.qZA(),s.TgZ(176,"span",9),s._uU(177),s.qZA(),s.qZA(),s._UZ(178,"mat-divider",6),s.TgZ(179,"div",10),s.TgZ(180,"h4",8),s._uU(181,"Message Flags"),s.qZA(),s.TgZ(182,"span",9),s._uU(183),s.ALo(184,"number"),s.qZA(),s.qZA(),s._UZ(185,"mat-divider",6),s.TgZ(186,"div",10),s.TgZ(187,"h4",8),s._uU(188,"Public"),s.qZA(),s.TgZ(189,"span",9),s._uU(190),s.qZA(),s.qZA(),s._UZ(191,"mat-divider",6),s.TgZ(192,"div",10),s.TgZ(193,"h4",8),s._uU(194,"Satoshis"),s.qZA(),s.TgZ(195,"span",9),s._uU(196),s.ALo(197,"number"),s.qZA(),s.qZA(),s._UZ(198,"mat-divider",6),s.TgZ(199,"div",10),s.TgZ(200,"h4",8),s._uU(201,"Source"),s.qZA(),s.TgZ(202,"span",9),s._uU(203),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(5),s.Q6J("ngIf",!e.node1_match),s.xp6(1),s.Q6J("ngIf",e.node1_match),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].short_channel_id),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].active?"True":"False"),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].last_update),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].amount_msat),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(37,64,e.lookupResult[0].base_fee_millisatoshi)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(44,66,e.lookupResult[0].channel_flags)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(51,68,e.lookupResult[0].delay)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].destination),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(64,70,e.lookupResult[0].fee_per_millionth)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].htlc_maximum_msat),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].htlc_minimum_msat),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(83,72,e.lookupResult[0].message_flags)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].public?"Yes":"No"),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(96,74,e.lookupResult[0].satoshis)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[0].source),s.xp6(3),s.Q6J("ngIf",!e.node2_match),s.xp6(1),s.Q6J("ngIf",e.node2_match),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].short_channel_id),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].active?"True":"False"),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.xi3(125,76,1e3*e.lookupResult[1].last_update,"dd/MMM/YYYY HH:mm")),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].amount_msat),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(138,79,e.lookupResult[1].base_fee_millisatoshi)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(145,81,e.lookupResult[1].channel_flags)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(152,83,e.lookupResult[1].delay)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].destination),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(165,85,e.lookupResult[1].fee_per_millionth)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].htlc_maximum_msat),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].htlc_minimum_msat),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(184,87,e.lookupResult[1].message_flags)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].public?"Yes":"No"),s.xp6(1),s.Q6J("inset",!0),s.xp6(5),s.Oqu(s.lcZ(197,89,e.lookupResult[1].satoshis)),s.xp6(2),s.Q6J("inset",!0),s.xp6(5),s.Oqu(e.lookupResult[1].source)}}let va=(()=>{class e{constructor(e){this.store=e,this.node1_match=!1,this.node2_match=!1,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.lookupResult.length>0&&this.lookupResult[0].source===e.information.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===e.information.id&&(this.node2_match=!0)})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(e,t){1&e&&s.YNc(0,Ta,204,91,"div",0),2&e&&s.Q6J("ngIf",t.lookupResult)},directives:[i.O5,l.xw,R.d,l.Wh,l.yH],pipes:[i.JJ,i.uU],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),e})();const ba=["form"];function qa(e,t){if(1&e&&(s.TgZ(0,"mat-radio-button",21),s._uU(1),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.Q6J("value",e.id)("checked",n.selectedFieldId===e.id),s.xp6(1),s.hij(" ",e.name," ")}}function Ca(e,t){if(1&e&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.hij("",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder," is required.")}}function _a(e,t){if(1&e&&(s.TgZ(0,"div"),s._UZ(1,"rtl-cl-node-lookup",30),s.qZA()),2&e){const e=s.oxw(3);s.xp6(1),s.Q6J("lookupResult",e.nodeLookupValue)}}function Sa(e,t){if(1&e&&(s.TgZ(0,"span",28),s.YNc(1,_a,2,1,"div",29),s.qZA()),2&e){const e=s.oxw(2),t=s.MAs(24);s.xp6(1),s.Q6J("ngIf",""!==e.nodeLookupValue.nodeid)("ngIfElse",t)}}function La(e,t){if(1&e&&(s.TgZ(0,"div"),s._UZ(1,"rtl-cl-channel-lookup",30),s.qZA()),2&e){const e=s.oxw(3);s.xp6(1),s.Q6J("lookupResult",e.channelLookupValue)}}function Ua(e,t){if(1&e&&(s.TgZ(0,"span",28),s.YNc(1,La,2,1,"div",29),s.qZA()),2&e){const e=s.oxw(2),t=s.MAs(24);s.xp6(1),s.Q6J("ngIf",e.channelLookupValue.length>0)("ngIfElse",t)}}function Fa(e,t){1&e&&(s.TgZ(0,"span",28),s.TgZ(1,"h3"),s._uU(2,"Error! Unable to find details!"),s.qZA(),s.qZA())}function ka(e,t){if(1&e&&(s.TgZ(0,"div",22),s.TgZ(1,"div",23),s.TgZ(2,"span",24),s._uU(3),s.qZA(),s.qZA(),s.TgZ(4,"div",25),s.YNc(5,Sa,2,2,"span",26),s.YNc(6,Ua,2,2,"span",26),s.YNc(7,Fa,3,0,"span",27),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(3),s.hij("",e.lookupFields[e.selectedFieldId].name," Details"),s.xp6(1),s.Q6J("ngSwitch",e.selectedFieldId),s.xp6(1),s.Q6J("ngSwitchCase",0),s.xp6(1),s.Q6J("ngSwitchCase",1)}}function Na(e,t){1&e&&(s.TgZ(0,"h3"),s._uU(1,"Error! Unable to find details!"),s.qZA())}const Ja=function(e){return{"mt-2":e}};let Da=(()=>{class e{constructor(e,t,n,i){this.logger=e,this.commonService=t,this.store=n,this.actions$=i,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=f.wn1,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions$.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e.type===x.CR||e.type===x.at)).subscribe(e=>{if(e.type===x.CR){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue=e.payload[0]?JSON.parse(JSON.stringify(e.payload[0])):{nodeid:""};break;case 1:this.channelLookupValue=e.payload?JSON.parse(JSON.stringify(e.payload)):[]}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}e.type===x.at&&"Lookup"===e.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.store.dispatch(new se.Fk("Searching "+this.lookupFields[this.selectedFieldId].name+"...")),this.selectedFieldId){case 0:this.store.dispatch(new x.x$(this.lookupKey.trim()));break;case 1:this.store.dispatch(new x.IG({shortChannelID:this.lookupKey.trim(),showError:!1}))}}onSelectChange(e){this.resetData(),this.selectedFieldId=e.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(A.eX))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-lookups"]],viewQuery:function(e,t){if(1&e&&s.Gf(ba,7),2&e){let e;s.iGM(e=s.CRH())&&(t.form=e.first)}},decls:25,vars:10,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"card-content-gap","mt-1"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start space-between",1,"w-100"],["form","ngForm"],["fxFlex","35","fxFlex.gt-md","25","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","65","fxFlex.gt-md","75","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[4,"ngIf"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch","class","w-100 mt-2",4,"ngIf"],["errorBlock",""],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"fa-icon",2),s.TgZ(3,"span",3),s._uU(4,"Graph Lookups"),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"mat-card",5),s.TgZ(7,"mat-card-content",6),s.TgZ(8,"form",7,8),s.TgZ(10,"div",9),s.TgZ(11,"mat-radio-group",10),s.NdJ("ngModelChange",function(e){return t.selectedFieldId=e})("change",function(e){return t.onSelectChange(e)}),s.YNc(12,qa,2,3,"mat-radio-button",11),s.qZA(),s.qZA(),s.TgZ(13,"mat-form-field",12),s.TgZ(14,"input",13,14),s.NdJ("change",function(){return t.clearLookupValue()})("ngModelChange",function(e){return t.lookupKey=e}),s.qZA(),s.YNc(16,Ca,2,1,"mat-error",15),s.qZA(),s.TgZ(17,"div",16),s.TgZ(18,"button",17),s.NdJ("click",function(){return t.resetData()}),s._uU(19,"Clear"),s.qZA(),s.TgZ(20,"button",18),s.NdJ("click",function(){return t.onLookup()}),s._uU(21,"Lookup"),s.qZA(),s.qZA(),s.qZA(),s.YNc(22,ka,8,4,"div",19),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(23,Na,2,0,"ng-template",null,20,s.W1O)),2&e&&(s.xp6(2),s.Q6J("icon",t.faSearch),s.xp6(9),s.Q6J("ngModel",t.selectedFieldId),s.xp6(1),s.Q6J("ngForOf",t.lookupFields),s.xp6(1),s.Q6J("ngClass",s.VKq(8,Ja,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM)),s.xp6(1),s.Q6J("placeholder",(null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder)||"Lookup Key")("ngModel",t.lookupKey),s.xp6(2),s.Q6J("ngIf",!t.lookupKey),s.xp6(6),s.Q6J("ngIf",t.flgSetLookupValue))},directives:[l.xw,l.Wh,T.BN,l.yH,b.a8,b.dn,le._Y,le.JL,le.F,je.VQ,le.JJ,le.On,i.sg,D.KE,i.mk,S.oO,re.Nt,le.Fj,le.Q7,i.O5,C.lW,je.U0,D.TO,i.RF,i.n9,i.ED,xa,va],styles:[".tree-invisible[_ngcontent-%COMP%]{display:none}.lookup-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .lookup-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),e})();var Oa=function(e){return e.KB="KB",e.KW="KW",e}({});let Ra=(()=>{class e{constructor(){this.perkbw={}}ngAfterContentChecked(){this.feeRateStyle===Oa.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===Oa.KW&&(this.perkbw=this.feeRates.perkw)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",flgLoading:"flgLoading"},decls:51,vars:24,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"div"),s.TgZ(3,"h4",2),s._uU(4,"Urgent"),s.qZA(),s.TgZ(5,"div",3),s._uU(6),s.ALo(7,"number"),s.qZA(),s.qZA(),s.TgZ(8,"div"),s.TgZ(9,"h4",2),s._uU(10,"Normal"),s.qZA(),s.TgZ(11,"div",3),s._uU(12),s.ALo(13,"number"),s.qZA(),s.qZA(),s.TgZ(14,"div"),s.TgZ(15,"h4",2),s._uU(16,"Slow"),s.qZA(),s.TgZ(17,"div",3),s._uU(18),s.ALo(19,"number"),s.qZA(),s.qZA(),s.TgZ(20,"div"),s.TgZ(21,"h4",2),s._uU(22,"Opening Channel"),s.qZA(),s.TgZ(23,"div",3),s._uU(24),s.ALo(25,"number"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(26,"div",1),s.TgZ(27,"div"),s.TgZ(28,"h4",2),s._uU(29,"Min Acceptable"),s.qZA(),s.TgZ(30,"div",3),s._uU(31),s.ALo(32,"number"),s.qZA(),s.qZA(),s.TgZ(33,"div"),s.TgZ(34,"h4",2),s._uU(35,"Max Acceptable"),s.qZA(),s.TgZ(36,"div",3),s._uU(37),s.ALo(38,"number"),s.qZA(),s.qZA(),s.TgZ(39,"div"),s.TgZ(40,"h4",2),s._uU(41,"Mutual Close"),s.qZA(),s.TgZ(42,"div",3),s._uU(43),s.ALo(44,"number"),s.qZA(),s.qZA(),s.TgZ(45,"div"),s.TgZ(46,"h4",2),s._uU(47,"Unilateral Close"),s.qZA(),s.TgZ(48,"div",3),s._uU(49),s.ALo(50,"number"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(6),s.Oqu(s.lcZ(7,8,null==t.perkbw?null:t.perkbw.urgent)),s.xp6(6),s.Oqu(s.lcZ(13,10,null==t.perkbw?null:t.perkbw.normal)),s.xp6(6),s.Oqu(s.lcZ(19,12,null==t.perkbw?null:t.perkbw.slow)),s.xp6(6),s.Oqu(s.lcZ(25,14,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.opening_channel_satoshis)),s.xp6(7),s.Oqu(s.lcZ(32,16,null==t.perkbw?null:t.perkbw.min_acceptable)),s.xp6(6),s.Oqu(s.lcZ(38,18,null==t.perkbw?null:t.perkbw.max_acceptable)),s.xp6(6),s.Oqu(s.lcZ(44,20,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.mutual_close_satoshis)),s.xp6(6),s.Oqu(s.lcZ(50,22,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.unilateral_close_satoshis)))},directives:[l.xw,l.yH,l.Wh],pipes:[i.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),e})();const Ma=function(e){return{"error-border":e}};function Ya(e,t){if(1&e&&s._UZ(0,"rtl-cl-node-info",17),2&e){const e=s.oxw(3);s.Q6J("information",e.information)("showColorFieldSeparately",!1)("ngClass",s.VKq(3,Ma,"error"===e.flgLoading[0]))}}function Qa(e,t){if(1&e&&s._UZ(0,"rtl-cl-channel-status-info",18),2&e){const e=s.oxw(3);s.Q6J("channelsStatus",e.channelsStatus)("ngClass",s.VKq(2,Ma,"error"===e.flgLoading[0]))}}function Ia(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-info",19),2&e){const e=s.oxw(3);s.Q6J("fees",e.fees)("ngClass",s.VKq(2,Ma,"error"===e.flgLoading[1]))}}function Pa(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-rates",20),2&e){const e=s.oxw(3);s.Q6J("flgLoading",e.flgLoading[2])("feeRates",e.feeRatesPerKB)("feeRateStyle","KB")}}function Ea(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-rates",20),2&e){const e=s.oxw(3);s.Q6J("flgLoading",e.flgLoading[2])("feeRates",e.feeRatesPerKW)("feeRateStyle","KW")}}function Ba(e,t){if(1&e&&(s.TgZ(0,"mat-grid-tile",4),s.TgZ(1,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"div",7),s._UZ(4,"fa-icon",8),s.TgZ(5,"span"),s._uU(6),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",9),s.TgZ(8,"mat-card",10),s.TgZ(9,"mat-card-content",11),s.TgZ(10,"div",12),s.YNc(11,Ya,1,5,"rtl-cl-node-info",13),s.YNc(12,Qa,1,4,"rtl-cl-channel-status-info",14),s.YNc(13,Ia,1,4,"rtl-cl-fee-info",15),s.YNc(14,Pa,1,3,"rtl-cl-fee-rates",16),s.YNc(15,Ea,1,3,"rtl-cl-fee-rates",16),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.Q6J("colspan",e.cols)("rowspan",e.rows),s.xp6(4),s.Q6J("icon",e.icon),s.xp6(2),s.Oqu(e.title),s.xp6(4),s.Q6J("ngSwitch",e.id),s.xp6(1),s.Q6J("ngSwitchCase","node"),s.xp6(1),s.Q6J("ngSwitchCase","status"),s.xp6(1),s.Q6J("ngSwitchCase","fee"),s.xp6(1),s.Q6J("ngSwitchCase","feeRatesKB"),s.xp6(1),s.Q6J("ngSwitchCase","feeRatesKW")}}function Ha(e,t){if(1&e&&(s.TgZ(0,"mat-grid-list",2),s.YNc(1,Ba,16,10,"mat-grid-tile",3),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngForOf",e.nodeCardsOperator)}}function Va(e,t){if(1&e&&s._UZ(0,"rtl-cl-node-info",17),2&e){const e=s.oxw(3);s.Q6J("information",e.information)("showColorFieldSeparately",!1)("ngClass",s.VKq(3,Ma,"error"===e.flgLoading[0]))}}function za(e,t){if(1&e&&s._UZ(0,"rtl-cl-channel-status-info",18),2&e){const e=s.oxw(3);s.Q6J("channelsStatus",e.channelsStatus)("ngClass",s.VKq(2,Ma,"error"===e.flgLoading[0]))}}function Ga(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-info",19),2&e){const e=s.oxw(3);s.Q6J("fees",e.fees)("ngClass",s.VKq(2,Ma,"error"===e.flgLoading[1]))}}function Xa(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-rates",20),2&e){const e=s.oxw(3);s.Q6J("flgLoading",e.flgLoading[2])("feeRates",e.feeRatesPerKB)("feeRateStyle","KB")}}function $a(e,t){if(1&e&&s._UZ(0,"rtl-cl-fee-rates",20),2&e){const e=s.oxw(3);s.Q6J("flgLoading",e.flgLoading[2])("feeRates",e.feeRatesPerKW)("feeRateStyle","KW")}}function Ka(e,t){if(1&e&&(s.TgZ(0,"mat-grid-tile",4),s.TgZ(1,"div",5),s.TgZ(2,"div",6),s.TgZ(3,"div",21),s._UZ(4,"fa-icon",8),s.TgZ(5,"span"),s._uU(6),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",9),s.TgZ(8,"mat-card",10),s.TgZ(9,"mat-card-content",11),s.TgZ(10,"div",12),s.YNc(11,Va,1,5,"rtl-cl-node-info",13),s.YNc(12,za,1,4,"rtl-cl-channel-status-info",14),s.YNc(13,Ga,1,4,"rtl-cl-fee-info",15),s.YNc(14,Xa,1,3,"rtl-cl-fee-rates",16),s.YNc(15,$a,1,3,"rtl-cl-fee-rates",16),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.Q6J("colspan",e.cols)("rowspan",e.rows),s.xp6(4),s.Q6J("icon",e.icon),s.xp6(2),s.Oqu(e.title),s.xp6(4),s.Q6J("ngSwitch",e.id),s.xp6(1),s.Q6J("ngSwitchCase","node"),s.xp6(1),s.Q6J("ngSwitchCase","status"),s.xp6(1),s.Q6J("ngSwitchCase","fee"),s.xp6(1),s.Q6J("ngSwitchCase","feeRatesKB"),s.xp6(1),s.Q6J("ngSwitchCase","feeRatesKW")}}function Wa(e,t){if(1&e&&(s.TgZ(0,"mat-grid-list",2),s.YNc(1,Ka,16,10,"mat-grid-tile",3),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngForOf",e.nodeCardsMerchant)}}let ja=(()=>{class e{constructor(e,t,n){this.logger=e,this.commonService=t,this.store=n,this.faBolt=f.BDt,this.faServer=f.xf3,this.faNetworkWired=f.kXW,this.selNode={},this.information={},this.channelsStatus={},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=g.cu,this.userPersonaEnum=g.ol,this.flgLoading=[!0,!0,!0],this.unSubs=[new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:6,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:6,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:6,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:6,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:3,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:3,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:3,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:3,rows:4}])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchInfo"===e.action&&(this.flgLoading[0]="error"),"FetchFees"===e.action&&(this.flgLoading[1]="error"),"FetchFeeRates"===e.action&&(this.flgLoading[2]="error")}),this.selNode=e.nodeSettings,this.information=e.information,"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!this.information.id),this.fees=e.fees,this.fees.totalTxCount=0,e.forwardingHistory&&e.forwardingHistory.forwarding_events&&e.forwardingHistory.forwarding_events.length&&(this.fees.totalTxCount=e.forwardingHistory.forwarding_events.filter(e=>"settled"===e.status).length),"error"!==this.flgLoading[1]&&(this.flgLoading[1]=!this.fees.feeCollected),this.channelsStatus={active:{channels:e.information.num_active_channels,capacity:0},inactive:{channels:e.information.num_inactive_channels,capacity:0},pending:{channels:e.information.num_pending_channels,capacity:0}},this.feeRatesPerKB=e.feeRatesPerKB,this.feeRatesPerKW=e.feeRatesPerKW,"error"!==this.flgLoading[2]&&(this.flgLoading[2]=!this.feeRatesPerKB||!this.feeRatesPerKW),this.logger.info(e)})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","110px",4,"ngIf"],["cols","6","rowHeight","110px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxFlex","100",1,"dashboard-card-content"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","ngClass",4,"ngSwitchCase"],["fxFlex","100",3,"fees","ngClass",4,"ngSwitchCase"],["class","h-100",3,"flgLoading","feeRates","feeRateStyle",4,"ngSwitchCase"],["fxFlex","100",3,"information","showColorFieldSeparately","ngClass"],["fxFlex","100",3,"channelsStatus","ngClass"],["fxFlex","100",3,"fees","ngClass"],[1,"h-100",3,"flgLoading","feeRates","feeRateStyle"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,Ha,2,1,"mat-grid-list",1),s.YNc(2,Wa,2,1,"mat-grid-list",1),s.qZA()),2&e&&(s.xp6(1),s.Q6J("ngIf",t.selNode.userPersona===t.userPersonaEnum.OPERATOR),s.xp6(1),s.Q6J("ngIf",t.selNode.userPersona===t.userPersonaEnum.MERCHANT))},directives:[l.xw,l.Wh,i.O5,v.Il,i.sg,v.DX,l.yH,T.BN,b.a8,b.dn,i.RF,i.n9,N,i.mk,S.oO,B,E,Ra],styles:[""]}),e})();function eo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",8),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().activeLink=t.link}),s._uU(1),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.s9C("routerLink",e.link),s.Q6J("active",n.activeLink===e.link),s.xp6(1),s.Oqu(e.name)}}let to=(()=>{class e{constructor(e){this.router=e,this.faUserCheck=f.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x]}ngOnInit(){let e=this.links.find(e=>this.router.url.includes(e.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{let t=this.links.find(t=>e.urlAfterRedirects.includes(t.link));this.activeLink=t?t.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-sign-verify-message"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"Sign/Verify Message"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s.TgZ(7,"nav",5),s.YNc(8,eo,2,3,"div",6),s.qZA(),s.TgZ(9,"div",7),s._UZ(10,"router-outlet"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("icon",t.faUserCheck),s.xp6(7),s.Q6J("ngForOf",t.links))},directives:[l.xw,l.Wh,T.BN,b.a8,b.dn,te.BU,i.sg,l.yH,a.lC,te.Nj,a.rH],styles:[""]}),e})();var no=n(7969);function io(e,t){if(1&e&&(s.TgZ(0,"mat-option",7),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.hij(" ",e.addressTp," ")}}let ao=(()=>{class e{constructor(e,t){this.store=e,this.clEffects=t,this.addressTypes=g._t,this.selectedAddressType=g._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch(new se.Fk("Getting New Address...")),this.store.dispatch(new x.ER(this.selectedAddressType)),this.clEffects.setNewAddressCL.pipe((0,Ke.q)(1)).subscribe(e=>{this.newAddress=e,this.store.dispatch(new se.wu({width:"58%",data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:no.n}}))})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh),s.Y36(We.s))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-form-field",2),s.TgZ(3,"mat-select",3),s.NdJ("ngModelChange",function(e){return t.selectedAddressType=e}),s.YNc(4,io,2,2,"mat-option",4),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.TgZ(6,"button",6),s.NdJ("click",function(){return t.onGenerateAddress()}),s._uU(7,"Generate Address"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngModel",t.selectedAddressType),s.xp6(1),s.Q6J("ngForOf",t.addressTypes))},directives:[l.xw,l.Wh,D.KE,l.yH,de.gD,le.JJ,le.On,i.sg,C.lW,me.ey],styles:[""]}),e})(),oo=(()=>{class e{constructor(e,t){this.store=e,this.activatedRoute=t,this.sweepAll=!1,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activatedRoute.data.pipe((0,h.R)(this.unSubs[0])).subscribe(e=>this.sweepAll=e.sweepAll)}openSendFundsModal(){this.store.dispatch(new se.wu({data:{sweepAll:this.sweepAll,component:pi}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh),s.Y36(a.gz))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"button",2),s.NdJ("click",function(){return t.openSendFundsModal()}),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Oqu(t.sweepAll?"Sweep All":"Send Funds"))},directives:[l.xw,l.yH,l.Wh,C.lW],styles:[""]}),e})();var so=n(1258),lo=n(1681),ro=n(3474),co=n(84);const uo=["form"];function ho(e,t){if(1&e&&(s.TgZ(0,"mat-option",39),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.Oqu(e.alias?e.alias:e.id?e.id:"")}}function mo(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Peer alias is required."),s.qZA())}function po(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Peer not found in the list."),s.qZA())}function fo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-form-field",1),s.TgZ(1,"input",36),s.NdJ("change",function(){return s.CHM(e),s.oxw().onSelectedPeerChanged()}),s.qZA(),s.TgZ(2,"mat-autocomplete",37,38),s.NdJ("optionSelected",function(){return s.CHM(e),s.oxw().onSelectedPeerChanged()}),s.YNc(4,ho,2,2,"mat-option",24),s.ALo(5,"async"),s.qZA(),s.YNc(6,mo,2,0,"mat-error",17),s.YNc(7,po,2,0,"mat-error",17),s.qZA()}if(2&e){const e=s.MAs(3),t=s.oxw();s.xp6(1),s.Q6J("formControl",t.selectedPeer)("matAutocomplete",e),s.xp6(1),s.Q6J("displayWith",t.displayFn),s.xp6(2),s.Q6J("ngForOf",s.lcZ(5,6,t.filteredPeers)),s.xp6(2),s.Q6J("ngIf",null==t.selectedPeer.errors?null:t.selectedPeer.errors.required),s.xp6(1),s.Q6J("ngIf",null==t.selectedPeer.errors?null:t.selectedPeer.errors.notfound)}}function go(e,t){1&e&&s.GkF(0)}function xo(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function Zo(e,t){if(1&e&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function yo(e,t){if(1&e&&(s.TgZ(0,"mat-option",39),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.feeRateId),s.xp6(1),s.hij(" ",e.feeRateType," ")}}function Ao(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Min Confirmation Blocks is required."),s.qZA())}function wo(e,t){if(1&e&&(s.TgZ(0,"mat-option",39),s._uU(1),s.ALo(2,"number"),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e),s.xp6(1),s.hij("",s.lcZ(2,2,e.value)," Sats")}}function To(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",12),s.TgZ(1,"mat-form-field",22),s.TgZ(2,"mat-select",40),s.NdJ("selectionChange",function(t){return s.CHM(e),s.oxw().onUTXOSelectionChange(t)})("valueChange",function(t){return s.CHM(e),s.oxw().selUTXOs=t}),s.TgZ(3,"mat-select-trigger"),s._uU(4),s.ALo(5,"number"),s.qZA(),s.YNc(6,wo,3,4,"mat-option",24),s.qZA(),s.qZA(),s.TgZ(7,"mat-slide-toggle",41),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().flgUseAllBalance=t})("change",function(){return s.CHM(e),s.oxw().onUTXOAllBalanceChange()}),s._uU(8," Use selected UTXOs balance "),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(2),s.Q6J("value",e.selUTXOs),s.xp6(2),s.AsE("",s.lcZ(5,6,e.totalSelectedUTXOAmount)," Sats (",e.selUTXOs.length>1?e.selUTXOs.length+" UTXOs":"1 UTXO",")"),s.xp6(2),s.Q6J("ngForOf",e.utxos),s.xp6(1),s.Q6J("ngModel",e.flgUseAllBalance)("disabled",e.selUTXOs.length<1)}}function vo(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Oqu(e.channelConnectionError)}}function bo(e,t){if(1&e&&(s.TgZ(0,"div",42),s._UZ(1,"fa-icon",43),s.YNc(2,vo,2,1,"span",17),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(1),s.Q6J("ngIf",""!==e.channelConnectionError)}}function qo(e,t){if(1&e&&(s.TgZ(0,"mat-expansion-panel",45),s.TgZ(1,"mat-expansion-panel-header"),s.TgZ(2,"mat-panel-title"),s.TgZ(3,"span"),s._uU(4,"Peer: \xa0"),s.qZA(),s.TgZ(5,"strong",46),s._uU(6),s.qZA(),s.qZA(),s.qZA(),s.TgZ(7,"div",9),s.TgZ(8,"div",0),s.TgZ(9,"div",1),s.TgZ(10,"h4",47),s._uU(11,"Pubkey"),s.qZA(),s.TgZ(12,"span",48),s._uU(13),s.qZA(),s.qZA(),s.qZA(),s._UZ(14,"mat-divider",49),s.TgZ(15,"div",0),s.TgZ(16,"div",50),s.TgZ(17,"h4",47),s._uU(18,"Address"),s.qZA(),s.TgZ(19,"span",51),s._uU(20),s.qZA(),s.qZA(),s.TgZ(21,"div",50),s.TgZ(22,"h4",47),s._uU(23,"Connected"),s.qZA(),s.TgZ(24,"span",51),s._uU(25),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.oxw(2);s.xp6(6),s.Oqu((null==e.peer?null:e.peer.alias)||(null==e.peer?null:e.peer.id)),s.xp6(7),s.Oqu(e.peer.id),s.xp6(7),s.Oqu(null==e.peer?null:e.peer.netaddr),s.xp6(5),s.Oqu(e.peer.connected?"True":"False")}}function Co(e,t){if(1&e&&s.YNc(0,qo,26,4,"mat-expansion-panel",44),2&e){const e=s.oxw();s.Q6J("ngIf",e.peer)}}let _o=(()=>{class e{constructor(e,t,n,i,a){this.dialogRef=e,this.data=t,this.store=n,this.actions$=i,this.decimalPipe=a,this.selectedPeer=new le.NI,this.faExclamationTriangle=f.eHv,this.isCompatibleVersion=!1,this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=g.vn,this.selFeeRate="",this.flgMinConf=!1,this.minConfValue=null,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.utxos=this.data.message.utxos,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer?this.data.message.peer:null,this.peers=this.data.message.peers&&this.data.message.peers.length?this.data.message.peers:[],this.actions$.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e.type===x.at||e.type===x.GL)).subscribe(e=>{e.type===x.at&&"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message),e.type===x.GL&&this.dialogRef.close()});let e="",t="";this.sortedPeers=this.peers.sort((n,i)=>(e=n.alias?n.alias.toLowerCase():n.id?n.id.toLowerCase():"",t=i.alias?i.alias.toLowerCase():n.id.toLowerCase(),e<t?-1:e>t?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,h.R)(this.unSubs[1]),(0,so.O)(""),(0,lo.U)(e=>"string"==typeof e?e:e.alias?e.alias:e.id),(0,lo.U)(e=>e?this.filterPeers(e):this.sortedPeers.slice()))}filterPeers(e){return this.sortedPeers.filter(t=>0===t.alias.toLowerCase().indexOf(e?e.toLowerCase():""))}displayFn(e){return e&&e.alias?e.alias:e&&e.id?e.id:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id:void 0,"string"==typeof this.selectedPeer.value){let e=this.peers.filter(e=>e.alias.length===this.selectedPeer.value.length&&0===e.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===e.length&&e[0].id&&(this.selectedPubkey=e[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(e){e&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+this.feeRateTypes.find(e=>e.feeRateId===this.selFeeRate).feeRateType),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(e){let t={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((e,n)=>(t.value=e.value+n.value,t)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue)return!0;let e={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,feeRate:this.selFeeRate,minconf:this.flgMinConf?this.minConfValue:null};this.selUTXOs.length&&this.selUTXOs.length>0&&(e.utxos=[],this.selUTXOs.forEach(t=>e.utxos.push(t.txid+":"+t.output))),this.store.dispatch(new se.Fk("Opening Channel...")),this.store.dispatch(new x.nb(e))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(oe.so),s.Y36(oe.WI),s.Y36(y.yh),s.Y36(A.eX),s.Y36(i.JJ))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-open-channel"]],viewQuery:function(e,t){if(1&e&&s.Gf(uo,7),2&e){let e;s.iGM(e=s.CRH())&&(t.form=e.first)}},decls:54,vars:29,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","48","fxLayoutAlign","start end"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",1,"mr-2",3,"ngModel","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-flat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","48","tabindex","7","color","primary","name","flgUseAllBalance","matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",3,"ngModel","disabled","ngModelChange","change"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s.NdJ("click",function(){return t.onClose()}),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"form",7,8),s.NdJ("submit",function(){return t.onOpenChannel()})("reset",function(){return t.resetData()}),s.TgZ(11,"div",9),s.YNc(12,fo,8,8,"mat-form-field",10),s.qZA(),s.YNc(13,go,1,0,"ng-container",11),s.TgZ(14,"div",9),s.TgZ(15,"div",12),s.TgZ(16,"mat-form-field",13),s.TgZ(17,"input",14,15),s.NdJ("ngModelChange",function(e){return t.fundingAmount=e}),s.qZA(),s.TgZ(19,"mat-hint"),s._uU(20),s.ALo(21,"number"),s.qZA(),s.TgZ(22,"span",16),s._uU(23),s.qZA(),s.YNc(24,xo,2,0,"mat-error",17),s.YNc(25,Zo,2,1,"mat-error",17),s.qZA(),s.TgZ(26,"div",18),s.TgZ(27,"mat-slide-toggle",19),s.NdJ("ngModelChange",function(e){return t.isPrivate=e}),s._uU(28,"Private Channel"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(29,"mat-expansion-panel",20),s.NdJ("closed",function(){return t.onAdvancedPanelToggle(!0)})("opened",function(){return t.onAdvancedPanelToggle(!1)}),s.TgZ(30,"mat-expansion-panel-header"),s.TgZ(31,"mat-panel-title"),s.TgZ(32,"span"),s._uU(33),s.qZA(),s.qZA(),s.qZA(),s.TgZ(34,"div",21),s.TgZ(35,"div",12),s.TgZ(36,"mat-form-field",22),s.TgZ(37,"mat-select",23),s.NdJ("valueChange",function(e){return t.selFeeRate=e}),s.YNc(38,yo,2,2,"mat-option",24),s.qZA(),s.qZA(),s.TgZ(39,"div",25),s.TgZ(40,"mat-checkbox",26),s.NdJ("ngModelChange",function(e){return t.flgMinConf=e})("change",function(){return t.flgMinConf?t.selFeeRate=null:t.minConfValue=null}),s.qZA(),s.TgZ(41,"mat-form-field",27),s.TgZ(42,"input",28,29),s.NdJ("ngModelChange",function(e){return t.minConfValue=e}),s.qZA(),s.YNc(44,Ao,2,0,"mat-error",17),s.qZA(),s.qZA(),s.qZA(),s.YNc(45,To,9,8,"div",30),s.qZA(),s.qZA(),s.qZA(),s.YNc(46,bo,3,2,"div",31),s.TgZ(47,"div",32),s.TgZ(48,"button",33),s._uU(49,"Clear Fields"),s.qZA(),s.TgZ(50,"button",34),s._uU(51,"Open Channel"),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(52,Co,1,1,"ng-template",null,35,s.W1O)),2&e){const e=s.MAs(18),n=s.MAs(53);s.xp6(5),s.Oqu(t.alertTitle),s.xp6(7),s.Q6J("ngIf",!t.peer&&t.peers&&t.peers.length>0),s.xp6(1),s.Q6J("ngTemplateOutlet",n),s.xp6(4),s.Q6J("ngModel",t.fundingAmount)("step",1e3)("min",1)("max",t.totalBalance)("disabled",t.flgUseAllBalance),s.xp6(3),s.AsE("Remaining Bal: ",s.lcZ(21,27,t.totalBalance-(t.fundingAmount?t.fundingAmount:0)),"",t.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),s.xp6(3),s.hij(" ",null==t.information?null:t.information.smaller_currency_unit," "),s.xp6(1),s.Q6J("ngIf",(null==e.errors?null:e.errors.required)||!t.fundingAmount),s.xp6(1),s.Q6J("ngIf",null==e.errors?null:e.errors.max),s.xp6(2),s.Q6J("ngModel",t.isPrivate),s.xp6(6),s.Oqu(t.advancedTitle),s.xp6(4),s.Q6J("value",t.selFeeRate)("disabled",t.flgMinConf),s.xp6(1),s.Q6J("ngForOf",t.feeRateTypes),s.xp6(2),s.Q6J("ngModel",t.flgMinConf),s.xp6(2),s.Q6J("ngModel",t.minConfValue)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),s.xp6(2),s.Q6J("ngIf",t.flgMinConf&&!t.minConfValue),s.xp6(1),s.Q6J("ngIf",t.isCompatibleVersion),s.xp6(1),s.Q6J("ngIf",""!==t.channelConnectionError)}},directives:[l.xw,l.yH,b.dk,l.Wh,C.lW,b.dn,le._Y,le.JL,le.F,i.O5,i.tP,D.KE,re.Nt,le.wV,le.qQ,le.Fd,le.Fj,ue.q,ro.F,le.Q7,le.JJ,le.On,D.bx,D.R9,he.Rr,Qn.ib,Qn.yz,Qn.yK,de.gD,i.sg,Yn.oG,ce.h,co.ZL,le.oH,co.XC,me.ey,D.TO,de.$L,O.gM,T.BN,R.d],pipes:[i.JJ,i.Ov],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),e})();function So(e,t){if(1&e&&(s.TgZ(0,"span",7),s._uU(1,"Open"),s.qZA()),2&e){const e=s.oxw();s.s9C("matBadge",e.openChannels)}}function Lo(e,t){if(1&e&&(s.TgZ(0,"span",7),s._uU(1,"Pending/Inactive"),s.qZA()),2&e){const e=s.oxw();s.s9C("matBadge",e.pendingChannels)}}let Uo=(()=>{class e{constructor(e,t,n,i){this.logger=e,this.store=t,this.commonService=n,this.router=i,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.utxos=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{this.activeLink=this.links.findIndex(t=>t.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}),this.store.select("cl").pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{e.allChannels&&e.allChannels.length?(this.openChannels=0,this.pendingChannels=0,e.allChannels.forEach(e=>{"CHANNELD_NORMAL"===e.state&&e.connected?this.openChannels++:this.pendingChannels++})):(this.openChannels=0,this.pendingChannels=0),this.selNode=e.nodeSettings,this.information=e.information,this.peers=e.peers,this.utxos=this.commonService.sortAscByKey(e.utxos.filter(e=>"confirmed"===e.status),"value"),this.totalBalance=e.balance.totalBalance,this.logger.info(e)})}onOpenChannel(){const e={peers:this.peers,information:this.information,balance:this.totalBalance,utxos:this.utxos,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch(new se.wu({data:{alertTitle:"Open Channel",message:e,component:_o}}))}onSelectedTabChange(e){this.router.navigateByUrl("/cl/connections/channels/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(w.v),s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"button",2),s.NdJ("click",function(){return t.onOpenChannel()}),s._uU(3,"Open Channel"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-tab-group",4),s.NdJ("selectedIndexChange",function(e){return t.activeLink=e})("selectedTabChange",function(e){return t.onSelectedTabChange(e)}),s.TgZ(6,"mat-tab"),s.YNc(7,So,2,1,"ng-template",5),s.qZA(),s.TgZ(8,"mat-tab"),s.YNc(9,Lo,2,1,"ng-template",5),s.qZA(),s.qZA(),s.TgZ(10,"div",6),s._UZ(11,"router-outlet"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(5),s.Q6J("selectedIndex",t.activeLink))},directives:[l.xw,l.yH,l.Wh,C.lW,te.SP,te.uX,te.uD,a.lC,Bi.k],styles:[""]}),e})();function Fo(e,t){if(1&e&&(s.TgZ(0,"div"),s.TgZ(1,"div",9),s.TgZ(2,"div",1),s.TgZ(3,"h4",11),s._uU(4,"Funding Transaction Id"),s.qZA(),s.TgZ(5,"span",12),s._uU(6),s.qZA(),s.qZA(),s.qZA(),s._UZ(7,"mat-divider",13),s.qZA()),2&e){const e=s.oxw();s.xp6(6),s.Oqu(e.channel.funding_txid),s.xp6(1),s.Q6J("inset",!0)}}function ko(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"Show Advanced"),s.qZA())}function No(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"Hide Advanced"),s.qZA())}function Jo(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",23),s.NdJ("copied",function(t){return s.CHM(e),s.oxw().onCopyChanID(t)}),s._uU(1,"Copy Short Channel ID"),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("payload",e.channel.short_channel_id)}}function Do(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"button",24),s.NdJ("click",function(){return s.CHM(e),s.oxw().onClose()}),s._uU(1,"OK"),s.qZA()}}const Oo=function(e){return{"xs-scroll-y":e}},Ro=function(e,t){return{"mt-2":e,"mt-1":t}};let Mo=(()=>{class e{constructor(e,t,n,i,a){this.dialogRef=e,this.data=t,this.logger=n,this.commonService=i,this.snackBar=a,this.faReceipt=f.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=g.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(e){this.snackBar.open("Short channel ID "+e+" copied."),this.logger.info("Copied Text: "+e)}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(oe.so),s.Y36(oe.WI),s.Y36(Z.mQ),s.Y36(w.v),s.Y36(Mn.ux))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-information"]],decls:94,vars:40,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-stroked-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-flat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(e,t){if(1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s._UZ(4,"fa-icon",4),s.TgZ(5,"span",5),s._uU(6,"Channel Information"),s.qZA(),s.qZA(),s.TgZ(7,"button",6),s.NdJ("click",function(){return t.onClose()}),s._uU(8,"X"),s.qZA(),s.qZA(),s.TgZ(9,"mat-card-content",7),s.TgZ(10,"div",8),s.TgZ(11,"div",9),s.TgZ(12,"div",10),s.TgZ(13,"h4",11),s._uU(14,"Short Channel ID"),s.qZA(),s.TgZ(15,"span",12),s._uU(16),s.qZA(),s.qZA(),s.TgZ(17,"div",10),s.TgZ(18,"h4",11),s._uU(19,"Peer Alias"),s.qZA(),s.TgZ(20,"span",12),s._uU(21),s.qZA(),s.qZA(),s.qZA(),s._UZ(22,"mat-divider",13),s.TgZ(23,"div",9),s.TgZ(24,"div",1),s.TgZ(25,"h4",11),s._uU(26,"Channel ID"),s.qZA(),s.TgZ(27,"span",12),s._uU(28),s.qZA(),s.qZA(),s.qZA(),s._UZ(29,"mat-divider",13),s.TgZ(30,"div",9),s.TgZ(31,"div",1),s.TgZ(32,"h4",11),s._uU(33,"Peer Public Key"),s.qZA(),s.TgZ(34,"span",12),s._uU(35),s.qZA(),s.qZA(),s.qZA(),s._UZ(36,"mat-divider",13),s.TgZ(37,"div",9),s.TgZ(38,"div",14),s.TgZ(39,"h4",11),s._uU(40,"mSatoshi to Us"),s.qZA(),s.TgZ(41,"span",15),s._uU(42),s.ALo(43,"number"),s.qZA(),s.qZA(),s.TgZ(44,"div",14),s.TgZ(45,"h4",11),s._uU(46,"Spendable (mSats)"),s.qZA(),s.TgZ(47,"span",15),s._uU(48),s.ALo(49,"number"),s.qZA(),s.qZA(),s.TgZ(50,"div",14),s.TgZ(51,"h4",11),s._uU(52,"Total (mSats)"),s.qZA(),s.TgZ(53,"span",15),s._uU(54),s.ALo(55,"number"),s.qZA(),s.qZA(),s.TgZ(56,"div",14),s.TgZ(57,"h4",11),s._uU(58,"State"),s.qZA(),s.TgZ(59,"span",15),s._uU(60),s.qZA(),s.qZA(),s.qZA(),s._UZ(61,"mat-divider",13),s.TgZ(62,"div",9),s.TgZ(63,"div",14),s.TgZ(64,"h4",11),s._uU(65,"Our Reserve (Sats)"),s.qZA(),s.TgZ(66,"span",15),s._uU(67),s.ALo(68,"number"),s.qZA(),s.qZA(),s.TgZ(69,"div",14),s.TgZ(70,"h4",11),s._uU(71,"Their Reserve (Sats)"),s.qZA(),s.TgZ(72,"span",15),s._uU(73),s.ALo(74,"number"),s.qZA(),s.qZA(),s.TgZ(75,"div",14),s.TgZ(76,"h4",11),s._uU(77,"Connected"),s.qZA(),s.TgZ(78,"span",15),s._uU(79),s.qZA(),s.qZA(),s.TgZ(80,"div",14),s.TgZ(81,"h4",11),s._uU(82,"Private"),s.qZA(),s.TgZ(83,"span",15),s._uU(84),s.qZA(),s.qZA(),s.qZA(),s._UZ(85,"mat-divider",13),s.YNc(86,Fo,8,2,"div",16),s.TgZ(87,"div",17),s.TgZ(88,"button",18),s.NdJ("click",function(){return t.onShowAdvanced()}),s.YNc(89,ko,2,0,"p",19),s.YNc(90,No,2,0,"ng-template",null,20,s.W1O),s.qZA(),s.YNc(92,Jo,2,1,"button",21),s.YNc(93,Do,2,0,"button",22),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e){const e=s.MAs(91);s.xp6(4),s.Q6J("icon",t.faReceipt),s.xp6(5),s.Q6J("ngClass",s.VKq(35,Oo,t.screenSize===t.screenSizeEnum.XS)),s.xp6(7),s.Oqu(t.channel.short_channel_id),s.xp6(5),s.Oqu(t.channel.alias),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(t.channel.channel_id),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(t.channel.id),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(s.lcZ(43,25,t.channel.msatoshi_to_us)),s.xp6(6),s.Oqu(s.lcZ(49,27,t.channel.spendable_msatoshi)),s.xp6(6),s.Oqu(s.lcZ(55,29,t.channel.msatoshi_total)),s.xp6(6),s.Oqu(t.channel.state),s.xp6(1),s.Q6J("inset",!0),s.xp6(6),s.Oqu(s.lcZ(68,31,t.channel.our_channel_reserve_satoshis)),s.xp6(6),s.Oqu(s.lcZ(74,33,t.channel.their_channel_reserve_satoshis)),s.xp6(6),s.Oqu(t.channel.connected?"Yes":"No"),s.xp6(5),s.Oqu(t.channel.private?"Yes":"No"),s.xp6(1),s.Q6J("inset",!0),s.xp6(1),s.Q6J("ngIf",t.showAdvanced),s.xp6(1),s.Q6J("ngClass",s.WLB(37,Ro,!t.showAdvanced,t.showAdvanced)),s.xp6(2),s.Q6J("ngIf",!t.showAdvanced)("ngIfElse",e),s.xp6(3),s.Q6J("ngIf",t.showCopy),s.xp6(1),s.Q6J("ngIf",!t.showCopy)}},directives:[l.xw,l.Wh,l.yH,b.dk,T.BN,C.lW,b.dn,i.mk,S.oO,R.d,i.O5,ce.h,aa.y],pipes:[i.JJ],styles:[""]}),e})();function Yo(e,t){1&e&&s._UZ(0,"mat-progress-bar",33)}function Qo(e,t){1&e&&(s.TgZ(0,"th",34),s._uU(1," Short Channel ID "),s.qZA())}function Io(e,t){if(1&e&&(s.TgZ(0,"span",40),s._UZ(1,"fa-icon",41),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("icon",e.faEyeSlash)}}function Po(e,t){if(1&e&&(s.TgZ(0,"span",42),s._UZ(1,"fa-icon",41),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("icon",e.faEye)}}const Eo=function(e){return{"max-width":e}};function Bo(e,t){if(1&e&&(s.TgZ(0,"td",35),s.TgZ(1,"div",36),s.YNc(2,Io,2,1,"span",37),s.YNc(3,Po,2,1,"span",38),s.TgZ(4,"span",39),s._uU(5),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(4,Eo,n.screenSize===n.screenSizeEnum.XS?"12rem":"22rem")),s.xp6(1),s.Q6J("ngIf",e.private),s.xp6(1),s.Q6J("ngIf",!e.private),s.xp6(2),s.Oqu(null==e?null:e.short_channel_id)}}function Ho(e,t){1&e&&(s.TgZ(0,"th",34),s._uU(1," Alias "),s.qZA())}function Vo(e,t){if(1&e&&(s.TgZ(0,"td",35),s.TgZ(1,"div",36),s.TgZ(2,"span",39),s._uU(3),s.qZA(),s.qZA(),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.xp6(1),s.Q6J("ngStyle",s.VKq(2,Eo,n.screenSize===n.screenSizeEnum.XS?"12rem":"22rem")),s.xp6(2),s.Oqu(null==e?null:e.alias)}}function zo(e,t){1&e&&(s.TgZ(0,"th",34),s._uU(1," Connected "),s.qZA())}function Go(e,t){if(1&e&&(s.TgZ(0,"td",35),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null!=e&&e.connected?"Connected":"Disconnected"," ")}}function Xo(e,t){1&e&&(s.TgZ(0,"th",34),s._uU(1," Private "),s.qZA())}function $o(e,t){if(1&e&&(s.TgZ(0,"td",35),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null!=e&&e.private?"Private":"Public"," ")}}function Ko(e,t){1&e&&(s.TgZ(0,"th",34),s._uU(1," State "),s.qZA())}function Wo(e,t){if(1&e&&(s.TgZ(0,"td",35),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.state,"")}}function jo(e,t){1&e&&(s.TgZ(0,"th",43),s._uU(1," Local Balance (Sats) "),s.qZA())}function es(e,t){if(1&e&&(s.TgZ(0,"td",35),s.TgZ(1,"span",44),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,(null==e?null:e.msatoshi_to_us)/1e3,(null==e?null:e.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function ts(e,t){1&e&&(s.TgZ(0,"th",43),s._uU(1," Remote Balance (Sats) "),s.qZA())}function ns(e,t){if(1&e&&(s.TgZ(0,"td",35),s.TgZ(1,"span",44),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.xi3(3,1,(null==e?null:e.msatoshi_to_them)/1e3,(null==e?null:e.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function is(e,t){1&e&&(s.TgZ(0,"th",43),s._uU(1," Total mSatoshis "),s.qZA())}function as(e,t){if(1&e&&(s.TgZ(0,"td",35),s.TgZ(1,"span",44),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.msatoshi_total)," ")}}function os(e,t){1&e&&(s.TgZ(0,"th",43),s._uU(1," Spendable Satoshi "),s.qZA())}function ss(e,t){if(1&e&&(s.TgZ(0,"td",35),s.TgZ(1,"span",44),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.spendable_msatoshi)," ")}}function ls(e,t){1&e&&(s.TgZ(0,"th",45),s._uU(1,"Balance Score "),s.qZA())}function rs(e,t){if(1&e&&(s.TgZ(0,"td",46),s.TgZ(1,"div",47),s.TgZ(2,"mat-hint",48),s._uU(3),s.ALo(4,"number"),s.qZA(),s.qZA(),s._UZ(5,"mat-progress-bar",49),s.qZA()),2&e){const e=t.$implicit;s.xp6(3),s.Oqu(s.lcZ(4,2,e.balancedness||0)),s.xp6(2),s.s9C("value",e.msatoshi_to_us&&e.msatoshi_to_us>0?+e.msatoshi_to_us/(+e.msatoshi_to_us+ +e.msatoshi_to_them)*100:0)}}function cs(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",50),s.TgZ(1,"div",51),s.TgZ(2,"mat-select",52),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",53),s.NdJ("click",function(){return s.CHM(e),s.oxw().onChannelUpdate("all")}),s._uU(5,"Update Fee Policy"),s.qZA(),s.TgZ(6,"mat-option",53),s.NdJ("click",function(){return s.CHM(e),s.oxw().onDownloadCSV()}),s._uU(7,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function us(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",54),s.TgZ(1,"div",55),s.TgZ(2,"mat-select",56),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",53),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw().onChannelClick(n,t)}),s._uU(5,"View Info"),s.qZA(),s.TgZ(6,"mat-option",53),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().onViewRemotePolicy(t)}),s._uU(7,"View Remote Fee"),s.qZA(),s.TgZ(8,"mat-option",53),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().onChannelUpdate(t)}),s._uU(9,"Update Fee Policy"),s.qZA(),s.TgZ(10,"mat-option",53),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().onChannelClose(t)}),s._uU(11,"Close Channel"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function ds(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No peers connected. Add a peer in order to open a channel."),s.qZA())}function hs(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No channels available."),s.qZA())}function ms(e,t){if(1&e&&(s.TgZ(0,"td",57),s.YNc(1,ds,2,0,"p",58),s.YNc(2,hs,2,0,"p",58),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf",e.numPeers<1&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)),s.xp6(1),s.Q6J("ngIf",e.numPeers>0&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1))}}const ps=function(e){return{"display-none":e}};function fs(e,t){if(1&e&&s._UZ(0,"tr",59),2&e){const e=s.oxw();s.Q6J("ngClass",s.VKq(1,ps,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function gs(e,t){1&e&&s._UZ(0,"tr",60)}function xs(e,t){1&e&&s._UZ(0,"tr",61)}const Zs=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}},ys=function(){return["no_peer"]};let As=(()=>{class e{constructor(e,t,n,i,a){this.logger=e,this.store=t,this.rtlEffects=n,this.clEffects=i,this.commonService=a,this.faEye=f.Mdf,this.faEyeSlash=f.Aq,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=g.vn,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi_to_us","msatoshi_to_them","actions"]):this.screenSize===g.cu.SM||this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","actions"]):(this.flgSticky=!0,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","balancedness","actions"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchChannels"===e.action&&(this.flgLoading[0]="error")}),this.information=e.information,this.numPeers=e.peers&&e.peers.length?e.peers.length:0,this.totalBalance=e.balance.totalBalance,this.channelsData=e.allChannels.filter(e=>"CHANNELD_NORMAL"===e.state&&e.connected),this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!e.allChannels),this.logger.info(e)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(e){this.store.dispatch(new x.IG({shortChannelID:e.short_channel_id,showError:!0})),this.clEffects.setLookupCL.pipe((0,Ke.q)(1)).subscribe(e=>{if(0===e.length)return!1;let t={};t=e[0].source!==this.information.id?e[0]:e[1],this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"Remote Channel Policy",message:[[{key:"base_fee_millisatoshi",value:t.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:g.Gi.NUMBER},{key:"fee_per_millionth",value:t.fee_per_millionth,title:"Fee/Millionth",width:33,type:g.Gi.NUMBER},{key:"delay",value:t.delay,title:"Delay",width:33,type:g.Gi.NUMBER}]]}}))})}onChannelUpdate(e){"all"!==e&&"ONCHAIN"===e.state||("all"===e?(this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48,hintFunction:this.percentHintFunction}]}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{if(e){const t=e[0].inputValue,n=e[1].inputValue;this.store.dispatch(new se.Fk("Updating Channel Policy...")),this.store.dispatch(new x.k({baseFeeMsat:t,feeRate:n,channelId:"all"}))}})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch(new se.Fk("Fetching Channel Policy...")),this.store.dispatch(new x.IG({shortChannelID:e.short_channel_id,showError:!1})),this.clEffects.setLookupCL.pipe((0,Ke.q)(1)).subscribe(t=>{this.myChanPolicy=t.length>0&&t[0].source===this.information.id?{fee_base_msat:t[0].base_fee_millisatoshi,fee_rate_milli_msat:t[0].fee_per_millionth}:t.length>1&&t[1].source===this.information.id?{fee_base_msat:t[1].base_fee_millisatoshi,fee_rate_milli_msat:t[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy),this.store.dispatch(new se.Iv),this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"Update fee policy for Channel: "+e.channel_id,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48,hintFunction:this.percentHintFunction}]}}))}),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[2])).subscribe(t=>{if(t){const n=t[0].inputValue,i=t[1].inputValue;this.store.dispatch(new se.Fk("Updating Channel Policy...")),this.store.dispatch(new x.k({baseFeeMsat:n,feeRate:i,channelId:e.channel_id}))}})),this.applyFilter())}percentHintFunction(e){return(e/1e4).toString()+"%"}onChannelClose(e){this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+e.channel_id,noBtnText:"Cancel",yesBtnText:"Close Channel"}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[3])).subscribe(t=>{t&&(this.store.dispatch(new se.Fk("Closing Channel...")),this.store.dispatch(new x.e8({channelId:e.channel_id,force:!1})))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,t){this.store.dispatch(new se.wu({data:{channel:e,showCopy:!0,component:Mo}}))}loadChannelsTable(e){e.sort(function(e,t){return e.active===t.active?0:t.active?1:-1}),this.channels=new ae.by([...e]),this.channels.filterPredicate=(e,t)=>((e.connected?"connected":"disconnected")+(e.channel_id?e.channel_id.toLowerCase():"")+(e.short_channel_id?e.short_channel_id.toLowerCase():"")+(e.id?e.id.toLowerCase():"")+(e.alias?e.alias.toLowerCase():"")+(e.private?"private":"public")+(e.state?e.state.toLowerCase():"")+(e.funding_txid?e.funding_txid.toLowerCase():"")+(e.msatoshi_to_us?e.msatoshi_to_us:"")+(e.msatoshi_total?e.msatoshi_total:"")+(e.their_channel_reserve_satoshis?e.their_channel_reserve_satoshis:"")+(e.our_channel_reserve_satoshis?e.our_channel_reserve_satoshis:"")+(e.spendable_msatoshi?e.spendable_msatoshi:"")).includes(t),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(Ae.V),s.Y36(We.s),s.Y36(w.v))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-open-table"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Channels")}])],decls:48,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_to_them"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"div",2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"input",4),s.NdJ("keyup",function(){return t.applyFilter()})("ngModelChange",function(e){return t.selFilter=e}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.YNc(6,Yo,1,0,"mat-progress-bar",6),s.TgZ(7,"table",7,8),s.ynx(9,9),s.YNc(10,Qo,2,0,"th",10),s.YNc(11,Bo,6,6,"td",11),s.BQk(),s.ynx(12,12),s.YNc(13,Ho,2,0,"th",10),s.YNc(14,Vo,4,4,"td",11),s.BQk(),s.ynx(15,13),s.YNc(16,zo,2,0,"th",10),s.YNc(17,Go,2,1,"td",11),s.BQk(),s.ynx(18,14),s.YNc(19,Xo,2,0,"th",10),s.YNc(20,$o,2,1,"td",11),s.BQk(),s.ynx(21,15),s.YNc(22,Ko,2,0,"th",10),s.YNc(23,Wo,2,1,"td",11),s.BQk(),s.ynx(24,16),s.YNc(25,jo,2,0,"th",17),s.YNc(26,es,4,4,"td",11),s.BQk(),s.ynx(27,18),s.YNc(28,ts,2,0,"th",17),s.YNc(29,ns,4,4,"td",11),s.BQk(),s.ynx(30,19),s.YNc(31,is,2,0,"th",17),s.YNc(32,as,4,3,"td",11),s.BQk(),s.ynx(33,20),s.YNc(34,os,2,0,"th",17),s.YNc(35,ss,4,3,"td",11),s.BQk(),s.ynx(36,21),s.YNc(37,ls,2,0,"th",22),s.YNc(38,rs,6,4,"td",23),s.BQk(),s.ynx(39,24),s.YNc(40,cs,8,0,"th",25),s.YNc(41,us,12,0,"td",26),s.BQk(),s.ynx(42,27),s.YNc(43,ms,3,2,"td",28),s.BQk(),s.YNc(44,fs,1,3,"tr",29),s.YNc(45,gs,1,0,"tr",30),s.YNc(46,xs,1,0,"tr",31),s.qZA(),s.qZA(),s._UZ(47,"mat-paginator",32),s.qZA()),2&e&&(s.xp6(4),s.Q6J("ngModel",t.selFilter),s.xp6(2),s.Q6J("ngIf",!0===t.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",t.channels)("ngClass",s.VKq(11,Zs,"error"===t.flgLoading[0])),s.xp6(37),s.Q6J("matFooterRowDef",s.DdM(13,ys)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,D.KE,re.Nt,le.Fj,le.JJ,le.On,M.$V,i.O5,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ne.NW,r.pW,ae.ge,ie.nU,ae.ev,i.PC,S.Zl,O.gM,T.BN,D.bx,de.gD,de.$L,me.ey,ae.yh,ae.Q2,ae.XQ,ae.Gk],pipes:[i.JJ],styles:[".mat-column-short_channel_id[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 22%;width:22%}.mat-column-msatoshi_to_them[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width:37.5em){.mat-column-msatoshi_to_them[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width:37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),e})();function ws(e,t){1&e&&s._UZ(0,"mat-progress-bar",29)}function Ts(e,t){1&e&&(s.TgZ(0,"th",30),s._uU(1," Short Channel ID "),s.qZA())}function vs(e,t){if(1&e&&(s.TgZ(0,"td",31),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.short_channel_id,"")}}function bs(e,t){1&e&&(s.TgZ(0,"th",30),s._uU(1," Alias "),s.qZA())}function qs(e,t){if(1&e&&(s.TgZ(0,"td",31),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(null==e?null:e.alias)}}function Cs(e,t){1&e&&(s.TgZ(0,"th",30),s._uU(1," Connected "),s.qZA())}function _s(e,t){if(1&e&&(s.TgZ(0,"td",31),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null!=e&&e.connected?"Connected":"Disconnected"," ")}}function Ss(e,t){1&e&&(s.TgZ(0,"th",30),s._uU(1," Private "),s.qZA())}function Ls(e,t){if(1&e&&(s.TgZ(0,"td",31),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null!=e&&e.private?"Private":"Public"," ")}}function Us(e,t){1&e&&(s.TgZ(0,"th",30),s._uU(1," State "),s.qZA())}function Fs(e,t){if(1&e&&(s.TgZ(0,"td",31),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.state,"")}}function ks(e,t){1&e&&(s.TgZ(0,"th",32),s._uU(1," mSatoshi To Us "),s.qZA())}function Ns(e,t){if(1&e&&(s.TgZ(0,"td",31),s.TgZ(1,"span",33),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.msatoshi_to_us)," ")}}function Js(e,t){1&e&&(s.TgZ(0,"th",32),s._uU(1," Total (Sats) "),s.qZA())}function Ds(e,t){if(1&e&&(s.TgZ(0,"td",31),s.TgZ(1,"span",33),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,(null==e?null:e.msatoshi_total)/1e3)," ")}}function Os(e,t){1&e&&(s.TgZ(0,"th",32),s._uU(1," Spendable Satoshi "),s.qZA())}function Rs(e,t){if(1&e&&(s.TgZ(0,"td",31),s.TgZ(1,"span",33),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.spendable_msatoshi)," ")}}function Ms(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",34),s.TgZ(1,"div",35),s.TgZ(2,"mat-select",36),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",37),s.NdJ("click",function(){return s.CHM(e),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Ys(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-option",37),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().onChannelClose(t)}),s._uU(1,"Close Channel"),s.qZA()}}function Qs(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",38),s.TgZ(1,"div",35),s.TgZ(2,"mat-select",39),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",37),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw().onChannelClick(n,t)}),s._uU(5,"View Info"),s.qZA(),s.YNc(6,Ys,2,0,"mat-option",40),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.xp6(6),s.Q6J("ngIf",n.isCompatibleVersion&&!e.connected&&"CHANNELD_NORMAL"===e.state)}}function Is(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No peers connected. Add a peer in order to open a channel."),s.qZA())}function Ps(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No channels available."),s.qZA())}function Es(e,t){if(1&e&&(s.TgZ(0,"td",41),s.YNc(1,Is,2,0,"p",42),s.YNc(2,Ps,2,0,"p",42),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf",e.numPeers<1&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1)),s.xp6(1),s.Q6J("ngIf",e.numPeers>0&&(!(null!=e.channels&&e.channels.data)||(null==e.channels||null==e.channels.data?null:e.channels.data.length)<1))}}const Bs=function(e){return{"display-none":e}};function Hs(e,t){if(1&e&&s._UZ(0,"tr",43),2&e){const e=s.oxw();s.Q6J("ngClass",s.VKq(1,Bs,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Vs(e,t){1&e&&s._UZ(0,"tr",44)}function zs(e,t){1&e&&s._UZ(0,"tr",45)}const Gs=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}},Xs=function(){return["no_peer"]};let $s=(()=>{class e{constructor(e,t,n,i,a){this.logger=e,this.store=t,this.rtlEffects=n,this.clEffects=i,this.commonService=a,this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=g.vn,this.flgLoading=[!0],this.selFilter="",this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","state","actions"]):this.screenSize===g.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","actions"]):this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchChannels"===e.action&&(this.flgLoading[0]="error")}),this.information=e.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=e.peers&&e.peers.length?e.peers.length:0,this.totalBalance=e.balance.totalBalance,this.channelsData=this.commonService.sortByKey(e.allChannels.filter(e=>!("CHANNELD_NORMAL"===e.state&&e.connected)),"state","string"),this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!e.allChannels),this.logger.info(e)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,t){this.store.dispatch(new se.wu({data:{channel:e,showCopy:!0,component:Mo}}))}onChannelClose(e){this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+e.channel_id,noBtnText:"Cancel",yesBtnText:"Force Close"}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[3])).subscribe(t=>{t&&(this.store.dispatch(new se.Fk("Force Closing Channel...")),this.store.dispatch(new x.e8({channelId:e.channel_id,force:!0})))})}loadChannelsTable(e){e.sort(function(e,t){return e.active===t.active?0:t.active?1:-1}),this.channels=new ae.by([...e]),this.channels.filterPredicate=(e,t)=>((e.connected?"connected":"disconnected")+(e.channel_id?e.channel_id.toLowerCase():"")+(e.short_channel_id?e.short_channel_id.toLowerCase():"")+(e.id?e.id.toLowerCase():"")+(e.alias?e.alias.toLowerCase():"")+(e.private?"private":"public")+(e.state?e.state.toLowerCase():"")+(e.funding_txid?e.funding_txid.toLowerCase():"")+(e.msatoshi_to_us?e.msatoshi_to_us:"")+(e.msatoshi_total?e.msatoshi_total:"")+(e.their_channel_reserve_satoshis?e.their_channel_reserve_satoshis:"")+(e.our_channel_reserve_satoshis?e.our_channel_reserve_satoshis:"")+(e.spendable_msatoshi?e.spendable_msatoshi:"")).includes(t),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(Ae.V),s.Y36(We.s),s.Y36(w.v))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-channel-pending-table"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Channels")}])],decls:42,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pr-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s._UZ(2,"div",2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"input",4),s.NdJ("keyup",function(){return t.applyFilter()})("ngModelChange",function(e){return t.selFilter=e}),s.qZA(),s.qZA(),s.qZA(),s.TgZ(5,"div",5),s.YNc(6,ws,1,0,"mat-progress-bar",6),s.TgZ(7,"table",7,8),s.ynx(9,9),s.YNc(10,Ts,2,0,"th",10),s.YNc(11,vs,2,1,"td",11),s.BQk(),s.ynx(12,12),s.YNc(13,bs,2,0,"th",10),s.YNc(14,qs,2,1,"td",11),s.BQk(),s.ynx(15,13),s.YNc(16,Cs,2,0,"th",10),s.YNc(17,_s,2,1,"td",11),s.BQk(),s.ynx(18,14),s.YNc(19,Ss,2,0,"th",10),s.YNc(20,Ls,2,1,"td",11),s.BQk(),s.ynx(21,15),s.YNc(22,Us,2,0,"th",10),s.YNc(23,Fs,2,1,"td",11),s.BQk(),s.ynx(24,16),s.YNc(25,ks,2,0,"th",17),s.YNc(26,Ns,4,3,"td",11),s.BQk(),s.ynx(27,18),s.YNc(28,Js,2,0,"th",17),s.YNc(29,Ds,4,3,"td",11),s.BQk(),s.ynx(30,19),s.YNc(31,Os,2,0,"th",17),s.YNc(32,Rs,4,3,"td",11),s.BQk(),s.ynx(33,20),s.YNc(34,Ms,6,0,"th",21),s.YNc(35,Qs,7,1,"td",22),s.BQk(),s.ynx(36,23),s.YNc(37,Es,3,2,"td",24),s.BQk(),s.YNc(38,Hs,1,3,"tr",25),s.YNc(39,Vs,1,0,"tr",26),s.YNc(40,zs,1,0,"tr",27),s.qZA(),s.qZA(),s._UZ(41,"mat-paginator",28),s.qZA()),2&e&&(s.xp6(4),s.Q6J("ngModel",t.selFilter),s.xp6(2),s.Q6J("ngIf",!0===t.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",t.channels)("ngClass",s.VKq(11,Gs,"error"===t.flgLoading[0])),s.xp6(31),s.Q6J("matFooterRowDef",s.DdM(13,Xs)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS))},directives:[l.xw,l.Wh,l.yH,D.KE,re.Nt,le.Fj,le.JJ,le.On,M.$V,i.O5,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ne.NW,r.pW,ae.ge,ie.nU,ae.ev,de.gD,de.$L,me.ey,ae.yh,ae.Q2,ae.XQ,ae.Gk],pipes:[i.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),e})();const Ks=["peersForm"],Ws=["stepper"];function js(e,t){if(1&e&&s._uU(0),2&e){const e=s.oxw();s.Oqu(e.peerFormLabel)}}function el(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Address is required."),s.qZA())}function tl(e,t){if(1&e&&(s.TgZ(0,"div",38),s._UZ(1,"fa-icon",39),s.TgZ(2,"span"),s._uU(3),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(2),s.Oqu(e.peerConnectionError)}}function nl(e,t){if(1&e&&s._uU(0),2&e){const e=s.oxw();s.Oqu(e.channelFormLabel)}}function il(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function al(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount must be a positive number."),s.qZA())}function ol(e,t){if(1&e&&(s.TgZ(0,"mat-error"),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function sl(e,t){if(1&e&&(s.TgZ(0,"mat-option",40),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.Q6J("value",e.feeRateId),s.xp6(1),s.hij(" ",e.feeRateType," ")}}function ll(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Min Confirmation Blocks is required."),s.qZA())}function rl(e,t){if(1&e&&(s.TgZ(0,"div",38),s._UZ(1,"fa-icon",39),s.TgZ(2,"span"),s._uU(3),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("icon",e.faExclamationTriangle),s.xp6(2),s.Oqu(e.channelConnectionError)}}let cl=(()=>{class e{constructor(e,t,n,i,a,o,s){this.dialogRef=e,this.data=t,this.store=n,this.clEffects=i,this.formBuilder=a,this.actions$=o,this.logger=s,this.faExclamationTriangle=f.eHv,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=g.vn,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new d.x,new d.x]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[le.kI.required]],peerAddress:[this.peerAddress,[le.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[le.kI.required,le.kI.min(1),le.kI.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],flgMinConf:[!1],minConfValue:[null],hiddenAmount:["",[le.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([le.kI.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.actions$.pipe((0,h.R)(this.unSubs[1]),(0,m.h)(e=>e.type===x.ab||e.type===x.GL||e.type===x.at)).subscribe(e=>{e.type===x.ab&&(this.logger.info(e.payload),this.flgEditable=!1,this.newlyAddedPeer=e.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),e.type===x.GL&&this.dialogRef.close(),e.type===x.at&&("SaveNewPeer"===e.payload.action?this.peerConnectionError=e.payload.message:"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch(new se.Fk("Adding Peer...")),this.store.dispatch(new x.rF({id:this.peerFormGroup.controls.peerAddress.value}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch(new se.Fk("Opening Channel...")),this.store.dispatch(new x.nb({peerId:this.newlyAddedPeer.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(e){switch(e.selectedIndex){case 0:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 1:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.id):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.id):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)";break;default:this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)"}e.selectedIndex<e.previouslySelectedIndex&&(0===e.selectedIndex?this.peerFormGroup.controls.hiddenAddress.setValue(""):1===e.selectedIndex&&this.channelFormGroup.controls.hiddenAmount.setValue(""))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(oe.so),s.Y36(oe.WI),s.Y36(y.yh),s.Y36(We.s),s.Y36(le.qu),s.Y36(A.eX),s.Y36(Z.mQ))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-connect-peer"]],viewQuery:function(e,t){if(1&e&&(s.Gf(Ks,5),s.Gf(Ws,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.form=e.first),s.iGM(e=s.CRH())&&(t.stepper=e.first)}},decls:55,vars:24,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","48","fxLayoutAlign","start end"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","name","flgMinConf","fxLayoutAlign","stretch start",1,"mr-2"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["mat-stroked-button","","color","primary","tabindex","8","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-stroked-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"div",1),s.TgZ(2,"mat-card-header",2),s.TgZ(3,"div",3),s.TgZ(4,"span",4),s._uU(5,"Connect to a new peer"),s.qZA(),s.qZA(),s.TgZ(6,"button",5),s.NdJ("click",function(){return t.onClose()}),s._uU(7,"X"),s.qZA(),s.qZA(),s.TgZ(8,"mat-card-content",6),s.TgZ(9,"div",7),s.TgZ(10,"mat-vertical-stepper",8,9),s.NdJ("selectionChange",function(e){return t.stepSelectionChanged(e)}),s.TgZ(12,"mat-step",10),s.TgZ(13,"form",11),s.YNc(14,js,1,1,"ng-template",12),s.TgZ(15,"mat-form-field",1),s._UZ(16,"input",13),s.YNc(17,el,2,0,"mat-error",14),s.qZA(),s.YNc(18,tl,4,2,"div",15),s.TgZ(19,"div",16),s.TgZ(20,"button",17),s.NdJ("click",function(){return t.onConnectPeer()}),s._uU(21),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(22,"mat-step",10),s.TgZ(23,"form",18),s.YNc(24,nl,1,1,"ng-template",19),s.TgZ(25,"div",20),s.TgZ(26,"div",21),s.TgZ(27,"mat-form-field",22),s._UZ(28,"input",23),s.TgZ(29,"mat-hint"),s._uU(30),s.qZA(),s.TgZ(31,"span",24),s._uU(32," Sats "),s.qZA(),s.YNc(33,il,2,0,"mat-error",14),s.YNc(34,al,2,0,"mat-error",14),s.YNc(35,ol,2,1,"mat-error",14),s.qZA(),s.TgZ(36,"div",25),s.TgZ(37,"mat-slide-toggle",26),s._uU(38,"Private Channel"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(39,"div",27),s.TgZ(40,"mat-form-field",28),s.TgZ(41,"mat-select",29),s.YNc(42,sl,2,2,"mat-option",30),s.qZA(),s.qZA(),s.TgZ(43,"div",31),s._UZ(44,"mat-checkbox",32),s.TgZ(45,"mat-form-field",33),s._UZ(46,"input",34),s.YNc(47,ll,2,0,"mat-error",14),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.YNc(48,rl,4,2,"div",15),s.TgZ(49,"div",16),s.TgZ(50,"button",35),s.NdJ("click",function(){return t.onOpenChannel()}),s._uU(51),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(52,"div",36),s.TgZ(53,"button",37),s._uU(54),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(10),s.Q6J("linear",!0),s.xp6(2),s.Q6J("stepControl",t.peerFormGroup)("editable",t.flgEditable),s.xp6(1),s.Q6J("formGroup",t.peerFormGroup),s.xp6(4),s.Q6J("ngIf",null==t.peerFormGroup.controls.peerAddress.errors?null:t.peerFormGroup.controls.peerAddress.errors.required),s.xp6(1),s.Q6J("ngIf",""!==t.peerConnectionError),s.xp6(3),s.Oqu(""!==t.peerConnectionError?"Retry":"Add Peer"),s.xp6(1),s.Q6J("stepControl",t.channelFormGroup)("editable",t.flgEditable),s.xp6(1),s.Q6J("formGroup",t.channelFormGroup),s.xp6(5),s.Q6J("step",1e3),s.xp6(2),s.hij("Remaining Bal: ",t.totalBalance-(t.channelFormGroup.controls.fundingAmount.value?t.channelFormGroup.controls.fundingAmount.value:0),""),s.xp6(3),s.Q6J("ngIf",null==t.channelFormGroup.controls.fundingAmount.errors?null:t.channelFormGroup.controls.fundingAmount.errors.required),s.xp6(1),s.Q6J("ngIf",null==t.channelFormGroup.controls.fundingAmount.errors?null:t.channelFormGroup.controls.fundingAmount.errors.min),s.xp6(1),s.Q6J("ngIf",null==t.channelFormGroup.controls.fundingAmount.errors?null:t.channelFormGroup.controls.fundingAmount.errors.max),s.xp6(7),s.Q6J("ngForOf",t.feeRateTypes),s.xp6(4),s.Q6J("step",1)("min",0)("required",t.channelFormGroup.controls.flgMinConf.value),s.xp6(1),s.Q6J("ngIf",t.channelFormGroup.controls.flgMinConf.value&&!t.channelFormGroup.controls.minConfValue.value),s.xp6(1),s.Q6J("ngIf",""!==t.channelConnectionError),s.xp6(3),s.Oqu(""!==t.channelConnectionError?"Retry":"Open Channel"),s.xp6(2),s.Q6J("mat-dialog-close",!1),s.xp6(1),s.Oqu(null!=t.newlyAddedPeer&&t.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[l.xw,l.yH,b.dk,l.Wh,C.lW,b.dn,In.Vq,In.C0,le._Y,le.JL,le.sg,In.VY,D.KE,re.Nt,le.Fj,ce.h,le.JJ,le.u,le.Q7,i.O5,le.wV,D.bx,D.R9,he.Rr,de.gD,i.sg,Yn.oG,le.qQ,ue.q,oe.ZT,D.TO,T.BN,me.ey],styles:[""]}),e})();function ul(e,t){1&e&&s._UZ(0,"mat-progress-bar",32)}function dl(e,t){1&e&&(s.TgZ(0,"th",33),s._uU(1," Alias "),s.qZA())}const hl=function(e){return{"mr-0":e}};function ml(e,t){if(1&e&&s._UZ(0,"span",37),2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,hl,e.screenSize===e.screenSizeEnum.XS))}}function pl(e,t){if(1&e&&s._UZ(0,"span",38),2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,hl,e.screenSize===e.screenSizeEnum.XS))}}const fl=function(e){return{"max-width":e}};function gl(e,t){if(1&e&&(s.TgZ(0,"td",34),s.YNc(1,ml,1,3,"span",35),s.YNc(2,pl,1,3,"span",36),s._uU(3),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.Q6J("ngStyle",s.VKq(4,fl,n.screenSize===n.screenSizeEnum.XS?"10rem":"40rem")),s.xp6(1),s.Q6J("ngIf",null==e?null:e.connected),s.xp6(1),s.Q6J("ngIf",!(null!=e&&e.connected)),s.xp6(1),s.hij(" ",null==e?null:e.alias," ")}}function xl(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1," ID "),s.qZA())}function Zl(e,t){if(1&e&&(s.TgZ(0,"td",40),s._uU(1),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.Q6J("ngStyle",s.VKq(2,fl,n.screenSize===n.screenSizeEnum.XS?"10rem":"40rem")),s.xp6(1),s.hij(" ",null==e?null:e.id," ")}}function yl(e,t){1&e&&(s.TgZ(0,"th",33),s._uU(1," Network Address "),s.qZA())}function Al(e,t){1&e&&(s.TgZ(0,"span"),s._uU(1,","),s._UZ(2,"br"),s.qZA())}function wl(e,t){if(1&e&&(s.TgZ(0,"span"),s._uU(1),s.YNc(2,Al,3,0,"span",42),s.qZA()),2&e){const e=t.$implicit,n=t.last;s.xp6(1),s.Oqu(e),s.xp6(1),s.Q6J("ngIf",!n)}}function Tl(e,t){if(1&e&&(s.TgZ(0,"td",34),s.YNc(1,wl,3,2,"span",41),s.qZA()),2&e){const e=t.$implicit,n=s.oxw();s.Q6J("ngStyle",s.VKq(2,fl,n.screenSize===n.screenSizeEnum.XS?"10rem":"20rem")),s.xp6(1),s.Q6J("ngForOf",null==e?null:e.netaddr)}}function vl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",43),s.TgZ(1,"div",44),s.TgZ(2,"mat-select",45),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",46),s.NdJ("click",function(){return s.CHM(e),s.oxw().onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function bl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-option",46),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().onPeerDetach(t)}),s._uU(1,"Disconnect"),s.qZA()}}function ql(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"mat-option",46),s.NdJ("click",function(){s.CHM(e);const t=s.oxw().$implicit;return s.oxw().onConnectPeer(t)}),s._uU(1,"Reconnect"),s.qZA()}}function Cl(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",47),s.TgZ(1,"div",48),s.TgZ(2,"mat-select",45),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",46),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw().onPeerClick(n,t)}),s._uU(5,"View Info"),s.qZA(),s.TgZ(6,"mat-option",46),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().onOpenChannel(t)}),s._uU(7,"Open Channel"),s.qZA(),s.YNc(8,bl,2,0,"mat-option",49),s.YNc(9,ql,2,0,"mat-option",49),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=t.$implicit;s.xp6(8),s.Q6J("ngIf",e.connected),s.xp6(1),s.Q6J("ngIf",!e.connected)}}function _l(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No connected peers."),s.qZA())}function Sl(e,t){if(1&e&&(s.TgZ(0,"td",50),s.YNc(1,_l,2,0,"p",42),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("ngIf",!(null!=e.peers&&e.peers.data)||(null==e.peers||null==e.peers.data?null:e.peers.data.length)<1)}}const Ll=function(e){return{"display-none":e}};function Ul(e,t){if(1&e&&s._UZ(0,"tr",51),2&e){const e=s.oxw();s.Q6J("ngClass",s.VKq(1,Ll,(null==e.peers?null:e.peers.data)&&(null==e.peers||null==e.peers.data?null:e.peers.data.length)>0))}}function Fl(e,t){1&e&&s._UZ(0,"tr",52)}function kl(e,t){if(1&e&&s._UZ(0,"tr",53),2&e){const e=t.$implicit,n=s.oxw();s.Q6J("@newlyAddedRowAnimation",e.pub_key===n.newlyAddedPeer&&n.flgAnimate?"added":"notAdded")}}const Nl=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}},Jl=function(){return["no_peer"]};let Dl=(()=>{class e{constructor(e,t,n,i,a,o){this.logger=e,this.store=t,this.rtlEffects=n,this.clEffects=i,this.actions$=a,this.commonService=o,this.faUsers=f.FVb,this.newlyAddedPeer="",this.flgAnimate=!0,this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgLoading=[!0],this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===g.cu.SM||this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","id","netaddr","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","id","netaddr","actions"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{e.effectErrors.forEach(e=>{"FetchPeers"===e.action&&(this.flgLoading[0]="error")}),this.information=e.information,this.availableBalance=e.balance.totalBalance||0,this.peersData=e.peers?e.peers:[],this.peersData.length>0&&this.loadPeersTable(this.peersData),"error"!==this.flgLoading[0]&&(this.flgLoading[0]=!1),this.logger.info(e)}),this.actions$.pipe((0,h.R)(this.unSubs[1]),(0,m.h)(e=>e.type===x.sX)).subscribe(e=>{this.peerAddress=void 0,this.flgAnimate=!0})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(e,t){this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:e.id,message:[[{key:"id",value:e.id,title:"Public Key",width:100}],[{key:"netaddr",value:e.netaddr,title:"Address",width:100}],[{key:"alias",value:e.alias,title:"Alias",width:50},{key:"connected",value:e.connected?"True":"False",title:"Connected",width:50}]]}}))}onConnectPeer(e){this.store.dispatch(new se.wu({data:{message:{peer:e.id?e:null,information:this.information,balance:this.availableBalance},component:cl}}))}onOpenChannel(e){this.store.dispatch(new se.wu({data:{alertTitle:"Open Channel",message:{peer:e,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:_o}}))}onPeerDetach(e){this.store.dispatch(new se.b_({data:{type:g.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(e.alias?e.alias:e.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[3])).subscribe(t=>{t&&(this.store.dispatch(new se.Fk("Disconnecting Peer...")),this.store.dispatch(new x.yw({id:e.id,force:!1})))})}applyFilter(e){this.peers.filter=e.value.trim().toLowerCase()}loadPeersTable(e){this.peers=new ae.by([...e]),this.peers.sortingDataAccessor=(e,t)=>{switch(t){case"netaddr":if(e.netaddr&&e.netaddr[0]){let t=e.netaddr[0].toString().split(".");return t[0]?+t[0]:e.netaddr[0]}return"";default:return e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null}},this.peers.sort=this.sort,this.peers.filterPredicate=(e,t)=>JSON.stringify(e).toLowerCase().includes(t),this.peers.paginator=this.paginator}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(y.yh),s.Y36(Ae.V),s.Y36(We.s),s.Y36(A.eX),s.Y36(w.v))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-peers"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Peers")}])],decls:36,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","id"],["mat-header-cell","","class","px-3","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","netaddr"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"form",1,2),s.TgZ(3,"button",3),s.NdJ("click",function(){return t.onConnectPeer({})}),s._uU(4,"Add Peer"),s.qZA(),s.qZA(),s.TgZ(5,"div",4),s.TgZ(6,"div",5),s.TgZ(7,"div",6),s._UZ(8,"fa-icon",7),s.TgZ(9,"span",8),s._uU(10,"Connected Peers"),s.qZA(),s.qZA(),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"div",10),s.TgZ(13,"input",11),s.NdJ("keyup",function(e){return t.applyFilter(e.target)}),s.qZA(),s.qZA(),s.qZA(),s.qZA(),s.TgZ(14,"div",12),s.YNc(15,ul,1,0,"mat-progress-bar",13),s.TgZ(16,"table",14,15),s.ynx(18,16),s.YNc(19,dl,2,0,"th",17),s.YNc(20,gl,4,6,"td",18),s.BQk(),s.ynx(21,19),s.YNc(22,xl,2,0,"th",20),s.YNc(23,Zl,2,4,"td",21),s.BQk(),s.ynx(24,22),s.YNc(25,yl,2,0,"th",17),s.YNc(26,Tl,2,4,"td",18),s.BQk(),s.ynx(27,23),s.YNc(28,vl,6,0,"th",24),s.YNc(29,Cl,10,2,"td",25),s.BQk(),s.ynx(30,26),s.YNc(31,Sl,2,1,"td",27),s.BQk(),s.YNc(32,Ul,1,3,"tr",28),s.YNc(33,Fl,1,0,"tr",29),s.YNc(34,kl,1,1,"tr",30),s.qZA(),s.qZA(),s._UZ(35,"mat-paginator",31),s.qZA(),s.qZA()),2&e&&(s.xp6(8),s.Q6J("icon",t.faUsers),s.xp6(7),s.Q6J("ngIf",!0===t.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",t.peers)("ngClass",s.VKq(11,Nl,"error"===t.flgLoading[0])),s.xp6(16),s.Q6J("matFooterRowDef",s.DdM(13,Jl)),s.xp6(1),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS))},directives:[l.xw,l.yH,l.Wh,le._Y,le.JL,le.F,C.lW,T.BN,D.KE,re.Nt,M.$V,i.O5,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ne.NW,r.pW,ae.ge,ie.nU,ae.ev,i.PC,S.Zl,O.gM,i.sg,de.gD,de.$L,me.ey,ae.yh,ae.Q2,ae.XQ,ae.Gk],styles:[".mat-column-alias[_ngcontent-%COMP%], .mat-column-id[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-id[_ngcontent-%COMP%]{padding-left:2rem}.mat-column-netaddr[_ngcontent-%COMP%]{flex:1 1 25%;width:25%}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"],data:{animation:[ye.Q]}}),e})();const Ol=["queryRoutesForm"];function Rl(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Destination pubkey is required."),s.qZA())}function Ml(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Amount is required."),s.qZA())}function Yl(e,t){1&e&&s._UZ(0,"mat-progress-bar",38)}function Ql(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1," ID "),s.qZA())}function Il(e,t){if(1&e&&(s.TgZ(0,"td",40),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.id," ")}}function Pl(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1," Alias "),s.qZA())}function El(e,t){if(1&e&&(s.TgZ(0,"td",40),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.alias," ")}}function Bl(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1," Channel "),s.qZA())}function Hl(e,t){if(1&e&&(s.TgZ(0,"td",40),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.channel," ")}}function Vl(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1," Direction "),s.qZA())}function zl(e,t){if(1&e&&(s.TgZ(0,"td",40),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.direction," ")}}function Gl(e,t){1&e&&(s.TgZ(0,"th",41),s._uU(1," Delay "),s.qZA())}function Xl(e,t){if(1&e&&(s.TgZ(0,"td",40),s.TgZ(1,"span",42),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,null==e?null:e.delay)," ")}}function $l(e,t){1&e&&(s.TgZ(0,"th",41),s._uU(1," Amount (Sats) "),s.qZA())}function Kl(e,t){if(1&e&&(s.TgZ(0,"td",40),s.TgZ(1,"span",42),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij(" ",s.lcZ(3,1,(null==e?null:e.msatoshi)/1e3)," ")}}function Wl(e,t){1&e&&(s.TgZ(0,"th",43),s._uU(1," Amount mSat "),s.qZA())}function jl(e,t){if(1&e&&(s.TgZ(0,"td",44),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.hij(" ",null==e?null:e.amount_msat," ")}}function er(e,t){1&e&&(s.TgZ(0,"th",45),s.TgZ(1,"span",42),s._uU(2,"Actions"),s.qZA(),s.qZA())}function tr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",44),s.TgZ(1,"button",46),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw().onHopClick(n,t)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function nr(e,t){1&e&&s._UZ(0,"tr",47)}function ir(e,t){1&e&&s._UZ(0,"tr",48)}const ar=function(e){return{"overflow-auto error-border":e,"overflow-auto":!0}};let or=(()=>{class e{constructor(e,t,n){this.store=e,this.clEffects=t,this.commonService=n,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=f.FpQ,this.faExclamationTriangle=f.eHv,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi","actions"]):this.screenSize===g.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","direction","msatoshi","actions"]):this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","direction","delay","msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","channel","direction","delay","msatoshi","actions"])}ngOnInit(){this.clEffects.setQueryRoutesCL.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.qrHops=new ae.by([]),this.qrHops.data=[],e.routes?(this.flgLoading[0]=!1,this.qrHops=new ae.by([...e.routes]),this.qrHops.data=e.routes):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch(new x.bm({destPubkey:this.destinationPubkey,amount:1e3*this.amount}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(e,t){this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:e.id,title:"ID",width:100,type:g.Gi.STRING}],[{key:"channel",value:e.channel,title:"Channel",width:50,type:g.Gi.STRING},{key:"alias",value:e.alias,title:"Peer Alias",width:50,type:g.Gi.STRING}],[{key:"msatoshi",value:e.msatoshi,title:"mSatoshi",width:50,type:g.Gi.NUMBER},{key:"amount_msat",value:e.amount_msat,title:"Amount mSat",width:50,type:g.Gi.STRING}],[{key:"direction",value:e.direction,title:"Direction",width:50,type:g.Gi.STRING},{key:"delay",value:e.delay,title:"Delay",width:50,type:g.Gi.NUMBER}]]}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(y.yh),s.Y36(We.s),s.Y36(w.v))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-query-routes"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(Ol,7)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.form=e.first)}},decls:54,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Pubkey","name","destinationPubkey","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","amount_msat"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",0),s.TgZ(1,"form",1,2),s.NdJ("ngSubmit",function(){return s.CHM(e),s.MAs(2).form.valid&&t.onQueryRoutes()}),s.TgZ(3,"div",3),s._UZ(4,"fa-icon",4),s.TgZ(5,"span"),s._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),s.qZA(),s.qZA(),s.TgZ(7,"mat-form-field",5),s.TgZ(8,"input",6,7),s.NdJ("ngModelChange",function(e){return t.destinationPubkey=e}),s.qZA(),s.YNc(10,Rl,2,0,"mat-error",8),s.qZA(),s.TgZ(11,"mat-form-field",9),s.TgZ(12,"input",10),s.NdJ("ngModelChange",function(e){return t.amount=e}),s.qZA(),s.YNc(13,Ml,2,0,"mat-error",8),s.qZA(),s.TgZ(14,"div",11),s.TgZ(15,"button",12),s.NdJ("click",function(){return t.resetData()}),s._uU(16,"Clear"),s.qZA(),s.TgZ(17,"button",13),s._uU(18,"Query Route"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(19,"div",14),s.TgZ(20,"div",15),s._UZ(21,"fa-icon",16),s.TgZ(22,"span",17),s._uU(23,"Transaction Route"),s.qZA(),s.qZA(),s.qZA(),s.TgZ(24,"div",18),s.YNc(25,Yl,1,0,"mat-progress-bar",19),s.TgZ(26,"table",20,21),s.ynx(28,22),s.YNc(29,Ql,2,0,"th",23),s.YNc(30,Il,2,1,"td",24),s.BQk(),s.ynx(31,25),s.YNc(32,Pl,2,0,"th",23),s.YNc(33,El,2,1,"td",24),s.BQk(),s.ynx(34,26),s.YNc(35,Bl,2,0,"th",23),s.YNc(36,Hl,2,1,"td",24),s.BQk(),s.ynx(37,27),s.YNc(38,Vl,2,0,"th",23),s.YNc(39,zl,2,1,"td",24),s.BQk(),s.ynx(40,28),s.YNc(41,Gl,2,0,"th",29),s.YNc(42,Xl,4,3,"td",24),s.BQk(),s.ynx(43,30),s.YNc(44,$l,2,0,"th",29),s.YNc(45,Kl,4,3,"td",24),s.BQk(),s.ynx(46,31),s.YNc(47,Wl,2,0,"th",32),s.YNc(48,jl,2,1,"td",33),s.BQk(),s.ynx(49,34),s.YNc(50,er,3,0,"th",35),s.YNc(51,tr,3,0,"td",33),s.BQk(),s.YNc(52,nr,1,0,"tr",36),s.YNc(53,ir,1,0,"tr",37),s.qZA(),s.qZA(),s.qZA()}2&e&&(s.xp6(4),s.Q6J("icon",t.faExclamationTriangle),s.xp6(4),s.Q6J("ngModel",t.destinationPubkey),s.xp6(2),s.Q6J("ngIf",!t.destinationPubkey),s.xp6(2),s.Q6J("ngModel",t.amount)("step",1e3)("min",0),s.xp6(1),s.Q6J("ngIf",!t.amount),s.xp6(8),s.Q6J("icon",t.faRoute),s.xp6(4),s.Q6J("ngIf",!0===t.flgLoading[0]),s.xp6(1),s.Q6J("dataSource",t.qrHops)("ngClass",s.VKq(14,ar,"error"===t.flgLoading[0])),s.xp6(26),s.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",t.displayedColumns))},directives:[l.xw,l.yH,le._Y,le.JL,le.F,l.Wh,T.BN,D.KE,re.Nt,le.Fj,le.Q7,le.JJ,le.On,i.O5,le.wV,le.qQ,ue.q,C.lW,M.$V,ae.BZ,ie.YE,i.mk,S.oO,ae.w1,ae.fO,ae.Dz,ae.as,ae.nj,D.TO,r.pW,ae.ge,ie.nU,ae.ev,ae.XQ,ae.Gk],pipes:[i.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),e})();var sr=n(3556);function lr(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Message is required."),s.qZA())}let rr=(()=>{class e{constructor(e,t,n){this.dataService=e,this.snackBar=t,this.logger=n,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new d.x,new d.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.signedMessage=this.message,this.signature=e.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(e){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+e)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(sr.D),s.Y36(Mn.ux),s.Y36(Z.mQ))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"form",1,2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"textarea",4),s.NdJ("ngModelChange",function(e){return t.message=e})("keyup",function(){return t.onMessageChange()}),s.qZA(),s.YNc(5,lr,2,0,"mat-error",5),s.qZA(),s.TgZ(6,"div",6),s.TgZ(7,"button",7),s.NdJ("click",function(){return t.resetData()}),s._uU(8,"Clear Field"),s.qZA(),s.TgZ(9,"button",8),s.NdJ("click",function(){return t.onSign()}),s._uU(10,"Sign"),s.qZA(),s.qZA(),s._UZ(11,"mat-divider",9),s.TgZ(12,"div",10),s.TgZ(13,"p"),s._uU(14,"Generated Signature"),s.qZA(),s.qZA(),s.TgZ(15,"div",11),s._uU(16),s.qZA(),s.TgZ(17,"div",12),s.TgZ(18,"button",13),s.NdJ("copied",function(e){return t.onCopyField(e)}),s._uU(19,"Copy Signature"),s.qZA(),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(4),s.Q6J("ngModel",t.message),s.xp6(1),s.Q6J("ngIf",!t.message),s.xp6(6),s.Q6J("inset",!0),s.xp6(5),s.Oqu(t.signature),s.xp6(2),s.Q6J("payload",t.signature))},directives:[l.xw,l.yH,l.Wh,le._Y,le.JL,le.F,D.KE,re.Nt,le.Fj,ce.h,le.Q7,le.JJ,le.On,i.O5,C.lW,R.d,aa.y,D.TO],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),e})();function cr(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Message is required."),s.qZA())}function ur(e,t){1&e&&(s.TgZ(0,"mat-error"),s._uU(1,"Signature is required."),s.qZA())}function dr(e,t){1&e&&(s.TgZ(0,"p",13),s.TgZ(1,"mat-icon",14),s._uU(2,"close"),s.qZA(),s._uU(3,"Verification failed, please double check message and signature"),s.qZA())}function hr(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"Pubkey Used"),s.qZA())}function mr(e,t){if(1&e&&(s.TgZ(0,"div",20),s.TgZ(1,"p"),s._uU(2),s.qZA(),s.qZA()),2&e){const e=s.oxw(2);s.xp6(2),s.Oqu(null==e.verifyRes?null:e.verifyRes.pubkey)}}function pr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",21),s.TgZ(1,"button",22),s.NdJ("copied",function(t){return s.CHM(e),s.oxw(2).onCopyField(t)}),s._uU(2,"Copy Pubkey"),s.qZA(),s.qZA()}if(2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("payload",null==e.verifyRes?null:e.verifyRes.pubkey)}}function fr(e,t){if(1&e&&(s.TgZ(0,"div",15),s._UZ(1,"mat-divider",16),s.TgZ(2,"div",17),s.YNc(3,hr,2,0,"p",5),s.qZA(),s.YNc(4,mr,3,1,"div",18),s.YNc(5,pr,3,1,"div",19),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("inset",!0),s.xp6(2),s.Q6J("ngIf",e.verifyRes.verified),s.xp6(1),s.Q6J("ngIf",e.verifyRes.verified),s.xp6(1),s.Q6J("ngIf",e.verifyRes.verified)}}let gr=(()=>{class e{constructor(e,t,n){this.dataService=e,this.snackBar=t,this.logger=n,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new d.x,new d.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.verifyRes=e,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){this.verifiedMessage===this.message&&this.verifiedSignature===this.signature||(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(e){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+e)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(sr.D),s.Y36(Mn.ux),s.Y36(Z.mQ))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"form",1,2),s.TgZ(3,"mat-form-field",3),s.TgZ(4,"textarea",4),s.NdJ("ngModelChange",function(e){return t.message=e})("keyup",function(){return t.onChange()}),s.qZA(),s.YNc(5,cr,2,0,"mat-error",5),s.qZA(),s.TgZ(6,"mat-form-field",3),s.TgZ(7,"input",6,7),s.NdJ("ngModelChange",function(e){return t.signature=e})("keyup",function(){return t.onChange()}),s.qZA(),s.YNc(9,ur,2,0,"mat-error",5),s.qZA(),s.YNc(10,dr,4,0,"p",8),s.TgZ(11,"div",9),s.TgZ(12,"button",10),s.NdJ("click",function(){return t.resetData()}),s._uU(13,"Clear Fields"),s.qZA(),s.TgZ(14,"button",11),s.NdJ("click",function(){return t.onVerify()}),s._uU(15,"Verify"),s.qZA(),s.qZA(),s.YNc(16,fr,6,4,"div",12),s.qZA(),s.qZA()),2&e&&(s.xp6(4),s.Q6J("ngModel",t.message),s.xp6(1),s.Q6J("ngIf",!t.message),s.xp6(2),s.Q6J("ngModel",t.signature),s.xp6(2),s.Q6J("ngIf",!t.signature),s.xp6(1),s.Q6J("ngIf",t.showVerifyStatus&&!t.verifyRes.verified),s.xp6(6),s.Q6J("ngIf",t.showVerifyStatus&&t.verifyRes.verified))},directives:[l.xw,l.yH,l.Wh,le._Y,le.JL,le.F,D.KE,re.Nt,le.Fj,ce.h,le.Q7,le.JJ,le.On,i.O5,C.lW,D.TO,_.Hw,R.d,aa.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),e})();function xr(e,t){if(1&e&&(s.TgZ(0,"div",5),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Oqu(e.errorMessage)}}function Zr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",6),s._UZ(1,"div",7),s.TgZ(2,"mat-form-field",8),s.TgZ(3,"input",9),s.NdJ("ngModelChange",function(t){return s.CHM(e),s.oxw().filterValue=t})("input",function(){return s.CHM(e),s.oxw().applyFilter()})("keyup",function(){return s.CHM(e),s.oxw().applyFilter()}),s.qZA(),s.qZA(),s.qZA()}if(2&e){const e=s.oxw();s.xp6(3),s.Q6J("ngModel",e.filterValue)}}function yr(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Status"),s.qZA())}function Ar(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(null==e?null:e.status)}}function wr(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Received Time"),s.qZA())}function Tr(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.ALo(2,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,1e3*(null==e?null:e.received_time),"dd/MMM/YYYY HH:mm"))}}function vr(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Resolved Time"),s.qZA())}function br(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.ALo(2,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,1e3*(null==e?null:e.resolved_time),"dd/MMM/YYYY HH:mm"))}}function qr(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"In Channel"),s.qZA())}function Cr(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu((null==e?null:e.in_channel_alias)||(null==e?null:e.in_channel))}}function _r(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Out Channel"),s.qZA())}function Sr(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu((null==e?null:e.out_channel_alias)||(null==e?null:e.out_channel))}}function Lr(e,t){1&e&&(s.TgZ(0,"th",37),s._uU(1,"Amount In (Sats)"),s.qZA())}function Ur(e,t){if(1&e&&(s.TgZ(0,"td",36),s.TgZ(1,"span",38),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,1,(null==e?null:e.in_msatoshi)/1e3,(null==e?null:e.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Fr(e,t){1&e&&(s.TgZ(0,"th",37),s._uU(1,"Amount Out (Sats)"),s.qZA())}function kr(e,t){if(1&e&&(s.TgZ(0,"td",36),s.TgZ(1,"span",38),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,1,(null==e?null:e.out_msatoshi)/1e3,(null==e?null:e.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Nr(e,t){1&e&&(s.TgZ(0,"th",37),s._uU(1,"Fee (mSat)"),s.qZA())}function Jr(e,t){if(1&e&&(s.TgZ(0,"td",36),s.TgZ(1,"span",38),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,null==e?null:e.fee))}}function Dr(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1,"Payment Hash"),s.qZA())}function Or(e,t){if(1&e&&(s.TgZ(0,"td",40),s.TgZ(1,"div"),s._uU(2),s.ALo(3,"slice"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij("",s.Dn7(3,1,null==e?null:e.payment_hash,0,10),"...")}}function Rr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",41),s.TgZ(1,"div",42),s.TgZ(2,"mat-select",43),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",44),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function Mr(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",45),s.TgZ(1,"button",46),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw(2).onForwardingEventClick(n,t)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function Yr(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No forwarding event available."),s.qZA())}function Qr(e,t){if(1&e&&(s.TgZ(0,"td",47),s.YNc(1,Yr,2,0,"p",48),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)}}const Ir=function(e){return{"display-none":e}};function Pr(e,t){if(1&e&&s._UZ(0,"tr",49),2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,Ir,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function Er(e,t){1&e&&s._UZ(0,"tr",50)}function Br(e,t){1&e&&s._UZ(0,"tr",51)}const Hr=function(){return["no_event"]};function Vr(e,t){if(1&e&&(s.TgZ(0,"div",10),s.TgZ(1,"table",11,12),s.ynx(3,13),s.YNc(4,yr,2,0,"th",14),s.YNc(5,Ar,2,1,"td",15),s.BQk(),s.ynx(6,16),s.YNc(7,wr,2,0,"th",14),s.YNc(8,Tr,3,4,"td",15),s.BQk(),s.ynx(9,17),s.YNc(10,vr,2,0,"th",14),s.YNc(11,br,3,4,"td",15),s.BQk(),s.ynx(12,18),s.YNc(13,qr,2,0,"th",14),s.YNc(14,Cr,2,1,"td",15),s.BQk(),s.ynx(15,19),s.YNc(16,_r,2,0,"th",14),s.YNc(17,Sr,2,1,"td",15),s.BQk(),s.ynx(18,20),s.YNc(19,Lr,2,0,"th",21),s.YNc(20,Ur,4,4,"td",15),s.BQk(),s.ynx(21,22),s.YNc(22,Fr,2,0,"th",21),s.YNc(23,kr,4,4,"td",15),s.BQk(),s.ynx(24,23),s.YNc(25,Nr,2,0,"th",21),s.YNc(26,Jr,4,3,"td",15),s.BQk(),s.ynx(27,24),s.YNc(28,Dr,2,0,"th",25),s.YNc(29,Or,4,5,"td",26),s.BQk(),s.ynx(30,27),s.YNc(31,Rr,6,0,"th",28),s.YNc(32,Mr,3,0,"td",29),s.BQk(),s.ynx(33,30),s.YNc(34,Qr,2,1,"td",31),s.BQk(),s.YNc(35,Pr,1,3,"tr",32),s.YNc(36,Er,1,0,"tr",33),s.YNc(37,Br,1,0,"tr",34),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("dataSource",e.forwardingHistoryEvents),s.xp6(34),s.Q6J("matFooterRowDef",s.DdM(5,Hr)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns)}}const zr=function(e){return{"error-border":e,"padding-gap-x":!0}};let Gr=(()=>{class e{constructor(e,t,n,i){this.logger=e,this.commonService=t,this.store=n,this.datePipe=i,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["in_msatoshi","out_msatoshi","actions"]):this.screenSize===g.cu.SM||this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.eventsData.length<=0&&(this.errorMessage="",e.effectErrors.forEach(e=>{"GetForwardingHistory"===e.action&&(this.errorMessage="object"==typeof e.message?JSON.stringify(e.message):e.message)}),this.successfulEvents=e.forwardingHistory&&e.forwardingHistory.forwarding_events&&e.forwardingHistory.forwarding_events.length>0?this.filterSuccessfulEvents(e.forwardingHistory.forwarding_events):[],this.loadForwardingEventsTable(this.successfulEvents),this.logger.info(e))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents)}ngOnChanges(e){e.eventsData&&(this.eventsData=e.eventsData.currentValue,this.successfulEvents=this.eventsData,e.eventsData.firstChange||this.loadForwardingEventsTable(this.successfulEvents)),e.filterValue&&!e.filterValue.firstChange&&this.applyFilter()}filterSuccessfulEvents(e){return e.filter(e=>"settled"===e.status)}onForwardingEventClick(e,t){this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:e.payment_hash,title:"Payment Hash",width:100,type:g.Gi.STRING}],[{key:"received_time",value:e.received_time,title:"Received Time",width:50,type:g.Gi.DATE_TIME},{key:"resolved_time",value:e.resolved_time,title:"Resolved Time",width:50,type:g.Gi.DATE_TIME}],[{key:"in_channel",value:e.in_channel_alias?e.in_channel_alias:e.in_channel,title:"Inbound Channel",width:50,type:g.Gi.STRING},{key:"out_channel",value:e.out_channel_alias?e.out_channel_alias:e.out_channel,title:"Outbound Channel",width:50,type:g.Gi.STRING}],[{key:"status",value:"settled"===e.status?"Settled":"Failed",title:"Status",width:50,type:g.Gi.STRING},{key:"fee",value:e.fee,title:"Fee (mSats)",width:50,type:g.Gi.NUMBER}],[{key:"in_msatoshi",value:e.in_msatoshi,title:"In (mSats)",width:50,type:g.Gi.NUMBER},{key:"out_msatoshi",value:e.out_msatoshi,title:"Out (mSats)",width:50,type:g.Gi.NUMBER}]]}}))}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new ae.by([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.forwardingHistoryEvents.filterPredicate=(e,t)=>((e.received_time?this.datePipe.transform(new Date(1e3*e.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(e.resolved_time?this.datePipe.transform(new Date(1e3*e.resolved_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(e.in_channel?e.in_channel.toLowerCase():"")+(e.out_channel?e.out_channel.toLowerCase():"")+(e.in_msatoshi?e.in_msatoshi/1e3:"")+(e.out_msatoshi?e.out_msatoshi/1e3:"")+(e.fee?e.fee:"")).includes(t),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(i.uU))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-forwarding-history"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Events")}]),s.TTD],decls:5,vars:9,consts:[["fxLayout","column","fxLayoutAlign","start stretch",3,"ngClass"],["class","p-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[1,"p-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","payment_hash"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,xr,2,1,"div",1),s.YNc(2,Zr,4,1,"div",2),s.YNc(3,Vr,38,6,"div",3),s._UZ(4,"mat-paginator",4),s.qZA()),2&e&&(s.Q6J("ngClass",s.VKq(7,zr,""!==t.errorMessage)),s.xp6(1),s.Q6J("ngIf",""!==t.errorMessage),s.xp6(1),s.Q6J("ngIf",""===t.errorMessage),s.xp6(1),s.Q6J("ngIf",""===t.errorMessage),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS))},directives:[l.xw,l.Wh,i.mk,S.oO,i.O5,ne.NW,l.yH,D.KE,re.Nt,le.Fj,le.JJ,le.On,M.$V,ae.BZ,ie.YE,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ae.ge,ie.nU,ae.ev,de.gD,de.$L,me.ey,C.lW,ae.yh,ae.Q2,ae.XQ,ae.Gk],pipes:[i.uU,i.JJ,i.OU],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),e})();function Xr(e,t){if(1&e&&(s.TgZ(0,"div",5),s._uU(1),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Oqu(e.errorMessage)}}function $r(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",6),s._UZ(1,"div",7),s.TgZ(2,"mat-form-field",8),s.TgZ(3,"input",9),s.NdJ("keyup",function(t){return s.CHM(e),s.oxw().applyFilter(t.target)}),s.qZA(),s.qZA(),s.qZA()}}function Kr(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Status"),s.qZA())}function Wr(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.ALo(2,"titlecase"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(s.lcZ(2,1,null==e?null:e.status))}}function jr(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Received Time"),s.qZA())}function ec(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.ALo(2,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,1e3*(null==e?null:e.received_time),"dd/MMM/YYYY HH:mm"))}}function tc(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Resolved Time"),s.qZA())}function nc(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.ALo(2,"date"),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu(s.xi3(2,1,1e3*(null==e?null:e.resolved_time),"dd/MMM/YYYY HH:mm"))}}function ic(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"In Channel"),s.qZA())}function ac(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu((null==e?null:e.in_channel_alias)||(null==e?null:e.in_channel))}}function oc(e,t){1&e&&(s.TgZ(0,"th",35),s._uU(1,"Out Channel"),s.qZA())}function sc(e,t){if(1&e&&(s.TgZ(0,"td",36),s._uU(1),s.qZA()),2&e){const e=t.$implicit;s.xp6(1),s.Oqu((null==e?null:e.out_channel_alias)||(null==e?null:e.out_channel))}}function lc(e,t){1&e&&(s.TgZ(0,"th",37),s._uU(1,"Amount In (Sats)"),s.qZA())}function rc(e,t){if(1&e&&(s.TgZ(0,"td",36),s.TgZ(1,"span",38),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,1,(null==e?null:e.in_msatoshi)/1e3,(null==e?null:e.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function cc(e,t){1&e&&(s.TgZ(0,"th",37),s._uU(1,"Amount Out (Sats)"),s.qZA())}function uc(e,t){if(1&e&&(s.TgZ(0,"td",36),s.TgZ(1,"span",38),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.xi3(3,1,(null==e?null:e.out_msatoshi)/1e3,(null==e?null:e.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function dc(e,t){1&e&&(s.TgZ(0,"th",37),s._uU(1,"Fee mSat"),s.qZA())}function hc(e,t){if(1&e&&(s.TgZ(0,"td",36),s.TgZ(1,"span",38),s._uU(2),s.ALo(3,"number"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.Oqu(s.lcZ(3,1,null==e?null:e.fee))}}function mc(e,t){1&e&&(s.TgZ(0,"th",39),s._uU(1,"Payment Hash"),s.qZA())}function pc(e,t){if(1&e&&(s.TgZ(0,"td",40),s.TgZ(1,"div"),s._uU(2),s.ALo(3,"slice"),s.qZA(),s.qZA()),2&e){const e=t.$implicit;s.xp6(2),s.hij("",s.Dn7(3,1,null==e?null:e.payment_hash,0,10),"...")}}function fc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"th",41),s.TgZ(1,"div",42),s.TgZ(2,"mat-select",43),s._UZ(3,"mat-select-trigger"),s.TgZ(4,"mat-option",44),s.NdJ("click",function(){return s.CHM(e),s.oxw(2).onDownloadCSV()}),s._uU(5,"Download CSV"),s.qZA(),s.qZA(),s.qZA(),s.qZA()}}function gc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"td",45),s.TgZ(1,"button",46),s.NdJ("click",function(t){const n=s.CHM(e).$implicit;return s.oxw(2).onForwardingEventClick(n,t)}),s._uU(2,"View Info"),s.qZA(),s.qZA()}}function xc(e,t){1&e&&(s.TgZ(0,"p"),s._uU(1,"No forwarding event available."),s.qZA())}function Zc(e,t){if(1&e&&(s.TgZ(0,"td",47),s.YNc(1,xc,2,0,"p",48),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.Q6J("ngIf",!(null!=e.forwardingHistoryEvents&&e.forwardingHistoryEvents.data)||(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)<1)}}const yc=function(e){return{"display-none":e}};function Ac(e,t){if(1&e&&s._UZ(0,"tr",49),2&e){const e=s.oxw(2);s.Q6J("ngClass",s.VKq(1,yc,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function wc(e,t){1&e&&s._UZ(0,"tr",50)}function Tc(e,t){1&e&&s._UZ(0,"tr",51)}const vc=function(){return["no_event"]};function bc(e,t){if(1&e&&(s.TgZ(0,"div",10),s.TgZ(1,"table",11,12),s.ynx(3,13),s.YNc(4,Kr,2,0,"th",14),s.YNc(5,Wr,3,3,"td",15),s.BQk(),s.ynx(6,16),s.YNc(7,jr,2,0,"th",14),s.YNc(8,ec,3,4,"td",15),s.BQk(),s.ynx(9,17),s.YNc(10,tc,2,0,"th",14),s.YNc(11,nc,3,4,"td",15),s.BQk(),s.ynx(12,18),s.YNc(13,ic,2,0,"th",14),s.YNc(14,ac,2,1,"td",15),s.BQk(),s.ynx(15,19),s.YNc(16,oc,2,0,"th",14),s.YNc(17,sc,2,1,"td",15),s.BQk(),s.ynx(18,20),s.YNc(19,lc,2,0,"th",21),s.YNc(20,rc,4,4,"td",15),s.BQk(),s.ynx(21,22),s.YNc(22,cc,2,0,"th",21),s.YNc(23,uc,4,4,"td",15),s.BQk(),s.ynx(24,23),s.YNc(25,dc,2,0,"th",21),s.YNc(26,hc,4,3,"td",15),s.BQk(),s.ynx(27,24),s.YNc(28,mc,2,0,"th",25),s.YNc(29,pc,4,5,"td",26),s.BQk(),s.ynx(30,27),s.YNc(31,fc,6,0,"th",28),s.YNc(32,gc,3,0,"td",29),s.BQk(),s.ynx(33,30),s.YNc(34,Zc,2,1,"td",31),s.BQk(),s.YNc(35,Ac,1,3,"tr",32),s.YNc(36,wc,1,0,"tr",33),s.YNc(37,Tc,1,0,"tr",34),s.qZA(),s.qZA()),2&e){const e=s.oxw();s.xp6(1),s.Q6J("dataSource",e.forwardingHistoryEvents),s.xp6(34),s.Q6J("matFooterRowDef",s.DdM(5,vc)),s.xp6(1),s.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),s.xp6(1),s.Q6J("matRowDefColumns",e.displayedColumns)}}const qc=function(e){return{"error-border":e,"padding-gap-x":!0}};let Cc=(()=>{class e{constructor(e,t,n,i){this.logger=e,this.commonService=t,this.store=n,this.datePipe=i,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=g.IV,this.pageSizeOptions=g.TJ,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===g.cu.XS?(this.flgSticky=!1,this.displayedColumns=["status","in_msatoshi","out_msatoshi","actions"]):this.screenSize===g.cu.SM||this.screenSize===g.cu.MD?(this.flgSticky=!1,this.displayedColumns=["status","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["status","received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",e.effectErrors.forEach(e=>{"GetForwardingHistory"===e.action&&(this.errorMessage="object"==typeof e.message?JSON.stringify(e.message):e.message)}),this.failedEvents=e.forwardingHistory&&e.forwardingHistory.forwarding_events&&e.forwardingHistory.forwarding_events.length>0?this.filterFailedEvents(e.forwardingHistory.forwarding_events):[],this.loadForwardingEventsTable(this.failedEvents),this.logger.info(e)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadForwardingEventsTable(this.failedEvents)}filterFailedEvents(e){return e.filter(e=>"settled"!==e.status)}onForwardingEventClick(e,t){this.store.dispatch(new se.wu({data:{type:g.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:e.payment_hash,title:"Payment Hash",width:100,type:g.Gi.STRING}],[{key:"received_time",value:e.received_time,title:"Received Time",width:50,type:g.Gi.DATE_TIME},{key:"resolved_time",value:e.resolved_time,title:"Resolved Time",width:50,type:g.Gi.DATE_TIME}],[{key:"in_channel",value:e.in_channel_alias?e.in_channel_alias:e.in_channel,title:"Inbound Channel",width:50,type:g.Gi.STRING},{key:"out_channel",value:e.out_channel_alias?e.out_channel_alias:e.out_channel,title:"Outbound Channel",width:50,type:g.Gi.STRING}],[{key:"status",value:"settled"===e.status?"Settled":"Unsettled",title:"Status",width:50,type:g.Gi.STRING},{key:"fee",value:e.fee,title:"Fee (mSats)",width:50,type:g.Gi.NUMBER}],[{key:"in_msatoshi",value:e.in_msatoshi,title:"In (mSats)",width:50,type:g.Gi.NUMBER},{key:"out_msatoshi",value:e.out_msatoshi,title:"Out (mSats)",width:50,type:g.Gi.NUMBER}]]}}))}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new ae.by([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(e,t)=>e[t]&&isNaN(e[t])?e[t].toLocaleLowerCase():e[t]?+e[t]:null,this.forwardingHistoryEvents.paginator=this.paginator,this.forwardingHistoryEvents.filterPredicate=(e,t)=>((e.status?e.status.toLowerCase():"")+(e.received_time?this.datePipe.transform(new Date(1e3*e.received_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(e.resolved_time?this.datePipe.transform(new Date(1e3*e.resolved_time),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(e.in_channel?e.in_channel.toLowerCase():"")+(e.out_channel?e.out_channel.toLowerCase():"")+(e.in_msatoshi?e.in_msatoshi/1e3:"")+(e.out_msatoshi?e.out_msatoshi/1e3:"")+(e.fee?e.fee:"")).includes(t),this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Failed-transactions")}applyFilter(e){this.forwardingHistoryEvents.filter=e.value.trim().toLowerCase()}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(w.v),s.Y36(y.yh),s.Y36(i.uU))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-failed-history"]],viewQuery:function(e,t){if(1&e&&(s.Gf(ie.YE,5),s.Gf(ne.NW,5)),2&e){let e;s.iGM(e=s.CRH())&&(t.sort=e.first),s.iGM(e=s.CRH())&&(t.paginator=e.first)}},features:[s._Bn([{provide:ne.ye,useValue:(0,g.pt)("Events")}])],decls:5,vars:9,consts:[["fxLayout","column","fxLayoutAlign","start stretch",3,"ngClass"],["class","p-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],[1,"p-2"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","payment_hash"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.YNc(1,Xr,2,1,"div",1),s.YNc(2,$r,4,0,"div",2),s.YNc(3,bc,38,6,"div",3),s._UZ(4,"mat-paginator",4),s.qZA()),2&e&&(s.Q6J("ngClass",s.VKq(7,qc,""!==t.errorMessage)),s.xp6(1),s.Q6J("ngIf",""!==t.errorMessage),s.xp6(1),s.Q6J("ngIf",""===t.errorMessage),s.xp6(1),s.Q6J("ngIf",""===t.errorMessage),s.xp6(1),s.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS))},directives:[l.xw,l.Wh,i.mk,S.oO,i.O5,ne.NW,l.yH,D.KE,re.Nt,M.$V,ae.BZ,ie.YE,ae.w1,ae.fO,ae.Dz,ae.mD,ae.Ke,ae.as,ae.nj,ae.ge,ie.nU,ae.ev,de.gD,de.$L,me.ey,C.lW,ae.yh,ae.Q2,ae.XQ,ae.Gk],pipes:[i.rS,i.uU,i.JJ,i.OU],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),e})();function _c(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"div",7),s.NdJ("click",function(){const t=s.CHM(e).$implicit;return s.oxw().activeLink=t.link}),s._uU(1),s.qZA()}if(2&e){const e=t.$implicit,n=s.oxw();s.s9C("routerLink",e.link),s.Q6J("active",n.activeLink===e.link),s.xp6(1),s.Oqu(e.name)}}let Sc=(()=>{class e{constructor(e){this.router=e,this.faChartBar=f.koM,this.links=[{link:"routingfees",name:"Routing Fees"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){let e=this.links.find(e=>this.router.url.includes(e.link));this.activeLink=e?e.link:this.links[0].link,this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,m.h)(e=>e instanceof a.Av)).subscribe(e=>{let t=this.links.find(t=>e.urlAfterRedirects.includes(t.link));this.activeLink=t?t.link:this.links[0].link})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(a.F0))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s._UZ(1,"fa-icon",1),s.TgZ(2,"span",2),s._uU(3,"Reports"),s.qZA(),s.qZA(),s.TgZ(4,"div",3),s.TgZ(5,"mat-card"),s.TgZ(6,"mat-card-content",4),s.TgZ(7,"nav",5),s.YNc(8,_c,2,3,"div",6),s.qZA(),s._UZ(9,"router-outlet"),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(1),s.Q6J("icon",t.faChartBar),s.xp6(7),s.Q6J("ngForOf",t.links))},directives:[l.xw,l.Wh,T.BN,b.a8,b.dn,te.BU,i.sg,a.lC,te.Nj,a.rH],styles:[""]}),e})();var Lc=n(4833),Uc=n(4018),Fc=n(1905);function kc(e,t){if(1&e&&(s.TgZ(0,"div",8),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&e){const e=s.oxw();s.Q6J("@fadeIn",e.totalFeeMsat),s.xp6(1),s.AsE("",s.xi3(2,3,e.totalFeeMsat/1e3||0,"1.0-2")," Sats/",s.lcZ(3,6,e.filteredEventsBySelectedPeriod.length||0)," Events")}}function Nc(e,t){1&e&&(s.TgZ(0,"div",9),s._uU(1,"No fee report for the selected period"),s.qZA())}function Jc(e,t){if(1&e&&(s.TgZ(0,"span"),s.TgZ(1,"span",12),s._uU(2),s.ALo(3,"number"),s.qZA(),s.TgZ(4,"span",12),s._uU(5),s.ALo(6,"number"),s.qZA(),s.qZA()),2&e){const e=t.model;s.xp6(2),s.hij("Events: ",s.lcZ(3,2,e.extra.totalEvents||0),""),s.xp6(3),s.hij("Fee: ",s.xi3(6,4,e.value||0,"1.0-2"),"")}}function Dc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"ngx-charts-bar-vertical",10),s.NdJ("select",function(t){return s.CHM(e),s.oxw().onChartBarSelected(t)})("mouseup",function(t){return s.CHM(e),s.oxw().onChartMouseUp(t)}),s.YNc(1,Jc,7,7,"ng-template",null,11,s.W1O),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("view",e.view)("results",e.feeReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function Oc(e,t){if(1&e&&s._UZ(0,"rtl-cl-forwarding-history",13),2&e){const e=s.oxw();s.Q6J("eventsData",e.filteredEventsBySelectedPeriod)("filterValue",e.eventFilterValue)}}let Rc=(()=>{class e{constructor(e,t,n,i){this.logger=e,this.dataService=t,this.commonService=n,this.store=i,this.reportPeriod=g.op[0],this.secondsInADay=86400,this.events={},this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.errorMessage="",this.totalFeeMsat=null,this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.feeReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Fee (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===g.cu.XS||this.screenSize===g.cu.SM),this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",e.effectErrors.forEach(e=>{"GetForwardingHistory"===e.action&&(this.errorMessage="object"==typeof e.message?JSON.stringify(e.message):e.message)}),this.events=e.forwardingHistory&&e.forwardingHistory.forwarding_events?e.forwardingHistory:{},this.filterForwardingEvents(this.startDate,this.endDate),this.logger.info(e)})}ngAfterViewInit(){const e=this.commonService.getContainerSize();switch(this.screenSize){case g.cu.MD:this.screenPaddingX=e.width/10;break;case g.cu.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2]}filterForwardingEvents(e,t){const n=Math.round(e.getTime()/1e3),i=Math.round(t.getTime()/1e3);this.filteredEventsBySelectedPeriod=[],this.feeReportData=[],this.totalFeeMsat=null,this.events&&this.events.forwarding_events&&this.events.forwarding_events.length>0&&(this.events.forwarding_events.forEach(e=>{"settled"===e.status&&e.received_time>=n&&e.received_time<i&&this.filteredEventsBySelectedPeriod.push(e)}),this.feeReportData=this.prepareFeeReport(e))}onChartMouseUp(e){"svg"===e.srcElement.tagName&&e.srcElement.classList.length>0&&"ngx-charts"===e.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(e){this.eventFilterValue=this.reportPeriod===g.op[1]?e.name+"/"+this.startDate.getFullYear():e.name.toString().padStart(2,"0")+"/"+g.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(e){const t=Math.round(e.getTime()/1e3);let n=[];if(this.reportPeriod===g.op[1]){for(let e=0;e<12;e++)n.push({name:g.gg[e].name,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(e=>{let t=new Date(1e3*+e.received_time).getMonth();n[t].value=n[t].value+ +e.fee/1e3,n[t].extra.totalEvents=n[t].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +e.fee})}else{for(let t=0;t<this.getMonthDays(e.getMonth(),e.getFullYear());t++)n.push({name:t+1,value:1e-9,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(e=>{let i=Math.floor((+e.received_time-t)/this.secondsInADay);n[i].value=n[i].value+ +e.fee/1e3,n[i].extra.totalEvents=n[i].extra.totalEvents+1,this.totalFeeMsat=(this.totalFeeMsat?this.totalFeeMsat:0)+ +e.fee})}return n}onSelectionChange(e){const t=e.selDate.getMonth(),n=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===g.op[1]?(this.startDate=new Date(n,0,1,0,0,0),this.endDate=new Date(n,11,31,23,59,59)):(this.startDate=new Date(n,t,1,0,0,0),this.endDate=new Date(n,t,this.getMonthDays(t,n),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(e,t){return 1===e&&t%4==0?g.gg[e].days+1:g.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(Z.mQ),s.Y36(sr.D),s.Y36(w.v),s.Y36(y.yh))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-fee-report"]],hostBindings:function(e,t){1&e&&s.NdJ("mouseup",function(e){return t.onChartMouseUp(e)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"rtl-horizontal-scroller",1),s.NdJ("stepChanged",function(e){return t.onSelectionChange(e)}),s.qZA(),s.TgZ(2,"div",2),s.YNc(3,kc,4,8,"div",3),s.YNc(4,Nc,2,0,"div",4),s.TgZ(5,"div",5),s.YNc(6,Dc,3,11,"ngx-charts-bar-vertical",6),s.qZA(),s.TgZ(7,"div",5),s.YNc(8,Oc,1,2,"rtl-cl-forwarding-history",7),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngIf",t.feeReportData.length>0&&t.filteredEventsBySelectedPeriod.length>0),s.xp6(1),s.Q6J("ngIf",t.feeReportData.length<=0||t.filteredEventsBySelectedPeriod.length<=0),s.xp6(2),s.Q6J("ngIf",t.feeReportData.length>0&&t.filteredEventsBySelectedPeriod.length>0),s.xp6(2),s.Q6J("ngIf",t.filteredEventsBySelectedPeriod&&t.filteredEventsBySelectedPeriod.length>0))},directives:[l.xw,l.Wh,l.yH,Uc.D,i.O5,Fc.K$,Gr],pipes:[i.JJ],styles:[""],data:{animation:[Lc.J]}}),e})();var Mc=n(6590);function Yc(e,t){if(1&e&&(s.TgZ(0,"div",10),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.AsE(" Paid ",s.xi3(2,2,e.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",s.lcZ(3,5,e.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Qc(e,t){if(1&e&&(s.TgZ(0,"div",10),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&e){const e=s.oxw(2);s.xp6(1),s.AsE(" Received ",s.xi3(2,2,e.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",s.lcZ(3,5,e.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Ic(e,t){if(1&e&&(s.TgZ(0,"div",8),s.YNc(1,Yc,4,7,"div",9),s.YNc(2,Qc,4,7,"div",9),s.qZA()),2&e){const e=s.oxw();s.Q6J("@fadeIn",e.transactionsReportSummary),s.xp6(1),s.Q6J("ngIf",e.transactionsReportSummary.paymentsSelectedPeriod),s.xp6(1),s.Q6J("ngIf",e.transactionsReportSummary.invoicesSelectedPeriod)}}function Pc(e,t){1&e&&(s.TgZ(0,"div",11),s._uU(1,"No transactions report for the selected period"),s.qZA())}function Ec(e,t){if(1&e&&(s.TgZ(0,"span",14),s._uU(1),s.ALo(2,"number"),s.ALo(3,"number"),s.qZA()),2&e){const e=t.model;s.xp6(1),s.HOy("",e.name,": ",s.xi3(2,4,e.value||0,"1.0-2"),"/# ","Paid"===e.name?"Payments":"Invoices",": ",s.lcZ(3,7,(null==e.extra?null:e.extra.total)||0),"")}}function Bc(e,t){if(1&e){const e=s.EpF();s.TgZ(0,"ngx-charts-bar-vertical-2d",12),s.NdJ("select",function(t){return s.CHM(e),s.oxw().onChartBarSelected(t)})("mouseup",function(t){return s.CHM(e),s.oxw().onChartMouseUp(t)}),s.YNc(1,Ec,4,9,"ng-template",null,13,s.W1O),s.qZA()}if(2&e){const e=s.oxw();s.Q6J("view",e.view)("results",e.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",e.showYAxisLabel)("xAxisLabel",e.xAxisLabel)("yAxisLabel",e.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",e.reportPeriod===e.scrollRanges[0]?2:4)}}function Hc(e,t){if(1&e&&s._UZ(0,"rtl-transactions-report-table",15),2&e){const e=s.oxw();s.Q6J("dataList",e.transactionsNonZeroReportData)("dataRange",e.reportPeriod)("filterValue",e.transactionFilterValue)}}let Vc=(()=>{class e{constructor(e,t){this.commonService=e,this.store=t,this.scrollRanges=g.op,this.reportPeriod=g.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=g.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===g.cu.XS||this.screenSize===g.cu.SM),this.store.select("cl").pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.payments=e.payments,this.invoices=e.invoices.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()})}ngAfterViewInit(){const e=this.commonService.getContainerSize();switch(this.screenSize){case g.cu.MD:this.screenPaddingX=e.width/10;break;case g.cu.LG:this.screenPaddingX=e.width/16;break;default:this.screenPaddingX=e.width/20}this.view=[e.width-this.screenPaddingX,e.height/2.2]}onChartMouseUp(e){"svg"===e.srcElement.tagName&&e.srcElement.classList.length>0&&"ngx-charts"===e.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(e){this.transactionFilterValue=this.reportPeriod===g.op[1]?e.series+"/"+this.startDate.getFullYear():e.series.toString().padStart(2,"0")+"/"+g.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(e,t){const n=Math.round(e.getTime()/1e3),i=Math.round(t.getTime()/1e3);let a=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};let o=this.payments.filter(e=>"complete"===e.status&&e.created_at>=n&&e.created_at<i),s=this.invoices.filter(e=>"paid"===e.status&&e.paid_at>=n&&e.paid_at<i);if(this.transactionsReportSummary.paymentsSelectedPeriod=o.length,this.transactionsReportSummary.invoicesSelectedPeriod=s.length,this.reportPeriod===g.op[1]){for(let t=0;t<12;t++)a.push({name:g.gg[t].name,date:new Date(e.getFullYear(),t,1,0,0,0,0),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});o.map(e=>{let t=new Date(1e3*e.created_at).getMonth();this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+e.msatoshi_sent,a[t].series[0].value=a[t].series[0].value+e.msatoshi_sent/1e3,a[t].series[0].extra.total=a[t].series[0].extra.total+1}),s.map(e=>{let t=new Date(1e3*+e.paid_at).getMonth();this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+e.msatoshi_received,a[t].series[1].value=a[t].series[1].value+e.msatoshi_received/1e3,a[t].series[1].extra.total=a[t].series[1].extra.total+1})}else{for(let t=0;t<this.getMonthDays(e.getMonth(),e.getFullYear());t++)a.push({name:(t+1).toString(),date:new Date(1e3*(t*this.secondsInADay+n)),series:[{name:"Paid",value:0,extra:{total:0}},{name:"Received",value:0,extra:{total:0}}]});o.map(e=>{let t=Math.floor((+e.created_at-n)/this.secondsInADay);this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+e.msatoshi_sent,a[t].series[0].value=a[t].series[0].value+e.msatoshi_sent/1e3,a[t].series[0].extra.total=a[t].series[0].extra.total+1}),s.map(e=>{let t=Math.floor((+e.paid_at-n)/this.secondsInADay);this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+e.msatoshi_received,a[t].series[1].value=a[t].series[1].value+e.msatoshi_received/1e3,a[t].series[1].extra.total=a[t].series[1].extra.total+1})}return a}prepareTableData(){return this.transactionsReportData.reduce((e,t)=>t.series[0].extra.total>0||t.series[1].extra.total>0?e.concat({date:t.date,amount_paid:t.series[0].value,num_payments:t.series[0].extra.total,amount_received:t.series[1].value,num_invoices:t.series[1].extra.total}):e,[])}onSelectionChange(e){const t=e.selDate.getMonth(),n=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===g.op[1]?(this.startDate=new Date(n,0,1,0,0,0),this.endDate=new Date(n,11,31,23,59,59)):(this.startDate=new Date(n,t,1,0,0,0),this.endDate=new Date(n,t,this.getMonthDays(t,n),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(e,t){return 1===e&&t%4==0?g.gg[e].days+1:g.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return e.\u0275fac=function(t){return new(t||e)(s.Y36(w.v),s.Y36(y.yh))},e.\u0275cmp=s.Xpm({type:e,selectors:[["rtl-cl-transactions-report"]],hostBindings:function(e,t){1&e&&s.NdJ("mouseup",function(e){return t.onChartMouseUp(e)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(e,t){1&e&&(s.TgZ(0,"div",0),s.TgZ(1,"rtl-horizontal-scroller",1),s.NdJ("stepChanged",function(e){return t.onSelectionChange(e)}),s.qZA(),s.TgZ(2,"div",2),s.YNc(3,Ic,3,3,"div",3),s.YNc(4,Pc,2,0,"div",4),s.TgZ(5,"div",5),s.YNc(6,Bc,3,13,"ngx-charts-bar-vertical-2d",6),s.qZA(),s.TgZ(7,"div",5),s.YNc(8,Hc,1,3,"rtl-transactions-report-table",7),s.qZA(),s.qZA(),s.qZA()),2&e&&(s.xp6(3),s.Q6J("ngIf",t.transactionsNonZeroReportData.length>0),s.xp6(1),s.Q6J("ngIf",t.transactionsNonZeroReportData.length<=0),s.xp6(2),s.Q6J("ngIf",t.transactionsNonZeroReportData.length>0),s.xp6(2),s.Q6J("ngIf",t.transactionsNonZeroReportData.length>0))},directives:[l.xw,l.Wh,l.yH,Uc.D,i.O5,Fc.H5,Mc.g],pipes:[i.JJ],styles:[""],data:{animation:[Lc.J]}}),e})();var zc=n(6013),Gc=n(8016);const Xc=a.Bz.forChild([{path:"",component:u,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Dn,canActivate:[zc.lB]},{path:"onchain",component:$i,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:ao,canActivate:[zc.lB]},{path:"send/:selTab",component:oo,data:{sweepAll:!1},canActivate:[zc.lB]},{path:"sweep/:selTab",component:oo,data:{sweepAll:!0},canActivate:[zc.lB]}]},{path:"connections",component:ji,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Uo,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:As,canActivate:[zc.lB]},{path:"pending",component:$s,canActivate:[zc.lB]}]},{path:"peers",component:Dl,data:{sweepAll:!1},canActivate:[zc.lB]}]},{path:"transactions",component:ta,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:un,canActivate:[zc.lB]},{path:"invoices",component:$e,canActivate:[zc.lB]},{path:"queryroutes",component:or,canActivate:[zc.lB]}]},{path:"messages",component:to,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:rr,canActivate:[zc.lB]},{path:"verify",component:gr,canActivate:[zc.lB]}]},{path:"routing",component:ia,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Gr,canActivate:[zc.lB]},{path:"failedtransactions",component:Cc,canActivate:[zc.lB]}]},{path:"reports",component:Sc,canActivate:[zc.lB],children:[{path:"",pathMatch:"full",redirectTo:"routingfees"},{path:"routingfees",component:Rc,canActivate:[zc.lB]},{path:"transactions",component:Vc,canActivate:[zc.lB]}]},{path:"lookups",component:Da,canActivate:[zc.lB]},{path:"rates",component:ja,canActivate:[zc.lB]},{path:"**",component:Gc.w},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var $c=n(253);let Kc=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=s.oAB({type:e,bootstrap:[u]}),e.\u0275inj=s.cJS({providers:[zc.lB],imports:[[i.ez,$c.m,Xc]]}),e})()}}]);