| Current Path : /home/users/unlimited/www/ondemand.codeskitter.site/build/static/js/ |
| Current File : /home/users/unlimited/www/ondemand.codeskitter.site/build/static/js/70.92c3ecca.chunk.js |
"use strict";(self.webpackChunkproject=self.webpackChunkproject||[]).push([[70],{10776:(e,i,n)=>{n.r(i),n.d(i,{default:()=>re});var t=n(84289),s=n(65043),o=n(36171),r=n(96446),a=n(19252),l=n(78185),d=n(63336),c=n(76354),x=n(17392),p=n(15795),m=n(39336),g=n(42518),h=n(74975),u=n(79484),v=n(69369),j=n(23768),b=n(73216),y=n(90948),A=n.n(y),w=n(79456),f=n(81494),_=n(46941),C=n(90611),k=n(79942),S=n(25581),N=n(74802),P=n(44978),B=(n(44014),n(33874),n(35475)),F=n(50050),V=n(70579);const I=["places"],R=e=>{let{sliderData:i,loading:n}=e;const t=(0,s.useRef)(null),y=(0,s.useRef)(null),[R,W]=(0,s.useState)(!1),z=(0,w.wA)(),D=(0,w.d4)((e=>e.Location)),T=(0,v.u)(),L=(0,b.Zp)(),[E,$]=(0,s.useState)(D.locationAddress||""),[K,U]=(0,s.useState)(!0),[q,O]=(0,s.useState)(!1),[H,M]=(0,s.useState)([]),[Z,J]=(0,s.useState)(""),{isLoaded:G,loadError:Q}=(0,k.RH)({googleMapsApiKey:S.cu,libraries:I}),X=async e=>{try{if(!e)return;try{var i;const n=await o.A.getPlacesForWebApi({address:e}),t=null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.data.results[0];if(t){const{lat:e,lng:i}=t.geometry.location;z((0,f.tP)(e)),z((0,f.Uv)(i)),((e,i)=>{(0,_.Vl)(e,i).then((e=>{z((0,f._z)(e))}))})(e,i),z((0,f.WI)(!0))}else j.Ay.error("Pick another Location")}catch(n){console.log("error",n)}}catch(n){console.error(n)}};(0,s.useEffect)((()=>{if(G&&!Q){const e=new window.google.maps.places.AutocompleteService,i=i=>{const n=i.target.value;$(n),n?e.getPlacePredictions({input:n},((e,i)=>{i===window.google.maps.places.PlacesServiceStatus.OK?M(e):M([])})):M([])},n=y.current;return n&&n.addEventListener("input",i),()=>{n&&n.removeEventListener("input",i)}}}),[G,Q]);if((0,s.useEffect)((()=>{D.modalOpen&&W(!0)}),[D.modalOpen]),Q)return(0,V.jsx)("div",{children:"Error loading Google Maps"});const Y=e=>{if("Enter"===e.key||13===e.keyCode||"click"===e.type)try{e.preventDefault(),""!==Z&&L("/search-and-provider/"+A()(Z,{lower:!0}))}catch(i){console.log(i)}};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(r.A,{display:{md:"block"},children:(0,V.jsxs)(a.A,{sx:{my:5},className:"mainContainer homeSlider",children:[(0,V.jsxs)(r.A,{position:"relative",mt:5,overflow:"hidden",borderRadius:"10px",className:"object-fit",sx:{maxWidth:{sx:"200px",md:"100%"}},children:[(0,V.jsx)(h.RC,{ref:t,navigation:!1,modules:[F.Ij],className:"mySwiper",autoplay:!1,onSlideChange:e=>{U(e.isBeginning),O(e.isEnd)},children:n?(0,V.jsx)(l.A,{variant:"rectangular",height:"500px",width:"100%"}):(0,V.jsx)(r.A,{children:i&&i.map((e=>{const i=e.type,n=A()(null===e||void 0===e?void 0:e.provider_name,{lower:!0});return(0,V.jsx)(h.qr,{children:"provider"===i?(0,V.jsx)(B.N_,{to:`/providers/services/${null===e||void 0===e?void 0:e.type_id}/${n}`,children:(0,V.jsx)(r.A,{component:"img",src:null===e||void 0===e?void 0:e.slider_web_image,className:"homeSliderImage",width:"100%",sx:{borderRadius:{xs:"10px"},objectFit:"cover"}})}):"Category"===i?(0,V.jsx)(B.N_,{to:`/categories/${"0"===(null===e||void 0===e?void 0:e.category_parent_id)?e.type_id:e.category_parent_id}/${A()(null===e||void 0===e?void 0:e.category_name,{lower:!0})}`,children:(0,V.jsx)(r.A,{component:"img",src:null===e||void 0===e?void 0:e.slider_web_image,className:"homeSliderImage",width:"100%",sx:{borderRadius:{xs:"10px"},objectFit:"cover"}})}):(0,V.jsx)("a",{href:null===e||void 0===e?void 0:e.url,target:"_blank",rel:"noopener noreferrer",children:(0,V.jsx)(r.A,{component:"img",src:null===e||void 0===e?void 0:e.slider_web_image,className:"homeSliderImage",width:"100%",sx:{borderRadius:{xs:"10px"},objectFit:"cover"}})})},null===e||void 0===e?void 0:e.id)}))})}),(0,V.jsx)("button",{onClick:e=>{e.preventDefault(),t.current.swiper.slidePrev()},className:"swiper-button-prev "+(K?"disable":""),disabled:K}),(0,V.jsx)("button",{onClick:e=>{e.preventDefault(),t.current.swiper.slideNext()},className:"swiper-button-next "+(q?"disable":""),disabled:q})]}),(0,V.jsx)(r.A,{sx:{marginTop:{xs:"20px",md:"-20px"}},alignItems:"center",justifyContent:"center",display:"flex",position:"relative",children:(0,V.jsxs)(d.A,{component:"form",className:"swiper-paper",sx:{backgroundColor:T.palette.background.input},children:[(0,V.jsx)(c.A,{sx:{width:"100%"},freeSolo:!0,options:H.map((e=>e.description)),clearIcon:(0,V.jsx)(x.A,{sx:{width:"1.5rem",height:"1.5rem"},children:(0,V.jsx)(N.A,{})}),renderInput:e=>(0,V.jsx)(p.A,{...e,variant:"standard",inputRef:y,onChange:e=>$(e.target.value),placeholder:"Search Location, Area or City",InputProps:{...e.InputProps,disableUnderline:!0}}),inputValue:E,onInputChange:(e,i)=>{$(i)},onChange:(e,i)=>{const n=H.find((e=>e.description===i));n&&(e=>{const{description:i}=e;$(i),M([]),X(i)})(n)}}),(0,V.jsx)(m.A,{className:"swiper-input-divider",sx:{height:"28px"},orientation:"vertical"}),(0,V.jsxs)(r.A,{className:"searchbar_customn",children:[(0,V.jsx)(p.A,{variant:"standard",className:"swiper-input-search",sx:{width:{xs:"auto",md:"500px"},pl:1},onChange:e=>(e=>{const{value:i}=e.target;J(i)})(e),placeholder:(0,P.t)("search_services_provider"),InputProps:{type:"search",disableUnderline:!0,onKeyDown:Y}}),(0,V.jsx)(g.A,{startIcon:(0,V.jsx)(u.A,{}),size:"small",variant:"contained",sx:{textTransform:"none"},className:"swiper-button search-btn",onClick:Y})]})]})})]})}),R&&(0,V.jsx)(C.A,{open:R,setOpen:W,lat:D.lat,lang:D.lng,redirect:!1})]})};var W=n(85865),z=n(88446),D=n(68641),T=n(42497),L=n(26240);const E=e=>{var i,n;let{category:t}=e;const s=A()(t.name,{lower:!0}),o=(0,L.A)();return(0,V.jsx)(r.A,{component:B.N_,to:"/categories/"+t.id+"/"+s,sx:{textDecoration:"none","&:hover":{"& .MuiTypography-root":{color:null===o||void 0===o||null===(i=o.palette)||void 0===i||null===(n=i.primary)||void 0===n?void 0:n.main}}},children:(0,V.jsxs)(r.A,{className:"category-box",borderColor:o.palette.text.secondary,children:[(0,V.jsx)(r.A,{className:"category-img-box",children:(0,V.jsx)(r.A,{component:"img",src:t.category_image})}),(0,V.jsx)(W.A,{color:o.palette.text.secondary,sx:{py:"12px",fontSize:"14px",fontWeight:"800 !important"},children:t.name})]})})};var $=n(17428);const K=e=>{let{categories:i,loading:n}=e;const t=(0,b.Zp)(),[o,l]=(0,s.useState)(null),d=(0,v.u)();return(0,V.jsx)(r.A,{sx:{background:d.palette.background.box,py:2},children:(0,V.jsx)(a.A,{className:"mainContainer",children:(0,V.jsxs)(r.A,{children:[(0,V.jsxs)(r.A,{display:"flex",sx:{my:1},justifyContent:"space-between",alignItems:"center",children:[(0,V.jsx)(W.A,{fontWeight:"bold",sx:{fontSize:d.palette.fonts.h2,typography:{md:"h5",xs:"body1"}},children:(0,P.t)("categories")}),(null===i||void 0===i?void 0:i.length)>6?(0,V.jsx)(W.A,{sx:{typography:{md:"body",xs:"body1"}},children:(0,V.jsx)(z.A,{href:"/categories",underline:"none",sx:{color:d.palette.color.secondary,fontWeight:700},onClick:e=>{e.preventDefault(),t("/categories")},children:(0,P.t)("view_all")})}):null]}),(0,V.jsx)(m.A,{}),(0,V.jsx)(h.RC,{className:"myslider h-auto",pagination:{type:"progressbar"},slidesPerView:5,freeMode:!0,modules:[F.dK,F.Vx],onSwiper:e=>{l(e)},breakpoints:{0:{slidesPerView:1,spaceBetween:0},640:{slidesPerView:2,spaceBetween:20},768:{slidesPerView:3,spaceBetween:30},1024:{slidesPerView:4,spaceBetween:10},1200:{slidesPerView:5,spaceBetween:0},1400:{slidesPerView:6,spaceBetween:0}},children:n?Array.from(Array(5).keys()).map((e=>(0,V.jsx)(h.qr,{children:(0,V.jsx)($.LS,{})},e))):null===i||void 0===i?void 0:i.map((e=>(0,V.jsx)(h.qr,{className:"display-flex just-space-around",children:(0,V.jsx)(r.A,{mt:4,children:(0,V.jsx)(E,{category:e})})},e.id)))}),(null===i||void 0===i?void 0:i.length)>6?(0,V.jsxs)(r.A,{display:"flex",sx:{my:3},gap:2,width:"100%",justifyContent:"center",alignContent:"center",className:"categoryNavigationBtns",children:[(0,V.jsx)(g.A,{"aria-label":"Previous",variant:"contained",size:"small",color:"inherit",className:"categorySwiperBtn",sx:{borderRadius:"10px",minWidth:"40px",backgroundColor:"#F2F1F6","&:hover":{backgroundColor:"#F2F1F6",textDecoration:"none"}},onClick:()=>{o&&o.slidePrev()},children:(0,V.jsx)(D.A,{sx:{color:"black"},size:"small"})}),(0,V.jsx)(g.A,{"aria-label":"Next",variant:"contained",size:"small",color:"inherit",className:"categorySwiperBtn",sx:{borderRadius:"10px",minWidth:"40px",py:1,backgroundColor:"#F2F1F6","&:hover":{backgroundColor:"#F2F1F6",textDecoration:"none"}},onClick:()=>{o&&o.slideNext()},children:(0,V.jsx)(T.A,{sx:{color:"black"},size:"small"})})]}):null]})})})};var U=n(25501);const q=e=>{var i;let{Provider:n,loading:t,isHome:o=!1}=e;const[d,c]=(0,s.useState)(null),x=(0,v.u)();return(0,V.jsx)("div",{children:(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(r.A,{sx:{background:x.palette.background.box},children:(0,V.jsx)(a.A,{className:"mainContainer servicesSections",children:(0,V.jsxs)(r.A,{sx:{padding:"30px 0px",margin:"30px 0px"},children:[t?(0,V.jsx)(l.A,{variant:"rectangular",width:200,height:50}):(0,V.jsx)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"center",children:(0,V.jsx)(r.A,{children:(0,V.jsx)(W.A,{sx:{typography:{md:"h5",xs:"body1"},fontWeight:"600 !important"},mt:1,children:n.title})})}),(0,V.jsx)(m.A,{sx:{my:1}}),(0,V.jsxs)(r.A,{pb:"12px",mt:2,mb:2,sx:{mr:{xs:0}},children:[(0,V.jsx)(h.RC,{className:"myslider h-auto",pagination:{type:"progressbar"},slidesPerView:4,freeMode:!0,modules:[F.dK,F.Vx],onSwiper:e=>{c(e)},breakpoints:{0:{slidesPerView:1,spaceBetween:10},575:{slidesPerView:1.5,spaceBetween:20},768:{slidesPerView:2.5,spaceBetween:30},1024:{slidesPerView:3,spaceBetween:10},1200:{slidesPerView:4,spaceBetween:20}},children:n.partners.map((e=>(0,V.jsx)(h.qr,{children:(0,V.jsx)(r.A,{mt:4,children:(0,V.jsx)(U.A,{partner:e,isHome:o},e.id)})},e.id)))}),(null===n||void 0===n||null===(i=n.partners)||void 0===i?void 0:i.length)>4?(0,V.jsxs)(r.A,{display:"flex",sx:{my:3},gap:2,width:"100%",justifyContent:"center",alignContent:"center",className:"categoryNavigationBtns",children:[(0,V.jsx)(g.A,{"aria-label":"Previous",variant:"contained",size:"small",color:"inherit",className:"categorySwiperBtn",sx:{borderRadius:"10px",minWidth:"40px",backgroundColor:"#F2F1F6","&:hover":{backgroundColor:"#F2F1F6",textDecoration:"none"}},onClick:()=>{d&&d.slidePrev()},children:(0,V.jsx)(D.A,{sx:{color:"black"},size:"small"})}),(0,V.jsx)(g.A,{"aria-label":"Next",variant:"contained",size:"small",color:"inherit",className:"categorySwiperBtn",sx:{borderRadius:"10px",minWidth:"40px",py:1,backgroundColor:"#F2F1F6","&:hover":{backgroundColor:"#F2F1F6",textDecoration:"none"}},onClick:()=>{d&&d.slideNext()},children:(0,V.jsx)(T.A,{sx:{color:"black"},size:"small"})})]}):null]})]},n.key)})})})})};var O=n(30344),H=n(10611),M=n(12110);const Z=e=>{let{subCategory:i}=e;const n=(0,L.A)();return(0,V.jsx)(r.A,{children:(0,V.jsx)(B.N_,{to:`sub-categories/${i.id}/${A()(i.name).toLowerCase()}`,className:"breadcrumb",children:(0,V.jsxs)(M.A,{className:"service-card",sx:{borderRadius:"15px",position:"relative"},children:[void 0!==i.discount&&i.discount>0?(0,V.jsx)(r.A,{position:"absolute",left:8,top:8,bgcolor:"#34C57D",p:.1,px:1,borderRadius:"5px",zIndex:1,children:(0,V.jsx)(W.A,{variant:"caption",color:n.palette.color.subCatName,children:`${i.discount}% OFF`})}):null,(0,V.jsxs)(r.A,{sx:{position:"relative"},children:[(0,V.jsx)("img",{src:i.image,title:i.name,alt:"service_image",className:"subcat-img",onError:_.jM,style:{height:"319px"}}),(0,V.jsx)(r.A,{sx:{position:"absolute",bottom:0,right:0,width:"100%",color:n.palette.color.subCatName,padding:"10px",textAlign:"center",overflow:"hidden",whiteSpace:"wrap",textOverflow:"ellipsis"},children:(0,V.jsx)(W.A,{variant:"h6",sx:{textAlign:"center"},children:i.name})})]})]})})},i.id)},J=e=>{var i;let{subCategory:n,loading:t}=e;const[o,d]=(0,s.useState)(null),c=(0,L.A)(),[x,p]=(0,s.useState)(.05),g=(0,O.A)("(min-width:1025px)");return(0,s.useEffect)((()=>{const e=()=>{if(o){const{progress:e}=o;p(e)}};return o&&o.on("progress",e),()=>{o&&o.off("progress",e)}}),[o]),(0,V.jsx)(V.Fragment,{children:(0,V.jsx)(r.A,{sx:{background:c.palette.background.box},children:(0,V.jsx)(a.A,{sx:{paddingBottom:"8px",marginBottom:"16px"},className:"mainContainer subCategoriesSection",children:(0,V.jsxs)(r.A,{sx:{padding:"30px 0px",paddingBottom:"0px",margin:"30px 0px"},children:[(0,V.jsxs)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",children:[t?(0,V.jsx)(l.A,{height:50,width:200}):(0,V.jsx)(r.A,{children:(0,V.jsx)(W.A,{sx:{typography:{md:"h5",xs:"body1"},fontWeight:"600 !important"},fontWeight:"bold",marginTop:1,children:n.title})}),t?"":null]}),g?(0,V.jsx)(m.A,{sx:{my:1}}):(0,V.jsx)(H.A,{variant:"determinate",value:100*x}),(0,V.jsx)(r.A,{mb:2,children:(0,V.jsx)(h.RC,{className:"swiper-wrapper-padding h-auto",slidesPerView:5,onSwiper:e=>{d(e)},modules:[F.Vx],navigation:!0,breakpoints:{0:{slidesPerView:1,spaceBetween:10},640:{slidesPerView:2,spaceBetween:20},898:{slidesPerView:3,spaceBetween:30},1204:{slidesPerView:5,spaceBetween:15}},children:(0,V.jsx)(r.A,{children:(0,V.jsx)(h.RC,{navigation:!0,modules:[F.Vx],className:"mySwiper max-h-500",children:null===n||void 0===n||null===(i=n.sub_categories)||void 0===i?void 0:i.map((e=>(0,V.jsx)(h.qr,{className:"",children:t?(0,V.jsx)($.KS,{}):(0,V.jsx)(Z,{subCategory:e})},e.id)))})})})})]},n.id)})})})};var G=n(68903),Q=n(36591),X=n(70549),Y=n(39213),ee=n(26494),ie=n(81045);const ne=e=>{var i,n;let{data:t,loading:d}=e;const[c,x]=(0,s.useState)(null),p=(0,L.A)(),u=(0,b.Zp)(),[v,j]=(0,s.useState)(.05),y=(0,O.A)("(min-width:1025px)"),[A,f]=(0,s.useState)(!1),_=null===(i=(0,w.d4)((e=>e.authentication)))||void 0===i?void 0:i.isLoggedIn;(0,s.useEffect)((()=>{const e=()=>{if(c){const{progress:e}=c;j(e)}};return c&&c.on("progress",e),()=>{c&&c.off("progress",e)}}),[c]);return(0,V.jsx)(V.Fragment,{children:t&&_&&(null===t||void 0===t||null===(n=t.previous_order)||void 0===n?void 0:n.length)>0?(0,V.jsx)(r.A,{sx:{background:p.palette.background.box},children:(0,V.jsx)(a.A,{sx:{paddingBottom:"8px",marginBottom:"16px"},className:"mainContainer subCategoriesSection",children:(0,V.jsxs)(r.A,{sx:{padding:"30px 0px",paddingBottom:"0px",margin:"30px 0px"},children:[(0,V.jsxs)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",children:[d?(0,V.jsx)(l.A,{height:50,width:200}):(0,V.jsx)(r.A,{children:(0,V.jsx)(W.A,{sx:{textTransform:"capitalize",marginBottom:"10px",typography:{md:"h5",xs:"body1"},fontWeight:"600 !important"},fontWeight:"bold",marginTop:1,children:t.title})}),d?"":null]}),y?(0,V.jsx)(m.A,{sx:{my:1}}):(0,V.jsx)(H.A,{variant:"determinate",value:100*v}),(0,V.jsx)(r.A,{mb:2,children:(0,V.jsx)(h.RC,{className:"swiper-wrapper-padding h-auto",slidesPerView:5,onSwiper:e=>{x(e)},modules:[F.Vx],navigation:!0,breakpoints:{0:{slidesPerView:1,spaceBetween:10},640:{slidesPerView:2,spaceBetween:20},898:{slidesPerView:3,spaceBetween:30},1200:{slidesPerView:3,spaceBetween:15},1400:{slidesPerView:3.5,spaceBetween:15}},children:(0,V.jsx)(r.A,{children:(0,V.jsx)(h.RC,{navigation:!0,modules:[F.Vx],className:"mySwiper max-h-500",children:t&&(null===t||void 0===t?void 0:t.previous_order.map((e=>(0,V.jsx)(h.qr,{children:(0,V.jsx)(M.A,{sx:{backgroundColor:p.palette.background.card,border:"1px solid #00000017",color:p.palette.color.categories,maxWidth:350,margin:"10px 0"},children:(0,V.jsxs)(ee.A,{sx:{padding:"16px !important"},children:[(0,V.jsxs)(G.Ay,{container:!0,justifyContent:"space-between",alignItems:"center",children:[(0,V.jsxs)(W.A,{variant:"body2",color:p.palette.primary.main,children:[(0,P.t)("invoice"),": ",e.invoice_no]}),(0,V.jsx)(W.A,{variant:"body2",sx:{color:"green",fontWeight:"bold"},children:"completed"===e.status?"Completed":""})]}),(0,V.jsxs)(r.A,{sx:{mt:1},children:[null===e||void 0===e?void 0:e.services.slice(0,2).map(((e,i)=>(0,V.jsx)(W.A,{variant:"body1",sx:{color:p.palette.color.textColor},children:e.service_title},i))),(null===e||void 0===e?void 0:e.services.length)>2&&(0,V.jsxs)(W.A,{variant:"body1",sx:{color:p.palette.color.textColor},children:["+",(null===e||void 0===e?void 0:e.services.length)-2," ",(0,P.t)("more")]})]}),(0,V.jsx)(G.Ay,{container:!0,justifyContent:"space-between",alignItems:"center",sx:{mt:2},children:(0,V.jsxs)(G.Ay,{item:!0,sx:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,V.jsx)(ie.A,{alt:e.company_name,src:e.profile_image,sx:{width:40,height:40}}),(0,V.jsx)(W.A,{variant:"body2",sx:{color:p.palette.color.textColor},children:e.company_name})]})}),(0,V.jsxs)(G.Ay,{container:!0,spacing:1,sx:{justifyContent:"space-between",alignItems:"center",marginTop:2},children:[(0,V.jsx)(G.Ay,{item:!0,xs:12,md:6,children:(0,V.jsx)(g.A,{variant:"outlined",className:"button-background",sx:{textTransform:"capitalize",color:p.palette.primary.main,width:"100%"},onClick:i=>(async e=>{f(!0),await o.A.download_invoices({order_id:e}).then((async i=>{const n=new Blob([i],{type:"application/pdf"}),t=document.createElement("a");t.href=URL.createObjectURL(n),t.download=`eDemand-invoice-${e}.pdf`,document.body.appendChild(t),t.click(),document.body.removeChild(t),f(!1)}))})(e.id),disabled:!0===A,children:!1===A?(0,V.jsxs)(V.Fragment,{children:[(0,P.t)("download"),"",(0,P.t)("invoice")]}):(0,V.jsxs)(V.Fragment,{children:[(0,P.t)("download"),(0,P.t)("invoice")]})},e.id)}),(0,V.jsx)(G.Ay,{item:!0,xs:12,md:6,children:(0,V.jsx)(g.A,{variant:"contained",onClick:i=>((e,i)=>{e.preventDefault(),u("/profile/booking/services/"+i)})(i,e.id),sx:{backgroundColor:"#1976d2",color:"#fff",width:"100%",textTransform:"none"},children:(0,P.t)("view-services")})})]})]})})},e.id))))})})})})]},t.id)})}):null})};var te=n(46983);const se=e=>{var i,n;let{data:t,loading:o}=e;const[d,c]=(0,s.useState)(null),x=(0,L.A)(),p=(0,b.Zp)(),[u,v]=(0,s.useState)(.05),j=(0,O.A)("(min-width:1025px)"),y=null===(i=(0,w.d4)((e=>e.authentication)))||void 0===i?void 0:i.isLoggedIn;(0,s.useEffect)((()=>{const e=()=>{if(d){const{progress:e}=d;v(e)}};return d&&d.on("progress",e),()=>{d&&d.off("progress",e)}}),[d]);return(0,V.jsx)(V.Fragment,{children:t&&y&&(null===t||void 0===t||null===(n=t.ongoing_order)||void 0===n?void 0:n.length)>0?(0,V.jsx)(r.A,{sx:{background:x.palette.background.box},children:(0,V.jsx)(a.A,{sx:{paddingBottom:"8px",marginBottom:"16px"},className:"mainContainer subCategoriesSection",children:(0,V.jsxs)(r.A,{sx:{padding:"30px 0px",paddingBottom:"0px",margin:"30px 0px"},children:[(0,V.jsxs)(r.A,{display:"flex",justifyContent:"space-between",alignItems:"end",children:[o?(0,V.jsx)(l.A,{height:50,width:200}):(0,V.jsx)(r.A,{children:(0,V.jsx)(W.A,{sx:{textTransform:"capitalize",marginBottom:"10px",typography:{md:"h5",xs:"body1"},fontWeight:"600 !important"},fontWeight:"bold",marginTop:1,children:t.title})}),o?"":null]}),j?(0,V.jsx)(m.A,{sx:{my:1}}):(0,V.jsx)(H.A,{variant:"determinate",value:100*u}),(0,V.jsx)(r.A,{mb:2,children:(0,V.jsx)(h.RC,{className:"swiper-wrapper-padding h-auto",slidesPerView:5,onSwiper:e=>{c(e)},modules:[F.Vx],navigation:!0,breakpoints:{0:{slidesPerView:1,spaceBetween:10},640:{slidesPerView:2,spaceBetween:20},898:{slidesPerView:3,spaceBetween:30},1200:{slidesPerView:3,spaceBetween:15},1400:{slidesPerView:3.5,spaceBetween:15}},children:(0,V.jsx)(r.A,{children:(0,V.jsx)(h.RC,{navigation:!0,modules:[F.Vx],className:"mySwiper max-h-500",children:t&&(null===t||void 0===t?void 0:t.ongoing_order.map((e=>(0,V.jsx)(h.qr,{children:(0,V.jsx)(M.A,{sx:{backgroundColor:x.palette.background.card,border:"1px solid #00000017",color:x.palette.color.categories,maxWidth:350,margin:"10px 0"},children:(0,V.jsxs)(ee.A,{sx:{padding:"16px !important"},children:[(0,V.jsxs)(G.Ay,{container:!0,justifyContent:"space-between",alignItems:"center",children:[(0,V.jsxs)(W.A,{variant:"body2",color:x.palette.primary.main,children:[(0,P.t)("invoice")," : ",e.invoice_no]}),(0,V.jsx)(W.A,{variant:"body2",sx:{color:x.palette.color.textColor,fontWeight:"bold"},children:"started"===e.status?"Started":""})]}),(0,V.jsxs)(r.A,{sx:{mt:1},children:[null===e||void 0===e?void 0:e.services.slice(0,2).map(((e,i)=>(0,V.jsx)(W.A,{variant:"body1",sx:{color:x.palette.color.textColor},children:(0,_.xv)(e.service_title,80)},i))),(null===e||void 0===e?void 0:e.services.length)>2&&(0,V.jsxs)(W.A,{variant:"body1",sx:{color:x.palette.color.textColor},children:["+",(null===e||void 0===e?void 0:e.services.length)-2," ",(0,P.t)("more")]})]}),(0,V.jsx)(G.Ay,{container:!0,justifyContent:"space-between",alignItems:"center",sx:{mt:2},children:(0,V.jsxs)(G.Ay,{item:!0,sx:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,V.jsx)(ie.A,{alt:e.company_name,src:e.profile_image,sx:{width:40,height:40}}),(0,V.jsx)(W.A,{variant:"body2",sx:{color:x.palette.color.textColor},children:e.company_name})]})}),(0,V.jsxs)(G.Ay,{container:!0,spacing:1,sx:{justifyContent:"space-between",alignItems:"center",marginTop:2},children:[(0,V.jsx)(G.Ay,{item:!0,xs:12,md:6,children:(0,V.jsx)(g.A,{variant:"outlined",className:"button-background",sx:{textTransform:"capitalize",color:x.palette.primary.main,width:"100%"},onClick:i=>(async e=>{try{(0,te.zB)({booking_id:null===e||void 0===e?void 0:e.id,partner_id:null===e||void 0===e?void 0:e.partner_id,partner_name:null===e||void 0===e?void 0:e.company_name,image:null===e||void 0===e?void 0:e.profile_image,order_status:null===e||void 0===e?void 0:e.status}),p("/chat")}catch(i){console.log(i)}})(e),children:(0,P.t)("chat")},e.id)}),(0,V.jsx)(G.Ay,{item:!0,xs:12,md:6,children:(0,V.jsx)(g.A,{variant:"contained",onClick:i=>((e,i)=>{e.preventDefault(),p("/profile/booking/services/"+i)})(i,e.id),sx:{backgroundColor:"#1976d2",color:"#fff",width:"100%",textTransform:"none"},children:(0,P.t)("view-services")})})]})]})})},e.id))))})})})})]},t.id)})}):null})},oe=()=>{var e,i;const[n,t]=(0,s.useState)([]),[l,d]=(0,s.useState)([]),[c,x]=(0,s.useState)([]),[p,m]=(0,s.useState)(!0),[h,u]=(0,s.useState)(!1),v=(0,w.wA)(),j=(0,w.d4)((e=>e.Location)),b=null===(e=(0,w.d4)((e=>e.Settings)))||void 0===e||null===(i=e.settings)||void 0===i?void 0:i.web_settings,y=(0,L.A)(),f=async()=>{m(!0),u(!1);try{var e,i,n;const s=await o.A.get_home_screen({latitude:j.lat,longitude:j.lng});t(null===s||void 0===s||null===(e=s.data)||void 0===e?void 0:e.sliders),d(null===s||void 0===s||null===(i=s.data)||void 0===i?void 0:i.categories),x(null===s||void 0===s||null===(n=s.data)||void 0===n?void 0:n.sections),v((0,X.d1)(null===s||void 0===s?void 0:s.data))}catch(s){console.log(s),u(!0)}finally{m(!1)}};return(0,s.useEffect)((()=>{f()}),[b,j]),(0,V.jsx)(V.Fragment,{children:h?(0,V.jsxs)(G.Ay,{container:!0,spacing:2,direction:"column",alignItems:"center",justifyContent:"center",height:"100vh",sx:{marginTop:{xs:0,md:-20}},children:[(0,V.jsx)(G.Ay,{item:!0,children:(0,V.jsx)(M.A,{sx:{boxShadow:"none !important"},children:(0,V.jsx)(Q.A,{component:"img",src:Y,alt:"No Data Image",sx:{width:{xs:300,sm:600,md:700},height:"auto",border:"none",boxShadow:"none"}})})}),(0,V.jsx)(G.Ay,{item:!0,children:(0,V.jsxs)(W.A,{sx:{textAlign:"center",marginTop:{xs:0,md:-22}},children:[(0,V.jsx)(W.A,{variant:"body1",sx:{textAlign:"left",fontFamily:"Plus Jakarta Sans",fontWeight:"bold",fontSize:"32px",lineHeight:"32px",letterSpacing:"0px"},children:(0,P.t)("something_went_wrong")}),(0,V.jsx)(W.A,{variant:"body1",sx:{color:"var(--secondary-color-343f53)",textAlign:"left",fontFamily:"Plus Jakarta Sans",fontWeight:"normal",fontSize:"20px",lineHeight:"32px",letterSpacing:"0px",opacity:.7,marginLeft:5},children:(0,P.t)("try_again_later")})]})}),(0,V.jsx)(G.Ay,{item:!0,children:(0,V.jsx)(g.A,{variant:"contained",onClick:f,sx:{textTransform:"none",marginTop:{xs:0,md:-28}},children:(0,P.t)("retry")})})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(R,{sliderData:n,loading:p}),l&&(null===l||void 0===l?void 0:l.length)>0?(0,V.jsx)(r.A,{my:3,children:(0,V.jsx)(K,{categories:l,loading:p})}):null,p?(0,V.jsx)(r.A,{className:"display-flex gap-12",sx:{overflow:"auto",background:y.palette.background.box},children:(0,V.jsxs)(a.A,{children:[(0,V.jsx)(r.A,{display:"flex",gap:2,mt:1,mb:1,children:Array.from(Array(4).keys()).map((e=>(0,V.jsx)($.KS,{},e)))}),(0,V.jsx)(r.A,{display:"flex",gap:2,mt:1,mb:1,children:Array.from(Array(3).keys()).map((e=>(0,V.jsx)($.wW,{},e)))})]})}):c&&c.map((e=>{var i;return"partners"===(null===e||void 0===e?void 0:e.section_type)||"top_rated_partner"===(null===e||void 0===e?void 0:e.section_type)||"near_by_provider"===(null===e||void 0===e?void 0:e.section_type)?(0,V.jsx)(V.Fragment,{children:(null===e||void 0===e||null===(i=e.partners)||void 0===i?void 0:i.length)>0?(0,V.jsx)(q,{Provider:e,loading:p,isHome:!0},e.id):null}):"sub_categories"===(null===e||void 0===e?void 0:e.section_type)?(0,V.jsx)(J,{subCategory:e,loading:p},e.id):"previous_order"===(null===e||void 0===e?void 0:e.section_type)?(0,V.jsx)(ne,{data:e,loading:p}):"ongoing_order"===(null===e||void 0===e?void 0:e.section_type)?(0,V.jsx)(se,{data:e,loading:p}):"banner"===(null===e||void 0===e?void 0:e.section_type)?(0,V.jsx)(V.Fragment,{children:null===e||void 0===e?void 0:e.banner.map((e=>{const i=e.banner_type,n=A()(e.provider_name,{lower:!0});return(0,V.jsx)(r.A,{sx:{background:y.palette.background.box},children:(0,V.jsx)(a.A,{sx:{paddingBottom:"8px",marginBottom:"16px"},className:"mainContainer subCategoriesSection",children:"banner_provider"===i?(0,V.jsx)(B.N_,{to:`/providers/services/${e.type_id}/${n}`,children:(0,V.jsx)(r.A,{component:"img",src:e.web_banner_image,width:"100%",sx:{objectFit:"contain",height:{xs:"200px",md:"400px"},borderRadius:{xs:"10px"}}})}):"banner_category"===i?(0,V.jsx)(B.N_,{to:"/categories/"+e.category_parent_id+"/"+A()(e.category_name,{lower:!0}),children:(0,V.jsx)(r.A,{component:"img",src:e.web_banner_image,width:"100%",sx:{objectFit:"contain",height:{xs:"200px",md:"400px"},borderRadius:{xs:"10px"}}})}):(0,V.jsx)("a",{href:""!==e.banner_url?e.banner_url:void 0,target:""!==e.banner_url?"_blank":void 0,rel:""!==e.banner_url?"noopener noreferrer":void 0,role:""===e.banner_url?"button":void 0,onClick:""===e.banner_url?e=>e.preventDefault():void 0,children:(0,V.jsx)(r.A,{component:"img",src:e.web_banner_image,width:"100%",sx:{objectFit:"contain",height:{xs:"200px",md:"400px"},borderRadius:{xs:"10px"}}})})})},e.id)}))}):null}))]})})},re=()=>(0,V.jsx)(t.A,{children:(0,V.jsx)(oe,{})})},39213:(e,i,n)=>{e.exports=n.p+"static/media/No__data-pana.58fcb25b54a6443b1d4b.png"},90611:(e,i,n)=>{n.d(i,{A:()=>_});var t=n(65043),s=n(96446),o=n(42518),r=n(85865),a=n(71245),l=n(36171),d=n(79456),c=n(81494),x=n(40984),p=n(46941),m=n(23768),g=n(17392),h=n(39336),u=n(33438),v=n(73216),j=n(69369),b=n(44978),y=n(128),A=n(95367),w=n(25581),f=n(70579);const _=e=>{let{redirect:i}=e;const n=(0,v.Zp)(),{modal:_}=(0,d.d4)((e=>e.Settings)),C=(0,d.d4)((e=>e.Location)),k=(0,d.wA)();(0,t.useEffect)((()=>{}),[C]);const S=()=>{k((0,y.mi)(!1)),k((0,c.eo)(!1))},N=(0,j.u)();return(0,f.jsx)(s.A,{children:(0,f.jsx)(a.A,{open:_,onClose:()=>S(),"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:(0,f.jsxs)(s.A,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:{xs:"90%",md:"60%"},bgcolor:"background.paper",boxShadow:24,borderRadius:"var(--global-border-radius)",p:2},children:[(0,f.jsxs)(s.A,{mt:1,display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,f.jsx)(r.A,{variant:"h6",color:N.palette.text.primary,children:(0,b.t)("select_map_location")}),(0,f.jsx)(g.A,{onClick:()=>S(),children:(0,f.jsx)(u.A,{})})]}),(0,f.jsx)(h.A,{sx:{width:"100%",mb:3}}),(0,f.jsx)(A.A,{onSelectLocation:e=>{k((0,c.tP)(null===e||void 0===e?void 0:e.lat)),k((0,c.Uv)(null===e||void 0===e?void 0:e.lng)),k((0,c._z)(null===e||void 0===e?void 0:e.formatted_address))},apiKey:w.cu,isLocationPass:!0,locationlat:C.lat,locationlng:C.lng,modal:_}),(0,f.jsx)(o.A,{fullWidth:!0,sx:{mt:2},variant:"contained",color:"primary",onClick:e=>(async()=>{try{const e=await l.A.providerAvailable({latitude:C.lat,longitude:C.lng,isCheckout:0});if(!1===(null===e||void 0===e?void 0:e.error)){k((0,x.jx)(!0)),k((0,c.tP)(C.lat)),k((0,c.Uv)(C.lng)),k((0,c.eo)(!1));const e=await(0,p.Vl)(C.lat,C.lng);k((0,c._z)(e)),n("/")}else m.Ay.error((0,b.t)("our_service_not_area")),i&&(k((0,x.jx)(!1)),k((0,y.mi)(!1)),k((0,c.eo)(!1)))}catch(e){console.error(e)}})(),children:"Use this location"})]})})})}}}]);
//# sourceMappingURL=70.92c3ecca.chunk.js.map