1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6040],{8043:(e,t,n)=>{"use strict";n.d(t,{H:()=>V,A:()=>O});var r=n(37876),s=n(14232),i=n(60746),l=n(70946),d=n(6995),a=n(64410),o=n(49794),c=n(76776),x=n(47737),p=n(27830),u=n(14379),h=n(82179),m=n(89037);n(32162),n(45002),n(82),n(86015),n(39091),n(30469),n(36923),n(97685),n(65904),n(93317);var g=n(30566),j=n(22474),A=n(43015),f=n(97914),v=n(57452),C=n(66807),y=n(19023),b=n(60288),_=n(9738),S=n(32083),w=n(14640),k=n(97886),I=n(27814),L=n(37235),z=n(34328),F=n(30525),E=n(91769),R=n(41178),B=n(54773),D=n(74695),W=n(7042);let T=(0,B.Ay)(m.A)(e=>{let{theme:t}=e;return{position:"absolute",zIndex:"999",width:"85%",top:"10%",marginLeft:"20px",[t.breakpoints.down("md")]:{marginLeft:"13px"}}}),P=e=>{var t;let{setAddAddress:n,editAddress:c,userData:x,addressRefetch:u,setEditAddress:h}=e,[m,B]=(0,s.useReducer)(v.Ff,v.ue),[P,M]=(0,s.useState)(c?null==c?void 0:c.address_type:""),{configData:N}=(0,D.d4)(e=>e.configData),[H,X]=(0,s.useState)(!1),[G,V]=(0,s.useState)(!1),[Z,O]=(0,s.useState)(N&&(null==N?void 0:N.default_location)),[U,q]=(0,s.useState)(""),[Q,Y]=(0,s.useState)(!1),[J,K]=(0,s.useState)(!0),[$,ee]=(0,s.useState)(void 0),[et,en]=(0,s.useState)([]),[er,es]=(0,s.useState)(""),{coords:ei,isGeolocationAvailable:el,isGeolocationEnabled:ed,getPosition:ea}=(0,C.L)({positionOptions:{enableHighAccuracy:!1},userDecisionTimeout:5e3,isGeolocationEnabled:!0}),{data:eo,isLoading:ec}=(0,y.A)(U,Q);(0,s.useEffect)(()=>{if(eo){var e;en(null==eo||null==(e=eo.suggestions)?void 0:e.map(e=>{var t,n,r,s,i,l,d;return{place_id:null==e||null==(t=e.placePrediction)?void 0:t.placeId,description:"".concat(null==e||null==(s=e.placePrediction)||null==(r=s.structuredFormat)||null==(n=r.mainText)?void 0:n.text,", ").concat(null==e||null==(d=e.placePrediction)||null==(l=d.structuredFormat)||null==(i=l.secondaryText)?void 0:i.text)}}))}},[eo]);let{data:ex}=(0,_.A)(Z,G);(0,s.useEffect)(()=>{ex&&localStorage.setItem("zoneid",null==ex?void 0:ex.zone_id)},[ex]);let{isLoading:ep,data:eu}=(0,S.A)(er,J);(0,s.useEffect)(()=>{if(eu){var e,t;O({lat:null==eu||null==(e=eu.location)?void 0:e.latitude,lng:null==eu||null==(t=eu.location)?void 0:t.longitude}),V(!0)}},[eu]);let{data:eh,isFetching:em}=(0,b.A)(Z),eg=(0,g.A)();(0,d.A)(eg.breakpoints.down("sm"));let ej=e=>{M(e),h({...c,address_type:null})};null==c||c.latitude,null==c||c.longitude;let eA=e=>{e.target.value&&(q(e.target.value),Y(!0),K(!0))},ef=(e,t)=>{t&&es(null==t?void 0:t.place_id),K(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Ay,{item:!0,md:12,xs:12,alignSelf:"center",children:(0,r.jsxs)(j.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsx)(o.A,{variant:"subtitle2",fontWeight:"700",children:(0,f.t)("Add Address")}),(0,r.jsxs)(p.NX,{onClick:()=>n(!1),children:[(0,r.jsx)(A.A,{sx:{fontSize:"10px",color:e=>e.palette.primary.main,fontWeight:"700",marginRight:"3px"}}),(0,f.t)("Go Back")]})]})}),(0,r.jsxs)(a.Ay,{item:!0,xs:12,md:5,position:"relative",align:"center",children:[(0,r.jsx)(T,{children:(0,r.jsx)(k.A,{predictions:et,handleChange:(e,t)=>
1ef(e,t,B),HandleChangeForSearch:e=>eA(e,B),handleAgreeLocation:()=>(0,I.CX)(ei,B),currentLocation:m.currentLocation,handleCloseLocation:()=>(0,I.yv)(B)})}),(0,r.jsxs)(j.A,{children:[Z&&(0,r.jsx)(w.A,{setLocation:O,location:Z,setPlaceDetailsEnabled:K,placeDetailsEnabled:J,locationEnabled:G,setPlaceDescription:ee,setLocationEnabled:V,setDisablePickButton:X,height:"350px"}),(0,r.jsx)(l.A,{onClick:()=>{O({lat:ei.latitude,lng:ei.longitude})},sx:{position:"absolute",bottom:"25%",right:"10px",borderRadius:"50%",color:e=>e.palette.primary.main,backgroundColor:"background.paper"},children:(0,r.jsx)(W.A,{sx:{fontSize:{xs:"18px",md:"24px"}}})})]})]}),(0,r.jsxs)(a.Ay,{item:!0,xs:12,md:7,children:[(0,r.jsxs)(i.jB,{mb:"20px",children:[(0,r.jsx)(o.A,{children:(0,f.t)("Label As")}),(0,r.jsxs)(j.A,{direction:"row",spacing:2.5,pt:"10px",children:[(0,r.jsx)(i.TV,{value:"home",addressType:(null==c?void 0:c.address_type)?null==c?void 0:c.address_type:P,onClick:()=>ej("home"),children:(0,r.jsx)(L.A,{src:z.A.src,width:"24px",height:"24px"})}),(0,r.jsx)(i.TV,{value:"office",addressType:(null==c?void 0:c.address_type)?null==c?void 0:c.address_type:P,onClick:()=>ej("office"),children:(0,r.jsx)(L.A,{src:F.A.src,width:"24px",height:"24px"})}),(0,r.jsx)(i.TV,{value:"other",addressType:(null==c?void 0:c.address_type)?null==c?void 0:c.address_type:P,onClick:()=>ej("other"),children:(0,r.jsx)(L.A,{src:E.A.src,width:"24px",height:"24px"})})]})]}),(0,r.jsx)(R.A,{deliveryAddress:null==eh||null==(t=eh.results[0])?void 0:t.formatted_address,atModal:"false",addressType:P,configData:N,phone:c?null==c?void 0:c.phone:null==x?void 0:x.phone,email:c?null==c?void 0:c.email:null==x?void 0:x.email,lat:(null==Z?void 0:Z.lat)||"",lng:(null==Z?void 0:Z.lng)||"",personName:c?null==c?void 0:c.contact_person_name:x&&"".concat(null==x?void 0:x.f_name," ").concat(null==x?void 0:x.l_name),editAddress:c,setAddAddress:n,refetch:u})]})]})},M={src:"/_next/static/media/editIcon.95a0ff40.png"};var N=n(21398),H=n(16501),X=n(32431),G=n(92661);let V=(0,u.A)(l.A)(e=>{let{theme:t}=e;return{border:"1px solid",borderColor:t.palette.neutral[400],borderRadius:"50%",padding:"6px"}}),Z=e=>{var t,n;let{data:s,t:i,refetch:l,setEditProfile:u,editProfile:g,setAddAddress:j,addAddress:A,editAddress:f,addressRefetch:v,setEditAddress:C}=e,y=(0,N.u)(),{configData:b}=(0,D.d4)(e=>e.configData),_=(0,d.A)(y.breakpoints.down("md")),S=()=>{u(e=>!e)};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(a.Ay,{container:!0,spacing:{xs:1,sm:2,md:3},padding:{xs:"10px",sm:"15px",md:"20px"},children:A?(0,r.jsx)(a.Ay,{container:!0,item:!0,xs:12,md:12,spacing:3,children:(0,r.jsx)(P,{setAddAddress:j,configData:b,userData:s,editAddress:f,addressRefetch:v,setEditAddress:C})}):(0,r.jsx)(r.Fragment,{children:g?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(a.Ay,{container:!0,item:!0,xs:12,md:12,children:(0,r.jsx)(p.Ay,{data:s,configData:b,setEditProfile:u,handleClick:S,t:i,refetch:l})})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Ay,{item:!0,md:12,xs:12,children:(0,r.jsxs)(h.A,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsx)(o.A,{fontSize:{xs:"14px",sm:"14px",md:"16px"},fontWeight:"700",children:i("Personal Details")}),_&&(0,r.jsx)(V,{onClick:S,children:(0,r.jsx)(L.A,{src:M.src,height:"16px",width:"16px"})})]})}),(0,r.jsx)(a.Ay,{item:!0,xs:12,md:3,children:(0,r.jsx)(h.A,{spacing:{xs:1,sm:1,md:1},paddingLeft:{xs:"0px",md:"20px"},children:s?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o.A,{fontWeight:"500",fontSize:{xs:"12px",md:"14px"},children:[i("User Name"),(0,r.jsx)(o.A,{component:"span",marginLeft:{xs:"13px",md:"10px"},fontSize:{xs:"12px",md:"14px"},children:"".concat((null==s?void 0:s.f_name)?null==s?void 0:s.f_name:""," ").concat((null==s?void 0:s.l_name)?null==s?void 0:s.l_name:"")})]}),(0,r.jsxs)(m.A,{display:"flex",alignItems:"center",fontWeight:"500",fontSize:{xs:"12px",md:"14px"},children:[(0,r.jsx)(o.A,{component:"span",fontSize:{xs:"12px",md:"14px"},children:i("Email")}),(0,r.jsx)(o.A,{fontSize:{xs:"12px",md:"14px"},component:"span",marginLeft:{xs:"8px",md:"8px"},children:(null==s?void 0:s.email)||""}),(null==s?void 0:s.is_email_verified)==="1"?(0,r.jsx)(X.A,{style:{marginLeft:"8px"}}):(null==b||null==(t=b.centralize_login)?void 0:t.email_verification_status)===1&&(0,r.jsx)(G.A,{sx:{color:e=>e.palette.error.main,width:"1.2rem",marginLeft:"8px"}})]})]}):(0,r.jsxs)(h.A,{children:[(0,r.jsx)(c.A,{variant:"text",width:150,height:20}),(0,r.jsx)(c.A,{variant:"text",width:150,height:20})]})})}),(0,r.jsx)(a.Ay,{item:!0,xs:12,md:3,children:(0,r.jsx)(h.A,{spacing:{xs:1,sm:1,md:1},alignItems:"center",width:"100%",justifyContent:"center",children:s?(0,r.jsxs)(m.A,{display:"flex",alignItems:"center",justifyContent:"center",children:[(0,r.jsx)(o.A,{fontWeight:"500",fontSize:{xs:"12px",md:"14px"},children:i("Phone")}),(0,r.jsxs)(o.A,{component:"span",fontSize:{xs:"12px",md:"14px"},marginLeft:{xs:"8px",md:"10px"},display:"flex",alignItems:"center",children:[null==s?void 0:s.phone,(null==s?void 0:s.is_phone_verified)===1?(0,r.jsx)(X.A,{style:{marginLeft:"8px"}}):(null==b||null==(n=b.centralize_login)?void 0:n.phone_verification_status)===1&&(0,r.jsx)(G.A,{sx:{color:e=>e.palette.error.main,width:"1.2rem",marginLeft:"8px"}})]})]}):(0,r.jsxs)(h.A,{children:[(0,r.jsx)(c.A,{variant:"text",width:170,height:20}),(0,r.jsx)(c.A,{variant:"text",width:170,height:20})]})})}),!_&&(0,r.jsx)(a.Ay,{item:!0,xs:6,md:6,align:"right",alignSelf:"flex-start",marginTop:{xs:"5px",md:"0px"},children:(0,r.jsx)(x.A,{onClick:S,variant:"contained",sx:{fontSize:"12px",borderRadius:"5px"},startIcon:(0,r.jsx)(H.A,{style:{width:"13px",height:"13px"}}),children:i("Edit Profile")})})]})})})})};Z.propTypes={};let O=Z},8345:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(1992),s=n(70190),i=n(42107);let l=async()=>{let{data:e}=await i.A.get(s.ze);return e};function d(){return(0,r.useQuery)("stripe-save-card-list",l,{enabled:!1})}},9505:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(37876),s=n(14232),i=n(89099),l=n(74695);let d=e=>{let{children:t,from:n}
1=e,d=(0,i.useRouter)(),[a,o]=(0,s.useState)(!1),{configData:c}=(0,l.d4)(e=>e.configData);return((0,s.useEffect)(()=>{if(!d.isReady)return;let e=localStorage.getItem("token"),t=localStorage.getItem("guest_id");e||t||t&&(null==c?void 0:c.guest_checkout_status)===1?o(!0):d.push({pathname:"/home",query:{from:n}},void 0,{shallow:!0})},[d.isReady]),a)?(0,r.jsx)(r.Fragment,{children:t}):null}},20072:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var r=n(37876),s=n(14232),i=n(60746),l=n(34252),d=n(49794),a=n(47737),o=n(74441),c=n(15804),x=n(67578),p=n(75548),u=n(30566),h=n(82),m=n(18575),g=n(35985),j=n(8345),A=n(1992),f=n(70190),v=n(42107);let C=async e=>{let{data:t}=await v.A.post("".concat(f.F0),e);return t},y=()=>(0,A.useMutation)("create-stripe-customer",C);var b=n(97685),_=n(39742),S=n(4241),w=n(79204),k=n(72326);let I=e=>{let t,{onCardSelect:n,selectedCardId:A,onAddCard:f}=e,v=(0,u.A)(),{t:C}=(0,h.Bd)(),[I,L]=(0,s.useState)(!1),[z,F]=(0,s.useState)(null),[E,R]=(0,s.useState)(null),{data:B,refetch:D,isLoading:W,isFetching:T}=(0,j.A)(),{mutate:P,isLoading:M}=y();(0,s.useEffect)(()=>{(null==z?void 0:z.published_key)&&(console.log("Loading Stripe with publishable key:",z.published_key),R((0,S.c)(z.published_key)))},[z]),console.log({savedCards:B}),(0,s.useEffect)(()=>{D()},[]);let N=()=>{console.log("Add card clicked - creating Stripe customer"),P({},{onSuccess:e=>{console.log("Stripe customer created successfully:",e),b.oR.success(C("Customer created successfully")),F(e),L(!0),console.log("Opening card form modal")},onError:e=>{var t,n;console.error("Error creating Stripe customer:",e),console.error("Error details:",null==e?void 0:e.response),b.oR.error((null==e||null==(n=e.response)||null==(t=n.data)?void 0:t.message)||C("Failed to create customer"))}})},H=()=>{L(!1),F(null)};return W||T?(0,r.jsx)(i.jB,{alignItems:"center",justifyContent:"center",padding:"40px",children:(0,r.jsx)(l.A,{})}):(t=B&&(null==B?void 0:B.length)!==0?(0,r.jsxs)(i.jB,{spacing:2,children:[(0,r.jsx)(i.jB,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,r.jsx)(a.A,{variant:"outlined",startIcon:(0,r.jsx)(g.A,{}),onClick:N,disabled:M,sx:{borderRadius:"8px",textTransform:"none",fontWeight:600,"&:hover":{backgroundColor:(0,o.X4)(v.palette.primary.main,.05)}},children:M?C("Creating..."):C("Add Card")})}),(0,r.jsx)(c.A,{value:A||"",onChange:e=>{n&&n(e.target.value)},children:(0,r.jsx)(i.jB,{spacing:1.5,sx:{maxHeight:"400px",overflowY:"auto"},children:null==B?void 0:B.map(e=>{var t,s,l,a,c;return(0,r.jsx)(x.A,{sx:{border:"1px solid ".concat(A===e.id?v.palette.primary.main:v.palette.neutral[300]),borderRadius:"8px",padding:"16px",backgroundColor:A===e.id?(0,o.X4)(v.palette.primary.main,.05):"transparent",transition:"all 0.2s ease-in-out",cursor:"pointer","&:hover":{borderColor:v.palette.primary.main,backgroundColor:(0,o.X4)(v.palette.primary.main,.03)}},onClick:()=>n&&n(e.id),children:(0,r.jsx)(i.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",children:(0,r.jsxs)(i.jB,{direction:"row",alignItems:"center",spacing:2,children:[(0,r.jsx)(p.A,{value:e.id,sx:{padding:0,"& .MuiSvgIcon-root":{fontSize:20}}}),(0,r.jsx)(x.A,{sx:{backgroundColor:(0,o.X4)(v.palette.primary.main,.1),borderRadius:"8px",padding:"12px",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(m.A,{sx:{fontSize:"24px",color:v.palette.primary.main}})}),(0,r.jsxs)(i.jB,{spacing:.5,children:[(0,r.jsxs)(d.A,{fontSize:"14px",fontWeight:"600",children:["â¢â¢â¢â¢ â¢â¢â¢â¢ â¢â¢â¢â¢ ",(null==e||null==(t=e.card)?void 0:t.last4)||"****"]}),(0,r.jsxs)(d.A,{fontSize:"12px",color:v.palette.neutral[500],children:[(null==e||null==(l=e.card)||null==(s=l.brand)?void 0:s.toUpperCase())||"CARD"," ⢠",C("Expires")," ",null==e||null==(a=e.card)?void 0:a.exp_month,"/",null==e||null==(c=e.card)?void 0:c.exp_year]})]})]})})},e.id)})})})]}):(0,r.jsxs)(i.jB,{alignItems:"center",justifyContent:"center",padding:"40px",spacing:3,children:[(0,r.jsx)(m.A,{sx:{fontSize:"48px",color:v.palette.neutral[400],mb:2}}),(0,r.jsx)(d.A,{color:v.palette.neutral[500],children:C("No saved cards foun
1d")}),(0,r.jsx)(a.A,{variant:"contained",startIcon:(0,r.jsx)(g.A,{}),onClick:N,disabled:M,sx:{borderRadius:"8px",textTransform:"none",fontWeight:600,px:3},children:M?C("Creating..."):C("Add Your First Card")})]}),(0,r.jsxs)(r.Fragment,{children:[t,(0,r.jsx)(k.A,{openModal:I,handleClose:H,children:(0,r.jsx)(x.A,{padding:"20px",sx:{minWidth:{xs:"300px",sm:"500px"}},children:E?(0,r.jsx)(_.S8,{stripe:E,children:(0,r.jsx)(w.A,{onSuccess:e=>{console.log("Payment method created:",e),D(),L(!1),F(null),f&&f(e)},onCancel:H,customerData:z})}):(0,r.jsxs)(i.jB,{alignItems:"center",padding:"40px",children:[(0,r.jsx)(l.A,{}),(0,r.jsx)(d.A,{mt:2,children:C("Loading Stripe...")})]})})})]}))}},74255:e=>{e.exports={stripeCardForm:"StripeCardForm_stripeCardForm__Qo_WO",formRow:"StripeCardForm_formRow__zH4_6",formActions:"StripeCardForm_formActions__2Ca2B",btn:"StripeCardForm_btn__C_D_r",btnCancel:"StripeCardForm_btnCancel__GTb4I",btnSubmit:"StripeCardForm_btnSubmit__c89Ze"}},79204:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(37876),s=n(14232),i=n(39742),l=n(82),d=n(97685),a=n(74255),o=n.n(a);let c=e=>{let{onSuccess:t,onCancel:n,customerData:a}=e,{t:c}=(0,l.Bd)(),x=(0,i.t2)(),p=(0,i.HH)(),[u,h]=(0,s.useState)(!1),m={style:{base:{fontSize:"16px",color:"#424770",letterSpacing:"0.025em",fontFamily:"Source Code Pro, monospace","::placeholder":{color:"#aab7c4"}},invalid:{color:"#9e2146"}}},g=async e=>{if(e.preventDefault(),x&&p){h(!0);try{let e=p.getElement(i._D),{error:n,paymentMethod:r}=await x.createPaymentMethod({type:"card",card:e});if(n){d.oR.error(n.message),h(!1);return}t&&t(r),d.oR.success(c("Card added successfully")),h(!1)}catch(e){console.error("Error adding card:",e),d.oR.error(c("Failed to add card")),h(!1)}}};return(0,r.jsx)("div",{className:o().stripeCardForm,children:(0,r.jsxs)("form",{onSubmit:g,children:[(0,r.jsxs)("div",{className:o().formRow,children:[(0,r.jsx)("label",{htmlFor:"card-number",children:c("Card number")}),(0,r.jsx)(i._D,{id:"card-number",options:m})]}),(0,r.jsxs)("div",{className:o().formRow,children:[(0,r.jsx)("label",{htmlFor:"card-expiry",children:c("Expiration date")}),(0,r.jsx)(i.qs,{id:"card-expiry",options:m})]}),(0,r.jsxs)("div",{className:o().formRow,children:[(0,r.jsx)("label",{htmlFor:"card-cvc",children:c("Security code")}),(0,r.jsx)(i.JG,{id:"card-cvc",options:m})]}),(0,r.jsxs)("div",{className:o().formActions,children:[(0,r.jsx)("button",{type:"button",className:"".concat(o().btn," ").concat(o().btnCancel),onClick:n,disabled:u,children:c("Cancel")}),(0,r.jsx)("button",{type:"submit",className:"".concat(o().btn," ").concat(o().btnSubmit),disabled:!x||u,children:u?c("Processing..."):c("Add Card")})]})]})})}},79403:(e,t,n)=>{"use strict";n.d(t,{i:()=>G,A:()=>Z});var r=n(37876),s=n(14232),i=n(69434),l=n(60746),d=n(54773),a=n(47737),o=n(6995),c=n(49794),x=n(64410),p=n(52158),u=n(82179),h=n(89037),m=n(68028);let g={src:"/_next/static/media/Group 1597886316.6d8a16a7.svg",height:56,width:77,blurWidth:0,blurHeight:0};var j=n(76776);let A=()=>(0,r.jsx)(l.iv,{children:(0,r.jsx)(x.Ay,{container:!0,spacing:3,children:[void 0,void 0].map((e,t)=>(0,r.jsx)(x.Ay,{item:!0,xs:12,sm:6,md:6,children:(0,r.jsx)(j.A,{variant:"rectangular",width:"100%",height:"10rem"})},t))})});var f=n(74441);n(8168);var v=n(70946);let C={src:"/_next/static/media/delete-icon.7460c87d.png"};var y=n(82),b=n(72326),_=n(2799),S=n(42107),w=n(70190),k=n(1992);let I=async e=>{let{data:t}=await S.A.delete("".concat(w.Ch,"?address_id=").concat(e));return t};var L=n(97685),z=n(65904),F=n(3801);let E={src:"/_next/static/media/mapMarker.0e641af6.png"},R=e=>{let{open:t,handleClose:n,addressId:s,refetch:i}=e,{t:d}=(0,y.Bd)(),{mutate:o,isLoading:x,error:p}=(0,k.useMutation)("delete-address",I),u=()=>{o(s,{onSuccess:()=>{L.Ay.success(d("Address deleted successfully.")),null==i||i(),null==n||n()},onError:z.P1})};return(0,r.jsx)("div",{children:(0,r.jsx)(b.A,{openModal:t,handleClose:n,children:(0,r.jsx)(_.A,{sx:{textAlign:"center",padding:"2rem"},children:(0,r.jsxs)(l.jB,{alignItems:"center",justifyContent:"center",spacing:3,children:[(0,r.jsx)("img",{src:E.src,alt:d("map-image"),width:"60px",height:"60px"}),(0,r.jsx)(c.A,{fontWeight:"bold",variant:"h6",children:d("Are you sure you want to delete this address?")}),(0,r.jsxs)(l.jB,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,children:[(0,r.jsx)(a.A,{sx:{backgroundColor:e=>e.palette.neutral[300],color:e=>e.palette.neutral[1e3],width:"120px","&:hover":{backgroundColor:e=>e.palette.neutral[400]}},onClick:n,children:d("Cancel")}),(0,r.jsx)(F.A,{loading:x,sx:{background:e=>e.palette.error.light,color:"white",width:"120px","&:hover":{backgroundColor:e=>e.palette.error.dark}},onClick:()=>u(),children:d("Delete")})]})]})})})})};var B=n(30566);let D=()=>{let e=(0,B.A)();return(0,r.jsx)("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M9.22685 9.16536H10.9883L16.1886 3.9987L14.4272 2.2487L9.22685 7.41536V9.16536ZM16.7758 3.41536L17.3629 2.83203C17.5307 2.66536 17.6145 2.47092 17.6145 2.2487C17.6145 2.02648 17.5307 1.83203 17.3629 1.66536L16.7758 1.08203C16.608 0.915365 16.4123 0.832031 16.1886 0.832031C15.9649 0.832031 15.7692 0.915365 15.6015 1.08203L15.0143 1.66536L16.7758 3.41536ZM10.0656 18.332C7.81492 16.4293 6.13403 14.6618 5.02294 13.0295C3.91129 11.3979 3.35547 9.88759 3.35547 8.4987C3.35547 6.41536 4.03012 4.75564 5.37942 3.51953C6.72816 2.28342 8.29022 1.66536 10.0656 1.66536C10.4431 1.66536 10.8172 1.69648 11.1879 1.7587C11.5581 1.82148 11.9179 1.90842 12.2674 2.01953L10.9044 3.39453C10.7646 3.36675 10.6281 3.34925 10.4951 3.34203C10.3625 3.33536 10.2194 3.33203 10.0656 3.33203C8.65369 3.33203 7.4618 3.81453 6.48995 4.77953C5.51865 5.74509 5.033 6.98481 5.033 8.4987C5.033 9.48481 5.4454 10.6131 6.27019 11.8837C7.09498 13.1548 8.36012 14.5681 10.0656 16.1237C11.7711 14.5681 13.0363 13.1548 13.861 11.8837C14.6858 10.6131 15.0982 9.48481 15.0982 8.4987C15.0982 8.33203 15.0912 8.1687 15.0773 8.0087C15.0633 7.84925 15.0423 7.69314 15.0143 7.54036L16.3983 6.16536C16.5241 6.52648 16.6186 6.90148 16.6818 7.29036C16.7444 7.67925 16.7758 8.08203 16.7758 8.4987C16.7758 9.88759 16.2202 11.3979 15.1091 13.0295C13.9975 14.6618 12.3163 16.4293 10.
10656 18.332Z",fill:e.palette.primary.main})})};n(93317),n(36573);var W=n(97914),T=n(74695);let P=(0,d.Ay)(c.A)(e=>{let{theme:t,fontWeight:n}=e;return{fontWeight:n||"500",fontSize:"12px"}}),M=e=>{let{item:t,refetch:n,dispatch:i,configData:d,edit:a,setEditAddress:o,setAddAddress:x}=e,{address_type:p,contact_person_number:h,address:m,road:g,floor:j,house:A,latitude:b,longitude:_,user_id:S,contact_person_name:w,zone_id:k,id:I}=t,{t:L}=(0,y.Bd)(),[z,F]=(0,s.useState)(!1),{openAddressModal:E}=(0,T.d4)(e=>e.addressModel);return(0,r.jsxs)(l.WU,{padding:"0px",sx:{borderRadius:"5px",boxShadow:"0px 9.075414657592773px 18.150829315185547px -2.7226247787475586px rgba(145, 158, 171, 0.05), 0px 0px 1.8150832653045654px 0px rgba(145, 158, 171, 0.20)"},children:[(0,r.jsxs)(l.jB,{spacing:2,children:[(0,r.jsxs)(l.jB,{direction:"row",alignItems:"center",justifyContent:"space-between",padding:{xs:" 4px 20px",md:" 13px 20px"},sx:{background:e=>(0,f.X4)(e.palette.info.contrastText1,.3),borderRadius:"5px 5px 0px 0px"},children:[(0,r.jsx)(c.A,{fontWeight:"500",textTransform:"capitalize",children:L(p)}),(0,r.jsxs)(u.A,{direction:"row",alignItems:"center",children:[(0,r.jsx)(v.A,{onClick:()=>{o(t),x(e=>!e)},children:(0,r.jsx)(D,{})}),(0,r.jsx)(v.A,{onClick:()=>F(!0),children:(0,r.jsx)("img",{src:C.src,alt:"delete"})})]})]}),(0,r.jsxs)(u.A,{padding:"0px 20px 23px 20px",spacing:1,children:[(0,r.jsxs)(u.A,{direction:"row",gap:"30px",children:[(0,r.jsx)(P,{children:L("Name")}),(0,r.jsx)(P,{fontWeight:"400",children:w})]}),(0,r.jsxs)(u.A,{direction:"row",gap:"25px",children:[(0,r.jsx)(P,{children:L("Phone")}),(0,r.jsx)(P,{fontWeight:"400",children:h})]}),(0,r.jsxs)(u.A,{direction:"row",gap:"15px",children:[(0,r.jsx)(P,{children:L("Address")}),(0,r.jsxs)(P,{fontWeight:"400",children:[" ",m]})]})]})]}),z&&(0,r.jsx)(R,{open:z,handleClose:()=>F(!1),addressId:I,refetch:n})]})};M.propTypes={};var N=n(8043),H=n(21398),X=n(60963);let G=(0,d.Ay)(a.A)(e=>{let{theme:t}=e;return{color:t.palette.neutral[400],fontSize:"12px",border:"1px solid",borderColor:t.palette.neutral[400],borderRadius:"5px"}}),V=e=>{let{configData:t,setAddAddress:n,addAddress:d,setEditAddress:a,data:j,refetch:f,isLoading:v}=e,{AllSaveAddress:C}=(0,T.d4)(e=>e.storedData),y=(0,T.wA)(),b=(0,H.u)(),_=(0,o.A)(b.breakpoints.down("md")),{openAddressModal:S}=(0,T.d4)(e=>e.addressModel),[w,k]=(0,s.useState)(null);(0,s.useEffect)(()=>{(null==C?void 0:C.length)===0&&f()},[]),(0,s.useEffect)(()=>{j&&y((0,X.p_)(null==j?void 0:j.addresses))},[j]);let I=()=>{a(null),n(e=>!e)};return(0,r.jsxs)(l.jB,{padding:{xs:"10px",sm:"15px",md:"20px"},spacing:2,children:[(0,r.jsxs)(l.jB,{justifyContent:"space-between",direction:"row",alignItems:"center",children:[(0,r.jsx)(c.A,{fontSize:{xs:"14px",sm:"14px",md:"16px"},fontWeight:"700",children:(0,W.t)("My Addresses")}),(0,r.jsx)(u.A,{children:_?(0,r.jsx)(N.H,{onClick:I,children:(0,r.jsx)(i.A,{style:{fontSize:"16px"}})}):(0,r.jsx)(G,{onClick:I,variant:"outlined",startIcon:(0,r.jsx)(i.A,{style:{fontSize:"16px"}}),children:(0,W.t)("Add Address")})})]}),(0,r.jsx)(x.Ay,{container:!0,spacing:{xs:1,sm:1.5,md:2.5},children:(0,r.jsx)(x.Ay,{item:!0,xs:12,md:12,children:(0,r.jsx)(p.A,{children:v?(0,r.jsx)(A,{}):C&&(null==C?void 0:C.length)>0?(0,r.jsx)(h.A,{children:(0,r.jsx)(x.Ay,{container:!0,children:null==C?void 0:C.map((e,s)=>(0,r.jsx)(x.Ay,{item:!0,xs:12,sm:6,md:6,lg:6,paddingRight:{xs:"10px",sm:"15px",md:"25px"},paddingBottom:{xs:"10px",sm:"15px",md:"25px"},children:(0,r.jsx)(M,{item:e,refetch:f,configData:t,dispatch:y,openAddressModal:S,setEditAddress:a,edit:w,setAddAddress:n})},e.id))})}):(0,r.jsx)(u.A,{alignItems:"center",justifyContent:"center",width:"100%",height:"100%",children:(0,r.jsx)(m.A,{label:"No address found",image:g,width:"128px",height:"80"})})})})})]})};V.propTypes={};let Z=V}}]);
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.