(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3310],{63296:function(e,t){"use strict";t.Z={src:"/_next/static/media/gym-logo.6bc69c72.jpeg",height:282,width:1600,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wgARCAABAAgDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAX/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAf/aAAwDAQACEAMQAAABiiP/xAAVEAEBAAAAAAAAAAAAAAAAAAAAAv/aAAgBAQABBQKH/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAwEBPwF//8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAgBAgEBPwF//8QAFBABAAAAAAAAAAAAAAAAAAAAAP/aAAgBAQAGPwJ//8QAFRABAQAAAAAAAAAAAAAAAAAAAEH/2gAIAQEAAT8hp//aAAwDAQACAAMAAAAQC//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABcQAAMBAAAAAAAAAAAAAAAAAAABscH/2gAIAQEAAT8Q0rP/2Q==",blurWidth:8,blurHeight:1}},36269:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return es},default:function(){return ed},useGState:function(){return ec}});var n=a(85893),o=a(67294);a(39332);var l=a(5121),r=a(36808),i=a.n(r),s=a(12918),c=a.n(s),d=a(9008),m=a.n(d);a(4298);var u=a(11163),p=a(84059),h=a(25617),g=a(86455),x=a.n(g),y=a(77630),_=a.n(y),f=a(2402),v=a(68887),j=a(35121),A=a(10428),N=a(67421),b=a(64366),C=a.n(b),S=a(14851),I=a(80047),D=a.n(I);function k(){let{handleVCashValidation:e,isVCashExist:t,isVCash:a}=ec(),{t:o}=(0,N.$G)("donate"),{locale:l}=(0,u.useRouter)();return(0,n.jsx)("div",{className:"d-flex",style:{marginTop:"30px",marginBottom:"40px"},children:(0,n.jsxs)("div",{children:[t&&(0,n.jsx)("h5",{className:D().vs_check,style:{lineHeight:"31px",textAlign:"en"==l?"left":"right"},children:"en"==l?"Does the phone number listed above have Vodafone Cash service ?":"هل رقم الهاتف المسجل بالأعلي عليه خدمة فودافون كاش ؟"}),(0,n.jsx)("div",{className:"col-8 p-0",children:t&&(0,n.jsxs)("div",{className:"d-flex",style:{gap:"150px",marginTop:"20px"},children:[(0,n.jsxs)("div",{className:"d-flex",style:{gap:"10px"},children:[(0,n.jsx)("input",{type:"radio",id:"yes",checked:"yes"==a,value:"yes",className:D().radio_payment_selector,name:"hasVCash",onChange:e}),(0,n.jsx)("label",{htmlFor:"yes",children:"en"==l?"yes":"نعم"})]}),(0,n.jsxs)("div",{className:"d-flex",style:{gap:"10px"},children:[(0,n.jsx)("input",{type:"radio",id:"no",checked:"no"==a,className:D().radio_payment_selector,value:"no",name:"hasVCash",onChange:e}),(0,n.jsx)("label",{htmlFor:"no",children:"en"==l?"no":"لا"})]})]})})]})})}function w(e){let{SIO:t}=e,{locale:a,query:l}=(0,u.useRouter)(),{handleInputValueChanges:r,valueError:i,mobileButton:s,isSuck:c,isSuckAmount:d,shortCodePrice:m,handelSelectCurrency:p}=ec(),[h,g]=(0,o.useState)([100,250,1e3]),[y,f]=(0,o.useState)("EGP"),[v,j]=(0,o.useState)(100),[A,b]=(0,o.useState)(!1),[C,S]=(0,o.useState)(0),I=_()(x()),[k,w]=(0,o.useState)(!0),{t:B}=(0,N.$G)("donate"),[E,P]=(0,o.useState)(l.amount||("en"==a?"Other":"اخرى")),T=e=>"string"!=typeof e?e:e.replace(/[\u0660-\u0669]/g,e=>String(e.charCodeAt(0)-1632)).replace(/[\u06F0-\u06F9]/g,e=>String(e.charCodeAt(0)-1776));(0,o.useEffect)(()=>{l.amount&&(w(!1),b(!0),P(l.amount)),c?(j(1),S(d)):j(100)},[c,d]),(0,o.useEffect)(()=>{"gym"==l.Donate[1]&&r(250)},[]),(0,o.useEffect)(()=>{P("en"==a?"Other":"اخرى")},[a]);let F=()=>{if(9===t.NgoId){if("EGP"===y);else if("USD"===y)return"en"==a?"American Dollar":"دولار أمريكي"}return"en"==a?"Egyptian pound":"جنيه المصري"};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{style:{flexDirection:"column",marginTop:"30px"},className:"d-flex align-items-start",children:[(0,n.jsx)("h5",{style:{fontWeight:600,color:"black"},children:(0,n.jsxs)("span",{children:[" ","en"==a?"Donation Amount":"قيمة التبرع"]})}),9===t.NgoId&&(0,n.jsxs)("div",{className:"form-select w-auto bg-transparent",children:[(0,n.jsx)("label",{className:"ml-3",children:"en"==a?"Currency":"العمله"}),(0,n.jsxs)("select",{style:{padding:"8px 12px",borderTop:0,borderLeft:0,borderRight:0,borderBottom:"1px solid #ddd",fontSize:"14px",width:"200px",marginBottom:"20px"},onChange:e=>{f(e.target.value),p(e)},value:y,children:[(0,n.jsx)("option",{value:"EGP",children:"en"==a?"Egyptian Pound":"جنيه مصري"}),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("option",{value:"USD",children:"en"==a?"US Dollar":"دولار أمريكي"})})]})]}),2==l.Donate.length&&(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[(0,n.jsx)("input",{type:"text",style:{textAlign:"center",width:"100px",margin:"20px 0"},disabled:!0,value:"".concat(250),onChange:()=>{}}),(0,n.jsx)("div",{className:D().mountLabel_2,style:{fontWeight:"700"},children:F()})]}),c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{fontWeight:600,color:"black",marginTop:"2rem"},children:["en"==a?"Total donation amount":" قيمة الصك الواحد",(0,n.jsxs)("p",{style:{display:"inline",fontWeight:600,color:"black",marginTop:"2rem"},children:[" ",d,(0,n.jsxs)("span",{style:{fontSize:".7rem",fontWeight:300,color:"black"},children:[" ",F()]})]})]}),(0,n.jsx)("p",{style:{display:"block",fontWeight:300,color:"black",marginTop:"1rem",marginBottom:"0",textAlign:"start"},children:"en"==a?"Suks:":"صكوك:"})]}),1==l.Donate.length&&(0,n.jsxs)("div",{children:[s&&(0,n.jsx)("div",{style:{cursor:"pointer",padding:"10px 30px",width:"max-content",background:"#eee",margin:"10px 0",fontWeight:"700",color:"#e6007e",border:"2px solid #e6007e"},children:"en"==a?"".concat(m," pound"):"".concat(m," جنيه")}),!s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:D().paymentMount,style:{marginBottom:"20px"},children:[c?(0,n.jsx)(n.Fragment,{children:k&&[1,2,4].map((e,t)=>(0,n.jsx)("div",{onClick:()=>{j(e),S(e*d),r(e*d)},className:D().amountButton,style:{cursor:"pointer",background:"#eee",fontWeight:"700",color:e==v&&"#e6007e",border:e==v&&"2px solid #e6007e"},children:e},t))}):k&&h.map((e,t)=>(0,n.jsx)("div",{onClick:()=>{j(e),r(e)},className:D().amountButton,style:{cursor:"pointer",background:"#eee",fontWeight:"700",color:e==v&&"#e6007e",border:e==v&&"2px solid #e6007e"},children:e},t)),(0,n.jsx)("input",{style:{width:"90px",height:"45px",textAlign:"center",border:A?"2px solid #e6007e":"0",outline:"0",background:"#eee",fontWeight:"700"},onChange:e=>{let{target:t}=e,n=Number(T(t.value));n>0&&n<=5e4&&!isNaN(n)?(c?(P(t.value),S(n*d),r(n*d)):(P(t.value),r(n)),b(!0)):(P(""),b(!1),I.fire({title:"ar"==a?"اقصي قيمه للتبرع 50000 جنيه مصري و اقل قيمه 1 مصري":"Maximum donation amount is 50,000 Egyptian pounds, and the minimum is 1 Egyptian pound",icon:"info",confirmButtonColor:"#3085d6",showCloseButton:!0,confirmButtonText:"استمرار"}).then(e=>{e.isConfirmed&&t.focus()}))},onBlur:e=>{let{target:t}=e;!t.value&&(w(!0),P("en"==a?"Other":"اخرى"),b(!1),c&&S(v*d))},onFocus:e=>{let{target:t}=e;w(!1),("اخرى"==t.value||"Other"==t.value)&&(P(""),S(0))},value:E}),!c&&(0,n.jsx)("div",{className:D().mountLabel_2,style:{fontWeight:"700"},children:F()}),(0,n.jsx)("div",{className:"text-danger mt-4",children:i})]}),c&&(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.jsx)("div",{style:{fontWeight:600,color:"black"},children:"en"==a?"Total donation amount":"اجمالي قيمة التبرع"}),(0,n.jsx)("div",{className:"".concat(D().amountButton," mx-3"),style:{cursor:"pointer",background:"#e6007e",fontWeight:"500",color:"#FFF"},children:C}),(0,n.jsx)("div",{style:{fontWeight:"300",fontSize:".8rem"},children:F()})]})]})]})]})})}var B=a(49321),E=a(5800),P=a(25287);function T(){var e;let{orangeOTP:t,setPhone:a,setMail:l,setUserName:r,userName:i,mail:s,firstName:c,seFirstName:d,lastName:m,setLastName:p,helalAddress:g,setHelalAdress:x,helalCountry:y,setHelalCountry:_}=ec(),[f,v]=(0,o.useState)(""),[j,A]=(0,o.useState)("EG");(0,o.useRef)(null);let{t:b}=(0,N.$G)("donate",{lng:"ar"}),{locale:C,query:S}=(0,u.useRouter)(),[I,k]=(0,o.useState)("ar"),w=(0,h.v9)(e=>{var t,a;return null===(a=e.NGOSingle)||void 0===a?void 0:null===(t=a.charity)||void 0===t?void 0:t.Id}),[B,T]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(!B){a(f);return}a(null)},[f]),(0,o.useEffect)(()=>{k(C)},[C]),(0,o.useEffect)(()=>{if("gym"==S.Donate[1]&&2==S.Donate.length&&i&&s&&f){localStorage.setItem("gym_userName",i),localStorage.setItem("gym_userEmail",s),localStorage.setItem("gym_userPhoneNumber",f);return}localStorage.removeItem("gym_userName"),localStorage.removeItem("gym_userEmail"),localStorage.removeItem("gym_userPhoneNumber")},[i,s,f]),(0,n.jsx)("div",{children:(0,n.jsxs)("form",{autoComplete:"on",children:[(null==S?void 0:null===(e=S.Donate)||void 0===e?void 0:e.length)==2&&(null==S?void 0:S.Donate[1])=="gym"&&(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"Name":"الاسم"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"abc",type:"text",autoComplete:"name",required:!0,value:i||"",onChange:e=>{r(e.target.value)}})]}),1===w&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"First Name":"الاسم الاول"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"firstName",type:"text",required:!0,value:c||"",onChange:e=>{d(e.target.value)}})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"Last Name":"الاسم الاخير"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"lastName",type:"text",required:!0,value:m||"",onChange:e=>{p(e.target.value)}})]})]}),(135===w||115===w||156===w||205===w||220===w||206===w)&&(0,n.jsxs)(n.Fragment,{children:[" ",(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"First Name":"الاسم الاول"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"firstName",type:"text",required:!0,value:c||"",onChange:e=>{d(e.target.value)}})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"Last Name":"الاسم الاخير"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"lastName",type:"text",required:!0,value:m||"",onChange:e=>{p(e.target.value)}})]})]}),(92===w||23===w)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"First Name":"الاسم الاول"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"firstName",type:"text",required:!0,value:c||"",onChange:e=>{d(e.target.value)}})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"Last Name":"الاسم الاخير"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"lastName",type:"text",required:!0,value:m||"",onChange:e=>{p(e.target.value)}})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"Address":"العنوان"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"address",type:"text",required:!0,value:g||"",onChange:e=>{x(e.target.value)}})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"City":"المدينه"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",placeholder:"",autoComplete:"country",type:"text",value:y||"",required:!0,onChange:e=>{_(e.target.value)}})]})]}),(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:"20px"},children:[(0,n.jsx)("label",{style:{color:"black",fontWeight:700},children:"en"==C?"Email Address":"البريد الالكتروني"}),(0,n.jsx)(E.Z,{dir:"ltr",className:"".concat(D().emailInput," form-control text-center"),variant:"standard",id:"email",placeholder:"abc@gmail.com",autoComplete:"email",type:"email",required:!0,value:s||"",onChange:e=>{l(e.target.value)}})]}),(0,n.jsx)("div",{className:"form-group mt-3 ml-auto p-0 ".concat(t?"d-none":""),children:(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)("i",{className:"mr-2 fa fa-spinner fa-spin"}),children:(0,n.jsx)(P.Z,{phone:f,handlePhoneChange:v,locale:I,country:j,setCountry:e=>A(e.value)})})})]})})}function F(e){let{createFrom:t}=e,{charity:a,router:o}=ec(),{t:l}=(0,N.$G)("header"),{locale:r,query:i}=(0,u.useRouter)();return(0,n.jsxs)("div",{id:"donationProgram",style:{textAlign:"en"==r?"left":"right"},children:[(0,n.jsx)("p",{style:{fontWeight:600,fontSize:"1.2rem",margin:0,marginBottom:"5px"},children:"en"==r?"Donation Programs":"برنامج التبرع"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(B.Z,{variant:"standard",className:"col-md-5 col-12",children:o.query.Donate&&(0,n.jsx)("select",{className:"form-select bg-transparent form-select-lg mb-3 ".concat(D().donateProgram),style:{border:"none",borderBottom:"1px solid gray"},defaultValue:+i.Donate[0],defaultChecked:i.Donate[0],onChange:e=>{var t;let n=(null==a?void 0:null===(t=a.DonationPrograms)||void 0===t?void 0:t.filter(t=>t.Id==e.target.value))[0].Name_en.replace(/ /g,"-"),{ngoName:l,donatenId:r,Donate:i,...s}=o.query;a&&o.push("/donate/".concat(l,"/").concat(n,"/").concat(e.target.value).concat(Object.keys(s).length>0?"?".concat(new URLSearchParams(s).toString()):""))},"aria-label":".form-select-lg example",children:null==a?void 0:a.DonationPrograms.map((e,t)=>(0,n.jsx)("option",{value:e.Id,name:e.Name_en,children:"en"==r?e.Name_en:e.Name},t))})}),(0,n.jsx)("input",{type:"hidden",name:"CauseId",defaultValue:o.query.Donate[0]}),(0,n.jsx)("input",{type:"hidden",name:"NgoId",defaultValue:o.query.Donate[1]})]}),t&&(0,n.jsx)(T,{})]})}function L(){let{charity:e}=ec(),{locale:t}=(0,u.useRouter)();return e?(0,n.jsx)("div",{className:"".concat(C().heroContainer),children:(0,n.jsx)("div",{className:"".concat(C().imgProvider),children:(null==e?void 0:e.Image)&&(0,n.jsx)("img",{loading:"lazy",style:{objectFit:"contain",width:"100%",height:"100%"},src:e.Image,alt:"en"===t?e.Name_en:e.Name_ar})})}):null}function M(){let{charity:e}=ec(),{locale:t}=(0,u.useRouter)();return e?(0,n.jsxs)("div",{className:D().donateForm,children:[(0,n.jsx)("h3",{style:{color:"black",fontWeight:700,margin:0,textAlign:"en"===t?"left":"right"},className:D().charityTitle,children:"en"===t?null==e?void 0:e.Name_en:null==e?void 0:e.Name_ar}),(0,n.jsx)(L,{})]}):null}let G=e=>{let{onClick:t,donateLoading:a,locale:o,children:l}=e;return(0,n.jsxs)("a",{className:D().donateBTN,style:{display:"flex",gap:"10px",background:a?"#3085d6":"#e6007e",borderRadius:"17px 0px 17px 17px",padding:"5px 40px",color:"#fff"},onClick:t,type:"button",children:[(0,n.jsxs)("div",{style:{marginLeft:"10px",fontWeight:"700",fontSize:"1.1rem",fontFamily:"cairo"},children:[a&&(0,n.jsx)("img",{loading:"lazy",src:"/loader.gif",width:20,height:20}),"en"===o?"Donate":"تبرع"]}),l]})};function R(){let{Donatefunc:e,mobileButton:t,system:a,shortCode:o,reCptStatus:l,mail:r,keyWord:i,donateLoading:s,shortCodePrice:c}=ec(),d=_()(x()),{t:m}=(0,N.$G)("donate"),{locale:p}=(0,u.useRouter)();return(0,n.jsx)("div",{style:{marginBottom:"80px",marginTop:"40px"},children:(0,n.jsxs)("div",{className:D().donateButton,style:{gap:"40px"},children:["Android"===a&&t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(G,{onClick:()=>{d.fire({title:" سيتم ارسال رسالة من موبيلك ".concat(o," الي الرقم"),text:"تكلفة الرسالة ".concat(c," جنيهات"),icon:"info",confirmButtonColor:"#3085d6",showCloseButton:!0,confirmButtonText:"نعم تبرع"}).then(async t=>{t.isConfirmed&&(async()=>{await e()&&document.getElementById("$mAndroid").click()})()})},donateLoading:s,locale:p,children:(0,n.jsx)("img",{loading:"lazy",src:"/heart-icon.svg"})}),(0,n.jsx)("a",{className:D().donateBTN,style:{display:"none"},href:"sms:".concat(o,";?body=").concat(i),id:"$mAndroid"})]}),"Android"===a&&!t&&(0,n.jsx)(G,{onClick:s?()=>{}:e,donateLoading:s,locale:p,children:(0,n.jsx)("img",{loading:"lazy",src:"/heart-icon.svg"})}),"Windows"===a&&(0,n.jsx)(G,{onClick:s?()=>{}:e,donateLoading:s,locale:p,children:(0,n.jsx)("img",{loading:"lazy",src:"/heart-icon.svg"})}),"Macintosh"===a&&(0,n.jsx)(G,{onClick:s?()=>{}:e,donateLoading:s,locale:p,children:(0,n.jsx)("img",{loading:"lazy",src:"/heart-icon.svg"})}),"IOS"===a&&t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{style:{display:"none"},href:"sms:".concat(o,";&body=").concat(i),id:"$mIphone"}),(0,n.jsx)(G,{onClick:()=>{d.fire({title:" سيتم ارسال رسالة من موبيلك ".concat(o," الي الرقم"),text:"تكلفة الرسالة ".concat(c," جنيهات"),icon:"info",confirmButtonColor:"#3085d6",showCloseButton:!0,confirmButtonText:"نعم تبرع"}).then(async t=>{t.isConfirmed&&(async()=>{await e()&&document.getElementById("$mIphone").click()})()})},donateLoading:s,locale:p,children:(0,n.jsx)("img",{loading:"lazy",src:"/heart-icon.svg"})})]}),"IOS"===a&&!t&&(0,n.jsx)(G,{onClick:s?()=>{}:e,donateLoading:s,locale:p,children:(0,n.jsx)("img",{loading:"lazy",src:"/heart-icon.svg"})})]})})}var O=a(74775);function q(){let{isVCash:e,mobileNum:t,handelVCashNum:a,vCashButton:l,mobileNumError:r}=ec(),{locale:i}=(0,u.useRouter)(),[s,c]=(0,o.useState)("EG");return(0,n.jsx)(n.Fragment,{children:l&&"no"==e&&(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"flex-start",flexDirection:"column",alignItems:"flex-start",gap:"20px",marginTop:"20px"},children:[(0,n.jsx)("div",{children:"en"==i?"Please Enter contain vodafone cash wallet":"يرجي ادخال رقم يحتوي علي محفظه"}),(0,n.jsx)(P.Z,{locale:i,mobileError:r,phone:t,country:s,setCountry:e=>{c(e.value||void 0)},handlePhoneChange:a}),(0,n.jsx)("p",{className:C().errorMSG,children:r})]})})}a(75573),a(50445);var W=a(25675),Z=a.n(W),Q=a(63296);function z(){let{locale:e}=(0,u.useRouter)();return(0,n.jsx)("div",{style:{position:"absolute",bottom:"1%",borderRadius:"10px",overflow:"hidden",left:"ar"==e?"5%":"",right:"en"==e?"5%":""},children:(0,n.jsx)(Z(),{width:200,height:60,src:Q.Z,alt:"gym-logo"})})}var V=a(34938);function U(){let{handlePaymentMethod:e,paymentId:t,isSuck:a,donateType:l}=ec(),{t:r}=(0,N.$G)("donate"),{locale:i,query:s}=(0,u.useRouter)();return(0,n.jsxs)("div",{id:"paymentMethod",className:"mt-3",style:{textAlign:"en"==i?"left":"right"},children:[(0,n.jsx)("h5",{style:{color:"black",fontWeight:600},className:" mt-4 pt-3 mb-4",children:"en"==i?"Choosing Payment Method":"اختيار طريقة الدفع"}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:D().paymentMethods,children:a?l&&l?l.slice(0).filter(e=>1!==e.PaymentType_Id).map((a,l)=>(0,n.jsx)(o.Fragment,{children:(0,n.jsxs)("div",{className:"align-items-center d-flex flex-column h-25 ml-4",children:[(0,n.jsxs)("label",{style:{marginBottom:"0",cursor:"pointer"},htmlFor:a.Name,className:"d-flex",children:[(0,n.jsx)("input",{type:"radio",name:"paymentType",checked:a.PaymentType_Id==t,id:a.Name,value:a.PaymentType_Id,className:D().radio_payment_selector+" mx-2",onChange:e}),"en"===i?a.Name:"التبرع من خلال فودافون كاش"===a.Name_ar?"فودافون كاش":"تحصيل من المنزل"===a.Name_ar?"نقدى":a.Name_ar]}),(0,n.jsx)("div",{className:"mt-1 d-flex align-items-center justify-content-center",style:{width:3===a.PaymentType_Id?"45px":"90px"},children:(0,n.jsx)("img",{src:a.Image,className:"mr-2",style:{objectFit:"contain",width:"100%"}})})]})},l)):"لا يوجد طريقة متاحه للدفع":l&&l?l.slice(0).map((a,l)=>(0,n.jsx)(o.Fragment,{children:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"1px"},children:[2==s.Donate.length&&"gym"==s.Donate[1]&&"1"!=a.PaymentType_Id&&(0,n.jsxs)("div",{className:"align-items-center d-flex flex-column h-25 ml-4",children:[(0,n.jsxs)("label",{style:{marginBottom:"0",cursor:"pointer"},htmlFor:a.Name,className:"d-flex",children:[(0,n.jsx)("input",{type:"radio",name:"paymentType",checked:a.PaymentType_Id==t,id:a.Name,value:a.PaymentType_Id,className:D().radio_payment_selector+" mx-2",onChange:e}),"en"===i?a.Name:"التبرع من خلال فودافون كاش"===a.Name_ar?"فودافون كاش":"تحصيل من المنزل"===a.Name_ar?"نقدى":a.Name_ar]}),(0,n.jsx)("div",{className:"mt-1 d-flex align-items-center justify-content-center",style:{width:3===a.PaymentType_Id?"45px":"90px"},children:(0,n.jsx)("img",{src:a.Image,className:"mr-3",style:{objectFit:"contain",width:"100%"}})})]},l),1==s.Donate.length&&(0,n.jsxs)("div",{className:"align-items-center d-flex flex-column h-25 ml-4",children:[(0,n.jsxs)("label",{style:{marginBottom:"0",cursor:"pointer"},htmlFor:a.Name,className:"d-flex",children:[(0,n.jsx)("input",{type:"radio",name:"paymentType",checked:a.PaymentType_Id==t,id:a.Name,value:a.PaymentType_Id,className:D().radio_payment_selector+" mx-2",onChange:e}),"en"===i?a.Name:"التبرع من خلال فودافون كاش"===a.Name_ar?"فودافون كاش":"تحصيل من المنزل"===a.Name_ar?"نقدى":a.Name_ar]}),(0,n.jsxs)("div",{className:"mt-1 d-flex align-items-center justify-content-center",style:{width:3===a.PaymentType_Id?"45px":"90px"},children:[" ",(0,n.jsx)("img",{src:a.Image,className:"mr-3",style:{objectFit:"contain",width:"100%"},alt:a.Name})]})]},l)]})},l)):"لا يوجد طريقة متاحه للدفع"})})]})}var $=a(90669),H=a(62347);function K(){var e,t,a,o,l;let{HtmlSaratanScript:r,html:i,ref:s}=ec(),c=(0,h.I0)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{type:"button",value:"Pay with Payment Page",onClick:()=>window.Checkout.showPaymentPage(),id:"showLightbox",style:{display:"none"}}),(0,n.jsx)("input",{type:"button",value:"Pay with Payment Page",onClick:()=>window.Checkout.showPaymentPage(),id:"showPaymentPage",style:{display:"none"}}),(0,n.jsx)("input",{type:"button",onClick:()=>{let e=new URLSearchParams(window.location.search),t=e.get("redirectionCampaign")||localStorage.getItem("redirectionCampaign"),a=e.get("campaignId")||localStorage.getItem("campaignId");c((0,H.se)(t,a))},id:"HandleSuccessPayment",style:{display:"none"}}),(0,n.jsx)("input",{type:"button",onClick:()=>c((0,H.$T)()),id:"HandlecancelledPayment",style:{display:"none"}}),(0,n.jsx)("input",{type:"button",onClick:()=>c((0,H.LV)()),id:"HandleErrorPayment",style:{display:"none"}}),i&&(0,n.jsx)($.Z,{id:"hh",html:i}),(0,n.jsx)("div",{children:(0,n.jsxs)("form",{id:"payment_confirmation",ref:s,action:"https://testsecureacceptance.cybersource.com/pay",method:"post",children:[(0,n.jsx)("input",{type:"hidden",name:"access_key",value:"6bf78705eed53b0d94f1933c168b75ce"}),(0,n.jsx)("input",{type:"hidden",name:"device_fingerprint_id",value:"23111d6293df3ch9893963814af169"}),(0,n.jsx)("input",{type:"hidden",name:"profile_id",value:"7FE24F3E-F94F-479E-98A3-7C158784B64B"}),(0,n.jsx)("input",{type:"hidden",name:"signed_field_names",value:"access_key,profile_id,transaction_uuid,signed_field_names,unsigned_field_names,signed_date_time,locale,transaction_type,reference_number,amount,currency"}),(0,n.jsx)("input",{type:"hidden",name:"unsigned_field_names"}),(0,n.jsx)("input",{type:"hidden",name:"locale",value:"en"}),(0,n.jsx)("input",{type:"hidden",name:"transaction_type",value:"sale"}),(0,n.jsx)("input",{type:"hidden",name:"currency",value:"EGP"}),(0,n.jsx)("input",{type:"hidden",name:"reference_number",value:null==r?void 0:null===(e=r.htmlSaratanScript)||void 0===e?void 0:e.reference_number}),(0,n.jsx)("input",{type:"hidden",name:"amount",value:null==r?void 0:null===(t=r.htmlSaratanScript)||void 0===t?void 0:t.amount}),(0,n.jsx)("input",{type:"hidden",name:"signature",value:null==r?void 0:null===(a=r.htmlSaratanScript)||void 0===a?void 0:a.signature}),(0,n.jsx)("input",{type:"hidden",name:"transaction_uuid",value:null==r?void 0:null===(o=r.htmlSaratanScript)||void 0===o?void 0:o.transaction_uuid}),(0,n.jsx)("input",{type:"hidden",name:"signed_date_time",value:null==r?void 0:null===(l=r.htmlSaratanScript)||void 0===l?void 0:l.signed_date_time})]})})]})}function J(){let{locale:e}=(0,u.useRouter)(),{setAddress:t}=ec();return(0,n.jsx)("form",{className:D().addressForm,children:(0,n.jsxs)("div",{className:"form-group",style:{textAlign:"en"==e?"left":"right"},children:[(0,n.jsx)("h6",{style:{color:"black"},className:"mt-4 mb-3",forhtml:"Textarea",children:"en"==e?"Address for collection":"عنوان التحصيل"}),(0,n.jsx)("textarea",{style:{fontFamily:"Tajawal",textAlign:"en"==e?"ltr":"rtl"},onChange:e=>t(e.target.value),required:!0,placeholder:"en"==e?"Write the address in detail here":"اكتب العنوان بالتفصيل هنا ",className:"form-control",dir:"rtl",id:"Textarea",rows:"3"})]})})}var X=(0,o.memo)(function(){let{DonateR:e,createFrom:t,orangeOTP:a,addressFlag:l,paymentId:r,SIO:i,charity:s}=ec(),{t:c}=(0,N.$G)("donate"),{locale:d,push:m,route:p,query:h}=(0,u.useRouter)(),[g,x]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{x(!0)},[]),(0,o.useEffect)(()=>{if(2==h.Donate.length&&"gym"==h.Donate[1]){if("Egyptian-Red-Crescent"==h.ngoName){localStorage.setItem("gym_NGO","egyptian red crescent");return}localStorage.setItem("gym_NGO",h.ngoName.split("-")[0].toLowerCase())}else localStorage.removeItem("gym_NGO"),localStorage.removeItem("gym_userName"),localStorage.removeItem("gym_userEmail"),localStorage.removeItem("gym_userPhoneNumber"),localStorage.removeItem("gym_timeSlot")},[h]),g)?s?(0,n.jsx)("div",{className:"".concat(C().heroSection),dir:"en"===d?"ltr":"rtl",children:(0,n.jsxs)("div",{className:"p-0 container",children:[e.loading?(0,n.jsx)(S.Z,{}):(0,n.jsxs)("div",{className:"".concat(C().spacer," ").concat("en"===d?C()["spacer-ar"]:""),children:[a&&(0,n.jsx)(V.Z,{}),(0,n.jsx)(M,{}),(0,n.jsx)(F,{createFrom:t}),(0,n.jsx)(U,{}),2==h.Donate.length&&"gym"==h.Donate[1]&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(O.Z,{}),(0,n.jsx)(z,{})]}),l&&(0,n.jsx)(J,{}),5==r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(k,{}),(0,n.jsx)(q,{})]}),(0,n.jsx)(w,{SIO:i}),(0,n.jsx)(R,{})]}),(0,n.jsx)(K,{})]})}):(0,n.jsx)(A.Z,{}):null}),Y=a(59932),ee=a(13992),et=a(4003),ea=a(58003),en=a(91246),eo=a(34511),el=a(23123),er=a(13638);let ei=(0,o.createContext)();var es=!0;let ec=()=>(0,o.useContext)(ei);var ed=(0,o.memo)(e=>{var t,a,r,s,d,g,y,N,b,C,S;let{SIO:I}=e;(0,er.T)();let D=(0,h.v9)(e=>e.DonationType),k={7:"life makers",29:"Egyptian-ClothingBank"},w={156:"Ekram",135:"wayana",115:"Mishkatnour",220:"Al-Adl-International-Development"},B=null==D?void 0:D.donateType,E=(0,h.v9)(e=>e.NGOSingle),{loading:P,charity:T}=E,[F,L]=(0,o.useState)(),[M,G]=(0,o.useState)(!1),[R,O]=(0,o.useState)("EGP"),q=(0,u.useRouter)(),W=(0,o.useRef)(),[Z,Q]=(0,o.useState)(q.query.amount),[z,V]=(0,o.useState)(),U=(0,h.I0)(),$=(0,h.v9)(e=>e.DonationR),K=(0,h.v9)(e=>e.HtmlScript),J=(0,h.v9)(e=>e.HtmlSaratanScript),[es,ec]=(0,o.useState)(!1),ed=(0,h.v9)(e=>e.Login),[em,eu]=(0,o.useState)(!1),[ep,eh]=(0,o.useState)(),[eg,ex]=(0,o.useState)("EG"),[ey,e_]=(0,o.useState)(),[ef,ev]=(0,o.useState)(!1),[ej,eA]=(0,o.useState)(!1),[eN,eb]=(0,o.useState)(!1),[eC,eS]=(0,o.useState)(!1),[eI,eD]=(0,o.useState)(!1),[ek,ew]=(0,o.useState)(!1),[eB,eE]=(0,o.useState)(!1),[eP,eT]=(0,o.useState)(""),[eF,eL]=(0,o.useState)(""),eM=_()(x()),[eG,eR]=(0,o.useState)(0),[eO,eq]=(0,o.useState)(""),[eW,eZ]=(0,o.useState)(""),[eQ,ez]=(0,o.useState)(""),[eV,eU]=(0,o.useState)(),[e$,eH]=(0,o.useState)(!1),[eK,eJ]=(0,o.useState)(0),[eX,eY]=(0,o.useState)(),[e0,e1]=(0,o.useState)(),[e2,e3]=(0,o.useState)(!0),[e5,e6]=(0,o.useState)((null==ed?void 0:null===(a=ed.user)||void 0===a?void 0:null===(t=a.User)||void 0===t?void 0:t.Email)?null==ed?void 0:null===(s=ed.user)||void 0===s?void 0:null===(r=s.User)||void 0===r?void 0:r.Email:null!==(S=q.query.email)&&void 0!==S?S:""),[e7,e9]=(0,o.useState)(!1),[e4,e8]=(0,o.useState)(""),[te,tt]=(0,o.useState)(""),[ta,tn]=(0,o.useState)(""),[to,tl]=(0,o.useState)(0),[tr,ti]=(0,o.useState)(""),[ts,tc]=(0,o.useState)((null==ed?void 0:null===(g=ed.user)||void 0===g?void 0:null===(d=g.User)||void 0===d?void 0:d.Mobile)?null==ed?void 0:null===(N=ed.user)||void 0===N?void 0:null===(y=N.User)||void 0===y?void 0:y.Mobile:""),[td,tm]=(0,o.useState)({utm_campaign:q.query.utm_campaign||i().get("utm_campaign")||"default",utm_content:q.query.utm_content||i().get("utm_content")||"default",utm_medium:q.query.utm_medium||i().get("utm_medium")||"default",utm_source:q.query.utm_source||i().get("utm_source")||"default",utm_term:q.query.utm_term||i().get("utm_term")||"default"}),[tu,tp]=(0,o.useState)(!1),[th,tg]=(0,o.useState)(),[tx,ty]=(0,o.useState)(),[t_,tf]=(0,o.useState)("yes"),[tv,tj]=(0,o.useState)(!1),{locale:tA}=(0,u.useRouter)(),[tN,tb]=(0,o.useState)(!1),[tC,tS]=(0,o.useState)(""),tI="en"===tA?v.Z:f.Z;(0,o.useEffect)(()=>{},[D]);let tD=e=>{console.log(e,"e"),"Mobile Balance"===e?(eu(!0),eb(!1),ev(!1),eD(!1),eE(!1),eS(!1),eA(!1),ew(!1)):"Credit Card"===e?(eu(!1),eb(!0),ev(!1),eD(!1),eE(!1),eA(!1),eS(!1),ew(!1)):"Orange"===e?(eu(!1),eb(!1),ev(!0),eD(!1),eE(!1),eS(!1),eA(!0),ew(!1)):"Vodafone Cash"===e?(eu(!1),eb(!1),eS(!0),ev(!1),eD(!1),eE(!1),eA(!1),ew(!1)):"Apple Pay"===e?(eu(!1),eb(!1),ev(!1),eD(!1),eE(!1),eS(!1),eA(!1),ew(!0)):(eu(!1),eb(!1),ev(!1),eD(!0),eE(!0),eS(!1),eA(!1),ew(!1))};function tk(e,t){if(!i().get(e)||q.query[e]&&i().get(e)!==q.query[e]){if(t)i().set(e,t),tm(a=>({...a,[e]:t}));else{var a;let t=(null===(a=document.cookie.split("; ").find(t=>t.startsWith("".concat(e,"="))))||void 0===a?void 0:a.split("=")[1])||"default";i().set(e,t)}}i().get(e)&&tm(t=>({...t,[e]:i().get(e)}))}(0,o.useEffect)(()=>{tk("utm_campaign",q.query.utm_campaign),tk("utm_content",q.query.utm_content),tk("utm_medium",q.query.utm_medium),tk("utm_source",q.query.utm_source),tk("utm_term",q.query.utm_term),e6(localStorage.getItem("email")),tc(localStorage.getItem("mobile")),1==q.query.Donate.length&&tS("TEST")},[]),(0,o.useEffect)(()=>{let{Donate:e}=q.query||{};e&&e.length>0&&l.Z.get("".concat(ea.gd).concat(e[0])).then(e=>{var t;let[a]=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.Data;if(a){let{NgoId:e,IsSuk:t,Amount:n,ShortCodePrice:o,Name:l,Keywords:r,ShortCode:i}=a;e&&(U((0,en.WO)(e)),U((0,en.UQ)(e||sessionStorage.getItem("charityId")))),ez(e),eH(t),eY(n),eJ(o),eR(i),t&&Q(n),e1(l||""),eq((null==r?void 0:r[0])||"mega")}else q.replace("/not-found")})},[eQ,q.query,e$]),(0,o.useEffect)(()=>{var e,t,a,n;B&&(null===(e=B[0])||void 0===e?void 0:e.Name)=="Mobile Balance"?(tD("Mobile Balance"),Q(5),V("Mobile Balance")):(tD(B&&(null===(a=B[0])||void 0===a?void 0:a.Name)),console.log(B,"donateType"),e$?Q(eX):Q(q.query.amount||100),e6(null!==(n=q.query.email)&&void 0!==n?n:""),V("")),eZ(B&&(null===(t=B[0])||void 0===t?void 0:t.PaymentType_Id))},[B]),(0,o.useEffect)(()=>{var e;i().get("user")||(null==ed?void 0:null===(e=ed.user)||void 0===e?void 0:e.Token)?e3(!1):e3(!0)},[(null==ed?void 0:ed.user)!=null?null==ed?void 0:null===(b=ed.user)||void 0===b?void 0:b.Token:i().get("user")]),(0,o.useEffect)(()=>{U((0,H.w2)()),U({type:eo.ay,payload:""});var e=navigator.userAgent||navigator.vendor||window.opera;e.includes("Windows")?eT("Windows"):e.includes("Macintosh")?eT("Macintosh"):e.includes("Android")?eT("Android"):e.includes("iPhone")&&eT("IOS"),tb(!0)},[]),(0,o.useEffect)(()=>{if(eU(K.htmlKashirScript),K.htmlKashirScript){var e=document.getElementsByClassName("el-kashier-button");if(document.getElementsByClassName(" iframe-close-button"),void 0!==e[0])e[0].click();else var t=setInterval(()=>{void 0!==e[0]&&(e[0].click(),clearInterval(t))},300)}},[K]),(0,o.useEffect)(()=>{!1==J.loading&&(null==J?void 0:J.htmlSaratanScript)!=null&&W.current.submit()},[J,M]),(0,o.useEffect)(()=>{if(D){let{donateType:e}=D;e&&(e.filter(e=>"Vodafone Cash"==e.Name).length>0?tj(!0):tj(!1))}},[D]);let tw=()=>{if(Z)return eI&&Z<1?(L("en"==tA?"Minimum donation amount is 1 Egyptian pound":"اقل قيمه للتبرع 1 جنيه مصري"),!1):eC&&Z<5?(L("en"==tA?"Minimum donation amount is 5":"اقل قيمه للتبرع 5"),!1):eN&&Z<1?(L("en"==tA?"Minimum donation amount is 1 Egyptian pound":"اقل قيمه للتبرع 1 جنيه مصري"),!1):eN&&Z<50&&k[I.NgoId]?(L("en"==tA?"Minimum donation amount is 50 Egyptian pound":"اقل قيمه للتبرع 50 جنيه مصري"),!1):(!eN||!(Z<5)||!w[I.NgoId])&&(!ek||!(Z<5)||!w[I.NgoId])||(L("en"==tA?"Minimum donation amount is 5 Egyptian pound":"اقل قيمه للتبرع 5 جنيه مصري"),!1)},tB=()=>!ep||"no"!==t_||11===ep.length&&ep.startsWith("010"),tE=()=>(e9(!1),eM.fire({icon:"error",title:"en"==tA?"Please make sure to enter the data correctly.":"برجاء التاكد من ادخال البيانات بطريقة صحيحة",showConfirmButton:!1,timer:3e3}),!1),tP=async()=>{var e,t,a,o,r,s,c,d,m,u,h,g,x,y,_,f;null==ed||null===(t=ed.user)||void 0===t||null===(e=t.User)||void 0===e||e.Email,(null==ed?void 0:null===(o=ed.user)||void 0===o?void 0:null===(a=o.User)||void 0===a?void 0:a.Email)?e6(ed.user.User.Email):e5&&e5.length>1&&e6(e5);let v=navigator.userAgent||navigator.vendor||window.opera,A=E.charity.DonationPrograms.find(e=>e.Id===+q.query.Donate[0]),N=B.find(e=>e.PaymentType_Id===eW),b={causeId:null==A?void 0:A.Id,causeNameAr:null==A?void 0:A.Name,causeNameEn:null==A?void 0:A.Name_en,ngoId:null==E?void 0:E.charity.Id,ngoNameAr:null==E?void 0:E.charity.Name_ar,ngoNameEn:null==E?void 0:E.charity.Name_en,email:null!==(m=null==ed?void 0:null===(s=ed.user)||void 0===s?void 0:null===(r=s.User)||void 0===r?void 0:r.Email)&&void 0!==m?m:e5,amount:Z,currecy:R,country:tI[eg],mobile_number:ts,paymentStatus:"pending",paymentTypeNameEn:null==N?void 0:N.Name,paymentTypeNameAr:null==N?void 0:N.Name_ar,...td};el.Z.setItem("_gtm",b);let C={PaymentType_Id:eW,Amount:Z,User_Id:i().get("userID")||"",Program_Id:q.query.Donate[0],PaymentStatus_Id:1,email:null!==(u=null==ed?void 0:null===(d=ed.user)||void 0===d?void 0:null===(c=d.User)||void 0===c?void 0:c.Email)&&void 0!==u?u:e5,msisdn:ts,Country:tI[eg],isoCountry:eg,firstName:e4,lastName:te,helalAddress:ta,CashCollectionAddress:eF,helalCountry:tr,selectedCurr:R,...td};if(localStorage.setItem("mobile",ts),156==I.NgoId&&(0,j.Mf)({ngoName:"مؤسسة إكرام للتنمية والأعمال الخيرية",causeId:null==A?void 0:A.Id,causeNameAr:null==A?void 0:A.Name,causeNameEn:null==A?void 0:A.Name_en,amount:Z,currency:R,email:null!==(x=null==ed?void 0:null===(g=ed.user)||void 0===g?void 0:null===(h=g.User)||void 0===h?void 0:h.Email)&&void 0!==x?x:e5}),eI)ts&&e5&&e5.includes("@")?U((0,H.y_)(C)).then(async e=>{eM.fire({icon:"success",title:"en"==tA?"A representative will be sent to collect the donation amount from you.":"سيتم ارسال المندوب اليكم لتحصيل مبلغ التبرع",showConfirmButton:!1,timer:3e3}),(0,j.$P)(b),q.replace("https://megakheir.com/cash-request-received/")}):(eM.fire({icon:"error",title:"en"==tA?"Please make sure to enter the data correctly.":"برجاء التاكد من ادخال البيانات بطريقة صحيحة",showConfirmButton:!1,timer:3e3}),e9(!1));else if(eN)e9(!0),(0,j.$P)(b),i().get("user")||ts&&ts.length>=11&&e5&&e5.includes("@")&&tC?98==eQ?(U((0,H.r6)(C)),e9(!1)):13==eQ?(U((0,H.GM)(C)),e9(!1)):(92!==eQ||e4&&te&&ta&&tr)&&(1!==eQ||e4&&te)?(U((0,H.uV)(C,R,Z,eQ)),e9(!1)):tE():tE();else if(em&&!(v.includes("Windows")||v.includes("Macintosh"))){if(C.email&&C.email.includes("@")&&!(C.msisdn.length<11))return(0,j.$P)({...b,paymentStatus:"redirected sms"}),U((0,H.tl)({...C,Amount:eK})),e9(!1),!0;tE()}else if(eC)console.log(C,"form handleButton"),(0,j.$P)({...b,paymentStatus:"redirected sms"}),i().get("user")?(tB()?(e9(!0),(0,j.$P)({...b,paymentStatus:"redirected vcash"}),U((0,H.iw)(C,ep,t_))):e_("en"==tA?"Please enter an Egyptian Vodafone number with a Vodafone Cash wallet.":"برجاء ادخال رقم فودافون مصري وبه محفظة فودافون كاش"),e9(!1)):ts&&ts.length>=11&&e5&&e5.includes("@")&&tC?(e9(!0),(0,j.$P)({donate_gtm_info:b}),U((0,H.iw)(C,ep,t_))):tE();else if(ej)i().get("user")&&tu?(e9(!0),(0,j.$P)({donate_gtm_info:b}),U((0,H.aB)(C,tx,th)).then(e=>{eM.fire({icon:"success",title:e,timer:3e3})})):tu&&e5&&e5.includes("@")&&tC?(e9(!0),(0,j.$P)({donate_gtm_info:b}),U((0,H.aB)(C,tx,th))):(e9(!1),eM.fire({icon:"error",title:"en"==tA?"Please make sure to enter the data correctly.":"برجاء التاكد من ادخال البيانات بطريقة صحيحة",showConfirmButton:!1,timer:3e3}));else if(ek){let e=await tw();if(e9(!0),C.email&&ts&&ts.length>=11&&C.email.includes("@")&&C.firstName&&C.lastName&&e){let e=await (0,l.Z)({method:"post",url:"/api/donate",headers:{"Content-Type":"application/json"},data:C});localStorage.setItem("DonationID",e.data.Id);let t={PaymentTypeId:+eW,Program_Id:+q.query.Donate[0],amount:Z,customerFirstName:C.firstName,customerLastName:C.lastName,donationID:+localStorage.getItem("DonationID")||+e.data.Id,Email:null!==(f=null==ed?void 0:null===(_=ed.user)||void 0===_?void 0:null===(y=_.User)||void 0===y?void 0:y.Email)&&void 0!==f?f:e5,msisdn:ts},a={method:"post",url:ea.Dn,headers:{"Content-Type":"application/json"},data:t},n=await (0,l.Z)(a);window.location.href=await n.data.Data.payment_data.redirectTo}else tE()}(v.includes("Windows")||v.includes("Macintosh"))&&em&&(C.email&&C.email.includes("@")&&!(C.msisdn.length<11)?((0,j.$P)({...b,paymentStatus:"redirected qr sms"}),U((0,H.tl)({...C,Amount:eK})),e9(!1),eM.fire({html:(0,n.jsxs)("div",{className:"align-items-center d-flex justify-content-around mt-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(p.Qd,{value:"sms:".concat(eG,";?body=").concat(eO)}),(0,n.jsx)("p",{children:"Android"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(p.Qd,{value:"sms:".concat(eG,";&body=").concat(eO)}),(0,n.jsx)("p",{children:"ios"})]})]}),footer:"en"==tA?"You can donate using a QR code from your mobile.":" QR يمكنك التبرع من خلال الموبايل بستخدام"})):tE())},tT=(0,o.useRef)(null);return q.query.Donate.length>2||2==q.query.Donate.length&&(null==q?void 0:null===(C=q.query)||void 0===C?void 0:C.Donate[1])!="gym"?(0,n.jsx)(c(),{statusCode:404}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(m(),{children:[I.Description_ar&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{name:"description",content:I.Description_ar},"desc"),(0,n.jsx)("meta",{property:"og:description",content:I.Description_ar},"desc:og"),(0,n.jsx)("meta",{name:"twitter:description",content:I.Description_ar},"desc:twitter")]}),I.Name_ar&&I.Name_en&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:"en"==q.locale?"Donate for - ".concat(I.Name_en):"تبرع ".concat(I.Name_ar)}),(0,n.jsx)("meta",{name:"twitter:title",content:"en"==q.locale?"Donate for - ".concat(I.Name_en):"تبرع ".concat(I.Name_ar)},"og-title-twitter"),(0,n.jsx)("meta",{property:"og:title",content:"en"==q.locale?"Donate for - ".concat(I.Name_en):"تبرع ".concat(I.Name_ar)},"og-title")]}),I.NgoId&&(0,n.jsx)("script",{src:29==I.NgoId||7==I.NgoId?"https://cibpaynow.gateway.mastercard.com/static/checkout/checkout.min.js":"https://banquemisr.gateway.mastercard.com/static/checkout/checkout.min.js","data-complete":"successCallBack","data-error":"errorCallback","data-cancel":"cancelCallback"})]}),tN&&(0,n.jsx)(ee.Z,{}),(P||!eQ)&&(0,n.jsx)(A.Z,{}),(!P||eQ)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ei.Provider,{value:{handleInputValueChanges:e=>{Q(e)},handleIncrementValue:e=>{e$?Q(+Z+eX):Q(+Z+5)},handlePaymentMethod:e=>{console.log(e.target.id,"e.target.id"),"Cash Collection"==e.target.id?(eZ(e.target.value),tD("Cash Collection"),V(""),e$?Q(eX):Q(100)):"Credit Card"==e.target.id?(tD("Credit Card"),eZ(e.target.value),e$?Q(eX):Q(100),V("")):"Vodafone Cash"==e.target.id?(tD("Vodafone Cash"),eZ(e.target.value),e$?Q(eX):Q(100),V("")):"Orange"==e.target.id?(tD("Orange"),eZ(e.target.value),Q(5),V("")):"Apple Pay"==e.target.id?(tD("Apple Pay"),eZ(e.target.value),V("")):(tD("Mobile Balance"),Q(5),eZ(e.target.value),V(e.target.name))},handelSelectCurrency:e=>{O(()=>e.target.value)},handleDecrementValue:e=>{e$?Q(+Z===eX?eX:+Z-eX):Q(+Z-5)},Donatefunc:tP,handleVCashValidation:e=>{tf(e.currentTarget.value)},handleDeleteInp:e=>{let{target:t}=e;t.setSelectionRange(t.value.length,t.value.length)},setMail:e6,handelVCashNum:e=>{eh(e.replace("+2",""))},setReCptStatus:ec,setAddress:eL,setPhone:tc,setUserName:tS,country:eg,setCountry:ex,reCptStatus:es,recaptchaRef:tT,router:q,HtmlSaratanScript:J,incrementValid:z,mobileButton:em,applePayButton:ek,addressFlag:eB,vCashButton:eC,isVCashExist:tv,createFrom:e2,orangeOTP:ej,paymentId:eW,valueError:F,donateType:B,charity:T,DonateR:$,value:Z,isSuck:e$,system:eP,html:eV,ref:W,keyWord:eO,isVCash:t_,userName:tC,shortCode:eG,mail:e5,firstName:e4,seFirstName:e8,lastName:te,setLastName:tt,helalAddress:ta,setHelalAdress:tn,helalCountry:tr,setHelalCountry:ti,setIsSuckAmount:eY,isSuckAmount:eX,donateLoading:e7,setDoanteLoading:e9,shortCodePrice:eK,setShortCodePrice:eJ,SIO:I,displayErrorModal:tE},children:(0,n.jsx)(X,{})})}),(0,n.jsx)(et.Z,{}),(0,n.jsx)(Y.Z,{})]})})},59932:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var n=a(85893),o=a(67294),l=a(41664),r=a.n(l),i=a(15411),s=a(49281),c=a(26963),d=a(99951),m=a.n(d);let u=o.forwardRef((e,t)=>{let{icon:a,link:o}=e;return(0,n.jsx)(r(),{ref:t,href:o,legacyBehavior:!0,children:(0,n.jsx)("span",{ref:t,children:a})})});function p(e){let{disabled:t}=e,a=[{icon:(0,n.jsx)(s.m11,{}),link:"https://apps.apple.com/eg/app/megakheir/id912457394"},{icon:(0,n.jsx)(i.h3E,{}),link:"https://apps.apple.com/eg/app/megakheir/id912457394"},{icon:(0,n.jsx)(i.b1v,{}),link:"https://apps.apple.com/eg/app/megakheir/id912457394"},{icon:(0,n.jsx)(s.E08,{}),link:"https://apps.apple.com/eg/app/megakheir/id912457394"},{icon:(0,n.jsx)(c.AGi,{}),link:"https://apps.apple.com/eg/app/megakheir/id912457394"}];return(0,n.jsx)("div",{className:m().bottom_header,children:(0,n.jsxs)("div",{className:"container d-flex justify-content-between",children:[(0,n.jsxs)("div",{className:m().bottom_header_text,dir:"rtl",children:[(0,n.jsx)("div",{children:"تابعنا علي"}),a.map((e,a)=>(0,n.jsx)("div",{className:m().bottom_header_icons,children:t?e.icon:(0,n.jsx)(u,{icon:e.icon,link:e.link})},a))]}),(0,n.jsxs)("div",{className:m().bottom_header_logo,dir:"rtl",children:["تحت رعايه",(0,n.jsx)("div",{children:(0,n.jsx)("img",{loading:"lazy",src:"/LG.svg",alt:"LOGO"})})]})]})})}},13992:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var n=a(85893),o=a(67294),l=a(25675),r=a.n(l),i=a(11163);function s(){let{locales:e,locale:t,push:a,route:o}=(0,i.useRouter)(),l=e=>{a("en"==e?"/en/".concat(window.location.pathname.replace("/en/","/")):window.location.pathname.replace("/en/","/"),void 0,{locale:e})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"d-none d-lg-block cursor-pointer",children:(0,n.jsx)("button",{className:"button pb-2 font-weight-bold bg-transparent border-0 text-dark pointer",onClick:()=>l("ar"==t?"en":"ar"),children:"ar"==t?"En":"ع"})}),(0,n.jsx)("div",{className:"d-md-none cursor-pointer",children:(0,n.jsx)("button",{className:"button pb-2 font-weight-bold bg-transparent border-0 text-dark pointer",onClick:()=>l("ar"==t?"en":"ar"),children:"ar"==t?"En":"ع"})})]})}a(67421);var c=a(99951),d=a.n(c),m=e=>{let{SMLogo:t,LGLogo:a,disabled:l}=e,[c,m]=(0,o.useState)(!1),{locale:u}=(0,i.useRouter)();return(0,o.useEffect)(()=>{let e;e=window.innerWidth>750?110:100,window.addEventListener("scroll",()=>{if(window.scrollY>e){m(!0);return}m(!1)})},[]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("nav",{className:"".concat(d().nvaStyle," ").concat(c&&d().navAnimate," pb-1"),children:(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},className:"container",dir:"en"==u?"ltr":"rtl",children:[(0,n.jsx)("div",{style:{width:"max-content"},children:l?(0,n.jsx)("img",{style:{objectFit:"cover",cursor:"pointer"},alt:"logo",src:"/Navbar/black-logo.png"}):(0,n.jsx)("img",{onClick:()=>window.location.replace("https://megakheir.com/"),style:{objectFit:"cover",cursor:"pointer"},alt:"logo",src:"/Navbar/black-logo.png"})}),!t&&!a&&(0,n.jsx)(s,{}),t&&a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"d-lg-none",children:(0,n.jsx)(r(),{width:70,height:50,className:d().sm_logo,src:t,alt:"logo"})}),(0,n.jsx)("div",{className:"d-none d-lg-block",children:(0,n.jsx)(r(),{width:80,height:60,src:a,alt:"logo",className:d().bg_logo})})]})]})})})}},4003:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var n=a(85893),o=a(67294),l=a(11163),r=a(99951),i=a.n(r);function s(e){let{disabled:t}=e,a=[{link_ar:"سياسه الاسترجاع",link_en:"Refund Policy",route_ar:" https://megakheir.com/refund-policy-ar/",route_en:" https://megakheir.com/refund-policy-en/"},{link_ar:"الشروط و الاحكام",link_en:"Terms & Conditions",route_ar:"https://megakheir.com/terms-conditions-ar/",route_en:"https://megakheir.com/terms-conditions-en/"}],{locale:r}=(0,l.useRouter)();return(0,n.jsx)("footer",{className:i()["primary-footer"],children:a.map((e,l)=>(0,n.jsxs)(o.Fragment,{children:[t?(0,n.jsx)("p",{className:"mb-0 ".concat(i()["primary-footer-link"]),children:"en"!=r?e.link_ar:e.link_en}):(0,n.jsx)("a",{className:i()["primary-footer-link"],href:"en"!=r?e.route_ar:e.route_en,children:"en"!=r?e.link_ar:e.link_en}),l({value:e,label:h[e]}));return(0,n.jsxs)("section",{className:"align-items-baseline col-lg-12 col-md-6row p-0 d-flex flex-wrap",children:[(0,n.jsxs)("div",{className:"col-12 col-lg-3 p-0 position-relative",children:[(0,n.jsx)("p",{style:{color:"black",fontWeight:700,margin:"20px 0 5px 0",paddingRight:"10px"},children:"en"==t?"Country":"البلد"}),(0,n.jsx)("span",{className:"fi fi-".concat((g||"").toLowerCase()," mr-2"),style:{position:"absolute",left:"en"===t&&".2rem",right:"en"!==t&&".2rem",top:"3.7rem",zIndex:"90"}}),(0,n.jsx)(p.ZP,{defaultInputValue:h[g],className:"ol-12 col-lg-9 mb-3 p-0 ".concat(d().phone_input),name:"country",onMenuOpen:()=>_(!0),onMenuClose:()=>_(!1),options:f,onChange:e=>{console.log(e.value),e.value&&x(e.value)},onKeyDown:e=>{9===e.keyCode&&e.preventDefault()},styles:{blockquote:{fontStyle:"italic",fontSize:".75rem",margin:"1rem 0"},label:{fontSize:".75rem",fontWeight:"bold",lineHeight:2,width:"50rem"},indicatorsContainer:e=>({...e,color:"black"}),indicatorSeparator:e=>({...e,background:"transparent"}),control:e=>({...e,border:"none",borderBottom:"1px solid gray",borderRadius:"none"}),input:e=>({...e,paddingLeft:"en"===t?"2rem":"0",paddingRight:"en"!==t?"2rem":"0",border:"none"}),singleValue:e=>({...e,marginLeft:"en"===t?"2rem":"0",textAlign:"en"===t?"left":"right",marginRight:"en"!==t?"2rem":"0"})}},t),(0,n.jsx)(m.Z,{children:(0,n.jsx)("span",{className:"fa fa-search mr-2 ".concat(d().searchIcon," ").concat(d()[t])})}),(0,n.jsx)("input",{id:"country",hidden:!0,value:h[g]})]}),(0,n.jsxs)(m.Z,{className:"col-12 col-lg-2 px-0 mt-0",children:[(0,n.jsx)("p",{style:{color:"black",fontWeight:700,margin:"20px 0 5px 0",paddingRight:"10px"},children:"en"==t?"Phone Number":"رقم الهاتف"}),(0,n.jsx)(l.ZP,{defaultCountry:g,placeholder:"+(code) xxx-xxx-xxx",className:"form-control border-nones w-100 ".concat(d().phone_input),value:c,country:g,direction:"ltr",id:"phone-number",autofill:"tel",type:"tel",international:!0,withCountryCallingCode:!0,autoComplete:"tel",onChange:e=>{e||x(e),a(e)},style:{border:"none",borderBottom:"1px solid gray",borderRadius:"0",direction:"ltr",width:"200px","@media (maxWidth: 560px)":{width:"300px !important"}}})]}),(0,n.jsx)("p",{className:d().errorMSG,children:u})]})})},14851:function(e,t,a){"use strict";var n=a(85893);a(67294);var o=a(60089),l=a(64366),r=a.n(l);t.Z=()=>(0,n.jsx)(o.E.div,{initial:{opacity:.7},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",ease:"easeOut"},style:{zIndex:1500,top:0,bottom:0,left:0,right:0,backgroundColor:"white"},className:"align-items-center d-flex fixed h-100 justify-content-center position-fixed w-100",children:(0,n.jsx)("div",{className:"text-center mt-5 ".concat(r().loading),children:(0,n.jsx)("div",{className:"loading",children:"Loading…"})})})},13638:function(e,t,a){"use strict";a.d(t,{T:function(){return r}});var n=a(67294),o=a(25617),l=a(62347);let r=()=>{let e=(0,o.I0)();return(0,n.useEffect)(()=>{let t=()=>{let t=new URLSearchParams(window.location.search),a=t.get("paymentStatus"),n=t.get("result"),o=t.get("status"),r=window.location.hash,i=r.includes("#__hc-action-complete"),s=r.includes("#__hc-action-cancel"),c=r.includes("#__hc-action-error");a||n||o?"SUCCESS"===a||"SUCCESS"===n||"SUCCESS"===o?(console.log("Detected successful payment redirect from Banque Misr/CIB"),e((0,l.se)())):"CANCELLED"===a||"CANCELLED"===n||"CANCELLED"===o?(console.log("Detected cancelled payment redirect from Banque Misr/CIB"),e((0,l.$T)())):("FAILED"===a||"FAILED"===n||"FAILED"===o)&&(console.log("Detected failed payment redirect from Banque Misr/CIB"),e((0,l.LV)())):(i||s||c)&&(i?(console.log("Detected successful payment redirect from payment gateway (hash)"),e((0,l.se)())):s?(console.log("Detected cancelled payment redirect from payment gateway (hash)"),e((0,l.$T)())):c&&(console.log("Detected failed payment redirect from payment gateway (hash)"),e((0,l.LV)())))};t();let a=()=>{t()};return window.addEventListener("hashchange",a),()=>{window.removeEventListener("hashchange",a)}},[e]),{successCallback:()=>e((0,l.se)()),cancelCallback:()=>e((0,l.$T)()),errorCallback:t=>e((0,l.LV)(t))}}},74775:function(e,t,a){"use strict";a.d(t,{Z:function(){return p}});var n=a(85893),o=a(67294),l=a(11163),r=a(67421),i=a(80047),s=a.n(i);function c(e){let{setActiveValueEn:t,setActiveValueAr:a,activeValueEn:o,activeValueAr:i}=e,{locale:c}=(0,l.useRouter)(),{t:d}=(0,r.$G)("donate"),m=e=>{"ar"==c?a(e):t(e),("لن احضر"==e||"will not attend"==e)&&localStorage.removeItem("gym_timeSlot")};return(0,n.jsxs)("div",{style:{display:"flex",alignItems:"start",flexDirection:"column",gap:"10px"},children:[(0,n.jsx)("div",{style:{color:"black",fontWeight:600},className:" mt-4 pt-3 mb-4",children:"en"==c?"Will you attend the event?":"هل ستحضر الحدث ؟"}),(0,n.jsx)("div",{style:{display:"flex",justifyContent:"space-between",width:"300px"},children:({en:["will not attend","will attend"],ar:["لن احضر","سوف احضر "]})[c].map((e,t)=>(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("input",{type:"radio",name:"eventType",checked:"ar"==c?e==i:e==o,id:t,value:e,className:s().radio_payment_selector,onChange:()=>m(e)},t),(0,n.jsx)("label",{style:{marginBottom:"0",cursor:"pointer"},htmlFor:t,children:e})]},t))})]})}var d=a(5121),m=a(58003);function u(){let[e,t]=(0,o.useState)([]),[a,i]=(0,o.useState)(e[0]),{t:c}=(0,r.$G)("donate"),{locale:u}=(0,l.useRouter)(),p=async()=>{try{let e=(await d.Z.get(m.Dy)).data;t(e),i(e[0]),localStorage.setItem("gym_timeSlot",e[0])}catch(e){console.error("Error fetching time slots:",e)}},h=e=>{i(e),localStorage.setItem("gym_timeSlot",e)};return(0,o.useEffect)(()=>{p()},[]),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"start",flexDirection:"column",gap:"10px"},children:[(0,n.jsx)("div",{style:{color:"black",fontWeight:600},className:" mt-4 pt-3 mb-4",children:"en"==u?"Please choose your arrival time":"الرجاء اختيار موعد الحضور"}),(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",width:"300px"},children:[0==e.length&&(0,n.jsx)("i",{className:"mr-2 fa fa-spinner fa-spin"}),e.length>0&&e.map((e,t)=>(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,n.jsx)("input",{type:"radio",name:"timeSlot",checked:a==e,id:e,value:e,className:s().radio_payment_selector,onChange:()=>h(e)},t),(0,n.jsx)("label",{style:{marginBottom:"0",cursor:"pointer"},htmlFor:e,children:e})]},t))]})]})}function p(){let[e,t]=(0,o.useState)("لن احضر"),[a,r]=(0,o.useState)("will not attend"),{locale:i}=(0,l.useRouter)();return(0,n.jsxs)("div",{children:[(0,n.jsx)(c,{activeValueAr:e,activeValueEn:a,setActiveValueAr:t,setActiveValueEn:r}),"ar"==i&&"لن احضر"!=e&&(0,n.jsx)(u,{}),"en"==i&&"will not attend"!=a&&(0,n.jsx)(u,{})]})}},34938:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var n=a(85893),o=a(67294),l=a(25617),r=a(62347),i=a(64366),s=a.n(i);let c=e=>{let[t,a]=(0,o.useState)(),[i,c]=(0,o.useState)(!1),[d,m]=(0,o.useState)({otp1:"",otp2:"",otp3:"",otp4:""}),[u,p]=(0,o.useState)(!1),[h,g]=(0,o.useState)(),x=(0,l.I0)(),y=(0,l.v9)(e=>e.OtpVerfication);(0,o.useEffect)(()=>{},[y]);let _=()=>{let e="";return(isNaN(t)&&(e="رقم الهاتف غير صحيح يجب ان يبداء ب *******012*"),t&&t.length>0&&11!==t.length&&(e="رقم الهاتف غير صحيح يجب ان يبداء ب ********012#"),t&&t.startsWith("012")||(e="رقم الهاتف غير صحيح يجب ان يبداء ب ********012"),e)?(g(e),!1):(g(e),!0)},f=e=>{m({...d,[e.target.name]:e.target.value.replace(/[^0-9]/g,"")})},v=e=>{if("Delete"===e.key||"Backspace"===e.key){let t=e.target.tabIndex-2;t>-1&&e.target.form.elements[t].focus()}else{let t=e.target.tabIndex;t<4&&e.target.form.elements[t].focus()}};return(0,n.jsxs)("div",{className:"container pt-3",children:[(0,n.jsx)("div",{className:"d-flex justify-content-center",children:(0,n.jsxs)("form",{className:"text-center",onSubmit:e=>{e.preventDefault(),_()&&(x((0,r.VV)(t)),c(!0),p(!0))},children:[(0,n.jsxs)("div",{className:"form-group",children:[(0,n.jsx)("input",{type:"text",className:"form-control text-center",placeholder:"برجاء ادخال رقم الهاتف",onChange:e=>{a(e.target.value)},disabled:u}),(0,n.jsx)("p",{className:s().errorMSG,children:h})]}),(0,n.jsx)("button",{type:"submit",className:"btn btn-primary",children:"ادخال الرقم"}),y.sendOTPMessage?(0,n.jsx)("p",{className:"pt-3 alert alert-success",children:y.sendOTPMessage}):null,y.sendOTPMessageFail?(0,n.jsx)("p",{className:"pt-3 alert alert-danger",children:y.sendOTPMessageFail}):null]})}),(0,n.jsx)("div",{className:"d-flex justify-content-center",children:i?(0,n.jsxs)("section",{className:" py-4 my-5 text-center ",children:[(0,n.jsx)("p",{children:"برجاء كتابة رموز التاكيد من اليسار الى اليمين"}),(0,n.jsxs)("form",{onSubmit:a=>{a.preventDefault();let n=Object.values(d).join("");x((0,r.c_)(t,+n)).then(a=>{e.orangeButtonValidate(a,t,+n)})},children:[(0,n.jsxs)("div",{className:"".concat(s().otpContainer),children:[(0,n.jsx)("input",{type:"text",name:"otp1",autoComplete:"off",className:"".concat(s().otpInput),onChange:f,value:d.otp1,tabIndex:"1",maxLength:"1",onKeyUp:e=>v(e)}),(0,n.jsx)("input",{type:"text",name:"otp2",autoComplete:"off",className:"".concat(s().otpInput),onChange:f,value:d.otp2,tabIndex:"2",maxLength:"1",onKeyUp:e=>v(e)}),(0,n.jsx)("input",{type:"text",name:"otp3",autoComplete:"off",className:"".concat(s().otpInput),onChange:f,value:d.otp3,tabIndex:"3",maxLength:"1",onKeyUp:e=>v(e)}),(0,n.jsx)("input",{type:"text",name:"otp4",autoComplete:"off",className:"".concat(s().otpInput),onChange:f,value:d.otp4,tabIndex:"4",maxLength:"1",onKeyUp:e=>v(e)})]}),(0,n.jsx)("button",{className:"btn btn-primary",type:"submit",children:"تأكيد الرقم"})]}),y.verifyMessageFail||y.verifyMessageFail?(0,n.jsx)("div",{className:"alert alert-danger m-0 my-2 py-2",role:"alert",children:y.verifyMessageFail}):"",y.verifyMessage||y.verifyMessage?(0,n.jsxs)("div",{className:"alert alert-success m-0 my-2 py-2",role:"alert",children:[y.verifyMessage,(0,n.jsx)("p",{children:"برجاء الضغط على تبرع"})]}):""]}):null})]})};function d(){return(0,n.jsx)("div",{children:(0,n.jsx)("p",{children:(0,n.jsx)(o.Suspense,{fallback:(0,n.jsx)("div",{children:"loading..."}),children:(0,n.jsx)(c,{orangeButtonValidate:orangeButtonValidate})})})})}},91246:function(e,t,a){"use strict";a.d(t,{UQ:function(){return c},WO:function(){return i},Yu:function(){return r},qC:function(){return s}});var n=a(5121),o=a(34511),l=a(58003);let r=()=>async e=>{try{e({type:o.G1});let t=await n.Z.get(l.Uz);e({type:o.$P,payload:t.data.Data})}catch(t){e({type:o.yW,payload:t.response&&t.response.data.message?t.response.data.message:t.message}),console.log(t)}},i=e=>async t=>new Promise((a,r)=>{n.Z.get(l.b$+1*e).then(e=>{t({type:o.IV,payload:e.data.Data}),a(e.data.Data)}).catch(e=>{t({type:o.V9,payload:e.response&&e.response.data.message?e.response.data.message:e.message}),console.log(e)})}),s=e=>async t=>{var a={method:"get",url:l.Hg+1*e,headers:{}};return new Promise((e,t)=>{(0,n.Z)(a).then(t=>{e(t.data.Data)}).catch(e=>{console.log(e.response),t()})})},c=e=>async t=>{try{localStorage.removeItem("Mobile Balance"),localStorage.removeItem("Credit Card"),localStorage.removeItem("Cash Collection");let a=await n.Z.get(l.Ot+e);"1"==a.data.Status&&t({type:o.fm,payload:a.data.Data})}catch(e){console.log(e)}}},80047:function(e){e.exports={donateForm:"GDonate_donateForm__MOb17",donateBTN:"GDonate_donateBTN__6gR12",imk_Img_Container:"GDonate_imk_Img_Container__8sZND",errorText:"GDonate_errorText__UeAXx",dropSearch:"GDonate_dropSearch__5QYV5",phoneProvider:"GDonate_phoneProvider__fbGjT",dropInput:"GDonate_dropInput__fckuR",dropper:"GDonate_dropper__AIZKa",Logo_Img:"GDonate_Logo_Img__sOGH7",imk_Img:"GDonate_imk_Img__whIfw",form_control:"GDonate_form_control__eHzGn",mountLabel:"GDonate_mountLabel__8Hkm2",paymentMethods:"GDonate_paymentMethods__Hm2Mn",radio_payment_selector:"GDonate_radio_payment_selector__yuoPO",share_btn:"GDonate_share_btn__EzQjM",amountButton:"GDonate_amountButton__9AMvK",paymentMount:"GDonate_paymentMount__DQx8N",addressForm:"GDonate_addressForm__seLF6",vs_check:"GDonate_vs_check__a_Fbs",donateProgram:"GDonate_donateProgram__c1Lil",emailInput:"GDonate_emailInput__qUzX0",phone_input:"GDonate_phone_input__4_iQW",donateButton:"GDonate_donateButton__tmGlh",charityTitle:"GDonate_charityTitle__haS_E",mountLabel_2:"GDonate_mountLabel_2__5idf9"}},99951:function(e){e.exports={dir:"layout_dir__97qy4",right:"layout_right__VyLib",logo:"layout_logo__sEiH5",nvaStyle:"layout_nvaStyle__99l83",navAnimate:"layout_navAnimate__LqJQR",scroller:"layout_scroller__FemEU","primary-footer":"layout_primary-footer__8D942","primary-footer-link":"layout_primary-footer-link__9NCLZ",top_header:"layout_top_header__2yRI9",bottom_header:"layout_bottom_header__JHk2P",bottom_header_text:"layout_bottom_header_text__SfjtJ",bottom_header_icons:"layout_bottom_header_icons__QE3Ij",bottom_header_logo:"layout_bottom_header_logo___6zOm",top_header_box:"layout_top_header_box__BQv_B",top_header_text:"layout_top_header_text__dhgS_",top_header_icons:"layout_top_header_icons__TdxR9",routingClicks:"layout_routingClicks__NgBYE",links:"layout_links__I_1A_",userStatus:"layout_userStatus__QCy7C",alignName:"layout_alignName__Gdlvg",logIn:"layout_logIn__KRlRb",logOut:"layout_logOut__Tz4fo",profileImg:"layout_profileImg__hRd0Q",userImgLable:"layout_userImgLable__0hRFr",mobileRouting:"layout_mobileRouting__wWZRh",alignBurger:"layout_alignBurger__ojSGB",socialIcons:"layout_socialIcons__dSfDU",sponser:"layout_sponser__xbo8o",sponserText:"layout_sponserText__bpxTz",footerBarBG:"layout_footerBarBG__JoT_T",madeBy:"layout_madeBy___dMpk",activeLink:"layout_activeLink__ImSCA",landScapeView:"layout_landScapeView__N46HE",searchContainer:"layout_searchContainer__VNjcW",searchInput:"layout_searchInput__u6KSe",searchButton:"layout_searchButton__ygeo6",mobileMenu:"layout_mobileMenu__Wf8St",burgerMenu:"layout_burgerMenu__MkJVQ",mobileView:"layout_mobileView__9dOqG"}},64366:function(e){e.exports={loading:"Donate_loading__neQM5",heroContainer:"Donate_heroContainer__OALWc",imgProvider:"Donate_imgProvider__EyJYk",heroSection:"Donate_heroSection___2jRx",phone_input:"Donate_phone_input__Oc9Sk",Placeholder:"Donate_Placeholder__dPTi8",buttons:"Donate_buttons__Mhmbs",active:"Donate_active__x8brh",headerTitle:"Donate_headerTitle__EoX7H",donateContainer:"Donate_donateContainer__tm4r4",arrowsContainer:"Donate_arrowsContainer__6FOUB",arrows:"Donate_arrows__0XN6i",donateButtonSubmit:"Donate_donateButtonSubmit__SXKxj",carouselContainer:"Donate_carouselContainer__cqf1V",layer:"Donate_layer__mBiBk",heroImage:"Donate_heroImage__uuDd3",heroText:"Donate_heroText__Q4sxq",orangeButton:"Donate_orangeButton__q7Lzw",vCashButton:"Donate_vCashButton__dDfWx",errorMSG:"Donate_errorMSG__j3f_m",otpContainer:"Donate_otpContainer__E2z5h",otpInput:"Donate_otpInput__qTtLr",paymentTitle:"Donate_paymentTitle__aTcyx",radioStyle:"Donate_radioStyle__grlYd",campaignContentContainer:"Donate_campaignContentContainer__HkNgw",heroTitle:"Donate_heroTitle__R8cSQ",donationCard:"Donate_donationCard__Tulme",paymentImg:"Donate_paymentImg__EdXJP",donateLoader:"Donate_donateLoader__A2MX3",vCashImg:"Donate_vCashImg__A7k9i",logoImg:"Donate_logoImg__TnTSa",dir:"Donate_dir__bqgMa","spacer-ar":"Donate_spacer-ar__aWR2H",spacer:"Donate_spacer__wB_YR",searchIcon:"Donate_searchIcon__h4Fyl",en:"Donate_en__O2Lc_",ar:"Donate_ar__ymXHu"}}}]);