mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-10-31 09:20:27 +00:00
bea5980c6f
Release 0.12.0
1 line
29 KiB
JavaScript
1 line
29 KiB
JavaScript
"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[893],{534:(Y,N,i)=>{i.d(N,{Kf:()=>G,I3:()=>K});var G={prefix:"far",iconName:"frown",icon:[496,512,[],"f119","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.4 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c8.1 9.7 23.1 11.9 33.8 3.1 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z"]},K={prefix:"far",iconName:"smile",icon:[496,512,[],"f118","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"]}},1203:(Y,N,i)=>{i.d(N,{D:()=>Z});var e=i(7579),x=i(2722),f=i(7731),a=i(8377),t=i(5e3),c=i(62),O=i(5620),S=i(3251),H=i(9808),T=i(7093),V=i(7238);function D(z,M){if(1&z&&(t.TgZ(0,"span",8),t._uU(1),t.ALo(2,"number"),t.qZA()),2&z){const v=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,v.dataValue))}}function A(z,M){if(1&z&&(t.TgZ(0,"span",8),t._uU(1),t.ALo(2,"number"),t.qZA()),2&z){const v=t.oxw().$implicit,h=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,v[h.currencyUnitEnum.BTC],h.currencyUnitFormats.BTC))}}function R(z,M){if(1&z&&(t.TgZ(0,"span",8),t._uU(1),t.ALo(2,"number"),t.qZA()),2&z){const v=t.oxw().$implicit,h=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,1,v[h.currencyUnitEnum.OTHER],h.currencyUnitFormats.OTHER))}}function E(z,M){if(1&z&&(t.TgZ(0,"div",5),t.TgZ(1,"div",6),t._uU(2),t.qZA(),t.YNc(3,D,3,3,"span",7),t.YNc(4,A,3,4,"span",7),t.YNc(5,R,3,4,"span",7),t.qZA()),2&z){const v=M.$implicit,h=t.oxw().$implicit,C=t.oxw();t.Q6J("matTooltip",v.tooltip)("matTooltipPosition","below"),t.xp6(2),t.Oqu(v.title),t.xp6(1),t.Q6J("ngIf",h===C.currencyUnitEnum.SATS),t.xp6(1),t.Q6J("ngIf",h===C.currencyUnitEnum.BTC),t.xp6(1),t.Q6J("ngIf",C.fiatConversion&&h!==C.currencyUnitEnum.SATS&&h!==C.currencyUnitEnum.BTC&&""===C.conversionErrorMsg)}}function b(z,M){if(1&z&&(t.TgZ(0,"div",9),t.TgZ(1,"div",10),t._uU(2),t.qZA(),t.qZA()),2&z){const v=t.oxw(2);t.xp6(2),t.Oqu(v.conversionErrorMsg)}}function w(z,M){if(1&z&&(t.TgZ(0,"mat-tab",1),t.TgZ(1,"div",2),t.YNc(2,E,6,6,"div",3),t.qZA(),t.YNc(3,b,3,1,"div",4),t.qZA()),2&z){const v=M.$implicit,h=t.oxw();t.s9C("label",v),t.xp6(2),t.Q6J("ngForOf",h.values),t.xp6(1),t.Q6J("ngIf",h.fiatConversion&&v!==h.currencyUnitEnum.SATS&&v!==h.currencyUnitEnum.BTC&&""!==h.conversionErrorMsg)}}let Z=(()=>{class z{constructor(v,h){this.commonService=v,this.store=h,this.values=[],this.currencyUnitEnum=f.NT,this.currencyUnitFormats=f.Xz,this.currencyUnits=[],this.fiatConversion=!1,this.conversionErrorMsg="",this.unSubs=[new e.x,new e.x,new e.x]}ngOnInit(){this.store.select(a.dT).pipe((0,x.R)(this.unSubs[0])).subscribe(v=>{this.fiatConversion=v.settings.fiatConversion,this.currencyUnits=v.settings.currencyUnits,this.fiatConversion||this.currencyUnits.splice(2,1),this.currencyUnits.length>1&&this.values[0]&&this.values[0].dataValue>=0&&this.getCurrencyValues(this.values)})}ngOnChanges(){this.currencyUnits.length>1&&this.values[0]&&this.values[0].dataValue>=0&&this.getCurrencyValues(this.values)}getCurrencyValues(v){v.forEach(h=>{h.dataValue>0?(this.commonService.convertCurrency(h.dataValue,f.NT.SATS,f.NT.BTC,"",!0).pipe((0,x.R)(this.unSubs[1])).subscribe(C=>{h[f.NT.BTC]=C.BTC}),this.commonService.convertCurrency(h.dataValue,f.NT.SATS,f.NT.OTHER,this.currencyUnits[2],this.fiatConversion).pipe((0,x.R)(this.unSubs[2])).subscribe({next:C=>{h[f.NT.OTHER]=C.OTHER},error:C=>{this.conversionErrorMsg="Conversion Error: "+C}})):(h[f.NT.BTC]=h.dataValue,""===this.conversionErrorMsg&&(h[f.NT.OTHER]=h.dataValue))})}ngOnDestroy(){this.unSubs.forEach(v=>{v.next(null),v.complete()})}}return z.\u0275fac=function(v){return new(v||z)(t.Y36(c.v),t.Y36(O.yh))},z.\u0275cmp=t.Xpm({type:z,selectors:[["rtl-currency-unit-converter"]],inputs:{values:"values"},features:[t.TTD],decls:2,vars:1,consts:[[3,"label",4,"ngFor","ngForOf"],[3,"label"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start start","class","cc-data-block",3,"matTooltip","matTooltipPosition",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","100","class","p-1 error-border mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start start",1,"cc-data-block",3,"matTooltip","matTooltipPosition"],[1,"cc-data-title"],["class","cc-data-value",4,"ngIf"],[1,"cc-data-value"],["fxLayout","row","fxFlex","100",1,"p-1","error-border","mt-1"],[1,"cc-data-block"]],template:function(v,h){1&v&&(t.TgZ(0,"mat-tab-group"),t.YNc(1,w,4,3,"mat-tab",0),t.qZA()),2&v&&(t.xp6(1),t.Q6J("ngForOf",h.currencyUnits))},directives:[S.SP,H.sg,S.uX,T.xw,T.yH,T.Wh,H.O5,V.gM],pipes:[H.JJ],styles:[""]}),z})()},9122:(Y,N,i)=>{i.d(N,{n:()=>C});var e=i(8966),x=i(801),f=i(7731),a=i(5e3),t=i(5043),c=i(62),O=i(7261),S=i(7093),H=i(9808),T=i(9224),V=i(9444),D=i(7423),A=i(4834),R=i(3390),E=i(6895),b=i(3322),w=i(159);const Z=function(u){return{"display-none":u}};function z(u,L){if(1&u&&(a.TgZ(0,"div",20),a._UZ(1,"qr-code",21),a.qZA()),2&u){const p=a.oxw();a.Q6J("ngClass",a.VKq(4,Z,p.screenSize===p.screenSizeEnum.XS||p.screenSize===p.screenSizeEnum.SM)),a.xp6(1),a.Q6J("value",p.address)("size",p.qrWidth)("errorCorrectionLevel","L")}}function M(u,L){if(1&u&&(a.TgZ(0,"div",22),a._UZ(1,"qr-code",21),a.qZA()),2&u){const p=a.oxw();a.Q6J("ngClass",a.VKq(4,Z,p.screenSize!==p.screenSizeEnum.XS&&p.screenSize!==p.screenSizeEnum.SM)),a.xp6(1),a.Q6J("value",p.address)("size",p.qrWidth)("errorCorrectionLevel","L")}}function v(u,L){if(1&u&&(a.TgZ(0,"div",13),a.TgZ(1,"div",14),a.TgZ(2,"h4",15),a._uU(3,"Address Type"),a.qZA(),a.TgZ(4,"span",23),a._uU(5),a.qZA(),a.qZA(),a.qZA()),2&u){const p=a.oxw();a.xp6(5),a.Oqu(p.addressType)}}function h(u,L){1&u&&a._UZ(0,"mat-divider",17)}let C=(()=>{class u{constructor(p,g,P,U,F){this.dialogRef=p,this.data=g,this.logger=P,this.commonService=U,this.snackBar=F,this.faReceipt=x.dLy,this.address="",this.addressType="",this.qrWidth=230,this.screenSize="",this.screenSizeEnum=f.cu}ngOnInit(){this.address=this.data.address,this.addressType=this.data.addressType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onCopyAddress(p){this.snackBar.open("Generated address copied."),this.logger.info("Copied Text: "+p)}}return u.\u0275fac=function(p){return new(p||u)(a.Y36(e.so),a.Y36(e.WI),a.Y36(t.mQ),a.Y36(c.v),a.Y36(O.ux))},u.\u0275cmp=a.Xpm({type:u,selectors:[["rtl-on-chain-generated-address"]],decls:25,vars:8,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","35","fxLayoutAlign","center start","class","modal-qr-code-container padding-gap-large",3,"ngClass",4,"ngIf"],["fxFlex","65"],["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","2","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxFlex","50","fxLayoutAlign","center start","class","modal-qr-code-container padding-gap-large",3,"ngClass",4,"ngIf"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["fxLayout","row"],["fxFlex","100"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"overflow-wrap","foreground-secondary-text"],[1,"w-100","my-1"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-1"],["autoFocus","","mat-button","","color","primary","tabindex","1","type","submit","rtlClipboard","",3,"payload","copied"],["fxFlex","35","fxLayoutAlign","center start",1,"modal-qr-code-container","padding-gap-large",3,"ngClass"],[3,"value","size","errorCorrectionLevel"],["fxFlex","50","fxLayoutAlign","center start",1,"modal-qr-code-container","padding-gap-large",3,"ngClass"],[1,"foreground-secondary-text"]],template:function(p,g){1&p&&(a.TgZ(0,"div",0),a.YNc(1,z,2,6,"div",1),a.TgZ(2,"div",2),a.TgZ(3,"mat-card-header",3),a.TgZ(4,"div",4),a._UZ(5,"fa-icon",5),a.TgZ(6,"span",6),a._uU(7),a.qZA(),a.qZA(),a.TgZ(8,"button",7),a.NdJ("click",function(){return g.onClose()}),a._uU(9,"X"),a.qZA(),a.qZA(),a.TgZ(10,"mat-card-content",8),a.TgZ(11,"div",9),a.YNc(12,M,2,6,"div",10),a.YNc(13,v,6,1,"div",11),a.YNc(14,h,1,0,"mat-divider",12),a.TgZ(15,"div",13),a.TgZ(16,"div",14),a.TgZ(17,"h4",15),a._uU(18,"Address"),a.qZA(),a.TgZ(19,"span",16),a._uU(20),a.qZA(),a.qZA(),a.qZA(),a._UZ(21,"mat-divider",17),a.TgZ(22,"div",18),a.TgZ(23,"button",19),a.NdJ("copied",function(U){return g.onCopyAddress(U)}),a._uU(24,"Copy Address"),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA(),a.qZA()),2&p&&(a.xp6(1),a.Q6J("ngIf",g.address),a.xp6(4),a.Q6J("icon",g.faReceipt),a.xp6(2),a.Oqu(g.screenSize===g.screenSizeEnum.XS?"Address":"Generated Address"),a.xp6(5),a.Q6J("ngIf",g.address),a.xp6(1),a.Q6J("ngIf",""!==g.addressType),a.xp6(1),a.Q6J("ngIf",""!==g.addressType),a.xp6(6),a.Oqu(g.address),a.xp6(3),a.Q6J("payload",g.address))},directives:[S.xw,S.Wh,H.O5,S.yH,T.dk,V.BN,D.lW,T.dn,A.d,R.h,E.y,H.mk,b.oO,w.uU],styles:[""]}),u})()},7671:(Y,N,i)=>{i.d(N,{D:()=>q});var e=i(5e3),x=i(113),f=i(7731),a=i(5043),t=i(7093),c=i(7423),O=i(5245),S=i(9808),H=i(4107),T=i(3075),V=i(508),D=i(7322);let A=(()=>{class l extends V.LF{format(r,s){return"MMM YYYY"===s?f.gg[r.getMonth()].name+", "+r.getFullYear():"YYYY"===s?r.getFullYear().toString():r.getDate()+"/"+f.gg[r.getMonth()].name+"/"+r.getFullYear()}}return l.\u0275fac=function(){let _;return function(s){return(_||(_=e.n5z(l)))(s||l)}}(),l.\u0275prov=e.Yz7({token:l,factory:l.\u0275fac}),l})();const R={parse:{dateInput:"LL"},display:{dateInput:"MMM YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}},E={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};let b=(()=>{class l{}return l.\u0275fac=function(r){return new(r||l)},l.\u0275dir=e.lG2({type:l,selectors:[["","monthlyDate",""]],features:[e._Bn([{provide:V._A,useClass:A},{provide:V.sG,useValue:R}])]}),l})(),w=(()=>{class l{}return l.\u0275fac=function(r){return new(r||l)},l.\u0275dir=e.lG2({type:l,selectors:[["","yearlyDate",""]],features:[e._Bn([{provide:V._A,useClass:A},{provide:V.sG,useValue:E}])]}),l})();var Z=i(7531),z=i(6856),M=i(6534),v=i(9843);const h=["monthlyDatepicker"],C=["yearlyDatepicker"],u=function(){return{animationDirection:"forward"}};function L(l,_){if(1&l&&e.GkF(0,9),2&l){e.oxw();const r=e.MAs(19);e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(2,u))}}const p=function(){return{animationDirection:"backward"}};function g(l,_){if(1&l&&e.GkF(0,9),2&l){e.oxw();const r=e.MAs(19);e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(2,p))}}const P=function(){return{animationDirection:""}};function U(l,_){if(1&l&&e.GkF(0,9),2&l){e.oxw();const r=e.MAs(19);e.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",e.DdM(2,P))}}function F(l,_){if(1&l&&(e.TgZ(0,"mat-option",17),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&l){const r=_.$implicit;e.Q6J("value",r),e.xp6(1),e.hij(" ",e.lcZ(2,2,r)," ")}}function B(l,_){if(1&l){const r=e.EpF();e.TgZ(0,"mat-form-field",18),e.TgZ(1,"input",19,20),e.NdJ("ngModelChange",function(n){return e.CHM(r),e.oxw(2).selectedValue=n}),e.qZA(),e._UZ(3,"mat-datepicker-toggle",21),e.TgZ(4,"mat-datepicker",22,23),e.NdJ("monthSelected",function(n){return e.CHM(r),e.oxw(2).onMonthSelected(n)})("dateSelected",function(n){return e.CHM(r),e.oxw(2).onMonthSelected(n)}),e.qZA(),e.qZA()}if(2&l){const r=e.MAs(5),s=e.oxw(2);e.xp6(1),e.Q6J("matDatepicker",r)("min",s.first)("max",s.last)("ngModel",s.selectedValue),e.xp6(2),e.Q6J("for",r),e.xp6(1),e.Q6J("startAt",s.selectedValue)}}function k(l,_){if(1&l){const r=e.EpF();e.TgZ(0,"mat-form-field",24),e.TgZ(1,"input",25,26),e.NdJ("ngModelChange",function(n){return e.CHM(r),e.oxw(2).selectedValue=n}),e.qZA(),e._UZ(3,"mat-datepicker-toggle",21),e.TgZ(4,"mat-datepicker",27,28),e.NdJ("yearSelected",function(n){return e.CHM(r),e.oxw(2).onYearSelected(n)})("monthSelected",function(n){return e.CHM(r),e.oxw(2).onYearSelected(n)})("dateSelected",function(n){return e.CHM(r),e.oxw(2).onYearSelected(n)}),e.qZA(),e.qZA()}if(2&l){const r=e.MAs(5),s=e.oxw(2);e.xp6(1),e.Q6J("matDatepicker",r)("min",s.first)("max",s.last)("ngModel",s.selectedValue),e.xp6(2),e.Q6J("for",r),e.xp6(1),e.Q6J("startAt",s.selectedValue)}}function I(l,_){if(1&l){const r=e.EpF();e.TgZ(0,"div",10),e.TgZ(1,"div",11),e.TgZ(2,"mat-select",12),e.NdJ("ngModelChange",function(n){return e.CHM(r),e.oxw().selScrollRange=n})("selectionChange",function(n){return e.CHM(r),e.oxw().onRangeChanged(n)}),e.YNc(3,F,3,4,"mat-option",13),e.qZA(),e.qZA(),e.TgZ(4,"div",14),e.YNc(5,B,6,6,"mat-form-field",15),e.YNc(6,k,6,6,"mat-form-field",16),e.qZA(),e.qZA()}if(2&l){const r=e.oxw();e.Q6J("@sliderAnimation",r.animationDirection),e.xp6(2),e.Q6J("ngModel",r.selScrollRange),e.xp6(1),e.Q6J("ngForOf",r.scrollRanges),e.xp6(2),e.Q6J("ngIf",r.selScrollRange===r.scrollRanges[0]),e.xp6(1),e.Q6J("ngIf",r.selScrollRange===r.scrollRanges[1])}}let q=(()=>{class l{constructor(r){this.logger=r,this.scrollRanges=f.op,this.selScrollRange=this.scrollRanges[0],this.today=new Date(Date.now()),this.first=new Date(2018,0,1,0,0,0),this.last=new Date(this.today.getFullYear(),this.today.getMonth(),this.today.getDate(),0,0,0),this.disablePrev=!1,this.disableNext=!0,this.animationDirection="",this.selectedValue=this.last,this.stepChanged=new e.vpe}onRangeChanged(r){this.selScrollRange=r.value,this.onStepChange("LAST")}onMonthSelected(r){this.selectedValue=r,this.onStepChange("SELECTED"),this.monthlyDatepicker.close()}onYearSelected(r){this.selectedValue=r,this.onStepChange("SELECTED"),this.yearlyDatepicker.close()}onStepChange(r){switch(this.logger.info(r),r){case"FIRST":this.animationDirection="backward",this.selectedValue!==this.first&&(this.selectedValue=this.first,this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange}));break;case"PREVIOUS":this.selectedValue=this.selScrollRange===f.op[1]?new Date(this.selectedValue.getFullYear()-1,0,1,0,0,0):new Date(this.selectedValue.getFullYear(),this.selectedValue.getMonth()-1,1,0,0,0),this.animationDirection="backward",this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange});break;case"NEXT":this.selectedValue=this.selScrollRange===f.op[1]?new Date(this.selectedValue.getFullYear()+1,0,1,0,0,0):new Date(this.selectedValue.getFullYear(),this.selectedValue.getMonth()+1,1,0,0,0),this.animationDirection="forward",this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange});break;case"LAST":this.animationDirection="forward",this.selectedValue=this.last,this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange});break;default:this.animationDirection="",this.stepChanged.emit({selDate:this.selectedValue,selScrollRange:this.selScrollRange})}this.disablePrev=this.selScrollRange===f.op[1]?this.selectedValue.getFullYear()<=this.first.getFullYear():this.selectedValue.getFullYear()<=this.first.getFullYear()&&this.selectedValue.getMonth()<=this.first.getMonth(),this.disableNext=this.selScrollRange===f.op[1]?this.selectedValue.getFullYear()>=this.last.getFullYear():this.selectedValue.getFullYear()>=this.last.getFullYear()&&this.selectedValue.getMonth()>=this.last.getMonth(),this.logger.info(this.disablePrev),this.logger.info(this.disableNext),setTimeout(()=>{this.animationDirection=""},800)}onChartMouseUp(r){"monthlyDate"===r.srcElement.name?this.monthlyDatepicker.open():"yearlyDate"===r.srcElement.name&&this.yearlyDatepicker.open()}}return l.\u0275fac=function(r){return new(r||l)(e.Y36(a.mQ))},l.\u0275cmp=e.Xpm({type:l,selectors:[["rtl-horizontal-scroller"]],viewQuery:function(r,s){if(1&r&&(e.Gf(h,5),e.Gf(C,5)),2&r){let n;e.iGM(n=e.CRH())&&(s.monthlyDatepicker=n.first),e.iGM(n=e.CRH())&&(s.yearlyDatepicker=n.first)}},hostBindings:function(r,s){1&r&&e.NdJ("click",function(m){return s.onChartMouseUp(m)})},outputs:{stepChanged:"stepChanged"},decls:20,vars:5,consts:[["fxLayout","row","fxLayoutAlign","space-between stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","22"],["mat-icon-button","","color","primary","type","button","tabindex","1",1,"pr-4",3,"click"],["mat-icon-button","","color","primary","type","button","tabindex","2",3,"disabled","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","22"],["mat-icon-button","","color","primary","type","button","tabindex","5",1,"pr-4",3,"disabled","click"],["mat-icon-button","","color","primary","type","button","tabindex","6",3,"click"],["controlsPanel",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["fxLayout","row","fxLayoutAlign","center center","fxFlex","56"],["fxFlex","50","fxLayoutAlign","center center","fxLayoutAlign.gt-xs","end center",1,"font-bold-700"],["fxFlex","80","fxFlex.gt-md","30","name","selScrlRange","placeholder","Range","tabindex","3",1,"font-bold-700",3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayout","row","fxLayoutAlign","center center","fxLayoutAlign.gt-xs","start center"],["monthlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center",4,"ngIf"],["yearlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center",4,"ngIf"],[3,"value"],["monthlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center"],["matInput","","name","monthlyDate","tabindex","4","readonly","",3,"matDatepicker","min","max","ngModel","ngModelChange"],["monthlyDt","ngModel"],["matSuffix","",3,"for"],["startView","year",3,"startAt","monthSelected","dateSelected"],["monthlyDatepicker",""],["yearlyDate","","fxFlex","80","fxFlex.gt-md","30","fxLayoutAlign","center center"],["matInput","","name","yearlyDate","tabindex","4","readonly","",3,"matDatepicker","min","max","ngModel","ngModelChange"],["yearlyDt","ngModel"],["startView","multi-year",3,"startAt","yearSelected","monthSelected","dateSelected"],["yearlyDatepicker",""]],template:function(r,s){1&r&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return s.onStepChange("FIRST")}),e.TgZ(3,"mat-icon"),e._uU(4,"skip_previous"),e.qZA(),e.qZA(),e.TgZ(5,"button",3),e.NdJ("click",function(){return s.onStepChange("PREVIOUS")}),e.TgZ(6,"mat-icon"),e._uU(7,"navigate_before"),e.qZA(),e.qZA(),e.qZA(),e.YNc(8,L,1,3,"ng-container",4),e.YNc(9,g,1,3,"ng-container",4),e.YNc(10,U,1,3,"ng-container",4),e.TgZ(11,"div",5),e.TgZ(12,"button",6),e.NdJ("click",function(){return s.onStepChange("NEXT")}),e.TgZ(13,"mat-icon"),e._uU(14,"navigate_next"),e.qZA(),e.qZA(),e.TgZ(15,"button",7),e.NdJ("click",function(){return s.onStepChange("LAST")}),e.TgZ(16,"mat-icon"),e._uU(17,"skip_next"),e.qZA(),e.qZA(),e.qZA(),e.qZA(),e.YNc(18,I,7,5,"ng-template",null,8,e.W1O)),2&r&&(e.xp6(5),e.Q6J("disabled",s.disablePrev),e.xp6(3),e.Q6J("ngIf","forward"===s.animationDirection),e.xp6(1),e.Q6J("ngIf","backward"===s.animationDirection),e.xp6(1),e.Q6J("ngIf",""===s.animationDirection),e.xp6(2),e.Q6J("disabled",s.disableNext))},directives:[t.xw,t.Wh,t.yH,c.lW,O.Hw,S.O5,S.tP,H.gD,T.JJ,T.On,S.sg,V.ey,D.KE,b,Z.Nt,z.hl,M.q,v.F,T.Fj,z.nW,D.R9,z.Mq,w],pipes:[S.rS],styles:[""],data:{animation:[x.l]}}),l})()},165:(Y,N,i)=>{i.d(N,{g:()=>s});var e=i(6087),x=i(4847),f=i(2075),a=i(7731),t=i(7861),c=i(5e3),O=i(62),S=i(5620),H=i(9808),T=i(7093),V=i(7322),D=i(7531),A=i(3075),R=i(644),E=i(4107),b=i(508),w=i(7423),Z=i(3322);function z(n,m){1&n&&(c.TgZ(0,"th",27),c._uU(1,"Date"),c.qZA())}function M(n,m){if(1&n&&(c.TgZ(0,"td",28),c._uU(1),c.ALo(2,"date"),c.qZA()),2&n){const o=m.$implicit,d=c.oxw();c.xp6(1),c.Oqu(c.xi3(2,1,null==o?null:o.date,d.dataRange===d.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy"))}}function v(n,m){1&n&&(c.TgZ(0,"th",29),c._uU(1,"Amount Paid (Sats)"),c.qZA())}function h(n,m){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=m.$implicit;c.xp6(2),c.Oqu(c.xi3(3,1,null==o?null:o.amount_paid,"1.0-2"))}}function C(n,m){1&n&&(c.TgZ(0,"th",29),c._uU(1,"# Payments"),c.qZA())}function u(n,m){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=m.$implicit;c.xp6(2),c.Oqu(c.lcZ(3,1,null==o?null:o.num_payments))}}function L(n,m){1&n&&(c.TgZ(0,"th",29),c._uU(1,"Amount Received (Sats)"),c.qZA())}function p(n,m){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=m.$implicit;c.xp6(2),c.Oqu(c.xi3(3,1,null==o?null:o.amount_received,"1.0-2"))}}function g(n,m){1&n&&(c.TgZ(0,"th",29),c._uU(1,"# Invoices"),c.qZA())}function P(n,m){if(1&n&&(c.TgZ(0,"td",28),c.TgZ(1,"span",30),c._uU(2),c.ALo(3,"number"),c.qZA(),c.qZA()),2&n){const o=m.$implicit;c.xp6(2),c.Oqu(c.lcZ(3,1,null==o?null:o.num_invoices))}}function U(n,m){if(1&n){const o=c.EpF();c.TgZ(0,"th",31),c.TgZ(1,"div",32),c.TgZ(2,"mat-select",33),c._UZ(3,"mat-select-trigger"),c.TgZ(4,"mat-option",34),c.NdJ("click",function(){return c.CHM(o),c.oxw().onDownloadCSV()}),c._uU(5,"Download CSV"),c.qZA(),c.qZA(),c.qZA(),c.qZA()}}function F(n,m){if(1&n){const o=c.EpF();c.TgZ(0,"td",35),c.TgZ(1,"button",36),c.NdJ("click",function(){const W=c.CHM(o).$implicit;return c.oxw().onTransactionClick(W)}),c._uU(2,"View Info"),c.qZA(),c.qZA()}}function B(n,m){1&n&&(c.TgZ(0,"p"),c._uU(1,"No transaction available."),c.qZA())}function k(n,m){if(1&n&&(c.TgZ(0,"td",37),c.YNc(1,B,2,0,"p",38),c.qZA()),2&n){const o=c.oxw();c.xp6(1),c.Q6J("ngIf",!(null!=o.transactions&&o.transactions.data)||(null==o.transactions||null==o.transactions.data?null:o.transactions.data.length)<1)}}const I=function(n){return{"display-none":n}};function q(n,m){if(1&n&&c._UZ(0,"tr",39),2&n){const o=c.oxw();c.Q6J("ngClass",c.VKq(1,I,(null==o.transactions?null:o.transactions.data)&&(null==o.transactions||null==o.transactions.data?null:o.transactions.data.length)>0))}}function l(n,m){1&n&&c._UZ(0,"tr",40)}function _(n,m){1&n&&c._UZ(0,"tr",41)}const r=function(){return["no_transaction"]};let s=(()=>{class n{constructor(o,d,y){this.commonService=o,this.store=d,this.datePipe=y,this.dataRange=a.op[0],this.dataList=[],this.filterValue="",this.timezoneOffset=60*new Date(Date.now()).getTimezoneOffset(),this.scrollRanges=a.op,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["date","amount_paid","amount_received","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices","actions"]):(this.flgSticky=!0,this.displayedColumns=["date","amount_paid","num_payments","amount_received","num_invoices","actions"])}ngOnInit(){this.dataList&&this.dataList.length>0&&this.loadTransactionsTable(this.dataList)}ngAfterViewInit(){this.setTableWidgets()}ngOnChanges(o){o.dataList&&!o.dataList.firstChange&&this.loadTransactionsTable(this.dataList),o.filterValue&&!o.filterValue.firstChange&&this.applyFilter()}onTransactionClick(o){const d=[[{key:"date",value:this.datePipe.transform(o.date,this.dataRange===a.op[1]?"MMM/yyyy":"dd/MMM/yyyy"),title:"Date",width:100,type:a.Gi.DATE}],[{key:"amount_paid",value:Math.round(o.amount_paid),title:"Amount Paid (Sats)",width:50,type:a.Gi.NUMBER},{key:"num_payments",value:o.num_payments,title:"# Payments",width:50,type:a.Gi.NUMBER}],[{key:"amount_received",value:Math.round(o.amount_received),title:"Amount Received (Sats)",width:50,type:a.Gi.NUMBER},{key:"num_invoices",value:o.num_invoices,title:"# Invoices",width:50,type:a.Gi.NUMBER}]];this.store.dispatch((0,t.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Transaction Summary",message:d}}}))}applyFilter(){this.transactions&&(this.transactions.filter=this.filterValue.trim().toLowerCase())}loadTransactionsTable(o){this.transactions=new f.by(o?[...o]:[]),this.setTableWidgets()}setTableWidgets(){this.transactions&&this.transactions.data&&this.transactions.data.length>0&&(this.transactions.sortingDataAccessor=(o,d)=>o[d]&&isNaN(o[d])?o[d].toLocaleLowerCase():o[d]?+o[d]:null,this.transactions.sort=this.sort,this.transactions.filterPredicate=(o,d)=>((o.date?(this.datePipe.transform(o.date,"dd/MMM")+"/"+o.date.getFullYear()).toLowerCase():"")+JSON.stringify(o).toLowerCase()).includes(d),this.transactions.paginator=this.paginator)}onDownloadCSV(){this.transactions.data&&this.transactions.data.length>0&&this.commonService.downloadFile(this.dataList,"Transactions-report-"+this.dataRange.toLowerCase())}}return n.\u0275fac=function(o){return new(o||n)(c.Y36(O.v),c.Y36(S.yh),c.Y36(H.uU))},n.\u0275cmp=c.Xpm({type:n,selectors:[["rtl-transactions-report-table"]],viewQuery:function(o,d){if(1&o&&(c.Gf(x.YE,5),c.Gf(e.NW,5)),2&o){let y;c.iGM(y=c.CRH())&&(d.sort=y.first),c.iGM(y=c.CRH())&&(d.paginator=y.first)}},inputs:{dataRange:"dataRange",dataList:"dataList",filterValue:"filterValue"},features:[c._Bn([{provide:e.ye,useValue:(0,a.pt)("Transactions")}]),c.TTD],decls:34,vars:10,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount_paid"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","num_payments"],["matColumnDef","amount_received"],["matColumnDef","num_invoices"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["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"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["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"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(o,d){1&o&&(c.TgZ(0,"div",0),c.TgZ(1,"div",1),c.TgZ(2,"div",2),c._UZ(3,"div",3),c.TgZ(4,"mat-form-field",4),c.TgZ(5,"input",5),c.NdJ("ngModelChange",function(W){return d.filterValue=W})("input",function(){return d.applyFilter()})("keyup",function(){return d.applyFilter()}),c.qZA(),c.qZA(),c.qZA(),c.TgZ(6,"div",6),c.TgZ(7,"div",7),c.TgZ(8,"table",8,9),c.ynx(10,10),c.YNc(11,z,2,0,"th",11),c.YNc(12,M,3,4,"td",12),c.BQk(),c.ynx(13,13),c.YNc(14,v,2,0,"th",14),c.YNc(15,h,4,4,"td",12),c.BQk(),c.ynx(16,15),c.YNc(17,C,2,0,"th",14),c.YNc(18,u,4,3,"td",12),c.BQk(),c.ynx(19,16),c.YNc(20,L,2,0,"th",14),c.YNc(21,p,4,4,"td",12),c.BQk(),c.ynx(22,17),c.YNc(23,g,2,0,"th",14),c.YNc(24,P,4,3,"td",12),c.BQk(),c.ynx(25,18),c.YNc(26,U,6,0,"th",19),c.YNc(27,F,3,0,"td",20),c.BQk(),c.ynx(28,21),c.YNc(29,k,2,1,"td",22),c.BQk(),c.YNc(30,q,1,3,"tr",23),c.YNc(31,l,1,0,"tr",24),c.YNc(32,_,1,0,"tr",25),c.qZA(),c._UZ(33,"mat-paginator",26),c.qZA(),c.qZA(),c.qZA(),c.qZA()),2&o&&(c.xp6(5),c.Q6J("ngModel",d.filterValue),c.xp6(3),c.Q6J("dataSource",d.transactions),c.xp6(22),c.Q6J("matFooterRowDef",c.DdM(9,r)),c.xp6(1),c.Q6J("matHeaderRowDef",d.displayedColumns)("matHeaderRowDefSticky",d.flgSticky),c.xp6(1),c.Q6J("matRowDefColumns",d.displayedColumns),c.xp6(1),c.Q6J("pageSize",d.pageSize)("pageSizeOptions",d.pageSizeOptions)("showFirstLastButtons",d.screenSize!==d.screenSizeEnum.XS))},directives:[T.xw,T.yH,T.Wh,V.KE,D.Nt,A.Fj,A.JJ,A.On,R.$V,f.BZ,x.YE,f.w1,f.fO,f.Dz,f.mD,f.Ke,f.as,f.nj,e.NW,f.ge,x.nU,f.ev,E.gD,E.$L,b.ey,w.lW,f.yh,H.O5,f.Q2,H.mk,Z.oO,f.XQ,f.Gk],pipes:[H.uU,H.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})()},9843:(Y,N,i)=>{i.d(N,{F:()=>f});var e=i(3075),x=i(5e3);let f=(()=>{class a{validate(c){return this.max?e.kI.max(+this.max)(c):null}}return a.\u0275fac=function(c){return new(c||a)},a.\u0275dir=x.lG2({type:a,selectors:[["input","max",""]],inputs:{max:"max"},features:[x._Bn([{provide:e.Cf,useExisting:a,multi:!0}])]}),a})()}}]); |