PageSourceSearch

https://www.komeykaya.cl/_next/static/chunks/pages/_sites/[site]/menu/[id]-3a65151e2b587020.js

js komeykaya.cl collected 2026-09-24 11:07:45 UTC 17,188 bytes, 5 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7145],{94184:function(e,t){var s;/*!
2  Copyright (c) 2018 Jed Watson.
3  Licensed under the MIT License (MIT), see
4  http://jedwatson.github.io/classnames
5*/!function(){"use strict";var o={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var s=arguments[t];if(s){var r=typeof s;if("string"===r||"number"===r)e.push(s);else if(Array.isArray(s)){if(s.length){var i=n.apply(null,s);i&&e.push(i)}}else if("object"===r){if(s.toString===Object.prototype.toString)for(var l in s)o.call(s,l)&&s[l]&&e.push(l);else e.push(s.toString())}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0!==(s=(function(){return n}).apply(t,[]))&&(e.exports=s)}()},48114:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[site]/menu/[id]",function(){return s(82901)}])},38260:function(e,t,s){"use strict";s.d(t,{H:function(){return n}});var o=s(45697);let n=(0,o.arrayOf)((0,o.shape)({url:o.string.isRequired}))},4450:function(e,t,s){"use strict";s.d(t,{p:function(){return o}});let o=e=>{var t;if((null==e?void 0:e.price)!==0)return!1;let s=null===(t=e.product)||void 0===t?void 0:t.modifiers;return!Array.isArray(s)||s.length>0}},44674:function(e,t,s){"use strict";s.d(t,{DU:function(){return _},N:function(){return a},T4:function(){return l}});var o=s(82892),n=s(92077),r=s.n(n);let i={round:"0,0",decimal:"0,0.00"},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.N.currencySymbol;return"".concat(t," ").concat(r()(e).format(o.N.withCents?i.decimal:i.round))},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.N.currencySymbol;return"".concat(t," ").concat(r()(e).format(i.round))},_=(e,t)=>Math.round(e*t/100)},82901:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return J},default:function(){return Q}});var o=s(85893),n=s(67294),r=s(26628),i=s(94184),l=s.n(i),a=s(4376),_=s(18413),c=s(25675),d=s.n(c),u=s(45697),m=s(63253),p=s(54479),y=s(27484),h=s.n(y),f=s(78789),g=s(57456),v=s(82892);let x="menu",N=e=>{let{categoriesMenuisOpen:t,productInfoisOpen:s}=e,[o,r]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>window.scrollY>75||t||s?r(!0):r(!1);return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[t,o,s]),{isScrolled:o}},w=()=>{let{priceGroups:e}=(0,r.v9)(e=>{var t;return null===(t=e.menu)||void 0===t?void 0:t.publicMenu})||{},t=(0,r.v9)(e=>{var t;return null===(t=e.order)||void 0===t?void 0:t[g.sp.FUTURE_ORDER]}),s=null==e?void 0:e.reduce((e,s)=>{let o=s.prices.filter(e=>{let{product:s}=e,o=(null==t?void 0:t.date)&&(null==t?void 0:t.time)?h().tz("".concat(t.date," ").concat(t.time),"YYYY-MM-DD HH:mm",v.N.timezone).toDate():null,n=(0,f.oi)(s,{when:o});return n.available});return e.push({...s,prices:o}),e},[]);return{priceGroups:s}},b=()=>{let e=(0,r.I0)(),t=(0,n.useRef)({}),{priceGroups:s}=(0,r.v9)(e=>{var t;return null===(t=e.menu)||void 0===t?void 0:t.publicMenu})||{},[o,i]=(0,n.useState)([]);return(0,n.useEffect)(()=>{s&&i(s.map(e=>(t.current["category".concat(e.id)]=(0,n.createRef)(),e.id)))},[t,s]),{catRefs:t,expandedCategories:o,openCategoriesMenu:()=>{e(m.ZP.openModal(a.ee.PUBLIC_MENU_CATEGORIES))},handleCategory:e=>{setTimeout(()=>{if(t.current["category".concat(e.id)].current){let s=t.current["category".concat(e.id)].current.getBoundingClientRect().top,o=s+window.scrollY-57;window.scrollTo({top:o<=93?0:o,behavior:"smooth"})}})},setExpandedCategories:i}};var j=s(15569),C=s.n(j);let I=e=>{let{handleCategory:t,setExpandedCategories:s}=e,n=(0,r.I0)(),{priceGroups:i}=w(),l=(0,r.v9)(e=>e.modal["".concat(a.ee.PUBLIC_MENU_CATEGORIES,"ModalIsOpen")]),c=()=>{n(m.ZP.clearModals())},d=e=>()=>{c(),s(t=>[...t,e.id]),t(e)};return(0,o.jsx)(p.dy,{open:l,onOpenChange:c,children:(0,o.jsx)(p.sc,{children:(0,o.jsx)("div",{className:"flex column full-height mt-16",children:(0,o.jsx)("div",{className:C().content,children:null==i?void 0:i.map(e=>{var t;return(0,_.Ip)(e.prices)&&(0,o.jsxs)("div",{className:C().category,onClick:d(e),children:[(0,o.jsxs)("div",{className:"flex row middle",children:[(0,o.jsx)("span",{className:C().categoryName,children:e.name}),(0,o.jsx)("span",{className:C().categoryCount,children:"(".concat(null===(t=e.prices)||void 0===t?void 0:t.length,")")})]}),(0,o.jsx)("i",{className:"icon-arrow-right ".concat(C().arrow)})]},e.id)})})})})})};I.propTypes={handleCategory:u.func,setExpandedCategories:u.func};var O=s(6575),T=s.n(O),P=s(38260),E=s(26982),M=s(4450),R=s(44674),D=s(73416),U=s.n(D);let L=e=>{let{item:t}=e,s=(0,M.p)(t),n=(null==t?void 0:t.discountPrice)<(null==t?void 0:t.price);return(0,o.jsx)("div",{children:s?(0,o.jsx)("span",{className:U().seeOptions,children:E.ZP.t("CategoryItem:seeOptions")}):(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:l()(U().price,{[U().disabled]:n}),children:(0,R.T4)(null==t?void 0:t.price)}),n&&(0,o.jsx)("span",{className:U().price,children:(0,R.T4)(null==t?void 0:t.discountPrice)})]})})};L.propTypes={item:(0,u.shape)({discountPrice:u.number,id:u.number,price:u.number})};var F=s(709),H=s.n(F);let S=e=>{var t;let{categoryItem:s,setProductInfo:n}=e,i=(0,r.I0)(),_=s.product.pictures[0],c=(null==_?void 0:null===(t=_.cropperUrl)||void 0===t?void 0:t.small)||(null==_?void 0:_.url),u=(0,f.oi)(s.product,{when:null}),p=u.available;return p?(0,o.jsxs)("div",{className:l()(H().container,{[H().noImg]:!c}),onClick:()=>{n(s),i(m.ZP.openModal(a.ee.PRODUCT_INFO))},children:[!!c&&(0,o.jsx)(d(),{src:c,loading:"lazy",alt:s.product.name,className:H().productImage,width:100,height:100}),(0,o.jsxs)("div",{className:H().infoContainer,children:[(0,o.jsxs)("span",{className:H().name,children:[s.product.name," "]}),(0,o.jsx)(L,{item:s}),(0,o.jsx)("span",{className:H().description,children:s.product.description})]})]}):null};S.propTypes={categoryItem:(0,u.shape)({channel:u.string,discountPrice:u.number,id:u.number,price:u.number,product:{description:u.string,id:u.number,name:u.string,pictures:(0,u.arrayOf)(P.H)}}),setProductInfo:u.func};let Z=n.forwardRef((e,t)=>
5{let{category:s,setProductInfo:n,expanded:r,setExpandedCategories:i}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:T().container,ref:t.current["category".concat(s.id)],onClick:()=>{i(e=>e.includes(s.id)?e.filter(e=>e!==s.id):[...e,s.id])},children:[(0,o.jsx)("span",{className:T().categoryName,children:s.name}),(0,o.jsxs)("div",{className:"row center",children:[(0,o.jsx)("span",{className:T().categoryCount,children:"(".concat(s.prices.length,")")}),(0,o.jsx)("span",{className:l()("material-icons-outlined",T().expandIcon,{[T().rotate]:!r}),children:"expand_more"})]})]}),r&&(0,o.jsx)("div",{children:s.prices.map(e=>(0,o.jsx)(S,{categoryItem:e,setProductInfo:n},e.id))})]})});Z.displayName="Category",Z.propTypes={category:(0,u.shape)({name:u.string}),expanded:u.bool,setExpandedCategories:u.func,setProductInfo:u.func};var k=s(86978),B=s.n(k),V=s(97389),G=s.n(V);let X=e=>{var t;let{item:s,setProductInfo:i}=e,c=(0,r.I0)(),u=(0,r.v9)(e=>e.modal["".concat(a.ee.PRODUCT_INFO,"ModalIsOpen")]),y=(0,n.useRef)(null),h=(0,n.useRef)(null),f=null==s?void 0:s.product.pictures[0],g=(null==f?void 0:null===(t=f.cropperUrl)||void 0===t?void 0:t.medium)||(null==f?void 0:f.url),[v,x]=(0,n.useState)(300),[N,w]=(0,n.useState)(0);(0,n.useEffect)(()=>{let e=setTimeout(()=>{y.current&&0===v&&x(y.current.clientHeight)},500);return()=>clearTimeout(e)});let b=e=>{let{target:t}=e;w(Math.max(0,t.scrollTop))};(0,n.useEffect)(()=>()=>{h.current&&h.current.removeEventListener("scroll",b)},[]);let j=e=>{e.preventDefault()};return(0,o.jsx)(p.dy,{open:u,onOpenChange:e=>{e||(w(0),i(null))},children:(0,o.jsxs)(p.sc,{side:"bottom",className:"max-h-[95vh] rounded-t-lg border-none overflow-hidden",onEscapeKeyDown:j,onInteractOutside:j,children:[(0,o.jsxs)("div",{ref:y,className:l()(G().headerContainer),style:{height:Math.max(100,v-N)},children:[(0,o.jsx)("span",{className:"material-icons-outlined ".concat(G().close),onClick:()=>{w(0),c(m.ZP.clearModals())},children:"close"}),(0,o.jsxs)("div",{className:l()(G().header,{[G().noImg]:!g}),children:[!!g&&(0,o.jsx)(d(),{src:g,style:{filter:"blur(".concat(N/v*10,"px)"),transform:"scale(".concat(1+N/v,")")},width:300,height:300,alt:null==s?void 0:s.product.name}),(0,o.jsxs)("div",{className:l()(G().title,{[G().noImg]:!g}),style:{bottom:Math.min(v-100,N)},children:[(0,o.jsx)("span",{children:null==s?void 0:s.product.name}),(0,o.jsx)(L,{item:s})]})]})]}),(0,o.jsxs)("div",{ref:e=>{h.current=e,h.current&&h.current.addEventListener("scroll",b)},className:G().scrollContainer,children:[(0,o.jsx)("div",{style:{height:v}}),(0,o.jsxs)("div",{className:G().content,children:[(0,o.jsx)("span",{className:G().description,children:null==s?void 0:s.product.description}),(0,_.Ip)(null==s?void 0:s.product.modifiers)&&(null==s?void 0:s.product.modifiers.map(e=>(0,o.jsxs)("div",{className:G().modifier,children:[(0,o.jsxs)("span",{className:G().modifierName,children:[" ",e.name," "]}),e.children.map(e=>(0,o.jsxs)("div",{className:G().modifierOption,children:[(0,o.jsxs)("span",{children:[" ",e.name," "]}),(0,o.jsxs)("span",{children:[" ",(0,R.T4)(e.price)," "]})]},e.id))]},e.id)))]})]})]})})};X.propTypes={item:(0,u.shape)({channel:u.string,discountPrice:u.number,id:u.number,price:u.number,product:{description:u.string,id:u.number,name:u.string,pictures:(0,u.arrayOf)(P.H)}}),setProductInfo:u.func};var Y=()=>{let e=(0,r.v9)(e=>{var t;return null===(t=e.modal)||void 0===t?void 0:t["".concat(a.ee.PUBLIC_MENU_CATEGORIES,"ModalIsOpen")]}),t=(0,r.v9)(e=>e.modal["".concat(a.ee.PRODUCT_INFO,"ModalIsOpen")]),{isScrolled:s}=N({categoriesMenuisOpen:e,productInfoisOpen:t}),{priceGroups:i}=w(),{catRefs:c,expandedCategories:u,openCategoriesMenu:m,handleCategory:p,setExpandedCategories:y}=b(),{primaryLogo:h,commerceName:f}=(0,r.v9)(e=>e.core.settings),[g,v]=(0,n.useState)(null);return(0,o.jsxs)("div",{"data-testid":"public-menu",children:[(0,o.jsxs)("div",{className:l()(B().header,B().fixed,{[B().scrolled]:s}),"data-testid":"fix-header",children:[(0,o.jsx)("span",{className:l()("material-icons",B().menu,{[B().scrolled]:s}),onClick:m,children:x}),(0,o.jsx)("span",{className:B().companyName,children:f})]}),(0,o.jsxs)("div",{className:l()(B().header),children:[(0,o.jsx)("span",{className:l()("material-icons",B().menu),onClick:m,children:x}),(0,o.jsx)(d(),{src:h,alt:"logo",className:B().logo,width:100,height:100})]}),(0,o.jsx)("div",{className:B().content,children:null==i?void 0:i.map(e=>(0,_.Ip)(e.prices)&&(0,o.jsx)(Z,{category:e,ref:c,setProductInfo:v,expanded:null==u?void 0:u.includes(e.id),setExpandedCategories:y},e.id))}),(0,o.jsx)(I,{handleCategory:p,setExpandedCategories:y}),(0,o.jsx)(X,{item:g,setProductInfo:v})]})},K=s(31974);let A=()=>(0,o.jsx)(Y,{});A.getLayout=function(e){return(0,o.jsx)(K.p,{children:e})};var J=!0,Q=A},15569:function(e){e.exports={navbarHeight:"70px",animate__animated:"styles_animate__animated__xGmsb",animateAnimated:"styles_animate__animated__xGmsb",modal:"styles_modal__Kh4gM",show:"styles_show__seUtN","show-from-right":"styles_show-from-right__Nepfy",showFromRight:"styles_show-from-right__Nepfy",hide:"styles_hide___goAI","hide-to-left":"styles_hide-to-left__huiTg",hideToLeft:"styles_hide-to-left__huiTg","modal
5-overlay":"styles_modal-overlay__n6YUX",modalOverlay:"styles_modal-overlay__n6YUX","soft-in":"styles_soft-in__yZTR7",softIn:"styles_soft-in__yZTR7","soft-out":"styles_soft-out__ejhXV",softOut:"styles_soft-out__ejhXV",header:"styles_header__vdFBl","close-icon":"styles_close-icon__H7HmP",closeIcon:"styles_close-icon__H7HmP",content:"styles_content__8VX4X",category:"styles_category___Rei6",arrow:"styles_arrow__MX_73","category-name":"styles_category-name__Mai56",categoryName:"styles_category-name__Mai56","category-count":"styles_category-count__pdPkO",categoryCount:"styles_category-count__pdPkO",appear:"styles_appear__aXEu_",float:"styles_float__J52zI",grow:"styles_grow__eQ2ON","slide-down":"styles_slide-down__Z19O_",slideDown:"styles_slide-down__Z19O_","slide-up":"styles_slide-up__8Jo1f",slideUp:"styles_slide-up__8Jo1f","slide-right":"styles_slide-right__GVdVQ",slideRight:"styles_slide-right__GVdVQ","slide-left":"styles_slide-left__9llN0",slideLeft:"styles_slide-left__9llN0",bounce:"styles_bounce__OhJ3D",rubber:"styles_rubber__WFMcT","scale-in-hor-right":"styles_scale-in-hor-right__Viw2g",scaleInHorRight:"styles_scale-in-hor-right__Viw2g","scale-in-hor-left":"styles_scale-in-hor-left__vQwCr",scaleInHorLeft:"styles_scale-in-hor-left__vQwCr","show-from-bottom":"styles_show-from-bottom___zR_v",showFromBottom:"styles_show-from-bottom___zR_v","hide-to-bottom":"styles_hide-to-bottom__pWCbX",hideToBottom:"styles_hide-to-bottom__pWCbX"}},709:function(e){e.exports={container:"styles_container___wDZe","product-image":"styles_product-image___Oaye",productImage:"styles_product-image___Oaye",noImg:"styles_noImg__4yXU4","info-container":"styles_info-container__9rcot",infoContainer:"styles_info-container__9rcot",name:"styles_name__sInbc","see-options":"styles_see-options__qK406",seeOptions:"styles_see-options__qK406",description:"styles_description__puPOD"}},6575:function(e){e.exports={navbarHeight:"70px",container:"styles_container__moISs","category-name":"styles_category-name__x7JGN",categoryName:"styles_category-name__x7JGN","count-container":"styles_count-container__CPu5F",countContainer:"styles_count-container__CPu5F","category-count":"styles_category-count__oivso",categoryCount:"styles_category-count__oivso","expand-icon":"styles_expand-icon__wZ49b",expandIcon:"styles_expand-icon__wZ49b",rotate:"styles_rotate__TeAio"}},73416:function(e){e.exports={price:"styles_price__wRP9q",disabled:"styles_disabled__IDx72","see-options":"styles_see-options__akd7v",seeOptions:"styles_see-options__akd7v"}},97389:function(e){e.exports={navbarHeight:"70px",animate__animated:"styles_animate__animated__hosfK",animateAnimated:"styles_animate__animated__hosfK",modal:"styles_modal__POazb",show:"styles_show__K3y9C","show-from-bottom":"styles_show-from-bottom__Puv4v",showFromBottom:"styles_show-from-bottom__Puv4v",hide:"styles_hide__qFCLr","hide-to-bottom":"styles_hide-to-bottom__LwH_R",hideToBottom:"styles_hide-to-bottom__LwH_R","modal-overlay":"styles_modal-overlay__hMhNg",modalOverlay:"styles_modal-overlay__hMhNg","soft-in":"styles_soft-in__moT_7",softIn:"styles_soft-in__moT_7","soft-out":"styles_soft-out__cnF3Z",softOut:"styles_soft-out__cnF3Z",close:"styles_close__sn9Lh","header-container":"styles_header-container__EVKGo",headerContainer:"styles_header-container__EVKGo",header:"styles_header__B_aNc","no-img":"styles_no-img__D0xMZ",noImg:"styles_no-img__D0xMZ",title:"styles_title__CNFEi",productName:"styles_productName__3fDiE","scroll-container":"styles_scroll-container__F9i52",scrollContainer:"styles_scroll-container__F9i52",content:"styles_content__LQ5aD",description:"styles_description__pgRvu",modifier:"styles_modifier__uGBdP","modifier-name":"styles_modifier-name__7QqMW",modifierName:"styles_modifier-name__7QqMW","modifier-option":"styles_modifier-option__N9J_u",modifierOption:"styles_modifier-option__N9J_u",appear:"styles_appear__9LpU4",float:"styles_float__y__sD",grow:"styles_grow__DTSLU","slide-down":"styles_slide-down__Ks9bZ",slideDown:"styles_slide-down__Ks9bZ","slide-up":"styles_slide-up__aQ_9a",slideUp:"styles_slide-up__aQ_9a","slide-right":"styles_slide-right__C7xFD",slideRight:"styles_slide-right__C7xFD","slide-left":"styles_slide-left__VGYTa",slideLeft:"styles_slide-left__VGYTa",bounce:"styles_bounce__ekmTV",rubber:"styles_rubber__dKwMP","scale-in-hor-right":"styles_scale-in-hor-right__NyB3J",scaleInHorRight:"styles_scale-in-hor-right__NyB3J","scale-in-hor-left":"styles_scale-in-hor-left__JlTQv",scaleInHorLeft:"styles_scale-in-hor-left__JlTQv","show-from-right":"styles_show-from-right__2yTBw",showFromRight:"styles_show-from-right__2yTBw","hide-to-left":"styles_hide-to-left__pM73u",hideToLeft:"styles_hide-to-left__pM73u"}},86978:function(e){e.exports={navbarHeight:"70px",header:"styles_header__CZ0ss",fixed:"styles_fixed__3KIze",scrolled:"styles_scrolled__PPhYn",menu:"styles_menu__va3Vw",logo:"styles_logo__aypjx","company-name":"styles_company-name__ZeYM0",companyName:"styles_company-name__ZeYM0",content:"styles_content__I4xXp"}},92703:function(e,t,s){"use strict";var o=s(50414);function n(){}function r(){}r.resetWarningCache=n,e.exports=function(){function e(e,t,s,n,r,i){if(i!==o){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
5:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:n};return s.PropTypes=s,s}},45697:function(e,t,s){e.exports=s(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},function(e){e.O(0,[3176,9306,9403,5675,1974,9774,2888,179],function(){return e(e.s=48114)}),_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.