KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /var/www/sbaedu/test.sbaedu.com/static/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/sbaedu/test.sbaedu.com/static/js/458.a0f78cda.chunk.js
"use strict";(self.webpackChunktechwind=self.webpackChunktechwind||[]).push([[458],{1458:(e,a,s)=>{s.r(a),s.d(a,{default:()=>x});var r=s(9867),t=s(4670),d=s(5644),l=s(4234),n=s(2909),i=s(333),o=s(3402),c=s(1822),m=s(8700),u=s(2834);function x(){const e=new m.Z,a=(0,t.s0)(),[s,x]=(0,r.useState)(),[g,p]=(0,r.useState)(0),[h,b]=(0,r.useState)(0),[f,j]=(0,r.useState)(""),[N,y]=(0,r.useState)(""),[v,k]=(0,r.useState)(""),[w,S]=(0,r.useState)(""),[C,_]=(0,r.useState)(0),[q,A]=(0,r.useState)(),[Z,J]=(0,r.useState)(),[O,P]=(0,r.useState)(),[B,I]=(0,r.useState)(),[T,U]=(0,r.useState)(),[D,E]=(0,r.useState)(),[F,L]=(0,r.useState)(),[Y,z]=(0,r.useState)(),[R,G]=(0,r.useState)(),H=JSON.parse(localStorage.getItem("cartitems"));let K=localStorage.getItem("icp_authData");K=K?JSON.parse(K):null,console.log(K.name),(0,r.useEffect)((()=>{p(H.price)}),[]);const M=()=>{let e=JSON.stringify({user_unique_id:K.user_unique_id,promocode_id:C}),a={method:"post",maxBodyLength:1/0,url:c.gA+"/remove-promocode",headers:{apikey:c.vo,domain:c.nw,"Content-Type":"application/json"},data:e};o.Z.request(a).then((e=>{1==e.data.status&&(p(H.price),y(e.data.message),j(""))})).catch((e=>{console.log(e)}))},Q=()=>(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"p-3 flex justify-between items-center border border-gray-100 dark:border-gray-800 bg-gray-50 dark:bg-slate-800 text-green-600",children:[(0,u.jsx)("button",{className:"btn-sm btn btn-danger ",onClick:M,children:(0,u.jsx)("i",{className:"fa fa-close"})}),(0,u.jsxs)("div",{children:[(0,u.jsx)("h5",{className:"font-semibold",children:"Promo code"}),(0,u.jsx)("p",{className:"text-sm text-green-600",children:f})]}),(0,u.jsxs)("p",{className:"text-red-600 font-semibold",children:["-",(0,u.jsx)("i",{className:"fa fa-inr"})," ",h]})]})});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(l.Z,{}),(0,u.jsx)("section",{className:"relative table w-full py-5 lg:py-24 bg-gray-50 dark:bg-slate-800",children:(0,u.jsxs)("div",{className:"container relative",children:[(0,u.jsx)("div",{className:"grid grid-cols-1 mt-14",children:(0,u.jsx)("h3",{className:"text-3xl leading-normal font-semibold",children:"Checkout"})}),(0,u.jsx)("div",{className:"relative mt-3",children:(0,u.jsxs)("ul",{className:"tracking-[0.5px] mb-0 inline-flex space-x-1",children:[(0,u.jsx)("li",{className:"inline-block uppercase text-[13px] font-bold duration-500 ease-in-out hover:text-indigo-600",children:(0,u.jsx)(d.rU,{to:"",children:"AGC"})}),(0,u.jsx)("li",{className:"inline-block text-base text-slate-950 dark:text-white mx-0.5",children:(0,u.jsx)(i.AeIR,{className:"text-xl"})}),(0,u.jsx)("li",{className:"inline-block uppercase text-[13px] font-bold duration-500 ease-in-out text-indigo-600","aria-current":"page",children:"Checkout"})]})})]})}),(0,u.jsx)("section",{className:"relative md:py-5 py-5",children:(0,u.jsx)("div",{className:"container",children:(0,u.jsxs)("div",{className:"grid lg:grid-cols-12 md:grid-cols-2 grid-cols-1 gap-[30px]",children:[(0,u.jsxs)("div",{className:"lg:col-span-8",children:[(0,u.jsx)("span",{children:w}),(0,u.jsxs)("div",{className:"p-6 rounded-md shadow dark:shadow-gray-800",children:[(0,u.jsx)("h3",{className:"text-xl leading-normal font-semibold",children:"Billing address"}),(0,u.jsxs)("form",{onSubmit:s=>{s.preventDefault();let r=JSON.stringify({username:K.name,user_unique_id:K.user_unique_id,address:Y,city:B,pincode:F,state:T,country:"india"}),t={method:"post",maxBodyLength:1/0,url:c.gA+"/update-billing-address",headers:{apikey:c.vo,domain:c.nw,"Content-Type":"application/json"},data:r};o.Z.request(t).then((s=>{1==s.data.status?(e.set("paydata",JSON.stringify({finalAmount:g,discountAmt:h,applyPromo:f,product_id:H.id,qty:1,user_unique_id:K.user_unique_id,duration:H.duration,views:H.views,mode:H.mode})),a("/payment-methods")):S(s.data.message)})).catch((e=>{console.log(e)}))},children:[(0,u.jsxs)("div",{className:"grid lg:grid-cols-12 grid-cols-1 mt-6 gap-5",children:[(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsxs)("label",{className:"form-label font-semibold",children:["Username : ",(0,u.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,u.jsx)("input",{type:"text",className:"form-input w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0 mt-2",placeholder:"First Name:",id:"firstname",name:"username",required:"",value:K.name,onChange:e=>A(e.target.value)})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsxs)("label",{className:"form-label font-semibold",children:["Your Email : ",(0,u.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,u.jsx)("input",{type:"email",className:"form-input w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0 mt-2",placeholder:"Email",disabled:!0,name:"email",required:"",value:K.email,onChange:e=>J(e.target.value)})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsxs)("label",{className:"form-label font-semibold",children:["Your Phone : ",(0,u.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,u.jsx)("input",{type:"text",className:"form-input w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0 mt-2",placeholder:"+91",disabled:!0,name:"phone",required:"",value:K.phone,onChange:e=>P(e.target.value)})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsxs)("label",{className:"form-label font-semibold",children:["City : ",(0,u.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,u.jsx)("input",{type:"text",className:"form-input w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0 mt-2",placeholder:"City",id:"city",name:"city",required:!0,value:B,onChange:e=>I(e.target.value)})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsx)("label",{className:"font-semibold",children:"State:"}),(0,u.jsxs)("select",{name:"state_name",className:"form-select form-input mt-2 w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0",value:T,onChange:e=>U(e.target.value),children:[(0,u.jsx)("option",{value:"haryana",children:"Haryana"}),(0,u.jsx)("option",{value:"up",children:"Uttar Pradesh"}),(0,u.jsx)("option",{value:"delhi",children:"Delhi"})]})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsx)("label",{className:"font-semibold",children:"Country:"}),(0,u.jsx)("select",{className:"form-select form-input mt-2 w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0",children:(0,u.jsx)("option",{value:"india",selected:!0,children:"India"})})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsxs)("label",{className:"form-label font-semibold",children:["Zip Code : ",(0,u.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,u.jsx)("input",{type:"number",className:"form-input w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0 mt-2",placeholder:"Zip:",id:"zipcode",name:"zipcode",required:"",value:F,onChange:e=>L(e.target.value)})]}),(0,u.jsxs)("div",{className:"lg:col-span-6",children:[(0,u.jsxs)("label",{className:"form-label font-semibold",children:["Address : ",(0,u.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,u.jsx)("input",{type:"text",className:"form-input w-full py-2 px-3 h-10 bg-transparent dark:bg-slate-900 dark:text-slate-200 rounded outline-none border border-gray-200 focus:border-indigo-600 dark:border-gray-800 dark:focus:border-indigo-600 focus:ring-0 mt-2",placeholder:"Address:",id:"address",name:"address",required:!0,value:Y,onChange:e=>z(e.target.value)})]}),(0,u.jsx)("div",{className:"lg:col-span-12"})]}),(0,u.jsx)("div",{className:"mt-4",children:(0,u.jsx)("button",{type:"submit",className:"py-2 px-5 inline-block font-semibold tracking-wide border align-middle duration-500 text-base text-center bg-indigo-600 hover:bg-indigo-700 border-indigo-600 hover:border-indigo-700 text-white rounded-md w-full",children:"Continue to checkout"})})]})]})]}),(0,u.jsx)("div",{className:"lg:col-span-4",children:(0,u.jsxs)("div",{className:"p-6 rounded-md shadow dark:shadow-gray-800",children:[(0,u.jsxs)("div",{className:"flex justify-between items-center",children:[(0,u.jsx)("h5",{className:"text-lg font-semibold",children:"Your Cart"}),(0,u.jsx)(d.rU,{className:"bg-indigo-600 flex justify-center items-center text-white text-[10px] font-bold px-2.5 py-0.5 rounded-full h-5",children:"1"})]}),(0,u.jsxs)("div",{className:"mt-4 rounded-md shadow dark:shadow-gray-800",children:[(0,u.jsxs)("div",{className:"p-3 flex justify-between items-center",children:[(0,u.jsx)("div",{children:(0,u.jsx)("h5",{className:"font-semibold",children:H.name})}),(0,u.jsxs)("p",{className:"text-slate-400 font-semibold",children:[(0,u.jsx)("i",{className:"fa fa-inr"})," ",H.price]})]}),f?(0,u.jsx)(Q,{}):"",(0,u.jsxs)("div",{className:"p-3 flex justify-between items-center border border-gray-100 dark:border-gray-800",children:[(0,u.jsx)("div",{children:(0,u.jsx)("h5",{className:"font-semibold",children:"Total "})}),(0,u.jsxs)("p",{className:"font-semibold",children:[(0,u.jsx)("i",{className:"fa fa-inr"})," ",g]})]})]}),(0,u.jsxs)("div",{className:"subcribe-form mt-6",children:[(0,u.jsxs)("form",{className:"relative max-w-xl",children:[(0,u.jsx)("input",{type:"text",id:"promocode",name:"promocode",className:"pt-4 pe-40 pb-4 ps-6 w-full h-[50px] outline-none text-black dark:text-white rounded-full bg-white dark:bg-slate-900 shadow dark:shadow-gray-800",placeholder:"Promo code",onChange:e=>x(e.target.value)}),(0,u.jsx)("button",{type:"button",className:"py-2 px-5 inline-block font-semibold tracking-wide align-middle transition duration-500 ease-in-out text-base text-center absolute top-[2px] end-[3px] h-[46px] bg-indigo-600 hover:bg-indigo-700 border border-indigo-600 hover:border-indigo-700 text-white rounded-full",onClick:e=>{let a=JSON.stringify({user_unique_id:K.user_unique_id,promocode:s,product_id:H.id}),r={method:"post",maxBodyLength:1/0,url:c.gA+"/promocode",headers:{apikey:c.vo,domain:c.nw,"Content-Type":"application/json"},data:a};o.Z.request(r).then((e=>{const a=H.price;if(1==e.data.status){y(e.data.message),k("");let s=e.data.data,r=s.discount_type,t=s.code,d=s.amount,l=s.id;if(_(l),j(t),"flat"==r){let e=a-d;b(d),p(e)}else if("percentage"==r){let e=a*d/100,s=a-e;b(e),p(s)}}else k(e.data.message),y("")})).catch((e=>{console.log(e)}))},children:"Redeem"})]}),(0,u.jsx)("span",{className:"text-green-600",children:N}),(0,u.jsx)("span",{className:"text-red-600",children:v})]})]})})]})})}),(0,u.jsx)(n.Z,{})]})}}}]);
//# sourceMappingURL=458.a0f78cda.chunk.js.map

Anon7 - 2021