PageSourceSearch

https://merokinmel.com/_next/static/chunks/213-39abdff5b166efdf.js

js merokinmel.com collected 2026-10-02 00:33:02 UTC 15,550 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[213],{99977:function(e,a,t){var l=t(11527);t(50959);var n=t(98174),s=t.n(n),r=t(4055);a.Z=e=>{let{type:a}=e;return(0,l.jsx)("div",{className:"pt-0",children:(0,l.jsx)("div",{className:"container",children:(0,l.jsxs)("div",{children:[(0,l.jsx)(s(),{src:null===r.Ee||void 0===r.Ee?void 0:r.Ee.search,alt:"",className:"flex mx-auto img-fluid",width:275,height:275}),(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("h2",{className:"text-lg font-medium capitalize",children:"No Products Found"}),(0,l.jsx)("p",{children:" Thank you for using MeroKinmel. We will be in contact with more details shortly."})]})]})})})}},59936:function(e,a,t){t.d(a,{h:function(){return useWarehouseHooks}});var l=t(50959),n=t(24376);let useWarehouseHooks=()=>{let[e,a]=(0,l.useState)({id:null,name:null}),updateWarehouseInfo=()=>{let e=localStorage.getItem(n.ko.WAREHOUSE_ID),t=localStorage.getItem(n.ko.WAREHOUSE_NAME);a({id:e,name:t})};return(0,l.useEffect)(()=>{updateWarehouseInfo();let handleStorageChange=e=>{(e.key===n.ko.WAREHOUSE_ID||e.key===n.ko.WAREHOUSE_NAME)&&updateWarehouseInfo()};return window.addEventListener("storage",handleStorageChange),()=>{window.removeEventListener("storage",handleStorageChange)}},[]),(0,l.useEffect)(()=>{},[e]),{warehouseId:e.id,warehouseName:e.name,setWarehouseId:e=>{localStorage.setItem(n.ko.WAREHOUSE_ID,e),updateWarehouseInfo()},setWarehouseName:e=>{localStorage.setItem(n.ko.WAREHOUSE_NAME,e),updateWarehouseInfo()}}}},10213:function(e,a,t){t.r(a),t.d(a,{__N_SSP:function(){return _},default:function(){return A}});
1var l=t(11527),n=t(50959),s=t(98174),r=t.n(s),i=t(4055),d=t(43521),o=t(70827),c=t(96230),u=t(10639),h=t(21927),m=t(96629),p=t(56559),x=t(98696),g=t(58928),v=t(99977),f=t(77345),b=t(52886),y=t(78298),j=t(88674),N=t(10209),w=t(21784),S=t(9759),k=t(95823),E=t(13865),C=t.n(E),P=t(88247),I=t(81066),q=t(59936),categorySidebar=()=>{var e,a;let[t,s]=(0,n.useState)(1),{warehouseName:r}=(0,q.h)(),[i,o]=(0,n.useState)(null),u=(0,c.useRouter)(),{slug:h,filterby:m}=u.query,p=(0,g.getCookie)("categoryId"),{isLoading:x}=(0,d.a)([p,,t],async()=>{let e=await (0,I.KG)(p,t);return o(e),e}),v=null==i?void 0:null===(e=i.data[0])||void 0===e?void 0:e.slug,handleCategoryClick=e=>{u.push({pathname:"/".concat(r,"/").concat(h,"/menu"),query:{filterby:e}},void 0,{shallow:!0})};return(0,n.useEffect)(()=>{v?u.push({pathname:"/".concat(r,"/").concat(h,"/menu"),query:{filterby:v}}):u.push({pathname:"/".concat(r,"/").concat(h,"/menu"),query:{categoriesAll:!0}})},[v]),(0,l.jsx)(P.I1,{type:"single",collapsible:!0,className:"w-full",children:null==i?void 0:null===(a=i.data)||void 0===a?void 0:a.map((e,a)=>(0,l.jsx)("div",{className:"pb-2",children:(0,l.jsx)(C(),{href:"#",onClick:a=>{a.preventDefault(),handleCategoryClick(e.slug)},"aria-label":"categories-".concat(a),className:"block text-gray-150 font-medium text-base leading-[22px] transition-all delay-100 duration-300 hover:text-primary pb-2 capitalize \n                    ".concat(m===(null==e?void 0:e.slug)?"text-primary":"","\n                    "),children:null==e?void 0:e.name})},"categories-".concat(a)))})},Z=t(89120),W=t.n(Z);let useDebounceEffect=(e,a,t)=>{(0,n.useEffect)(()=>{let a=W()(()=>e(),t);return a(),()=>a.cancel()},a)},CategoriesListing=()=>{var e,a,t,s,k,E,C,P,I,q,Z;let W=(0,c.useRouter)(),{slug:_,offer:A,categoriesAll:F}
1=W.query,L=W.query.filterby,D=(0,u.LP)(),[R,T]=(0,n.useState)(""),[H,M]=(0,n.useState)(!1),O=(0,n.useRef)(!0),[z,U]=(0,n.useState)(null),[K,Y]=(0,n.useState)(null),[B,G]=(0,n.useState)(1),[V,X]=(0,n.useState)(""),[$,J]=(0,n.useState)(""),[Q,ee]=(0,n.useState)(""),[ea,et]=(0,n.useState)(!1),[el,en]=(0,n.useState)(!1),{data:es}=(0,d.a)(["wishlistProducts",D],{enabled:!!D}),[er,ei]=(0,n.useState)(""),[ed,eo]=(0,n.useState)(""),{cartData:ec,cartDataLoading:eu}=(0,f.G)(),[eh,em]=(0,n.useState)(""),[ep,ex]=(0,n.useState)(null),{configData:eg}=(0,m.Z)(),[ev,ef]=(0,n.useState)(!1),{data:eb}=(0,d.a)({queryKey:["getTagList"],queryFn:h.k}),ey=Number(null==eg?void 0:null===(e=eg.data)||void 0===e?void 0:e.minimumPrice),ej=Number(null==eg?void 0:null===(a=eg.data)||void 0===a?void 0:a.pageData["max-price"]),eN=!isNaN(ey)&&isFinite(ey),ew=!isNaN(ej)&&isFinite(ej),eS=(0,g.getCookie)("menuId")||(0,g.getCookie)("categoryId"),[ek,eE]=(0,n.useState)([eN?ey:0,ew?ej:3e3]),eC=null==ep?void 0:null===(t=ep.data[0])||void 0===t?void 0:t.name,handleSearch=async()=>{let{query:e,push:a}=W,t={...e};t.filterby&&delete t.filterby,G(1),a({pathname:W.pathname,query:t});let l=await (0,o.uP)(V,B,_,"","","","");U(l),ei(V)},handleOfferData=async()=>{G(1),X("");let{filterby:e,...a}=W.query,t={...a,offer:"true"};await W.push({pathname:W.pathname,query:t});try{let e=await (0,o.Yq)(eS,B);U(e),Y(e)}catch(e){}},handleCategoriesData=async()=>{let{filterby:e,offer:a,...t}=W.query,l={...t,categoriesAll:"true"};await W.push({pathname:W.pathname,query:l}),G(1),X("");try{let e=await (0,o.uP)(V,B,_,ek[0],ek[1],$,Q);U(e)}catch(e){}},{isFetching:eP}=(0,d.a)([A,B],async()=>{let e=await (0,o.Yq)(eS,B);return Y(e),e}),{isFetching:eI}=(0,d.a)([B],async()=>{let e=await (0,o.uP)(V,B,_,ek[0],ek[1],$,Q);return U(e),e},{enabled:!!F});useDebounceEffect(()=>{if(O.current){O.current=!1;return}L&&T(L)},[L],100);let eq=(0,n.useCallback)(async()=>{try{let e;return M(!0),A?e=await (0,o.Yq)(eS,B):F?e=await (0,o.uP)(V,B,_,ek[0],ek[1],$,Q):L&&(e=await (0,o.uP)(V,B,L,ek[0],ek[1],$,Q)),U(e),e}catch(e){throw console.error("Error fetching products:",e),e}},[L,A,F,_,eS,B,V,ek,$,Q]),{data:eZ,isFetching:eW}=(0,d.a)(["products",A,F,L,B,V,ek,$,Q],eq,{onError:e=>{M(!1),(null==e?void 0:e.status)===404&&W.push("/page-not-found")},refetchOnWindowFocus:!1,enabled:!!L||!!A||!!F,onSuccess:e=>{M(!1),U(e)}}),e_=null==eZ?void 0:null===(s=eZ.data)||void 0===s?void 0:s.map(e=>{var a,t,l,n;return{...e,isFav:!!es&&(null==es?void 0:null===(a=es.data)||void 0===a?void 0:a.length)>0&&(null==es?void 0:null===(t=es.data)||void 0===t?void 0:t.some(a=>(null==a?void 0:a.product_id)===(null==e?void 0:e.id))),favId:es&&(null==es?void 0:null===(l=es.data)||void 0===l?void 0:l.length)>0?null==es?void 0:null===(n=es.data.find(a=>a.product_id===(null==e?void 0:e.id)))||void 0===n?void 0:n.id:0}});return(0,n.useEffect)(()=>{ep&&em((null==ep?void 0:ep.description)||"")},[ep]),(0,n.useEffect)(()=>{""===V&&handleSearch()},[V]),(0,n.useEffect)(()=>{let handlePopState=()=>{let{asPath:e}=W;e.includes("filterby")&&W.push("/")};return window.addEventListener("popstate",handlePopState),()=>{window.removeEventListener("popstate",handlePopState)}},[W]),(0,n.useEffect)(()=>{T(L)},[R]),(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"container pb-8 md:!pb-[88px]",children:[(0,l.jsx)("div",{className:"grid grid-cols-12 md:gap-[30px]",children:(0,l.jsx)("div",{className:"col-span-12",children:(0,l.jsx)("div",{className:"mb-[20px] mt-[20px] lg:mt-[48px] md:mt-0",children:(0,l.jsxs)("div",{className:"flex justify-between items-center",children:[(0,l.jsx)("div",{className:"flex flex-col restaurant-list",children:(0,l.jsxs)("span",{className:"xs:text-[28px] text-base pr-[10px] leading-7 text-gray-50 font-bold",children:[null==ep?void 0:ep.name," Menu"]})}),(0,l.jsxs)("div",{className:"flex items-center justify-between bg-gray-100 px-[0px] py-[12px] xs:px-[16px] rounded-lg h-[56px] w-[398px]",children:[(0,l.jsx)(y.I,{type:"text",placeholder:"Search Products",value:V,onChange:e=>X(e.target.value),onKeyDown:e=>{"Enter"===e.key&&handleSearch()},className:"border-none text-slate-850 bg-transparent placeholder:text-gray-150 text-sm focus-visible:outline-none focus-visible:ring-offset-transparent focus:border-none focus:outline-0 w-full max-w-xs !shadow-none !outline-none md:max-w-2xl"}
1),(0,l.jsx)(b.z,{className:"h-full bg-transparent rounded-r-md rounded-l-none",name:"Search Icon",onClick:handleSearch,children:(0,l.jsx)(p.Z,{})})]})]})})})}),(0,l.jsxs)("div",{className:"grid grid-cols-12 md:gap-[30px]",children:[(0,l.jsxs)("div",{className:"order-last col-span-12 md:order-first md:col-span-3 right-sidebar",children:[(0,l.jsxs)("div",{className:"mb-[20px] mt-[40px] md:mt-0",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold text-primary mb-[16px]",children:"Filter By"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("button",{onClick:handleCategoriesData,className:"text-slate-850 font-semibold font-base mb-3.5",children:"Categories"}),(null==K?void 0:null===(k=K.data)||void 0===k?void 0:k.length)>0&&(0,l.jsx)("div",{className:"",children:(0,l.jsxs)("button",{onClick:handleOfferData,className:"flex text-primary !font-medium !text-base mb-3.5 light-primary rounded px-[8px] py-[8px]",children:[(0,l.jsx)(r(),{src:i.UT,className:"flex img-fluid mr-[5px]",width:20,height:20,alt:"basket"}),"Offer Items"]})}),(0,l.jsx)(categorySidebar,{category:ep,subCategoryId:eC})]}),(0,l.jsx)("div",{className:"border-b border-gray-100 mt-[10px] mb-[20px]"})]}),(0,l.jsx)("div",{children:(0,l.jsx)(j.Z,{})})]}),H?(0,l.jsx)("div",{className:"col-span-12 md:col-span-9",children:(0,l.jsx)("div",{className:"",children:(0,l.jsx)("div",{className:"grid grid-cols-12 gap-4",children:(0,l.jsx)("div",{className:"col-span-12",children:(0,l.jsx)(w.Z,{})})})})}):(0,l.jsxs)("div",{className:"col-span-12 md:col-span-9",children:[(0,l.jsxs)("div",{className:"md:mb-[90px] mb-[40px]",children:[void 0===e_&&(0,l.jsx)("p",{className:"text-gray-250 relative border rounded-lg card border-gray-100 px-[12px] md:px-[24px] py-[12px] mb-[12px]",children:"Please wait..."}),(null==e_?void 0:e_.length)===0?(0,l.jsx)(v.Z,{}):(0,l.jsx)(l.Fragment,{children:e_&&e_.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row px-[30px] py-[10px] mb-[30px] bg-blue-100 rounded-lg",children:[(0,l.jsx)("div",{className:"flex-1 flex items-center mb-4 sm:mb-0 gap-[15px]",children:(0,l.jsxs)("p",{className:"text-white text-lg font-semibold rounded leading-[20px]",children:["There Are ",null==e_?void 0:e_.length," Products."]})}),(0,l.jsxs)("div",{className:"flex items-center gap-[10px]",children:[(0,l.jsx)("p",{className:"text-white text-sm font-medium leading-[20px] p-2",children:"Sort By:"}),(0,l.jsx)(N.Z,{sortChange:e=>{"asc"===e||"desc"===e?(J(e),ee("")):("low"===e||"high"===e)&&(ee(e),J(""))}})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-12 gap-4",children:(0,l.jsx)("div",{className:"col-span-12",children:null==e_?void 0:e_.map((e,a)=>(0,l.jsx)(S.Z,{setProductModalId:eo,product:e,cartItem:null==ec?void 0:ec.cartProducts.find(a=>{var t;return(null==a?void 0:null===(t=a.product)||void 0===t?void 0:t.id)===(null==e?void 0:e.id)})},"app-cat-products-".concat(null==e?void 0:e.id)))})})]})})]}),(null==eZ?void 0:null===(C=eZ.meta)||void 0===C?void 0:null===(E=C.pagination)||void 0===E?void 0:E.total)>16&&(0,l.jsx)(x.Z,{totalPages:null==eZ?void 0:null===(I=eZ.meta)||void 0===I?void 0:null===(P=I.pagination)||void 0===P?void 0:P.total_pages,currentPage:null==eZ?void 0:null===(Z=eZ.meta)||void 0===Z?void 0:null===(q=Z.pagination)||void 0===q?void 0:q.current_page,pageChange:e=>{G(e),window.scrollTo({top:0,behavior:"smooth"})}})]})]})]})})};var _=!0,A=CategoriesListing;CategoriesListing.getLayout=e=>{let a=null==e?void 0:e.props;return(0,l.jsx)(k.Z,{configData:a,children:e})}},21927:function(e,a,t){t.d(a,{c:function(){return getProductByTagId},k:function(){return getTagList}});
1var l=t(10859),n=t(95844);let s=n.v.gateway.apiEndPoint1,getTagList=async()=>{try{let e=await l.ZP.get("/".concat(s,"/tags"));return e.data}catch(e){throw e}},getProductByTagId=async(e,a,t,n,r,i,d)=>{try{let o=await l.ZP.get("/".concat(s,"/products"),{params:{keyword:e,page:a,tagId:t,maxPrice:n,minPrice:r,sortBy:i,priceOrder:d}});return o.data}catch(e){throw e}}},10209:function(e,a,t){var l=t(11527),n=t(21343),s=t(50959),r=t(81858);a.Z=e=>{let{sortChange:a}=e,[t,i]=(0,s.useState)("Please Select"),handleTypeChange=e=>{i(e)};return(0,l.jsx)("div",{className:"flex-grow md:flex-grow-0",children:(0,l.jsxs)(r.h_,{children:[(0,l.jsxs)(r.$F,{className:" w-full bg-transparent border px-4 py-2 border-white rounded-lg md:min-w-full lg:min-w-[250px] whitespace-nowrap text-white text-sm font-medium flex gap-1 justify-between items-center focus:outline-none",children:[(0,l.jsx)("span",{className:"capitalize",children:t}),(0,l.jsx)(n.Z,{})]}),(0,l.jsxs)(r.AW,{align:"end",className:"min-w-[250px] p-0 rounded-sm",children:[(0,l.jsx)(r.Xi,{disabled:!0,className:"pointer-events-none bg-slate-150 hover:bg-none",children:(0,l.jsx)("span",{className:"border-0 rounded-none bg-none hover:!bg-none opacity-25",children:"Please Select"})}),[{label:"A to Z",value:"asc"},{label:"Z to A",value:"desc"},{label:"Price (Low > High)",value:"low"},{label:"Price (High > Low)",value:"high"}].map(e=>(0,l.jsx)(r.Xi,{className:"cursor-pointer rounded-none font-normal py-2.5 text-black hover:!bg-[#f5faff] hover:!text-black ".concat(t===e.label?"bg-[#ebf5ff]":"!bg-transparent"),onClick:()=>{handleTypeChange(e.label),a(e.value)},children:(0,l.jsx)("span",{className:"border-0 rounded-none bg-none hover:!bg-transparent",children:e.label})},null==e?void 0:e.value))]})]})})}},88674:function(e,a,t){var l=t(11527),n=t(21927),s=t(43521),r=t(13865),i=t.n(r),d=t(96230);a.Z=()=>{var e;let a=(0,d.useRouter)(),{id:t}=a.query,{data:r}=(0,s.a)({queryKey:["getTagList"],queryFn:n.k});return(0,l.jsx)(l.Fragment,{children:(null==r?void 0:r.data.length)>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:"text-gray-50 mb-[24px] text-xl font-semibold",children:"Popular Tag"}),(0,l.jsx)("div",{className:"flex flex-wrap",children:null==r?void 0:null===(e=r.data)||void 0===e?void 0:e.map(e=>(0,l.jsx)("div",{className:"mb-[20px]",children:(0,l.jsx)(i(),{href:{pathname:"/tag",query:{id:null==e?void 0:e.slug}},"aria-label":"sidebar-".concat(null==e?void 0:e.slug),className:"border border-gray-100 font-normal  px-[16px] py-[7px] mb-[10px] rounded-[20px] capitalize m-1 text-sm leading-[20px] transition-all delay-100 duration-300 hover:bg-blue-100 hover:text-white hover:border-blue-100 ".concat(e.slug==t?"bg-gray-100 text-gray-50e":"bg-gray-100 text-gray-50"),children:null==e?void 0:e.name})},"categories-".concat(null==e?void 0:e.id)))})]})})}},88247:function(e,a,t){t.d(a,{I1:function(){return c}});var l=t(11527),n=t(50959),s=t(60860),r=t(54717);let i=(0,r.Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),d=(0,r.Z)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var o=t(54917);let c=s.fC,u=n.forwardRef((e,a)=>{let{className:t,...n}=e;return(0,l.jsx)(s.ck,{ref:a,className:(0,o.cn)("border-b",t),...n})});u.displayName="AccordionItem";let h=n.forwardRef((e,a)=>{let{className:t,children:n,...r}=e;return(0,l.jsx)(s.h4,{className:"flex",children:(0,l.jsxs)(s.xz,{ref:a,className:(0,o.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>.plus]:hidden [&>.minus]:hidden [&[data-state=open]>.minus]:block",t),...r,children:[n,(0,l.jsx)(i,{className:"w-4 h-4 transition-transform duration-200 shrink-0 plus"}),(0,l.jsx)(d,{className:"w-4 h-4 transition-transform duration-200 shrink-0 minus"})]})})});h.displayName=s.xz.displayName;let m=n.forwardRef((e,a)=>{let{className:t,children:n,...r}=e;return(0,l.jsx)(s.VY,{ref:a,className:(0,o.cn)("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",t),...r,children:(0,l.jsx)("div",{className:"pt-0 pb-4",children:n})})});m.displayName=s.VY.displayName}}]);

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.