Ride-The-Lightning-RTL/frontend/315.25112d0bface4bf2.js

1 line
2.8 MiB
JavaScript
Raw Normal View History

(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[315],{6315:(Gc,Ur,Pt)=>{"use strict";Pt.r(Ur),Pt.d(Ur,{CLNModule:()=>Ew});var at=Pt(6895),ge=Pt(9116),N=Pt(8878),A=Pt(4650),e=Pt(1576),u=Pt(3162);function o(i,d){1&i&&A._UZ(0,"mat-progress-bar",3)}let s=(()=>{var i;class d{constructor(r){this.router=r,this.loading=!1,this.router.events.subscribe(c=>{switch(!0){case c instanceof ge.OD:this.loading=!0;break;case c instanceof ge.m2:case c instanceof ge.gk:case c instanceof ge.Q3:this.loading=!1}})}}return(i=d).\u0275fac=function(r){return new(r||i)(A.Y36(ge.F0))},i.\u0275cmp=A.Xpm({type:i,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(r,c){1&r&&(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&r&&(A.xp6(1),A.Q6J("ngIf",c.loading))},dependencies:[at.O5,e.xw,e.Wh,e.yH,u.pW,ge.lC],data:{animation:[N.g]}}),d})();var l=Pt(7579),g=Pt(2722),f=Pt(1365),Q=Pt(3396),h=Pt(2687),a=Pt(7731),E=Pt(9828),C=Pt(5043),w=Pt(9653),t=Pt(62),B=Pt(2216),p=Pt(5829),m=Pt(4859),S=Pt(3546),y=Pt(782),M=Pt(7392),v=Pt(8255),D=Pt(3848),L=Pt(9300),T=Pt(8739),b=Pt(6308),x=Pt(671),k=Pt(5412),iA=Pt(429),BA=Pt(493),H=Pt(4006),cA=Pt(4144),gA=Pt(9549),hA=Pt(4385),mA=Pt(3238),QA=Pt(455),FA=Pt(266),DA=Pt(3390),j=Pt(6534);function uA(i,d){if(1&i&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&i){const n=d.$implicit;A.Q6J("value",n),A.xp6(1),A.Oqu(A.lcZ(2,2,n))}}function nA(i,d){if(1&i&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&i){const n=A.oxw(2);A.xp6(1),A.Oqu(n.invoiceError)}}function sA(i,d){if(1&i&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,nA,2,1,"span",30),A.qZA()),2&i){const n=A.oxw();A.xp6(1),A.Q6J("icon",n.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==n.invoiceError)}}let xA=(()=>{var i;class d{constructor(r,c,F,vA,ut,$t){this.dialogRef=r,this.data=c,this.store=F,this.decimalPipe=vA,this.commonService=ut,this.actions=$t,this.faExclamationTriangle=h.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(E.lw).pipe((0,g.R)(this.unSubs[0])).subscribe(r=>{this.selNode=r}),this.store.select(E.ey).pipe((0,g.R)(this.unSubs[1])).subscribe(r=>{this.information=r}),this.actions.pipe((0,g.R)(this.unSubs[2]),(0,L.h)(r=>r.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(r=>{r.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===r.payload.action&&(r.payload.status===a.Bn.ERROR&&(this.invoiceError=r.payload.message),r.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(r){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let c=this.expiry?this.expiry:a.$Y;this.selTimeUnit!==a.Qk.SECS&&this.expiry&&(c=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,iA.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:c,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,g.R)(this.unSubs[3])).subscribe({next:r=>{this.invoiceValueHint="= "+this.decimalPipe.transform(r.OTHER,a.Xz.OTHER)+" "+r.unit},error:r=>{this.invoiceValueHint="