2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-10-31 09:20:27 +00:00
RTL/frontend/315.f4d6612db1adb63f.js

1 line
2.8 MiB
JavaScript
Raw Normal View History

(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[315],{6315:(n0,na,Rt)=>{"use strict";Rt.r(na),Rt.d(na,{CLNModule:()=>ea});var it=Rt(6895),se=Rt(9116),T=Rt(8878),A=Rt(4650),n=Rt(1576),B=Rt(3162);function o(r,i){1&r&&A._UZ(0,"mat-progress-bar",3)}class s{constructor(i){this.router=i,this.loading=!1,this.router.events.subscribe(t=>{switch(!0){case t instanceof se.OD:this.loading=!0;break;case t instanceof se.m2:case t instanceof se.gk:case t instanceof se.Q3:this.loading=!1}})}}s.\u0275fac=function(i){return new(i||s)(A.Y36(se.F0))},s.\u0275cmp=A.Xpm({type:s,selectors:[["rtl-cln-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(i,t){1&i&&(A.TgZ(0,"div",0),A.YNc(1,o,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&i&&(A.xp6(1),A.Q6J("ngIf",t.loading))},dependencies:[it.O5,n.xw,n.Wh,n.yH,B.pW,se.lC],data:{animation:[T.g]}});var l=Rt(7579),c=Rt(2722),u=Rt(1365),Q=Rt(3396),f=Rt(2687),a=Rt(7731),h=Rt(9828),C=Rt(5043),w=Rt(9653),e=Rt(62),g=Rt(2216),d=Rt(5829),M=Rt(4859),Y=Rt(3546),v=Rt(782),p=Rt(7392),I=Rt(8255),y=Rt(3848),U=Rt(9300),F=Rt(8739),N=Rt(6308),D=Rt(671),O=Rt(5412),nA=Rt(429),gA=Rt(493),z=Rt(4006),lA=Rt(4144),cA=Rt(9549),fA=Rt(4385),MA=Rt(3238),CA=Rt(455),DA=Rt(266),yA=Rt(3390),J=Rt(6534);function BA(r,i){if(1&r&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&r){const t=i.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function eA(r,i){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function oA(r,i){if(1&r&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,eA,2,1,"span",30),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}class vA{constructor(i,t,E,tA,SA,mt){this.dialogRef=i,this.data=t,this.store=E,this.decimalPipe=tA,this.commonService=SA,this.actions=mt,this.faExclamationTriangle=f.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.timeUnitEnum=a.Qk,this.timeUnits=a.LO,this.selTimeUnit=a.Qk.SECS,this.invoiceError="",this.unSubs=[new l.x,new l.x,new l.x,new l.x,new l.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(h.lw).pipe((0,c.R)(this.unSubs[0])).subscribe(i=>{this.selNode=i}),this.store.select(h.ey).pipe((0,c.R)(this.unSubs[1])).subscribe(i=>{this.information=i}),this.actions.pipe((0,c.R)(this.unSubs[2]),(0,U.h)(i=>i.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(i=>{i.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===i.payload.action&&(i.payload.status===a.Bn.ERROR&&(this.invoiceError=i.payload.message),i.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(i){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let t=this.expiry?this.expiry:a.$Y;this.selTimeUnit!==a.Qk.SECS&&this.expiry&&(t=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,nA.Rd)({payload:{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=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=a.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,c.R)(this.unSubs[3])).subscribe({next:i=>{this.invoiceValueHint="= "+this.decimalPipe.transform(i.OTHER,a.Xz.OTHER)+" "+i.unit},error:i=>{this.invoiceValueHint="Conversion Error: "+i}}))}onTimeUnitChange(i){this.e