PageSourceSearch

https://www.cloudtailor.com/_next/static/chunks/2832-38889d4d2b2c7e1e.js?dpl=dpl_Dvjj11H8UjEzVXY5A17WUPacJ1ao

js cloudtailor.com collected 2026-10-08 01:57:54 UTC 56,030 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2832],{93646:function(e,t,r){var i=r(85893),a=r(9008),l=r.n(a);t.Z=e=>{let{title:t,description:r,sitename:a="",meta_keywords:n}=e,o=window.location.href,s="string"==typeof t&&t.trim()?t.trim():"CloudTailor | India's leading personalised fashion & tailoring brand",d="string"==typeof r&&r.trim()?r.trim():"Explore bespoke fashion solutions - designer blouses, wedding lehengas, custom-made dresses, and more. Find your perfect fit at CloudTailor";return(0,i.jsxs)(l(),{children:[(0,i.jsx)("title",{children:s}),(0,i.jsx)("meta",{name:"description",content:d}),n&&(0,i.jsx)("meta",{name:"keywords",content:n}),(0,i.jsx)("meta",{name:"robots",content:"index, follow"}),(0,i.jsx)("meta",{name:"googlebot",content:"index,follow"}),o&&(0,i.jsx)("link",{rel:"canonical",href:o}),(0,i.jsx)("meta",{property:"og:title",content:s}),(0,i.jsx)("meta",{property:"og:description",content:d}),(0,i.jsx)("meta",{property:"og:image",content:"".concat("https://images-static.cloudtailor.com/","og-image/cloudtailor-og-img.png")}),(0,i.jsx)("meta",{property:"og:type",content:"website"}),(0,i.jsx)("meta",{property:"og:image:width",content:"300"}),(0,i.jsx)("meta",{property:"og:image:height",content:"300"}),(0,i.jsx)("meta",{property:"og:url",content:o}),(0,i.jsx)("meta",{property:"og:site_name",content:"CloudTailor"}),(0,i.jsx)("meta",{name:"twitter:card",content:"FashionMadeEasy"}),(0,i.jsx)("meta",{name:"twitter:site",content:"@cloudtailor_in"}),(0,i.jsx)("meta",{name:"twitter:title",content:s}),(0,i.jsx)("meta",{name:"twitter:description",content:d}),(0,i.jsx)("meta",{name:"twitter:image",content:"https://cloudtailor-cdn.s3.ap-south-1.amazonaws.com/logo/CloudTailor-Logo.webp"}),(0,i.jsx)("meta",{name:"google-play-app",content:"app-id=com.cloudtailor.app"}),(0,i.jsx)("meta",{name:"apple-itunes-app",content:"app-id=1553413660"})]})}},53471:function(e,t,r){var i=r(85893),a=r(67294),l=r(86010),n=r(77527),o=r(60990),s=r(37958),d=r(95307);let c=(0,n.ZP)(o.Z)({"& .handle":{cursor:"pointer"}}),u=e=>{var t;let{position:r,open:n,width:o="100%",handle:u,children:x,toggleSidenav:h}=e,[p,m]=(0,a.useState)(n);return(0,a.useEffect)(()=>m(n),[n]),(0,i.jsxs)(c,{children:[(0,i.jsx)(s.ZP,{anchor:r,open:p,onClose:()=>{h&&h(),m(!1)},SlideProps:{style:{width:o}},sx:{zIndex:15001},children:(0,i.jsx)(d.Z,{autoHide:!1,children:x})}),u&&(0,a.cloneElement)(u,{onClick:h||(()=>m(!p)),className:(0,l.Z)(null===(t=u.props)||void 0===t?void 0:t.className,"handle")})]})};u.defaultProps={width:1e4,position:"left",open:!1},t.Z=u},54811:function(e,t,r){r.d(t,{Z:function(){return eF}});var i=r(85893),a=r(67294),l=r(15821),n=r(38855),o=r(77914),s=r(90829),d=r(35798),c=r(18745),u=r(11032),x=r(60762),h=r(60990),p=r(6897),m=r(94143),g=r(29346),b=r(28577),v=r(52857),f=r(26541),j=r(95611),y=r(96788),_=r(68573),w=r(37958),Z=r(56912),C=r(25281),k=r(65806),S=r(31121),I=r(61730),R=r(53471),F=r(68067),z=r(40913),P=r(29146),A=r(41664),W=r.n(A),L=r(38444),O=r(55678);r(37677);var E=r(77527),N=r(81873),H=r(88196),B=r(71919),T=r(84677),D=r(20377),M=r(82515),q=r(79975),K=r(94438),V=r(6316),U=r(99682),Y=r(20024),J=r(50319),G=r(46171),X=r(73359),$=r(49314),Q=r(11163),ee=r(9473),et=r(47607),er=r(14934),ei=r(16770),ea=r(8263);let el=(0,E.ZP)(q.Z)({height:"100%",margin:"auto",display:"flex",overflow:"hidden",borderRadius:"5px",position:"relative",flexDirection:"column",transition:"all 250ms ease-in-out",":hover":{"& .hover-box":{opacity:1}}}),en=(0,E.ZP)(h.Z)(e=>{let{theme:t}=e;return{textAlign:"center",position:"relative",display:"inline-block",[t.breakpoints.down("sm")]:{display:"block"},".image-container":{position:"relative"},"& .bazaar-image":{height:"90%",width:"100%",objectFit:"cover",aspectRatio:16/24},"& .placeholder":{height:"40%",width:"100%",objectFit:"contain",aspectRatio:16/24},".logo-overlay":{position:"absolute",top:"10px",right:"10px",width:"50px",height:"auto",zIndex:1}}});(0,E.ZP)(N.Z)({zIndex:1,top:"10px",left:"10px",paddingLeft:3,paddingRight:3,fontWeight:600,fontSize:"10px",position:"absolute"}
1),(0,E.ZP)(h.Z)({zIndex:2,top:"7px",opacity:0,right:"15px",display:"flex",cursor:"pointer",position:"absolute",flexDirection:"column",transition:"all 0.3s ease-in-out"}),(0,E.ZP)(h.Z)({"& .title, & .categories":{}});var eo=e=>{var t,r,l;let n,o;let{id:s,slug:d,sku:u,name:p,price:m,special_price:g,imgUrl:b,rating:v=5,hideRating:f,hoverEffect:j,vendor:_,showProductSize:w}=e,C=(0,Q.useRouter)(),k=(0,c.Z)(),[S,R]=(0,a.useState)(!0),F=(0,I.Z)(k.breakpoints.down("sm")),P=(0,ee.I0)(),{enqueueSnackbar:A}=(0,D.Ds)(),{state:E,dispatch:N}=(0,K.bp)(),[q,eo]=(0,a.useState)(!1),[es,ed]=(0,a.useState)(!1),[ec,eu]=(0,a.useState)({}),[ex,eh]=(0,a.useState)(!0),[ep,em]=(0,a.useState)(0),[eg,eb]=(0,a.useState)(!1),[ev,ef]=(0,a.useState)({}),[ej,ey]=(0,a.useState)(!1),[e_]=(0,J.D)(Y.DH),[ew,eZ]=(0,a.useState)(!0),{data:eC}=(0,G.m)(Y.G4),[ek,{loading:eS,data:eI,error:eR}]=(0,X.t)($.jL),[eF,{loading:ez,data:eP,error:eA}]=(0,X.t)($.yt);(0,a.useEffect)(()=>{ek()},[]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{R(!1)},0);return()=>clearTimeout(e)},[]);let eW=_?null===(t=M.I[_.name])||void 0===t?void 0:t.image:null,eL=null==_?void 0:_.id,eO=()=>{ey(!1)};(0,a.useEffect)(()=>{let e=setTimeout(()=>{eZ(!1)},1e3);return()=>{clearTimeout(e)}},[]),(0,a.useCallback)(()=>eo(e=>!e),[]),E.cart.find(e=>e.slug===d);let eE=(e,t)=>{eu(r=>{var i,a,l;let n=localStorage.getItem("user_id");if((null===(i=r[t])||void 0===i?void 0:i.variant_id)!==e.id)return{...r,[t]:{quantity:1,service_name:e.name,user_id:n,variant_id:e.id,product_variant_sku:e.sku,product_variant_name:e.name,product_name:e.name,channel_slug:null==e?void 0:null===(l=e.product_productvariantchannellistings[0])||void 0===l?void 0:null===(a=l.channel_channel)||void 0===a?void 0:a.slug,currency:"INR",price_amount:e.product_productvariantchannellistings[0].price_amount,reference_notes:[]}};{let e={...r};return delete e[t],e}})};function eN(e){return e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}let eH=null==p?void 0:p.toString().toLowerCase().replace(/\s+/g,"-"),eB=null==_?void 0:null===(r=_.name)||void 0===r?void 0:r.toString().toLowerCase().replace(/\s+/g,"-"),eT=()=>{null==_||_.name};return(0,i.jsxs)(el,{hoverEffect:j,children:[(0,i.jsx)(en,{children:(0,i.jsxs)(h.Z,{onClick:()=>{eT(),window.open("/sarees/".concat(eB,"/").concat(eH,"/").concat(u),"_blank")},sx:{cursor:"pointer",position:"relative"},children:[eS?(0,i.jsx)(h.Z,{sx:{overflow:"hidden"},top:50,children:(0,i.jsx)(er.Z,{variant:"rectangular",width:300,height:400})}):(0,i.jsx)(U.Z,{src:b,onError:e=>{e.target.onerror=null,e.target.src=eW,eb(!0)},className:"".concat(eg?"placeholder":"bazaar-image"),alt:p}),!eg&&(0,i.jsx)("img",{src:eW,className:"logo-overlay",alt:"Logo"})," "]},s)}),(0,i.jsx)(h.Z,{children:(0,i.jsxs)(h.Z,{padding:1,children:[(0,i.jsxs)(h.Z,{mr:1,children:[(0,i.jsx)(h.Z,{children:(0,i.jsx)(W(),{href:"/sarees/".concat(eB,"/").concat(eH,"/").concat(u),target:"_blank",children:(0,i.jsx)(z.H3,{title:p,fontSize:F?"12px":"14px",fontWeight:"600",className:"title",color:"text.secondary",children:eN(p)})})}),(0,i.jsx)(h.Z,{display:"flex",justifyContent:"space-between",mt:.5,children:(0,i.jsx)(h.Z,{children:g&&parseFloat(g)!==parseFloat(m)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(y.Z,{fontWeight:"600",fontSize:F?13:14,sx:{textDecoration:"line-through",color:"grey.700",display:"inline-block"},children:[(0,i.jsx)(z.Dr,{fontSize:15,fontWeight:600,fontFamily:"lato",children:"₹"})," ",(0,V.Aq)(m)]})," ",(0,i.jsxs)(y.Z,{fontWeight:"600",fontSize:F?13:14,display:"inline-block",children:[(0,i.jsx)(z.Dr,{fontSize:15,ml:1,fontWeight:600,fontFamily:"lato",children:"₹"})," ",(0,V.Aq)(g)]})]}):(0,i.jsxs)(y.Z,{fontWeight:"600",fontSize:F?13:14,children:[(0,i.jsx)(z.Dr,{fontSize:15,fontWeight:600,fontFamily:"lato",children:"₹"})," ",(0,V.Aq)(m)]})})})]}),(0,i.jsxs)(H.Z,{open:ej,onClose:eO,sx:{zIndex:9999,"::-webkit-scrollbar":{height:"0"}},children:[(0,i.jsx)(O.Ix,{}),(0,i.jsxs)(h.Z,{sx:{overflowY:"auto",overflowX:"hidden","&::-webkit-scrollbar":{width:"10px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"gray",borderRadius:"8px"},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}},onScroll:e=>{eh(e.target.scrollTop<100)},children:[(0,i.jsx)(h.Z,{color:"inherit",onClick:eO,sx:{position:"absolute",top:"6px",right:F?"16px":"17px",zIndex:0,cursor:"pointer",visibility:ex?"visible":"hidden"},children:(0,i.jsx)(L.Z,{})}),(0,i.jsxs)(h.Z,{display:"flex",alignItems:"center",ml:2,mt:1,mb:1,children:[(0,i.jsx)("img",{src:b,alt:p,style:{width:"40px",height:"50px",marginRight:"10px"}}),(0,i.jsx)(y.Z,{ml:2,mt:3,mb:1,fontWeight:600,children:eN(p)})]}),(0,i.jsxs)(h.Z,{sx:{bgcolor:"paste.50",overflow:"auto"},children:[(0,i.jsx)(h.Z,{children:(0,i.jsx)(y.Z,{ml:1,p:1,variant:"body1",sx:{fontSize:"15px",fontWeight:600,color:"green"},children:"SELECT TAILORING SERVICES"})}),null==eI?void 0:null===(l=eI.product_product)||void 0===l?void 0:l.map(e=>{var t;return(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(y.Z,{ml:2,variant:"h6",children:e.name}),(0,i.jsx)(Z.Z,{}),(0,i.jsx)(h.Z,{display:"flex",flexDirection:"row",sx:{overflowX:"auto","::-webkit-scrollbar":{height:"0"}},children:(0,i.jsx)("div",{style:{whiteSpace:"nowrap",marginLeft:"5px"},children:null==e?void 0:null===(t=e.product_productvariants)||void 0===t?void 0:t.map(t=>{var r,a,l,n,o,s;return(0,i.jsx)(x.Z,{onClick:()=>eE(t,e.name),sx:{display:"inline-block",marginRight:"10px",ml:"10px",boxShadow:"1px 1px 1px 1x rgba(0, 0, 0, 0.1)",width:"180px",cursor:"pointer",border:(null===(r=ec[e.name])||void 0===r?void 0:r.variant_id)===t.id?"2px solid #CBBF81":""},children:(0,i.jsxs)(B.Z,{style:{padding:0,paddingBottom:5,display:"flex",flexDirection:"column",overflowX:"hidden",height:"100%"},children:[(null==t?void 0:t.product_variantmedia[0])?(0,i.jsx)("img",{src:(null==t?void 0:null===(l=t.product_variantmedia[0])||void 0===l?void 0:null===(a=l.product_productmedium)||void 0===a?void 0:a.external_url)+"."+(null==t?void 0:null===(o=t.product_variantmedia[0])||void 0===o?void 0:null===(n=o.product_productmedium)||void 0===n?void 0:n.type),alt:t.name,style:{width:"100%",height:"auto",objectFit:"cover"}}):(0,i.jsx)("img",{height:100,src:"/assets/images/ct-h-logo.svg",alt:"logo"}),(0,i.jsx)(y.Z,{fontSize:13,fontWeight:500,mt:.5,ml:.7,sx:{whiteSpace:"pre-wrap",wordWrap:"break-word"},children:eN(t.name)}),(0,i.jsxs)(y.Z,{fontWeight:500,ml:.7,color:"grey.800",children:[(0,i.jsx)(z.Dr,{fontSize:16,fontWeight:500,fontFamily:"lato",children:"₹"}),(0,V.Aq)(null==t?void 0:null===(s=t.product_productvariantchannellistings[0])||void 0===s?void 0:s.price_amount),"*"]})]})},t.id)})})})]},e.id)})]}),(0,i.jsxs)(h.Z,{position:"sticky",bottom:0,display:"flex",justifyContent:"flex-end",bgcolor:"paste.50",children:[(0,i.jsx)(T.Z,{variant:"contained",size:"large",sx:{fontSize:"0.7rem",fontWeight:500,letterSpacing:.5,mr:2,m:2,borderRadius:27,p:1},fullWidth:!0,onClick:(n={id:s,slug:d,price:g||m,imgUrl:b,name:p,qt
1y:1,sku:u,vendor_id:2,addOns:Object.keys(ec).length},()=>{N({type:"CHANGE_CART_AMOUNT",payload:n}),P((0,et.IH)(n));let e={brand_name:(null==n?void 0:n.vendor_id)===2?"Kalamandir":"Varamahalakshmi",product_name:null==n?void 0:n.name,price:null==n?void 0:n.price,currency:"INR",item_id:null==n?void 0:n.sku},t=localStorage.getItem("user_id");if(t){em(e=>e+1),localStorage.removeItem("cart"),e_({variables:{user_cart_insert_input:{quantity:1,user_id:t,variant_id:s,product_sku:u,vendor_id:eL,extra_service:Object.values(ec).map(e=>({quantity:1,service_name:e.service_name,user_id:e.user_id,variant_id:e.variant_id,product_variant_sku:e.product_variant_sku,product_variant_name:e.product_variant_name,product_name:e.product_name,channel_slug:e.channel_slug,currency:e.currency,price_amount:e.price_amount,reference_notes:[]})),currency:"INR",product_name:p,thumbnail:b,source:"web"}}}),(0,ei.HS)(e);let r={utc_time:Date.now().toString(),local_tz_offset:Math.abs(new Date().getTimezoneOffset()),event_id:"".concat(Date.now()).concat(t).concat(Math.floor(100+900*Math.random())),event_type:"af_add_to_cart",external_id:t,brand_name:(null==n?void 0:n.vendor_id)===2?"Kalamandir":"Varamahalakshmi",product_name:null==n?void 0:n.name,price:null==n?void 0:n.price,currency:"INR",channel:"web"};fetch("/api/handleJitsuAddCartEvent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user:{internal_id:t},events:[r],userAgent:navigator.userAgent})}).then(e=>{if(!e.ok)throw Error("HTTP error! Status: ".concat(e.status));return e.json()}).then(e=>{}).catch(e=>{}),(0,ei.I)(),eO(),eu({});let i={brand_name:2===n.id?"Kalamandir":"Varamahalakshmi",product_name:null==n?void 0:n.name,price:n.price,currency:"INR"},a={currency:"INR",value:1*n.price,items:[{item_id:u,item_name:p,item_brand:2===n.id?"Kalamandir":"Varamahalakshmi",item_category:"Saree",discount:m-g,item_variant:2===n.id?"Kalamandir":"Varamahalakshmi",price:n.price,quantity:1}]};(0,ea.ZO)(a),(0,ei._F)(i),A("Added to bag",{variant:"success"}),C.push("/cart")}else{let e=[...E.cart],t=e.findIndex(e=>e.id===s);-1!==t?e[t].qty+=1:e.push({...n,vendor_id:n.vendor_id}),localStorage.setItem("cart",JSON.stringify(e)),eO()}}),children:"SKIP"}),(0,i.jsx)(T.Z,{variant:"contained",size:"large",color:"dark",sx:{fontSize:"0.7rem",fontWeight:500,letterSpacing:.5,mr:2,m:2,p:1},fullWidth:!0,onClick:(o={id:s,slug:d,price:g||m,imgUrl:b,name:p,qty:1,sku:u,vendor_id:2,addOns:Object.keys(ec).length},()=>{if(Object.values(ec).length<=0){O.Am.error("Please select services",{position:"top-right",autoClose:1500,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0});return}let e={brand_name:(null==o?void 0:o.vendor_id)===2?"Kalamandir":"Varamahalakshmi",product_name:null==o?void 0:o.name,price:null==o?void 0:o.price,currency:"INR",item_id:null==o?void 0:o.sku};N({type:"CHANGE_CART_AMOUNT",payload:o}),P((0,et.IH)(o));let t=localStorage.getItem("user_id");if(t){em(e=>e+1),localStorage.removeItem("cart"),e_({variables:{user_cart_insert_input:{quantity:1,user_id:t,variant_id:s,product_sku:u,vendor_id:eL,extra_service:Object.values(ec).map(e=>({quantity:1,service_name:e.service_name,user_id:e.user_id,variant_id:e.variant_id,product_variant_sku:e.product_variant_sku,product_variant_name:e.product_variant_name,product_name:e.product_name,channel_slug:e.channel_slug,currency:e.currency,price_amount:e.price_amount,reference_notes:[]})),currency:"INR",product_name:p,thumbnail:b,source:"web"}}}),(0,ei.HS)(e);let r={utc_time:Date.now().toString(),local_tz_offset:Math.abs(new Date().getTimezoneOffset()),event_id:"".concat(Date.now()).concat(t).concat(Math.floor(100+900*Math.random())),event_type:"af_add_to_cart",external_id:t,brand_name:(null==o?void 0:o.vendor_id)===2?"Kalamandir":"Varamahalakshmi",product_name:null==o?void 0:o.name,price:null==o?void 0:o.price,currency:"INR",channel:"web"};fetch("/api/handleJitsuAddCartEvent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user:{internal_id:t},events:[r],userAgent:navigator.userAgent})}).then(e=>{if(!e.ok)throw Error("HTTP error! Status: ".concat(e.status));return e.json()}).then(e=>{}).catch(e=>{}),(0,ei.I)(),eO(),eu({});let i={brand_name:2===o.id?"Kalamandir":"Varamahalakshmi",product_name:null==o?void 0:o.name,price:o.price,currency:"INR"},a={currency:"INR",value:1*o.price,items:[{item_id:u,item_name:p,item_brand:2===o.id?"Kalamandir":"Varamahalakshmi",item_category:"Saree",discount:m-g,item_variant:2===o.id?"Kalamandir":"Varamahalakshmi",price:o.price,quantity:1}]};(0,ea.ZO)(a),(0,ei._F)(i),A("Added to bag",{variant:"success"}),C.push("/cart")}else{let e=[...E.cart],t=e.findIndex(e=>e.id===s);-1!==t?e[t].qty+=1:e.push({...o,vendor_id:o.vendor_id}),localStorage.setItem("cart",JSON.stringify(e)),eO()}}),children:"ADD TO BAG"})]})]})]})]})})]})},es=e=>{let{products:t,loading:r}
1=e,l=(0,c.Z)(),n=(0,I.Z)(l.breakpoints.down("sm")),[o,s]=(0,a.useState)(!0),d=(0,a.useMemo)(()=>t,[t]);return(0,a.useEffect)(()=>{setTimeout(()=>{s(!1)},2e3)},[]),(0,a.useEffect)(()=>{let e=null==d?void 0:d.map((e,t)=>{var r;let i={sku:null==e?void 0:e.sku,product_name:null==e?void 0:e.name,brand_name:null==e?void 0:null===(r=e.vendor)||void 0===r?void 0:r.name,discount:(null==e?void 0:e.price)-(null==e?void 0:e.sale_price),price:null==e?void 0:e.sale_price,currency:"INR"};return(0,ea.Wl)(i),i});e&&e.length>0&&(0,ea.Wl)(e[0])},[t]),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(a.Fragment,{children:(0,i.jsx)(h.Z,{children:(0,i.jsx)(_.ZP,{container:!0,spacing:n?1:2,children:t.map(e=>{var t,r;return(0,i.jsx)(_.ZP,{item:!0,lg:3,md:4,sm:6,xs:6,children:(0,i.jsx)(eo,{id:e.id,slug:e.slug||"",sku:e.sku||"",name:e.name,price:e.price,special_price:e.sale_price,rating:e.rating,imgUrl:(null===(r=e.vendor)||void 0===r?void 0:null===(t=r.metadata)||void 0===t?void 0:t.image_url)+(e.thumbnail||""),imgUrl2:"",vendor:e.vendor})},e.id)})})})})})},ed=r(47407),ec=r(85770),eu=r(12166),ex=r(32200),eh=r(34384),ep=r(6388),em=()=>(0,i.jsxs)("div",{children:[" ",(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"center",alignItems:"center",children:[(0,i.jsx)(er.Z,{variant:"circular",width:20,height:20}),(0,i.jsx)(er.Z,{animation:"wave",width:200})]})]}),eg=(0,a.memo)(e=>{var t,r,l,n,o,s,d,u,p,m,g,b,v;let{onClose:j,selectedFilters:_,updateFilters:w,updatePriceRange:C,defaultSelectedCategory:S,maxAmount:R}=e;(0,Q.useRouter)();let P=(0,c.Z)(),A=(0,I.Z)(P.breakpoints.down("sm")),[W,L]=(0,a.useState)([0,49900]),[O,E]=(0,a.useState)([]),[N,H]=(0,a.useState)([]),[B,D]=(0,a.useState)([]),[M,q]=(0,a.useState)([]),[K,U]=(0,a.useState)([]),[Y,J]=(0,a.useState)([]),[G,X]=(0,a.useState)(null),[ee,et]=(0,a.useState)([]),[er,ei]=(0,a.useState)([]),[ea,el]=(0,a.useState)([]),[en,eo]=(0,a.useState)([]),[es,eg]=(0,a.useState)({}),[eb,ev]=(0,a.useState)(""),{loading:ef,error:ej,data:ey}=(0,ep.aM)($.M7,{fetchPolicy:"cache-only"}),[e_,ew]=(0,a.useState)("color"),eZ=[0,49900],eC=(e,t,r,i)=>{w(a=>{let l={...a},n=l[e]||[],o=n.findIndex(e=>e.value===t&&e.id===r);return -1!==o?n.splice(o,1):n.push({value:t,id:r,label:i}),l[e]=n,ek(l),l})};(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("f");if(e){let t={};e.split(",").forEach(e=>{let[r,...i]=e.split("::");if(i.length>0){let e=Object.keys(_).forEach(e=>({id:W}));t[r]=e}}),eg(t)}},[_]);let ek=e=>{let t=[];for(let r in e)if(e[r].length>0){let i;(i="color"===r||"fabric"===r?e[r].map(e=>encodeURIComponent(e.label)).join("%20by"):e[r].map(e=>encodeURIComponent(e.label)).join(","))&&t.push("".concat(r,"::").concat(i))}let r=t.length>0?"/sarees?f=".concat(t.join(":")):"/sarees";setTimeout(()=>{window.history.replaceState(null,null,r)},0),eg(e)},eS=e=>{L(eZ),w(t=>{let r={...t};return r.hasOwnProperty(e)&&(r[e]=[]),ek(r),r})},eI=(e,t)=>{e&&"target"in e&&isNaN(parseInt(e.target.value))||(L(t),C(t))};(0,a.useEffect)(()=>{ey&&(null==ey?void 0:ey.vendor_product_producttype)&&X(null==ey?void 0:ey.vendor_product_producttype[0])},[ey]),(0,a.useEffect)(()=>{if(G){let e=G.vendor_attribute_attributeproducts.filter(e=>{let{filterable_in_storefront:t,visible_in_storefront:r,storefront_search_position:i}=e.vendor_attribute_attribute;return t&&r&&i>=1});e.sort((e,t)=>e.vendor_attribute_attribute.storefront_search_position-t.vendor_attribute_attribute.storefront_search_position),et(e)}},[G]),ee.map(e=>e.vendor_attribute_attribute.slug),ee.map(e=>({slug:e.vendor_attribute_attribute.slug,values:e.vendor_attribute_attribute.vendor_attribute_attributevalues})),Object.values(_).flatMap(e=>e).length;let eR=Object.values(_).flatMap(e=>e).length+(JSON.stringify(W)===JSON.stringify([0,49900])?0:1);(0,a.useEffect)(()=>{var e;let t=e=>{var t,r;let i=null==ey?void 0:null===(r=ey.vendor_product_producttype[0])||void 0===r?void 0:null===(t=r.vendor_attribute_attributeproducts.find(t=>t.vendor_attribute_attribute.slug===e))||void 0===t?void 0:t.vendor_attribute_attribute;if(i&&i.filterable_in_storefront&&i.visible_in_storefront){let t=i.vendor_attribute_attributevalues.filter(e=>""!==e.name.trim()).map(e=>({label:e.name,value:e.value,id:i.id,rich_text:e.rich_text?e.rich_text.colorCode:null}));switch(e){case"fabric":H(t);break;case"color":E(t);break;case"weave":q(t);break;case"print_pattern":D(t);break;case"brand":U(t);break;case"category":J(t);break;case"border_type":ei(t);break;case"border_size":el(t);break;case"blouse_included":eo(t)}}};!ef&&!ej&&Array.isArray(null==ey?void 0:null===(e=ey.vendor_product_producttype[0])||void 0===e?void 0:e.vendor_attribute_attributeproducts)&&(t("fabric"),t("color"),t("weave"),t("print_pattern"),t("brand"),t("category"),t("border_size"),t("blouse_included"),t("border_type"))},[ef,ej,ey]);let eF={brand:K,category:Y,fabric:N,color:O,border_type:er,border_size:ea,blouse:en,price:[]},ez=e=>{var t;return(null===(t=_[e])||void 0===t?void 0:t.length)||0},eP={brand:"Brand",category:"Category",fabric:"Fabric",color:"Color",border_type:"Border Type",border_size:"Border Size",blouse:"Blouse Included",price:"Price"},eA=e=>{ew(e)};return(0,i.jsxs)(i.Fragment,{children:[!A&&(0,i.jsxs)(x.Z,{sx:{p:"18px 27px",overflow:"auto",position:"sticky",top:"90px",maxHeight:"calc(99vh - 100px)"},elevation:1,className:"product-sidebar",children:[(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Brand"," ",(null==_?void 0:null===(t=_.brand)||void 0===t?void 0:t.length)>0?"(".concat(null==_?void 0:null===(r=_.brand)||void 0===r?void 0:r.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("brand"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:K.map((e,t)=>{var r;return(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex"},label:(0,i.jsx)(z.Dr,{color:"inherit",children:e.label}),control:(0,i.jsx)(eu.Z,{size:"small",sx:{color:"#3A1E58"},checked:null===(r=_.brand)||void 0===r?void 0:r.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>
1{eC("brand",e.value,e.id,e.label)}})})},t)})})})}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Category"," ",(null==_?void 0:null===(l=_.category)||void 0===l?void 0:l.length)>0?"(".concat(null==_?void 0:null===(n=_.category)||void 0===n?void 0:n.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("category"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:null==Y?void 0:Y.map((e,t)=>{var r;return(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex"},label:(0,i.jsx)(z.Dr,{color:"inherit",children:e.label}),control:(0,i.jsx)(eu.Z,{size:"small",sx:{color:"#3A1E58"},checked:(null==_?void 0:null===(r=_.category)||void 0===r?void 0:r.some(t=>t.value===e.value&&t.id===e.id))||!1,onChange:()=>{eC("category",e.value,e.id,e.label)}})})},t)})})})}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Fabric"," ",(null==_?void 0:null===(o=_.fabric)||void 0===o?void 0:o.length)>0?"(".concat(null==_?void 0:null===(s=_.fabric)||void 0===s?void 0:s.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("fabric"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:N.map((e,t)=>(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex"},label:(0,i.jsx)(z.Dr,{color:"inherit",children:e.label}),control:(0,i.jsx)(eu.Z,{size:"small",sx:{color:"#3A1E58"},checked:_.fabric.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>{eC("fabric",e.value,e.id,e.label)}})})},t))})})}),(0,i.jsx)(Z.Z,{sx:{mt:2,mb:3}}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Colors"," ",_.color.length>0?"(".concat(_.color.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("color"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:O.map((e,t)=>(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex",alignItems:"center"},label:(0,i.jsxs)(h.Z,{display:"flex",children:[(0,i.jsx)("div",{style:{width:"20px",height:"20px",border:"0.7px solid gray",borderRadius:"20%",backgroundColor:e.rich_text?e.rich_text:"multicolor",marginRight:"10px"}}),(0,i.jsx)(z.Dr,{color:"inherit",children:e.label})]}),control:(0,i.jsx)(eu.Z,{size:"small",color:"secondary",checked:_.color.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>
1eC("color",e.value,e.id,e.label)})})},t))})}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Border Type"," ",(null==_?void 0:null===(d=_.border_type)||void 0===d?void 0:d.length)>0?"(".concat(null==_?void 0:null===(u=_.border_type)||void 0===u?void 0:u.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("border_type"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:er.map((e,t)=>{var r;return(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex"},label:(0,i.jsx)(z.Dr,{color:"inherit",children:e.label}),control:(0,i.jsx)(eu.Z,{size:"small",sx:{color:"#3A1E58"},checked:null===(r=_.border_type)||void 0===r?void 0:r.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>{eC("border_type",e.value,e.id,e.label)}})})},t)})})})}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Border Size"," ",(null==_?void 0:null===(p=_.border_size)||void 0===p?void 0:p.length)>0?"(".concat(null==_?void 0:null===(m=_.border_size)||void 0===m?void 0:m.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("border_size"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:ea.map((e,t)=>{var r;return(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex"},label:(0,i.jsx)(z.Dr,{color:"inherit",children:e.label}),control:(0,i.jsx)(eu.Z,{size:"small",sx:{color:"#3A1E58"},checked:null===(r=_.border_size)||void 0===r?void 0:r.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>eC("border_size",e.value,e.id,e.label)})})},t)})})})}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(z.H6,{mb:2,children:["Blouse Included"," ",(null==_?void 0:null===(g=_.blouse)||void 0===g?void 0:g.length)>0?"(".concat(null==_?void 0:null===(b=_.blouse)||void 0===b?void 0:b.length,")"):""," "]}),(0,i.jsx)(y.Z,{color:"dark",sx:{fontWeight:500,cursor:"pointer",fontSize:13},onClick:()=>eS("blouse"),children:"Clear All"})]}),(0,i.jsx)(F.hs,{mb:2,flexWrap:"wrap",gap:1,sx:{maxHeight:350,overflowY:"auto","&::-webkit-scrollbar":{width:"8px"},"&::-webkit-scrollbar-thumb":{background:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-track":{background:"#f1f1f1"}},children:ef?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{}),(0,i.jsx)(em,{})]}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ed.Z,{sx:{width:"100%"},children:en.map((e,t)=>{var r;return(0,i.jsx)(ec.ZP,{disablePadding:!0,sx:{display:"flex",justifyContent:"space-between"},children:(0,i.jsx)(k.Z,{sx:{flex:"1 1 auto",display:"flex"},label:(0,i.jsx)(z.Dr,{color:"inherit",children:e.label}),control:(0,i.jsx)(eu.Z,{size:"small",sx:{color:"#3A1E58"},checked:null===(r=_.blouse)||void 0===r?void 0:r.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>
1eC("blouse",e.value,e.id,e.label)})})},t)})})})}),(0,i.jsx)(z.H6,{mb:5,children:"Price Range"}),(0,i.jsx)(h.Z,{mr:2,children:(0,i.jsx)(eh.ZP,{getAriaLabel:()=>"Price range",value:W,onChange:(e,t)=>eI(e,t),valueLabelDisplay:"on",valueLabelFormat:e=>"₹".concat(e.toLocaleString()),min:0,max:49900,marks:[{value:0,label:"0"},{value:49900,label:"₹".concat((0,V.Aq)(49900))}],getAriaValueText:function(e){return"₹".concat(e)},sx:{"& .MuiSlider-valueLabel":{bgcolor:"grey.900",color:"white"},color:"grey.900"}})}),(0,i.jsx)(Z.Z,{sx:{my:3}})]}),A&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(h.Z,{height:"90vh",children:[" ",(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[(0,i.jsx)(z.H5,{color:"grey.800",fontWeight:500,sx:{p:2},children:"FILTERS"}),(0,i.jsxs)(h.Z,{display:"flex",alignItems:"center",onClick:()=>eS(e_),children:[(0,i.jsx)(z.H5,{textAlign:"right",color:"grey.800",fontWeight:500,sx:{marginLeft:-3},children:"Reset Filter"}),(0,i.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"#001325",xmlns:"http://www.w3.org/2000/svg","fill-opacity":"0.64",style:{marginRight:7},children:[(0,i.jsx)("path",{d:"M17.0917 11.5918C16.8436 12.7052 16.3373 13.7446 15.6135 14.6262C14.8897 15.5077 13.9687 16.2068 12.925 16.6668C12.0166 17.0669 11.0342 17.2713 10.0417 17.2668C8.69033 17.2706 7.36514 16.8945 6.2173 16.1813C5.06946 15.4681 4.14521 14.4467 3.55 13.2335L3.16667 14.3752C3.12485 14.499 3.04528 14.6065 2.93915 14.6828C2.83302 14.759 2.70567 14.8001 2.575 14.8002C2.50888 14.8122 2.44112 14.8122 2.375 14.8002C2.21815 14.747 2.08881 14.6338 2.01537 14.4854C1.94193 14.3369 1.93041 14.1654 1.98333 14.0085L2.85833 11.3585C2.8838 11.2801 2.92453 11.2075 2.97818 11.1449C3.03182 11.0823 3.09732 11.0309 3.17091 10.9937C3.2445 10.9565 3.32471 10.9343 3.40694 10.9282C3.48916 10.9222 3.57177 10.9325 3.65 10.9585L6.3 11.8335C6.44206 11.8956 6.55596 12.0084 6.61955 12.1498C6.68315 12.2912 6.6919 12.4512 6.64412 12.5987C6.59633 12.7462 6.49542 12.8707 6.36098 12.948C6.22654 13.0253 6.06818 13.0498 5.91667 13.0168L4.59167 12.5835C5.1269 13.7078 5.99958 14.6371 7.08807 15.2419C8.17656 15.8467 9.42663 16.0968 10.664 15.9574C11.9014 15.818 13.0645 15.296 13.9911 14.4641C14.9177 13.6323 15.5617 12.5321 15.8333 11.3168C15.8711 11.1551 15.9709 11.0148 16.1112 10.9259C16.2515 10.8371 16.421 10.8069 16.5833 10.8418C16.6664 10.8568 16.7457 10.8882 16.8164 10.9342C16.8872 10.9802 16.948 11.0399 16.9954 11.1098C17.0428 11.1797 17.0757 11.2583 17.0922 11.3411C17.1087 11.4239 17.1085 11.5091 17.0917 11.5918V11.5918Z",fill:"#001325","fill-opacity":"0.64"}),(0,i.jsx)("path",{d:"M18.0667 6.09155L17.1 8.71655C17.0559 8.8359 16.9764 8.93894 16.8722 9.01191C16.7679 9.08488 16.6439 9.12429 16.5167 9.12488C16.4449 9.1367 16.3717 9.1367 16.3 9.12488L13.675 8.12488C13.5192 8.06742 13.3926 7.95041 13.323 7.7996C13.2535 7.64879 13.2467 7.47653 13.3042 7.32072C13.3616 7.1649 13.4786 7.0383 13.6294 6.9687
15C13.7803 6.89921 13.9525 6.89242 14.1083 6.94988L15.4083 7.42488C14.904 6.23717 14.0293 5.24431 12.9146 4.59438C11.7999 3.94445 10.505 3.67228 9.22296 3.81848C7.94093 3.96468 6.74052 4.5214 5.80076 5.40561C4.86101 6.28981 4.23227 7.45413 4.00833 8.72488C3.98131 8.86911 3.90505 8.99947 3.79257 9.09371C3.6801 9.18794 3.53839 9.2402 3.39167 9.24155H3.28333C3.20229 9.22746 3.12482 9.19751 3.05537 9.15341C2.98592 9.10932 2.92586 9.05195 2.87864 8.98459C2.83141 8.91724 2.79795 8.84122 2.78016 8.7609C2.76238 8.68058 2.76062 8.59755 2.775 8.51655C3.04252 6.99544 3.7899 5.5999 4.90774 4.53417C6.02557 3.46844 7.45518 2.78849 8.98732 2.59382C10.5195 2.39916 12.0737 2.70002 13.4225 3.45235C14.7713 4.20469 15.8439 5.369 16.4833 6.77488L16.8917 5.65822C16.9201 5.58106 16.9635 5.51027 17.0193 5.44988C17.0751 5.38949 17.1423 5.34069 17.2169 5.30625C17.2916 5.27182 17.3723 5.25243 17.4545 5.24919C17.5367 5.24595 17.6187 5.25893 17.6958 5.28738C17.773 5.31584 17.8438 5.35921 17.9042 5.41502C17.9646 5.47083 18.0134 5.53799 18.0478 5.61266C18.0822 5.68734 18.1016 5.76806 18.1049 5.85023C18.1081 5.9324 18.0951 6.0144 18.0667 6.09155V6.09155Z",fill:"#001325","fill-opacity":"0.64"})]})]})]}),(0,i.jsx)(Z.Z,{sx:{borderWidth:"1px solid gray"}}),(0,i.jsxs)(h.Z,{sx:{display:"flex",width:"100%",height:"90vh"},children:[(0,i.jsx)(h.Z,{sx:{width:"50%",bgcolor:"grey.200"},children:(0,i.jsx)(ed.Z,{sx:{bgcolor:"grey.200"},children:Object.keys(eF).map((e,t)=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ec.ZP,{onClick:()=>eA(e),sx:{bgcolor:e_===e?"white":"",fontSize:e_===e?"40px":"",...e_===e&&{"& .MuiListItemText-primary":{fontWeight:500,color:"#3A1E58"}}},children:(0,i.jsx)(ex.Z,{sx:{color:"grey.800",fontSize:e_===e?16:"",fontWeight:600},primary:(0,i.jsx)(a.Fragment,{children:(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",children:[" ",(0,i.jsxs)(z.Dr,{fontSize:13,children:[" ",eP[e].replace(" ","\xa0")]}),(0,i.jsx)(z.Dr,{color:"green",marginLeft:6,children:ez(e)>0&&(0,i.jsxs)(i.Fragment,{children:[" ",ez(e)]})})]})})})},t),(0,i.jsx)(Z.Z,{sx:{borderWidth:"2px solid gray"}})]}))})}),(0,i.jsx)(Z.Z,{orientation:"vertical",sx:{borderWidth:"2px solid gray"}}),(0,i.jsx)(h.Z,{sx:{width:"70%",overflowY:"auto",maxHeight:"80vh"},children:"price"===e_?(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(y.Z,{mt:2,mb:2,ml:2,fontWeight:500,color:"black",fontSize:{xs:12,sm:14},children:"Selected price range"}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",flexDirection:"row",gap:2,ml:1,mr:1,children:[(0,i.jsx)(f.Z,{fullWidth:!0,placeholder:"Min",variant:"outlined",value:W[0],onChange:e=>eI(e,[parseInt(e.target.value),W[1]]),sx:{"& .MuiOutlinedInput-root":{margin:"-2px",background:"white",borderRadius:"28px",color:"black",fontWeight:500,width:{xs:"100%",sm:"80%"},height:"40px"},"@media (max-width: 600px)":{"& .MuiOutlinedInput-root":{width:"100%"}}}}),(0,i.jsx)(f.Z,{fullWidth:!0,placeholder:"Max",variant:"outlined",value:W[1],onChange:e=>eI(e,[W[0],parseInt(e.target.value)]),sx:{"& .MuiOutlinedInput-root":{background:"white",color:"black",fontWeight:500,borderRadius:"28px",width:{xs:"100%",sm:"80%"},height:"40px"},"@media (max-width: 600px)":{"& .MuiOutlinedInput-root":{width:"100%"}}}})]}),(0,i.jsx)(h.Z,{sx:{ml:4.5,mr:5,mt:1},children:(0,i.jsx)(eh.ZP,{getAriaLabel:()=>"Price range",value:W,onChange:(e,t)=>
1eI(e,t),valueLabelFormat:e=>"₹".concat(e.toLocaleString()),min:0,max:49900,marks:[{value:0,label:"0"},{value:49900,label:"₹".concat((0,V.Aq)(49900))}],sx:{"& .MuiSlider-valueLabel":{bgcolor:"grey.900",color:"white"},color:"grey.900",fontFamily:"lato"}})})]}):(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsx)(f.Z,{fullWidth:!0,variant:"outlined",placeholder:"Search For ".concat(eP[e_]),value:eb,onChange:e=>ev(e.target.value),sx:{p:1,"& .MuiOutlinedInput-root":{background:"rgb(243, 244, 245)",borderRadius:"28px"}}}),"price"!==e_&&(0,i.jsx)(F.$9,{}),(0,i.jsx)(ed.Z,{children:e_&&(null===(v=eF[e_])||void 0===v?void 0:v.filter(e=>e.label.toLowerCase().includes(eb.toLowerCase())).map((e,t)=>{var r;return(0,i.jsxs)(ec.ZP,{children:[eF[e_]===O&&(0,i.jsx)(h.Z,{display:"flex",children:(0,i.jsx)("div",{style:{width:"20px",height:"20px",border:"0.7px solid gray",borderRadius:"20%",backgroundColor:e.rich_text?e.rich_text:"",marginRight:"10px"}})}),(0,i.jsx)(ex.Z,{primary:e.label,sx:{color:"grey.800",fontSize:30}}),(0,i.jsx)(eu.Z,{style:{transform:"scale(1.2)"},sx:{color:"#3A1E58"},checked:null===(r=_[e_])||void 0===r?void 0:r.some(t=>t.value===e.value&&t.id===e.id),onChange:()=>eC(e_,e.value,e.id,e.label)})]},t)}))})]})})]})]}),(0,i.jsxs)(h.Z,{position:"fixed",bottom:0,left:0,right:0,bgcolor:"background.paper",p:2,sx:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsx)(T.Z,{variant:"outlined",color:"primary",sx:{fontSize:"0.9rem",fontWeight:500,letterSpacing:.5,borderRadius:27,mr:2},size:"large",onClick:j,children:"Close"}),(0,i.jsxs)(T.Z,{variant:"contained",size:"large",color:"dark",sx:{fontSize:"0.9rem",fontWeight:500,letterSpacing:.5,ml:2},fullWidth:!0,onClick:()=>{j()},children:["Apply ",eR>0?"".concat(eR):""," Filters"]})]})]})]})}),eb=r(73426),ev=r(62345),ef=r(53737),ej=r(821),ey=r(67567),e_=()=>{let e=(0,a.useRef)(),[t,r]=(0,a.useTransition)(),[l,n]=(0,a.useState)([]),o=async e=>{n(await ey.Z.searchProducts(e))},s=()=>n([]);return(0,a.useEffect)(()=>(window.addEventListener("click",s),()=>window.removeEventListener("click",null)),[]),(0,i.jsxs)(h.Z,{position:"relative",flex:"1 1 0",maxWidth:"670px",mx:"auto",ref:e,children:[(0,i.jsx)(f.Z,{fullWidth:!0,variant:"outlined",placeholder:"Searching for...",onChange:e=>{r(()=>{var t;let r=null===(t=e.target)||void 0===t?void 0:t.value;r?o(r):n([])})},InputProps:{sx:{height:44,paddingRight:0,borderRadius:300,color:"grey.700",overflow:"hidden","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"primary.main"}},endAdornment:(0,i.jsx)(T.Z,{color:"primary",disableElevation:!0,variant:"contained",sx:{px:"3rem",height:"100%",borderRadius:"0 300px 300px 0"},children:"Search"}),startAdornment:(0,i.jsx)(ej.i,{fontSize:"small"})}}),l.length>0&&(0,i.jsx)(ej.v,{elevation:2,children:l.map(e=>(0,i.jsx)(W(),{href:"/product/search/".concat(e),children:(0,i.jsx)(b.Z,{children:e},e)},e))})]})},ew=e=>{let{children:t,showTopbar:r=!0,showNavbar:l=!0}=e,[n,o]=(0,a.useState)(!1),s=(0,a.useCallback)(e=>o(e),[]);return(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(eb.Z,{fixedOn:0,onSticky:s,scrollDistance:70,children:(0,i.jsx)(ev.Z,{isFixed:n,searchInput:(0,i.jsx)(e_,{})})}),(0,i.jsxs)(h.Z,{zIndex:4,position:"relative",className:"section-after-sticky",children:[l&&(0,i.jsx)(ef.Z,{elevation:0}),t]})]})},eZ=e=>{let{open:t,onClose:r,selectedFilters:a,updateFilters:l,updatePriceRange:n,maxAmount:o}=e;return(0,i.jsx)(w.ZP,{sx:{zIndex:9999,"& .MuiDrawer-paper":{width:"100%"}},anchor:"right",open:!!t,onClose:r,children:(0,i.jsx)(eg,{onClose:r,selectedFilters:a,updateFilters:l,updatePriceRange:n,defaultSelectedCategory:"color",maxAmount:o})})},eC=r(18446),ek=r.n(eC);let eS={color:6,border_type:11,fabric:5,category:67,border_size:9,blouse:10,brand:34},eI={"New Arrivals":{tag:"created_at",value:"asc"},"Product Name":{tag:"name",value:"asc"},"Price Low to High":{tag:"sale_price",value:"asc"},"Price High to Low":{tag:"sale_price",value:"desc"}},eR=[{label:"New Arrivals"},{label:"Product Name"},{label:"Price Low to High"},{label:"Price High to Low"}];var eF=e=>{var t,r;let{vendorId:A,vendorImage:W}=e,[L,O]=(0,a.useState)("grid"),E=(0,c.Z)(),N=(0,Q.useRouter)(),H=(0,I.Z)(E.breakpoints.down("sm")),B=(0,I.Z)(e=>e.breakpoints.down("md")),[T,D]=(0,a.useState)(1),[M,q]=(0,a.useState)(16),[K,U]=(0,a.useState)(!1),[Y,J]=(0,a.useState)({bottom:!1}),[G,ee]=(0,a.useState)(!0),[et,er]=(0,a.useState)(null),[ei,ea]=(0,a.useState)(""),[el,en]=(0,a.useState)("New Arrivals"),eo=e=>{let t=eR[e.target.value].label;eI[t],en(t),D(1),ey("bottom",!1)(e)},ed=eI[el];(0,a.useCallback)(e=>()=>O(e),[]);let[ec,eu]=(0,a.useState)([]),[ex,eh]=(0,a.useState)([0,49900]),ep=[0,49900],[em,eb]=(0,a.useState)({color:[],fabric:[],print_pattern:[],weave:[],price:[],border_type:[],border_size:[],blouse:[],brand:[],category:[]}),[ev,ef]=(0,a.useState)([]),ej=()=>{U(!K)},ey=(e,t)=>r=>{("keydown"!==r.type||"Tab"!==r.key&&"Shift"!==r.key)&&J({...Y,[e]:t})},e_=e=>{for(let t in eb(e),e)e.hasOwnProperty(t)&&e[t];eL(em),D(1)},eC=(e,t)=>{"price"===e&&eh([0,49900]);let r={...em},i=r[e].findIndex(e=>e.value===t);-1!==i&&(r[e].splice(i,1),e_(r))},eF=()=>{eb({color:[],fabric:[],print_pattern:[],weave:[],price:[],border_type:[],border_size:[],blouse:[],brand:[],category:[]}),eh([0,49900]),D(1),eL({color:[],fabric:[],print_pattern:[],weave:[],price:[],border_type:[],border_size:[],blouse:[],brand:[],category:[]}),N.push("/sarees")},[ez,{loading:eP,data:eA}]=(0,X.t)($.Iy,{fetchPolicy:"cache-first"}),eW=e=>{eh(e)},eL=e=>{let t=[];for(let r in e)if(e[r].length>0){let i;(i="color"===r||"fabric"===r?e[r].map(e=>encodeURIComponent(e.label)).join("%20by"):e[r].map(e=>encodeURIComponent(e.label)).join(","))&&t.push("".concat(r,"::").concat(i))}let r=t.length>0?"/sarees?f=".concat(t.join(":")):"/sarees";window.history.replaceState(null,null,r)},eO=e=>{let t=null==e?void 0:e.split("?")[1];if(!t)return{};let r=new URLSearchParams(t),i={};if(r.has("f")){let e=r.get("f").split(":").filter(e=>e);for(let t=0;t<e.length;t+=2){let r=e[t],a=decodeURIComponent(e[t+1]);eS[r]&&(i[r]||(i[r]=[]),i[r].push({value:a,id:eS[r]}))}}return i};(0,a.useEffect)(()=>{let e=eO(window.location.href);eb(t=>({...t,...e})),er(window.location.href)},[]),(0,a.useEffect)(()=>{let e=[{[ed.tag]:ed.value}],t={quantity:{_gt:0},visibility:{_eq:4},visible_in_listings:{_eq:!0}},r=(Array.isArray(N.query.slug)?N.query.slug:[N.query.slug])[0];if(["Kora","Silk","Linen","Chanderi","Banarasi","Kanchivaram"].includes(r))t.vendor_attribute_assignedproductattributes={_and:[{vendor_attribute_assignedproductattributevalues:{vend
1or_attribute_attributevalue:{name:{_in:[r]}}}},{vendor_attribute_attributeproduct:{attribute_id:{_eq:5}}}]};else{if(A){let e=[];e.push({_and:[{vendor_attribute_assignedproductattributevalues:{vendor_attribute_attributevalue:{name:{_in:2==A?"Kalamandir":"Varamahalaxmi"}}}},{vendor_attribute_attributeproduct:{attribute_id:{_eq:"12"}}}]}),t.vendor_attribute_assignedproductattributes={_or:e}}let e={...eO(et),...em};if(Object.keys(e).some(t=>e[t].length>0)){let r=[];for(let t in e)if(e.hasOwnProperty(t)){let i=e[t];if(i.length>0){let e=i.map(e=>isNaN(e.value)?e.value:e.label),t=i[0].id;r.push({vendor_attribute_assignedproductattributes:{_or:[{_and:[{vendor_attribute_assignedproductattributevalues:{vendor_attribute_attributevalue:{name:{_in:e}}}},{vendor_attribute_attributeproduct:{attribute_id:{_eq:t}}}]}]}})}}t._and=t._and||[],t._and=t._and.concat(r)}}(0!==ex[0]||4e5!==ex[1])&&(t.sale_price={_gte:ex[0],_lte:ex[1]}),ei&&(t.metadata={_cast:{String:{_ilike:"%".concat(ei,"%")}}}),ez({variables:{limit:M,offset:(T-1)*M,where:t,order_by:e}})},[T,em,et,ex,ed,A,ei,ev]);let eE=Object.values(em).flatMap(e=>e).length+(ek()(ex,[0,49900])?0:1);(0,a.useEffect)(()=>{if(eA&&eA.vendor_product){if(ee(!0),1===T)eu([...eA.vendor_product]);else{let e=eA.vendor_product.filter(e=>!ec.some(t=>t.id===e.id));eu(t=>[...t,...e])}ee(!1)}},[eA,T]);let eN=null==eA?void 0:eA.vendor_product[0],eH=()=>{D(e=>e+1)},eB=(0,a.useCallback)(()=>{let e="innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight,t=document.body,r=document.documentElement,i=Math.max(t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight);e+window.pageYOffset>=i-100&&!eP&&eH()},[eH,eP]);return(0,a.useEffect)(()=>(window.addEventListener("scroll",eB),()=>{window.removeEventListener("scroll",eB)}),[eB]),(0,a.useEffect)(()=>(document.body.classList.toggle("filter-open",K),()=>{document.body.classList.remove("filter-open")}),[K]),(0,a.useEffect)(()=>(Y.bottom?document.body.classList.add("sort-open"):document.body.classList.remove("sort-open"),()=>{document.body.classList.remove("sort-open")}),[Y]),(0,i.jsxs)(i.Fragment,{children:[!H&&(0,i.jsx)(P.Z,{children:(0,i.jsxs)(u.Z,{sx:{mt:2,mb:2},children:[(0,i.jsxs)(x.Z,{elevation:1,sx:{mb:"25px",display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",p:{sm:"1rem 1.25rem",md:"0.5rem 1.25rem",xs:"1.25rem 1.25rem 0.25rem"}},children:[(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(z.H5,{children:"Searching for “ Saree Collection ”"}),(0,i.jsx)(z.nv,{color:"grey.600"})]}),(0,i.jsxs)(F.hs,{alignItems:"center",columnGap:4,flexWrap:"wrap",my:"0.5rem",children:[(0,i.jsx)(F.hs,{alignItems:"center",gap:1,flex:"1 1 0",children:(0,i.jsx)(h.Z,{sx:{minWidth:150},children:(0,i.jsxs)(p.Z,{fullWidth:!0,children:[(0,i.jsx)(m.Z,{children:"Sort By"}),(0,i.jsx)(g.Z,{value:eR.findIndex(e=>e.label===el),label:"Sort By",onChange:eo,children:eR.map((e,t)=>(0,i.jsx)(b.Z,{value:t,children:e.label},t))})]})})}),(0,i.jsx)(F.hs,{alignItems:"center",my:"0.25rem",children:B&&(0,i.jsx)(R.Z,{handle:(0,i.jsx)(v.Z,{children:(0,i.jsx)(l.Z,{fontSize:"medium"})}),children:(0,i.jsx)(eg,{onClose:ej,selectedFilters:em,updateFilters:e_,updatePriceRange:eW,defaultSelectedCategory:"color",maxAmount:eN})})}),(0,i.jsx)(h.Z,{children:(0,i.jsx)(f.Z,{fullWidth:!0,placeholder:"Search for sarees",variant:"outlined",value:ei,onChange:e=>ea(e.target.value),spellCheck:"false",InputProps:{endAdornment:(0,i.jsx)(j.Z,{position:"end",children:(0,i.jsx)(n.Z,{color:"action",sx:{mr:1}})})},sx:{"& .MuiOutlinedInput-root":{p:.2,background:"white",borderRadius:"28px","&:hover":{background:"white"},"&.Mui-focused":{borderColor:"#4CAF50"},color:"black"},"& .MuiOutlinedInput-underline":{"&&&:before":{borderBottom:"none"}}}})})]})]}),(0,i.jsx)(h.Z,{sx:{display:"flex",overflowX:"auto",whiteSpace:"nowrap","::-webkit-scrollbar":{display:"none"}},children:Object.entries(em).map((e,t,r)=>{let[l,n]=e;return(0,i.jsxs)(a.Fragment,{children:[n.map((e,t)=>(0,i.jsxs)(h.Z,{mb:2,sx:{display:"inline-flex",alignItems:"center",marginRight:"5px",borderRadius:27,border:"1px solid #CBBF81",backgroundColor:"#F9F8F3",padding:"5px 10px",whiteSpace:"nowrap"},children:["color"===l&&(0,i.jsx)(h.Z,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:"string"==typeof e.value&&isNaN(e.value)?e.value.toLowerCase():e.label.toLowerCase(),marginRight:"5px",border:"1px solid gray"}}
1),(0,i.jsxs)(y.Z,{color:"grey.800",sx:{marginRight:"5px"},children:["border_type"===l?"Border Type - ":"border_size"===l?"Border Size - ":"blouse"===l?"Blouse Included - ":"","string"==typeof e.value&&isNaN(e.value)?e.value:e.label]}),(0,i.jsx)(o.Z,{onClick:()=>eC(l,e.value),sx:{fontSize:14,cursor:"pointer",bgcolor:"grey.800",borderRadius:27,color:"white"}})]},t)),"price"===l&&!ek()(ex,ep)&&(0,i.jsxs)(h.Z,{mb:2,sx:{display:"inline-flex",alignItems:"center",marginRight:"5px",borderRadius:27,border:"1px solid #CBBF81",backgroundColor:"#F9F8F3",padding:"5px 10px",whiteSpace:"nowrap"},children:[(0,i.jsxs)(y.Z,{color:"grey.800",sx:{marginRight:"5px"},children:[(0,i.jsx)(z.Dr,{fontFamily:"lato",fontSize:15,children:"₹"}),(0,V.Aq)(ex[0])," -"," ",(0,i.jsx)(z.Dr,{fontFamily:"lato",fontSize:15,children:"₹"}),(0,V.Aq)(ex[1])]}),(0,i.jsx)(o.Z,{onClick:()=>eC(l,"price"),sx:{fontSize:14,cursor:"pointer",bgcolor:"grey.800",borderRadius:27,color:"white"}})]}),t!==r.length-1||!(Object.values(em).flat().length>1)&&(1!==Object.values(em).flat().length||Object.keys(em).includes("price")&&ek()(ex,ep))?null:(0,i.jsxs)(h.Z,{mb:2,sx:{display:"inline-flex",alignItems:"center",marginRight:"5px",borderRadius:27,border:"1px solid #CBBF81",backgroundColor:"#F9F8F3",padding:"5px",whiteSpace:"nowrap"},children:[(0,i.jsx)(y.Z,{color:"grey.800",sx:{marginRight:"5px"},children:"Clear All"}),(0,i.jsx)(o.Z,{onClick:()=>eF(),sx:{cursor:"pointer",bgcolor:"grey.800",borderRadius:27,color:"white",fontSize:14}})]})]},l)})}),(0,i.jsxs)(_.ZP,{container:!0,spacing:2,children:[(0,i.jsx)(_.ZP,{item:!0,md:3,sx:{display:{md:"block",xs:"none"}},children:(0,i.jsx)(eg,{onClose:ej,selectedFilters:em,updateFilters:e_,updatePriceRange:eW,defaultSelectedCategory:"color",maxAmount:eN})}),(0,i.jsxs)(_.ZP,{item:!0,md:9,xs:12,children:[!eP&&(null==eA?void 0:null===(t=eA.vendor_product)||void 0===t?void 0:t.length)==0&&(0,i.jsx)(h.Z,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",children:(0,i.jsx)(y.Z,{variant:"h6",children:"No Products"})}),!eP&&ec.length>0&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(es,{loading:eP,products:ec})})," "]})]})]})}),H&&(0,i.jsx)(ew,{children:(0,i.jsxs)(u.Z,{sx:{mt:2,mb:2},children:[(0,i.jsx)(h.Z,{mb:2,mt:1,children:(0,i.jsx)(f.Z,{fullWidth:!0,placeholder:"Search for sarees",variant:"outlined",value:ei,onChange:e=>ea(e.target.value),spellCheck:"false",InputProps:{endAdornment:(0,i.jsx)(j.Z,{position:"end",children:(0,i.jsx)(v.Z,{children:(0,i.jsx)(n.Z,{color:"action"})})})},sx:{"& .MuiOutlinedInput-root":{p:.7,background:"white",borderRadius:"28px","&:hover":{background:"white"},"&.Mui-focused":{borderColor:"#4CAF50"},color:"black",zIndex:9999}}})}),(0,i.jsx)(h.Z,{sx:{display:"flex",overflowX:"auto",whiteSpace:"nowrap","::-webkit-scrollbar":{display:"none"}},children:Object.entries(em).map((e,t,r)=>{let[l,n]=e;return(0,i.jsxs)(a.Fragment,{children:[n.map((e,t)=>(0,i.jsxs)(h.Z,{mb:2,sx:{display:"inline-flex",alignItems:"center",marginRight:"5px",borderRadius:27,border:"1px solid #CBBF81",backgroundColor:"#F9F8F3",padding:"5px 10px",whiteSpace:"nowrap"},children:["color"===l&&(0,i.jsx)(h.Z,{sx:{width:"15px",height:"15px",borderRadius:"50%",backgroundColor:"string"==typeof e.value&&isNaN(e.value)?e.value.toLowerCase():e.label.toLowerCase(),marginRight:"5px",border:"1px solid gray"}}),(0,i.jsxs)(y.Z,{color:"grey.800",sx:{marginRight:"5px"},children:["border_type"===l?"Border Type - ":"border_size"===l?"Border Size - ":"blouse"===l?"Blouse Included - ":"","string"==typeof e.value&&isNaN(e.value)?e.value:e.label]}),(0,i.jsx)(o.Z,{onClick:()=>eC(l,e.value),sx:{fontSize:14,cursor:"pointer",bgcolor:"grey.800",borderRadius:27,color:"white"}})]},t)),"price"===l&&!ek()(ex,ep)&&(0,i.jsxs)(h.Z,{mb:2,sx:{display:"inline-flex",alignItems:"center",marginRight:"5px",borderRadius:27,border:"1px solid #CBBF81",backgroundColor:"#F9F8F3",padding:"5px 10px",whiteSpace:"nowrap"},children:[(0,i.jsxs)(y.Z,{color:"grey.800",sx:{marginRight:"5px"},children:[(0,i.jsx)(z.Dr,{fontFamily:"lato",fontSize:15,children:"₹"}),(0,V.Aq)(ex[0])," -"," ",(0,i.jsx)(z.Dr,{fontFamily:"lato",fontSize:15,children:"₹"}),(0,V.Aq)(ex[1])]}),(0,i.jsx)(o.Z,{onClick:()=>eC(l,"price"),sx:{fontSize:14,cursor:"pointer",bgcolor:"grey.800",borderRadius:27,color:"white"}})]}),t===r.length-1&&Object.values(em).flat().length>
11?(0,i.jsxs)(h.Z,{mb:2,sx:{display:"inline-flex",alignItems:"center",marginRight:"5px",borderRadius:27,border:"1px solid #CBBF81",backgroundColor:"#F9F8F3",padding:"5px",whiteSpace:"nowrap"},children:[(0,i.jsx)(y.Z,{color:"grey.800",sx:{marginRight:"5px"},children:"Clear All"}),(0,i.jsx)(o.Z,{onClick:()=>eF(),sx:{cursor:"pointer",bgcolor:"grey.800",borderRadius:27,color:"white",fontSize:14}})]}):null]},l)})}),(0,i.jsxs)(_.ZP,{container:!0,spacing:2,children:[(0,i.jsx)(_.ZP,{item:!0,md:3,sx:{display:{md:"block",xs:"none"}},children:(0,i.jsx)(eg,{onClose:ej,selectedFilters:em,updateFilters:e_,updatePriceRange:eW,defaultSelectedCategory:"color",maxAmount:eN})}),(0,i.jsxs)(_.ZP,{item:!0,md:9,xs:12,children:[!G&&(null==eA?void 0:null===(r=eA.vendor_product)||void 0===r?void 0:r.length)==0&&(0,i.jsx)(h.Z,{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",children:(0,i.jsx)(y.Z,{variant:"h6",children:"No Products"})}),!G&&ec.length>0&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(es,{loading:eP,products:ec})})," "]})]}),(0,i.jsxs)(h.Z,{sx:{position:"fixed",bottom:-1,left:0,right:0,zIndex:9999,bgcolor:"white",display:"flex",justifyContent:"space-between",width:"100%"},children:[(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",width:"50%",sx:{borderRight:"1px solid black",paddingRight:3,padding:"10px"},onClick:ey("bottom",!0),children:[(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(y.Z,{fontWeight:600,fontSize:10,ml:1,children:"SORT BY"}),(0,i.jsx)(y.Z,{fontSize:12,ml:1,children:el})]}),(0,i.jsx)(s.Z,{sx:{fontSize:25,fontWeight:600,color:"grey.900",marginLeft:1.8}})]}),(0,i.jsxs)(h.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",width:"48%",onClick:ej,children:[(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(y.Z,{fontWeight:600,fontSize:10,children:"FILTER"}),(0,i.jsxs)(y.Z,{fontWeight:500,fontSize:12,color:"gey.800",children:["Applied"," ",(0,i.jsx)(z.Dr,{sx:{borderRadius:50,backgroundColor:"grey.900",color:"white",ml:.2,padding:"2px 10px"},children:eE})]})]}),(0,i.jsx)(d.Z,{sx:{fontSize:25,fontWeight:600,color:"grey.900",mr:2}})]})]}),K&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(eZ,{open:K,onClose:ej,selectedFilters:em,updateFilters:e_,updatePriceRange:eW,maxAmount:eN})}),(0,i.jsx)(w.ZP,{anchor:"bottom",open:Y.bottom,onClose:ey("bottom",!1),sx:{zIndex:9999},children:(0,i.jsxs)(h.Z,{sx:{width:"100%",p:2},children:[(0,i.jsx)(h.Z,{children:(0,i.jsx)(y.Z,{fontWeight:500,fontSize:20,children:"Sort By"})}),(0,i.jsx)(Z.Z,{sx:{my:1,width:"100%",borderColor:"lightgray"}}),(0,i.jsx)(C.Z,{name:"sort-options",value:eR.findIndex(e=>e.label===el),onChange:eo,children:eR.map((e,t)=>(0,i.jsx)(k.Z,{value:t,control:(0,i.jsx)(S.Z,{}),label:e.label,sx:{color:"grey.800"}},t))})]})})]})})]})}},82515:function(e,t,r){r.d(t,{I:function(){return i},K:function(){return a}});let i={Kalamandir:{id:2,image:"".concat("https://images-static.cloudtailor.com/","brands/km.png")},Varamahalaxmi:{ids:[4,36],image:"".concat("https://images-static.cloudtailor.com/","brands/varamahalakshmi.webp")},BrandMandir:{id:6,image:"/assets/images/brands/brandmandir.webp"},Oagh:{id:7,image:"".concat("https://images-static.cloudtailor.com/","brands/oagh.webp")},"Thread and Blocks":{id:8,image:"".concat("https://images-static.cloudtailor.com/","brands/threads_and_blocks.webp")},"Sahdev Fabric":{id:9,image:"".concat("https://images-static.cloudtailor.com/","brands/Sadev_web_Logo.webp")}},a=Object.fromEntries(Object.entries(i).flatMap(e=>{let[t,r]=e;return r.ids?r.ids.map(e=>[e,r]):r.id?[[r.id,r]]:[]}))}}]);

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.