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/frontend/893.355edadcb4ce94f4.js

1 line
29 KiB
JavaScript

"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[893],{534:(W,E,r)=>{r.d(E,{Kf:()=>G,I3:()=>Q});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"]},Q={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:(W,E,r)=>{r.d(E,{D:()=>w});var e=r(7579),V=r(2722),h=r(7731),a=r(8377),t=r(5e3),c=r(62),Z=r(5620),H=r(3251),M=r(9808),x=r(7093),T=r(5245),L=r(7238);function y(d,C){if(1&d&&(t.TgZ(0,"mat-icon",9),t._uU(1,"info_outline"),t.qZA()),2&d){const v=t.oxw().$implicit;t.Q6J("matTooltip",v.tooltip)}}function O(d,C){if(1&d&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"number"),t.qZA()),2&d){const v=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,v.dataValue)," ")}}function N(d,C){if(1&d&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"number"),t.qZA()),2&d){const v=t.oxw().$implicit,l=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,v[l.currencyUnitEnum.BTC],l.currencyUnitFormats.BTC)," ")}}function R(d,C){if(1&d&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"number"),t.qZA()),2&d){const v=t.oxw().$implicit,l=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,v[l.currencyUnitEnum.OTHER],l.currencyUnitFormats.OTHER)," ")}}function b(d,C){if(1&d&&(t.TgZ(0,"div",5),t.TgZ(1,"div",6),t._uU(2),t.YNc(3,y,2,1,"mat-icon",7),t.qZA(),t.YNc(4,O,3,3,"span",8),t.YNc(5,N,3,4,"span",8),t.YNc(6,R,3,4,"span",8),t.qZA()),2&d){const v=C.$implicit,l=t.oxw().$implicit,u=t.oxw();t.xp6(2),t.hij(" ",v.title," "),t.xp6(1),t.Q6J("ngIf",v.tooltip),t.xp6(1),t.Q6J("ngIf",l===u.currencyUnitEnum.SATS),t.xp6(1),t.Q6J("ngIf",l===u.currencyUnitEnum.BTC),t.xp6(1),t.Q6J("ngIf",u.fiatConversion&&l!==u.currencyUnitEnum.SATS&&l!==u.currencyUnitEnum.BTC&&""===u.conversionErrorMsg)}}function D(d,C){if(1&d&&(t.TgZ(0,"div",11),t.TgZ(1,"div",12),t._uU(2),t.qZA(),t.qZA()),2&d){const v=t.oxw(2);t.xp6(2),t.Oqu(v.conversionErrorMsg)}}function A(d,C){if(1&d&&(t.TgZ(0,"mat-tab",1),t.TgZ(1,"div",2),t.YNc(2,b,7,5,"div",3),t.qZA(),t.YNc(3,D,3,1,"div",4),t.qZA()),2&d){const v=C.$implicit,l=t.oxw();t.s9C("label",v),t.xp6(2),t.Q6J("ngForOf",l.values),t.xp6(1),t.Q6J("ngIf",l.fiatConversion&&v!==l.currencyUnitEnum.SATS&&v!==l.currencyUnitEnum.BTC&&""!==l.conversionErrorMsg)}}let w=(()=>{class d{constructor(v,l){this.commonService=v,this.store=l,this.values=[],this.currencyUnitEnum=h.NT,this.currencyUnitFormats=h.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,V.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(l=>{l.dataValue>0?(this.commonService.convertCurrency(l.dataValue,h.NT.SATS,h.NT.BTC,"",!0).pipe((0,V.R)(this.unSubs[1])).subscribe(u=>{l[h.NT.BTC]=u.BTC}),this.commonService.convertCurrency(l.dataValue,h.NT.SATS,h.NT.OTHER,this.currencyUnits[2],this.fiatConversion).pipe((0,V.R)(this.unSubs[2])).subscribe({next:u=>{l[h.NT.OTHER]=u.OTHER},error:u=>{this.conversionErrorMsg="Conversion Error: "+u}})):(l[h.NT.BTC]=l.dataValue,""===this.conversionErrorMsg&&(l[h.NT.OTHER]=l.dataValue))})}ngOnDestroy(){this.unSubs.forEach(v=>{v.next(null),v.complete()})}}return d.\u0275fac=function(v){return new(v||d)(t.Y36(c.v),t.Y36(Z.yh))},d.\u0275cmp=t.Xpm({type:d,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","center start","class","cc-data-block",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","100","class","p-1 error-border mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center start",1,"cc-data-block"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"cc-data-title"],["matTooltipPosition","below","class","info-icon",3,"matTooltip",4,"ngIf"],["class","cc-data-value",4,"ngIf"],["matTooltipPosition","below",1,"info-icon",3,"matTooltip"],[1,"cc-data-value"],["fxLayout","row","fxFlex","100",1,"p-1","error-border","mt-1"],[1,"cc-data-block"]],template:function(v,l){1&v&&(t.TgZ(0,"mat-tab-group"),t.YNc(1,A,4,3,"mat-tab",0),t.qZA()),2&v&&(t.xp6(1),t.Q6J("ngForOf",l.currencyUnits))},directives:[H.SP,M.sg,H.uX,x.xw,x.yH,x.Wh,M.O5,T.Hw,L.gM],pipes:[M.JJ],styles:[""]}),d})()},9122:(W,E,r)=>{r.d(E,{n:()=>v});var e=r(8966),V=r(801),h=r(7731),a=r(5e3),t=r(5043),c=r(62),Z=r(7261),H=r(7093),M=r(9808),x=r(9224),T=r(9444),L=r(7423),y=r(4834),O=r(3390),N=r(6895),R=r(3322),b=r(159);const D=function(l){return{"display-none":l}};function A(l,u){if(1&l&&(a.TgZ(0,"div",20),a._UZ(1,"qr-code",21),a.qZA()),2&l){const p=a.oxw();a.Q6J("ngClass",a.VKq(4,D,p.screenSize===p.screenSizeEnum.XS||p.screenSize===p.screenSizeEnum.SM)),a.xp6(1),a.Q6J("value",p.address)("size",p.qrWidth)("errorCorrectionLevel","L")}}function w(l,u){if(1&l&&(a.TgZ(0,"div",22),a._UZ(1,"qr-code",21),a.qZA()),2&l){const p=a.oxw();a.Q6J("ngClass",a.VKq(4,D,p.screenSize!==p.screenSizeEnum.XS&&p.screenSize!==p.screenSizeEnum.SM)),a.xp6(1),a.Q6J("value",p.address)("size",p.qrWidth)("errorCorrectionLevel","L")}}function d(l,u){if(1&l&&(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&l){const p=a.oxw();a.xp6(5),a.Oqu(p.addressType)}}function C(l,u){1&l&&a._UZ(0,"mat-divider",17)}let v=(()=>{class l{constructor(p,g,U,P,F){this.dialogRef=p,this.data=g,this.logger=U,this.commonService=P,this.snackBar=F,this.faReceipt=V.dLy,this.address="",this.addressType="",this.qrWidth=230,this.screenSize="",this.screenSizeEnum=h.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 l.\u0275fac=function(p){return new(p||l)(a.Y36(e.so),a.Y36(e.WI),a.Y36(t.mQ),a.Y36(c.v),a.Y36(Z.ux))},l.\u0275cmp=a.Xpm({type:l,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,A,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,w,2,6,"div",10),a.YNc(13,d,6,1,"div",11),a.YNc(14,C,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(P){return g.onCopyAddress(P)}),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:[H.xw,H.Wh,M.O5,H.yH,x.dk,T.BN,L.lW,x.dn,y.d,O.h,N.y,M.mk,R.oO,b.uU],styles:[""]}),l})()},7671:(W,E,r)=>{r.d(E,{D:()=>k});var e=r(5e3),V=r(113),h=r(7731),a=r(5043),t=r(7093),c=r(7423),Z=r(5245),H=r(9808),M=r(4107),x=r(3075),T=r(508),L=r(7322);let y=(()=>{class s extends T.LF{format(i,f){return"MMM YYYY"===f?h.gg[i.getMonth()].name+", "+i.getFullYear():"YYYY"===f?i.getFullYear().toString():i.getDate()+"/"+h.gg[i.getMonth()].name+"/"+i.getFullYear()}}return s.\u0275fac=function(){let _;return function(f){return(_||(_=e.n5z(s)))(f||s)}}(),s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac}),s})();const O={parse:{dateInput:"LL"},display:{dateInput:"MMM YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}},N={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"YYYY"}};let R=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275dir=e.lG2({type:s,selectors:[["","monthlyDate",""]],features:[e._Bn([{provide:T._A,useClass:y},{provide:T.sG,useValue:O}])]}),s})(),b=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275dir=e.lG2({type:s,selectors:[["","yearlyDate",""]],features:[e._Bn([{provide:T._A,useClass:y},{provide:T.sG,useValue:N}])]}),s})();var D=r(7531),A=r(6856),w=r(6534),d=r(9843);const C=["monthlyDatepicker"],v=["yearlyDatepicker"],l=function(){return{animationDirection:"forward"}};function u(s,_){if(1&s&&e.GkF(0,9),2&s){e.oxw();const i=e.MAs(19);e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.DdM(2,l))}}const p=function(){return{animationDirection:"backward"}};function g(s,_){if(1&s&&e.GkF(0,9),2&s){e.oxw();const i=e.MAs(19);e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.DdM(2,p))}}const U=function(){return{animationDirection:""}};function P(s,_){if(1&s&&e.GkF(0,9),2&s){e.oxw();const i=e.MAs(19);e.Q6J("ngTemplateOutlet",i)("ngTemplateOutletContext",e.DdM(2,U))}}function F(s,_){if(1&s&&(e.TgZ(0,"mat-option",17),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&s){const i=_.$implicit;e.Q6J("value",i),e.xp6(1),e.hij(" ",e.lcZ(2,2,i)," ")}}function Y(s,_){if(1&s){const i=e.EpF();e.TgZ(0,"mat-form-field",18),e.TgZ(1,"input",19,20),e.NdJ("ngModelChange",function(n){return e.CHM(i),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(i),e.oxw(2).onMonthSelected(n)})("dateSelected",function(n){return e.CHM(i),e.oxw(2).onMonthSelected(n)}),e.qZA(),e.qZA()}if(2&s){const i=e.MAs(5),f=e.oxw(2);e.xp6(1),e.Q6J("matDatepicker",i)("min",f.first)("max",f.last)("ngModel",f.selectedValue),e.xp6(2),e.Q6J("for",i),e.xp6(1),e.Q6J("startAt",f.selectedValue)}}function B(s,_){if(1&s){const i=e.EpF();e.TgZ(0,"mat-form-field",24),e.TgZ(1,"input",25,26),e.NdJ("ngModelChange",function(n){return e.CHM(i),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(i),e.oxw(2).onYearSelected(n)})("monthSelected",function(n){return e.CHM(i),e.oxw(2).onYearSelected(n)})("dateSelected",function(n){return e.CHM(i),e.oxw(2).onYearSelected(n)}),e.qZA(),e.qZA()}if(2&s){const i=e.MAs(5),f=e.oxw(2);e.xp6(1),e.Q6J("matDatepicker",i)("min",f.first)("max",f.last)("ngModel",f.selectedValue),e.xp6(2),e.Q6J("for",i),e.xp6(1),e.Q6J("startAt",f.selectedValue)}}function I(s,_){if(1&s){const i=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(i),e.oxw().selScrollRange=n})("selectionChange",function(n){return e.CHM(i),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,Y,6,6,"mat-form-field",15),e.YNc(6,B,6,6,"mat-form-field",16),e.qZA(),e.qZA()}if(2&s){const i=e.oxw();e.Q6J("@sliderAnimation",i.animationDirection),e.xp6(2),e.Q6J("ngModel",i.selScrollRange),e.xp6(1),e.Q6J("ngForOf",i.scrollRanges),e.xp6(2),e.Q6J("ngIf",i.selScrollRange===i.scrollRanges[0]),e.xp6(1),e.Q6J("ngIf",i.selScrollRange===i.scrollRanges[1])}}let k=(()=>{class s{constructor(i){this.logger=i,this.scrollRanges=h.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(i){this.selScrollRange=i.value,this.onStepChange("LAST")}onMonthSelected(i){this.selectedValue=i,this.onStepChange("SELECTED"),this.monthlyDatepicker.close()}onYearSelected(i){this.selectedValue=i,this.onStepChange("SELECTED"),this.yearlyDatepicker.close()}onStepChange(i){switch(this.logger.info(i),i){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===h.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===h.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===h.op[1]?this.selectedValue.getFullYear()<=this.first.getFullYear():this.selectedValue.getFullYear()<=this.first.getFullYear()&&this.selectedValue.getMonth()<=this.first.getMonth(),this.disableNext=this.selScrollRange===h.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(i){"monthlyDate"===i.srcElement.name?this.monthlyDatepicker.open():"yearlyDate"===i.srcElement.name&&this.yearlyDatepicker.open()}}return s.\u0275fac=function(i){return new(i||s)(e.Y36(a.mQ))},s.\u0275cmp=e.Xpm({type:s,selectors:[["rtl-horizontal-scroller"]],viewQuery:function(i,f){if(1&i&&(e.Gf(C,5),e.Gf(v,5)),2&i){let n;e.iGM(n=e.CRH())&&(f.monthlyDatepicker=n.first),e.iGM(n=e.CRH())&&(f.yearlyDatepicker=n.first)}},hostBindings:function(i,f){1&i&&e.NdJ("click",function(m){return f.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(i,f){1&i&&(e.TgZ(0,"div",0),e.TgZ(1,"div",1),e.TgZ(2,"button",2),e.NdJ("click",function(){return f.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 f.onStepChange("PREVIOUS")}),e.TgZ(6,"mat-icon"),e._uU(7,"navigate_before"),e.qZA(),e.qZA(),e.qZA(),e.YNc(8,u,1,3,"ng-container",4),e.YNc(9,g,1,3,"ng-container",4),e.YNc(10,P,1,3,"ng-container",4),e.TgZ(11,"div",5),e.TgZ(12,"button",6),e.NdJ("click",function(){return f.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 f.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&i&&(e.xp6(5),e.Q6J("disabled",f.disablePrev),e.xp6(3),e.Q6J("ngIf","forward"===f.animationDirection),e.xp6(1),e.Q6J("ngIf","backward"===f.animationDirection),e.xp6(1),e.Q6J("ngIf",""===f.animationDirection),e.xp6(2),e.Q6J("disabled",f.disableNext))},directives:[t.xw,t.Wh,t.yH,c.lW,Z.Hw,H.O5,H.tP,M.gD,x.JJ,x.On,H.sg,T.ey,L.KE,R,D.Nt,A.hl,w.q,d.F,x.Fj,A.nW,L.R9,A.Mq,b],pipes:[H.rS],styles:[""],data:{animation:[V.l]}}),s})()},165:(W,E,r)=>{r.d(E,{g:()=>f});var e=r(6087),V=r(4847),h=r(2075),a=r(7731),t=r(7861),c=r(5e3),Z=r(62),H=r(5620),M=r(9808),x=r(7093),T=r(7322),L=r(7531),y=r(3075),O=r(644),N=r(4107),R=r(508),b=r(7423),D=r(3322);function A(n,m){1&n&&(c.TgZ(0,"th",27),c._uU(1,"Date"),c.qZA())}function w(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,z=c.oxw();c.xp6(1),c.Oqu(c.xi3(2,1,null==o?null:o.date,z.dataRange===z.scrollRanges[1]?"MMM/yyyy":"dd/MMM/yyyy"))}}function d(n,m){1&n&&(c.TgZ(0,"th",29),c._uU(1,"Amount Paid (Sats)"),c.qZA())}function C(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 v(n,m){1&n&&(c.TgZ(0,"th",29),c._uU(1,"# Payments"),c.qZA())}function l(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 u(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 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_invoices))}}function P(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 q=c.CHM(o).$implicit;return c.oxw().onTransactionClick(q)}),c._uU(2,"View Info"),c.qZA(),c.qZA()}}function Y(n,m){1&n&&(c.TgZ(0,"p"),c._uU(1,"No transaction available."),c.qZA())}function B(n,m){if(1&n&&(c.TgZ(0,"td",37),c.YNc(1,Y,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 k(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 s(n,m){1&n&&c._UZ(0,"tr",40)}function _(n,m){1&n&&c._UZ(0,"tr",41)}const i=function(){return["no_transaction"]};let f=(()=>{class n{constructor(o,z,S){this.commonService=o,this.store=z,this.datePipe=S,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 z=[[{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:z}}}))}applyFilter(){this.transactions&&(this.transactions.filter=this.filterValue.trim().toLowerCase())}loadTransactionsTable(o){this.transactions=new h.by(o?[...o]:[]),this.setTableWidgets()}setTableWidgets(){this.transactions&&this.transactions.data&&this.transactions.data.length>0&&(this.transactions.sortingDataAccessor=(o,z)=>o[z]&&isNaN(o[z])?o[z].toLocaleLowerCase():o[z]?+o[z]:null,this.transactions.sort=this.sort,this.transactions.filterPredicate=(o,z)=>((o.date?(this.datePipe.transform(o.date,"dd/MMM")+"/"+o.date.getFullYear()).toLowerCase():"")+JSON.stringify(o).toLowerCase()).includes(z),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(Z.v),c.Y36(H.yh),c.Y36(M.uU))},n.\u0275cmp=c.Xpm({type:n,selectors:[["rtl-transactions-report-table"]],viewQuery:function(o,z){if(1&o&&(c.Gf(V.YE,5),c.Gf(e.NW,5)),2&o){let S;c.iGM(S=c.CRH())&&(z.sort=S.first),c.iGM(S=c.CRH())&&(z.paginator=S.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,z){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(q){return z.filterValue=q})("input",function(){return z.applyFilter()})("keyup",function(){return z.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,A,2,0,"th",11),c.YNc(12,w,3,4,"td",12),c.BQk(),c.ynx(13,13),c.YNc(14,d,2,0,"th",14),c.YNc(15,C,4,4,"td",12),c.BQk(),c.ynx(16,15),c.YNc(17,v,2,0,"th",14),c.YNc(18,l,4,3,"td",12),c.BQk(),c.ynx(19,16),c.YNc(20,u,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,U,4,3,"td",12),c.BQk(),c.ynx(25,18),c.YNc(26,P,6,0,"th",19),c.YNc(27,F,3,0,"td",20),c.BQk(),c.ynx(28,21),c.YNc(29,B,2,1,"td",22),c.BQk(),c.YNc(30,k,1,3,"tr",23),c.YNc(31,s,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",z.filterValue),c.xp6(3),c.Q6J("dataSource",z.transactions),c.xp6(22),c.Q6J("matFooterRowDef",c.DdM(9,i)),c.xp6(1),c.Q6J("matHeaderRowDef",z.displayedColumns)("matHeaderRowDefSticky",z.flgSticky),c.xp6(1),c.Q6J("matRowDefColumns",z.displayedColumns),c.xp6(1),c.Q6J("pageSize",z.pageSize)("pageSizeOptions",z.pageSizeOptions)("showFirstLastButtons",z.screenSize!==z.screenSizeEnum.XS))},directives:[x.xw,x.yH,x.Wh,T.KE,L.Nt,y.Fj,y.JJ,y.On,O.$V,h.BZ,V.YE,h.w1,h.fO,h.Dz,h.mD,h.Ke,h.as,h.nj,e.NW,h.ge,V.nU,h.ev,N.gD,N.$L,R.ey,b.lW,h.yh,M.O5,h.Q2,M.mk,D.oO,h.XQ,h.Gk],pipes:[M.uU,M.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})()}}]);