PageSourceSearch

https://mustaqbalzamzam.com/_next/static/chunks/app/layout-78c43173085fea6d.js

js mustaqbalzamzam.com collected 2026-10-01 12:32:23 UTC 130,724 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[300,1143,7177],{1988:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>n,hr:()=>o,q$:()=>i});var r=a(23492),s=a(13568);let l=(0,r.Z0)({name:"location",initialState:{myLocation:[],country:"Bangladesh",lat:25.2854,lng:51.531},reducers:{setLocationInRedux:(e,t)=>{let a=e.myLocation.some(e=>e.lat===t.payload.lat&&e.lng===t.payload.lng);if(a){s.Ay.error("already this location selected");return}a||(e.myLocation.push(t.payload),s.Ay.success("Successfully added"))},removeLocation:(e,t)=>{e.myLocation=e.myLocation.filter(e=>e.lat!==t.payload.lat||e.lng!==t.payload.lng)}}}),{setLocationInRedux:o,removeLocation:i}=l.actions,n=l.reducer},4124:(e,t,a)=>{"use strict";a.d(t,{AppVersionProvider:()=>C});var r=a(95155),s=a(12115);let l="1.0.5",o="__zam_zam_app_version",i="__zam_zam_app_version_refresh_attempted",n=()=>{try{let e=localStorage.getItem(o);if(e)return e}catch(e){console.warn("Unable to read version from localStorage:",e)}try{let e=document.cookie.match(new RegExp("(^| )".concat(o,"=([^;]+)")));if(e)return decodeURIComponent(e[2])}catch(e){console.warn("Unable to read version from cookies:",e)}return null},d=e=>{try{localStorage.setItem(o,e)}catch(e){console.error("Failed to save version in localStorage:",e)}try{let t=new Date;t.setFullYear(t.getFullYear()+1);let a="https:"===window.location.protocol?"Secure;":"";document.cookie="".concat(o,"=").concat(encodeURIComponent(e),";expires=").concat(t.toUTCString(),";path=/;SameSite=Lax;").concat(a)}catch(e){console.error("Failed to save version in cookie:",e)}},c=()=>{let e=n();if(null===e){let e=!1;try{if(localStorage.length>0)e=!0;else if(document.cookie&&""!==document.cookie.trim()){let t=document.cookie.split(";");for(let a=0;a<t.length;a++){let r=t[a].split("=")[0].trim();if(r&&r!==o){e=!0;break}}}}catch(e){console.warn("Unable to check pre-existing state:",e)}return!!e||(d(l),!1)}return e!==l},u=()=>{if("undefined"==typeof sessionStorage)return!1;try{return"true"===sessionStorage.getItem(i)}catch(e){return!1}},m=e=>{if("undefined"!=typeof sessionStorage)try{e?sessionStorage.setItem(i,"true"):sessionStorage.removeItem(i)}catch(e){console.error("Failed to set reload attempt guard:",e)}},h=()=>{if("undefined"!=typeof document)try{let e=document.cookie.split(";"),t="=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/",a=window.location.hostname;for(let r=0;r<e.length;r++){let s=e[r],l=s.indexOf("="),o=l>-1?s.substring(0,l).trim():s.trim();document.cookie="".concat(o).concat(t),document.cookie="".concat(o).concat(t,";domain=").concat(a),document.cookie="".concat(o).concat(t,";domain=.").concat(a);let i=a.split(".");if(i.length>2){let e=i.slice(1).join(".");document.cookie="".concat(o).concat(t,";domain=").concat(e),document.cookie="".concat(o).concat(t,";domain=.").concat(e)}}}catch(e){console.error("Error clearing cookies:",e)}},x=async e=>{if(console.log("Starting cache and state invalidation for version: ".concat(e)),"serviceWorker"in navigator)try{let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(async e=>{let t=await e.unregister();console.log("Service worker unregistration: ".concat(t?"success":"failed"))}))}catch(e){console.error("Error unregistering service workers:",e)}if("caches"in window)try{let e=await caches.keys();await Promise.all(e.map(async e=>{let t=await caches.delete(e);console.log("Cache Storage deletion (".concat(e,"): ").concat(t?"success":"failed"))}))}catch(e){console.error("Error clearing Cache Storage API:",e)}try{localStorage.clear()}catch(e){console.error("Error clearing localStorage:",e)}try{sessionStorage.clear()}catch(e){console.error("Error clearing sessionStorage:",e)}h(),m(!0),d(e),console.log("App cache and state invalidation complete.")},g=()=>{let[e,t]=(0,s.useState)(null),[a,r]=(0,s.useState)(!1),[o,i]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t(n());let e=c();r(e),e||m(!1)},[]);let d=(0,s.useCallback)(async()=>{if(!o){i(!0);try{if(u()){console.warn("A page reload was already attempted for version update. Aborting reload loop."),i(!1);return}await x(l),window.location.reload()}catch(e){console.error("Failed to perform version update cleanup:",e),i(!1)}}},[o]);return{currentVersion:l,storedVersion:e,isMismatch:a,isUpdating:o,triggerUpdate:d}},p=(0,s.createContext)(void 0),f={position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center",background:"radial-gradient(circle at center, #111827 0%, #030712 100%)",fontFamily:"var(--font-inter), system-ui, -apple-system, sans-serif",color:"#f3f4f6",overflow:"hidden"},v={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"3.5rem 2.5rem",borderRadius:"1.5rem",background:"rgba(255, 255, 255, 0.03)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255, 255, 255, 0.08)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.6)",maxWidth:"440px",width:"90%",textAlign:"center",animation:"fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards"},b={position:"relative",width:"80px",height:"80px",marginBottom:"2rem"},y={position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",border:"3px solid transparent",borderTopColor:"#3b82f6",borderRightColor:"#8b5cf6",animation:"spin 1.2s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite"}
1,j={position:"absolute",top:"15px",left:"15px",width:"50px",height:"50px",borderRadius:"50%",background:"radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(59, 130, 246, 0.05) 100%)",animation:"pulse 2s infinite ease-in-out"},w={fontSize:"1.5rem",fontWeight:700,margin:"0 0 0.75rem 0",letterSpacing:"-0.025em",background:"linear-gradient(to right, #60a5fa, #a78bfa)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},N={fontSize:"0.925rem",lineHeight:"1.5rem",color:"#9ca3af",margin:"0 0 1.75rem 0"},_={width:"100%",height:"4px",backgroundColor:"rgba(255, 255, 255, 0.05)",borderRadius:"2px",overflow:"hidden",marginBottom:"1.5rem"},k={height:"100%",width:"100%",background:"linear-gradient(90deg, #3b82f6, #8b5cf6)",animation:"progressLoading 2s infinite ease-in-out",transformOrigin:"left"},S={fontSize:"0.75rem",fontWeight:600,color:"#4b5563",margin:0,textTransform:"uppercase",letterSpacing:"0.075em"},C=e=>{let{children:t}=e,{currentVersion:a,isMismatch:l,isUpdating:o,triggerUpdate:i}=g(),[n,d]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{d(!0)},[]),(0,s.useEffect)(()=>{n&&l&&!u()&&i()},[n,l,i]),n&&(o||l&&!u()))?(0,r.jsxs)("div",{style:f,children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n  @keyframes spin {\n    0% { transform: rotate(0deg); }\n    100% { transform: rotate(360deg); }\n  }\n  @keyframes pulse {\n    0%, 100% { transform: scale(0.95); opacity: 0.6; }\n    50% { transform: scale(1.1); opacity: 0.9; }\n  }\n  @keyframes fadeInUp {\n    from { opacity: 0; transform: translateY(15px); }\n    to { opacity: 1; transform: translateY(0); }\n  }\n  @keyframes progressLoading {\n    0% { transform: translateX(-100%) scaleX(0.2); }\n    50% { transform: translateX(-20%) scaleX(0.5); }\n    100% { transform: translateX(100%) scaleX(0.2); }\n  }\n"}}),(0,r.jsxs)("div",{style:v,children:[(0,r.jsxs)("div",{style:b,children:[(0,r.jsx)("div",{style:y}),(0,r.jsx)("div",{style:j})]}),(0,r.jsx)("h1",{style:w,children:"Optimizing App Version"}),(0,r.jsx)("p",{style:N,children:"A new version is available. We are clearing cached local resources and reloading to prevent interface errors."}),(0,r.jsx)("div",{style:_,children:(0,r.jsx)("div",{style:k})}),(0,r.jsxs)("p",{style:S,children:["Version ",a]})]})]}):(0,r.jsx)(p.Provider,{value:{currentVersion:a,isUpdating:o,triggerUpdate:i},children:t})}},5522:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var r=a(95155),s=a(66766);function l(e){let{product:t,width:a,height:l,className:o="",onClick:i,alt:n="Product",title:d}=e,c=t?"".concat("https://backend.mustaqbalzamzam.com/storage/app/public","/").concat(t):"/images/no_image_found.jpg";return(0,r.jsx)(s.default,{onClick:i,src:c,alt:n,title:d,width:a,height:l,className:o,priority:!1,loading:"lazy"})}},19159:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>x,RO:()=>u,ZE:()=>h,bE:()=>d,dt:()=>c,sX:()=>m});var r=a(23492),s=a(13568),l=a(91143);let o=e=>{try{let t=JSON.stringify(e);localStorage.setItem("cart",t)}catch(e){console.error("Error saving cart state:",e)}},i=(0,r.zD)("data/storeCheckoutOrder",async e=>await l.K.storeOrder(e)),n=(0,r.Z0)({name:"cart",initialState:{items:[],totalAmount:0,loading:!1,error:"",orderData:null},reducers:{initializeCart:e=>{try{let t=localStorage.getItem("cart");if(t){let a=JSON.parse(t);e.items=a.items,e.totalAmount=a.totalAmount}}catch(e){console.error("Error loading cart:",e)}},addToCart:(e,t)=>{try{var a,r,l,i,n,d;let c=t.payload;if(!c)return;if((null===(a=c.attribute_product)||void 0===a?void 0:a[0])&&(!c.selectedAttributes||0===c.selectedAttributes.length)){s.oR.error("Please select product attributes");return}if(0===e.items.length||(null===(r=e.items[0].product_detail)||void 0===r?void 0:r.country)===(null===(l=c.product_detail)||void 0===l?void 0:l.country)){let t=e=>{let t=e.selectedAttributes?e.selectedAttributes.map(e=>"".concat(e.id,"-").concat(e.value)).join("_"):"";return"".concat(e.id,"_").concat(t)},a=e.items.find(e=>t(e)===t(c));if(a)e.items=e.items.map(e=>t(e)===t(c)?{...a,quantity:c.quantity||a.quantity+1,special_request:c.special_request}:e);else{let t={...c,quantity:c.quantity||1,shop_id:null==c?void 0:null===(n=c.shop)||void 0===n?void 0:null===(i=n.id)||void 0===i?void 0:i.toString(),sale_price:(null==c?void 0:null===(d=c.product_detail)||void 0===d?void 0:d.sale_price)||0,special_request:c.special_request||"",selectedAttributes:c.selectedAttributes||[]};e.items=[...e.items,t],s.oR.success("Added to cart")}e.totalAmount=e.items.reduce((e,t)=>
1e+(Number(t.sale_price)||0)*t.quantity,0),o(e)}else s.oR.error("You can only add products from the same country to your cart")}catch(e){console.error("Error adding to cart:",e),s.oR.error("Failed to add product to cart")}},removeFromCart:(e,t)=>{let{id:a,selectedAttributes:r}=t.payload;r&&r.length>0?e.items=e.items.filter(e=>e.id!==a||!!e.selectedAttributes&&JSON.stringify(e.selectedAttributes)!==JSON.stringify(r)):e.items=e.items.filter(e=>e.id!==a),e.totalAmount=e.items.reduce((e,t)=>{var a;return e+(null!==(a=t.sale_price)&&void 0!==a?a:0)*t.quantity},0),o(e)},updateQuantity:(e,t)=>{let{id:a,quantity:r,selectedAttributes:s}=t.payload,l=e.items.findIndex(e=>e.id===a&&(s&&e.selectedAttributes?e.id===a&&JSON.stringify(e.selectedAttributes)===JSON.stringify(s):e.id===a&&!e.selectedAttributes));-1!==l&&(e.items[l].quantity=Math.max(1,r)),e.totalAmount=e.items.reduce((e,t)=>{var a;return e+(null!==(a=t.sale_price)&&void 0!==a?a:0)*t.quantity},0),o(e)},clearCart:e=>{e.items=[],e.totalAmount=0,o(e)}},extraReducers:e=>{e.addCase(i.pending,e=>{e.loading=!0}).addCase(i.fulfilled,(e,t)=>{e.orderData=t.payload,e.loading=!1}).addCase(i.rejected,(e,t)=>{e.loading=!1,e.error=t.error.message||""})}}),{addToCart:d,removeFromCart:c,updateQuantity:u,clearCart:m,initializeCart:h}=n.actions,x=n.reducer},20963:(e,t,a)=>{"use strict";a.d(t,{ReduxProvider:()=>P});var r=a(95155),s=a(34540),l=a(23492),o=a(40300),i=a(19159),n=a(89519),d=a(1988),c=a(39506),u=a(28912),m=a(63269),h=a(99797),x=a(38145),g=a(61328),p=a(18091),f=a(31486);let v={key:"location",storage:p.A},b={key:"view_zam_zam",storage:p.A},y={key:"compare",storage:p.A},j={key:"compare",storage:p.A},w=(0,g.rL)(j,i.Ay),N=(0,g.rL)(v,d.Ay),_=(0,g.rL)(b,c.A),k=(0,g.rL)(y,f.Ay),S=(0,l.U1)({reducer:{data:o.Ay,cart:w,auth:n.Ay,view_zam_zam:_,location:N,compare_zam_zam:k,website_setting_zam_zam:u.Ay,shop:m.A,search:h.Ay,offer:x.A},middleware:e=>e({serializableCheck:{ignoredActions:[g.ZM,g.r2,g.Hz,g.DY,g.Cq,g.eY]}})}),C=(0,g.GM)(S);var A=a(97730);function P(e){let{children:t}=e;return(0,r.jsx)(s.Kq,{store:S,children:(0,r.jsx)(A.Q,{loading:null,persistor:C,children:t})})}},30285:(e,t,a)=>{"use strict";a.d(t,{$:()=>n});var r=a(95155);a(12115);var s=a(66634),l=a(74466),o=a(59434);let i=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function n(e){let{className:t,variant:a,size:l,asChild:n=!1,...d}=e,c=n?s.DX:"button";return(0,r.jsx)(c,{"data-slot":"button",className:(0,o.cn)(i({variant:a,size:l,className:t})),...d})}},31486:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>i,Jp:()=>s,N2:()=>o,co:()=>l});let r=(0,a(23492).Z0)({name:"compare",initialState:{items1:null,items2:null},reducers:{setItem1:(e,t)=>{e.items1=t.payload},setItem2:(e,t)=>{e.items2=t.payload},clearItem:e=>{e.items1=null,e.items2=null}}}),{setItem1:s,setItem2:l,clearItem:o}=r.actions,i=r.reducer},32992:(e,t,a)=>{"use strict";a.d(t,{default:()=>X});var r=a(95155),s=a(50345),l=a(6874),o=a.n(l),i=a(35695),n=a(59576),d=a(12115),c=a(44838),u=a(20710),m=a(7509),h=a(93347),x=a(92610),g=a(36568),p=a(11518),f=a.n(p),v=a(15305),b=a(34540),y=a(5522),j=a(5937),w=a(95747),N=a(27809),_=a(86151),k=a(25045),S=a(42148),C=a(46767),A=a(36347),P=
1a(51976),z=a(10238),E=a(40288),F=a(5040),D=a(30227),I=a(84355),L=a(57930),T=a(5444),H=a(80465),q=a(60576),R=a(17576),O=a(33127),U=a(97037),K=a(67312),B=a(6752),M=a(74783),V=a(53311),Y=a(54653);let Z={user:j.A,restaurant:w.A,cart:N.A,bag:_.A,basket:k.A,store:j.A,laptop:S.A,desktop:S.A,tablet:C.A,mobile:C.A,watch:A.A,heart:P.A,gift:z.A,game:E.A,book:F.A,music:D.A,camera:I.A,car:L.A,flower:T.A,dumbbell:H.A,baby:q.A,briefcase:R.A,palette:O.A,tree:U.A,coffee:K.A,tshirt:B.A},J=e=>Z[e]||j.A,G=e=>(null==e?void 0:e.toLowerCase().replace(/[^a-z0-9]+/g,"-"))||"",W=()=>{let{groups:e}=(0,b.d4)(e=>e.data),[t,a]=(0,d.useState)(null),s=(0,d.useRef)(null),l=(0,d.useRef)(null),i=e=>{s.current&&(clearTimeout(s.current),s.current=null),a(e)},n=()=>{s.current=setTimeout(()=>{a(null)},150)},c=()=>{s.current&&(clearTimeout(s.current),s.current=null)},u=()=>{s.current=setTimeout(()=>{a(null)},150)};(0,d.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]);let m=(e,t)=>"/groupProduct?group=".concat(G(e),"&gId=").concat(t);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{ref:l,className:"jsx-d784faf795cb35f2 relative",children:[(0,r.jsx)("nav",{"aria-label":"Main product category navigation",role:"navigation",className:"jsx-d784faf795cb35f2 bg-white",children:(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2 max-w-7xl mx-auto px-3 sm:px-4",children:[(0,r.jsx)("div",{className:"jsx-d784faf795cb35f2 hidden lg:block",children:(0,r.jsx)("ul",{role:"menubar","aria-label":"Product categories",className:"jsx-d784faf795cb35f2 flex items-center justify-center gap-4",children:null==e?void 0:e.slice(0,6).map((e,a)=>{var s;let l=J(null==e?void 0:e.icon),d=((null===(s=e.categories)||void 0===s?void 0:s.filter(e=>null===e.parent_id))||[]).length>0;return(0,r.jsxs)("li",{role:"none",onMouseEnter:()=>i(a),onMouseLeave:n,className:"jsx-d784faf795cb35f2 relative",children:[(0,r.jsxs)(o(),{href:m(e.name,e.id),className:"flex items-center gap-2 py-4 px-2 text-gray-800 hover:text-yellow-600 transition",title:"Browse ".concat(e.name," products"),"aria-label":"".concat(e.name).concat(d?", has subcategories":""),"aria-haspopup":d?"true":void 0,"aria-expanded":d?t===a:void 0,role:"menuitem",children:[e.image?(0,r.jsx)("div",{"aria-hidden":"true",className:"jsx-d784faf795cb35f2 w-5 h-5 relative overflow-hidden rounded",children:(0,r.jsx)(y.A,{product:e.image,height:20,width:20,className:"object-cover",alt:"".concat(e.name," icon")})}):(0,r.jsx)(l,{size:16,"aria-hidden":"true",className:"jsx-d784faf795cb35f2"}),(0,r.jsx)("span",{className:"jsx-d784faf795cb35f2 text-sm font-medium whitespace-nowrap",children:e.name}),d&&(0,r.jsx)(v.tEr,{size:10,"aria-hidden":"true",className:"transition-transform duration-200 ".concat(t===a?"rotate-180":"")})]}),t===a&&(0,r.jsx)("div",{"aria-hidden":"true",className:"jsx-d784faf795cb35f2 absolute bottom-0 left-0 right-0 h-0.5 bg-yellow-600"})]},e.id)})})}),(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2 lg:hidden flex items-center justify-between py-3",children:[(0,r.jsx)("button",{"aria-label":"Open category menu","aria-haspopup":"true",className:"jsx-d784faf795cb35f2 w-10 h-10 rounded-lg bg-yellow-600 text-white flex items-center justify-center",children:(0,r.jsx)(M.A,{size:20,"aria-hidden":"true"})}),(0,r.jsx)("span",{className:"jsx-d784faf795cb35f2 font-bold",children:"Categories"}),(0,r.jsx)("div",{"aria-hidden":"true",className:"jsx-d784faf795cb35f2 w-10 h-10"})]})]})}),null!==t&&e[t]&&(()=>{var s;let l=e[t],i=J(null==l?void 0:l.icon),n=(null===(s=l.categories)||void 0===s?void 0:s.filter(e=>null===e.parent_id))||[];return(0,r.jsx)("div",{role:"region","aria-label":"".concat(l.name," subcategories"),onMouseEnter:c,onMouseLeave:u,className:"jsx-d784faf795cb35f2 absolute left-0 right-0 top-full z-[9999]",children:(0,r.jsx)("div",{className:"jsx-d784faf795cb35f2 max-w-5xl mx-auto px-4",children:(0,r.jsx)("div",{style:{animation:"megaFadeIn 0.18s ease-out"},className:"jsx-d784faf795cb35f2 bg-white border border-gray-100 rounded-2xl shadow-2xl overflow-hidden",children:(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2 p-6",children:[(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2 flex justify-between items-center mb-6",children:[(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2 flex items-center gap-4",children:[(0,r.jsx)("div",{"aria-hidden":"true",className:"jsx-d784faf795cb35f2 w-12 h-12 rounded-xl bg-yellow-50 border border-yellow-100 flex items-center justify-center overflow-hidden",children:l.image?(0,r.jsx)(y.A,{product:l.image,height:48,width:48,className:"object-cover",alt:"".concat(l.name," category")}):(0,r.jsx)(i,{size:24,"aria-hidden":"true",className:"jsx-d784faf795cb35f2 text-yellow-600"})}),(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2",children:[(0,r.jsx)("h2",{className:"jsx-d784faf795cb35f2 text-lg font-bold text-gray-900",children:l.name}),(0,r.jsx)("p",{className:"jsx-d784faf795cb35f2 text-sm text-gray-400",children:"Browse categories"})]})]}),(0,r.jsxs)(o(),{href:m(l.name,l.id),className:"px-4 py-2 text-white rounded-lg text-sm font-semibold flex items-center gap-2 transition-all duration-200 hover:scale-105 hover:shadow-lg",style:{background:"linear-gradient(135deg, #FF0000 0%, #007B3D 50%, #000000 100%)",boxShadow:"0 2px 8px rgba(255, 0, 0, 0.25)"},onClick:()=>a(null),title:"Shop all ".concat(l.name," products"),"aria-label":"Shop all products in ".concat(l.name),onMouseEnter:e=>{e.currentTarget.style.background="linear-gradient(135deg, #FF3333 0%, #2E8B57 50%, #333333 100%)",e.currentTarget.style.boxShadow="0 4px 15px rgba(255, 0, 0, 0.4)"},onMouseLeave:e=>{e.currentTarget.style.background="linear-gradient(135deg, #FF0000 0%, #007B3D 50%, #000000 100%)",e.currentTarget.style.boxShadow="0 2px 8px rgba(255, 0, 0, 0.25)"},children:[(0,r.jsx)(V.A,{size:15,"aria-hidden":"true"}),"Shop Now"]})]}),n.length>0?(0,r.jsx)("ul",{"aria-label":"".concat(l.name," category list"),className:"jsx-d784faf795cb35f2 grid grid-cols-4 gap-3 max-h-[340px] overflow-y-auto pr-1 list-none m-0",children:n.map(e=>(0,r.jsx)("li",{className:"jsx-d784faf795cb35f2",children:(0,r.jsxs)(o(),{href:"/items?title=".concat(G(e.name),"&cId=").concat(e.id),className:"flex items-center gap-3 p-3 rounded-xl hover:bg-yellow-50 transition-colors group",onClick:()=>a(null),title:"Browse ".concat(e.name," products"),"aria-label":"".concat(e.name).concat(e.product_count>0?", ".concat(e.product_count," items"):""),children:[(0,r.jsx)("div",{"aria-hidden":"true",className:"jsx-d784faf795cb35f2 w-9 h-9 rounded-lg bg-gray-50 flex items-center justify-center shrink-0 overflow-hidden",children:e.image?(0,r.jsx)(y.A,{product:e.image,height:36,width:36,className:"object-cover",alt:"".concat(e.name," category")}):(0,r.jsx)(Y.A,{size:16,className:"text-gray-400","aria-hidden":"true"})}),(0,r.jsxs)("div",{className:"jsx-d784faf795cb35f2 min-w-0",children:[(0,r.jsx)("p",{className:"jsx-d784faf795cb35f2 font-medium text-sm text-gray-800 group-hover:text-yellow-700 truncate",children:e.name}),e.product_count>0&&(0,r.jsxs)("p",{className:"jsx-d784faf795cb35f2 text-xs text-gray-400",children:[e.product_count," items"]})]})]})},e.id))}):(0,r.jsx)("div",{role:"status",className:"jsx-d784faf795cb35f2 text-center py-10 text-gray-400",children:"No categories available"})]})})})})})()]}),(0,r.jsx)(f(),{id:"d784faf795cb35f2",children:"@-webkit-keyframes megaFadeIn{from{opacity:0;-webkit-transform:translatey(-6px);transform:translatey(-6px)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-moz-keyframes megaFadeIn{from{opacity:0;-moz-transform:translatey(-6px);transform:translatey(-6px)}to{opacity:1;-moz-transform:translatey(0);transform:translatey(0)}}@-o-keyframes megaFadeIn{from{opacity:0;-o-transform:translatey(-6px);transform:translatey(-6px)}to{opacity:1;-o-transform:translatey(0);transform:translatey(0)}}@keyframes megaFadeIn{from{opacity:0;-webkit-transform:translatey(-6px);-moz-transform:translatey(-6px);-o-transform:translatey(-6px);transform:translatey(-6px)}to{opacity:1;-webkit-transform:translatey(0);-moz-transform:translatey(0);-o-transform:translatey(0);transform:translatey(0)}}"})]})},Q=["/profile","/order","/address","/review","/invoice","/membership-cards"],X=()=>{let e=(0,i.usePathname)(),{isAuthenticated:t,logout:a}=(0,n.A)(),[l,p]=(0,d.useState)(!1),[f,v]=(0,d.useState)(!1),[b,y]=(0,d.useState)(null),j=Q.some(t=>e===t||(null==e?void 0:e.startsWith("".concat(t,"/"))));(0,d.useEffect)(()=>{(async()=>{try{let e=await fetch("".concat("https://backend.mustaqbalzamzam.com/api","/monitoring-totals")),t=await e.json();100===t.status_code&&t.data&&y(t.data.total_view)}catch(e){console.error("Error fetching visitor data:",e)}})()},[]);let w=()=>{v(!1)};return j?null:(0,r.jsxs)("div",{className:"navbar container mx-auto mx-2",children:[(0,r.jsx)("div",{className:"navbar-start",children:(0,r.jsx)("div",{className:"",children:(0,r.jsx)(s.b,{})})}),(0,r.jsx)("div",{className:"navbar-center hidden lg:flex ml-10",children:(0,r.jsx)("ul",{children:(0,r.jsx)(W,{})})}),(0,r.jsx)("div",{className:"navbar-end items-center gap-2"}),(0,r.jsx)("div",{className:"navbar-end md:hidden",children:t?(0,r.jsxs)(c.rI,{open:f,onOpenChange:v,children:[(0,r.jsxs)(c.ty,{className:"flex items-center gap-1 focus:outline-none cursor-pointer",children:[(0,r.jsx)(u.UdD,{className:"text-2xl"})," Account"]}),(0,r.jsxs)(c.SQ,{align:"end",sideOffset:6,className:"z-[9999] bg-white rounded-lg shadow-lg p-2",children:[(0,r.jsx)(c.lp,{children:"My A
1ccount"}),(0,r.jsx)(c.mB,{}),(0,r.jsx)(c._2,{onClick:w,children:(0,r.jsxs)(o(),{href:"/profile",className:"flex items-center gap-1 justify-center",children:[(0,r.jsx)(u.UdD,{})," Profile"]})}),(0,r.jsxs)(c._2,{onClick:w,children:[(0,r.jsx)(m.Oq0,{})," Billing"]}),(0,r.jsxs)(c._2,{onClick:w,children:[(0,r.jsx)(h.JLv,{})," Setting"]}),(0,r.jsxs)(c._2,{className:"cursor-pointer",onClick:()=>{a(),v(!1)},children:[(0,r.jsx)(x.QUU,{})," Logout"]})]})]}):(0,r.jsx)("div",{onClick:()=>p(!0),children:(0,r.jsx)("button",{className:"bg-yellow-600 px-4 py-1 rounded text-white cursor-pointer",children:"Login"})})}),l&&(0,r.jsx)(g.A,{onClose:()=>p(!1)})]})}},35115:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var r=a(12115),s=a(35695),l=a(76770),o=a.n(l);a(46702);let i=()=>{let e=(0,s.usePathname)();return(0,r.useEffect)(()=>{o().start();let e=setTimeout(()=>o().done(),500);return()=>{clearTimeout(e),o().done()}},[e]),null}},35786:()=>{},38145:(e,t,a)=>{"use strict";a.d(t,{A:()=>o,H:()=>l});var r=a(23492),s=a(74001);let l=(0,r.zD)("fetch/singleOffer",async e=>{try{return await s.K.findOfferProduct(e)}catch(e){throw e}}),o=(0,r.Z0)({name:"offer",initialState:{offer_product:[],offer_page:null,loading:!1,error:null},reducers:{},extraReducers:e=>{e.addCase(l.pending,e=>{e.loading=!0,e.error=null,e.offer_product=[],e.offer_page=null}).addCase(l.fulfilled,(e,t)=>{var a,r,s,l;e.loading=!1,e.offer_product=null!==(s=null==t?void 0:null===(a=t.payload)||void 0===a?void 0:a.data)&&void 0!==s?s:[],e.offer_page=null!==(l=null==t?void 0:null===(r=t.payload)||void 0===r?void 0:r.offer_page)&&void 0!==l?l:null}).addCase(l.rejected,(e,t)=>{e.loading=!1,e.error=t.payload,e.offer_product=[],e.offer_page=null})}}).reducer},38382:(e,t,a)=>{"use strict";a.d(t,{CG:()=>n,Fm:()=>h,Qs:()=>p,XW:()=>x,cj:()=>i,h:()=>m,kN:()=>d,qp:()=>g});var r=a(95155);a(12115);var s=a(20941),l=a(54416),o=a(59434);function i(e){let{...t}=e;return(0,r.jsx)(s.bL,{"data-slot":"sheet",...t})}function n(e){let{...t}=e;return(0,r.jsx)(s.l9,{"data-slot":"sheet-trigger",...t})}function d(e){let{...t}=e;return(0,r.jsx)(s.bm,{"data-slot":"sheet-close",...t})}function c(e){let{...t}=e;return(0,r.jsx)(s.ZL,{"data-slot":"sheet-portal",...t})}function u(e){let{className:t,...a}=e;return(0,r.jsx)(s.hJ,{"data-slot":"sheet-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...a})}function m(e){let{className:t,children:a,side:i="right",...n}=e;return(0,r.jsxs)(c,{children:[(0,r.jsx)(u,{}),(0,r.jsxs)(s.UC,{"data-slot":"sheet-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===i&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm","left"===i&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm","top"===i&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===i&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...n,children:[a,(0,r.jsxs)(s.bm,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,r.jsx)(l.A,{className:"size-4"}),(0,r.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function h(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"sheet-header",className:(0,o.cn)("flex flex-col gap-1.5 p-4",t),...a})}function x(e){let{className:t,...a}=e;return(0,r.jsx)("div",{"data-slot":"sheet-footer",className:(0,o.cn)("mt-auto flex flex-col gap-2 p-4",t),...a})}function g(e){let{className:t,...a}=e;return(0,r.jsx)(s.hE,{"data-slot":"sheet-title",className:(0,o.cn)("text-foreground font-semibold",t),...a})}function p(e){let{className:t,...a}=e;
1return(0,r.jsx)(s.VY,{"data-slot":"sheet-description",className:(0,o.cn)("text-muted-foreground text-sm",t),...a})}},38643:(e,t,a)=>{"use strict";a.d(t,{default:()=>v});var r=a(95155),s=a(11518),l=a.n(s),o=a(29911),i=a(12115),n=a(35695),d=a(34540),c=a(99797),u=a(6874),m=a.n(u),h=a(13568),x=a(48411),g=a(5522),p=a(58084);let f=()=>{let[e,t]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=localStorage.getItem("search-history");e&&t(JSON.parse(e).slice(0,5))},[]);let a=(0,i.useCallback)(a=>{if(!a.trim())return;let r=[a,...e.filter(e=>e!==a)].slice(0,5);t(r),localStorage.setItem("search-history",JSON.stringify(r))},[e]);return{history:e,addToHistory:a,clearHistory:(0,i.useCallback)(()=>{t([]),localStorage.removeItem("search-history")},[])}};function v(){let[e,t]=(0,i.useState)(""),[a,s]=(0,i.useState)(!1),[u,v]=(0,i.useState)("en-US"),b=(0,i.useRef)(null),y=(0,i.useRef)(null),j=(0,d.wA)(),w=(0,n.useRouter)(),{search_list:N,loading:_}=(0,d.d4)(e=>e.search);(0,i.useEffect)(()=>{let e=localStorage.getItem("voice-search-lang");e&&p.m.some(t=>t.code===e)&&v(e)},[]);let k=function(e,t){let[a,r]=(0,i.useState)(e);return(0,i.useEffect)(()=>{let t=setTimeout(()=>{r(e)},300);return()=>{clearTimeout(t)}},[e,300]),a}(e,300),{history:S,addToHistory:C,clearHistory:A}=f(),P=(0,i.useCallback)(()=>{k.trim().length>0&&j((0,c.dA)({text:k,country:null}))},[k,j]),z=t=>{let a=t||e;a.trim()&&(C(a),s(!1),y.current&&y.current.blur(),w.push("/search?q=".concat(encodeURIComponent(a))))},E=e=>{t(e),z(e)},{isListening:F,isTranslating:D,isSupported:I,toggleListening:L}=(0,p.s)({onResult:e=>E(e),lang:u}),T=a&&e.length>0&&N&&N.length>0,H=a&&e.length>0&&N&&0===N.length&&!_,q=a&&0===e.length&&S.length>0,R=a&&0===e.length;return(0,i.useEffect)(()=>{let e=e=>{b.current&&!b.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{P()},[P]),(0,r.jsxs)("div",{ref:b,className:"jsx-4ff5c963f8d25c47 sticky top-0 z-[9999] bg-white p-1.5 md:hidden  border-gray-200",children:[(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 relative flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 flex-1 relative",children:[(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 absolute left-4 top-1/2 transform -translate-y-1/2 text-yellow-600",children:(0,r.jsx)(o.KSO,{className:"w-4 h-4"})}),(0,r.jsx)("input",{ref:y,type:"text",value:e,onChange:e=>t(e.target.value),onFocus:()=>s(!0),onKeyDown:e=>"Enter"===e.key&&z(),placeholder:"Find your favorite products...",className:"jsx-4ff5c963f8d25c47 w-full pl-12 pr-24 py-2 rounded-xl border border-gray-300 focus:outline-none focus:border-yellow-600 bg-white text-gray-900 placeholder-gray-500"}),(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 absolute right-3 top-1/2 transform -translate-y-1/2 flex items-center gap-2",children:[e&&(0,r.jsx)("button",{onClick:()=>{t(""),y.current&&y.current.focus()},className:"jsx-4ff5c963f8d25c47 text-gray-400 hover:text-red-500",children:(0,r.jsx)(o.QCr,{className:"w-4 h-4"})}),(0,r.jsx)("button",{type:"button",onClick:()=>{if(!I){h.oR.error("Voice search is not supported in this browser");return}s(!0),L()},"aria-label":"Search by voice",title:"Search by voice",className:"jsx-4ff5c963f8d25c47 "+"transition-colors ".concat(F?"text-red-500 animate-pulse":D?"text-yellow-400 animate-pulse":"text-yellow-600 hover:text-yellow-700"),children:(0,r.jsx)(o.i0t,{className:"w-4 h-4"})})]})]}),(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 relative",children:(0,r.jsx)(x.A,{})})]}),a&&(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 absolute left-0 right-0 mt-2 mx-3 bg-white rounded-xl border border-gray-200 max-h-[70vh] overflow-hidden z-[9999]",children:[_&&(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 p-4 text-center",children:[(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 inline-block animate-spin rounded-full h-6 w-6 border-b-2 border-yellow-600"}),(0,r.jsx)("p",{className:"jsx-4ff5c963f8d25c47 text-gray-500 mt-2",children:"Searching..."})]}),T&&(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 max-h-96 overflow-y-auto",children:N.map(e=>{var t,a,l,o,i,n,d,c;return(0,r.jsxs)(m(),{href:"/details?title=".concat((e.name||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-").replace(/ & |, |\s+/g,"-"),"&pId=").concat(e.id,"&slug=").concat(e.slug||""),onClick:()=>s(!1),className:"flex items-center gap-3 p-3 hover:bg-yellow-50 border-b border-gray-100 last:border-b-0",children:[(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 shrink-0 w-12 h-12 rounded-lg overflow-hidden border border-gray-100 bg-gray-50",children:(0,r.jsx)(g.A,{product:null===(a=e.product_images)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.path,width:48,height:48,className:"w-full h-full object-cover",alt:e.name})}),(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"jsx-4ff5c963f8d25c47 font-medium text-gray-800 truncate",children:e.name}),(0,r.jsx)("p",{className:"jsx-4ff5c963f8d25c47 text-xs text-gray-500 mt-0.5",children:e.category_name}),(null!==(d=null===(o=e.variants)||void 0===o?void 0:null===(l=o[0])||void 0===l?void 0:l.sale_price)&&void 0!==d?d:e.sale_price)&&(0,r.jsxs)("p",{className:"jsx-4ff5c963f8d25c47 text-sm font-semibold text-yellow-600 mt-1",children:["AED ",(null!==(c=null===(n=e.variants)||void 0===n?void 0:null===(i=n[0])||void 0===i?void 0:i.sale_price)&&void 0!==c?c:e.sale_price).toLocaleStr
1ing()]})]}),(0,r.jsx)("span",{className:"jsx-4ff5c963f8d25c47 text-xs bg-yellow-100 text-yellow-800 px-2 py-1 rounded-full shrink-0",children:e.brand_name||"Popular"})]},e.id)})}),H&&(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 p-6 text-center",children:[(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 text-gray-400 text-4xl mb-3",children:"\uD83D\uDD0D"}),(0,r.jsx)("p",{className:"jsx-4ff5c963f8d25c47 text-gray-600 font-medium",children:"No products found"}),(0,r.jsx)("p",{className:"jsx-4ff5c963f8d25c47 text-gray-500 text-sm mt-1",children:"Try different keywords"})]}),q&&(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 p-4",children:[(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 flex items-center justify-between mb-3",children:[(0,r.jsxs)("h3",{className:"jsx-4ff5c963f8d25c47 font-medium text-gray-700 flex items-center gap-2",children:[(0,r.jsx)(o.w_X,{className:"text-yellow-600"}),"Recent Searches"]}),(0,r.jsx)("button",{onClick:A,className:"jsx-4ff5c963f8d25c47 text-xs text-gray-500 hover:text-red-500",children:"Clear all"})]}),S.map((e,t)=>(0,r.jsxs)("button",{onClick:()=>E(e),className:"jsx-4ff5c963f8d25c47 w-full text-left p-3 hover:bg-yellow-50 rounded-lg flex items-center gap-3",children:[(0,r.jsx)(o.w_X,{className:"text-gray-400"}),(0,r.jsx)("span",{className:"jsx-4ff5c963f8d25c47 text-gray-700",children:e})]},t))]}),R&&(0,r.jsxs)("div",{className:"jsx-4ff5c963f8d25c47 p-4",children:[(0,r.jsxs)("h3",{className:"jsx-4ff5c963f8d25c47 font-medium text-gray-700 flex items-center gap-2 mb-3",children:[(0,r.jsx)(o.Itl,{className:"text-yellow-600"}),"Trending Now"]}),(0,r.jsx)("div",{className:"jsx-4ff5c963f8d25c47 flex flex-wrap gap-2",children:["Smartphones","Laptops","Headphones","Cameras","Gaming"].map((e,t)=>(0,r.jsx)("button",{onClick:()=>E(e),className:"jsx-4ff5c963f8d25c47 px-4 py-2 bg-yellow-100 text-yellow-800 rounded-full text-sm font-medium hover:bg-yellow-200 border border-yellow-200",children:e},t))})]})]}),(0,r.jsx)(l(),{id:"4ff5c963f8d25c47",children:".hide-scrollbar.jsx-4ff5c963f8d25c47{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar.jsx-4ff5c963f8d25c47::-webkit-scrollbar{display:none}"})]})}},39506:(e,t,a)=>{"use strict";a.d(t,{A:()=>l,y:()=>s});let r=(0,a(23492).Z0)({name:"view_zam_zam",initialState:{items_zam_zam:[]},reducers:{viewCard:(e,t)=>{let a=t.payload;if(a&&a.id){if(e.items_zam_zam.find(e=>(null==e?void 0:e.id)===(null==a?void 0:a.id))){let t=e.items_zam_zam.filter(e=>(null==e?void 0:e.id)!==(null==a?void 0:a.id));e.items_zam_zam=[a,...t]}else e.items_zam_zam=[a,...e.items_zam_zam]}}}}),{viewCard:s}=r.actions,l=r.reducer},40300:(e,t,a)=>{"use strict";a.d(t,{$F:()=>_,Ay:()=>H,DH:()=>b,Eb:()=>k,Gr:()=>h,He:()=>N,MK:()=>C,O6:()=>S,XL:()=>F,_k:()=>E,_u:()=>p,_w:()=>d,j0:()=>g,jU:()=>f,pL:()=>P,pl:()=>m,uR:()=>z,wv:()=>j,xc:()=>o});var r=a(23492),s=a(91143);let l={groups:[],categories:[],products:[],related_products:[],shops:[],sliders:[],featureProducts:[],featureProductsHome:[],newarrivalProductsHome:[],forYouProducts:[],forYouProductsHome:[],popularProducts:[],popularProductsHome:[],newarrivalProducts:[],trendingProducts:[],trendingProductsHome:[],topViewProductsHome:[],topSaleProductsHome:[],videoProductsHome:[],comboProductsHome:[],groupShops:[],brands:[],offers:[],singleProduct:null,single_group:null,loading:!1,error:null,status_code:null,loadingStates:{groups:!0,categories:!0,products:!0,shops:!0,sliders:!0,featureProducts:!0,featureProductsHome:!0,forYouProducts:!0,forYouProductsHome:!0,popularProducts:!0,popularProductsHome:!0,newarrivalProducts:!0,trendingProducts:!0,trendingProductsHome:!0,topViewProductsHome:!0,topSaleProductsHome:!0,videoProductsHome:!0,comboProductsHome:!0,single_group:!0,newArrival:!0,trending:!0,groupShops:!0,brands:!0,offers:!0,singleProduct:!0,singleGroup:!0,createSeller:!1,getFaq:!1,faq:!1},faq_list:[]},o=(0,r.zD)("data/fetchInitialData",async(e,t)=>{let{dispatch:a}=t;try{await Promise.all([a(m()).unwrap(),a(k()).unwrap()]);let e={page:1,per_page:12,country:null};return await Promise.all([a(A(e)).unwrap(),a(i(e)).unwrap(),a(w(e)).unwrap(),a(_()).unwrap(),a(d({page:1,per_page:10,country:null})).unwrap(),a(u()).unwrap()]),"completed"}catch(e){throw e}}),i=(0,r.zD)("data/fetchTopSaleProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getTopSaleProducts(t,a,r)}),n=(0,r.zD)("data/fetchNewArrivalProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getNewArrivalProducts(t,a,r)}),d=(0,r.zD)("data/fetchTopViewProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getTopViewProducts({page:t,per_page:a,country:r})}),c=(0,r.zD)("data/fetchVideoProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getVideoProducts(t,a,r)}),u=(0,r.zD)("data/fetchComboProductsHome",async()=>await s.K.getComboList()),m=(0,r.zD)("data/fetchGroups",async()=>await s.K.getGroups()),h=(0,r.zD)("data/fetchRelatedProducts",async e=>await s.K.getRelatedProducts(e)),x=(0,r.zD)("data/fetchCategories",async()=>await s.K.getCategories()),g=(0,r.zD)("data/fetchProducts",async e=>await s.K.getProducts(e)),p=(0,r.zD)("data/fetchShops",async e=>await s.K.getShops(e)),f=(0,r.zD)("data/fetchFeatureProducts",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getFeatureProducts(t,a,r)}),v=(0,r.zD)("data/fetchFeatureProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getFeatureProducts(t,a,r)}),b=(0,r.zD)("data/fetchForYouProducts",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getForYouProducts(t,a,r)}),y=(0,r.zD)("data/fetchForYouProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getForYouProducts(t,a,r)}),j=(0,r.zD)("data/fetchPopularProducts",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getPopularProducts(t,a,r)}),w=(0,r.zD)("data/fetchPopularProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getPopularProducts(t,a,r)}),N=(0,r.zD)("data/fetchSliders",async()=>
1await s.K.getSliders()),_=(0,r.zD)("data/fetchBrands",async()=>await s.K.getBrands()),k=(0,r.zD)("data/fetchOffers",async()=>await s.K.getOffers()),S=(0,r.zD)("data/fetchNewArrivalProducts",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getNewArrivalProducts(t,a,r)}),C=(0,r.zD)("data/fetchTrendingNowProducts",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getTrendingProducts(t,a,r)}),A=(0,r.zD)("data/fetchTrendingNowProductsHome",async e=>{let{page:t,per_page:a,country:r}=e;return await s.K.getTrendingProducts(t,a,r)}),P=(0,r.zD)("data/fetchGroupShops",async e=>{let{id:t,lat:a,lng:r}=e;try{return await s.K.getGroupShops(t,a,r)}catch(e){throw e}}),z=(0,r.zD)("data/fetchSingleProduct",async e=>{try{return await s.K.findSingleProduct(e)}catch(e){throw e}}),E=(0,r.zD)("fetch/singleGroup",async e=>{let{id:t}=e;try{return await s.K.findGroup(t)}catch(e){throw e}}),F=(0,r.zD)("fetch/getFaq",async()=>{try{return await s.K.getFaq()}catch(e){throw e}}),D=(0,r.zD)("fetch/storeSeller",async e=>{try{return await s.K.storeSeller(e)}catch(e){throw e}}),I=(0,r.Z0)({name:"data",initialState:l,reducers:{resetState:e=>({...l}),clearError:e=>{e.error=null}},extraReducers:e=>{e.addCase(m.pending,e=>{e.loadingStates.groups=!0}).addCase(m.fulfilled,(e,t)=>{e.groups=t.payload,e.loadingStates.groups=!1}).addCase(m.rejected,(e,t)=>{e.loadingStates.groups=!1,e.error=t.error.message||""}).addCase(x.pending,e=>{e.loadingStates.categories=!0}).addCase(x.fulfilled,(e,t)=>{e.categories=t.payload,e.loadingStates.categories=!1}).addCase(x.rejected,(e,t)=>{e.loadingStates.categories=!1,e.error=t.error.message||""}).addCase(g.pending,e=>{e.loadingStates.products=!0,e.products=[]}).addCase(g.fulfilled,(e,t)=>{e.products=t.payload,e.loadingStates.products=!1}).addCase(g.rejected,(e,t)=>{e.loadingStates.products=!1,e.products=[],e.error=t.error.message||""}).addCase(h.pending,e=>{e.loading=!0,e.related_products=[]}).addCase(h.fulfilled,(e,t)=>{e.related_products=t.payload,e.loading=!1}).addCase(h.rejected,(e,t)=>{e.loading=!1,e.related_products=[],e.error=t.error.message||""}).addCase(p.pending,e=>{e.loadingStates.shops=!0}).addCase(p.fulfilled,(e,t)=>{e.shops=t.payload,e.loadingStates.shops=!1}).addCase(p.rejected,(e,t)=>{e.loadingStates.shops=!1,e.error=t.error.message||""}).addCase(N.pending,e=>{e.loadingStates.sliders=!0}).addCase(N.fulfilled,(e,t)=>{e.sliders=t.payload,e.loadingStates.sliders=!1}).addCase(N.rejected,(e,t)=>{e.loadingStates.sliders=!1,e.error=t.error.message||""}
1).addCase(f.pending,e=>{e.loadingStates.featureProducts=!0}).addCase(f.fulfilled,(e,t)=>{e.featureProducts=t.payload.data,e.loadingStates.featureProducts=!1}).addCase(f.rejected,(e,t)=>{e.loadingStates.featureProducts=!1,e.error=t.error.message||""}).addCase(n.pending,e=>{e.loadingStates.newarrivalProducts=!0}).addCase(n.fulfilled,(e,t)=>{e.newarrivalProductsHome=t.payload.data,e.loadingStates.newarrivalProducts=!1}).addCase(n.rejected,(e,t)=>{e.loadingStates.newarrivalProducts=!1,e.error=t.error.message||""}).addCase(v.pending,e=>{e.loadingStates.featureProductsHome=!0}).addCase(v.fulfilled,(e,t)=>{e.featureProductsHome=t.payload.data,e.loadingStates.featureProductsHome=!1}).addCase(v.rejected,(e,t)=>{e.loadingStates.featureProductsHome=!1,e.error=t.error.message||""}).addCase(_.pending,e=>{e.loadingStates.brands=!0}).addCase(_.fulfilled,(e,t)=>{e.brands=t.payload,e.loadingStates.brands=!1}).addCase(_.rejected,(e,t)=>{e.loadingStates.brands=!1,e.error=t.error.message||""}).addCase(b.pending,e=>{e.loadingStates.forYouProducts=!0}).addCase(b.fulfilled,(e,t)=>{e.forYouProducts=t.payload.data,e.loadingStates.forYouProducts=!1}).addCase(b.rejected,(e,t)=>{e.loadingStates.forYouProducts=!1,e.error=t.error.message||""}).addCase(y.pending,e=>{e.loadingStates.forYouProductsHome=!0}).addCase(y.fulfilled,(e,t)=>{e.forYouProductsHome=t.payload.data,e.loadingStates.forYouProductsHome=!1}).addCase(y.rejected,(e,t)=>{e.loadingStates.forYouProductsHome=!1,e.error=t.error.message||""}).addCase(j.pending,e=>{e.loadingStates.popularProducts=!0}).addCase(j.fulfilled,(e,t)=>{e.popularProducts=t.payload.data,e.loadingStates.popularProducts=!1}).addCase(j.rejected,(e,t)=>{e.loadingStates.popularProducts=!1,e.error=t.error.message||""}).addCase(w.pending,e=>{e.loadingStates.popularProductsHome=!0}).addCase(w.fulfilled,(e,t)=>{e.popularProductsHome=t.payload.data,e.loadingStates.popularProductsHome=!1}).addCase(w.rejected,(e,t)=>{e.loadingStates.popularProductsHome=!1,e.error=t.error.message||""}).addCase(k.pending,e=>{e.loadingStates.offers=!0}).addCase(k.fulfilled,(e,t)=>{e.offers=t.payload,e.loadingStates.offers=!1}).addCase(k.rejected,(e,t)=>{e.loadingStates.offers=!1,e.error=t.error.message||""}).addCase(S.pending,e=>{e.loadingStates.newarrivalProducts=!0}).addCase(S.fulfilled,(e,t)=>{e.newarrivalProducts=t.payload.data,e.loadingStates.newarrivalProducts=!1}).addCase(S.rejected,(e,t)=>{e.loadingStates.newarrivalProducts=!1,e.error=t.error.message||""}).addCase(C.pending,e=>{e.loadingStates.trendingProducts=!0}).addCase(C.fulfilled,(e,t)=>{e.trendingProducts=t.payload.data,e.loadingStates.trendingProducts=!1}).addCase(C.rejected,(e,t)=>{e.loadingStates.trendingProducts=!1,e.error=t.error.message||""}).addCase(A.pending,e=>{e.loadingStates.trendingProductsHome=!0}).addCase(A.fulfilled,(e,t)=>{e.trendingProductsHome=t.payload.data,e.loadingStates.trendingProductsHome=!1}).addCase(A.rejected,(e,t)=>{e.loadingStates.trendingProductsHome=!1,e.error=t.error.message||""}).addCase(d.pending,e=>{e.loadingStates.topViewProductsHome=!0}).addCase(d.fulfilled,(e,t)=>{let a=t.payload,r=Array.isArray(a)?a:(null==a?void 0:a.data)||[];t.meta.arg.page>1?e.topViewProductsHome=[...e.topViewProductsHome,...r]:e.topViewProductsHome=r,e.loadingStates.topViewProductsHome=!1}).addCase(d.rejected,(e,t)=>{e.loadingStates.topViewProductsHome=!1,e.error=t.error.message||""}).addCase(i.pending,e=>{e.loadingStates.topSaleProductsHome=!0}).addCase(i.fulfilled,(e,t)=>{e.topSaleProductsHome=t.payload.data,e.loadingStates.topSaleProductsHome=!1}).addCase(i.rejected,(e,t)=>{e.loadingStates.topSaleProductsHome=!1,e.error=t.error.message||""}).addCase(c.pending,e=>{e.loadingStates.videoProductsHome=!0}).addCase(c.fulfilled,(e,t)=>{let a=t.payload;e.videoProductsHome=(Array.isArray(a)?a:(null==a?void 0:a.data)||[]).filter(e=>{var t;return(null==e?void 0:null===(t=e.product_detail)||void 0===t?void 0:t.video_url)&&""!==e.product_detail.video_url.trim()}),e.loadingStates.videoProductsHome=!1}).addCase(c.rejected,(e,t)=>{e.loadingStates.videoProductsHome=!1,e.error=t.error.message||""}).addCase(u.pending,e=>{e.loadingStates.comboProductsHome=!0}).addCase(u.fulfilled,(e,t)=>{let a=t.payload;e.comboProductsHome=Array.isArray(a)?a:(null==a?void 0:a.data)||[],e.loadingStates.comboProductsHome=!1}).addCase(u.rejected,(e,t)=>{e.loadingStates.comboProductsHome=!1,e.error=t.error.message||""}).addCase(P.pending,e=>{e.loadingStates.groupShops=!0}).addCase(P.fulfilled,(e,t)=>{e.groupShops=t.payload,e.loadingStates.groupShops=!1}).addCase(P.rejected,(e,t)=>{e.loadingStates.groupShops=!1,e.error=t.error.message||""}
1).addCase(z.pending,e=>{e.loadingStates.singleProduct=!0,e.singleProduct=null}).addCase(z.fulfilled,(e,t)=>{e.singleProduct=t.payload,e.loadingStates.singleProduct=!1}).addCase(z.rejected,(e,t)=>{e.loadingStates.singleProduct=!1,e.singleProduct=null,e.error=t.error.message||""}).addCase(E.pending,e=>{e.loadingStates.single_group=!0,e.single_group=null}).addCase(E.fulfilled,(e,t)=>{e.single_group=t.payload,e.loadingStates.single_group=!1}).addCase(E.rejected,(e,t)=>{e.loadingStates.single_group=!1,e.single_group=null,e.error=t.error.message||""}).addCase(F.pending,e=>{e.loadingStates.faq=!0,e.faq_list=[]}).addCase(F.fulfilled,(e,t)=>{e.faq_list=t.payload,e.loadingStates.faq=!1}).addCase(F.rejected,(e,t)=>{e.loadingStates.faq=!1,e.error=t.error.message||""}).addCase(D.pending,e=>{e.loadingStates.createSeller=!1}).addCase(D.fulfilled,(e,t)=>{e.loadingStates.createSeller=!0,e.status_code=t.payload.status_code}).addCase(D.rejected,(e,t)=>{e.loadingStates.createSeller=!1,e.error=t.error.message||""})}}),{resetState:L,clearError:T}=I.actions,H=I.reducer},41545:(e,t,a)=>{Promise.resolve().then(a.bind(a,76083)),Promise.resolve().then(a.t.bind(a,69243,23)),Promise.resolve().then(a.t.bind(a,70682,23)),Promise.resolve().then(a.bind(a,13568)),Promise.resolve().then(a.bind(a,44944)),Promise.resolve().then(a.bind(a,35115)),Promise.resolve().then(a.bind(a,38643)),Promise.resolve().then(a.bind(a,90096)),Promise.resolve().then(a.bind(a,52548)),Promise.resolve().then(a.bind(a,20963)),Promise.resolve().then(a.bind(a,48016)),Promise.resolve().then(a.bind(a,99264)),Promise.resolve().then(a.bind(a,32992)),Promise.resolve().then(a.bind(a,95475)),Promise.resolve().then(a.bind(a,59576)),Promise.resolve().then(a.bind(a,45077)),Promise.resolve().then(a.bind(a,53173)),Promise.resolve().then(a.bind(a,4124)),Promise.resolve().then(a.t.bind(a,35786,23))},45077:(e,t,a)=>{"use strict";a.d(t,{LocationProvider:()=>o});var r=a(95155),s=a(12115);let l=(0,s.createContext)(void 0),o=e=>{let{children:t}=e,[a,o]=(0,s.useState)({country:"Bangladesh",city:"Dhaka"}),[i,n]=(0,s.useState)(""),[d,c]=(0,s.useState)("");return(0,r.jsx)(l.Provider,{value:{location:a,setLocation:o,iftarTime:i,setIftarTime:n,timeUntilIftar:d,setTimeUntilIftar:c},children:t})}},48016:(e,t,a)=>{"use strict";a.d(t,{default:()=>h});var r=a(95155),s=a(12115),l=a(6874),o=a.n(l),i=a(29911),n=a(10351),d=a(48411),c=a(59576),u=a(36568),m=a(50345);let h=()=>{let{isAuthenticated:e,logout:t,user:a}=(0,c.A)(),[l,h]=(0,s.useState)(!1),[x,g]=(0,s.useState)(!1),[p,f]=(0,s.useState)(!1),[v,b]=(0,s.useState)(!0),y=(0,s.useRef)(0),j=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let e=()=>{let e=window.scrollY;f(e>50),e<10?b(!0):e>y.current+5?b(!1):e<y.current-5&&b(!0),y.current=e};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,s.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"md:hidden fixed bottom-0 left-0 pb-3     right-0 bg-white border-t border-gray-200/80   transition-transform duration-300 ".concat(l?"z-[9998]":"z-[50]"," ").concat(v?"translate-y-0":"translate-y-full"),children:[(0,r.jsxs)("div",{className:"container mx-auto flex justify-between  items-center space-x-10  px-6",children:[(0,r.jsxs)("div",{className:"flex flex-col items-center space-y-1 flex-1",children:[(0,r.jsx)(m.b,{}),(0,r.jsx)("span",{className:"text-xs font-medium text-gray-700",children:"Category"})]}),(0,r.jsxs)(o(),{href:"/",className:"flex flex-col items-center",children:[(0,r.jsx)("div",{className:"p-2 rounded-full shadow-2xl transition-all duration-300 hover:scale-105 hover:shadow-xl",children:(0,r.jsx)(i.rQ8,{className:"text-yellow-600 text-[30px]"})}),(0,r.jsx)("span",{className:"text-xs font-semibold text-gray-700 ",children:"Home"})]}),(0,r.jsxs)("div",{className:"hidden flex flex-col items-center space-y-1 flex-1 mt-3 ml-2",children:[(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(d.A,{})}),(0,r.jsx)("span",{className:"text-xs font-medium text-gray-700",children:"Cart"})]}),(0,r.jsxs)("div",{className:"flex flex-col items-center mr-16 space-y-1 flex-1 relative",ref:j,children:[(0,r.jsxs)("button",{onClick:()=>{e?g(!x):h(!0)},className:"flex flex-col items-center relative",children:[(0,r.jsx)("div",{className:"p-3 rounded-full transition-all duration-200",children:(0,r.jsx)(n.JXP,{className:"text-yellow-600 text-[25px]"})}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-gray-700 mb-1",children:e?"Profile":"Login"}),e&&(0,r.jsx)(n.fK4,{className:"text-gray-600 transition-transform duration-200 ".concat(x?"rotate-180":"rotate-0"),size:12})]})]}),x&&e&&(0,r.jsxs)("div",{className:"absolute bottom-full mb-2 left-[20%] transform -translate-x-1/2 w-48 bg-white rounded-lg shadow-xl border border-gray-200 py-2 z-[60]",children:[(0,r.jsxs)("div",{className:"px-4 py-2 border-b border-gray-100",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800 truncate",children:(null==a?void 0:a.name)||"User"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 truncate",children:(null==a?void 0:a.email)||""})]}),(0,r.jsx)(o(),{href:"/profile",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors duration-200",onClick:()=>g(!1),children:"My Profile"}),(0,r.jsx)(o(),{href:"/order",className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors duration-200",onClick:()=>g(!1),children:"My Orders"}),(0,r.jsx)("div",{className:"border-t border-gray-100 mt-1 pt-1",children:(0,r.jsx)("button",{onClick:()=>{t(),g(!1)},className:"block w-full text-left px-4 py-2 text-sm text-red-600 hover:bg-red-50 transition-colors duration-200",children:"Logout"})})]})]})]}),(0,r.jsx)("div",{className:"h-1 bg-gradient-to-r  to-transparent opacity-60"})]}),l&&(0,r.jsx)(u.A,{onClose:()=>h(!1)})]})}},48411:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var r=a(95155),s=a(15305),l=a(34540),o=a(19159),i=a(38382),n=a(30285),d=a(6874),c=a.n(d),u=a(13568),m=a(5522),h=a(12115),x=a(35695),g=a(29911),p=a(36568),f=a(59576),v=a(86878);function b(e){var t,a;let{format:d=!1,sticky:b}=e,y=(0,x.useRouter)(),j=(0,l.wA)(),[w,N]=(0,h.useState)(!1),[_,k]=(0,h.useState)(!1);(0,h.useRef)(null);let{items:S,totalAmount:C}=(0,l.d4)(e=>e.cart),{setCartOpen:A}=(0,f.A)(),{trackRemoveFromCart:P,trackBeginCheckout:z}=(0,v.v)();(0,h.useEffect)(()=>{A(w);{let e=setTimeout(()=>{try{let a=window.Tawk_API;if(a){var e,t;w?null===(e=a.hideWidget)||void 0===e||e.call(a):null===(t=a.showWidget)||void 0===t||t.call(a);return}}catch(e){}
1document.querySelectorAll("iframe").forEach(e=>{let t=e.src||"",a=e.id||"";(t.includes("tawk.to")||a.includes("tawk"))&&(e.style.visibility=w?"hidden":"visible",e.style.opacity=w?"0":"1",e.style.pointerEvents=w?"none":"auto")}),document.querySelectorAll('[id*="tawk"], [class*="tawk"]').forEach(e=>{e.style.visibility=w?"hidden":"visible",e.style.opacity=w?"0":"1",e.style.pointerEvents=w?"none":"auto"})},150);return()=>clearTimeout(e)}},[w,A]);let E=(e,t,a)=>{let r=S.find(t=>t.id===e&&(a&&t.selectedAttributes?t.id===e&&JSON.stringify(t.selectedAttributes)===JSON.stringify(a):t.id===e&&!t.selectedAttributes));if(r&&r.quantity+t>=1){j((0,o.RO)({id:e,quantity:r.quantity+t,selectedAttributes:a}));{let t=(null==a?void 0:a.map(e=>"".concat(e.id,"-").concat(e.value)).join("_"))||"",r="cart-item-".concat(e,"-").concat(t),s=document.getElementById(r);s&&(s.classList.add("shake"),setTimeout(()=>s.classList.remove("shake"),500))}}};(0,h.useEffect)(()=>{j((0,o.ZE)())},[j]);let F=e=>{let t=e.selectedAttributes?e.selectedAttributes.map(e=>"".concat(e.id,"-").concat(e.value)).join("_"):"";return"".concat(e.id,"_").concat(t)},D=e=>{var t;if(!e.stock||!Array.isArray(e.stock)||0===e.stock.length)return!1;let a=null===(t=e.stock[0])||void 0===t?void 0:t.available_quantity;return e.quantity>=a},I=e=>{var t;return e.stock&&Array.isArray(e.stock)&&0!==e.stock.length?(null===(t=e.stock[0])||void 0===t?void 0:t.available_quantity)||0:1/0};return(0,r.jsxs)(i.cj,{open:w,onOpenChange:N,children:[!w&&(0,r.jsx)(i.CG,{asChild:!0,children:!0===d?(0,r.jsxs)("button",{className:"fixed right-7 -mt-3 h-[50px] w-[110px] top-1/2 z-50 cursor-pointer   bg-[#CC0000] rounded-b-xl text-white   shadow-xl   flex items-center justify-center gap-2   px-3 py-2   transition-all duration-200",children:[S.length>0&&(0,r.jsx)("span",{className:"bg-white text-yellow-600 text-[10px] font-bold   rounded-full w-5 h-5 flex items-center justify-center shadow-sm",children:S.length}),(0,r.jsx)("span",{className:"text-black text-[20px]",children:"Cart"}),(0,r.jsx)(s.gZn,{className:"text-black text-[18px]"})]}):(0,r.jsxs)(n.$,{variant:"outline",className:"flex items-center border-2 rounded-full hover:bg-black cursor-pointer gap-2 relative md:p-2 border-red-600 bg-black ",children:[(0,r.jsx)(s.gZn,{className:"".concat(b?"text-white !text-4xl":"text-yellow-600"," cursor-pointer text-3xl")}),S.length>0&&(0,r.jsx)("span",{className:"absolute -top-2 -right-2 bg-yellow-600 text-white text-xs rounded-full px-2",children:S.length})]})}),(0,r.jsxs)(i.h,{className:"z-[99999]",children:[(0,r.jsxs)(i.Fm,{children:[(0,r.jsx)(i.qp,{children:"Your Cart"}),(0,r.jsx)(i.Qs,{children:"Manage your items before checkout."})]}),(0,r.jsx)("div",{className:"h-[calc(100vh-160px)] overflow-y-auto p-2",children:0===S.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-gray-500",children:[(0,r.jsx)("i",{className:"fas fa-shopping-cart text-4xl mb-3"}),(0,r.jsx)("p",{className:"text-base",children:"Your cart is empty"})]}):(0,r.jsx)("div",{className:"space-y-3",children:S.map(e=>{var t,a,s,l,i,n,d;return(0,r.jsxs)("div",{id:"cart-item-".concat(e.id,"-").concat((null===(t=e.selectedAttributes)||void 0===t?void 0:t.map(e=>"".concat(e.id,"-").concat(e.value)).join("_"))||""),className:"flex gap-3 p-2.5 bg-white rounded-lg border border-gray-100 hover:border-gray-200 hover:bg-gray-50 transition-all duration-200",children:[(0,r.jsx)("div",{className:"w-20 h-20 rounded-md overflow-hidden flex-shrink-0 border border-gray-100",children:(0,r.jsx)(m.A,{product:(null===(s=e.product_images)||void 0===s?void 0:null===(a=s.find(t=>{var a;return(null==t?void 0:t.attribute_value_id)&&(null===(a=e.selectedAttributes)||void 0===a?void 0:a.some(e=>e.id===t.attribute_value_id))}))||void 0===a?void 0:a.path)||(null==e?void 0:null===(i=e.product_images)||void 0===i?void 0:null===(l=i[0])||void 0===l?void 0:l.path)||"/default-image.webp",width:56,height:56,className:"w-full h-full object-cover"})}),(0,r.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start gap-2",children:[(0,r.jsx)(c(),{onClick:()=>N(!1),href:"/details?title=".concat(((null==e?void 0:e.name)||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-").replace(/ & |, |\s+/g,"-"),"&pId=").concat(null==e?void 0:e.id,"&slug=").concat((null==e?void 0:null===(n=e.product_detail)||void 0===n?void 0:n.slug)||""),className:"font-medium hover:underline text-gray-800 text-sm truncate",children:(null==e?void 0:e.name)?"".concat(e.name.slice(0,20),".."):"Product"}),(0,r.jsx)("button",{onClick:()=>{var t;P({id:e.id,name:(null==e?void 0:e.name)||"Product",price:Number(e.sale_price)||0,category:null==e?void 0:null===(t=e.product_detail)||void 0===t?void 0:t.category},e.quantity),j((0,o.dt)({id:null==e?void 0:e.id,selectedAttributes:null==e?void 0:e.selectedAttributes}))},className:"text-gray-400 hover:text-red-500 transition-colors p-0.5",children:(0,r.jsx)(g.qbC,{size:15})})]}),e.selectedAttributes&&e.selectedAttributes.length>0&&(0,r.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:e.selectedAttributes.map((t,a)=>{var s,l;return(0,r.jsxs)("span",{className:"mr-1",children:[t.name,": ",t.value,a<(null!==(l=null===(s=e.selectedAttributes)||void 0===s?void 0:s.length)&&void 0!==l?l:0)-1?", ":""]},"".concat(t.id,"-").concat(t.value,"-").concat(a))})}),(0,r.jsxs)("div",{className:"mt-1 flex justify-between items-center",children:[(0,r.jsxs)("div",{className:"flex items-center md:gap-2.5 bg-gray-50 rounded-lg p-1",children:[(0,r.jsx)("button",{className:"w-7 h-7 flex items-center justify-center rounded-md hover:bg-gray-200 cursor-pointer text-gray-600 transition-colors text-xs",onClick:()=>E(e.id,-1,e.selectedAttributes),children:"−"}),(0,r.jsx)("span",{className:"w-7 text-center text-sm",children:e.quantity}),(0,r.jsx)("button",{disabled:D(e),className:"w-7 h-7 cursor-pointer flex items-center justify-center rounded-md hover:bg-gray-200 text-gray-600 transition-colors text-xs ".concat(D(e)?"opacity-50 cursor-not-allowed":""),onClick:()=>E(e.id,1,e.selectedAttributes),children:"+"})]}),(0,r.jsxs)("p",{className:"font-medium text-gray-900 text-[12px] md:text-sm",children:[(e.sale_price||0)*e.quantity," ",(null===(d=e.product_detail)||void 0===d?void 0:d.currency_code)||"AED"]}
1)]}),D(e)&&(0,r.jsxs)("div",{className:"text-xs text-red-500 mt-1",children:["Max ",I(e)," available"]})]})]},F(e))})})}),(0,r.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 border-t bg-white p-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,r.jsx)("span",{className:"text-sm text-gray-600",children:"Total Amount:"}),(0,r.jsxs)("span",{className:"text-base font-bold bg-gradient-to-r from-[#ff7f50] to-[#d62892] bg-clip-text text-transparent",children:[C.toFixed(2)," ",(null===(a=S[0])||void 0===a?void 0:null===(t=a.product_detail)||void 0===t?void 0:t.currency_code)||"AED"]})]}),(0,r.jsx)("div",{className:"space-y-2",children:C>0||S.length>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>{localStorage.getItem("token")?(sessionStorage.getItem("begin_checkout_fired")||(z(S.map(e=>{var t;return{product:{id:e.id,name:e.name,price:Number(e.sale_price)||0,category:null==e?void 0:null===(t=e.product_detail)||void 0===t?void 0:t.category},quantity:e.quantity}})),sessionStorage.setItem("begin_checkout_fired","true")),y.push("/checkout")):k(!0),N(!1)},className:"w-full cursor-pointer py-2 text-white rounded-lg transform hover:scale-[1.01] transition-all duration-200 font-medium text-sm shadow-md hover:shadow-xl flex items-center justify-center gap-2.5",style:{background:"linear-gradient(135deg, #FF0000 0%, #007B3D 50%, #000000 100%)"},children:[(0,r.jsx)("span",{children:"Checkout"}),(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]}),(0,r.jsxs)("button",{onClick:()=>{j((0,o.sX)()),u.oR.success("Cart cleared successfully")},className:"w-full py-1 text-gray-500 cursor-pointer hover:text-red-500 transition-colors text-[14px] flex items-center justify-center gap-1",children:[(0,r.jsx)(g.qbC,{size:8}),"Clear Cart"]})]}):null})]}),(0,r.jsx)(i.XW,{children:(0,r.jsx)(i.kN,{asChild:!0,children:(0,r.jsx)(n.$,{className:"w-full mt-4 bg-green-600 hover:bg-green-700",variant:"default",disabled:0===S.length,asChild:!0,children:(0,r.jsx)(c(),{href:"/checkout",children:"Proceed to Checkout"})})})})]}),_&&(0,r.jsx)(p.A,{isOpen:_,onClose:()=>k(!1),onLoginSuccess:()=>{k(!1),sessionStorage.getItem("begin_checkout_fired")||(z(S.map(e=>{var t;return{product:{id:e.id,name:e.name,price:Number(e.sale_price)||0,category:null==e?void 0:null===(t=e.product_detail)||void 0===t?void 0:t.category},quantity:e.quantity}})),sessionStorage.setItem("begin_checkout_fired","true")),y.push("/checkout"),N(!1)}})]})}},50345:(e,t,a)=>{"use strict";a.d(t,{b:()=>v});var r=a(95155),s=a(12115),l=a(15305),o=a(38382),i=a(6874),n=a.n(i),d=a(29911),c=a(34540),u=a(40300),m=a(5522),h=a(24717),x=a(12515),g=a(10351),p=a(14541),f=a(66474);function v(){var e,t;let[a,i]=(0,s.useState)(null),[v,b]=(0,s.useState)({}),[y,j]=(0,s.useState)(""),[w,N]=(0,s.useState)(null),[_,k]=(0,s.useState)(!1),[S,C]=(0,s.useState)(null),A=(0,c.wA)(),P=(0,c.d4)(e=>e.data.groups),z=(0,s.useRef)(null),E=(0,s.useRef)(null);(0,s.useEffect)(()=>{A((0,u.pl)())},[A]),(0,s.useEffect)(()=>{P.length>0&&!w&&N(P[0])},[P]),(0,s.useEffect)(()=>{let e=e=>{_&&z.current&&!z.current.contains(e.target)&&E.current&&!E.current.contains(e.target)&&k(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[_]);let F=e=>{i(t=>t===e?null:e)},D=e=>{b(t=>({...t,[e]:!t[e]}))},I=e=>N(e),L=()=>{},T=P.filter(e=>e.name.toLowerCase().includes(y.toLowerCase())),H=e=>(null==e?void 0:e.toLowerCase().replace(/[^a-z0-9]+/g,"-"))||"",q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.map(e=>{var a,s,l;return(0,r.jsxs)("div",{className:"relative ".concat(t>0?"ml-4 pl-3 border-l-2 border-red-100":""),children:[t>0&&(0,r.jsx)("div",{className:"absolute left-[-2px] top-4 w-[2px] h-[calc(100%-2rem)] bg-gradient-to-b from-red-400 to-red-200"}),(0,r.jsxs)("div",{className:"flex items-center justify-between py-2 px-2 hover:bg-red-50 rounded-lg transition-all duration-200 group ".concat(t%2==0?"bg-white":"bg-gray-50/50"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"relative",children:[e.image&&(0,r.jsx)(m.A,{product:e.image,height:32,width:32,className:"w-8 h-8 object-contain rounded-lg border border-gray-200 group-hover:border-red-300 transition-colors",alt:"".concat(e.name," category image")}),t>0&&(0,r.jsx)("div",{className:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full flex items-center justify-center",children:(0,r.jsxs)("span",{className:"text-[8px] text-white font-bold",children:["L",t]})})]}),(0,r.jsxs)(n(),{href:"/items?title=".concat(H(e.name),"&cId=").concat(e.id),className:"flex-1 min-w-0",onClick:L,children:[(0,r.jsx)("span",{className:"font-medium hover:text-red-600 truncate block",children:e.name}),(null===(a=e.parent_category)||void 0===a?void 0:a.length)>0&&(0,r.jsxs)("p",{className:"text-[10px] text-gray-400 mt-0.5",children:["Contains ",e.parent_category.length," subcategories"]})]})]}),(null===(s=e.parent_category)||void 0===s?void 0:s.length)>0&&(0,r.jsx)("button",{onClick:t=>{t.preventDefault(),D(e.id)},className:"p-1.5 hover:bg-red-100 hover:text-red-600 rounded-full transition-colors relative group/btn",children:(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-white bg-red-500 px-2 py-0.5 rounded-full",children:e.parent_category.length}),v[e.id]?(0,r.jsx)(x.lZh,{className:"text-red-600",size:16}):(0,r.jsx)(x.DSS,{className:"text-gray-400 group-hover/btn:text-red-600",size:16})]})})]}),(null===(l=e.parent_category)||void 0===l?void 0:l.length)>0&&v[e.id]&&(0,r.jsxs)("div",{className:"mt-1.5 ml-1 relative",children:[(0,r.jsx)("div",{className:"absolute left-3 top-0 bottom-0 w-0.5 bg-gradient-to-b from-red-400 to-red-200"}),(0,r.jsx)("div",{className:"pl-4",children:q(e.parent_category,t+1)})]})]},e.id)})},R=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return arguments.length>2&&arguments[2],e.map(e=>{var a,s,o;return(0,r.jsxs)("div",{className:"relative group/nested ".concat(t>0?"ml-3 pl-3 border-l border-red-200 hover:border-red-400":""),onMouseEnter:()=>C(e.id),onMouseLeave:()=>C(null),children:[t>0&&(0,r.jsx)("div",{className:"absolute left-[-1px] top-5 w-[2px] h-[calc(100%-1.5rem)] bg-gradient-to-b from-red-400 to-red-200 group-hover/nested:from-red-500"}),(0,r.jsxs)("div",{className:"flex items-center justify-between p-2.5 rounded-lg transition-all duration-200 hover:shadow-sm ".concat(0===t?"bg-white border border-gray-200 hover:border-red-300 hover:bg-red-50":1===t?"bg-gray-50/80 hover:bg-red-50":"bg-gray-50/60 hover:bg-red-50"),children:[(0,r.jsxs)(n(),{href:"/items?title=".concat(H(null==e?void 0:e.name),"&cId=").concat(e.id),className:"flex items-center gap-3 flex-1 min-w-0 group/link",onClick:()=>k(!1),children:[(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center transition-all duration-300 ".concat(0===t?"bg-white border border-gray-200 group-hover/link:border-red-300":1===t?"bg-red-50 border border-red-100":"bg-red-50/50 border border-red-100"),children:e.image?(0,r.jsx)(m.A,{product:e.image,height:32,width:32,className:"w-8 h-8 object-contain",alt:"".concat(e.name," category")}):(0,r.jsx)(x.kE7,{className:"".concat(0===t?"text-gray-400":"text-red-500")})})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"font-medium truncate group-hover/link:text-red-600",children:e.name}),t>0&&(0,r.jsx)(h.csH,{className:"text-gray-300 group-hover/link:text-red-400 flex-shrink-0",size:12})]}),(null===(a=e.parent_category)||void 0===a?void 0:a.length)>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,r.jsx)("div",{className:"flex -sp
1ace-x-1",children:[...Array(Math.min(3,e.parent_category.length))].map((e,t)=>(0,r.jsx)("div",{className:"w-4 h-4 bg-red-400 rounded-full border border-white"},t))}),(0,r.jsxs)("span",{className:"text-[10px] text-gray-500 font-medium ml-1",children:[e.parent_category.length," nested"]})]})]})]}),(null===(s=e.parent_category)||void 0===s?void 0:s.length)>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,r.jsx)("button",{onClick:()=>D(e.id),className:"p-1.5 rounded-lg transition-all duration-200 flex items-center gap-1 ".concat(v[e.id]?"bg-red-100 text-red-600":"hover:bg-red-100 hover:text-red-600 text-gray-400"),children:v[e.id]?(0,r.jsx)(l.a0T,{size:12,className:"text-red-600"}):(0,r.jsx)(l.tEr,{size:12})}),S===e.id&&(0,r.jsx)("button",{className:"p-1.5 text-gray-400 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors",children:(0,r.jsx)(g.$Ri,{size:14})})]})]}),(null===(o=e.parent_category)||void 0===o?void 0:o.length)>0&&v[e.id]&&(0,r.jsxs)("div",{className:"mt-2 ml-2 relative",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2 pl-1",children:[(0,r.jsx)("div",{className:"w-6 h-6 bg-red-500 rounded-full flex items-center justify-center",children:(0,r.jsx)(d.eaw,{className:"text-white text-xs"})}),(0,r.jsxs)("span",{className:"text-xs font-semibold text-gray-700",children:["More in ",e.name]}),(0,r.jsx)("div",{className:"h-px flex-1 bg-gradient-to-r from-red-300 to-transparent ml-2"})]}),(0,r.jsx)("div",{className:"space-y-1.5 pl-1",children:R(e.parent_category,t+1,e.id)})]})]},e.id)})},O=e=>(null==e?void 0:e.filter(e=>null===e.parent_id))||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("nav",{className:"block md:hidden",children:(0,r.jsxs)(o.cj,{children:[(0,r.jsx)(o.CG,{asChild:!0,children:(0,r.jsx)("button",{className:"p-2 bg-red-500 text-white rounded-lg shadow-sm hover:shadow-lg transition-all duration-200 hover:bg-red-600 hover:scale-105",children:(0,r.jsx)(h.pkD,{className:"text-xl"})})}),(0,r.jsxs)(o.h,{side:"left",className:"w-[300px] p-0 overflow-hidden",children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 bg-red-500 text-white p-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)(o.Fm,{className:"m-0",children:(0,r.jsxs)(o.qp,{className:"text-white text-lg font-bold flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-8 h-8 bg-white/20 rounded-lg flex items-center justify-center",children:(0,r.jsx)(g.QPV,{className:"text-white"})}),"Browse Categories"]})}),(0,r.jsx)(o.kN,{asChild:!0,children:(0,r.jsx)("button",{className:"text-white/80 hover:text-white p-1 rounded-full hover:bg-white/10",children:(0,r.jsx)(d.QCr,{size:18})})})]}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"search",value:y,onChange:e=>j(e.target.value),placeholder:"Search categories...",className:"w-full px-4 py-2.5 pl-11 text-sm bg-white/10 backdrop-blur-sm border border-white/20 rounded-lg text-white placeholder-white/60 focus:outline-none focus:ring-2 focus:ring-white/30"}),(0,r.jsx)(d.KSO,{className:"absolute left-3.5 top-3 text-white/60"}),y&&(0,r.jsx)("button",{onClick:()=>j(""),className:"absolute right-3 top-2.5 text-white/60 hover:text-white",children:(0,r.jsx)(d.QCr,{size:14})})]})})]}),(0,r.jsx)("ul",{className:"p-3 overflow-y-auto max-h-[calc(100vh-140px)]",children:T.map((e,t)=>{var s;return(0,r.jsx)("li",{className:"mb-3 last:mb-0",children:(0,r.jsxs)("div",{className:"bg-white border border-gray-200 rounded-xl p-3 hover:border-red-300 hover:shadow-lg transition-all duration-200",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)(n(),{href:"/groupProduct?group=".concat(H(null==e?void 0:e.name),"&gId=").concat(null==e?void 0:e.id),className:"flex items-center gap-3 group",children:[(0,r.jsx)("div",{className:"w-12 h-12 bg-red-50 border border-red-100 rounded-lg flex items-center justify-center p-1.5",children:(0,r.jsx)(m.A,{product:(null==e?void 0:e.image)||"",height:40,width:40,className:"w-10 h-10 object-contain"})}),(0,r.jsx)("span",{className:"font-bold text-gray-900 group-hover:text-red-600",children:e.name})]}),(null===(s=e.categories)||void 0===s?void 0:s.length)>0&&(0,r.jsx)("button",{onClick:e=>{e.preventDefault(),F(t)},className:"p-2 hover:bg-red-50 hover:text-red-600 rounded-lg transition-colors flex items-center gap-1.5",children:a===t?(0,r.jsx)(x.lZh,{className:"text-red-600"}):(0,r.jsx)(x.DSS,{className:"text-gray-400"})})]}),a===t&&e.categories&&(0,r.jsx)("div",{className:"mt-3 pt-3 border-t border-gray-100",children:(0,r.jsx)("div",{className:"pl-2",children:q(O(e.categories))})})]})},null==e?void 0:e.id)})})]})]})}),(0,r.jsxs)("nav",{className:"hidden md:block relative",ref:z,children:[(0,r.jsxs)("button",{ref:E,onClick:()=>k(!_),className:"\n    relative group overflow-hidden\n    flex items-center gap-2\n    px-4 py-2\n    rounded-xl\n    font-semibold text-sm\n    transition-all duration-200\n    cursor-pointer\n    active:scale-95\n  ",style:{background:_?"linear-gradient(135deg, #CC0000 0%, #005A2E 50%, #1a1a1a 100%)":"linear-gradient(135deg, #FF0000 0%, #007B3D 50%, #000000 100%)",boxShadow:_?"0 4px 15px rgba(255, 0, 0, 0.4)":"0 2px 10px rgba(255, 0, 0, 0.25)",color:"#FFFFFF"},children:[(0,r.jsx)(p.A,{size:16,className:"shrink-0 text-white transition-transform duration-300 ".concat(_?"rotate-90":"group-hover:rotate-12")}),(0,r.jsx)("span",{className:"relative z-10 tracking-wide text-white",children:"Categories"}),(0,r.jsx)(f.A,{size:14,className:"relative z-10 text-white transition-transform duration-300 ".concat(_?"rotate-180":"")}),(0,r.jsx)("span",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-2/3 h-px bg-gradient-to-r from-transparent via-white/50 to-transparent"})]}),_&&(0,r.jsxs)("div",{className:"absolute left-0 mt-2 w-[960px] max-w-[95vw] h-[620px] bg-white border border-gray-100 shadow-2xl rounded-2xl z-50 flex overflow-hidden",children:[(0,r.jsxs)("div",{className:"w-[240px] shrink-0 bg-gray-50 border-r border-gray-100 flex flex-col overflow-hidden",children:[(0,r.jsx)("div",{className:"px-4 py-3 bg-[#CC0000]",children:(0,r.jsxs)("p",{className:"text-xs font-bold text-white/90 uppercase tracking-widest flex items-center gap-2",children:[(0,r.jsx)(p.A,{size:13})," All Categories"]})}),(0,r.jsx)("ul",{className:"flex-1 overflow-y-auto p-2",children:P.map(e=>(0,r.jsx)("li",{children:(0,r.jsxs)("div",{onMouseEnter:()=>I(e),onClick:()=>N(e),className:"flex items-center gap-2.5 px-3 py-2.5 rounded-xl cursor-pointer transition-all duration-150 mb-0.5 ".concat((null==w?void 0:w.id)===e.id?"bg-white border-l-[3px] border-red-500 shadow-sm":"hover:bg-white hover:shadow-sm border-l-[3px] border-transparent"),children:[(0,r.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ".concat((null==w?void 0:w.id)===e.id?"bg-red-50 border border-red-200":"bg-white border border-gray-100"),children:e.image&&(0,r.jsx)(m.A,{product:e.image,height:28,width:28,className:"w-7 h-7 object-contain"})}),(0,r.jsx)("span",{className:"text-sm font-medium truncate ".concat((null==w?void 0:w.id)===e.id?"text-red-700":"text-gray-700"),children:e.name}),(null==w?void 0:w.id)===e.id&&(0,r.jsx)(l.xyO,{size:11,className:"ml-auto text-red-500 shrink-0"})]})},e.id))})]}),(0,r.jsx)("div",{className:"flex-1 p-5 overflow-y-auto",children:w?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-5 pb-4 border-b border-gray-100",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-14 h-14 bg-red-50 border-2 border-red-100 rounded-xl flex items-center justify-center p-1.5",children:(0,r.jsx)(m.A,{product:(null==w?void 0:w.image)||"",height:48,width:48,className:"w-full h-full object-contain"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-bold text-gray-900",children:w.name}),(0,r.jsxs)("p",{className:"text-xs text-gray-400 mt-0.5",children:[(null===(e=w.categories)||void 0===e?void 0:e.length)||0," subcategories"]})]})]}),(0,r.jsxs)(n(),{href:"/groupProduct?group=".concat(H(null==w?void 0:w.name),"&gId=").concat(null==w?void 0:w.id),className:"flex items-center gap-2 px-4 py-2 text-white text-sm font-semibold rounded-xl transition-all duration-200 hover:shadow-xl",style:{background:"linear-gradient(135deg, #FF0000 0%, #007B3D 50%, #000000 100%)",boxShadow:"0 4px 15px rgba(255, 0, 0, 0.3)"},onMouseEnter:e=>{e.currentTarget.style.background="linear-gradient(135deg, #FF3333 0%, #2E8B57 50%, #333333 100%)",e.currentTarget.style.transform="scale(1.02)",e.currentTarget.style.boxShadow="0 8px 25px rgba(255, 0, 0, 0.4)"},onMouseLeave:e=>{e.currentTarget.style.background="linear-gradient(135deg, #FF0000 0%, #007B3D 50%, #000000 100%)",e.currentTarget.style.transform="scale(1)",e.currentTarget.style.boxShadow="0 4px 15px rgba(255, 0, 0, 0.3)"},onClick:()=>k(!1),children:["View All ",(0,r.jsx)(l.J1z,{})]})]}),(null===(t=w.categories)||void 0===t?void 0:t.length)>0?(0,r.jsx)("div",{className:"space-y-2",children:R(O(w.categories))}):(0,r.jsxs)("div",{className:"text-center py-16",children:[(0,r.jsx)("div",{className:"w-16 h-16 bg-red-50 rounded-2xl flex items-center justify-center mx-auto mb-3",children:(0,r.jsx)(x.kE7,{className:"text-red-400 text-2xl"})}),(0,r.jsx)("p",{className:"text-gray-500 font-medium",children:"No subcategories"}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"Browse all products in this category"})]})]}):(0,r.jsx)("div",{className:"h-full flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center text-gray-400",children:[(0,r.jsx)(p.A,{size:36,className:"mx-auto mb-3 opacity-30"}),(0,r.jsx)("p",{className:"text-sm",children:"Hover a category to explore"})]})})})]})]})]})}},52548:(e,t,a)=>{"use strict";a.d(t,{default:()=>u});var r=a(95155),s=a(66766),l=a(6874),o=a.n(l),i=a(34540),n=a(12115),d=a(29911),c=a(28912);function u(){var e;let t=(0,i.wA)(),a=(0,i.d4)(e=>e.website_setting_zam_zam.website_data_zam_zam),{groups:l}=(0,i.d4)(e=>
1e.data),[u,m]=(0,n.useState)([]),[h,x]=(0,n.useState)([]),[g,p]=(0,n.useState)(!0);(0,n.useEffect)(()=>{let e=localStorage.getItem("footerGroups");e&&m(JSON.parse(e))},[]),(0,n.useEffect)(()=>{(null==l?void 0:l.length)>0&&(localStorage.setItem("footerGroups",JSON.stringify(l)),m(l))},[l]),(0,n.useEffect)(()=>{a||t((0,c.wf)())},[t,a]),(0,n.useEffect)(()=>{(async()=>{try{p(!0);let e=await fetch("".concat("https://backend.mustaqbalzamzam.com/api","/social_link")),t=await e.json();100===t.status_code&&t.data&&(x(t.data),localStorage.setItem("socialLinks",JSON.stringify(t.data)))}catch(t){console.error("Error fetching social links:",t);let e=localStorage.getItem("socialLinks");e&&x(JSON.parse(e))}finally{p(!1)}})()},[]);let f=(null==a?void 0:a.logo)?"".concat("https://backend.mustaqbalzamzam.com/storage/app/public","/").concat(a.logo):"/",v=e=>{let t={"fab fa-facebook-f":d.iYk,"fab fa-instagram":d.ao$,"fab fa-youtube":d.Vk6,"fab fa-linkedin-in":d.QEs,"fab fa-tiktok":d.kkU,"fab fa-twitter":d.feZ,"fab fa-x-twitter":d.feZ}[e]||d.f35;return(0,r.jsx)(t,{})},b=e=>({Facebook:"hover:text-blue-600",Instagram:"hover:text-pink-500",Youtube:"hover:text-red-500",LinkedIn:"hover:text-blue-800",Linkedin:"hover:text-blue-800",TikTok:"hover:text-black",Tiktok:"hover:text-black",Twitter:"hover:text-sky-500",X:"hover:text-sky-500"})[e]||"hover:text-gray-700",y=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:"https://".concat(e):"#";return(0,r.jsx)("footer",{className:"bg-black !text-white py-8 md:pt-12 ",children:(0,r.jsxs)("div",{className:"max-w-[98%] mx-auto px-4 sm:px-6 lg:px-8",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-8 md:gap-12",children:[(0,r.jsxs)("div",{className:"text-left col-span-2 md:col-span-1",children:[(0,r.jsx)("h5",{className:"text-lg font-semibold text-gray-900 mb-4",children:(0,r.jsx)(o(),{href:"/",className:"flex justify-center md:justify-start",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(s.default,{alt:"Zam_Zam",height:180,width:180,src:f,className:"w-40 lg:w-48"}),(0,r.jsx)("h1",{className:"text-[13px] md:text-[18px] uppercase text-white font-extrabold",children:"MustaqBal Zamzam"})]})})}),(0,r.jsx)("p",{className:"text-sm text-white text-center md:text-start mb-4 mt-2",children:"Download our app for better experience"}),(0,r.jsxs)("div",{className:"flex flex-row justify-center md:justify-start md:flex-col lg:flex-row gap-3 mt-4",children:[(0,r.jsx)(o(),{href:"https://apps.apple.com/us/app/mustaqbal-zamzam/id6761679859",target:"_blank",className:"transform hover:scale-105 transition-transform duration-200",children:(0,r.jsx)(s.default,{src:"https://ui.247dlv.com/images/app_store.svg",width:135,height:40,alt:"App Store",className:"h-20 w-auto"})}),(0,r.jsx)(o(),{href:"https://play.google.com/store/apps/details?id=com.mustaqbal.zamzam",target:"_blank",className:"transform hover:scale-105 transition-transform duration-200",children:(0,r.jsx)(s.default,{src:"https://ui.247dlv.com/images/play_store.svg",width:135,height:40,alt:"Google Play",className:"h-20 w-auto"})}),(0,r.jsx)(o(),{href:"https://apps.microsoft.com/detail/9p70q77qdzvh?hl=en-US&gl=BD",target:"_blank",className:"",children:(0,r.jsx)(s.default,{src:"https://get.microsoft.com/images/en-us%20dark.svg",width:135,height:40,alt:"Microsoft Store",className:"h-20 w-auto"})})]})]}),null===(e=(null==l?void 0:l.length)?l:u)||void 0===e?void 0:e.slice(0,4).map((e,t)=>{var a;return(0,r.jsxs)("div",{className:"text-left",children:[(0,r.jsx)("h5",{className:"text-lg font-semibold text-white border-b border-gray-300 pb-3 mb-4",children:e.name}),(0,r.jsx)("ul",{className:"space-y-2 text-sm text-white",children:null===(a=e.categories)||void 0===a?void 0:a.slice(0,6).map((e,t)=>{var a;return(0,r.jsx)("li",{className:"hover:translate-x-1 transition-transform duration-200",children:(0,r.jsxs)(o(),{href:"/items?title=".concat(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-").replace(/ & |, |\s+/g,"-"),"&cId=").concat(e.id),className:"block  py-1 transition-colors duration-200",children:["• ",e.name]})},t)})})]},t)})]}),(0,r.jsx)("hr",{className:"my-8 md:my-2 border-gray-300"}),(0,r.jsxs)("div",{className:"text-center text-xs md:text-sm text-white",children:[(0,r.jsx)("div",{className:"flex flex-row justify-center items-center gap-2 md:gap-6 mb-4",children:(0,r.jsx)(o(),{href:"/create-seller",className:"hover:underline transition-colors duration-200",children:"Become a seller"})}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row  justify-center items-center gap-3 md:gap-2 mb-6",children:[(0,r.jsxs)("div",{className:"space-x-2 flex",children:[(0,r.jsx)(o(),{href:"/termPolicy",className:"hover:underline  transition-colors duration-200",children:"Privacy policy"}),(0,r.jsx)("div",{children:"||   "}),(0,r.jsx)(o(),{href:"/terms_condition",className:"hover:underline  transition-colors duration-200",children:"Terms & condition"}),(0,r.jsx)("div",{children:"||   "}),(0,r.jsx)(o(),{href:"/refundPolicy",className:"hover:underline  transition-colors duration-200",children:"Returns & Replacements"}),(0,r.jsx)("div",{children:"||   "}),(0,r.jsx)(o(),{href:"/",className:"hover:underline  transition-colors duration-200",children:"Shipping Rates & Policies"})]}),(0,r.jsxs)("div",{className:"space-x-2 flex",children:[(0,r.jsx)("div",{children:"||   "}),(0,r.jsx)(o(),{href:"/faq",className:"hover:underline  transition-colors duration-200",children:"FAQ"}),(0,r.jsx)("div",{children:"||   "}),(0,r.jsx)(o(),{href:"/about_us",className:"hover:underline  transition-colors duration-200",children:"About Us"}),(0,r.jsx)("div",{children:"||   "}),(0,r.jsx)(o(),{href:"/contact",className:"hover:underline h transition-colors duration-200",children:"Contact"})]})]}),(0,r.jsx)("div",{className:"flex justify-center  gap-6 text-2xl text-white  border-gray-300 md:mb-0 mb-2",children:g?(0,r.jsx)("div",{className:"flex gap-6",children:[void 0,void 0,void 0,void 0].map((e,t)=>(0,r.jsx)("div",{className:"w-6 h-6 bg-gray-300 rounded-full animate-pulse"},t))}):h.length>0?h.map(e=>(0,r.jsx)(o(),{href:y(e.link),target:"_blank",rel:"noopener noreferrer",className:"transform hover:scale-110 transition-all duration-200 ".concat(b(e.media_name)),title:e.media_name,children:v(e.icon_name)},e.id)):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o(),{href:"#",className:"hover:text-pink-500 transform hover:scale-110 transition-all duration-200",children:(0,r.jsx)(d.ao$,{})}),(0,r.jsx)(o(),{href:"#",className:"hover:text-blue-600 transform hover:scale-110 transition-all duration-200",children:(0,r.jsx)(d.iYk,{})}),(0,r.jsx)(o(),{href:"#",className:"hover:text-sky-500 transform hover:scale-110 transition-all duration-200",children:(0,r.jsx)(d.feZ,{})}),(0,r.jsx)(o(),{href:"#",className:"hover:text-red-500 transform hover:scale-110 transition-all duration-200",children:(0,r.jsx)(d.Vk6,{})})]})})]})]})})}},58084:(e,t,a)=>{"use strict";a.d(t,{m:()=>s,s:()=>o});var r=a(12115);
1let s=[{code:"en-US",label:"EN"},{code:"ar-AE",label:"AR"},{code:"bn-BD",label:"BN"},{code:"hi-IN",label:"HI"}];async function l(e,t){let a=t.split("-")[0];if("en"===a)return e;try{var r;let t=await fetch("https://api.mymemory.translated.net/get?q=".concat(encodeURIComponent(e),"&langpair=").concat(a,"|en")),s=await t.json();return(null==s?void 0:null===(r=s.responseData)||void 0===r?void 0:r.translatedText)||e}catch(t){return e}}function o(e){let{onResult:t,lang:a="en-US"}=e,[s,o]=(0,r.useState)(!1),[i,n]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!0),u=(0,r.useRef)(null),m=(0,r.useRef)(t);(0,r.useEffect)(()=>{m.current=t},[t]),(0,r.useEffect)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e){c(!1);return}let t=new e;return t.continuous=!1,t.interimResults=!1,t.lang=a,t.onresult=async e=>{var t,r,s,o;let i=null===(o=e.results)||void 0===o?void 0:null===(s=o[0])||void 0===s?void 0:null===(r=s[0])||void 0===r?void 0:null===(t=r.transcript)||void 0===t?void 0:t.trim();if(!i)return;n(!0);let d=await l(i,a);n(!1),m.current(d)},t.onerror=()=>o(!1),t.onend=()=>o(!1),u.current=t,()=>{t.onresult=null,t.onerror=null,t.onend=null,t.stop()}},[a]);let h=(0,r.useCallback)(()=>{if(u.current&&!s)try{u.current.start(),o(!0)}catch(e){}},[s]),x=(0,r.useCallback)(()=>{var e;null===(e=u.current)||void 0===e||e.stop(),o(!1)},[]),g=(0,r.useCallback)(()=>{s?x():h()},[s,h,x]);return{isListening:s,isTranslating:i,isSupported:d,toggleListening:g}}},63269:(e,t,a)=>{"use strict";a.d(t,{A:()=>o,n:()=>l});var r=a(23492),s=a(74001);let l=(0,r.zD)("fetch/singleShop",async e=>{try{return await s.K.findShop(e)}catch(e){throw e}}),o=(0,r.Z0)({name:"shop",initialState:{shop:null,loading:!1,error:null},reducers:{},extraReducers:e=>{e.addCase(l.pending,e=>{e.loading=!0,e.error=null}).addCase(l.fulfilled,(e,t)=>{e.loading=!1,e.shop=t.payload}).addCase(l.rejected,(e,t)=>{e.loading=!1,e.error=t.payload,e.shop=null})}}).reducer},74001:(e,t,a)=>{"use strict";a.d(t,{K:()=>s});let r=a(23464).A.create({baseURL:"https://backend.mustaqbalzamzam.com/api",headers:{"Content-Type":"application/json"}}),s={findShop:async e=>{try{var t;let a=await r.post("/fetch/shop",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch groups")}},findOfferProduct:async e=>{let t=await r.post("/offer/product",e);return null==t?void 0:t.data}}},86878:(e,t,a)=>{"use strict";a.d(t,{v:()=>n});var r=a(12115);let s=e=>{window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)},l=e=>{s({ecommerce:null}),s(e)};var o=a(59576);let i="",n=()=>{var e,t,a,n,d,c;let{user:u}=(0,o.A)(),[m,h]=(0,r.useState)(i);(0,r.useEffect)(()=>{if(i){h(i);return}let e=sessionStorage.getItem("user_ip");if(e){i=e,h(e);return}fetch("https://api.ipify.org?format=json").then(e=>e.json()).then(e=>{(null==e?void 0:e.ip)&&(i=e.ip,sessionStorage.setItem("user_ip",e.ip),h(e.ip))}).catch(()=>{})},[]);let x=navigator.userAgent,g={email_address:null!==(a=null==u?void 0:u.email)&&void 0!==a?a:"",phone_number:null!==(n=null==u?void 0:u.phone)&&void 0!==n?n:"",first_name:null!==(d=null==u?void 0:null===(e=u.name)||void 0===e?void 0:e.split(" ")[0])&&void 0!==d?d:"",last_name:null!==(c=null==u?void 0:null===(t=u.name)||void 0===t?void 0:t.split(" ").slice(1).join(" "))&&void 0!==c?c:"",country:"",city:"",postal_code:"",user_ip:m,user_agent:x};return{userIp:m,userAgent:x,trackPageView:e=>{s({event:"page_view",page_path:e})},trackViewItem:(e,t)=>{var a,r;l({event:"view_item",ecommerce:{currency:"AED",value:null!=t?t:0,items:[{item_id:String(e.id),item_name:e.name,item_category:null!==(a=e.category)&&void 0!==a?a:"",price:null!==(r=e.price)&&void 0!==r?r:0,quantity:1}]}})},trackAddToCart:function(e){var t,a,r;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;l({event:"add_to_cart",user_data:g,ecommerce:{currency:"AED",value:(null!==(t=e.price)&&void 0!==t?t:0)*s,items:[{item_id:String(e.id),item_name:e.name,item_category:null!==(a=e.category)&&void 0!==a?a:"",price:null!==(r=e.price)&&void 0!==r?r:0,quantity:s}]}})},trackRemoveFromCart:function(e){var t,a,r;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;l({event:"remove_from_cart",ecommerce:{currency:"AED",value:(null!==(t=e.price)&&void 0!==t?t:0)*s,items:[{item_id:String(e.id),item_name:e.name,item_category:null!==(a=e.category)&&void 0!==a?a:"",price:null!==(r=e.price)&&void 0!==r?r:0,quantity:s}]}})},trackBeginCheckout:e=>{l({event:"begin_checkout",user_data:g,ecommerce:{currency:"AED",value:e.reduce((e,t)=>
1{var a;let{product:r,quantity:s}=t;return e+(null!==(a=r.price)&&void 0!==a?a:0)*s},0),items:e.map(e=>{var t,a;let{product:r,quantity:s}=e;return{item_id:String(r.id),item_name:r.name,item_category:null!==(t=r.category)&&void 0!==t?t:"",price:null!==(a=r.price)&&void 0!==a?a:0,quantity:s}})}})},trackPurchase:e=>{var t,a,r,s,o,i,n,d,c,u,m,h,x;let p=e.items.reduce((e,t)=>{var a;let{product:r,quantity:s}=t;return e+(null!==(a=r.price)&&void 0!==a?a:0)*s},0)+(e.tax||0)+(e.shipping||0);l({event:"purchase",user_data:{email_address:(null===(t=e.userData)||void 0===t?void 0:t.email_address)||g.email_address,phone_number:(null===(a=e.userData)||void 0===a?void 0:a.phone_number)||g.phone_number,first_name:(null===(r=e.userData)||void 0===r?void 0:r.first_name)||g.first_name,last_name:(null===(s=e.userData)||void 0===s?void 0:s.last_name)||g.last_name,country:null!==(u=null===(o=e.userData)||void 0===o?void 0:o.country)&&void 0!==u?u:"",city:null!==(m=null===(i=e.userData)||void 0===i?void 0:i.city)&&void 0!==m?m:"",postal_code:null!==(h=null===(n=e.userData)||void 0===n?void 0:n.postal_code)&&void 0!==h?h:"",user_ip:(null===(d=e.userData)||void 0===d?void 0:d.user_ip)||g.user_ip,user_agent:(null===(c=e.userData)||void 0===c?void 0:c.user_agent)||g.user_agent},ecommerce:{transaction_id:e.transactionId,currency:"AED",value:p,tax:e.tax||0,shipping:e.shipping||0,coupon:null!==(x=e.coupon)&&void 0!==x?x:"",items:e.items.map(e=>{var t,a;let{product:r,quantity:s}=e;return{item_id:String(r.id),item_name:r.name,item_category:null!==(t=r.category)&&void 0!==t?t:"",price:null!==(a=r.price)&&void 0!==a?a:0,quantity:s}})}})},trackViewItemList:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Product List";l({event:"view_item_list",user_data:g,ecommerce:{item_list_name:t,items:e.map((e,t)=>{var a,r;return{item_id:String(e.id),item_name:e.name,item_category:null!==(a=e.category)&&void 0!==a?a:"",price:null!==(r=e.price)&&void 0!==r?r:0,index:t}})}})},trackSelectItem:function(e){var t,a;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Product List",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;l({event:"select_item",user_data:g,ecommerce:{item_list_name:r,items:[{item_id:String(e.id),item_name:e.name,item_category:null!==(t=e.category)&&void 0!==t?t:"",price:null!==(a=e.price)&&void 0!==a?a:0,index:s}]}})},trackProfileView:()=>{s({event:"profile_view",page_type:"profile",user_data:g})},trackEditProfileOpen:()=>{s({event:"profile_edit_open",user_data:g})},trackProfileUpdate:e=>{var t,a,r,l,o,i,n;s({event:"profile_update",user_data:{email_address:null!==(r=e.email)&&void 0!==r?r:g.email_address,phone_number:null!==(l=e.phone)&&void 0!==l?l:g.phone_number,first_name:null!==(o=null===(t=e.name)||void 0===t?void 0:t.split(" ")[0])&&void 0!==o?o:g.first_name,last_name:null!==(i=null===(a=e.name)||void 0===a?void 0:a.split(" ").slice(1).join(" "))&&void 0!==i?i:g.last_name,country:"",city:"",postal_code:"",address:null!==(n=e.address)&&void 0!==n?n:"",user_ip:g.user_ip,user_agent:g.user_agent}})},trackPasswordChangeOpen:()=>{s({event:"password_change_open",user_data:g})},trackPasswordChangeSuccess:()=>{s({event:"password_change_success",user_data:g})}}}},90096:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var r=a(95155),s=a(12115),l=a(63554),o=a(59576);function i(){let{user:e,isAuthenticated:t}=(0,o.A)();return(0,s.useEffect)(()=>{if(!t||!e)return;let a=()=>{if(window.Tawk_API&&"function"==typeof window.Tawk_API.setAttributes){var t,a,r;window.Tawk_API.setAttributes({name:null!==(t=e.name)&&void 0!==t?t:"",email:null!==(a=e.email)&&void 0!==a?a:"",phone:null!==(r=e.phone)&&void 0!==r?r:""},e=>{e&&console.error("Tawk setAttributes error:",e)})}};if(window.Tawk_API&&"function"==typeof window.Tawk_API.setAttributes){a();return}window.Tawk_API=window.Tawk_API||{};let r=window.Tawk_API.onLoad;window.Tawk_API.onLoad=function(){null==r||r(),a()}},[e,t]),(0,r.jsx)(l.default,{id:"tawk-to",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n          var Tawk_API = Tawk_API || {}, Tawk_LoadStart = new Date();\n          (function(){\n            var s1=document.createElement(\"script\"),s0=document.getElementsByTagName(\"script\")[0];\n            s1.async=true;\n            s1.src='https://embed.tawk.to/699d4e166516101c346b7a79/1ji77i21u';\n            s1.charset='UTF-8';\n            s1.setAttribute('crossorigin','*');\n            s0.parentNode.insertBefore(s1,s0);\n          })();\n        "}})}},91054:(e,t,a)=>{"use strict";a.d(t,{A:()=>
1o,U:()=>l});let r=a(23464).A.create({baseURL:"https://backend.mustaqbalzamzam.com/api"}),s=null,l=e=>{s=e};r.interceptors.request.use(e=>{let t=localStorage.getItem("token");return t&&(e.headers.Authorization="Bearer ".concat(t)),e}),r.interceptors.response.use(e=>e,e=>{var t;return(null===(t=e.response)||void 0===t?void 0:t.status)===401&&(localStorage.clear(),(null==s?void 0:s.logout)&&s.logout(),window.location.href="/"),Promise.reject(e)});let o=r},91143:(e,t,a)=>{"use strict";a.d(t,{K:()=>l});var r=a(91054);let s=async e=>{if(!e||0===e.length)return;let t=[];if(e.forEach(e=>{var a;null===(a=e.products)||void 0===a||a.forEach(e=>{(null==e?void 0:e.id)&&(!e.variants||0===e.variants.length)&&!t.includes(e.id)&&t.push(e.id)})}),0!==t.length)try{var a,s,l;let o=await r.A.post("/product/list",{product_ids:t,per_page:Math.max(50,t.length)}),i=(null==o?void 0:null===(s=o.data)||void 0===s?void 0:null===(a=s.data)||void 0===a?void 0:a.data)||(null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.data)||[],n=new Map;i.forEach(e=>{var t,a,r;let s=e.variants||[],l=null===(t=e.product_detail)||void 0===t?void 0:t.sale_price,o=null===(a=e.product_detail)||void 0===a?void 0:a.regular_price;if(s.length>0){let e=s.filter(e=>null!=e.sale_price&&Number(e.sale_price)>0),t=(e.length>0?e:s).reduce((e,t)=>Number(t.sale_price)<Number(e.sale_price)?t:e);(null==t?void 0:t.sale_price)!=null&&(l=t.sale_price,o=null!==(r=t.regular_price)&&void 0!==r?r:o)}n.set(e.id,{sale_price:l,regular_price:o,variants:s})}),e.forEach(e=>{e.products&&(e.products=e.products.map(e=>{let t=n.get(e.id);if(t){var a,r;return{...e,sale_price:null!==(a=t.sale_price)&&void 0!==a?a:e.sale_price,regular_price:null!==(r=t.regular_price)&&void 0!==r?r:e.regular_price,variants:t.variants}}return e}))})}catch(e){console.error("Batch enriching reel products failed:",e)}},l={getGroups:async()=>{try{return(await r.A.get("/group/list")).data.data}catch(e){throw console.error(e),Error("Failed to fetch groups")}},getSearchList:async e=>{try{var t;let a=await r.A.post("/get/search",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch groups")}},getCategories:async()=>{try{return(await r.A.get("/category/list")).data.data}catch(e){throw console.error(e),Error("Failed to fetch categories")}},getProducts:async e=>{try{var t;let a=await r.A.post("/product/list",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch products")}},getRelatedProducts:async e=>{try{var t;let a=await r.A.post("/product/list",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch getRelatedProducts")}},getTopViewProducts:async e=>{try{var t;let a=await r.A.post("/top-view-products",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch top view products")}},getComboList:async()=>{try{var e,t;let a=await r.A.post("/combo/list");return null!==(t=null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.data)&&void 0!==t?t:[]}catch(e){throw console.error(e),Error("Failed to fetch combo list")}},getSliders:async()=>{try{return(await r.A.get("/get/sliders")).data.data}catch(e){throw console.error(e),Error("Failed to fetch products")}},getBrands:async()=>{try{return(await r.A.post("/get/brands")).data.data}catch(e){throw console.error(e),Error("Failed to fetch Brands")}},getShops:async e=>{try{return(await r.A.post("/get/shops",e)).data.data}catch(e){throw console.error(e),Error("Failed to fetch shops")}},findGroup:async e=>{try{var t;let a=await r.A.get("/group/".concat(e));return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},getReels:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;try{var a;let l=await r.A.get("/reels",{params:{page:e,per_page:t}}),o=null==l?void 0:null===(a=l.data)||void 0===a?void 0:a.data;return(null==o?void 0:o.data)&&Array.isArray(o.data)&&await s(o.data),o}catch(e){throw console.error(e),Error("Failed to fetch reels")}
1},getReel:async e=>{try{var t;let a=await r.A.get("/reels/".concat(e)),l=null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data;return l&&await s([l]),l}catch(e){throw console.error(e),Error("Failed to fetch reel")}},recordReelView:async e=>{try{await r.A.post("/reels/".concat(e,"/view"))}catch(e){console.error(e)}},likeReel:async(e,t)=>{try{var a;let s=await r.A.post("/reels/".concat(e,"/like"),{user_id:t});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to like reel")}},getReelComments:async e=>{try{var t,a;let s=await r.A.get("/reels/".concat(e,"/comments"));return null!==(a=null==s?void 0:null===(t=s.data)||void 0===t?void 0:t.data)&&void 0!==a?a:{comments:[],comments_count:0}}catch(e){return console.error(e),{comments:[],comments_count:0}}},postReelComment:async(e,t,a,s)=>{try{var l;let o=await r.A.post("/reels/".concat(e,"/comments"),{comment:t,user_name:null==a?void 0:a.user_name,user_id:null==a?void 0:a.user_id,user_avatar:null==a?void 0:a.user_avatar,parent_id:null!=s?s:void 0});return null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.data}catch(e){throw console.error(e),Error("Failed to post comment")}},getVideoProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"is_reel",order_by:"sort_by",sort_by:"asc"},{timeout:1e4});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch video products")}},getFeatureProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"6",order_by:"sort_by",sort_by:"asc"});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},getForYouProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"1",order_by:"sort_by",sort_by:"asc"});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},getPopularProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"2",order_by:"sort_by",sort_by:"asc"});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},getNewArrivalProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"4",order_by:"sort_by",sort_by:"asc"});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},getTrendingProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"5",order_by:"sort_by",sort_by:"asc"});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},getTopSaleProducts:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;arguments.length>2&&arguments[2];try{var a;let s=await r.A.post("feature/product",{page:e,per_page:t,type:"7",order_by:"sort_by",sort_by:"asc"});return null==s?void 0:null===(a=s.data)||void 0===a?void 0:a.data}catch(e){throw console.error(e),Error("Failed to fetch top sale products")}},getOffers:async()=>{try{return(await r.A.post("/get/offers")).data.data}catch(e){throw console.error(e),Error("Failed to fetch Offers")}},getGroupShops:async(e,t,a)=>{try{var s;let l=await r.A.post("/get-group-shop",{id:e,lat:t,lng:a});return null==l?void 0:null===(s=l.data)||void 0===s?void 0:s.data}catch(e){throw console.error(e),Error("Failed to fetch group shops")}},findSingleProduct:async e=>{try{var t;let a=await r.A.post("single/product",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch feature product")}},storeOrder:async e=>{try{var t;let a=await r.A.post("/order/placed",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch products")}},getWebsiteSetting:async()=>{try{var e;let t=await r.A.get("web_settings");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){throw console.error(e),Error("Failed to fetch products")}},getFaq:async()=>{try{var e;let t=await r.A.post("get_faq");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){throw console.error(e),Error("Failed to fetch products")}},getCountries:async()=>{try{var e;let t=await r.A.get("get_countries");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){throw console.error(e),Error("Failed to fetch products")}},privacy_policy:async()=>{try{var e;let t=await r.A.post("/pages?slug=privacy_policy");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){console.log(e)}},refund_policy:async()=>{try{var e;let t=await r.A.post("/pages?slug=refund_policy");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){console.log(e)}},terms_service:async()=>{try{var e;let t=await r.A.post("/pages?slug=terms_service");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){console.log(e)}},about_us:async()=>{try{var e;let t=await r.A.post("/pages?slug=about_us");return null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.data}catch(e){console.log(e)}},storeSeller:async e=>{try{var t;let a=await r.A.post("/vendor/registration",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to fetch groups")}},monitorProduct:async e=>{try{var t;let a=await r.A.post("/monitoring-product",e);return null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.data}catch(e){throw console.error(e),Error("Failed to monitor product")}}}},95475:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var r=a(95155),s=a(6874),l=a.n(s);a(12115);let o=()=>{let e=new Date().getFullYear();return(0,r.jsx)("footer",{className:"bg-black text-white mb-16 md:mb-0 ",children:(0,r.jsx)("div",{className:"container mx-auto px-4 pb-6",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row justify-evenly items-center gap-2 md:gap-4",children:[(0,r.jsx)("div",{className:"text-center ml-5 md:text-left",children:(0,r.jsxs)("p",{className:"text-xs md:text-base text-gray-300",children:["\xa9",e," Mu
1staqbal Zamzam | All Rights Reserved."]})}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("p",{className:"text-sm md:text-base text-gray-300",children:"Developed by"}),(0,r.jsx)(l(),{href:"https://www.sbit.com.bd/",target:"_blank",className:"text-yellow-400 font-semibold text-sm md:text-base",children:"SKILL BASED IT - SBIT"})]})]})})})}},99264:(e,t,a)=>{"use strict";a.d(t,{default:()=>P});var r=a(95155),s=a(6874),l=a.n(s),o=a(29911),i=a(13568),n=a(58084),d=a(48411),c=a(66766),u=a(44838),m=a(20710),h=a(92610),x=a(7509),g=a(59576),p=a(12115),f=a(36568),v=a(34540),b=a(99797),y=a(35695),j=a(53173),w=a(28912),N=a(64315),_=a(66474),k=a(13052),S=a(5522);let C=()=>{let[e,t]=(0,p.useState)([]);(0,p.useEffect)(()=>{let e=localStorage.getItem("search-history");e&&t(JSON.parse(e).slice(0,5))},[]);let a=(0,p.useCallback)(a=>{if(!a.trim())return;let r=[a,...e.filter(e=>e!==a)].slice(0,5);t(r),localStorage.setItem("search-history",JSON.stringify(r))},[e]);return{history:e,addToHistory:a,clearHistory:(0,p.useCallback)(()=>{t([]),localStorage.removeItem("search-history")},[])}},A=e=>{let t=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-+/g,"-").replace(/ & |, |\s+/g,"-");return"/details?title=".concat(t,"&pId=").concat(e.id,"&slug=").concat(e.slug)};function P(){var e;let{isAuthenticated:t,logout:a}=(0,g.A)(),[s,P]=(0,p.useState)(!1),[z,E]=(0,p.useState)(""),[F,D]=(0,p.useState)(!1),[I,L]=(0,p.useState)(null),[T,H]=(0,p.useState)("en-US");(0,p.useEffect)(()=>{let e=localStorage.getItem("voice-search-lang");e&&n.m.some(t=>t.code===e)&&H(e)},[]),(0,p.useEffect)(()=>{(async()=>{try{let e=await fetch("".concat("https://backend.mustaqbalzamzam.com/api","/monitoring-totals")),t=await e.json();100===t.status_code&&t.data&&L(t.data.total_view)}catch(e){console.error("Error fetching visitor data:",e)}})()},[]);let{settings:q}=(0,j.v)(),R=(0,v.wA)(),{search_list:O,loading:U}=(0,v.d4)(e=>e.search),K=(0,v.d4)(e=>e.website_setting_zam_zam.website_data_zam_zam),B=(0,y.useRouter)(),M=(0,y.usePathname)(),V=(0,p.useRef)(null),Y=(0,p.useRef)(null),Z=(0,p.useRef)(null),J=(0,p.useRef)(null),[G,W]=(0,p.useState)(!1),{cartOpen:Q}=(0,g.A)(),X=function(e,t){let[a,r]=(0,p.useState)(e);return(0,p.useEffect)(()=>{let t=setTimeout(()=>r(e),300);return()=>clearTimeout(t)},[e,300]),a}(z,300),{history:$,addToHistory:ee,clearHistory:et}=C(),ea=["Smartphones","Laptops","Headphones","Cameras","Gaming"];(0,p.useEffect)(()=>{let e=()=>W(window.scrollY>100);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,p.useEffect)(()=>{let e=()=>P(!0);return window.addEventListener("open-login-modal",e),()=>window.removeEventListener("open-login-modal",e)},[]),(0,p.useEffect)(()=>{"/search"!==M&&(E(""),R((0,b.iP)()))},[M,R]),(0,p.useEffect)(()=>{X.trim().length>0?R((0,b.dA)({text:X,country:null})):R((0,b.iP)())},[X,R]);let er=e=>{let t=e||z;t.trim()&&(ee(t),D(!1),J.current&&J.current.blur(),B.push("/search?q=".concat(encodeURIComponent(t))))},es=()=>{E(""),R((0,b.iP)()),J.current&&J.current.focus()},el=e=>{E(e),er(e)},{isListening:eo,isTranslating:ei,isSupported:en,toggleListening:ed}=(0,n.s)({onResult:e=>el(e),lang:T}),ec=()=>{if(!en){i.oR.error("Voice search is not supported in this browser");return}D(!0),ed()},eu=e=>{B.push(e),Z.current&&Z.current.click()};(0,p.useEffect)(()=>{K||R((0,w.wf)())},[R,K]);let em=()=>{a(),Z.current&&Z.current.click()};(0,p.useEffect)(()=>{let e=e=>{var t,a;let r=null===(t=V.current)||void 0===t?void 0:t.contains(e.target),s=null===(a=Y.current)||void 0===a?void 0:a.contains(e.target);r||s||D(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let eh=(0,p.useCallback)(e=>{D(!1),R((0,b.iP)()),B.push(A(e))},[B,R]),ex=F&&z.length>0&&O&&O.length>0,eg=F&&z.length>0&&O&&0===O.length&&!U,ep=F&&0===z.length&&$.length>0,ef=F&&0===z.length,ev=(null==K?void 0:K.logo)?"".concat("https://backend.mustaqbalzamzam.com/storage/app/public","/").concat(K.logo):"/logo.png",eb=()=>(0,r.jsx)(r.Fragment,{children:F&&(0,r.jsxs)("div",{className:"absolute mt-2 w-full bg-white rounded-xl border border-gray-100 max-h-[400px] overflow-y-auto z-[1000] shadow-2xl",children:[U&&(0,r.jsxs)("div",{className:"p-4 text-center",children:[(0,r.jsx)("div",{className:"inline-block animate-spin rounded-full h-5 w-5 border-b-2 border-yellow-600"}),(0,r.jsx)("p",{className:"text-gray-400 mt-2 text-sm",children:"Searching..."})]}),ex&&(0,r.jsx)("div",{className:"divide-y divide-gray-100",children:O.map((e,t)=>{var a,s,l,i,n,d,c,u;return(0,r.jsxs)("div",{onMouseDown:t=>{t.preventDefault(),eh(e)},className:"flex items-center gap-3 p-3 hover:bg-yellow-50 transition-all group cursor-pointer",children:[(0,r.jsx)("div",{className:"shrink-0 w-12 h-12 rounded-lg overflow-hidden border border-gray-100 bg-gray-50",children:(0,r.jsx)(S.A,{product:null===(s=e.product_images)||void 0===s?void 0:null===(a=s[0])||void 0===a?void 0:a.path,width:48,height:48,className:"w-full h-full object-cover",alt:e.name})}),(0,r.jsxs)("div",{className:"flex-grow min-w-0",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start gap-2",children:[(0,r.jsx)("h4",{className:"text-sm font-medium text-gray-900 group-hover:text-yellow-700 truncate",children:e.name}),(0,r.jsx)("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-yellow-100 text-yellow-800 font-medium shrink-0",children:e.category_name})]}),e.brand_name&&(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-0.5",children:e.brand_name}),(null!==(c=null===(i=e.variants)||void 0===i?void 0:null===(l=i[0])||void 0===l?void 0:l.sale_price)&&void 0!==c?c:e.sale_price)&&(0,r.jsxs)("p",{className:"text-sm font-semibold text-yellow-600 mt-1",children:["AED ",(null!==(u=null===(d=e.variants)||void 0===d?void 0:null===(n=d[0])||void 0===n?void 0:n.sale_price)&&void 0!==u?u:e.s
1ale_price).toLocaleString()]})]}),(0,r.jsx)(o.FDZ,{className:"text-gray-300 group-hover:text-yellow-600 text-sm shrink-0"})]},t)})}),eg&&(0,r.jsxs)("div",{className:"p-6 text-center",children:[(0,r.jsx)("p",{className:"text-2xl mb-2",children:"\uD83D\uDD0D"}),(0,r.jsx)("p",{className:"text-gray-600 text-sm font-medium",children:"No products found"}),(0,r.jsx)("p",{className:"text-gray-400 text-xs mt-1",children:"Try different keywords"})]}),ep&&(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsxs)("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider flex items-center gap-1.5",children:[(0,r.jsx)(o.w_X,{className:"text-yellow-600"})," Recent"]}),(0,r.jsx)("button",{onClick:et,className:"text-xs text-gray-400 hover:text-red-500",children:"Clear"})]}),$.map((e,t)=>(0,r.jsxs)("button",{onClick:()=>el(e),className:"w-full text-left px-3 py-2 hover:bg-yellow-50 rounded-lg flex items-center gap-3 text-sm text-gray-700",children:[(0,r.jsx)(o.w_X,{className:"text-gray-300 text-xs"})," ",e]},t))]}),ef&&(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsxs)("h3",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wider flex items-center gap-1.5 mb-3",children:[(0,r.jsx)(o.Itl,{className:"text-yellow-600"})," Trending"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:ea.map((e,t)=>(0,r.jsx)("button",{onClick:()=>el(e),className:"px-3 py-1.5 bg-yellow-50 text-yellow-800 rounded-lg text-xs font-medium hover:bg-yellow-100 border border-yellow-200 transition-colors",children:e},t))})]})]})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("nav",{className:"w-full hidden lg:block bg-[#0a0a0a] border-b border-white/[0.06] relative z-[100]",children:[(0,r.jsxs)("div",{className:"container mx-auto px-6 h-[60px] flex items-center justify-between gap-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)(l(),{href:"/",className:"flex items-center gap-2.5 shrink-0 group",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute -inset-1 bg-yellow-500/20 rounded-full blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),(0,r.jsx)(c.default,{alt:"Logo",height:68,width:68,src:ev,className:"relative rounded-md object-contain"})]}),(0,r.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("p",{className:"text-[16px] uppercase text-yellow-500/70 font-semibold leading-none",children:(null==q?void 0:q.title)||"MustaqBal"}),(0,r.jsx)("div",{className:"w-9 h-6 rounded-sm overflow-hidden border-white/20 shadow-md",children:(0,r.jsx)("img",{src:"/uae_flag_wave.gif",alt:"UAE",className:"w-full h-full object-cover"})})]}),(0,r.jsx)("p",{className:"text-[18px] font-black uppercase text-white tracking-widest leading-tight",children:"ZamZam"})]})]}),null!==I&&(0,r.jsxs)("div",{className:"hidden lg:flex items-center gap-2 ml-5 px-3 py-2 rounded-full bg-red-600/10 border border-red-500 backdrop-blur-sm",children:[(0,r.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-75"}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-red-500"})]}),(0,r.jsx)("span",{className:"text-[11px] font-bold text-red-400 uppercase tracking-widest",children:"LIVE"}),(0,r.jsx)("span",{className:"text-[13px] font-bold text-white",children:parseInt(I).toLocaleString()})]})]}),(0,r.jsxs)("div",{className:"relative flex-1 min-w-0",ref:V,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-white/[0.06] border !rounded-4xl px-4 py-2.5 transition-all duration-200 ".concat(F?"border-yellow-500/60 bg-white/[0.09]":"border-yellow-500/60 hover:border-white/20"),children:[(0,r.jsx)(o.KSO,{className:"text-yellow-500/70 text-sm shrink-0"}),(0,r.jsx)("input",{ref:J,value:z,onChange:e=>E(e.target.value),onFocus:()=>D(!0),onKeyDown:e=>{"Enter"===e.key&&er()},type:"text",placeholder:"Search products",className:"flex-1 bg-transparent text-sm text-white placeholder-white focus:outline-none"}),z&&(0,r.jsx)("button",{onClick:es,className:"text-white/30 hover:text-white/70 transition-colors",children:(0,r.jsx)(o.QCr,{className:"text-xs"})}),(0,r.jsx)("button",{type:"button",onClick:ec,"aria-label":"Search by voice",title:"Search by voice",className:"shrink-0 transition-colors ".concat(eo?"text-red-500 animate-pulse":ei?"text-yellow-400 animate-pulse":"text-yellow-500/70 hover:text-yellow-400"),children:(0,r.jsx)(o.i0t,{className:"text-sm"})})]}),(0,r.jsx)(eb,{})]}),(0,r.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,r.jsxs)(l(),{href:"/all-offers",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-white/60 hover:text-white hover:bg-white/[0.07] transition-all duration-200 group",children:[(0,r.jsx)(o.Wp,{className:"text-red-500 text-[16px] group-hover:scale-110 transition-transform duration-200 shrink-0"}),(0,r.jsx)("span",{className:"text-[17px] font-medium",children:"Offers"})]}),(0,r.jsxs)(l(),{href:"/compare",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-white/60 hover:text-white hover:bg-white/[0.07] transition-all duration-200 group",children:[(0,r.jsx)(N.Ujd,{className:"text-red-500 text-sm group-hover:scale-110 transition-transform duration-200 shrink-0"}),(0,r.jsx)("span",{className:"text-[17px] font-medium",children:"Compare"})]}),(0,r.jsx)("div",{className:"w-px h-5 bg-white/10 mx-2"}),t?(0,r.jsxs)(u.rI,{children:[(0,r.jsxs)(u.ty,{ref:Z,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-white/60 hover:text-white hover:bg-white/[0.07] transition-all duration-200 focus:outline-none group",children:[(0,r.jsx)(m.UdD,{className:"text-[18px] text-red-500 shrink-0"}),(0,r.jsx)("span",{className:"text-[17px] font-medium",children:"Account"}),(0,r.jsx)(_.A,{className:"h-3 w-3 text-white/30 group-data-[state=open]:rotate-180 transition-transform duration-200"})]}),(0,r.jsxs)(u.SQ,{align:"end",sideOffset:10,className:"z-[9999] w-56 border border-gray-100 shadow-2xl bg-white rounded-xl overflow-hidden p-1",children:[(0,r.jsx)("div",{className:"h-0.5 bg-gradient-to-r from-yellow-400 to-orange-500 -mx-1 mb-1"}),(0,r.jsx)(u.lp,{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2",children:"My A
1ccount"}),(0,r.jsxs)(u._2,{onClick:()=>eu("/profile"),className:"group/item flex items-center gap-3 px-3 py-2.5 cursor-pointer rounded-lg hover:bg-yellow-50 transition-colors",children:[(0,r.jsx)("div",{className:"p-1.5 rounded-lg bg-orange-100",children:(0,r.jsx)(m.UdD,{className:"text-base text-orange-600"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:"Profile"}),(0,r.jsx)("p",{className:"text-[11px] text-gray-400",children:"View & edit profile"})]}),(0,r.jsx)(k.A,{className:"h-3.5 w-3.5 text-gray-300 group-hover/item:text-orange-500 transition-colors"})]}),(0,r.jsxs)(u._2,{onClick:()=>eu("/order"),className:"group/item flex items-center gap-3 px-3 py-2.5 cursor-pointer rounded-lg hover:bg-blue-50 transition-colors",children:[(0,r.jsx)("div",{className:"p-1.5 rounded-lg bg-blue-100",children:(0,r.jsx)(x.Oq0,{className:"text-base text-blue-600"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:"My Orders"}),(0,r.jsx)("p",{className:"text-[11px] text-gray-400",children:"Track purchases"})]}),(0,r.jsx)(k.A,{className:"h-3.5 w-3.5 text-gray-300 group-hover/item:text-blue-500 transition-colors"})]}),(0,r.jsx)("div",{className:"h-px bg-gray-100 my-1"}),(0,r.jsxs)(u._2,{onClick:em,className:"group/item flex items-center gap-3 px-3 py-2.5 cursor-pointer rounded-lg hover:bg-red-50 transition-colors",children:[(0,r.jsx)("div",{className:"p-1.5 rounded-lg bg-red-100",children:(0,r.jsx)(h.QUU,{className:"text-base text-red-600"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:"Logout"}),(0,r.jsx)("p",{className:"text-[11px] text-gray-400",children:"Sign out"})]}),(0,r.jsx)(k.A,{className:"h-3.5 w-3.5 text-gray-300 group-hover/item:text-red-500 transition-colors"})]})]})]}):(0,r.jsxs)("button",{onClick:()=>P(!0),className:"flex items-center gap-1.5 px-4 py-1.5 rounded-lg bg-yellow-500 hover:bg-yellow-400 text-black font-semibold text-[17px] transition-all duration-200 hover:shadow-lg hover:shadow-yellow-500/25 active:scale-95",children:[(0,r.jsx)(m.UdD,{className:"text-base"}),"Login"]}),(0,r.jsx)("div",{className:"relative cursor-pointer ml-1",children:(0,r.jsx)(d.A,{sticky:!0})})]})]}),(0,r.jsx)("div",{className:"fixed z-50 right-1 bottom-40 rotate-90 transition-all duration-300 hidden lg:block ".concat(G&&!Q?"opacity-100 translate-y-0":"opacity-0 translate-y-4 pointer-events-none"),children:(0,r.jsx)(d.A,{format:!0})})]}),(0,r.jsxs)("nav",{className:"w-full hidden md:block lg:hidden bg-[#0a0a0a] border-b border-white/[0.06] relative z-[100]",children:[(0,r.jsxs)("div",{className:"container mx-auto px-4 h-[56px] flex items-center justify-between gap-3",children:[(0,r.jsxs)(l(),{href:"/",className:"flex items-center gap-2 shrink-0 group",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute -inset-1 bg-yellow-500/20 rounded-full blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),(0,r.jsx)(c.default,{alt:"Logo",height:44,width:44,src:ev,className:"relative rounded-md object-contain"})]}),(0,r.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("p",{className:"text-[13px] uppercase text-yellow-500/70 font-semibold leading-none",children:(null==q?void 0:q.title)||"MustaqBal"}),(0,r.jsx)("div",{className:"w-7 h-5 rounded-sm overflow-hidden border border-white/20 shadow-sm",children:(0,r.jsx)("img",{src:"/uae_flag_wave.gif",alt:"UAE",className:"w-full h-full object-cover"})})]}),(0,r.jsx)("p",{className:"text-[15px] font-black uppercase text-white tracking-widest leading-tight",children:"ZamZam"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[null!==I&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-full bg-red-600/10 border border-red-500",children:[(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-75"}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-red-500"})]}),(0,r.jsx)("span",{className:"text-[10px] font-bold text-red-400 uppercase tracking-widest",children:"LIVE"}),(0,r.jsx)("span",{className:"text-[12px] font-bold text-white",children:parseInt(I).toLocaleStr
1ing()})]}),(0,r.jsx)("div",{className:"w-px h-5 bg-white/10 mx-1"}),(0,r.jsx)(l(),{href:"/all-offers",className:"p-2 rounded-lg text-white/60 hover:text-white hover:bg-white/[0.07] transition-all group",title:"Offers",children:(0,r.jsx)(o.Wp,{className:"text-red-500 text-[17px] group-hover:scale-110 transition-transform"})}),(0,r.jsx)(l(),{href:"/compare",className:"p-2 rounded-lg text-white/60 hover:text-white hover:bg-white/[0.07] transition-all group",title:"Compare",children:(0,r.jsx)(N.Ujd,{className:"text-red-500 text-[16px] group-hover:scale-110 transition-transform"})}),(0,r.jsx)("div",{className:"w-px h-5 bg-white/10 mx-1"}),t?(0,r.jsxs)(u.rI,{children:[(0,r.jsx)(u.ty,{ref:Z,className:"p-2 rounded-lg text-white/60 hover:text-white hover:bg-white/[0.07] transition-all focus:outline-none",title:"Account",children:(0,r.jsx)(m.UdD,{className:"text-[20px] text-red-500"})}),(0,r.jsxs)(u.SQ,{align:"end",sideOffset:10,className:"z-[9999] w-56 border border-gray-100 shadow-2xl bg-white rounded-xl overflow-hidden p-1",children:[(0,r.jsx)("div",{className:"h-0.5 bg-gradient-to-r from-yellow-400 to-orange-500 -mx-1 mb-1"}),(0,r.jsx)(u.lp,{className:"text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2",children:"My Account"}),(0,r.jsxs)(u._2,{onClick:()=>eu("/profile"),className:"group/item flex items-center gap-3 px-3 py-2.5 cursor-pointer rounded-lg hover:bg-yellow-50 transition-colors",children:[(0,r.jsx)("div",{className:"p-1.5 rounded-lg bg-orange-100",children:(0,r.jsx)(m.UdD,{className:"text-base text-orange-600"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:"Profile"}),(0,r.jsx)("p",{className:"text-[11px] text-gray-400",children:"View & edit profile"})]}),(0,r.jsx)(k.A,{className:"h-3.5 w-3.5 text-gray-300 group-hover/item:text-orange-500 transition-colors"})]}),(0,r.jsxs)(u._2,{onClick:()=>eu("/order"),className:"group/item flex items-center gap-3 px-3 py-2.5 cursor-pointer rounded-lg hover:bg-blue-50 transition-colors",children:[(0,r.jsx)("div",{className:"p-1.5 rounded-lg bg-blue-100",children:(0,r.jsx)(x.Oq0,{className:"text-base text-blue-600"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:"My Orders"}),(0,r.jsx)("p",{className:"text-[11px] text-gray-400",children:"Track purchases"})]}),(0,r.jsx)(k.A,{className:"h-3.5 w-3.5 text-gray-300 group-hover/item:text-blue-500 transition-colors"})]}),(0,r.jsx)("div",{className:"h-px bg-gray-100 my-1"}),(0,r.jsxs)(u._2,{onClick:em,className:"group/item flex items-center gap-3 px-3 py-2.5 cursor-pointer rounded-lg hover:bg-red-50 transition-colors",children:[(0,r.jsx)("div",{className:"p-1.5 rounded-lg bg-red-100",children:(0,r.jsx)(h.QUU,{className:"text-base text-red-600"})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-gray-800",children:"Logout"}),(0,r.jsx)("p",{className:"text-[11px] text-gray-400",children:"Sign out"})]}),(0,r.jsx)(k.A,{className:"h-3.5 w-3.5 text-gray-300 group-hover/item:text-red-500 transition-colors"})]})]})]}):(0,r.jsxs)("button",{onClick:()=>P(!0),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-yellow-500 hover:bg-yellow-400 text-black font-semibold text-[13px] transition-all active:scale-95",children:[(0,r.jsx)(m.UdD,{className:"text-sm"}),"Login"]}),(0,r.jsx)("div",{className:"relative cursor-pointer ml-0.5",children:(0,r.jsx)(d.A,{sticky:!0})})]})]}),(0,r.jsx)("div",{className:"container mx-auto px-4 pb-3",ref:Y,children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 bg-white/[0.06] border rounded-full px-4 py-2 transition-all duration-200 ".concat(F?"border-yellow-500/60 bg-white/[0.09]":"border-yellow-500/40 hover:border-white/20"),children:[(0,r.jsx)(o.KSO,{className:"text-yellow-500/70 text-sm shrink-0"}),(0,r.jsx)("input",{ref:J,value:z,onChange:e=>E(e.target.value),onFocus:()=>D(!0),onKeyDown:e=>{"Enter"===e.key&&er()},type:"text",placeholder:"Search products",className:"flex-1 bg-transparent text-sm text-white placeholder-white/50 focus:outline-none"}),z&&(0,r.jsx)("button",{onClick:es,className:"text-white/30 hover:text-white/70 transition-colors",children:(0,r.jsx)(o.QCr,{className:"text-xs"})}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e=n.m.findIndex(e=>e.code===T),t=n.m[(e+1)%n.m.length];H(t.code),localStorage.setItem("voice-search-lang",t.code)},"aria-label":"Change voice search language",title:"Change voice search language",className:"shrink-0 text-[10px] font-bold text-yellow-500/70 hover:text-yellow-400 border border-yellow-500/40 rounded px-1",children:null===(e=n.m.find(e=>e.code===T))||void 0===e?void 0:e.label}),(0,r.jsx)("button",{type:"button",onClick:ec,"aria-label":"Search by voice",title:"Search by voice",className:"shrink-0 transition-colors ".concat(eo?"text-red-500 animate-pulse":ei?"text-yellow-400 animate-pulse":"text-yellow-500/70 hover:text-yellow-400"),children:(0,r.jsx)(o.i0t,{className:"text-sm"})})]}),(0,r.jsx)(eb,{})]})}),(0,r.jsx)("div",{className:"fixed z-50 right-1 bottom-40 rotate-90 transition-all duration-300 ".concat(G&&!Q?"opacity-100 translate-y-0":"opacity-0 translate-y-4 pointer-events-none"),children:(0,r.jsx)(d.A,{format:!0})})]}),(0,r.jsx)("nav",{className:"w-full md:hidden bg-[#0a0a0a] relative z-40 border-b border-white/[0.06]",children:(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 h-14",children:[(0,r.jsxs)(l(),{href:"/",className:"flex items-center gap-2",children:[(0,r.jsx)(c.default,{alt:"Logo",height:34,width:34,src:ev,className:"rounded-md object-contain shrink-0"}),(0,r.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("p",{className:"text-[12px] uppercase text-yellow-500/70 font-semibold leading-none",children:(null==q?void 0:q.title)||"MustaqBal"}),(0,r.jsx)("div",{className:"w-5 h-3.5 rounded-sm overflow-hidden border border-white/20 shadow-sm",children:(0,r.jsx)("img",{src:"/uae_flag_wave.gif",alt:"UAE",className:"w-full h-full object-cover"})})]}),(0,r.jsx)("p",{className:"text-[13px] font-black uppercase text-white tracking-widest leading-tight mt-0.5",children:"ZamZam"})]})]}),null!==I&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-red-600/10 border border-red-500",children:[(0,r.jsxs)("span",{className:"relative flex h-1.5 w-1.5 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-500 opacity-75"}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-red-500"})]}),(0,r.jsx)("span",{className:"text-[9px] font-bold text-red-400 uppercase tracking-widest",children:"LIVE"}),(0,r.jsx)("span",{className:"text-[11px] font-bold text-white",children:parseInt(I).toLocaleStr
1ing()})]})]})}),s&&(0,r.jsx)("div",{className:"fixed inset-0 flex items-center justify-center bg-black/60 p-4 z-[9999]",children:(0,r.jsx)("div",{className:"relative w-full max-w-md mx-auto",children:(0,r.jsx)(f.A,{onClose:()=>P(!1)})})})]})}},99797:(e,t,a)=>{"use strict";a.d(t,{Ay:()=>n,dA:()=>l,iP:()=>i});var r=a(23492),s=a(91143);let l=(0,r.zD)("fetch/searchList",async e=>{try{return await s.K.getSearchList(e)}catch(e){throw e}}),o=(0,r.Z0)({name:"searchList",initialState:{search_list:[],loading:!1,error:null},reducers:{clearSearch:e=>{e.search_list=[],e.loading=!1}},extraReducers:e=>{e.addCase(l.pending,e=>{e.loading=!0,e.error=null,e.search_list=[]}).addCase(l.fulfilled,(e,t)=>{var a;e.loading=!1,e.search_list=null!==(a=null==t?void 0:t.payload)&&void 0!==a?a:[]}).addCase(l.rejected,(e,t)=>{e.loading=!1,e.error=t.payload,e.search_list=[]})}}),{clearSearch:i}=o.actions,n=o.reducer}},e=>{var t=t=>e(e.s=t);e.O(0,[6681,4523,6711,844,512,5479,3380,2202,4506,9204,6446,3603,4777,8087,3464,4540,3492,3063,3568,6874,220,6474,2081,2177,5294,8289,2296,7793,8441,1684,7358],()=>t(41545)),_N_E=e.O()}]);

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.