1import{a as Ge}from"./chunk-HANV7RBG.js";import{c as ze,d as He,e as ae}from"./chunk-5US23JYW.js";import{b as Ne}from"./chunk-LJA44JAN.js";import{b as oe}from"./chunk-MTFB74BY.js";import{B as Ve,C as Be,D as Fe,K as te,L as ie,a as K,j as X,k as Q,l as Ae,p as je,r as ue,u as De,v as Le,w as Z,x as ee}from"./chunk-TC6KNNL6.js";import{a as ne}from"./chunk-LLJJPCSQ.js";import{d as ke}from"./chunk-Y74UHZWO.js";import{V as Re,W as J}from"./chunk-6JTBRR7O.js";import{G as ge,f as q,ua as Te}from"./chunk-IBBSQLV5.js";import{a as I}from"./chunk-CAJH3YAX.js";import{e as W,k as Ie}from"./chunk-BO35WQS6.js";import{a as Y}from"./chunk-A4GUMIHM.js";import{i as xe,j as Ee,w as N}from"./chunk-WJC4Z27V.js";import{d as $,e as G,g as U}from"./chunk-FZHIU2PC.js";import{Ba as _,Cb as E,Db as Ce,Eb as Me,Fc as w,G as d,Hc as h,Ib as r,Kc as Se,Nb as y,Oa as M,Pa as P,Qc as A,Rc as p,Sc as f,U as de,Ub as z,Uc as Oe,Zb as L,a as D,b as me,g as $e,h as T,ic as m,id as g,jd as u,lc as H,o as ve,oc as Pe,pa as be,ra as b,tc as a,uc as s,vc as S,wa as x,wc as ye,xc as we,y as he,zc as k}from"./chunk-FD5XSWSL.js";var re=class o{constructor(t){this.http=t}static uploadedFile=null;static uploadedFileForm=null;upload(t){return he(this.materializeFiles(t)).pipe(be(e=>this.http.post("/file",e)),d(e=>e.data.files))}materializeFiles(t){return T(this,null,function*(){if(!(t instanceof FormData))return t;let e=t.getAll("files");if(e.length===0)return t;t.delete("files");for(let i of e)if(i instanceof File){let n=yield i.arrayBuffer();t.append("files",new File([n],i.name,{type:i.type,lastModified:i.lastModified}))}else t.append("files",i);return t})}static \u0275fac=function(e){return new(e||o)(_(W))};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var fe=$e(Ge());var se=class o{constructor(t){this.translateService=t}svg=I;compress(t){return new Promise((e,i)=>T(this,null,function*(){if(t==null)throw new Error("File is null");var n=1048576,l=0;if(t.size>=2*n&&t.size<=10*n?l=.8:t.size>=11*n&&t.size<=50*n?l=.6:t.size>=51*n&&t.size<=100*n&&(fe.default.fire({html:'<div class="msg-icon">'+this.svg.dangerIcon+'</div><div class="text-center m-t-20"><ul><li class="mt-4">'+this.translateService.instant("Max file size is 10MB")+"</li></ul></div>"}),e(null)),t.size>=2*n&&t.size<=50*n){let c=yield this.compressImage(t,{quality:l,type:t.type});e(c)}e(null)}))}compressImage(t,e){return T(this,null,function*(){try{let i=yield createImageBitmap(t),n=document.createElement("canvas");n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0);let C=yield(yield new Promise((j,O)=>{n.toBlob(R=>{R?j(R):O(new Error("Compression failed"))},e.type,e.quality)})).arrayBuffer();return new File([C],t.name,{type:e.type,lastModified:Date.now()})}catch{return fe.default.fire({html:'<div class="msg-icon">'+this.svg.dangerIcon+'</div><div class="text-center m-t-20"><ul><li class="mt-4">'+this.translateService.instant("Max file size is 10MB")+"</li></ul></div>"}),null}})}static \u0275fac=function(e){return new(e||o)(_($))};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};var ce=class o{constructor(t,e){this.router=t;this.domainService=e}STEP__TRANSFER_DEPOSIT="TwostepDeposit";LEAVING_PAGE_MSG="Your deposit request stays active until it expires. Continue your payment now, or leave this page and come back later.";SESSION_EXPIRED_MSG="Your deposit session has expired. Please submit a new deposit request again.";REDIRECT_PAGE_MSG="You have an existing pending payment deposit. Would you like to continue your payment?";getTwostepDeposit(){return localStorage.getItem(this.STEP__TRANSFER_DEPOSIT)}getLeavingPageMsg(){return this.LEAVING_PAGE_MSG}getSessionExpiredMsg(){return this.SESSION_EXPIRED_MSG}getRedirectPageMsg(){return this.REDIRECT_PAGE_MSG}storeLocalStorageForTwostepTransfer(t){localStorage.setItem(this.STEP__TRANSFER_DEPOSIT,JSON.stringify(this.withKeepOnLeave(t)))}withKeepOnLeave(t){let e=D({},t),i=this.getTwostepDeposit();if(!i)return e;try{let n=JSON.parse(i);n.keepOnLeave&&n.deposit?.id===e.deposit?.id&&(e.keepOnLeave=!0)}catch{}return e}clearTwostepTransferLocalStorageAndReload(){this.clearTwostepTransferLocalStorage(),window.location.reload()}clearTwostepTransferLocalStorage(){localStorage.removeItem(this.STEP__TRANSFER_DEPOSIT)}keepTwostepDepositOnLeave(){let t=this.getTwostepDeposit();if(t)try{let e=JSON.parse(t);e.keepOnLeave=!0,localStorage.setItem(this.STEP__TRANSFER_DEPOSIT,JSON.stringify(e))}catch{}}isTwostepDepositKeptOnLeave(){let t=this.getTwostepDeposit();if(!t)return!1;try{return!!JSON.parse(t).keepOnLeave}catch{return!1}}clearTwostepTransferLocalStorageAndGoToHistory(){this.clearTwostepTransferLocalStorage(),this.router.navigateByUrl(`/${this.domainService.getLocale()}/member/wallet/history`)}static \u0275fac=function(e){return new(e||o)(_(q),_(Te))};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};function et(o,t){if(o&1&&(S(0,"img",42),g(1,"translate")),o&2){let e=h().$implicit;Se("alt",u(1,2,"Image Preview")),m("src",e.path,Ce)}}function tt(o,t){if(o&1&&S(0,"iframe",43),o&2){let e=h().$implicit;m("src",e.path,Me)}}function it(o,t){if(o&1){let e=k();a(0,"div",37),L(1,et,2,4,"img",38)(2,tt,1,1,"iframe",39),a(3,"div",40)(4,"span",41),g(5,"safeHtml"),w("click",function(){let n=M(e).index,l=h(2).$implicit,c=h();return P(c.onRemoveFileMulti(n,l.verification_setting_field_id))}),s()()()}if(o&2){let e=t.$implicit,i=h(3);r(),m("ngIf",!e.isPdf),r(),m("ngIf",e.isPdf),r(2),m("innerHTML",u(5,3,i.svgIconList.trashIcon),E)}}function nt(o,t){if(o&1){let e=k();a(0,"span",47),g(1,"safeHtml"),w("click",function(){M(e),h();let n=A(2);return P(n.click())}),s()}if(o&2){let e=h(4);m("innerHTML",u(1,1,e.svgIconList.uploadIcon),E)}}function ot(o,t){o&1&&S(0,"span",48)}function at(o,t){if(o&1){let e=k();a(0,"div",37)(1,"input",44,2),w("change",function(n){M(e);let l=h(2),c=l.$implicit,C=l.index,j=h();return P(j.onUploadFileMulti(n,c.verification_setting_field_id,C))}),s(),L(3,nt,2,3,"span",45)(4,ot,1,0,"span",46),s()}if(o&2){let e=h(2).index,i=h();r(3),m("ngIf",!i.uploadInProgress[e]),r(),m("ngIf",i.uploadInProgress[e])}}function rt(o,t){if(o&1&&(a(0,"label",32),p(1),s(),a(2,"div",33),L(3,it,6,5,"div",34)(4,at,5,2,"div",35),s(),a(5,"label",36),p(6),g(7,"translate"),s()),o&2){let e=h().$implicit,i=h();r(),f(e.label),r(2),m("ngForOf",i.uploaded_images[e.verification_setting_field_id]),r(),m("ngIf",(i.uploaded_images[e.verification_setting_field_id]==null?null:i.uploaded_images[e.verification_setting_field_id].length)<i.max_images),r(2),f(u(7,4,"Max file size is 10MB"))}}function st(o,t){if(o&1&&(a(0,"label",32),p(1),s(),S(2,"input",49)),o&2){let e=h().$implicit;r(),f(e.label)}}function ct(o,t){if(o&1&&(ye(0,31),L(1,rt,8,6)(2,st,3,1),we()),o&2){let e=t.$implicit;m("formGroupName",e.verification_setting_field_id),r(),Pe(e.type_name=="Upload File"?1:e.type_name=="Textbox"?2:-1)}}var le=class o{constructor(t,e,i,n,l,c,C){this.data=t;this.dialogRef=e;this.uploadHttpService=i;this.sanitizer=n;this.memberBankAccountHttpService=l;this.eventEmitterService=c;this.fileCompressionService=C}svgIconList=I;form;verificationTitle;verificationField;uploadInProgress=new Array(2).fill(!1);fileName;max_images=10;uploaded_images=[];uploaded_images_form=[];isCompressed=!1;uploadTypes=[null,"banners","receipts","promotions","uploads","upload/card/photo/front/","upload/card/photo/holding"];submitLoading=!1;ngOnInit(){this.verificationTitle=this.data.verificationTitle,this.verificationField=this.data.verificationField,this.formInit()}onCloseDialog(t=!1){this.submitLoading||(this.memberBankAccountHttpService.updateVerificationSeen(this.data.bankAccountId),this.dialogRef.close(t))}onUploadFileMulti(t,e,i){return T(this,null,function*(){this.uploadInProgress[i]=!0;let n=t.target.files[0];if(n==null){this.uploadInProgress[i]=!1;return}var l;if(n.type!="application/pdf"&&n.size>=2*1048576&&(this.isCompressed=!0,l=yield this.fileCompressionService.compress(n)),l||this.isCompressed==!1){let c=new FormData;this.fileName=l?l.name:n.name,c.append("files",l||n),c.append("type",this.uploadTypes[2]),this.uploadHttpService.upload(c).pipe(b(C=>{this.uploadInProgress[i]=!1;let j={path:C[0].indexOf(".pdf")>=0?this.sanitizer.bypassSecurityTrustResourceUrl(C[0]):C,isPdf:C[0].indexOf(".pdf")>=0};this.uploaded_images[e]||(this.uploaded_images[e]=[],this.uploaded_images_form[e]=[]),this.uploaded_images[e].push(j),this.uploaded_images_form[e].push(C[0]),this.form.patchValue({verification_details:{[e]:this.buildMediaPro
1pertyBy(e)}}),this.form.markAllAsTouched()}),de(C=>{throw this.uploadInProgress[i]=!1,C})).subscribe()}else this.isCompressed=!1,this.uploadInProgress[i]=!1;t.target.value=null})}buildMediaPropertyBy(t){let e={};return e=me(D({},e),{document_path:this.uploaded_images_form[t]}),e}onRemoveFileMulti(t,e){this.uploaded_images[e]&&this.uploaded_images[e].splice(t,1),this.uploaded_images_form[e].splice(t,1),this.form.patchValue({verification_details:{[e]:this.buildMediaPropertyBy(e)}}),this.form.markAllAsTouched()}onSave(){if(this.form.valid){this.submitLoading=!0;let t=D({},this.form.value);this.memberBankAccountHttpService.reupload(this.data.bankAccountId,t).pipe(b(e=>{this.submitLoading=!1,this.eventEmitterService.updateBankListEmitter.emit(),this.onCloseDialog(!0)}),de(e=>{throw this.submitLoading=!1,e})).subscribe()}}formInit(){let t=()=>{let e={};return this.verificationField.forEach(i=>{let n=new Z({verification_setting_field_id:new ee(i.verification_setting_field_id),document_path:new ee(null,i.type_name=="Upload File"?ue.required:[]),verification_text:new ee(null,i.type_name=="Textbox"?ue.required:[])});e=me(D({},e),{[i.verification_setting_field_id]:n})}),e};this.form=new Z({verification_details:new Z(t())})}static \u0275fac=function(e){return new(e||o)(y(Q),y(X),y(re),y(Ie),y(V),y(Y),y(se))};static \u0275cmp=z({type:o,selectors:[["app-ewallet-verification-rejection-dialog"]],decls:65,vars:44,consts:[["dialog",""],["stepper",""],["myFileInput",""],[1,"dialog-mode"],[3,"linear"],[1,"title"],[1,"left","my-2"],[1,"right"],[3,"click"],[1,"content"],[1,"exclamation-section"],[1,"exclamation-icon",3,"innerHTML"],[1,"content-title"],[1,"content-description"],[1,"details-box"],[1,"details-item"],[1,"details-title"],[1,"details-separator"],[1,"details-content"],[1,"action"],[1,"left"],[3,"onClick","name","fontSize","extraClass"],[3,"onClick","name","fontSize","extraClass","buttonClass"],[3,"formGroup"],[1,"icon",3,"click","innerHTML"],[1,"icon",3,"innerHTML"],[1,"title-text"],[1,"reason-box"],["formGroupName","verification_details",1,"verification-action"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"onClick","fontSize","extraClass","disabled","loading"],[3,"formGroupName"],[1,"action-label"],[1,"receipt-section"],["class","receipt-box",4,"ngFor","ngForOf"],["class","receipt-box",4,"ngIf"],[1,"file-limit-label"],[1,"receipt-box"],[3,"src","alt",4,"ngIf"],["width","100%","height","100%","frameborder","0","style","border:0","allowfullscreen","",3,"src",4,"ngIf"],[1,"trash-img-div","d-flex","justify-content-end","align-items-start"],[1,"trash-icon",3,"click","innerHTML"],[3,"src","alt"],["width","100%","height","100%","frameborder","0","allowfullscreen","",2,"border","0",3,"src"],["type","file","accept","image/*, application/pdf","hidden","",3,"change"],["class","upload-action-btn",3,"innerHTML","click",4,"ngIf"],["class","fa-solid fa-spinner fa-spin fa-xl",4,"ngIf"],[1,"upload-action-btn",3,"click","innerHTML"],[1,"fa-solid","fa-spinner","fa-spin","fa-xl"],["type","text","formControlName","verification_text",1,"form-control"]],template:function(e,i){if(e&1){let n=k();a(0,"div",3,0)(2,"mat-stepper",4,1)(4,"mat-step")(5,"div",5),S(6,"div",6),a(7,"div",7)(8,"button",8),w("click",function(){return M(n),P(i.onCloseDialog())}),p(9,"\xD7"),s()()(),a(10,"div",9)(11,"div",10),S(12,"span",11),g(13,"safeHtml"),s(),a(14,"div",12)(15,"h4"),p(16),g(17,"translate"),s()(),a(18,"div",13)(19,"p"),p(20),g(21,"translate"),s()(),a(22,"div",14)(23,"div",15)(24,"label",16),p(25),g(26,"translate"),s(),a(27,"label",17),p(28,":"),s(),a(29,"label",18),p(30),s()(),a(31,"div",15)(32,"label",16),p(33),g(34,"translate"),s(),a(35,"label",17),p(36,":"),s(),a(37,"label",18),p(38),s()()()(),a(39,"div",19)(40,"div",20)(41,"app-submit-button",21),w("onClick",function(){return M(n),P(i.onCloseDialog())}),s()(),a(42,"div",7)(43,"app-submit-button",22),w("onClick",function(){M(n);let c=A(3);return P(c.next())}),s()()()(),a(44,"mat-step")(45,"div",23)(46,"div",5)(47,"div",6)(48,"span",24),g(49,"safeHtml"),w("click",function(){M(n);let c=A(3);return P(c.previous())}),s(),S(50,"span",25),g(51,"safeHtml"),a(52,"span",26),p(53),s()(),a(54,"div",7)(55,"button",8),w("click",function(){return M(n),P(i.onCloseDialog())}),p(56,"\xD7"),s()()(),S(57,"mat-divider"),a(58,"div",27)(59,"p"),p(60),g(61,"translate"),s()(),a(62,"div",28),L(63,ct,3,2,"ng-container",29),s(),a(64,"app-submit-button",30),w("onClick",function(){return M(n),P(i.onSave())}),s()()()()()}if(e&2){let n=A(1);H("--dialogWidth:"+n.offsetWidth+"px;"),r(2),m("linear",!0),r(10),m("innerHTML",u(13,28,i.svgIconList.dangerIcon),E),r(4),f(u(17,30,"Verification Failed")),r(4),f(u(21,32,"We couldn't verify your e-wallet. Please re-upload the required document or contact our support team for help.")),r(5),f(u(26,34,"E-Wallet")),r(5),f(i.data.bank_name),r(3),f(u(34,36,"Account Number")),r(5),f(i.data.account_number),r(3),m("name","Close")("fontSize","calc(var(--dialogWidth) * 0.028)")("extraClass","mt-3"),r(2),m("name","Reupload")("fontSize","calc(var(--dialogWidth) * 0.028)")("extraClass","mt-3")("buttonClass","submit-button-yellow"),r(2),m("formGroup",i.form),r(3),m("innerHTML",u(49,38,i.svgIconList.backIcon),E),r(2),m("innerHTML",u(51,40,i.svgIconList.receiptIcon),E),r(3),f(i.verificationTitle),r(7),Oe("",u(61,42,"Reason"),": ",i.data.reason,""),r(3),m("ngForOf",i.verificationField),r(),m("fontSize","calc(var(--dialogWidth) * 0.028)")("extraClass","mt-3")("disabled",!i.form.valid)("loading",i.submitLoading)}},dependencies:[J,Re,U,G,N,xe,Ee,ie,je,De,Le,Ve,Fe,Be,ne,oe,te,K,ae,ze,He],styles:["[_nghost-%COMP%] .mat-stepper-horizontal{background:transparent}[_nghost-%COMP%] .mat-stepper-horizontal .mat-horizontal-stepper-header-container{display:none!important}[_nghost-%COMP%] .mat-stepper-horizontal .mat-horizontal-stepper-wrapper .mat-horizontal-content-container{padding:0}
1[_nghost-%COMP%] .icon svg{fill:var(--mainColor1);width:calc(var(--dialogWidth) * .065)}[_nghost-%COMP%] .exclamation-icon svg{height:100%;fill:var(--mainColor51)}[_nghost-%COMP%] .upload-action-btn svg{fill:var(--mainColor1)}[_nghost-%COMP%] .trash-icon svg{fill:var(--mainColor51)}.dialog-mode[_ngcontent-%COMP%]{color:var(--mainColor3);background:var(--mainColor36)!important;border-radius:10px!important;width:calc(var(--mainWidth) * .35);min-width:430px;padding:calc(var(--dialogWidth) * .048)}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;z-index:1;position:relative}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .left[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:start;width:85%}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{margin-right:5%}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .left[_ngcontent-%COMP%] .title-text[_ngcontent-%COMP%]{font-size:calc(var(--dialogWidth) * .045);font-weight:500;font-family:Poppins Light}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:end;width:15%}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:unset;background:transparent;color:var(--mainColor3);font-size:calc(var(--dialogWidth) * .08);padding:0;margin-top:-10%}.dialog-mode[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .right[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{outline:unset}.dialog-mode[_ngcontent-%COMP%] .mat-divider[_ngcontent-%COMP%]{border-top-color:3px solid var(--mainColor35);color:var(--mainColor35);border-top-width:calc(var(--dialogWidth) * .008);border-radius:10px}.dialog-mode[_ngcontent-%COMP%] .reason-box[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;background:var(--mainColor38);padding:3% 5%;margin-bottom:5%}.dialog-mode[_ngcontent-%COMP%] .reason-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-family:Poppins;font-size:calc(var(--dialogWidth) * .028);color:var(--mainColor3)}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%]{display:flex;width:100%;flex-wrap:wrap;justify-content:space-between}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .action-label[_ngcontent-%COMP%]{margin-bottom:5%;width:100%}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .action-label[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-family:Poppins;font-size:calc(var(--dialogWidth) * .028);color:var(--mainColor3)}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .receipt-section[_ngcontent-%COMP%]{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:5%;margin-bottom:5%}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .receipt-section[_ngcontent-%COMP%] .receipt-box[_ngcontent-%COMP%]{width:100%;aspect-ratio:1/1;background:var(--mainColor38);position:relative;display:flex;align-items:center;justify-content:center;border-radius:10px}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .receipt-section[_ngcontent-%COMP%] .receipt-box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .receipt-section[_ngcontent-%COMP%] .receipt-box[_ngcontent-%COMP%] .trash-img-div[_ngcontent-%COMP%]{position:absolute;top:3%;right:3%;width:25%;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .receipt-section[_ngcontent-%COMP%] .receipt-box[_ngcontent-%COMP%] .trash-img-div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100%;aspect-ratio:1/1;position:relative}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .receipt-section[_ngcontent-%COMP%] .receipt-box[_ngcontent-%COMP%] .upload-action-btn[_ngcontent-%COMP%]{width:40%;height:40%;transition:.3s;
1cursor:pointer}.dialog-mode[_ngcontent-%COMP%] .verification-action[_ngcontent-%COMP%] .file-limit-label[_ngcontent-%COMP%]{margin-bottom:5%;font-family:Poppins;font-size:calc(var(--dialogWidth) * .028);color:var(--mainColor3)}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exclamation-section[_ngcontent-%COMP%]{width:100%;aspect-ratio:4.5/1;position:relative;overflow:hidden;margin-top:-9%;display:flex;align-items:center;justify-content:center}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .exclamation-section[_ngcontent-%COMP%] .exclamation-icon[_ngcontent-%COMP%]{height:100%;aspect-ratio:1/1}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:1rem 0 0}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-family:Poppins Medium;font-size:calc(var(--dialogWidth) * .045)}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-description[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:1rem 0 0}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-family:Poppins;font-size:calc(var(--dialogWidth) * .028);text-align:center;margin:0}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%]{border-radius:5px;margin:1rem 0 0;padding:3% 5%;border:none;width:100%;background:var(--mainColor38)}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%]{display:flex}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%]:not(:last-child){margin-bottom:3%}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%] .details-title[_ngcontent-%COMP%], .dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%] .details-content[_ngcontent-%COMP%]{width:40%;display:flex;align-items:center;justify-content:start;font-size:calc(var(--dialogWidth) * .028);font-family:Poppins}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%] .details-separator[_ng
1content-%COMP%]{width:20%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--dialogWidth) * .028);font-family:Poppins}.dialog-mode[_ngcontent-%COMP%] .action[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between}.dialog-mode[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .left[_ngcontent-%COMP%], .dialog-mode[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] .right[_ngcontent-%COMP%]{width:48%}"]})};var pe=class o{constructor(t,e,i){this.data=t;this.dialogRef=e;this.memberBankAccountHttpService=i}svgIconList=I;ngOnInit(){}onCloseDialog(){this.memberBankAccountHttpService.updateVerificationSeen(this.data.bankId),this.dialogRef.close()}static \u0275fac=function(e){return new(e||o)(y(Q),y(X),y(V))};static \u0275cmp=z({type:o,selectors:[["app-ewallet-verification-approval-dialog"]],decls:32,vars:22,consts:[["dialog",""],[1,"dialog-mode"],[1,"content"],[1,"tick-section"],[1,"tick-icon",3,"innerHTML"],[1,"content-title"],[1,"content-description"],[1,"details-box"],[1,"details-item"],[1,"details-title"],[1,"details-separator"],[1,"details-content"],[3,"onClick","name","fontSize","extraClass"]],template:function(e,i){if(e&1){let n=k();a(0,"div",1,0)(2,"div",2)(3,"div",3),S(4,"span",4),g(5,"safeHtml"),s(),a(6,"div",5)(7,"h4"),p(8),g(9,"translate"),s()(),a(10,"div",6)(11,"p"),p(12),g(13,"translate"),s()(),a(14,"div",7)(15,"div",8)(16,"label",9),p(17),g(18,"translate"),s(),a(19,"label",10),p(20,":"),s(),a(21,"label",11),p(22),s()(),a(23,"div",8)(24,"label",9),p(25),g(26,"translate"),s(),a(27,"label",10),p(28,":"),s(),a(29,"label",11),p(30),s()()()(),a(31,"app-submit-button",12),w("onClick",function(){return M(n),P(i.onCloseDialog())}),s()()}if(e&2){let n=A(1);H("--dialogWidth:"+n.offsetWidth+"px;"),r(4),m("innerHTML",u(5,12,i.svgIconList.greenTickIcon),E),r(4),f(u(9,14,"Verification Successful")),r(4),f(u(13,16,"Your e-wallet has been verified and is ready for withdrawals.")),r(5),f(u(18,18,"E-Wallet")),r(5),f(i.data.bank_name),r(3),f(u(26,20,"Account Number")),r(5),f(i.data.account_number),r(),m("name","Ok")("fontSize","calc(var(--dialogWidth) * 0.028)")("extraClass","mt-3")}},dependencies:[J,U,G,N,ie,ne,oe,te,K,ae],styles:["[_nghost-%COMP%] .tick-icon svg{height:100%;fill:var(--mainColor52)}.dialog-mode[_ngcontent-%COMP%]{color:var(--mainColor3);background:var(--mainColor36)!important;border-radius:10px!important;width:calc(var(--mainWidth) * .35);min-width:430px;padding:calc(var(--dialogWidth) * .05)}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .tick-section[_ngcontent-%COMP%]{width:100%;aspect-ratio:4.5/1;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .tick-section[_ngcontent-%COMP%] .tick-icon[_ngcontent-%COMP%]{height:100%;aspect-ratio:1/1}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:1rem 0 0}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-title[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-family:Poppins Medium;font-size:calc(var(--dialogWidth) * .045)}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-description[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:1rem 0 0}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .content-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-family:Poppins;font-size:calc(var(--dialogWidth) * .028);text-align:center;margin:0}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%]{border-radius:5px;margin:1rem 0 0;padding:3% 5%;border:none;width:100%;background:var(--mainColor38)}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%]{display:flex}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%]:not(:last-child){margin-bottom:3%}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%] .details-title[_ngcontent-%COMP%], .dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%] .details-content[_ngcontent-%COMP%]{width:40%;display:flex;align-items:center;justify-content:start;font-size:calc(var(--dialogWidth) * .028);font-family:Poppins}.dialog-mode[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .details-box[_ngcontent-%COMP%] .details-item[_ngcontent-%COMP%] .details-separator[_ng
1content-%COMP%]{width:20%;display:flex;align-items:center;justify-content:center;font-size:calc(var(--dialogWidth) * .028);font-family:Poppins}"]})};var V=class o{constructor(t,e,i,n,l,c,C,j){this.http=t;this.eventEmitterService=e;this.matDialog=i;this.translateService=n;this.socketIoService=l;this.twostepDepositDataService=c;this.router=C;this.clarityService=j;this.socketIoService.getSocketData().subscribe(O=>{if(O.type=="private"){let R=O.channelName,F=O.eventName;if(R==`ewallet-verification-channel.${this.memberAccountId}`&&F=="EwalletVerificationEvent")this.eWalletVerificationDataProcess(O.data);else if(R==`request-receipt-channel.${this.memberAccountId}`&&F=="RequestReceiptEvent"){let v=O.data;v.status==7?(v.reason=v.reason?.replace("Reason: ",""),this.requestReceiptBehaviorSubject.next(v)):v.status==1?this.requestReceiptBehaviorSubject.next(null):this.requestReceiptBehaviorSubject.next(null)}else if(R==`request-receipt-new-channel.${this.memberAccountId}`&&F=="RequestReceiptEventNew"){let v=O.data;v.status==7?(v.reason=v.reason?.replace("Reason: ",""),this.requestReceiptBehaviorSubject.next(v)):v.status==1?this.requestReceiptBehaviorSubject.next(null):this.requestReceiptBehaviorSubject.next(null)}else if(R==`deposit-status-channel.${this.memberAccountId}`&&F=="DepositStatusEvent"){let v=O.data;v.status==1&&!this.hasSeenDepositCompleted(v.deposit_id)?(this.clarityService.event("deposit_completed"),this.clarityService.setUserStateReached("depositor")):v.status==2&&this.router.url.includes("/member/wallet/deposit")&&this.twostepDepositDataService.clearTwostepTransferLocalStorageAndGoToHistory()}}})}svgIconList=I;requestReceiptBehaviorSubject=new ve(null);memberAccountId=null;connectEWalletVerificationChannel(t){this.memberAccountId=t,this.socketIoService.getPrivateSocket().then(e=>{e.joinChannel(`ewallet-verification-channel.${this.memberAccountId}`).listenEvent("EwalletVerificationEvent")})}getUnseenVerificationRecords(){this.http.get("/bankaccount/unseenverificationrecords").pipe(b(t=>{t.data.length>0&&this.eWalletVerificationDataProcess(t.data[0])})).subscribe()}updateVerificationSeen(t){this.http.put(`/bankaccount/updateseen/${t}`,null).subscribe()}getAll(){return this.http.get("/bankaccount?paginate=false").pipe(d(t=>t.data.rows))}addBank(t,e=!1){return this.http.post("/bankaccount",t).pipe(d(i=>{if(e){var n=` 2 <div class="review-icon">${this.svgIconList.underReviewIcon}</div> 3 <div class="content"> 4 <p> 5 <b class="bigger">${this.translateService.instant("Under Review")}</b> 6 </p> 7 <p>${i.message[0]}</p> 8 </div> 9 `;this.eventEmitterService.triggerSwalAlertDialog.emit({messages:n,customClass:"custom-pop-up"})}else this.eventEmitterService.triggerSwalAlertToast.emit({messages:i.message,customClass:"custom-toast"})}))}reupload(t,e){return this.http.put(`/bankaccount/reupload/${t}`,e).pipe(b(i=>{this.eventEmitterService.triggerSwalAlertToast.emit({messages:i.message,customClass:"custom-toast"})}))}withdraw(t){return t.account_type===void 0&&t.account_type==1,this.http.post("/withdraw",t).pipe(b(e=>{this.eventEmitterService.triggerSwalAlertToast.emit({messages:e.message,customClass:"custom-toast"})}),d(e=>{}))}getWithdrawalLimit(){return this.http.get("/withdraw/limit").pipe(d(t=>{let e=t.data.rows;return e.daily_max=+e.daily_max,e.max=+e.max,e.min=+e.min,e.total_max_withdraw_today=+e.total_max_withdraw_today,e.total_withdraw_limit_today=+e.total_withdraw_limit_today,e.total_withdraw_today=+e.total_withdraw_today,e}))}updateDeposit(t,e){return this.http.put(`/deposit/receipt/${t}`,e).pipe(b(i=>{this.requestReceiptBehaviorSubject.next(null),this.eventEmitterService.triggerSwalAlertToast.emit({messages:i.message,customClass:"custom-toast"})}),d(i=>{}))}getRequestReceipt(){return new Promise((t,e)=>this.http.get("/deposit/receipt/request").pipe(b(i=>{if(i?.data?.rows?.length>0){let n=i.data.rows[0];n.reason=n.reason?.replace("Reason: ",""),setTimeout(()=>{this.requestReceiptBehaviorSubject.next(n),t()},1e3)}else t()})).subscribe())}connectRequestReceiptWebsocket(t){this.memberAccountId=t,this.socketIoService.getPrivateSocket().then(e=>
9{e.joinChannel(`request-receipt-channel.${this.memberAccountId}`).listenEvent("RequestReceiptEvent")})}connectRequestReceiptNewWebsocket(t){this.memberAccountId=t,this.socketIoService.getPrivateSocket().then(e=>{e.joinChannel(`request-receipt-new-channel.${this.memberAccountId}`).listenEvent("RequestReceiptEventNew")})}getRequestReceiptBehaviorSubject(){return this.requestReceiptBehaviorSubject}eWalletVerificationDataProcess(t){t.status==1?(this.eventEmitterService.updateBankListEmitter.emit(),this.matDialog.open(pe,{disableClose:!0,data:{bankId:t.member_bank_account_id?t.member_bank_account_id:t.id,account_number:t.account_number,bank_name:t.bank_name}})):t.status==2&&(this.eventEmitterService.updateBankListEmitter.emit(),this.matDialog.open(le,{disableClose:!0,data:{bankAccountId:t.member_bank_account_id?t.member_bank_account_id:t.id,reason:t.reason,account_number:t.account_number,bank_name:t.bank_name,verificationTitle:t.verification_setting_title,verificationField:t.verification_settings_field}}))}addTwoStepBankTransfer(t){return this.http.post("/deposit/depositbanktransfer",t).pipe(b(e=>{e.success||this.eventEmitterService.triggerSwalAlertToast.emit({messages:e.message,customClass:"custom-toast"})}),d(e=>e.data.rows))}addAudBankTransfer(t){return this.http.post("/deposit/depositaudbanktransfer",t).pipe(b(e=>{e.success||this.eventEmitterService.triggerSwalAlertToast.emit({messages:e.message,customClass:"custom-toast"})}),d(e=>e.data.rows))}cancelAudBankTransferDeposit(t){return this.http.put(`/deposit/cancelpendingpayments/${t}`,{}).pipe(d(e=>e))}getPendingPaymentAudBankTransferDeposit(){return this.http.get("/deposit/getpendingpayments",{}).pipe(d(t=>t))}updatedepositaudbanktransfer(t,e){return this.http.put(`/deposit/depositaudbanktransfer/${t}`,e).pipe(d(i=>i))}changePendingPaymentsDepositToExpired(t){return this.http.put(`/deposit/expiredpendingpayments/${t}`,{}).pipe(d(e=>e))}addTwostepDeposit(t){return this.http.post("/deposit/depositdirecttransfer",t).pipe(b(e=>{e.success||this.eventEmitterService.triggerSwalAlertToast.emit({messages:e.message,customClass:"custom-toast"})}),d(e=>e.data.rows))}cancelTwostepDeposit(t){return this.http.put(`/deposit/cancelpendingpayments/${t}`,{}).pipe(d(e=>e))}getPendingPaymentTwostepDeposit(){return this.http.get("/deposit/getpendingpaymentsnew",{}).pipe(d(t=>t))}updateTwostepDeposit(t,e){return this.http.put(`/deposit/depositdirecttransfer/${t}`,e).pipe(d(i=>i))}getEligiblePaymentGateway(t,e){let i=[];t!==void 0&&i.push(`payment_mode_id=${t}`),Array.isArray(e)?e.forEach((l,c)=>{i.push(`payment_option_ids[${c}]=${l}`)}):e!==void 0&&i.push(`payment_option_ids=${e}`);let n=i.length?`?${i.join("&")}`:"";return this.http.get(`/deposit/geteligiblepaymentgateway${n}`).pipe(d(l=>{let c=l.data.rows;return c.daily_max=+c.max,c.max=+c.daily_max,c.min=+c.min,c.processor_id=c.processor_id,c.currency_code=c.currency_code,c.configuration_id=c.configuration_id,c}))}addPaymentGatewayDeposit(t){return this.http.post("/deposit/depositpaymentgateway",t).pipe(b(e=>{this.eventEmitterService.triggerSwalAlertToast.emit({messages:e.message,customClass:"custom-toast"})}))}getDepositLimitNew(t){let e="";return t&&(e+=`?payment_mode_id=${t}`),e+="&payment_account_list=true",this.http.get(`/deposit/getlimitnew${e}`).pipe(d(i=>{let n=i.data.rows;return n.max=+n.max,n.min=+n.min,n.fee=n.fee,n}))}getEligiblePaymentAccount(t){return this.http.get("/paymentaccount/geteligiblepaymentaccount"+t).pipe(d(e=>{let i=e.data;return i.id=i.id,i.account_name=i.account_name,i.account_number=i.account_number,i.require_receipt=i.require_receipt,i.qr_image=i.qr_image,i.deposit_limit.max=+i.deposit_limit.max,i.deposit_limit.min=+i.deposit_limit.min,i.deposit_limit.fee=i.deposit_limit.fee,i}))}depositNew(t){return this.http.post("/deposit/storenew",t).pipe(b(e=>{this.eventEmitterService.triggerSwalAlertToast.emit({messages:e.message,customClass:"custom-toast"})}))}depositStatusWebsocket(t,e){this.memberAccountId=e,t=="connect"?this.socketIoService.getPrivateSocket().then(i=>{i.joinChannel(`deposit-status-channel.${this.memberAccountId}`).listenEvent("DepositStatusEvent")}):this.socketIoService.leavePrivate(`deposit-status-channel.${this.memberAccountId}`,"DepositStatusEvent")}hasSeenDepositCompleted(t){try{let e=JSON.parse(localStorage.getItem(ge)??"[]");return e.includes(t)?!0:(localStorage.setItem(ge,JSON.stringify([...e,t].slice(-20))),!1)}catch{return!1}}static \u0275fac=function(e){return new(e||o)(_(W),_(Y),_(Ae),_($),_(Ne),_(ce),_(q),_(ke))};static \u0275prov=x({token:o,factory:o.\u0275fac,providedIn:"root"})};export{re as a,se as b,le as c,ce as d,V as e};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.