1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[160,8357],{84990:function(e,t,r){"use strict";r.d(t,{a:function(){return o}});var i=r(67294);function n(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function s(e){let t=Object.keys(e);return"undefined"==typeof window?t.reduce(n,{mediaQueries:{},matches:{}}):t.reduce((t,r)=>{let i=window.matchMedia(e[r]);return t.mediaQueries[r]=i,t.matches[r]=i.matches,t},{mediaQueries:{},matches:{}})}function l(e,t){switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(function(t,r){return t[r]=e.mediaQueries[r].matches,t},{}),mediaQueries:e.mediaQueries};case"setQueries":return s(t.queries)}}function o(e){return function(e){let t=i.useRef(e),[r,n]=i.useReducer(l,e,s);function o(){return n({type:"updateMatches"})}function a(e){return void 0!==e.addListener?e.addListener(o):e.addEventListener("change",o),o}i.useEffect(()=>{(function(e,t){if(t===e)return!1;let r=Object.values(t),i=Object.values(e);if(r.length!==i.length||r.some((e,t)=>e!==i[t]))return!0;let n=Object.keys(e);return Object.keys(t).some((e,t)=>e!==n[t])})(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]),i.useEffect(()=>{let e=Object.values(r.mediaQueries),t=e.map(a);function i(e,r){void 0!==e.addListener?e.removeListener(t[r]):e.removeEventListener("change",t[r])}return()=>{e.forEach(i)}},[r.mediaQueries]);let{matches:c}=r,d=i.useMemo(()=>Object.values(c),[c]);return{matches:c,matchesAny:d.some(Boolean),matchesAll:d.length>0&&d.every(Boolean)}}((void 0===a[e]&&(a[e]={default:e}),a[e])).matchesAll}let a={}},76571:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/HomePageAnimate",function(){return r(71042)}])},71042:function(e,t,r){"use strict";r.r(t);var i=r(85893),n=r(67294),s=r(43495),l=r(18357),o=r(37351),a=r(87066),c=r(96038),d=r(90318),u=r(10248),m=r(95965),h=r(31773),x=r(86187),f=r(99756),p=r(733),g=r.n(p),b=r(43812);let v=()=>(0,i.jsx)("div",{className:"w-full h-full flex justify-center items-center py-40",children:(0,i.jsx)(g(),{type:"spinningBubbles",color:"var(--primary-color)",height:"10%",width:"10%"})}),w=e=>t=>{let{widgetId:r}=t,[n,o]=(0,l.YD)({triggerOnce:!0,threshold:.5});return(0,i.jsx)(s.E.div,{ref:n,variants:{hidden:{opacity:0,x:-50},visible:{opacity:1,x:0,transition:{type:"spring",stiffness:100,damping:10}}},initial:"hidden",animate:o?"visible":"hidden",className:"widget-block",children:(0,i.jsx)(e,{widgetId:r})})},y=()=>{let[e,t]=(0,n.useState)([]),[r,s]=(0,n.useState)(!0),l=(0,n.useContext)(o.ThemeContext);return(0,n.useEffect)(()=>{a.Z.get("".concat(b.BUILDER_URL,"/widget-order"),{headers:{Authorization:"Bearer ".concat(l.token)}}).then(e=>{let r=e.data.sort((e,t)=>e.order_by-t.order_by);t(r),s(!1)}).catch(e=>{})},[l.token]),(0,i.jsx)(i.Fragment,{children:r?(0,i.jsx)(v,{}):(0,i.jsx)("div",{children:e.map((e,t)=>{let r={Banner:w(c.default),Collage:w(d.default),"Info Slider":w(u.default),"Product Slider":w(m.default),"Category Slider":w(h.default),Subscription:w(x.default),"Cms Custom":w(f.default)}[e.widget_type];return r&&0!==e.is_enabled?(0,i.jsx)(r,{widgetId:e.widget_order_id},t):null})})})};t.default=y},96038:function(e,t,r){"use strict";r.r(t);var i=r(85893),n=r(67294),s=r(37351),l=r(6490);r(12755);var o=r(10615),a=r(66049),c=r(43812);r(73658);var d=r(25675),u=r.n(d);let m=e=>{let{widgetId:t,onImageLoad:r}
1=e,[d,m]=(0,n.useState)(null),[h,x]=(0,n.useState)(!1);(0,n.useContext)(s.ThemeContext);let{redisWidgetOrderData:f}=(0,n.useContext)(l.m),[p,g]=(0,n.useState)(window.innerWidth),[b,v]=(0,n.useState)(null),w=()=>{g(window.innerWidth)};if((0,n.useEffect)(()=>(window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}),[]),(0,n.useEffect)(()=>{if(f&&t){let e=f.find(e=>e.widget_order_id===t);e?(m(e.banner?e.banner[0]:null),x((null==e?void 0:e.is_enabled)==1)):(m([]),x(!1))}},[t,f]),!d)return(0,i.jsx)("div",{className:"min-h-[230px]"});let y=[],j="w-full";p>=1024&&p<=2440?(y=d.computer_view_image,j="w-[100%] h-[600px] lg:h-[480px] md:h-[400px] xl:h-[700px] sm:h-[800px] object-fit"):p>=768&&p<1024?(y=d.tab_view_image,j="w-[100%] h-[600px] lg:h-[500px] md:h-[400px] xl:h-[700px] sm:h-[800px] object-fit"):p<640&&(y=d.mobile_view_image);let _=[];if(d.is_video_enabled){let N;let C=new URL(d.video_link);if("youtu.be"===C.host||C.host.includes("youtube.com")){let S;(S="youtu.be"===C.host?C.pathname.split("/")[1]:C.searchParams.get("v"))&&(N=(0,i.jsx)("iframe",{className:j,height:b||315,src:"https://www.youtube.com/embed/".concat(S,"?autoplay=1&mute=1&controls=0&modestbranding=1&rel=0"),frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,playsInline:!0,title:"Embedded YouTube Video"}))}else N=(0,i.jsxs)("video",{className:j,height:b||315,controls:!0,autoplay:!0,muted:!0,playsInline:!0,loop:!0,title:"Direct Video Link",children:[(0,i.jsx)("source",{src:d.video_link,type:"video/".concat(C.pathname.split(".").pop())}),"Your browser does not support the video tag."]});N?_.push((0,i.jsxs)("div",{style:{position:"relative"},children:[N,(0,i.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:1,pointerEvents:"none"}})]},"video")):console.error("Invalid video link")}return _=_.concat(y.map((e,t)=>(0,i.jsx)(a.Z,{href:e.image_link?e.image_link:"#",children:(0,i.jsx)("div",{className:"",children:(0,i.jsx)(u(),{src:(0,c.setImageSrc)(e.image_url,""),onLoad:r,alt:"View for viewport width ".concat(p),layout:"responsive",width:1200,height:675,className:"object-cover",priority:!0})})},t))),(0,i.jsx)(i.Fragment,{children:h?(0,i.jsx)("div",{className:"sm:min-h-[230px] lg:min-h-[600px] pb-3",children:(0,i.jsx)("div",{children:(0,i.jsx)(o.lr,{autoPlay:!0,infiniteLoop:!0,showArrows:!1,showThumbs:!1,showStatus:!1,interval:1e3*d.banner_rotation,children:_})})}):null})};t.default=m},31773:function(e,t,r){"use strict";r.r(t);var i=r(85893),n=r(67294),s=r(44988),l=r(37351),o=r(6490),a=r(22546),c=r(43812),d=r(13329),u=r(68015);r(15268);var m=r(51649);s.ZP.use([s.W_,s.tl,s.pt]);let h=e=>{let{widgetId:t,onImageLoad:r}=e,{redisWidgetOrderData:s}=(0,n.useContext)(o.m),[h,x]=(0,n.useState)([]),[f,p]=(0,n.useState)([]),[g,b]=(0,n.useState)(""),[v,w]=(0,n.useState)(null),[y,j]=(0,n.useState)({sliderHeader:"",numberOfProduct:1,rotationSeconds:2,widgetTitle:""}),_=(0,n.useRef)(null),N=(0,n.useRef)(null),C=(0,n.useRef)(null),[S,E]=(0,n.useState)(!0),[k,P]=(0,n.useState)(!0),[O,B]=(0,n.useState)(!1);(0,n.useContext)(l.ThemeContext);let{jboId:I}=(0,u.useJobId)();(0,n.useEffect)(()=>{if(!t||!s)return;let e=s.find(e=>e.widget_order_id===t&&"Category Slider"===e.widget_type);if(e){let r=e.category_slider[0];j({sliderHeader:r.slider_header,numberOfProduct:r.number_of_product,rotationSeconds:r.rotation_seconds,widgetTitle:r.widget_title}),p(r.menu_detail),b(e.widget_name)}},[t,s]);let z=f.length>5||f.length>y.numberOfProduct,V=y.numberOfProduct>=2,L=()=>{let e=window.innerWidth;return e>=1440||e>=1024?y.numberOfProduct||1:e>=768?3:2};return((0,n.useEffect)(()=>{let e=()=>{let e=L();B(((null==f?void 0:f.length)||0)>e),C.current&&(E(C.current.isBeginning),P(C.current.isEnd))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[f.length,y.numberOfProduct]),f.length)?(0,i.jsxs)("div",{className:"block xl:container px-4 mb-2 lg:mb-4 min-h-[100px]",children:[(0,i.jsx)("div",{className:"flex justify-center mb-4 px-4",children:(0,i.jsxs)("div",{className:"w-full max-w-xl text-center",children:[(0,i.jsx)("span",{className:"block text-xl lg:text-2xl font-semibold text-primary",children:y.widgetTitle}),(0,i.jsx)("div",{className:"mx-auto mt-2 h-[1.5px] w-4/5 max-w-[240px]",style:{background:"linear-gradient(to right, #222 0%, #555 45%, rgba(85,85,85,0.2) 80%, transparent 100%)"}})]})}),(0,i.jsxs)("div",{className:"relative overflow-visible px-8 md:px-10",children:[(z||V)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",ref:_,disabled:!O||S,"aria-label":"Previous categories",className:"swiper-button-prev flex items-center justify-center w-8 h-8 bg-primary rounded-full absolute top-[50%] md:top-[42%] transform -translate-y-1/2 left-0 ".concat(z?"":"lg:hidden xl:hidden"," ").concat(!O||S?"opacity-50 cursor-not-allowed":"cursor-pointer"),style:{zIndex:20},children:(0,i.jsx)(m.bHS,{color:"white",size:25})}),(0,i.jsx)("button",{type:"button",ref:N,disabled:!O||k,"aria-label":"Next categories",className:"swiper-button-next flex items-center justify-center w-8 h-8 bg-primary rounded-full absolute top-[50%] md:top-[42%] transform -translate-y-1/2 right-0 ".concat(z?"":"lg:hidden xl:hidden"," ").concat(!O||k?"opacity-50 cursor-not-allowed":"cursor-pointer"),style:{zIndex:20},children:(0,i.jsx)(m.am,{color:"white",size:25})})]}),z||V?(0,i.jsx)(a.tq,{navigation:{nextEl:N.current,prevEl:_.current},onBeforeInit:e=>{e.params.navigation.prevEl=_.current,e.params.navigation.nextEl=N.current},onSwiper:e=>{C.current=e,E(e.isBeginning),P(e.isEnd)},onSlideChange:e=>{E(e.isBeginning),P(e.isEnd)},autoplay:{delay:1e3*y.rotationSeconds,disableOnInteraction:!1},breakpoints:{320:{slidesPerView:2},640:{slidesPerView:2},768:{slidesPerView:3},1024:{slidesPerView:y.numberOfProduct},1440:{slidesPerView:y.numberOfProduct}},children:f.map((e,t)=>{var r;
1return(0,i.jsx)(a.o5,{className:"flex justify-center px-3",children:(0,i.jsx)("a",{href:(null===(r=f[t])||void 0===r?void 0:r.menu_link)||"",className:"group block w-full",children:(0,i.jsxs)("div",{className:"relative overflow-hidden rounded-2xl ",children:[e&&(0,i.jsx)(d.Z,{src:(0,c.setImageSrc)(e.image_url),alt:e.img_alt_attrib||e.product_name,title:e.img_title_attrib||"",width:300,height:260,className:"w-full object-cover transition-transform duration-500 group-hover:scale-105"}),(0,i.jsx)("div",{className:"absolute bottom-0 left-0 right-0 px-3 pt-12 pb-4 rounded-b-2xl bg-gradient-to-t from-black/80 via-black/30 via-black/8 to-transparent",children:(0,i.jsx)("span",{className:"text-white text-sm md:text-lg font-semibold text-center block drop-shadow-[0_1px_2px_rgba(0,0,0,0.9)]",children:e.name})})]})})},t)})},"swiper-key-".concat(y.numberOfProduct)):(0,i.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-6",children:f.map((e,t)=>{var r;return(0,i.jsx)("a",{href:(null===(r=f[t])||void 0===r?void 0:r.menu_link)||"",className:"group block",children:(0,i.jsxs)("div",{className:"relative overflow-hidden rounded-2xl",children:[e&&(0,i.jsx)(d.Z,{src:!function(e){try{return btoa(atob(e))===e}catch(t){return!1}}(e.image_url)?(0,c.setImageSrc)(e.image_url):"data:image/jpeg;base64,".concat(e.image_url),alt:e.img_alt_attrib||e.product_name,title:e.img_title_attrib||"",width:300,height:260,className:"w-full object-cover transition-transform duration-500 group-hover:scale-105"}),(0,i.jsx)("div",{className:"absolute bottom-0 left-0 right-0 px-3 pt-12 pb-4 rounded-b-2xl bg-gradient-to-t from-black/80 via-black/60 via-black/50 via-black/20 via-black/8 to-transparent",children:(0,i.jsx)("span",{className:"text-white text-sm md:text-lg font-semibold text-center block drop-shadow-[0_1px_8px_rgba(0,0,0,0.9)]",children:e.name})})]})},t)})})]})]}):(0,i.jsx)("div",{className:"space-y-4",children:(0,i.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[,,,].fill().map((e,t)=>(0,i.jsxs)("div",{className:"flex flex-col items-center p-4 ",children:[(0,i.jsx)("div",{className:"w-32 h-32 md:w-40 md:h-40 lg:w-48 lg:h-48 bg-gray-300 rounded-lg mb-4"}),(0,i.jsx)("div",{className:"h-4 bg-gray-300 rounded w-3/4 mb-2"}),(0,i.jsx)("div",{className:"h-4 bg-gray-300 rounded w-1/2"})]},t))})})};t.default=h},99756:function(e,t,r){"use strict";r.r(t);var i=r(85893),n=r(67294),s=r(87066),l=r(37351),o=r(6490),a=r(43812),c=r(25675),d=r.n(c),u=r(47311),m=r(68015),h=r(43536);let x=a.BUILDER_URL,f=e=>{let{widgetId:t}=e,[r,a]=(0,n.useState)(null),{jboId:c}=(0,m.useJobId)(),[f,p]=(0,n.useState)(!0),g=(0,n.useContext)(l.ThemeContext),{redisWidgetOrderData:b}=(0,n.useContext)(o.m);if((0,n.useEffect)(()=>{t&&233==c&&s.Z.get("".concat(x,"/cms-custom/").concat(t),{headers:{Authorization:"Bearer ".concat(g.token)}}).then(e=>{e.data&&e.data.length>0&&(a(e.data[0]),p(!1))}).catch(e=>{a(null),p(!1)})},[t,g]),(0,n.useEffect)(()=>{if(b&&t){let e=b.find(e=>e.widget_order_id===t);e?a(e.cmsCustom?e.cmsCustom[0]:null):a(null)}},[t,b]),!r)return null;let v=e=>{if("img"===e.name){let{src:t,alt:r,width:n,height:s}=e.attribs,l=n?parseInt(n):500,o=s?parseInt(s):500;return(0,i.jsx)(d(),{src:t,alt:r||"Image",width:l,height:o,layout:"responsive",objectFit:"cover"},t)}},w=1===r.is_html_tag?r.html_editor:r.cms_custom_editor,y=w&&"string"==typeof w?(0,u.ZP)(w,{replace:v}):null;return(0,i.jsxs)(i.Fragment,{children:[(null==r?void 0:r.widget_title)?(0,i.jsx)("span",{className:"text-xl lg:text-2xl pb-1 lg:pb-4 text-center px-3 lg:px-0 font-semibold text-primary flex justify-center",children:r.widget_title}):null,(0,i.jsx)("div",{className:"block w-full mx-auto bg-white rounded-md",children:1===r.is_html_tag?(0,i.jsxs)(h.ZP.div,{children:[(0,i.jsx)("link",{rel:"stylesheet",href:"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"}),(0,i.jsxs)("div",{style:{maxWidth:"100%"},children:[y," "]})]}):(0,i.jsx)("div",{className:"prose prose-sm sm:prose lg:prose-lg mx-auto sun-editor-editable flex justify-center items-center",style:{maxWidth:"100%"},dangerouslySetInnerHTML:{__html:r.cms_custom_editor}})})]})};t.default=f},10248:function(e,t,r){"use strict";r.r(t);var i=r(85893),n=r(67294),s=r(44988),l=r(22546),o=r(37351),a=r(6490),c=r(43812);r(73658);var d=r(25675),u=r.n(d),m=r(51649);function h(){let e=window.innerWidth;return e>=1280?56:30}s.ZP.use([s.W_,s.pt]);let x=e=>{var t;let{widgetId:r,onImageLoad:s}
1=e,[d,x]=(0,n.useState)(null),{redisWidgetOrderData:f}=(0,n.useContext)(a.m);(0,n.useContext)(o.ThemeContext);let[p,g]=(0,n.useState)(h()),[b,v]=(0,n.useState)(()=>window.innerWidth<=768),w=(0,n.useRef)(null),y=(0,n.useRef)(null);return((0,n.useEffect)(()=>{let e=()=>{g(h(window.innerWidth)),v(window.innerWidth<=768)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,n.useEffect)(()=>{if(w.current&&y.current){let e=document.querySelector(".custom-swiper").swiper;e.params.navigation.prevEl=w.current,e.params.navigation.nextEl=y.current,e.navigation.init(),e.navigation.update()}},[null==d?void 0:d.number_of_info]),(0,n.useEffect)(()=>{if(f&&r){let e=f.find(e=>e.widget_order_id===r);e?x(e.infoSlider?e.infoSlider[0]:null):x(null)}},[r,f]),d)?(0,i.jsx)(i.Fragment,{children:d&&(0,i.jsxs)("div",{className:"block px-4 mb-2 mt-1 bg-[#FBF4D6]",children:[d.widget_title&&(0,i.jsx)("span",{className:"text-xl lg:text-2xl px-3 lg:px-0 font-semibold text-primary flex justify-center mb-2 lg:mb-4",children:d.widget_title}),d.is_slider_enabled||b?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"relative overflow-visible px-8 md:px-10",children:[(0,i.jsx)(l.tq,{className:"custom-swiper",spaceBetween:10,centeredSlides:!1,breakpoints:{320:{slidesPerView:1,spaceBetween:10},480:{slidesPerView:2,spaceBetween:10},640:{slidesPerView:3,spaceBetween:10},768:{slidesPerView:3,spaceBetween:10},1024:{slidesPerView:d.number_of_info,spaceBetween:40},1280:{slidesPerView:d.number_of_info,spaceBetween:40}},autoplay:{delay:4500,disableOnInteraction:!1},navigation:{prevEl:w.current,nextEl:y.current},onBeforeInit:e=>{e.params.navigation.prevEl=w.current,e.params.navigation.nextEl=y.current},onSwiper:e=>{setTimeout(()=>{e.params.navigation.prevEl=w.current,e.params.navigation.nextEl=y.current,e.navigation.destroy(),e.navigation.init(),e.navigation.update()})},children:null==d?void 0:d.info_slider_box.map((e,t)=>(0,i.jsx)(l.o5,{children:(0,i.jsxs)("div",{className:"flex flex-col items-center justify-between rounded-md p-4 mx-auto h-44 md:h-52 lg:h-52",children:[(0,i.jsx)("div",{className:"flex items-center justify-center w-20 h-20 lg:w-12 lg:h-12 lg1:w-20 lg1:h-20 rounded-full p-1",children:(0,i.jsx)(u(),{src:(0,c.setImageSrc)(e.icon,""),alt:"",className:"w-full h-full object-cover rounded-full",layout:"fixed",width:80,height:80})}),(0,i.jsx)("h3",{className:"font-semibold text-lg text-center w-full px-2 lg:text-sm lg1:text-lg",style:{color:e.header_colour},title:e.header_text,children:e.header_text}),(0,i.jsx)("div",{className:"px-2 w-full",children:(0,i.jsx)("p",{className:"text-sm text-center",style:{color:e.text_colour},title:e.sub_text,children:e.sub_text})})]})},t))},d.number_of_info),(null==d?void 0:null===(t=d.info_slider_box)||void 0===t?void 0:t.length)>(null==d?void 0:d.number_of_info)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",ref:w,"aria-label":"Previous info",className:"swiper-button-prev z-20 flex items-center justify-center w-8 h-8 md:w-9 md:h-9 bg-primary hover:bg-primary/90 shadow-md hover:shadow-lg transition-all duration-300 rounded-full absolute top-1/2 left-0 transform -translate-y-1/2 cursor-pointer opacity-100",children:(0,i.jsx)(m.bHS,{color:"white",size:20})}),(0,i.jsx)("button",{type:"button",ref:y,"aria-label":"Next info",className:"swiper-button-next z-20 flex items-center justify-center w-8 h-8 md:w-9 md:h-9 bg-primary hover:bg-primary/90 shadow-md hover:shadow-lg transition-all duration-300 rounded-full absolute top-1/2 right-0 transform -translate-y-1/2 cursor-pointer opacity-100",children:(0,i.jsx)(m.am,{color:"white",size:20})})]})]})}):(0,i.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3 gap-4",children:d.info_slider_box.map((e,t)=>(0,i.jsx)("div",{className:"p-4",children:(0,i.jsxs)("div",{className:"flex flex-col items-center justify-between rounded-md p-3 mx-auto h-44 lg:h-52",children:[(0,i.jsx)("div",{className:"flex items-center justify-center w-20 h-20 rounded-full p-1",children:(0,i.jsx)(u(),{src:(0,c.setImageSrc)(e.icon,""),alt:"",className:"w-full h-full object-cover rounded-full",layout:"fixed",width:80,height:80})}),(0,i.jsx)("h3",{className:"font-semibold text-sm text-center truncate w-full px-2",style:{color:e.header_colour},title:e.header_text,children:e.header_text}),(0,i.jsx)("div",{className:"overflow-auto px-2 w-full",style:{maxHeight:"3rem"},children:(0,i.jsx)("p",{className:"text-sm text-center",style:{color:e.text_colour},title:e.sub_text,children:e.sub_text})})]})},t))})]})}):null};t.default=x},95965:function(e,t,r){"use strict";r.r(t);
1var i=r(85893),n=r(67294),s=r(37351),l=r(6490),o=r(87066),a=r(642);r(73658);var c=r(43812),d=r(68015);r(15268);var u=r(60017);let m=c.BUILDER_URL,h=e=>{let{widgetId:t}=e,r=(0,n.useContext)(s.ThemeContext),{redisWidgetOrderData:c}=(0,n.useContext)(l.m),{jboId:h}=(0,d.useJobId)(),[x,f]=(0,n.useState)({products:null,sliderHeader:"",numberOfProducts:0,isProductNameVisible:"",isPriceVisible:"",isSKUVisible:"",rotationSeconds:0}),[p,g]=(0,n.useState)(""),{currentCurrency:b}=(0,n.useContext)(u.CurrencyContext),[v,w]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=async()=>{try{let e=await o.Z.get("".concat(m,"/product-slider/home/").concat(t,"?currency=").concat(b),{headers:{Authorization:"Bearer ".concat(r.token)}}),i=e.data,n=i.automatic_product.concat(i.custom_product)||[],s=n.map(e=>({...e,id:e.product_id}));f({products:s,sliderHeader:i.slider_header||i.widget_title,numberOfProducts:i.number_of_products,isProductNameVisible:i.is_product_name,isPriceVisible:i.is_price,isSKUVisible:i.is_sku,rotationSeconds:i.rotation_seconds}),w(!1)}catch(l){console.error(l),w(!1)}finally{w(!1)}};t&&e()},[t,r.token]),(0,i.jsxs)("div",{className:"block xl:container px-4 pb-8",children:[(0,i.jsx)("div",{className:"flex justify-center mb-4",children:(0,i.jsxs)("div",{className:"inline-flex flex-col items-center",children:[(0,i.jsx)("span",{className:"text-xl lg:text-2xl font-semibold text-primary",children:null==x?void 0:x.sliderHeader}),(0,i.jsx)("div",{className:"mt-2 h-[1.5px] w-full",style:{background:"linear-gradient(to right, #222 0%, #555 45%, rgba(85,85,85,0.2) 80%, transparent 100%)"}})]})}),(0,i.jsx)(a.Z,{products:x.products,sliderConfigData:x,isLoading:v,isSpecificGrid:!1})]})};t.default=h},86187:function(e,t,r){"use strict";r.r(t);var i=r(85893),n=r(67294),s=r(82940),l=r(37351),o=r(6490),a=r(89583),c=r(14762);r(43812);var d=r(68015),u=r(15268);let m=e=>{let{widgetId:t}=e,[r,m]=(0,n.useState)({}),[h,x]=(0,n.useState)(!0);(0,n.useContext)(l.ThemeContext);let{redisWidgetOrderData:f}=(0,n.useContext)(o.m),p=(0,s.b)(),[g,b]=(0,n.useState)(""),{jboId:v}
1=(0,d.useJobId)(),[w,y]=(0,n.useState)(!1),[j,_]=(0,n.useState)({}),N=()=>{y(!1)};(0,n.useEffect)(()=>{if(f&&t){let e=f.find(e=>e.widget_order_id===t);e?m(e.subscription?e.subscription[0]:null):m(null)}},[t,f]);let C=async e=>{if(e.preventDefault,!g.match(/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/)){_({type:"error",title:"Error",subText:"Please enter a valid email address.",onConfirm:N,onClose:N,showConfirmButton:!1,showCancelButton:!1,autoClose:3}),y(!0);return}try{await p.post("user/newsletter_subscription",{email:g}).then(e=>{b(""),_({type:"success",title:"Success",subText:e.data.message,onConfirm:N,onClose:N,showConfirmButton:!1,showCancelButton:!1,autoClose:3}),y(!0)})}catch(i){var t;_({type:"error",title:"Error",subText:"Something went wrong",onConfirm:N,onClose:N,showConfirmButton:!1,showCancelButton:!1,autoClose:3}),y(!0);let r=(null==i?void 0:null===(t=i.response)||void 0===t?void 0:t.data)?i.response.data:"";(0,u.Z)({job_id:v,endpoint:"user/newsletter_subscription",payload:{email:g},responseData:r,errorMsg:i})}};return r?(0,i.jsxs)("div",{className:"mb-2 lg:mb-4 bg-alternative p-4 md:p-8 shadow-md flex flex-col lg:flex-row items-center",children:[(0,i.jsxs)("div",{className:"flex items-center space-x-4 flex-shrink-0 ".concat("right"===r.text_side&&"md:order-2 ml-3"),children:[(0,i.jsx)("div",{className:"p-2 bg-primary rounded-full",children:(0,i.jsx)(a.Z3q,{size:20,className:"text-white"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-white font-semibold",children:r.header_text}),(0,i.jsx)("p",{className:"text-white",children:r.sub_text})]})]}),(0,i.jsxs)("div",{className:"flex-grow flex md:flex-wrap md:gap-4 flex-col md:flex-row items-center space-y-4 md:space-y-0 md:space-x-4 mt-4 md:mt-4 md:ml-8",children:[(0,i.jsx)("input",{type:"email",value:g,onChange:e=>b(e.target.value),placeholder:"Your E-mail Address",pattern:"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$",className:"flex-grow p-2 rounded-lg border border-gray-300 focus:border-primary focus:ring-2 focus:ring-primary outline-none"}),(0,i.jsxs)("button",{className:"py-2 px-6 rounded-lg bg-primary hover:bg-primary transition duration-300 font-semibold text-white flex items-center space-x-2",onClick:C,children:[(0,i.jsx)("span",{children:"SUBSCRIBE"}),(0,i.jsx)("svg",{xmlns:"https://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]})]}),(0,i.jsx)(c.Z,{isOpen:w,type:j.type,title:j.title,subText:j.subText,onConfirm:j.onConfirm,onClose:j.onClose,showConfirmButton:j.showConfirmButton,showCancelButton:j.showCancelButton,autoClose:j.autoClose})]}):null};t.default=m},88357:function(e,t,r){"use strict";r.d(t,{w_:function(){return a}});var i=r(67294),n={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},s=i.createContext&&i.createContext(n),l=function(){return(l=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},o=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r};function a(e){return function(t){return i.createElement(c,l({attr:l({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return i.createElement(t.tag,l({key:r},t.attr),e(t.child))})}(e.child))}}function c(e){var t=function(t){var r,n=e.attr,s=e.size,a=e.title,c=o(e,["attr","size","title"]),d=s||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),i.createElement("svg",l({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,c,{className:r,style:l(l({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),a&&i.createElement("title",null,a),e.children)};return void 0!==s?i.createElement(s.Consumer,null,function(e){return t(e)}):t(n)}},18357:function(e,t,r){"use strict";r.d(t,{YD:function(){return c}});var i=r(67294),n=Object.defineProperty,s=new Map,l=new WeakMap,o=0,a=void 0;function c({threshold:e,delay:t,trackVisibility:r,rootMargin:n,root:c,triggerOnce:d,skip:u,initialInView:m,fallbackInView:h,onChange:x}={}){var f;let[p,g]=i.useState(null),b=i.useRef(x),[v,w]=i.useState({inView:!!m,entry:void 0});b.current=x,i.useEffect(()=>{let i;if(!u&&p)return i=function(e,t,r={},i=a){if(void 0===window.IntersectionObserver&&void 0!==i){let n=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:n,intersectionRect:n,rootBounds:n}
1),()=>{}}let{id:c,observer:d,elements:u}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?(r=e.root)?(l.has(r)||(o+=1,l.set(r,o.toString())),l.get(r)):"0":e[t]}`}).toString(),r=s.get(t);if(!r){let i;let n=new Map,a=new IntersectionObserver(t=>{t.forEach(t=>{var r;let s=t.isIntersecting&&i.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(r=n.get(t.target))||r.forEach(e=>{e(s,t)})})},e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:a,elements:n},s.set(t,r)}return r}(r),m=u.get(e)||[];return u.has(e)||u.set(e,m),m.push(t),d.observe(e),function(){m.splice(m.indexOf(t),1),0===m.length&&(u.delete(e),d.unobserve(e)),0===u.size&&(d.disconnect(),s.delete(c))}}(p,(e,t)=>{w({inView:e,entry:t}),b.current&&b.current(e,t),t.isIntersecting&&d&&i&&(i(),i=void 0)},{root:c,rootMargin:n,threshold:e,trackVisibility:r,delay:t},h),()=>{i&&i()}},[Array.isArray(e)?e.toString():e,p,c,n,d,u,r,h,t]);let y=null==(f=v.entry)?void 0:f.target,j=i.useRef(void 0);p||!y||d||u||j.current===y||(j.current=y,w({inView:!!m,entry:void 0}));let _=[g,v.inView,v.entry];return _.ref=_[0],_.inView=_[1],_.entry=_[2],_}i.Component}},function(e){e.O(0,[9774,4617,5445,9866,2013,3874,7066,3495,5675,1664,733,2546,577,1529,17,2940,5271,5566,642,318,2888,179],function(){return e(e.s=76571)}),_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.