1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2352],{14165:function(e,a,t){t.r(a),t.d(a,{__N_SSP:function(){return u}});var l=t(85893),s=t(21964),n=t(74166),r=t(96171),o=t(62969),d=t(25602),i=t(6943),c=t(39332),m=t(67294),u=!0;a.default=e=>{var a,t,u,h,x;let v=(0,c.useRouter)(),[N,f]=(0,m.useState)(),[p,g]=(0,m.useState)(),[b,y]=(0,m.useState)(),[j,w]=(0,m.useState)(""),[k,C]=(0,m.useState)(""),[S,I]=(0,m.useState)(),[E,P]=(0,m.useState)(""),[B,M]=(0,m.useState)(!1);console.log(e);let _=(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.PaymentModes)&&(null==e?void 0:null===(u=e.data)||void 0===u?void 0:null===(t=u.PaymentModes)||void 0===t?void 0:t.replace(/\s/g,""));console.log(_);let procced=async()=>{("MOBILEBANKING"==e.mode||"EBANKING"==e.mode)&&e.data.name;let a=await d.Z.getUniqueNo();if(""==j){I("Remark is required");return}if(G(!0),"MOBILEBANKING"==e.mode||"EBANKING"==e.mode){var t=await i.Z.InitiatePaymentBanking(e.data.idx,e.data.name,j,N,a,e.mode,p);200==t.Code?(startInterval(t.Data.unique_id),window.open(t.Data.payment_url,"_blank")):((0,r.cB)(t.Message),G(!1))}else{var t=await i.Z.InitiatePaymentKhalti(j,N,a,e.data.PaymentModes,p,e.data.PaymentGatewayName);200==t.Code?(startInterval(t.Data.unique_id),window.open(t.Data.payment_url,"_blank")):((0,r.cB)(t.Message),G(!1))}},D="",[A,G]=(0,m.useState)(!1),startInterval=a=>{D=setInterval(async()=>{var t=await i.Z.PaymenCallback(a);200===t.Code&&"Confirmed"==t.Data.Message&&(G(!1),e.closeCallbak(),P(t.Data.Message),M(!0))},3e3)};return setTimeout(()=>{clearInterval(D),v.push("/")},5e5),(0,m.useEffect)(()=>{var e=window.location.search;let a=new URLSearchParams(e);f(a.get("price")),g(a.get("bookingNo"))},[]),(0,l.jsxs)(l.Fragment,{children:[B&&(0,l.jsx)(s.M,{message:E,showForm:B,closeCallback:()=>{M(!1)}}),(0,l.jsx)("div",{className:"row d-flex justify-content-center align-items-center m-0 p-0",children:(0,l.jsx)("div",{className:"col-md-12",children:(0,l.jsx)("div",{className:"card rounded-3 text-black",children:(0,l.jsx)("div",{className:"row g-0",children:(0,l.jsx)("div",{className:"col-lg-12",children:(0,l.jsxs)("div",{className:"card-body flex-wrap justify-content-center mb-4 ",children:[(0,l.jsx)("div",{className:"text-center",children:"MOBILEBANKING"==e.mode||"MBANKING"==e.mode?(0,l.jsx)("div",{className:"img-fluid",children:(0,l.jsx)("img",{className:"img-fluid",width:200,height:200,src:e.data.logo,alt:"logo"})}):(0,l.jsx)("img",{src:o.O.baseUrl+(null===(h=e.data)||void 0===h?void 0:h.Image)+_+".png",className:"img-fluid",alt:"logo"})}),(0,l.jsxs)("div",{className:"form-outline mb-4",children:[(0,l.jsx)("label",{className:"",htmlFor:"form2Example22",children:"Payment Mode "}),(0,l.jsx)("input",{type:"text",id:"form2Example22",className:"form-control border ",value:e&&e.data&&e.data.PaymentGatewayName?e.data.PaymentModes:null===(x=e.data)||void 0===x?void 0:x.name,readOnly:!0})]}),(0,l.jsxs)("div",{className:"form-outline mb-4",children:[(0,l.jsx)("label",{className:"",children:"Amount"}),(0,l.jsx)("input",{type:"text",className:"form-control border ",readOnly:!0,value:N})]}),(0,l.jsxs)("div",{className:"form-outline mb-4",children:[(0,l.jsxs)("label",{className:"",children:["Remarks ",(0,l.jsx)("span",{className:"text-danger",children:"*"})]}),(0,l.jsx)("textarea",{className:"form-control border border-2 ms-2",onChange:e=>{w(e.target.value),I("")}}),S&&(0,l.jsx)("span",{className:"text-danger",children:S})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("button",{className:" btn btn-danger float-end ms-1 mt-4 mb-4",onClick:()=>{e.closeCallbak(),clearInterval(D)},children:"Cancel"}),(0,l.jsxs)("button",{className:"btn-main float-end me-1 mt-4 mb-4",disabled:A,onClick:()=>{procced()},children:["Pay ",A&&(0,l.jsx)(n.o,{})]})]})]})})})})})})]})}},2352:function(e,a,t){t.r(a),t.d(a,{__N_SSP:function(){return i}});var l=t(85893),s=t(6943),n=t(67294),r=t(10465),o=t(14165),d=t(50549),i=!0;a.default=e=>{let[a,t]=(0,n.useState)(),[i,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(),getPaymentPartner=async()=>{let a=[],l=e.data.PaymentModes.replace(/\s/g,"");var n=await s.Z.GetAllBankList(l);200==n.Code&&(t(n.Data.records),n.Data.records.map(e=>{a.push(e),u(a)}))}
1,[h,x]=(0,n.useState)(!1),[v,N]=(0,n.useState)(),handleInitiate=e=>{x(!0),N(e)};console.log(v,"data");let[f,p]=(0,n.useState)(""),handleSearch=()=>{t([]);let e=m.filter(e=>{let a=e.name.toLowerCase(),t=f.toLowerCase();return a.includes(t)});t(e)};return(0,n.useEffect)(()=>{setTimeout(()=>{(null==a||void 0==a)&&c(!1)},1e3)},[]),(0,n.useEffect)(()=>{getPaymentPartner()},[]),(0,l.jsxs)(l.Fragment,{children:[h&&(0,l.jsx)(r.Z,{show:h,onHide:()=>x(!1),children:(0,l.jsx)(r.Z.Body,{style:{},className:"m-0 p-0",children:(0,l.jsx)(o.default,{data:v,mode:"MOBILEBANKING",show:h,closeCallbak:()=>{x(!1)}})})}),!h&&(0,l.jsx)("div",{className:"row d-flex justify-content-center align-items-center mx-2",children:(0,l.jsx)("div",{className:"col-xl-12",children:(0,l.jsx)("div",{className:"card rounded-3 text-black",children:(0,l.jsx)("div",{className:"row g-0",children:(0,l.jsxs)("div",{className:"col-12",children:[(0,l.jsx)("div",{className:"text-center col-12 fw-bold fs-3 my-4 text-wrap",style:{color:"#031B4E",fontSize:"20px",fontWeight:"600",marginBottom:"15px"},children:"Choose Your Payment Bank"}),(0,l.jsxs)("div",{className:"col-12 d-flex flex-wrap",children:[(0,l.jsx)("div",{className:"col-lg-6 col-md-6 col-sm-12 my-2",children:(0,l.jsxs)("div",{className:"input-group col-10",children:[(0,l.jsx)("input",{value:f,onChange:e=>{p(e.target.value)},type:"text",placeholder:"Search...",name:"searchValue",autoComplete:"off",className:"form-control ",onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),handleSearch())}}),(0,l.jsx)("span",{className:"input-group-btn",children:(0,l.jsx)("button",{onClick:()=>{handleSearch()},className:"btn btn-primary gc-btn-search",type:"button",children:(0,l.jsx)("span",{className:"fa fa-search"})})})]})}),(0,l.jsx)("div",{className:"col-lg-6 col-md-6 col-sm-12 my-2 d-flex justify-content-center",children:(0,l.jsx)("button",{className:"btn btn-danger",onClick:()=>{e.closeCallback()},children:"Close"})})]}),(0,l.jsx)("div",{className:"card-body row",children:a&&a.map((e,a)=>(0,l.jsx)("div",{className:"col-md-6 col-sm-12 col-lg-6 my-1",children:i?(0,l.jsx)(d.Z,{count:1,borderRadius:40,highlightColor:"#5D9C59",height:65}):(0,l.jsxs)("div",{className:" border border-2 bg-green d-flex col-12 py-2",style:{cursor:"pointer",borderRadius:"40px"},onClick:()=>handleInitiate(e),children:[(0,l.jsx)("div",{className:" ms-4",style:{border:"10px",borderRadius:"40px",borderColor:"red"},children:(0,l.jsx)("img",{src:e.logo,height:60,width:60})}),(0,l.jsx)("div",{className:" text-wrap ms-2 text-sm text-md text-lg mt-2",children:e.name})]})},a))})]})})})})})]})}},50549:function(e,a,t){t.d(a,{Z:function(){return Skeleton}});var l=t(67294);let s=l.createContext({});function Skeleton({count:e=1,wrapper:a,className:t,containerClassName:n,containerTestId:r,circle:o=!1,style:d,...i}){var c,m,u;let h=l.useContext(s),x={...i};for(let[e,a]of Object.entries(i))void 0===a&&delete x[e];let v={...h,...x,circle:o},N={...d,...function({baseColor:e,highlightColor:a,width:t,height:l,borderRadius:s,circle:n,direction:r,duration:o,enableAnimation:d=!0}){let i={};return"rtl"===r&&(i["--animation-direction"]="reverse"),"number"==typeof o&&(i["--animation-duration"]=`${o}s`),d||(i["--pseudo-element-display"]="none"),("string"==typeof t||"number"==typeof t)&&(i.width=t),("string"==typeof l||"number"==typeof l)&&(i.height=l),("string"==typeof s||"number"==typeof s)&&(i.borderRadius=s),n&&(i.borderRadius="50%"),void 0!==e&&(i["--base-color"]=e),void 0!==a&&(i["--highlight-color"]=a),i}(v)},f="react-loading-skeleton";t&&(f+=` ${t}`);let p=null!==(c=v.inline)&&void 0!==c&&c,g=[],b=Math.ceil(e);for(let a=0;a<b;a++){let t=N;if(b>e&&a===b-1){let a=null!==(m=t.width)&&void 0!==m?m:"100%",l=e%1,s="number"==typeof a?a*l:`calc(${a} * ${l})`;t={...t,width:s}}let s=l.createElement("span",{className:f,style:t,key:a},"â");p?g.push(s):g.push(l.createElement(l.Fragment,{key:a},s,l.createElement("br",null)))}return l.createElement("span",{className:n,"data-testid":r,"aria-live":"polite","aria-busy":null===(u=v.enableAnimation)||void 0===u||u},a?g.map((e,t)=>l.createElement(a,{key:t},e)):g)}}}]);
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.