1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2279],{42279:function(e,i,l){l.r(i);var s=l(52322),a=l(83444),n=l(88213),t=l(38201),c=l(78287),r=l(50591),d=l(14048),o=l(93364),p=l(72779),h=l.n(p),m=l(72689),x=l(82981),j=l(2784),u=l(57643);i.default=e=>{let{mode:i=d.x1.none,bankName:l="",bankSite:p="",accountName:_="",accountNo:b="",code:y="",amount:g=0,transId:k="",depositReceipt:f=[],defaultReceipt:N,isShowReceiptInfo:L=!0,onSubmit:v}=e,{t:S}=(0,x.$G)(),{getBannerUrl:C}=(0,c.U5)(),{userInfo:{currencyId:H}}=(0,c.aC)(),{closeModal:B,modal:G}=(0,n.JT)(),[,D]=(0,u.m9)(),{ALLOWED_CURRENCIES:w}=(0,c.V4)(),R=(0,m.Z)(w.RECEIPT,H),U=i===d.x1.uploadReceipt?{maxSize:t.UN,allowedMimeTypes:t.Jv}:{maxSize:t.n_,allowedMimeTypes:t.GN},{maxSize:F,errorMessage:T,uploadFile:A,setUploadFile:E,onFileChange:P,mimeTypeDisplayName:$,accept:I}=(0,r.FLq)(U),handleBankSlipSubmit=async e=>{e.preventDefault();try{if(A){let e=await (0,o.lH)(A);await v({transId:k,receipt:e}),(0,a.$H)({message:S("Label_General_Upload_Success"),type:a.Ps.Success}),B()}}catch(e){G.error(e.message)}};return(0,j.useEffect)(()=>{let setDefaultImagePdfFile=async e=>{if(e){let i=await (0,o.o)(e,e.startsWith("data:application/pdf")?"PDF.pdf":"image.jpg",{type:e.startsWith("data:application/pdf")?"application/pdf":"image/jpg"});E(i)}};setDefaultImagePdfFile(N)},[N]),(0,s.jsx)("div",{className:"pop",children:(0,s.jsxs)("div",{className:"upload_new active",children:[(0,s.jsx)("div",{className:"icon icon-close",onClick:B}),L&&(0,s.jsxs)("div",{className:"smallList checkBankSlip bankaccount",children:[(0,s.jsx)("div",{className:"title",children:S("Label_History_BankAccount")}),(0,s.jsx)("div",{className:"txt-lightgray",children:S("Label_History_TransactionHint")}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:S("Label_History_BankName")}),(0,s.jsx)("li",{children:l}),(0,s.jsx)("li",{children:(0,s.jsx)("a",{target:"_blank",rel:"noreferrer",href:p,className:"icon icon-new-tab"})})]}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:S("Label_History_BankAccountName")}),(0,s.jsx)("li",{children:_}),(0,s.jsx)("li",{children:(0,s.jsx)("button",{className:"icon icon-files-empty copyBtn",onClick:()=>D(_),children:(0,s.jsx)("span",{children:S("Label_General_Copy")})})})]}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:S("Label_History_BankNumber")}),(0,s.jsx)("li",{children:b}),(0,s.jsx)("li",{children:(0,s.jsx)("button",{className:"icon icon-files-empty copyBtn",onClick:()=>D(b),children:(0,s.jsx)("span",{children:S("Label_General_Copy")})})})]}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:S("Label_General_Remark")}),(0,s.jsx)("li",{children:y}),(0,s.jsx)("li",{children:(0,s.jsx)("button",{className:"icon icon-files-empty copyBtn",onClick:()=>D(y||""),children:(0,s.jsx)("span",{children:S("Label_General_Copy")})})})]}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:S("Label_History_DepositAmount")}),(0,s.jsx)("li",{children:(0,o.Y4)(g,H,0)}),(0,s.jsx)("li",{children:(0,s.jsx)("button",{className:"icon icon-files-empty copyBtn",onClick:()=>D(g.toString()),children:(0,s.jsx)("span",{children:S("Label_General_Copy")})})})]})]}),(0,s.jsxs)("div",{className:"smallList checkBankSlip",children:[(0,s.jsx)("span",{className:"title",children:S("Label_General_SubmitBankSlip")}),(0,s.jsx)("div",{className:"txt-lightgray",children:R?S("Label_History_AttachFile_Required"):S("Label_History_AttachFile")}),(null==f?void 0:f.length)>0?(0,s.jsxs)("div",{className:"uploadModule",children:[f.length<6&&(0,s.jsxs)("label",{className:h()("upload_img",{error:T}),onDragOver:e=>e.preventDefault(),onDrop:P,children:[(0,s.jsx)("input",{type:"file",accept:I,onChange:P,"data-ttid":"deposit-upload-receipt-input"}),A?(0,s.jsx)("img",{src:A.type.startsWith("image/")?(0,o.k$)(URL.createObjectURL(A)):C("/desktop/img/pdf-img.png"),alt:"Selected"}):(0,s.jsx)("i",{className:"icon icon-plus"})]}),f.map(e=>{let{receiptNo:i,depositPic:l}=e;return(0,s.jsxs)("label",{className:"upload_img",children:[(0,s.jsx)("input",{type:"file"}),(0,s.jsx)("img",{src:l?(0,o.k$)(l):C("/desktop/img/pdf-img.png"),alt:""})]},i)})]}):(0,s.jsxs)("label",{className:h()("upload_img",{error:T}),onDragOver:e=>e.preventDefault(),onDrop:P,children:[(0,s.jsx)("input",{type:"file",accept:I,onChange:P,"data-ttid":"deposit-upload-receipt-input"}),A?(0,s.jsx)("img",{src:A.type.startsWith("image/")?(0,o.k$)(URL.createObjectURL(A)):C("/desktop/img/pdf-img.png"),alt:"Selected"}):(0,s.jsx)("i",{className:"icon icon-plus"})]}),(0,s.jsx)("div",{className:"txt-red",style:{visibility:T?"visible":"hidden",
1whiteSpace:"pre-line"},children:T}),(0,s.jsx)("div",{className:"directions",children:(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:S("Label_History_BankSlipHint1",{size:F/1024/1024})}),(0,s.jsx)("li",{children:S("Label_History_BankSlipHint2")}),(0,s.jsx)("li",{children:S("Label_History_BankSlipHint4",{mimeType:$})})]})}),(0,s.jsx)("form",{onSubmit:handleBankSlipSubmit,children:(0,s.jsxs)("div",{className:"btnGroup",children:[(0,s.jsx)("button",{className:"btn-cancel",onClick:()=>{B()},children:S("Label_General_Cancel")}),(0,s.jsx)("button",{type:"submit",className:"btn-check","data-ttid":"deposit-upload-receipt-submit-btn",children:S("Label_General_Submit")})]})})]})]})})}}}]);
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.