PageSourceSearch

https://burgerking.no/385.017ed70129d53a28.js

js burgerking.no collected 2026-10-02 07:39:21 UTC 200,947 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdeazy=self.webpackChunkdeazy||[]).push([[385],{4385:(Ke,ie,p)=>{p.r(ie),p.d(ie,{MenuModule:()=>hs});var M=p(1747),d=p(9310),Oe=p(7398),Ze=p(1675),S=p(803),V=p(6372),F=p(5312),m=p(9102),v=p(3513),P=p(6354),e=p(7705),L=p(6375),C=p(3955);let ke=(()=>{class n{constructor(t,i,o,a){this.messageService=t,this.translate=i,this.router=o,this.store$=a}canActivate(t,i){return this.store$.select(v.Bz).pipe((0,P.T)(o=>null!==o||(F.c.features.ordering&&this.messageService.showInfoToast(this.translate.instant("restaurants.error.select-restaurant")),this.router.parseUrl(m.m.Restaurants))))}static{this.\u0275fac=function(i){return new(i||n)(e.KVO(L.b),e.KVO(C.c$),e.KVO(S.Ix),e.KVO(d.il))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const Ie=(n,s)=>{const t=(0,e.WQX)(S.Ix);return!!F.c.features.genericMenu||t.parseUrl("/")};let de=(()=>{class n{constructor(t){this.router=t}canActivate(t,i){return!!F.c.features.ordering||this.router.parseUrl(m.C.Menu)}static{this.\u0275fac=function(i){return new(i||n)(e.KVO(S.Ix))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var w=p(467),pe=p(3012),oe=p(8759),k=p(4843),y=p(6697),X=p(4006);let et=(()=>{class n{constructor(t,i,o){this.store=t,this.dialog=i,this.translate=o}canDeactivate(t,i,o){var a=this;return(0,w.A)(function*(){const r=yield a.getPromoData();return!(r&&!r.isOrderPromotion&&t.selectedMealValue&&t.selectedMealValue.externalId===r.selectedProduct?.externalId)||(yield a.agreedToLeave())})()}getPromoData(){return(0,k._)(this.store.select(v.cE).pipe((0,y.s)(1)))}agreedToLeave(){return(0,k._)(this.showPromoDialog().pipe((0,P.T)(t=>t===oe.G.Primary)))}showPromoDialog(){return this.dialog.open(pe.Ib,{panelClass:["custom-panel-dialog"],data:{title:this.translate.instant("error.dialog.clear-promo.title"),desc:this.translate.instant("error.dialog.clear-promo.desc"),buttonText:this.translate.instant("error.dialog.clear-promo.yes"),alternateButtonText:this.translate.instant("error.dialog.clear-promo.cancel"),disableClose:!1,dangerStyle:!1},disableClose:!1,closeOnNavigation:!0}).afterClosed().pipe((0,y.s)(1))}static{this.\u0275fac=function(i){return new(i||n)(e.KVO(d.il),e.KVO(X.bZ),e.KVO(C.c$))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var ue=p(250),me=p(4572),B=p(5245),N=p(8141),T=p(3643),ge=p(2820);const Q=(0,d.VP)("[Menu] Fetch restaurant menu"),se=(0,d.VP)("[Menu] Fetch generic menu"),ae=(0,d.VP)("[Menu] Fetch menu succesfull",(0,d.xk)()),he=(0,d.VP)("[Menu] Fetch menu failure"),ve=(0,d.VP)("[Ordering] Fetch key condiment",(0,d.xk)()),tt=(0,d.VP)("[Ordering] Fetch key condiment success",(0,d.xk)()),nt=(0,d.VP)("[Ordering] Fetch key condiment failure"),we=(0,d.VP)("[Menu] Fetch generic product details",(0,d.xk)()),Te=(0,d.VP)("[Menu] Fetch product details",(0,d.xk)()),U=(0,d.VP)("[Menu] Fetch product details successful",(0,d.xk)()),z=(0,d.VP)("[Menu] Fetch product details failure",(0,d.xk)()),it=(0,d.VP)("[Menu] Fetch nutrition data",(0,d.xk)()),Ee=(0,d.VP)("[Menu] Fetch nutrition data success",(0,d.xk)()),ot=(0,d.VP)("[Menu] Fetch nutrition data failure"),Re=(0,d.VP)("[Menu] Fetch restaurant details",(0,d.xk)()),_e=(0,d.VP)("[Menu] Fetch restaurant details success",(0,d.xk)()),De=(0,d.VP)("[Menu] Fetch restaurant details failure"),fe=(0,d.VP)("[Menu] Set anchor category",(0,d.xk)());var Fe=p(5771);function $e(n){return n&&"string"==typeof n?n.toLowerCase().replaceAll(" ","-"):""+n}const at=(0,d.vy)({details:null,nutritions:null},(0,d.on)(U,(n,{productDetails:s})=>({...n,details:{...s}})),(0,d.on)(z,(n,s)=>({...n,details:null})),(0,d.on)(Ee,(n,{data:s})=>({...n,nutritions:s?[...s]:null}
1))),lt=(0,d.vy)({categories:[],anchorCategory:null},(0,d.on)(ae,(n,{categories:s})=>({...n,categories:s.map(t=>({...t,slug:$e(t.categoryShortName||t.categoryLongName)}))})),(0,d.on)(fe,(n,{anchor:s})=>({...n,anchorCategory:s}))),re=(0,d.UX)(Oe.U.Menu),ct={product:at,menu:lt},Ge=(0,d.Mz)(re,n=>n.product),xe=((0,d.Mz)(Ge,n=>n.details),(0,d.Mz)(Ge,n=>n.nutritions),(0,d.Mz)(re,n=>n.menu?.categories)),K=(0,d.Mz)(re,n=>n.menu?.categories.filter(s=>s.items.some(t=>!t.outOfStock)||s.subcategories.some(t=>t.items.some(i=>!i.outOfStock)))),dt=(0,d.Mz)(K,Fe.Y7,(n,s)=>n&&n.find(t=>t.slug===s[m.C.CategoryRef])),pt=(0,d.Mz)(re,n=>n.menu?.anchorCategory);var Ce=p(2267);function ut(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-menu-page-categories",5),e.bVm()),2&n){const t=s.ngIf;e.R7$(1),e.Y8G("categories",t)}}function mt(n,s){if(1&n&&e.nrm(0,"app-menu-details-non-ordering-header",6),2&n){const t=e.XpG();e.Y8G("selectedMeal",t.meals[0])("showCalories",t.showCalories)}}function gt(n,s){if(1&n&&e.nrm(0,"app-menu-details-tile",10),2&n){const t=s.$implicit,i=e.XpG(2);e.Y8G("otherProduct",t)("showCalories",i.showCalories)}}function ht(n,s){if(1&n&&(e.j41(0,"div",7)(1,"h2",8),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,gt,1,2,"app-menu-details-tile",9),e.k0s()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,2,"menu.details.button.label")," "),e.R7$(2),e.Y8G("ngForOf",t.meals)}}function _t(n,s){if(1&n&&e.nrm(0,"app-menu-details-nutritional",12),2&n){const t=e.XpG(2);e.Y8G("meal",t.meals[0])("openedInOrdering",!1)}}function ft(n,s){if(1&n&&(e.qex(0),e.DNE(1,_t,1,2,"app-menu-details-nutritional",11),e.nI1(2,"async"),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.meals&&e.bMT(2,1,t.showNutritions$))}}let Ve=(()=>{class n{constructor(t,i,o,a,r,l,u,_){this.store=t,this.route=i,this.cd=o,this.router=a,this.actionsSubj=r,this.dialog=l,this.pageService=u,this.messageService=_,this.isLoading=!1,this.showCalories=!0,this.promotion=null,this.categories$=this.store.select(xe),this.showNutritions$=this.store.select(T.JI),this.isOrderingJourney=F.c.features.ordering,this.locationName=F.c.locationName,this.LocationNameEnum=ge.i8,this.section25Data={type:"S25",deviceLimiter:ue.i_.Mobile,titleFirstPart:"Getting",titleSecondPart:"Hungry?",description:"We believe in the power of good food and the effect it has on our people and our planet",textColor:"911987",accentColor:"911987",buttonCaption:"Start your order",link:{url:`/${m.m.Restaurants}`,isExternal:!1},backgroundColor:"FFC800",mediaUrl:"/assets/images/section25-mock.png",media2Url:"/assets/images/section25-img.webp"}}ngOnInit(){this.fetchProductDetails(),this.checkCategoriesBar(),this.setShowCalories(),this.setPromotion()}checkCategoriesBar(){var t=this;return(0,w.A)(function*(){const i=yield t.getMenuCategories();(!i||i.length<=0)&&t.store.dispatch(se())})()}getMenuCategories(){return(0,k._)(this.store.select(xe).pipe((0,y.s)(1)))}setShowCalories(){(0,me.z)([this.store.select(T.g7),this.store.select(T.Vz)]).subscribe(([t,i])=>this.showCalories=t&&!!i)}setPromotion(){this.store.select(v.cE).pipe((0,y.s)(1)).subscribe(t=>this.promotion=t)}fetchProductDetails(){var t=this;return(0,w.A)(function*(){const o=t.route.snapshot.params[m.C.ProductName];if(!o)return void t.messageService.showMenuItemUnavailableModal();t.isLoading=!0,t.store.dispatch(we({itemRef:o}));const a=yield t.getFetchProductDetailsResponse();t.isLoading=!1,a&&(t.meals=a.menuItems[0].mealTypes,t.pageService.setPageTitle(t.meals[0]?.productName),t.refreshView())})()}getFetchProductDetailsResponse(){return(0,k._)(this.actionsSubj.pipe((0,B.i)(1),(0,M.gp)(U,z),(0,y.s)(1),(0,N.M)(t=>{t.type===z.type&&this.handleFetchProductDetailsFailure(t.errors)}),(0,P.T)(t=>t.type===U.type?t.productDetails:null)))}handleFetchProductDetailsFailure(t){t.some(i=>"ItemUnavailableInRestaurant"===i.code)?this.messageService.showMenuItemUnavailableModal():this.messageService.showGenericErrorModal().afterClosed().pipe((0,y.s)(1)).subscribe(()=>this.router.navigate([m.C.Menu]))}refreshView(){this.cd.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(d.il),e.rXU(S.nX),e.rXU(e.gRc),e.rXU(S.Ix),e.rXU(d.SS),e.rXU(X.bZ),e.rXU(Ce.b),e.rXU(L.b))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details-non-ordering"]],decls:8,vars:6,consts:[[1,"menu-details"],[4,"ngIf"],[3,"selectedMeal","showCalories",4,"ngIf"],[1,"wrapper","wrapper-product-details"],["class","menu-details__meal-size",4,"ngIf"],[3,"categories"],[3,"selectedMeal","showCalories"],[1,"menu-details__meal-size"],[1,"menu-details__content-title"],[3,"otherProduct","showCalories",4,"ngFor","ngForOf"],[3,"otherProduct","showCalories"],[3,"meal","openedInOrdering",4,"ngIf"],[3,"meal","openedInOrdering"]],template:function(i,o){1&i&&(e.j41(0,"div",0),e.DNE(1,ut,2,1,"ng-container",1),e.nI1(2,"async"),e.DNE(3,mt,1,2,"app-menu-details-non-ordering-header",2),e.j41(4,"div",3),e.DNE(
15,ht,5,4,"div",4),e.DNE(6,ft,3,3,"ng-container",1),e.k0s()(),e.nrm(7,"app-loader")),2&i&&(e.R7$(1),e.Y8G("ngIf",e.bMT(2,4,o.categories$)),e.R7$(2),e.Y8G("ngIf",o.meals),e.R7$(2),e.Y8G("ngIf",o.meals&&o.meals.length>0),e.R7$(1),e.Y8G("ngIf",!o.isLoading))},styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.menu-details[_ngcontent-%COMP%]{background-color:#fbf7f1}.menu-details[_ngcontent-%COMP%]   .wrapper-product-details[_ngcontent-%COMP%]{padding-bottom:60px}@media (min-width: 1024px){.menu-details[_ngcontent-%COMP%]   .wrapper-product-details[_ngcontent-%COMP%]{max-width:600px}}.menu-details__content-title[_ngcontent-%COMP%]{margin-bottom:12px;font-size:20px;line-height:30px;font-weight:700}@media (min-width: 1024px){.menu-details__content-title[_ngcontent-%COMP%]{font-size:24px;line-height:34px}}.menu-details__meal-size-selection[_ngcontent-%COMP%]{margin-bottom:32px}.menu-details__meal-size-selection[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:block;margin-bottom:14px}.menu-details__meal-size-selection[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{margin-bottom:0}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]{margin-bottom:32px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:16px;font-size:24px;line-height:34px;font-style:normal;font-weight:700;color:#502314}.menu-details[_ngcontent-%COMP%]   .section__desc[_ngcontent-%COMP%]{margin-top:-14px;margin-bottom:12px;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:26px;font-weight:400;color:#502314}.menu-details[_ngcontent-%COMP%]   .section__error[_ngcontent-%COMP%]{margin-top:-4px;margin-bottom:8px;font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:26px;font-weight:400;text-align:center;color:#d62300}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{display:flex;cursor:pointer;align-items:center;justify-content:center;width:100%;background-color:transparent;border:2px solid #d62300;color:#d62300;border-radius:6px;height:48px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.modal[_ngcontent-%COMP%]{border:2px solid #d62300;background-color:transparent}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.modal[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:8px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.modal[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-style:normal;font-size:16px;line-height:24px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.add-order[_ngcontent-%COMP%]{border-radius:24px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.add-order[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-family:
1Flame Sans;font-style:normal;font-weight:700;font-size:16px;line-height:24px;color:#fff}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.add-order.faded[_ngcontent-%COMP%]{opacity:.3}.menu-details[_ngcontent-%COMP%]   .section.spice[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.menu-details[_ngcontent-%COMP%]   .section.meal-selection[_ngcontent-%COMP%]{margin-bottom:10px}.menu-details[_ngcontent-%COMP%]   .section.meal-selection[_ngcontent-%COMP%]   .meal-selection-item[_ngcontent-%COMP%]{margin-bottom:12px}.menu-details[_ngcontent-%COMP%]   .section.order-button[_ngcontent-%COMP%]{margin-top:32px}.menu-details__error[_ngcontent-%COMP%]{margin-top:32px;margin-bottom:-16px;padding:20px;background:#fff;display:flex;flex-flow:row nowrap;align-items:center}.menu-details__error[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{flex-shrink:0;margin-right:12px}.menu-details__error[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex-grow:1;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:16.8px;font-weight:400;color:#d90f06}"],changeDetection:0})}}return n})();var g=p(177),$=p(4655),E=p(465),j=p(6739);function xt(n,s){if(1&n&&(e.j41(0,"b"),e.EFF(1),e.nI1(2,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI("+",e.bMT(2,1,t.price),"")}}let Ct=(()=>{class n{constructor(t,i){this.dialogRef=t,this.data=i}get meal(){return this.data.comboBoxMeal}get price(){return this.meal.price-this.data.selectedMeal.price}agree(){this.dialogRef.close(!0)}reject(){this.dialogRef.close(!1)}close(){this.dialogRef.close(!1)}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(X.CP),e.rXU(X.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details-box-meals-dialog"]],decls:21,vars:22,consts:[["role","dialog","aria-modal","true","aria-labelledby","box-meal-dialog-title",1,"dialog"],["type","button",1,"dialog__close",3,"click"],["icon","close-black","aria-hidden","true",3,"width","height"],["id","box-meal-dialog-title",1,"dialog__title"],[1,"dialog__desc"],[1,"dialog__img"],[3,"src","alt"],["type","button",1,"dialog__button",3,"click"],[4,"ngIf"],["type","button",1,"dialog__button","alternate",3,"click"]],template:function(i,o){1&i&&(e.j41(0,"div",0)(1,"button",1),e.bIt("click",function(){return o.close()}),e.nI1(2,"translate"),e.nrm(3,"app-svg-icon",2),e.k0s(),e.j41(4,"h2",3),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"p",4),e.EFF(8),e.nI1(9,"translate"),e.k0s(),e.j41(10,"div",5),e.nrm(11,"img",6),e.nI1(12,"translate"),e.k0s(),e.j41(13,"button",7),e.bIt("click",function(){return o.agree()}),e.j41(14,"span"),e.EFF(15),e.nI1(16,"translate"),e.k0s(),e.DNE(17,xt,3,3,"b",8),e.k0s(),e.j41(18,"button",9),e.bIt("click",function(){return o.reject()}),e.EFF(19),e.nI1(20,"translate"),e.k0s()()),2&i&&(e.R7$(1),e.BMQ("aria-label",e.bMT(2,10,"menu.details.box-meal-dialog.aria.close-button")),e.R7$(2),e.Y8G("width",24)("height",24),e.R7$(2),e.SpI(" ",e.bMT(6,12,o.meal.upsellTitle||"menu.details.box-meal-dialog.title")," "),e.R7$(3),e.SpI(" ",e.bMT(9,14,o.meal.upsellDescription||"menu.details.box-meal-dialog.desc")," "),e.R7$(3),e.Y8G("src",o.meal.imageUrl,e.B4B)("alt",e.bMT(12,16,"general.alt.image-of")+o.meal.productName),e.R7$(4),e.JRh(e.bMT(16,18,"menu.details.box-meal-dialog.label.agree")),e.R7$(2),e.Y8G("ngIf",o.price>0),e.R7$(2),e.SpI(" ",e.bMT(20,20,"menu.details.box-meal-dialog.label.reject")," "))},dependencies:[g.bT,$.D,E.L,C.D9,j.g],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.dialog[_ngcontent-%COMP%]{width:100%;height:100%;padding:60px 24px 20px;border:none;border-radius:16px;background-color:#fff;position:relative;overflow-y:auto}.dialog[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{width:24px;height:24px}.dialog__close[_ngcontent-%COMP%]{display:inline-flex;position:absolute;top:0;right:0;padding:20px;border:none;background:transparent;cursor:pointer}.dialog__title[_ngcontent-%COMP%]{margin-top:0;margin-bottom:12px;font-size:32px;line-height:42px;font-weight:700;color:#f25600;text-align:center}.dialog__title.danger[_ngcontent-%COMP%]{color:#d90f06}.dialog__desc[_ngcontent-%COMP%]{margin:0;font-size:16px;line-height:26px;font-weight:400;color:#57585b;text-align:center}.dialog__desc[_ngcontent-%COMP%]   .no-wrap[_ngcontent-%COMP%]{white-space:nowrap}.dialog__img[_ngcontent-%COMP%]{max-width:500px;margin:34px auto 30px}.dialog__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.dialog__button[_ngcontent-%COMP%]{width:100%;margin-top:6px;padding:15px 15px 17px;font-size:18px;line-height:24px;font-weight:700;color:#fff;text-align:center;background:#FF7D00;border:none;border-radius:0;cursor:pointer;-webkit-user-select:none;user-select:none}.dialog__button.alternate[_ngcontent-%COMP%]{display:block;width:-moz-fit-content;width:fit-content;margin:8px auto 0;background:transparent;font-size:16px;color:#57585b;text-decoration:underline}.dialog__button[_ngcontent-%COMP%]   b[_ngcontent-%COMP%]{margin-left:6px}"]})}}return n})();var O=p(5496),I=p(9969),Ne=p(9417),b=p(2268),je=p(4891),q=function(n){return n.Classic="classic",n.Spicy="spicy",n}(q||{});const Me=()=>
1[c.AdditionalSides1,c.AdditionalSides2,c.AdditionalSides3,c.Sides,c.Drinks,c.Sauces];function be(n,s){if(!s||!n)return null;const t=s.menuBuilderSettings.comboExtraListsOrder;return Ae(t&&t.length?le(s.menuBuilderSettings.comboExtraListsOrder):Me(),n,s)}function Ae(n,s,t){const i=[c.Start,...n,c.Summary],o=i.findIndex(r=>r===s);if(o<0||!i[o+1])return null;for(let r=o+1;r<i.length;r++)if(Mt(i[r],t))return i[r];return c.Summary}function Mt(n,s){switch(n){case c.AdditionalSides1:return!!s.additionalSides1Limit&&!!s.additionalSides1?.length;case c.AdditionalSides2:return!!s.additionalSides2Limit&&!!s.additionalSides2?.length;case c.AdditionalSides3:return!!s.additionalSides3Limit&&!!s.additionalSides3?.length;case c.Sides:return!!s.sidesLimit&&!!s.sides?.length;case c.Drinks:return!!s.drinksLimit&&!!s.drinks?.length;case c.Sauces:return!!s.sauces?.length;default:return!1}}function le(n){return n.map(s=>function bt(n){switch(n){case O.EI.AdditionalSides1:return c.AdditionalSides1;case O.EI.AdditionalSides2:return c.AdditionalSides2;case O.EI.AdditionalSides3:return c.AdditionalSides3;case O.EI.Sides:return c.Sides;case O.EI.Drinks:return c.Drinks;case O.EI.Sauces:return c.Sauces;default:return null}}(s)).filter(s=>!!s)}var St=p(6474);function W(n,s=!1){return t=>{const o=t.controls.reduce((a,r)=>a+r.value.selectedIncluded,0);return o===n||o>n&&s?null:{[St.K.MenuItemExtrasLimit]:!0}}}var A=p(8359),G=p(5964),Be=p(3634),ce=p(5753);const yt=function(n){return{active:n}};function Pt(n,s){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"li")(2,"button",5),e.bIt("click",function(){const o=e.eBV(t),a=o.$implicit,r=o.index,l=e.XpG();return e.Njj(l.onCategoryClick(a,r))}),e.EFF(3),e.k0s()(),e.bVm()}if(2&n){const t=s.$implicit,i=e.XpG();e.R7$(2),e.Y8G("ngClass",e.eq3(3,yt,i.activeCategoryRef===t.slug)),e.BMQ("aria-current",i.activeCategoryRef===t.slug?"true":"false"),e.R7$(1),e.SpI(" ",t.categoryShortName||t.categoryLongName," ")}}function Ot(n,s){if(1&n){const t=e.RV6();e.j41(0,"button",6),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.openOffers())}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"general.button.see-offers")," "))}let Z=(()=>{class n{constructor(t,i,o,a,r,l,u,_,x){this.router=t,this.route=i,this.changeDetector=o,this.document=a,this.ngZone=r,this.renderer=l,this.componentRef=u,this.store$=_,this.pageService=x,this.isMobile=!0,this.isWebview=!1,this.activeCategoryRef=null,this.activeProductName=null,this.showOffers$=this.store$.select(T.YM).pipe((0,P.T)(h=>this.checkIfOffersAvailable(h))),this.sub=new A.yU,this.scrollListener=null}ngOnInit(){this.sub.add(this.store$.select(ce.LU).subscribe(t=>{this.isMobile=t===Be.bq.Mobile,this.refreshView()})),this.sub.add(this.route.params.subscribe(t=>{this.activeCategoryRef=t[m.C.CategoryRef],this.activeProductName=t[m.C.ProductName]})),this.sub.add(this.store$.select(ce.Vr).subscribe(t=>{this.isWebview=t,t?this.renderer.addClass(this.componentRef.nativeElement,"wvm"):this.renderer.removeClass(this.componentRef.nativeElement,"wvm")}))}ngAfterViewInit(){this.listenToScrollChange(),this.checkUrl()}ngOnDestroy(){this.removeScrollListener(),this.sub.unsubscribe()}onCategoryClick(t,i){this.router.url.includes(m.C.Order)?this.navigateTo(t):this.activeProductName?(this.store$.dispatch(fe({anchor:`category-${i}`})),this.router.navigate([m.C.Menu])):this.scrollToCategory(`category-${i}`)}openOffers(){this.router.navigate([m.C.Offers])}listenToScrollChange(){this.ngZone.runOutsideAngular(()=>{this.scrollListener=this.renderer.listen(this.document.defaultView,"scroll",()=>{this.applyScrollingStyle()})})}checkUrl(){var t=this;return(0,w.A)(function*(){const i=yield t.getAnchorCategory();i&&(t.store$.dispatch(fe({anchor:null})),setTimeout(()=>{t.scrollToCategory(i)},0))})()}scrollToCategory(t){this.pageService.scrollToPageAnchor(t,[0,this.isMobile?this.isWebview?60:130:70])}applyScrollingStyle(){const t=this.document.querySelector("app-menu-page .menu__header");this.isMobile&&this.document.defaultView&&this.document.defaultView.scrollY-(t?.clientHeight||0)>0?this.renderer.addClass(this.componentRef.nativeElement,"scrolling"):this.renderer.removeClass(this.componentRef.nativeElement,"scrolling")}navigateTo(t){this.router.navigate([m.C.Menu,m.C.Order,t.slug])}checkIfOffersAvailable(t){return!!t&&t.some(i=>new Date(i.endDate).getTime()>(new Date).getTime())}removeScrollListener(){this.scrollListener&&this.scrollListener()}getAnchorCategory(){return(0,k._)(this.store$.select(pt).pipe((0,y.s)(1)))}refreshView(){this.changeDetector.markForCheck()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix),e.rXU(S.nX),e.rXU(e.gRc),e.rXU(g.qQ),e.rXU(e.SKi),e.rXU(e.sFG),e.rXU(e.aKT),e.rXU(d.il),e.rXU(Ce.b))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-categories"]],inputs:{categories:"categories"},decls:8,vars:7,consts:[[1,"categories"],[1,"wrapper"],[1,"inner-container"],[4,"ngFor","ngForOf"],["class","categories__offers","type","button",3,"click",4,"ngIf"],["type","button",3,"ngClass","click"],["type","button",1,"categories__offers",3,"click"]],template:function(i,o){1&i&&(e.j41(0,"nav",0),e.nI1(1,"translate"),e.j41(2,"div",1)(3,"div",2)(4,"ul"),e.DNE(
15,Pt,4,5,"ng-container",3),e.k0s(),e.DNE(6,Ot,3,3,"button",4),e.nI1(7,"async"),e.k0s()()()),2&i&&(e.BMQ("aria-label",e.bMT(1,3,"menu.page-categories.aria.nav-label")),e.R7$(5),e.Y8G("ngForOf",o.categories),e.R7$(1),e.Y8G("ngIf",e.bMT(7,5,o.showOffers$)))},dependencies:[g.YU,g.Sq,g.bT,g.Jj,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}[_nghost-%COMP%]{display:block;position:sticky;position:-webkit-sticky;top:72px;z-index:200}@media (min-width: 1024px){[_nghost-%COMP%]{top:0}}.scrolling[_nghost-%COMP%]   .categories[_ngcontent-%COMP%]{box-shadow:0 10px 30px #5023141a}.wvm[_nghost-%COMP%]{top:0}.categories[_ngcontent-%COMP%]{background:#fbf7f1;border-bottom:1px solid #f5ebdc;transition:all .2s ease-out}@media (min-width: 1024px){.categories[_ngcontent-%COMP%]{border-bottom:none}}@media (max-width: 1023px){.categories[_ngcontent-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding:0}}.categories[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;overflow:auto;white-space:nowrap}@media (min-width: 1024px){.categories[_ngcontent-%COMP%]   .inner-container[_ngcontent-%COMP%]{border-bottom:1px solid #f5ebdc}}.categories[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:20px;margin-top:20px}@media (min-width: 1024px){.categories[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin-top:31px;margin-bottom:31px;padding-left:0;display:block}}.categories[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{display:inline-block;margin-right:24px;transition:color ease-in-out .2s;cursor:pointer}.categories[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border:none;background:transparent;color:#502314}.categories[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:hover, .categories[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   button.active[_ngcontent-%COMP%]{color:#d62300}.categories__offers[_ngcontent-%COMP%]{display:none;height:48px;width:157px;border:2px solid #d62300;border-radius:6px;color:#d62300;background-color:#fbf7f1;transition:color ease-in-out .2s;transition:background-color ease-in-out .2s}.categories__offers[_ngcontent-%COMP%]:hover{color:#e5e5e5;background-color:#c20}@media (min-width: 1024px){.categories__offers[_ngcontent-%COMP%]{display:block}}"],changeDetection:0})}}return n})();var ee=p(3241);const kt=["tile"];function It(n,s){1&n&&(e.nrm(0,"div",11),e.nI1(1,"translate")),2&n&&e.Y8G("innerHtml",e.bMT(1,1,"menu.details.most-popular.item.banner"),e.npT)}function vt(n,s){if(1&n&&e.nrm(0,"app-checkmark",12),2&n){const t=e.XpG();e.Y8G("isSelected",t.item.selected)}}function wt(n,s){if(1&n&&(e.j41(0,"span",13),e.EFF(1),e.nI1(2,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,t.item.price)," ")}}function Tt(n,s){if(1&n&&(e.j41(0,"span",13),e.EFF(1),e.nI1(2,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,t.item.fullPrice)," ")}}function Et(n,s){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.nI1(2,"number"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Lme(" ",e.i5U(2,2,t.item.calories,"1.0-0")," ",e.bMT(3,5,"menu.details.nutritions.kcal")," ")}}function Rt(n,s){1&n&&(e.j41(0,"span",15)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"menu.details.nutritions.out-of-stock")))}function Dt(n,s){if(1&n){const t=e.RV6();e.j41(0,"span",16)(1,"button",17),e.bIt("click",function(o){e.eBV(t);const a=e.XpG();return e.Njj(a.changeAmount(o,!1))}),e.nI1(2,"translate"),e.nrm(3,"app-svg-icon",18),e.k0s(),e.j41(4,"span",19),e.EFF(5),e.k0s(),e.j41(6,"button",20),e.bIt("click",function(o){e.eBV(t);const a=e.XpG();return e.Njj(a.changeAmount(o,!0))}),e.nI1(7,"translate"),e.nrm(8,"app-svg-icon",21),e.k0s()()}if(2&n){const t=e.XpG();e.AVh("show",t.item.selected),e.R7$(1),e.BMQ("aria-label",e.bMT(2,9,"menu.item-counter.aria.decrease-quantity")),e.R7$(4),e.JRh(t.item.selectedIncluded+t.item.selectedExtra),e.R7$(1),e.AVh("disabled",t.hasReachedIncluded&&!t.allowOverSelection),e.Y8G("disabled",t.hasReachedIncluded&&!t.allowOverSelection||null),e.BMQ("aria-label",e.bMT(7,11,"menu.item-counter.aria.increase-quantity")),e.R7$(2),e.Y8G("icon",t.hasReachedIncluded&&!t.allowOverSelection?"circle-plus2-faded":"circle-plus2")}}let Ft=(()=>{class n{constructor(){this.showCalories=!0,this.amountChanged=new e.bkB,this.selected=new e.bkB,this.mandatorySurcharges=[]}ngOnInit(){this.mandatorySurcharges=(this.item.condiments||[]).filter(t=>t.isMandatory)}select(){this.selected.emit()}changeAmount(t,i){i&&this.hasReachedIncluded&&!this.allowOverSelection||(t.stopPropagation(),this.item.selected&&1===this.item.selectedIncluded+this.item.selectedExtra&&!i&&this.focusTile(),this.amountChanged.emit(i))}focusTile(){this.tile&&this.tile.nativeElement.focus()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-meal-extras-list-item"]],viewQuery:function(i,o){if(1&i&&e.GBs(kt,5),2&i){let a;e.mGM(a=e.lsd())&&(o.tile=a.first)}},inputs:{item:"item",numberOfIncluded:"numberOfIncluded",hasReachedIncluded:"hasReachedIncluded",allowOverSelection:"allowOverSelection",showCalories:"showCalories"},outputs:{amountChanged:"amountChanged",selected:"selected"},decls:15,vars:20,consts:[["class","most-popular",3,"innerHtml",4,"ngIf"],["type","button",1,"tile",3,"click"],["class","tile__check","checkStyle","checkbox","aria-hidden","true",3,"isSelected",4,"ngIf"],[1,"tile__image"],[3,"src","alt"],[1,"tile__texts"],[1,"tile__title"],["class","tile__price",4,"ngIf"],["class","tile__kcal",4,"ngIf"],["class","tile__oos",4,"ngIf"],["class","tile__counter",3,"show",4,"ngIf"],[1,"most-popular",3,"innerHtml"],["checkStyle","checkbox","aria-hidden","true",1,"tile__check",3,"isSelected"],[1,"tile__price"],[1,"tile__kcal"],[1,"tile__oos"],[1,"tile__counter"],["type","button",1,"tile__counter-btn",3,"click"],["icon","circle-minus","size","large","aria-hidden","true"],[1,"tile__counter-value"],["type","button",1,"tile__counter-btn",3,"disabled","click"],["size","large","aria-hidden","true",3,"icon"]],template:function(i,o){1&i&&(e.DNE(0,It,2,3,"div",0),e.j41(1,"button",1),e.bIt("click",function(){return!o.item.outOfStock&&o.select()}),e.DNE(2,vt,1,1,"app-checkmark",2),e.j41(3,"span",3),e.nrm(4,"img",4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"span",5)(7,"h3",6)(8,"span"),e.EFF(9),e.k0s(),e.DNE(10,wt,3,3,"span",7),e.DNE(11,Tt,3,3,"span",7),e.k0s(),e.DNE(12,Et,4,7,"span",8),e.DNE(13,Rt,4,3,"span",9),e.DNE(14,Dt,9,13,"span",10),e.k0s()()),2&i&&(e.Y8G("ngIf",o.item.isMostPopular&&!o.item.outOfStock),e.R7$(1),e.AVh("oos",o.item.outOfStock)("selected",o.item.selected),e.BMQ("aria-pressed",o.item.selected)("aria-disabled",o.item.outOfStock),e.R7$(1),e.Y8G("ngIf",!o.item.outOfStock),e.R7$(2),e.Y8G("src",o.item.imageUrl,e.B4B)("alt",e.bMT(5,18,"general.alt.image-of")+(o.item.productName||"-")),e.R7$(3),e.AVh("shorter",o.item.isMostPopular&&!o.item.outOfStock),e.R7$(2),e.JRh(o.item.productName),e.R7$(1),e.Y8G("ngIf",!o.hasReachedIncluded||!o.allowOverSelection),e.R7$(1),e.Y8G("ngIf",o.hasReachedIncluded&&o.allowOverSelection),e.R7$(1),e.Y8G("ngIf",o.item.calories&&!o.item.outOfStock&&o.showCalories),e.R7$(1),e.Y8G("ngIf",o.item.outOfStock),e.R7$(1),e.Y8G("ngIf",!o.item.outOfStock&&(o.numberOfIncluded>1||o.allowOverSelection)))},dependencies:[g.bT,$.D,ee.B,E.L,g.QX,C.D9,j.g],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}[_nghost-%COMP%]{display:block;position:relative}.most-popular[_ngcontent-%COMP%]{margin:0 16px;padding:1px 0 2px;border-radius:5px 5px 0 0;background:#198737;pointer-events:none;
1font-family:Flame Sans;font-size:12px;line-height:20px;font-weight:400;text-align:center;letter-spacing:.1em;color:#fff}.tile[_ngcontent-%COMP%]{width:100%;padding:8px 14px;border:none;border-radius:8px;background:#ffffff;position:relative;overflow:hidden;cursor:pointer;display:flex;flex-flow:row nowrap;align-items:center;gap:12px}.tile.selected[_ngcontent-%COMP%]{box-shadow:0 2px 12px #0003}.tile__check[_ngcontent-%COMP%]{padding:5px}.tile__image[_ngcontent-%COMP%]{flex-shrink:0;align-self:center;width:52px;height:52px}.tile__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}.tile.oos[_ngcontent-%COMP%]   .tile__image[_ngcontent-%COMP%]{opacity:.5}.tile__texts[_ngcontent-%COMP%]{flex-grow:1;text-align:left}.tile__oos[_ngcontent-%COMP%]{flex-grow:1;margin-top:4px;display:flex;align-items:flex-end}.tile__oos[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block;padding:0 6px 2px;border-radius:4px;background:rgba(101,101,101,.35);font-size:14px;line-height:24px;font-weight:400;color:#fff}.tile__title[_ngcontent-%COMP%]{margin-bottom:0;display:flex;justify-content:space-between;font-size:16px;line-height:24px;font-weight:400;color:#502314}.tile__title.shorter[_ngcontent-%COMP%]{margin-right:35px}.tile.oos[_ngcontent-%COMP%]   .tile__title[_ngcontent-%COMP%]{opacity:.5}.tile__price[_ngcontent-%COMP%]{display:block;margin:0 0 0 12px;font-size:16px;line-height:24px;font-weight:400;white-space:nowrap;color:#502314}.tile__kcal[_ngcontent-%COMP%]{display:block;margin-bottom:2px;
1font-family:Flame Sans;font-size:12px;line-height:20px;font-weight:400;color:#502314a6}.tile.oos[_ngcontent-%COMP%]   .tile__kcal[_ngcontent-%COMP%]{opacity:.5}.tile__counter[_ngcontent-%COMP%]{justify-self:end;margin-top:4px;display:flex;flex-flow:row nowrap;visibility:hidden;opacity:0}.tile__counter.show[_ngcontent-%COMP%]{visibility:visible;opacity:1}.tile__counter-btn[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;display:flex;justify-content:center;align-items:center}.tile__counter-btn.disabled[_ngcontent-%COMP%]{cursor:auto}.tile__counter-value[_ngcontent-%COMP%]{margin:0 10px;font-size:16px;line-height:24px;font-weight:400;text-align:center;color:#502314}"],changeDetection:0})}}return n})();function $t(n,s){if(1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"translate"),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize."+t.extrasType+".title.single")," ")}}function Gt(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI("",e.bMT(3,2,"menu.details.customize.custom-title.single")," "),e.R7$(3),e.JRh(t.customTitle)}}function Vt(n,s){if(1&n&&(e.qex(0),e.DNE(1,$t,3,3,"ng-container",2),e.DNE(2,Gt,6,4,"ng-container",2),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",!t.customTitle),e.R7$(1),e.Y8G("ngIf",t.customTitle)}}function Nt(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s(),e.j41(6,"span"),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI("",e.bMT(3,3,"menu.details.customize."+t.extrasType+".title.multiple1")," "),e.R7$(3),e.SpI("",t.numberOfIncluded," "),e.R7$(2),e.JRh(e.bMT(8,5,"menu.details.customize."+t.extrasType+".title.multiple2"))}}function jt(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s(),e.j41(6,"span"),e.EFF(7),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI("",e.bMT(3,3,"menu.details.customize.custom-title.multiple")," "),e.R7$(3),e.SpI("",t.numberOfIncluded," "),e.R7$(2),e.JRh(t.customTitle)}}function At(n,s){if(1&n&&(e.qex(0),e.DNE(1,Nt,9,7,"ng-container",2),e.DNE(2,jt,8,5,"ng-container",2),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",!t.customTitle),e.R7$(1),e.Y8G("ngIf",t.customTitle)}}function Bt(n,s){1&n&&(e.j41(0,"p",6),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.drinks.desc.without-drink")," "))}function zt(n,s){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"app-meal-extras-list-item",7),e.bIt("selected",function(){e.eBV(t);const o=e.XpG().index,a=e.XpG();return e.Njj(a.select(o))})("amountChanged",function(o){e.eBV(t);const a=e.XpG().index,r=e.XpG();return e.Njj(r.amountChange(o,a))}),e.k0s()()}if(2&n){const t=e.XpG().$implicit,i=e.XpG();e.R7$(1),e.Y8G("item",t)("numberOfIncluded",i.numberOfIncluded)("hasReachedIncluded",i.includedCount===i.numberOfIncluded)("allowOverSelection",i.allowOverSelection)("showCalories",i.showCalories)}}function Yt(n,s){if(1&n&&(e.qex(0),e.DNE(1,zt,2,5,"li",2),e.bVm()),2&n){const t=s.$implicit;e.R7$(1),e.Y8G("ngIf",!t.outOfStock)}}let Lt=(()=>{class n{constructor(){this.numberOfIncluded=0,this.allowOverSelection=!1,this.showCalories=!0,this.isSelectedMealWithoutDrink=!1,this.items=[],this.includedCount=0,this.extraCount=0}set extrasForm(t){this.form=t,this.initData()}get hasReachedIncluded(){return this.includedCount===this.numberOfIncluded}get customTitle(){if(!this.builderSettings)return null;switch(this.extrasType){case Y.AdditionalSides1:return this.builderSettings.additionalSides1AlternativeName;case Y.AdditionalSides2:return this.builderSettings.additionalSides2AlternativeName;case Y.AdditionalSides3:return this.builderSettings.additionalSides3AlternativeName;case Y.Sides:return this.builderSettings.sidesAlternativeName;case Y.Drinks:return this.builderSettings.drinksAlternativeName;case Y.Sauces:return this.builderSettings.saucesAlternativeName;default:return null}}select(t){const i=this.items[t];if(this.allowOverSelection){if(i.selected)return;i.selected=!0,this.hasReachedIncluded?(i.selectedExtra=1,this.extraCount++):(i.selectedIncluded=1,this.includedCount++)}else{if(1===this.numberOfIncluded)return i.selected?(i.selected=!1,i.selectedIncluded=0,this.includedCount=0,void this.saveChanges()):(this.items=this.items.map(o=>({...o,selected:!1,selectedIncluded:0})),this.items[t].selected=!0,this.items[t].selectedIncluded=1,this.includedCount=1,void this.saveChanges());!i.selected&&!this.hasReachedIncluded&&(i.selected=!0,i.selectedIncluded=1,this.includedCount++)}this.saveChanges()}amountChange(t,i){const o=this.items[i];if(this.allowOverSelection){if(t)return this.hasReachedIncluded?(o.selectedExtra++,this.extraCount++):(o.selectedIncluded++,this.includedCount++),void this.saveChanges();if(o.selectedExtra>0)o.selectedExtra--,this.extraCount--;else if(o.selectedIncluded>0)if(this.extraCount>0){const a=this.items.find(r=>r.selectedExtra>0);a?(a.selectedExtra--,this.extraCount--,o.selectedIncluded--,a.selectedIncluded++):(o.selectedIncluded--,this.includedCount--)}else o.selectedIncluded--,this.includedCount--;!o.selectedIncluded&&!o.selectedExtra&&(o.selected=!1),this.saveChanges()}else{if(t){if(this.hasReachedIncluded)return;o.selectedIncluded++,this.includedCount++}else{if(0===this.includedCount)return;o.selectedIncluded--,0===o.selectedIncluded&&(o.selected=!1),this.includedCount--}this.saveChanges()}}trackListItem(t,i){return i?i.externalId:void 0}initData(){this.items=this.form.getRawValue(),this.includedCount=this.items.reduce((t,i)=>t+i.selectedIncluded,0),this.extraCount=this.items.reduce((t,i)=>t+i.selectedExtra,0)}saveChanges(){this.form.patchValue(this.form.controls.map((t,i)=>({...t.value,selected:this.items[i].selected,selectedIncluded:this.items[i].selectedIncluded,selectedExtra:this.items[i].selectedExtra})))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-meal-extras-list"]],inputs:{extrasType:"extrasType",extrasForm:"extrasForm",numberOfIncluded:"numberOfIncluded",allowOverSelection:"allowOverSelection",showCalories:"showCalories",isSelectedMealWithoutDrink:"isSelectedMealWithoutDrink",builderSettings:"builderSettings"},decls:7,vars:5,consts:[[1,"extras"],[1,"extras__title"],[4,"ngIf"],["class","extras__desc",4,"ngIf"],[1,"extras__list"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"extras__desc"],[1,"extras__item",3,"item","numberOfIncluded","hasReachedIncluded","allowOverSelection","showCalories","selected","amountChanged"]],template:function(i,o){1&i&&(e.j41(0,"section",0)(1,"h2",1),e.DNE(2,Vt,3,2,"ng-container",2),e.DNE(3,At,3,2,"ng-container",2),e.k0s(),e.DNE(4,Bt,3,3,"p",3),e.j41(5,"ul",4),e.DNE(6,Yt,2,1,"ng-container",5),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("ngIf",1===o.numberOfIncluded),e.R7$(1),e.Y8G("ngIf",o.numberOfIncluded>1),e.R7$(1),e.Y8G("ngIf",o.isSelectedMealWithoutDrink),e.R7$(2),e.Y8G("ngForOf",o.items)("ngForTrackBy",o.trackListItem))},dependencies:[g.Sq,g.bT,Ft,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.extras__title[_ngcontent-%COMP%]{margin-bottom:12px;font-size:20px;line-height:32px;font-weight:700;color:#502314}.extras__desc[_ngcontent-%COMP%]{margin-top:-10px;margin-bottom:16px;font-size:16px;line-height:26px;font-weight:400;color:#502314}.extras__list[_ngcontent-%COMP%]{display:flex;flex-flow:column nowrap;gap:12px}"],changeDetection:0})}}return n})();var Y=function(n){return n.AdditionalSides1="additional-sides1",n.AdditionalSides2="additional-sides2",n.AdditionalSides3="additional-sides3",n.Sides="sides",n.Drinks="drinks",n.Sauces="sauces",n}(Y||{}),Xt=p(4565),ze=p(2053);const Ut=["tile"];
1function Ht(n,s){if(1&n&&e.nrm(0,"app-checkmark",13),2&n){const t=e.XpG();e.AVh("out-of-stock",t.meal.outOfStock),e.Y8G("isSelected",t.isSelected)}}function Jt(n,s){1&n&&e.nrm(0,"app-checkmark",14)}function Qt(n,s){1&n&&(e.j41(0,"span",15),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.meal-selection.out-of-stock")," "))}function qt(n,s){if(1&n&&(e.j41(0,"span",16),e.EFF(1),e.nI1(2,"translate"),e.nI1(3,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Lme(" ",e.bMT(2,2,"menu.details.customize.meal-selection.from")," ",e.bMT(3,4,t.meal.price)," ")}}function Wt(n,s){if(1&n&&(e.j41(0,"span",20),e.EFF(1),e.nI1(2,"numberToCurrency"),e.nI1(3,"discountPrice"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",e.bMT(2,1,e.i5U(3,3,t.meal.price,t.productPromo.discount)+t.condimentsSurcharge)," ")}}function Kt(n,s){if(1&n&&(e.j41(0,"span",20),e.EFF(1),e.nI1(2,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",e.bMT(2,1,t.productPromo.fixedPrice+t.condimentsSurcharge)," ")}}function Zt(n,s){if(1&n&&(e.j41(0,"span",17)(1,"span",18),e.EFF(2),e.nI1(3,"numberToCurrency"),e.k0s(),e.DNE(4,Wt,4,6,"span",19),e.DNE(5,Kt,3,3,"span",19),e.k0s()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,3,t.meal.price+t.condimentsSurcharge),"\xa0 "),e.R7$(2),e.Y8G("ngIf",t.productPromo.discount&&t.productPromo.discount>0&&t.productPromo.discount<100),e.R7$(1),e.Y8G("ngIf",t.productPromo.fixedPrice)}}function en(n,s){if(1&n&&(e.j41(0,"span",21),e.EFF(1),e.nI1(2,"number"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Lme(" ",e.i5U(2,2,t.meal.calories,"1.0-0")," ",e.bMT(3,5,"menu.details.nutritions.kcal")," ")}}function tn(n,s){1&n&&(e.j41(0,"span",24),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"promo-codes.offer-valid.free")," "))}function nn(n,s){if(1&n&&(e.j41(0,"span",25)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"translate"),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI("",t.productPromo.discount,"% "),e.R7$(2),e.JRh(e.bMT(5,2,"promo-codes.offer-valid.percent-off"))}}function on(n,s){if(1&n&&(e.qex(0),e.DNE(1,tn,3,3,"span",23),e.DNE(2,nn,6,4,"span",22),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",100===t.productPromo.discount),e.R7$(1),e.Y8G("ngIf",t.productPromo.discount>0&&t.productPromo.discount<100)}}function sn(n,s){if(1&n&&(e.j41(0,"span",25)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.nI1(6,"numberToPoundPence"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI("",e.bMT(3,2,"promo-codes.offer-valid.only"),"\xa0"),e.R7$(3),e.JRh(e.bMT(6,4,t.productPromo.fixedPrice))}}function an(n,s){if(1&n&&(e.qex(0),e.DNE(1,on,3,2,"ng-container",12),e.DNE(2,sn,7,6,"span",22),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.productPromo.discount),e.R7$(1),e.Y8G("ngIf",t.productPromo.fixedPrice)}}let Ye=(()=>{class n{constructor(){this.promotion=null,this.showCalories=!0,this.selectionToggled=new e.bkB,this.condimentsSurcharge=0,this.mandatorySurcharges=[]}set mealValue(t){this.meal=t,this.mandatorySurcharges=t.condiments?t.condiments.filter(i=>i.isMandatory):[]}set condiments(t){this.condimentsSurcharge=t.filter(i=>!i.isDefault&&i.selectedAmount).reduce((i,o)=>i+o.price,0)}get productPromo(){return this.promotion?.promotionType===O.Qw.ProductPercentage||this.promotion?.promotionType===O.Qw.FixedPrice?this.promotion:null}onClick(){this.meal.outOfStock||this.selectionToggled.emit()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-meal-selection-tile"]],viewQuery:function(i,o){if(1&i&&e.GBs(Ut,5),2&i){let a;e.mGM(a=e.lsd())&&(o.tile=a.first)}},inputs:{mealValue:"mealValue",condiments:"condiments",isSelected:"isSelected",promotion:"promotion",showCalories:"showCalories"},outputs:{selectionToggled:"selectionToggled"},decls:16,vars:20,consts:[["type","button",1,"tile",3,"click"],["tile",""],["checkStyle","radio","aria-hidden","true","tabindex","-1",3,"out-of-stock","isSelected",4,"ngIf"],["class","tile__check","aria-hidden","true",4,"ngIf"],[1,"tile__image"],[3,"src","alt"],[1,"tile__text"],[1,"tile__title"],["class","tile__badge out-of-stock",4,"ngIf"],["class","tile__price",4,"ngIf"],["class","tile__price productPromo",4,"ngIf"],["class","tile__cal",4,"ngIf"],[4,"ngIf"],["checkStyle","radio","aria-hidden","true","tabindex","-1",3,"isSelected"],["aria-hidden","true",1,"tile__check"],[1,"tile__badge","out-of-stock"],[1,"tile__price"],[1,"tile__price","productPromo"],[1,"tile__price","old"],["class","tile__price new",4,"ngIf"],[1,"tile__price","new"],[1,"tile__cal"],["class","tile__badge",4,"ngIf"],["class","tile__badge free",4,"ngIf"],[1,"tile__badge","free"],[1,"tile__badge"]],template:function(i,o){1&i&&(e.j41(0,"button",0,1),e.bIt("click",function(){return o.onClick()}),e.DNE(2,Ht,1,3,"app-checkmark",2),e.DNE(3,Jt,1,0,"app-checkmark",3),e.j41(4,"span",4),e.nrm(5,"img",5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"span",6)(8,"span",7)(9,"span"),e.EFF(10),e.k0s(),e.DNE(11,Qt,3,3,"span",8),e.DNE(12,qt,4,6,"span",9),e.k0s(),e.DNE(13,Zt,6,5,"span",10),e.DNE(14,en,4,7,"span",11),e.k0s(),e.DNE(15,an,3,2,"ng-container",12),e.k0s()),2&i&&(e.AVh("selected",o.isSelected)("promotion",o.productPromo)("out-of-stock",o.meal.outOfStock),e.BMQ("aria-pressed",o.isSelected)("aria-disabled",o.meal.outOfStock),e.R7$(2),e.Y8G("ngIf",!o.productPromo),e.R7$(1),e.Y8G("ngIf",o.productPromo&&!o.meal.outOfStock),e.R7$(2),e.Y8G("src",o.meal.imageUrl,e.B4B)("alt",e.bMT(6,18,"general.alt.image-of")+o.meal.productName),e.R7$(5),e.JRh(o.meal.productName),e.R7$(1),e.Y8G("ngIf",o.meal.outOfStock),e.R7$(1),e.Y8G("ngIf",!o.productPromo),e.R7$(1),e.Y8G("ngIf",o.meal.price&&o.productPromo),e.R7$(1),e.Y8G("ngIf",o.meal.calories&&o.showCalories),e.R7$(1),e.Y8G("ngIf",!o.meal.outOfStock&&o.productPromo))},dependencies:[g.bT,ee.B,E.L,g.QX,C.D9,j.g,Xt.B,ze.w],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}[_nghost-%COMP%]{display:block}
1.tile[_ngcontent-%COMP%]{width:100%;padding:12px;border:none;border-radius:8px;background-color:#f5ebdc;position:relative;cursor:pointer;text-align:left;display:flex;flex-flow:row nowrap;align-items:center}.tile.selected[_ngcontent-%COMP%]{background-color:#fff;box-shadow:0 4px 20px #0000001a}.tile.promotion[_ngcontent-%COMP%]{padding:14px 14px 14px 32px;border:2px dashed #ff8732;border-radius:16px}.tile[_ngcontent-%COMP%]   app-checkmark[_ngcontent-%COMP%]{align-self:center;display:flex;pointer-events:none}.tile[_ngcontent-%COMP%]   app-checkmark.out-of-stock[_ngcontent-%COMP%]{opacity:.35;pointer-events:none}.tile__check[_ngcontent-%COMP%]{position:absolute;left:-12px}.promotion[_ngcontent-%COMP%]   .tile__check[_ngcontent-%COMP%]     .check{background-color:#ff8732!important;border-color:#ff8732!important}.tile__image[_ngcontent-%COMP%]{flex-shrink:0;align-self:center;width:50px;height:50px}.out-of-stock[_ngcontent-%COMP%]   .tile__image[_ngcontent-%COMP%]{opacity:.5}.tile__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}.tile__text[_ngcontent-%COMP%]{flex-grow:1;padding:0 12px}.tile__title[_ngcontent-%COMP%]{margin:0;display:flex;justify-content:space-between;font-size:14px;line-height:24px;font-weight:400;color:#502314}.promotion[_ngcontent-%COMP%]   .tile__title[_ngcontent-%COMP%]{line-height:14px}.out-of-stock[_ngcontent-%COMP%]   .tile__title[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{opacity:.5}.tile__cal[_ngcontent-%COMP%]{margin-top:4px;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:12px;line-height:20px;font-weight:400;color:#502314a6}.promotion[_ngcontent-%COMP%]   .tile__cal[_ngcontent-%COMP%]{margin-top:8px;line-height:14px}.out-of-stock[_ngcontent-%COMP%]   .tile__cal[_ngcontent-%COMP%]{opacity:.5}.tile__price[_ngcontent-%COMP%]{margin-left:20px;font-size:14px;line-height:24px;font-weight:400;color:#502314;white-space:nowrap}.tile__price.promotion[_ngcontent-%COMP%]{margin-left:0;margin-top:8px;font-size:14px;line-height:14px}.tile__price.old[_ngcontent-%COMP%]{margin-left:0;line-height:14px;color:#502314a6;text-decoration:line-through}.tile__price.new[_ngcontent-%COMP%]{margin-left:6px;line-height:14px}.tile__badge[_ngcontent-%COMP%]{align-self:flex-start;margin:0 0 0 10px;padding:0 6px 2px;border-radius:6px;background:#ff8732;font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:24px;font-weight:400;color:#fff;white-space:nowrap}.tile__badge.free[_ngcontent-%COMP%]{background:#198737}.tile__badge.out-of-stock[_ngcontent-%COMP%]{background:#BBBDC0}"]})}}return n})();var Se=p(9445);function rn(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-menu-page-categories",4),e.bVm()),2&n){const t=s.ngIf;e.R7$(1),e.Y8G("categories",t)}}function ln(n,s){if(1&n){const t=e.RV6();e.j41(0,"section",15)(1,"h2",11),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",16)(5,"app-spice-level-tile",17),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.productOptions.mainSpiceAvailable&&o.selectSpiceOption(!1))}),e.k0s(),e.j41(6,"app-spice-level-tile",17),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.productOptions.alternateSpiceAvailable&&o.selectSpiceOption(!0))}),e.k0s()()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,7,"menu.details.customize.spice.label")),e.R7$(3),e.Y8G("isSpicy",!1)("isSelected",!t.isSpicyOptionSelected)("isOutOfStock",!t.productOptions.mainSpiceAvailable),e.R7$(1),e.Y8G("isSpicy",!0)("isSelected",t.isSpicyOptionSelected)("isOutOfStock",!t.productOptions.alternateSpiceAvailable)}}function cn(n,s){if(1&n&&(e.j41(0,"section",18)(1,"h2",19),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.nrm(4,"app-customize-burger",20),e.k0s()),2&n){const t=e.XpG(3);e.R7$(2),e.JRh(e.bMT(3,2,"menu.details.customize.burger.title")),e.R7$(2),e.Y8G("condiments",t.customizeBurger)}}function dn(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-meal-selection-tile",21),e.bVm()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("mealValue",t.selectedMealValue)("condiments",t.customizeBurger.value)("isSelected",!0)("promotion",t.promotion)("showCalories",t.showCalories)}}function pn(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-meal-selection-tile",23),e.bIt("selectionToggled",function(){const a=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(!a.outOfStock&&r.changeMealSelection(a))}),e.k0s()}if(2&n){const t=s.$implicit,i=e.XpG(4);e.Y8G("mealValue",t)("condiments",i.customizeBurger.value)("isSelected",t.externalId===i.selectedMealValue.externalId)("promotion",null)("showCalories",i.showCalories)}}function un(n,s){if(1&n&&e.DNE(0,pn,1,5,"app-meal-selection-tile",22),2&n){const t=e.XpG(3);e.Y8G("ngForOf",t.meals)}}function mn(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-meal-size-selection-tile",25),e.bIt("tileSelect",function(){e.eBV(t);const o=e.XpG(4);return e.Njj(o.selectMealSize(o.MealSizeEnum.Small))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("size",t.MealSizeEnum.Small)("isSelected",t.selectedMealSize===t.MealSizeEnum.Small)}}function gn(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-meal-size-selection-tile",25),e.bIt("tileSelect",function(){e.eBV(t);const o=e.XpG(4);return e.Njj(o.selectMealSize(o.MealSizeEnum.Large))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("size",t.MealSizeEnum.Large)("isSelected",t.selectedMealSize===t.MealSizeEnum.Large)}}function hn(n,s){if(1&n){const t=e.RV6();e.j41(0,"div",24)(1,"app-meal-size-selection-tile",25),e.bIt("tileSelect",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.selectMealSize(o.MealSizeEnum.Medium))}),e.k0s(),e.DNE(2,mn,1,2,"app-meal-size-selection-tile",26),e.DNE(3,gn,1,2,"app-meal-size-selection-tile",26),e.k0s()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("size",t.MealSizeEnum.Medium)("isSelected",t.selectedMealSize===t.MealSizeEnum.Medium),e.R7$(1),e.Y8G("ngIf",t.smallMealAvailable),e.R7$(1),e.Y8G("ngIf",t.largeMealAvailable)}}function _n(n,s){if(1&n&&(e.qex(0),e.DNE(1,ln,7,9,"section",8),e.DNE(2,cn,5,4,"section",9),e.j41(3,"section",10)(4,"h2",11),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.DNE(7,dn,2,5,"ng-container",12),e.DNE(8,un,1,1,"ng-template",null,13,e.C5r),e.k0s(),e.DNE(10,hn,4,4,"div",14),e.bVm()),2&n){const t=e.sdS(9),i=e.XpG(2);e.R7$(1),e.Y8G("ngIf",i.productOptions.alternateSpice&&i.productOptions.alternateSpice.mealTypes.length>0),e.R7$(1),e.Y8G("ngIf",i.selectedMealValue.isCustomizable&&i.customizeBurger.length),e.R7$(3),e.JRh(e.bMT(6,6,"menu.details.customize.meal-selection.label")),e.R7$(2),e.Y8G("ngIf",i.promotion)("ngIfElse",t),e.R7$(3),e.Y8G("ngIf",i.selectedMealValue&&(i.smallMealAvailable||i.largeMealAvailable))}}function fn(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-meal-selected-extras",27),e.bIt("mealStepChange",function(o){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onMealStepChange(o))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("form",t.form)("mealStep",t.mealStep)}}function xn(n,s){if(1&n&&(e.j41(0,"section",28)(1,"div",29)(2,"div"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"span"),e.EFF(6),e.k0s(),e.j41(7,"span"),e.EFF(8),e.nI1(9,"translate"),e.k0s()(),e.j41(10,"div",30),e.nrm(11,"img",31),e.nI1(12,"translate"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(3),e.JRh(e.bMT(4,5,"menu.details.customize.meal-message.prefix")),e.R7$(3),e.JRh(t.selectedMealValue.includedInMealCopy),e.R7$(2),e.JRh(e.bMT(9,7,"menu.details.customize.meal-message.suffix")),e.R7$(3),e.Y8G("src",t.selectedMealValue.imageUrl,e.B4B)("alt",e.bMT(12,9,"general.alt.image-of")+t.selectedMealValue.productName)}}function Cn(n,s){if(1&n&&e.nrm(0,"app-meal-extras-list",33),2&n){const t=e.XpG(3);e.Y8G("extrasType",t.ExtrasType.AdditionalSides1)("extrasForm",t.additionalSides1)("numberOfIncluded",t.selectedMealValue.additionalSides1Limit)("allowOverSelection",!1)("showCalories",t.showCalories)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.AdditionalSides1))}}function Mn(n,s){if(1&n&&(e.qex(0),e.DNE(1,Cn,1,6,"app-meal-extras-list",32),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.additionalSides1.length&&t.selectedMealValue.additionalSides1Limit)}}function bn(n,s){if(1&n&&e.nrm(0,"app-meal-extras-list",33),2&n){const t=e.XpG(3);e.Y8G("extrasType",t.ExtrasType.AdditionalSides2)("extrasForm",t.additionalSides2)("numberOfIncluded",t.selectedMealValue.additionalSides2Limit)("allowOverSelection",!1)("showCalories",t.showCalories)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.AdditionalSides2))}}function Sn(n,s){if(1&n&&(e.qex(0),e.DNE(1,bn,1,6,"app-meal-extras-list",32),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.additionalSides2.length&&t.selectedMealValue.additionalSides2Limit)}}function yn(n,s){if(1&n&&e.nrm(0,"app-meal-extras-list",33),2&n){const t=e.XpG(3);e.Y8G("extrasType",t.ExtrasType.AdditionalSides3)("extrasForm",t.additionalSides3)("numberOfIncluded",t.selectedMealValue.additionalSides3Limit)("allowOverSelection",!1)("showCalories",t.showCalories)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.AdditionalSides3))}}function Pn(n,s){if(1&n&&(e.qex(0),e.DNE(1,yn,1,6,"app-meal-extras-list",32),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.additionalSides3.length&&t.selectedMealValue.additionalSides3Limit)}}function On(n,s){if(1&n&&e.nrm(0,"app-meal-extras-list",33),2&n){const t=e.XpG(3);e.Y8G("extrasType",t.ExtrasType.Sides)("extrasForm",t.sides)("numberOfIncluded",t.selectedMealValue.sidesLimit)("allowOverSelection",!1)("showCalories",t.showCalories)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.Sides))}}function kn(n,s){if(1&n&&(e.qex(0),e.DNE(1,On,1,6,"app-meal-extras-list",32),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.sides.length&&t.selectedMealValue.sidesLimit)}}function In(n,s){if(1&n&&e.nrm(0,"app-meal-extras-list",33),2&n){const t=e.XpG(3);e.Y8G("extrasType",t.ExtrasType.Drinks)("extrasForm",t.drinks)("numberOfIncluded",t.selectedMealValue.drinksLimit)("allowOverSelection",!1)("showCalories",t.showCalories)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.Drinks))}}function vn(n,s){if(1&n&&(e.qex(0),e.DNE(1,In,1,6,"app-meal-extras-list",32),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.drinks.length&&t.selectedMealValue.drinksLimit)}}function wn(n,s){if(1&n&&e.nrm(0,"app-meal-extras-list",33),2&n){const t=e.XpG(3);e.Y8G("extrasType",t.ExtrasType.Sauces)("extrasForm",t.sauces)("numberOfIncluded",t.selectedMealValue.saucesLimit)("allowOverSelection",!1)("showCalories",t.showCalories)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.Sauces))}}function Tn(n,s){if(1&n&&(e.qex(0),e.DNE(1,wn,1,6,"app-meal-extras-list",32),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.sauces.length&&t.selectedMealValue.saucesLimit)}}function En(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-meal-summary",34),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("form",t.form)("promotion",t.promotion)("@mealStepSwitch",t.getAnimationState(t.MealStepEnum.Summary))}}function Rn(n,s){if(1&n&&(e.j41(0,"div"),e.DNE(1,_n,11,8,"ng-container",1),e.DNE(2,fn,1,2,"app-meal-selected-extras",5),e.DNE(3,xn,13,11,"section",6),e.j41(4,"div",7),e.DNE(5,Mn,2,1,"ng-container",1),e.DNE(6,Sn,2,1,"ng-container",1),e.DNE(7,Pn,2,1,"ng-container",1),e.DNE(8,kn,2,1,"ng-container",1),e.DNE(9,vn,2,1,"ng-container",1),e.DNE(10,Tn,2,1,"ng-container",1),e.DNE(11,En,2,3,"ng-container",1),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.Start),e.R7$(1),e.Y8G("ngIf",t.mealStep!==t.MealStepEnum.Start),e.R7$(1),e.Y8G("ngIf",t.selectedMealValue.includedInMealCopy&&t.mealStep!==t.MealStepEnum.Start),e.R7$(2),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.AdditionalSides1),e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.AdditionalSides2),e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.AdditionalSides3),e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.Sides),e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.Drinks),e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.Sauces),e.R7$(1),e.Y8G("ngIf",t.mealStep===t.MealStepEnum.Summary)}}function Dn(n,s){if(1&n&&e.nrm(0,"app-menu-details-nutritional",37),2&n){const t=e.XpG(2);e.Y8G("form",t.form)("openedInOrdering",!0)}}function Fn(n,s){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,Dn,1,2,"app-menu-details-nutritional",35),e.nI1(2,"async"),e.j41(3,"app-menu-add-to-basket",36),e.bIt("mealStepChange",function(o){e.eBV(t);const a=e.XpG();return e.Njj(a.onMealStepChange(o))})("scrollToExtras",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.scrollToExtrasSection())}),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.selectedMealValue&&e.bMT(2,5,t.showNutritions$)),e.R7$(2),e.Y8G("form",t.form)("meals",t.meals)("mealStep",t.mealStep)("promotion",t.promotion)}}let Le=(()=>{class n{set menuCategories(t){this.menuCategoriesHeight=t?.nativeElement.clientHeight||0}get selectedMeal(){return this.form.controls.selectedMeal}get selectedMealValue(){return this.selectedMeal.value}get additionalSides1(){return this.form.controls.additionalSides1}get additionalSides2(){return this.form.controls.additionalSides2}get additionalSides3(){return this.form.controls.additionalSides3}get sides(){return this.form.controls.sides}get drinks(){return this.form.controls.drinks}get sauces(){return this.form.controls.sauces}get customizeBurger(){return this.form.controls.customizeBurger}get smallMealAvailable(){return this.selectedMealValue&&(this.selectedMealValue.smallSides.length>0||this.selectedMealValue.smallDrinks.length>0)}get largeMealAvailable(){return this.selectedMealValue&&(this.selectedMealValue.largeSides.length>0||this.selectedMealValue.largeDrinks.length>0)}get promotion(){return this.promotionData?.selectedProduct?.externalId===this.selectedMealValue?.externalId?this.promotionData:null}getAnimationState(t){if(t!==this.mealStep)return"";const i=this.selectedMealValue?.menuBuilderSettings.comboExtraListsOrder;if(!i||i.length<1)return this.previousMealStep<t?"enter-from-right":"enter-from-left";const o=[c.Start,...le(this.selectedMealValue?.menuBuilderSettings.comboExtraListsOrder||[]),c.Summary],a=o.findIndex(l=>l===t);return o.findIndex(l=>l===this.previousMealStep)<a?"enter-from-right":"enter-from-left"}constructor(t,i,o,a,r,l,u,_,x,h){this.store=t,this.route=i,this.cd=o,this.fb=a,this.router=r,this.actionsSubj=l,this.dialog=u,this.pageService=_,this.messageService=x,this.dialogsService=h,this.menuCategoriesHeight=0,this.isLoading=!1,this.isSpicyOptionSelected=!1,this.selectedMealSize=R.Medium,this.productOptions=null,this.meals=[],this.isSelectedMealWithoutDrink=!1,this.previousMealStep=c.Start,this.mealStep=c.Start,this.showCalories=!0,this.showComboBoxMealUpsellDialog=!1,this.promotionData=null,this.MealStepEnum=c,this.MealSizeEnum=R,this.ExtrasType=Y,this.categories$=this.store.select(K),this.showNutritions$=this.store.select(T.JI),this.isOrderingJourney=F.c.features.ordering,this.locationName=F.c.locationName,this.LocationNameEnum=ge.i8,this.SpiceLevelEnum=q,this.sub=new A.yU,this.form=this.fb.group({selectedMeal:this.fb.control(null,Ne.k0.required),customizeBurger:this.fb.array([]),additionalSides1:this.fb.array([]),additionalSides2:this.fb.array([]),additionalSides3:this.fb.array([]),sides:this.fb.array([]),drinks:this.fb.array([]),sauces:this.fb.array([])}),this.section25Data={type:"S25",deviceLimiter:ue.i_.Mobile,titleFirstPart:"Getting",titleSecondPart:"Hungry?",description:"We believe in the power of good food and the effect it has on our people and our planet",textColor:"911987",accentColor:"911987",buttonCaption:"Start your order",link:{url:`/${m.m.Restaurants}`,isExternal:!1},backgroundColor:"FFC800",mediaUrl:"/assets/images/section25-mock.png",media2Url:"/assets/images/section25-img.webp"}}ngOnInit(){var t=this;return(0,w.A)(function*(){t.fetchProductDetails(),t.checkCategoriesBar(),t.setShowCalories(),t.promotionData=yield t.getPromotion(),t.showComboBoxMealUpsellDialog=yield t.getComboBoxMealUpsellFeatureFlag()})()}ngAfterViewInit(){!this.productHeader||!this.productHeader.pageTitle||this.productHeader.pageTitle.nativeElement.focus()}ngOnDestroy(){this.sub.unsubscribe()}onMealStepChange(t,i){var o=this;return(0,w.A)(function*(){const a=t||be(o.mealStep,o.selectedMealValue);if(a){if(!i&&o.selectedMealValue?.linkedComboBoxMeal){const r=o.selectedMealValue.linkedComboBoxMeal;if(yield o.checkComboBoxMeals(a,r))return}if(o.previousMealStep=o.mealStep,o.mealStep=a,o.refreshView(),a===c.Start){const r=o.mealSelectionTiles?.find(l=>l.isSelected);r&&r.tile&&r.tile.nativeElement.focus()}o.scrollOnStepChange(a)}})()}checkCategoriesBar(){var t=this;return(0,w.A)(function*(){const i=yield t.getMenuCategories();i&&i.length>0||(null===(yield t.getBasketDetails())?t.store.dispatch(se()):t.store.dispatch(Q()))})()}getMenuCategories(){return(0,k._)(this.store.select(K).pipe((0,y.s)(1)))}getBasketDetails(){return(0,k._)(this.store.select(v.Bz).pipe((0,y.s)(1)))}setShowCalories(){(0,me.z)([this.store.select(T.g7),this.store.select(T.Vz)]).subscribe(([t,i])=>this.showCalories=t&&!!i)}getPromotion(){return(0,k._)(this.store.select(v.cE).pipe((0,y.s)(1)))}getComboBoxMealUpsellFeatureFlag(){return(0,k._)(this.store.select(T.C4).pipe((0,G.p)(t=>null!==t),(0,y.s)(1)))}fetchProductDetails(){var t=this;return(0,w.A)(function*(){const o=t.route.snapshot.params[m.C.ProductName];if(!o)return void t.messageService.showItemNotValidModal();t.isLoading=!0,t.store.dispatch(Te({itemRef:o}));const a=yield t.getFetchProductDetailsResponse();t.isLoading=!1,a&&(t.productOptions=t.getProductOptions(a.menuItems),t.productOptions)&&(t.selectSpiceOption(t.productOptions.mainSpiceAvailable?t.productOptions.mainSpice.type===q.Spicy:t.productOptions.alternateSpice?.type===q.Spicy),t.initBurgerCondiments(),t.pageService.setPageTitle(t.selectedMealValue?.productName),t.refreshView(),t.router.navigate([]))})()}getFetchProductDetailsResponse(){return(0,k._)(this.actionsSubj.pipe((0,B.i)(1),(0,M.gp)(U,z),(0,y.s)(1),(0,P.T)(t
1=>t.type===z.type?(this.handleFetchProductDetailsFailure(t.errors),null):t.productDetails.menuItems.every(o=>o.mealTypes.every(a=>a.outOfStock))?(this.handleOutOfStock(),null):t.productDetails)))}handleFetchProductDetailsFailure(t){t.some(i=>"ItemUnavailableInRestaurant"===i.code)?this.messageService.showItemNotValidModal():this.messageService.showGenericErrorModal().afterClosed().pipe((0,y.s)(1)).subscribe(()=>this.router.navigate([m.C.Menu,m.C.Order]))}getProductOptions(t){if(!t||0===t.length)return null;const i=t.find(a=>a.type===q.Classic),o=t.find(a=>a.type===q.Spicy);return{initialExternalId:t[0].mealTypes[0].externalId,mainSpice:t[0],alternateSpice:t[1]?t[1]:null,mainSpiceAvailable:t[0].mealTypes.some(a=>!a.outOfStock),alternateSpiceAvailable:!!t[1]&&t[1].mealTypes.some(a=>!a.outOfStock),classic:i?i.mealTypes:[],spicy:o?o.mealTypes:[]}}scrollOnStepChange(t){t===c.Start?this.pageService.scrollToPageAnchor("meal-size-section",[0,je.v+this.menuCategoriesHeight+20]):this.scrollToExtrasSection()}scrollToExtrasSection(){this.pageService.scrollToPageAnchor("selected-extras-section",[0,je.v+this.menuCategoriesHeight+20])}back(){if(this.promotion)this.router.navigate([m.C.Menu,m.C.Order]);else{const t=this.router.url.lastIndexOf("/"),i=decodeURI(this.router.url.substring(0,t));this.router.navigate([i])}}selectSpiceOption(t){if(!this.productOptions)return;this.isSpicyOptionSelected=t,this.meals=t?this.productOptions.spicy:this.productOptions.classic,this.refreshView();const i=this.meals.find(r=>!r.isComboMeal);this.changeMealSelection(i&&!i.outOfStock?i:this.meals[0])}changeMealSelection(t){if(this.selectedMealValue?.externalId!==t.externalId&&(this.isSelectedMealWithoutDrink=t.productName?.toLowerCase().includes("& fries")||!1,this.selectedMeal.setValue(t,{emitEvent:!1}),this.initBurgerCondiments(),this.initExtrasData(),this.form.updateValueAndValidity(),this.route.snapshot.queryParams[m.C.NextStep]&&this.selectedMeal.valid)){const o=be(this.mealStep,this.selectedMealValue);if(!o)return;this.onMealStepChange(o,!0)}}clearFormArray(t){t.clearValidators(),t.clear({emitEvent:!1}),t.updateValueAndValidity({emitEvent:!1,onlySelf:!0})}initCustomizeBurger(t,i){this.customizeBurger?.push(this.fb.control({externalId:t.externalId,name:t.name,price:t.price,selectedAmount:void 0!==i?i:t.isDefault?1:0,isDefault:t.isDefault,isMandatory:!1}))}addItemsToExtrasList(t,i,o){let a=!1;t.forEach(r=>{let l=!1,u=0;(r.isDefault&&!a||1===t.length)&&(a=!0,l=!0,u=i);const _={...r,selected:l,selectedIncluded:u,selectedExtra:0,desc:""};o.push(this.fb.control(_),{emitEvent:!1})})}initBurgerCondiments(){const t={};this.customizeBurger.value.forEach(x=>t[x.externalId]=x.selectedAmount),this.clearFormArray(this.customizeBurger);const i=this.selectedMealValue?.condiments;if(!i)return;const o=this.route.snapshot.queryParamMap.get(m.C.AddCondiments),a=this.route.snapshot.queryParamMap.get(m.C.RemoveCondiments);if(!o&&!a)return void i.filter(x=>!x.isMandatory).forEach(x=>this.initCustomizeBurger(x,t[x.externalId]));const r=o?.split(",")||[],l=a?.split(",")||[],u={},_={};r.forEach(x=>{const{name:h,amount:D}=this.getCondimentFromRouteParam(x);u[h]=D}),l.forEach(x=>{const{name:h}=this.getCondimentFromRouteParam(x);_[h]=0}),i.filter(x=>!x.isMandatory).map(x=>{const h=x.name?.toLowerCase(),D=t[x.externalId];this.initCustomizeBurger(x,h?u[h]?u[h]:_[h]?0:D:D)})}getCondimentFromRouteParam(t){const i=t.lastIndexOf("-");return{name:t.substring(0,i),amount:+t.substring(i+1)}}initExtrasData(){this.selectedMealSize=R.Medium,this.clearFormArray(this.additionalSides1),this.clearFormArray(this.additionalSides2),this.clearFormArray(this.additionalSides3),this.clearFormArray(this.sides),this.clearFormArray(this.drinks),this.clearFormArray(this.sauces),this.initAdditionalSides1Data(),this.initAdditionalSides2Data(),this.initAdditionalSides3Data(),this.initSidesData(),this.initDrinksData(),this.initSaucesData()}initSidesData(t=R.Medium){if(!this.selectedMealValue||!this.selectedMealValue.sidesLimit)return;const o=this.selectedMealValue.sidesLimit;this.addItemsToExtrasList(t===R.Medium?this.selectedMealValue.sides:t===R.Large?this.selectedMealValue.largeSides:this.selectedMealValue.smallSides,o,this.sides),this.sides.setValidators(W(o)),this.sides.updateV
1alueAndValidity({emitEvent:!1,onlySelf:!0})}initDrinksData(t=R.Medium){if(!this.selectedMealValue||!this.selectedMealValue.drinksLimit)return;const o=this.selectedMealValue.drinksLimit;this.addItemsToExtrasList(t===R.Medium?this.selectedMealValue.drinks:t===R.Large?this.selectedMealValue.largeDrinks:this.selectedMealValue.smallDrinks,o,this.drinks),this.drinks.setValidators(W(o)),this.drinks.updateValueAndValidity({emitEvent:!1,onlySelf:!0})}initSaucesData(){if(!this.selectedMealValue)return;const i=this.selectedMealValue.saucesLimit;this.addItemsToExtrasList(this.selectedMealValue.sauces,i||0,this.sauces),i&&(this.sauces.setValidators(W(i,!0)),this.sauces.updateValueAndValidity({emitEvent:!1,onlySelf:!0}))}initAdditionalSides1Data(){if(!this.selectedMealValue||!this.selectedMealValue.additionalSides1Limit)return;const i=this.selectedMealValue.additionalSides1Limit;this.addItemsToExtrasList(this.selectedMealValue.additionalSides1||[],i,this.additionalSides1),this.additionalSides1.setValidators(W(i)),this.additionalSides1.updateValueAndValidity({emitEvent:!1,onlySelf:!0})}initAdditionalSides2Data(){if(!this.selectedMealValue||!this.selectedMealValue.additionalSides2Limit)return;const i=this.selectedMealValue.additionalSides2Limit;this.addItemsToExtrasList(this.selectedMealValue.additionalSides2||[],i,this.additionalSides2),this.additionalSides2.setValidators(W(i)),this.additionalSides2.updateValueAndValidity({emitEvent:!1,onlySelf:!0})}initAdditionalSides3Data(){if(!this.selectedMealValue||!this.selectedMealValue.additionalSides3Limit)return;const i=this.selectedMealValue.additionalSides3Limit;this.addItemsToExtrasList(this.selectedMealValue.additionalSides3||[],i,this.additionalSides3),this.additionalSides3.setValidators(W(i)),this.additionalSides3.updateValueAndValidity({emitEvent:!1,onlySelf:!0})}selectMealSize(t){t!==this.selectedMealSize&&(this.selectedMealSize=t,this.clearFormArray(this.sides),this.clearFormArray(this.drinks),this.initSidesData(t),this.initDrinksData(t),this.form.updateValueAndValidity({emitEvent:!0}))}handleOutOfStock(){var t=this;return(0,w.A)(function*(){const i=yield t.getPromotion();i?t.showOutOfStockPromoModal(i.code):t.showOutOfStockModal()})()}showOutOfStockPromoModal(t){this.dialogsService.showOutOfStockPromo().subscribe(i=>{i===oe.G.Primary?(this.store.dispatch((0,b.nt)()),this.router.navigate([m.C.ClaimOffer],{queryParams:{[m.C.Code]:t,[m.C.AutoCheck]:!0}})):(this.store.dispatch((0,b.x3)()),this.router.navigate([m.C.Menu,m.C.Order]))})}showOutOfStockModal(){this.dialogsService.showOutOfStock().subscribe(t=>{this.router.navigate([m.C.Menu,m.C.Order])})}checkComboBoxMeals(t,i){var o=this;return(0,w.A)(function*(){if(!(o.mealStep===c.Start&&t!==c.Summary&&o.showComboBoxMealUpsellDialog&&i&&o.selectedMealValue&&(yield o.openComboBoxMealsModal(i,o.selectedMealValue))))return!1;const r=o.customizeBurger.getRawValue(),l=r.filter(h=>!h.isDefault&&h.selectedAmount&&h.name).map(h=>`${h.name.toLowerCase()}-${h.selectedAmount}`),u=r.filter(h=>h.isDefault&&!h.selectedAmount&&h.name).map(h=>`${h.name.toLowerCase()}-0`),_={[m.C.NextStep]:!0};l.length&&(_[m.C.AddCondiments]=l.join(",")),u.length&&(_[m.C.RemoveCondiments]=u.join(","));const x=i.categoryShortName||o.meals.find(h=>h.linkedComboBoxMeal?.categoryShortName)?.linkedComboBoxMeal?.categoryShortName||"box-meal";return o.router.navigate([m.C.Menu,m.C.Order,$e(x),i.slug],{queryParams:_}).then(()=>o.pageService.refreshPage()),!0})()}openComboBoxMealsModal(t,i){const a=this.dialog.open(Ct,{panelClass:["custom-panel-dialog"],data:{comboBoxMeal:t,selectedMeal:i}});return(0,k._)(a.afterClosed().pipe((0,y.s)(1)))}refreshView(){this.cd.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(d.il),e.rXU(S.nX),e.rXU(e.gRc),e.rXU(Ne.Qk),e.rXU(S.Ix),e.rXU(d.SS),e.rXU(X.bZ),e.rXU(Ce.b),e.rXU(L.b),e.rXU(Se.J))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details"]],viewQuery:function(i,o){if(1&i&&(e.GBs(Z,5,e.aKT),e.GBs(Xe,5),e.GBs(Ye,5)),2&i){let a;e.mGM(a=e.lsd())&&(o.menuCategories=a.first),e.mGM(a=e.lsd())&&(o.productHeader=a.first),e.mGM(a=e.lsd())&&(o.mealSelectionTiles=a)}},decls:8,vars:9,consts:[[1,"menu-details"],[4,"ngIf"],[3,"selectedMeal","mealStep","showCalories","promotion"],[1,"wrapper","wrapper-product-details"],[3,"categories"],["id","selected-extras-section",3,"form","mealStep","mealStepChange",4,"ngIf"],["class","meal-message",4,"ngIf"],[1,"menu-details__extras"],["class","section spice",4,"ngIf"],["class","section",4,"ngIf"],["id","meal-size-section",1,"section","meal-selection"],[1,"section__title"],[4,"ngIf","ngIfElse"],["mealSelectionNoPromo",""],["class","menu-details__meal-size-selection",4,"ngIf"],[1,"section","spice"],[1,"content"],[3,"isSpicy","isSelected","isOutOfStock","click"],[1,"section"],[1,"section__title","customise"],[3,"condiments"],[1,"meal-selection-item",3,"mealValue","condiments","isSelected","promotion","showCalories"],["class","meal-selection-item",3,"mealValue","condiments","isSelected","promotion","showCalories","selectionToggled",4,"ngFor","ngForOf"],[1,"meal-selection-item",3,"mealValue","condiments","isSelected","promotion","showCalories","selectionToggled"],[1,"menu-details__meal-size-selection"],[3,"size","isSelected","tileSelect"],[3,"size","isSelected","tileSelect",4,"ngIf"],["id","selected-extras-section",3,"form","mealStep","mealStepChange"],[1,"meal-message"],[1,"meal-message__texts"],[1,"meal-message__image"],[3,"src","alt"],["class","section animated-step",3,"extrasType","extrasForm","numberOfIncluded","allowOverSelection","showCalories",4,"ngIf"],[1,"section","animated-step",3,"extrasType","extrasForm","numberOfIncluded","allowOverSelection","showCalories"],[1,"section","animated-step",3,"form","promotion"],[3,"form","openedInOrdering",4,"ngIf"],[3,"form","meals","mealStep","promotion","mealStepChange","scrollToExtras"],[3,"form","openedInOrdering"]],template:function(i,o){1&i&&(e.j41(0,"div",0),e.DNE(1,rn,2,1,"ng-container",1),e.nI1(2,"async"),e.nrm(3,"app-menu-details-header",2),e.j41(4,"div",3),e.DNE(
15,Rn,12,10,"div",1),e.DNE(6,Fn,4,7,"ng-container",1),e.k0s()(),e.nrm(7,"app-loader")),2&i&&(e.R7$(1),e.Y8G("ngIf",e.bMT(2,7,o.categories$)),e.R7$(2),e.Y8G("selectedMeal",o.selectedMealValue)("mealStep",o.mealStep)("showCalories",o.showCalories)("promotion",o.promotion),e.R7$(2),e.Y8G("ngIf",!o.isLoading&&o.productOptions&&o.selectedMealValue),e.R7$(1),e.Y8G("ngIf",!o.isLoading))},styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.menu-details[_ngcontent-%COMP%]{background-color:#fbf7f1}.menu-details[_ngcontent-%COMP%]   .wrapper-product-details[_ngcontent-%COMP%]{padding-bottom:60px;overflow:hidden}@media (min-width: 1024px){.menu-details[_ngcontent-%COMP%]   .wrapper-product-details[_ngcontent-%COMP%]{max-width:600px}}.menu-details__meal-size[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{margin-bottom:12px;font-size:20px;line-height:30px;font-weight:700}@media (min-width: 1024px){.menu-details__meal-size[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{font-size:24px;line-height:34px}}.menu-details[_ngcontent-%COMP%]   .meal-message[_ngcontent-%COMP%]{margin-bottom:12px;border-top-left-radius:8px;border-top-right-radius:8px;background:linear-gradient(to bottom,#f5ebdc,transparent);display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center}.menu-details[_ngcontent-%COMP%]   .meal-message__texts[_ngcontent-%COMP%]{flex-basis:60%;flex-shrink:0;padding:16px 10px 16px 24px}.menu-details[_ngcontent-%COMP%]   .meal-message__texts[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{font-size:16px;line-height:24px;font-weight:400}.menu-details[_ngcontent-%COMP%]   .meal-message__image[_ngcontent-%COMP%]{flex-grow:1}.menu-details[_ngcontent-%COMP%]   .meal-message__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:115%;height:115%;margin-left:-15%;margin-top:-15%;object-fit:contain}.menu-details__extras[_ngcontent-%COMP%]{position:relative}.menu-details__meal-size-selection[_ngcontent-%COMP%]{margin-bottom:32px}.menu-details__meal-size-selection[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:block;margin-bottom:14px}.menu-details__meal-size-selection[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{margin-bottom:0}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]{margin-bottom:32px}.menu-details[_ngcontent-%COMP%]   .section.animated-step[_ngcontent-%COMP%]{display:block;width:calc(100% + 40px);margin-left:-20px;margin-right:-20px;padding:0 20px;background:#fbf7f1}.menu-details[_ngcontent-%COMP%]   .section__title[_ngcontent-%COMP%]{margin-bottom:16px;font-size:24px;line-height:34px;font-weight:700;color:#502314}.menu-details[_ngcontent-%COMP%]   .section__title.customise[_ngcontent-%COMP%]{margin-bottom:16px}.menu-details[_ngcontent-%COMP%]   .section__desc[_ngcontent-%COMP%]{margin-top:-14px;margin-bottom:12px;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:26px;font-weight:400;color:#502314}.menu-details[_ngcontent-%COMP%]   .section__error[_ngcontent-%COMP%]{margin-top:-4px;margin-bottom:8px;font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:26px;font-weight:400;text-align:center;color:#d62300}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{display:flex;cursor:pointer;align-items:center;justify-content:center;width:100%;background-color:transparent;border:2px solid #d62300;color:#d62300;border-radius:6px;height:48px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.modal[_ngcontent-%COMP%]{border:2px solid #d62300;background-color:transparent}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.modal[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:8px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.modal[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-style:normal;font-size:16px;line-height:24px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.add-order[_ngcontent-%COMP%]{border-radius:24px}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.add-order[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{font-family:
1Flame Sans;font-style:normal;font-weight:700;font-size:16px;line-height:24px;color:#fff}.menu-details[_ngcontent-%COMP%]   .section[_ngcontent-%COMP%]   .button.add-order.faded[_ngcontent-%COMP%]{opacity:.3}.menu-details[_ngcontent-%COMP%]   .section.spice[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.menu-details[_ngcontent-%COMP%]   .section.meal-selection[_ngcontent-%COMP%]{margin-bottom:10px}.menu-details[_ngcontent-%COMP%]   .section.meal-selection[_ngcontent-%COMP%]   .meal-selection-item[_ngcontent-%COMP%]{margin-bottom:12px}.menu-details[_ngcontent-%COMP%]   .section.order-button[_ngcontent-%COMP%]{margin-top:32px}"],data:{animation:[(0,I.hZ)("mealStepSwitch",[(0,I.kY)("void => enter-from-left",[(0,I.iF)({position:"relative",left:"-100vw",zIndex:100,opacity:0}),(0,I.i0)("360ms ease-out",(0,I.iF)({left:0,opacity:1}))]),(0,I.kY)("void => enter-from-right",[(0,I.iF)({position:"relative",left:"100vw",zIndex:100,opacity:0}),(0,I.i0)("360ms ease-out",(0,I.iF)({left:0,opacity:1}))])])]},changeDetection:0})}}return n})();var R=function(n){return n.Small="small",n.Medium="medium",n.Large="large",n}(R||{}),c=function(n){return n[n.Start=1]="Start",n[n.AdditionalSides1=2]="AdditionalSides1",n[n.AdditionalSides2=3]="AdditionalSides2",n[n.AdditionalSides3=4]="AdditionalSides3",n[n.Sides=5]="Sides",n[n.Drinks=6]="Drinks",n[n.Sauces=7]="Sauces",n[n.Summary=8]="Summary",n}(c||{});const $n=["pageTitle"];function Gn(n,s){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.promo-header.free")," "))}function Vn(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI("",t.promotion.discount,"%"),e.R7$(2),e.SpI(" ",e.bMT(5,2,"menu.details.promo-header.discount"),"")}}function Nn(n,s){if(1&n&&(e.qex(0),e.DNE(1,Gn,3,3,"span",11),e.DNE(2,Vn,6,4,"ng-container",11),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",100===t.promotion.discount),e.R7$(1),e.Y8G("ngIf",t.promotion.discount>0&&t.promotion.discount<100)}}function jn(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.nI1(6,"numberToPoundPence"),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI("",e.bMT(3,2,"menu.details.customize.promo-chip.only"),"\xa0"),e.R7$(3),e.JRh(e.bMT(6,4,t.promotion.fixedPrice))}}function An(n,s){if(1&n&&(e.j41(0,"div",14),e.DNE(1,Nn,3,2,"ng-container",11),e.DNE(2,jn,7,6,"ng-container",11),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.promotion.discount),e.R7$(1),e.Y8G("ngIf",t.promotion.fixedPrice)}}function Bn(n,s){if(1&n&&(e.nrm(0,"img",17),e.nI1(1,"translate")),2&n){const t=e.XpG(2);e.Y8G("src",t.selectedMeal.imageUrl,e.B4B)("alt",e.bMT(1,2,"general.alt.image-of")+t.selectedMeal.productName)}}function zn(n,s){if(1&n&&(e.j41(0,"div",15),e.DNE(1,Bn,2,4,"img",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.selectedMeal.imageUrl)}}function Yn(n,s){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" : ",e.bMT(2,1,"menu.details.customize.promo-chip.free")," "))}function Ln(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI(": ",t.promotion.discount,"%"),e.R7$(2),e.SpI(" ",e.bMT(5,2,"menu.details.customize.promo-chip.discount"),"")}}function Xn(n,s){if(1&n&&(e.qex(0),e.DNE(1,Yn,3,3,"span",11),e.DNE(2,Ln,6,4,"ng-container",11),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",100===t.promotion.discount),e.R7$(1),e.Y8G("ngIf",t.promotion.discount>0&&t.promotion.discount<100)}}function Un(n,s){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.nI1(6,"numberToPoundPence"),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(": ",e.bMT(3,2,"menu.details.customize.promo-chip.only"),"\xa0"),e.R7$(3),e.JRh(e.bMT(6,4,t.promotion.fixedPrice))}}function Hn(n,s){if(1&n&&(e.qex(0),e.j41(1,"div",18)(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.DNE(5,Xn,3,2,"ng-container",11),e.DNE(6,Un,7,6,"ng-container",11),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.AVh("free",100===t.promotion.discount),e.R7$(2),e.JRh(e.bMT(4,5,"menu.details.customize.promo-chip.title")),e.R7$(2),e.Y8G("ngIf",t.promotion.discount),e.R7$(1),e.Y8G("ngIf",t.promotion.fixedPrice)}}function Jn(n,s){if(1&n&&(e.j41(0,"div",21),e.EFF(1),e.nI1(2,"number"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Lme(" ",e.i5U(2,2,t.selectedMeal.calories,"1.0-0")," ",e.bMT(3,5,"menu.details.nutritions.kcal")," ")}}function Qn(n,s){if(1&n&&(e.qex(0),e.j41(1,"div",19),e.EFF(2),e.k0s(),e.DNE(3,Jn,4,7,"div",20),e.bVm()),2&n){const t=e.XpG();
1e.R7$(2),e.SpI(" ",t.selectedMeal.shortDescription," "),e.R7$(1),e.Y8G("ngIf",t.selectedMeal.calories&&t.showCalories)}}let Xe=(()=>{class n{constructor(t){this.router=t,this.selectedMeal=null,this.promotion=null,this.mealStep=c.Start,this.showCalories=!1,this.descriptionShown=!1}get isDescriptionAvailable(){return!!this.selectedMeal?.shortDescription&&this.mealStep===c.Start}get isCompactView(){return this.descriptionShown||this.mealStep!==c.Start}get applyPromo(){return this.promotion?.promotionType===O.Qw.ProductPercentage||this.promotion?.promotionType===O.Qw.FixedPrice}back(){if(this.promotion&&!this.promotion.isOrderPromotion&&this.selectedMeal&&this.promotion.selectedProduct?.externalId===this.selectedMeal.externalId)this.router.navigate([m.C.Menu,m.C.Order]);else{const i=this.router.url.lastIndexOf("/"),o=decodeURI(this.router.url.substring(0,i));this.router.navigate([o])}}showDescription(){this.descriptionShown=!0}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details-header"]],viewQuery:function(i,o){if(1&i&&e.GBs($n,5),2&i){let a;e.mGM(a=e.lsd())&&(o.pageTitle=a.first)}},inputs:{selectedMeal:"selectedMeal",promotion:"promotion",mealStep:"mealStep",showCalories:"showCalories"},decls:20,vars:9,consts:[[1,"details-header"],[1,"details-header__header-wrapper"],[1,"details-header__header"],[1,"wrapper"],["type","button",1,"details-header__back",3,"click"],["backButton",""],["icon","arrow-left","size","large","aria-hidden","true"],["class","details-header__promo-header",4,"ngIf"],[1,"details-header__title-header"],["class","details-header__image",4,"ngIf"],[1,"details-header__content"],[4,"ngIf"],["tabindex","-1",1,"details-header__content-title"],["pageTitle",""],[1,"details-header__promo-header"],[1,"details-header__image"],[3,"src","alt",4,"ngIf"],[3,"src","alt"],[1,"details-header__content-promo-chip"],[1,"details-header__content-desc"],["class","details-header__content-kcal",4,"ngIf"],[1,"details-header__content-kcal"]],template:function(i,o){1&i&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"button",4,5),e.bIt("click",function(){return o.back()}),e.nrm(6,"app-svg-icon",6),e.j41(7,"span"),e.EFF(8),e.nI1(9,"translate"),e.k0s()()(),e.DNE(10,An,3,2,"div",7),e.j41(11,"h2",8),e.EFF(12),e.k0s()(),e.DNE(13,zn,2,1,"div",9),e.k0s(),e.j41(14,"div",10),e.DNE(15,Hn,7,7,"ng-container",11),e.j41(16,"h1",12,13),e.EFF(18),e.k0s(),e.DNE(19,Qn,4,2,"ng-container",11),e.k0s()()),2&i&&(e.R7$(8),e.JRh(e.bMT(9,7,"general.button.back")),e.R7$(2),e.Y8G("ngIf",o.promotion&&o.applyPromo),e.R7$(2),e.JRh(null==o.selectedMeal?null:o.selectedMeal.productName),e.R7$(1),e.Y8G("ngIf",o.selectedMeal),e.R7$(2),e.Y8G("ngIf",o.promotion&&o.applyPromo),e.R7$(3),e.SpI(" ",null==o.selectedMeal?null:o.selectedMeal.productName," "),e.R7$(1),e.Y8G("ngIf",o.selectedMeal))},dependencies:[g.bT,$.D,E.L,g.QX,C.D9,ze.w],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.details-header__header-wrapper[_ngcontent-%COMP%]{position:relative}.details-header__header[_ngcontent-%COMP%]{height:325px;margin-bottom:82px;background-color:#ff8732;z-index:1;position:relative;overflow:hidden}@media (min-width: 1024px){.details-header__header[_ngcontent-%COMP%]{height:420px;margin-bottom:116px}}.details-header__header[_ngcontent-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding-top:20px;display:flex;flex-flow:column nowrap}@media (min-width: 1024px){.details-header__header[_ngcontent-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding-top:32px}}.details-header__back[_ngcontent-%COMP%]{padding:9px 20px;border:none;border-radius:6px;background-color:#f5ebdc;display:flex;justify-content:center;align-items:center;cursor:pointer;width:-moz-fit-content;width:fit-content}.details-header__back[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:10px;transition:transform ease-in-out .2s}.details-header__back[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-family:
1Flame Sans,Arial,Helvetica,sans-serif}.details-header__back[_ngcontent-%COMP%]:hover   app-svg-icon[_ngcontent-%COMP%]{transform:translate(-10px)}.details-header__promo-header[_ngcontent-%COMP%]{margin:8px -20px 0;font-size:72px;line-height:88px;font-weight:700;text-align:center;color:#fff}.details-header__title-header[_ngcontent-%COMP%]{margin-bottom:32px;font-size:88px;line-height:88px;font-weight:700;text-align:center;color:#f5ebdc;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;bottom:0;width:auto;z-index:0;left:-100%;right:-100%}@media (min-width: 1024px){.details-header__title-header[_ngcontent-%COMP%]{font-size:148px;left:-50%;right:-50%;line-height:1}}.details-header__image[_ngcontent-%COMP%]{width:320px;height:320px;margin:auto;display:flex;justify-content:center;align-items:center;position:absolute;left:0;right:0;bottom:-82px;z-index:10}@media (min-width: 1024px){.details-header__image[_ngcontent-%COMP%]{width:400px;height:400px;bottom:-96px}}.details-header__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.details-header__content[_ngcontent-%COMP%]{max-width:1200px;padding:0 20px;margin:0 auto 32px}@media (min-width: 1024px){.details-header__content[_ngcontent-%COMP%]{max-width:600px;margin-bottom:42px;padding-left:10px;padding-right:10px}}.details-header__content-title[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:12px;font-size:32px;line-height:42px;font-weight:700;color:#502314}@media (min-width: 1024px){.details-header__content-title[_ngcontent-%COMP%]{font-size:48px;line-height:58px}}.details-header__content-promo-chip[_ngcontent-%COMP%]{display:inline-block;margin-bottom:6px;padding:0 6px 2px;border-radius:4px;background:#ff8732;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:24px;font-weight:400;color:#fff}.details-header__content-promo-chip.free[_ngcontent-%COMP%]{background:#198737}.details-header__content-desc[_ngcontent-%COMP%]{font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:16px;line-height:26px;color:#502314}.details-header__content-kcal[_ngcontent-%COMP%]{margin-top:20px;font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:16px;line-height:26px;font-weight:400;color:#502314a6}"],changeDetection:0})}}return n})();var qn=p(7084),Wn=p(281);function Kn(n,s){if(1&n&&(e.qex(0),e.j41(1,"a",5),e.nrm(2,"app-svg-icon",6),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"a",5),e.nrm(6,"app-svg-icon",6),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("routerLink",t.nutritionUrl),e.R7$(2),e.SpI(" ",e.bMT(4,4,"app.subpage.title.nutritional-information")," "),e.R7$(2),e.Y8G("routerLink",t.allergenUrl),e.R7$(2),e.SpI(" ",e.bMT(8,6,"app.subpage.title.allergens")," ")}}function Zn(n,s){if(1&n){const t=e.RV6();e.j41(0,"button",7),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.openNutritionalDialog())}),e.nrm(1,"app-svg-icon",6),e.EFF(2),e.nI1(3,"translate"),e.nI1(4,"translate"),e.k0s()}if(2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",t.externalNutritionsUrl?e.bMT(3,1,"menu.details.ingredients.label"):e.bMT(4,3,"menu.details.nutritional.label")," ")}}function ei(n,s){if(1&n){const t=e.RV6();e.j41(0,"button",7),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.sendMessageToWebview())}),e.nrm(1,"app-svg-icon",6),e.EFF(2),e.nI1(3,"translate"),e.k0s()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"menu.details.nutritional.label")," "))}function ti(n,s){if(1&n&&(e.j41(0,"a",10),e.nrm(1,"app-svg-icon",6),e.EFF(2),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("href",t.externalNutritionsUrl,e.B4B),e.R7$(2),e.SpI(" ",e.bMT(3,2,"menu.details.nutritional.label")," ")}}function ni(n,s){if(1&n&&(e.qex(0),e.DNE(1,ei,4,3,"button",8),e.nI1(2,"async"),e.DNE(3,ti,4,4,"ng-template",null,9,e.C5r),e.bVm()),2&n){const t=e.sdS(4),i=e.XpG();e.R7$(1),e.Y8G("ngIf",e.bMT(2,2,i.isWebview$))("ngIfElse",t)}}let Ue=(()=>{class n{get formMeal(){return this.form?this.form.controls.selectedMeal.value:null}get formSides(){return this.form?this.form.controls.sides.value:[]}get formDrinks(){return this.form?this.form.controls.drinks.value:[]}get formSauces(){return this.form?this.form.controls.sauces.value:[]}constructor(t,i,o,a,r){this.store=t,this.dialog=i,this.dialogsService=o,this.cd=a,this.nutritionAllergenService=r,this.showCalories=!0,this.openedInOrdering=!0,this.nutritionalTables$=this.store.select(T.H6),this.isWebview$=this.store.select(ce.Vr),this.lastFetchedIds=[],this.items=[],this.nutritionUrl="/"+m.C.Nutrition,this.allergenUrl="/"+m.C.AllergenInformation,this.externalNutritionsUrl=null,this.sub=new A.yU}ngOnInit(){this.checkExternalNutritionsUrl()}ngOnDestroy(){this.sub.unsubscribe()}checkExternalNutritionsUrl(){this.sub.add(this.store.select(T.u2).pipe((0,G.p)(t=>!!t)).subscribe(t=>this.externalNutritionsUrl=t))}getSelectedIds(){if(!this.form)return[this.meal?.externalId||""];const t=this.formSides||[],i=this.formDrinks||[],o=this.formSauces||[];return[this.formMeal?.externalId||"",...t.filter(_=>_.selected).map(_=>_.externalId),...i.filter(_=>_.selected).map(_=>_.externalId),...o.filter(_=>_.selected).map(_=>_.externalId)]}areArraysTheSame(t,i){const o=[...t].sort(),a=[...i].sort();return o.length===a.length&&o.every((r,l)=>r===a[l])}openNutritionalDialog(){var t=this;return(0,w.A)(function*(){const i=t.getSelectedIds(),o=t.areArraysTheSame(i,t.lastFetchedIds)?t.items:yield t.nutritionAllergenService.getNutritionalDialogData(i);t.lastFetchedIds=i,t.items=o;const a=t.form?t.formMeal:t.meal;!a||!o||o.length<1||t.dialogsService.showNutritionalDialog({mainProduct:{productName:a.productName,imageUrl:a.imageUrl},items:o,showCalories:t.showCalories,showMealTitle:t.openedInOrdering&&a.isComboMeal||!1})})()}sendMessageToWebview(){this.externalNutritionsUrl&&this.store.dispatch((0,qn.Er)({event:Be.ET.OpenInBrowser,payload:this.externalNutritionsUrl}))}refreshView(){this.cd.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(d.il),e.rXU(X.bZ),e.rXU(Se.J),e.rXU(e.gRc),e.rXU(Wn.A))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details-nutritional"]],inputs:{meal:"meal",form:"form",showCalories:"showCalories",openedInOrdering:"openedInOrdering"},decls:7,vars:5,consts:[[1,"wrapper","pt-0","p-0"],[1,"list"],[4,"ngIf","ngIfElse"],["nutritionalDialog",""],[4,"ngIf"],[1,"list__item",3,"routerLink"],["icon","doc","size","large","aria-hidden","true"],["type","button",1,"list__item",3,"click"],["class","list__item","type","button",3,"click",4,"ngIf","ngIfElse"],["noWebview",""],["target","_blank","rel","noopener noreferrer",1,"list__item",3,"href"]],template:function(i,o){if(1&i&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,Kn,9,8,"ng-container",2),e.nI1(3,"async"),e.DNE(4,Zn,5,5,"ng-template",null,3,e.C5r),e.DNE(6,ni,5,4,"ng-container",4),e.k0s()()),2&i){const a=e.sdS(5);e.R7$(2),e.Y8G("ngIf",e.bMT(3,3,o.nutritionalTables$))("ngIfElse",a),e.R7$(4),e.Y8G("ngIf",o.externalNutritionsUrl)}},dependencies:[g.bT,S.Wk,$.D,g.Jj,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.list[_ngcontent-%COMP%]{margin-top:32px;display:flex;flex-flow:column wrap;justify-content:space-around;
1gap:20px}.list__item[_ngcontent-%COMP%]{cursor:pointer;border:none;background:transparent;font-size:16px;line-height:24px;font-weight:400;color:#d62300;text-decoration:none;display:flex;align-items:center}.list__item[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:12px}"],changeDetection:0})}}return n})();function ii(n,s){if(1&n&&(e.j41(0,"span",3),e.EFF(1),e.nI1(2,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,t.value.price)," ")}}let oi=(()=>{class n{constructor(){this.multipleSelection=!1}get value(){return this.condiment.value}toggleSelection(){this.multipleSelection&&this.value.selectedAmount>1||this.condiment.setValue({...this.condiment.value,selectedAmount:this.value.selectedAmount>0?0:1})}changeValue(t,i){this.multipleSelection&&(i.stopPropagation(),this.condiment.setValue({...this.condiment.value,selectedAmount:t?this.value.selectedAmount+1:this.value.selectedAmount-1}))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-customize-burger-tile"]],inputs:{condiment:"condiment",multipleSelection:"multipleSelection"},decls:5,vars:6,consts:[["type","button",1,"item",3,"click"],["checkStyle","checkbox","aria-hidden","true","tabindex","-1",3,"isSelected"],["class","price",4,"ngIf"],[1,"price"]],template:function(i,o){1&i&&(e.j41(0,"button",0),e.bIt("click",function(){return o.toggleSelection()}),e.nrm(1,"app-checkmark",1),e.j41(2,"span"),e.EFF(3),e.k0s(),e.DNE(4,ii,3,3,"span",2),e.k0s()),2&i&&(e.AVh("selected",o.value.selectedAmount>0),e.BMQ("aria-pressed",o.value.selectedAmount>0),e.R7$(1),e.Y8G("isSelected",o.value.selectedAmount>0),e.R7$(2),e.JRh(o.value.name),e.R7$(1),e.Y8G("ngIf",!o.value.isDefault))},dependencies:[g.bT,ee.B,j.g],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}[_nghost-%COMP%]{display:block}.item[_ngcontent-%COMP%]{width:100%;height:64px;padding:0 12px 0 20px;display:flex;align-items:center;gap:12px;position:relative;border:none;border-radius:8px;background-color:#f5ebdc;color:#502314;cursor:pointer;transition:all .15s ease-out}.item.selected[_ngcontent-%COMP%]{box-shadow:0 4px 20px #0000001a;background-color:#fff}.item[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-style:normal;font-weight:700;font-size:16px;line-height:24px}.item[_ngcontent-%COMP%]   .price[_ngcontent-%COMP%]{padding:2px 16px;border-radius:0 6px;background-color:#50231410;position:absolute;right:0;top:0;font-size:16px;line-height:24px}.item[_ngcontent-%COMP%]   .price.price-increase[_ngcontent-%COMP%]{color:#000}.item[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-family:
1Flame;font-size:16px;line-height:24px;font-weight:400}"]})}}return n})();var ye=p(7673),Pe=p(9172);function si(n,s){1&n&&e.nrm(0,"app-customize-burger-tile",6),2&n&&e.Y8G("condiment",s.$implicit)}function ai(n,s){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.burger.label.hide-options")," "))}function ri(n,s){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.burger.label.show-options")," "))}let li=(()=>{class n{constructor(){this.listExpanded=!1,this.includedCondiments$=(0,ye.of)([]),this.extraCondiments$=(0,ye.of)([]),this.extraCondimentsData$=(0,ye.of)({quantity:0,price:0})}ngOnInit(){this.includedCondiments$=this.condiments.valueChanges.pipe((0,Pe.Z)(this.condiments.value),(0,P.T)(t=>this.getIncludedCondiments())),this.extraCondiments$=this.condiments.valueChanges.pipe((0,Pe.Z)(this.condiments.value),(0,P.T)(t=>this.getExtraCondiments())),this.extraCondimentsData$=this.condiments.valueChanges.pipe((0,Pe.Z)(this.condiments.value),(0,P.T)(t=>this.getExtraCondimentsData(t)))}toggleList(){this.listExpanded=!this.listExpanded}getIncludedCondiments(){return this.condiments.controls.filter(t=>t.value.isDefault)}getExtraCondiments(){return this.condiments.controls.filter(t=>!t.value.isDefault)}getExtraCondimentsData(t){const i={quantity:0,price:0};return t.forEach(o=>{!o.isDefault&&o.selectedAmount&&(i.quantity+=o.selectedAmount,i.price+=o.price*o.selectedAmount)}),i}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-customize-burger"]],inputs:{condiments:"condiments"},decls:7,vars:10,consts:[[1,"customization"],["id","condiments-list",1,"list"],["class","item",3,"condiment",4,"ngFor","ngForOf"],["type","button","aria-controls","condiments-list",1,"button",3,"click"],["icon","arrow-down","size","small","aria-hidden","true",1,"img"],[4,"ngIf"],[1,"item",3,"condiment"]],template:function(i,o){1&i&&(e.j41(0,"div",0)(1,"div",1),e.DNE(2,si,1,1,"app-customize-burger-tile",2),e.k0s(),e.j41(3,"button",3),e.bIt("click",function(){return o.toggleList()}),e.nrm(4,"app-svg-icon",4),e.DNE(5,ai,3,3,"span",5),e.DNE(6,ri,3,3,"span",5),e.k0s()()),2&i&&(e.R7$(1),e.xc7("height",76*o.condiments.controls.length+8,"px"),e.AVh("folded",!o.listExpanded),e.R7$(1),e.Y8G("ngForOf",o.condiments.controls),e.R7$(1),e.BMQ("aria-expanded",o.listExpanded),e.R7$(1),e.AVh("fold",o.listExpanded),e.R7$(1),e.Y8G("ngIf",o.listExpanded),e.R7$(1),e.Y8G("ngIf",!o.listExpanded))},dependencies:[g.Sq,g.bT,$.D,oi,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.customization[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]{width:100%;height:48px;border:2px solid #d62300;border-radius:6px;background-color:transparent;color:#d62300;cursor:pointer;display:flex;align-items:center;justify-content:center}.customization[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:14px}.customization[_ngcontent-%COMP%]   .button[_ngcontent-%COMP%]   app-svg-icon.fold[_ngcontent-%COMP%]{transform:rotate(180deg)}.customization[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]{padding:0 15px;margin:0 -15px;overflow:hidden;visibility:visible;transition:height .2s ease-out}.customization[_ngcontent-%COMP%]   .list.folded[_ngcontent-%COMP%]{height:0!important;visibility:hidden}.customization[_ngcontent-%COMP%]   .list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{margin-bottom:12px}"],data:{animation:[(0,I.hZ)("openClose",[(0,I.wk)("open",(0,I.iF)({maxHeight:"{{numberOfDropdownItems}}px"}),{params:{numberOfDropdownItems:1}}),(0,I.wk)("closed",(0,I.iF)({maxHeight:"0"})),(0,I.kY)("open => closed",[(0,I.i0)("0.3s")]),(0,I.kY)("closed => open",[(0,I.i0)("0.3s")])])]}})}}return n})();const ci=["buttons"],di=["button"];function pi(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG().$implicit;e.Y8G("src",t.imageUrl,e.B4B)("alt",t.sourceStep)}}function ui(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("src",(null==i.builderSettings?null:i.builderSettings.additionalSides1AlternativeIconUrl)||"/assets/icons/icon-product-details-selections-side.svg",e.B4B)("alt",t.sourceStep)}}function mi(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("src",(null==i.builderSettings?null:i.builderSettings.additionalSides2AlternativeIconUrl)||"/assets/icons/icon-product-details-selections-side.svg",e.B4B)("alt",t.sourceStep)}}function gi(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("src",(null==i.builderSettings?null:i.builderSettings.additionalSides3AlternativeIconUrl)||"/assets/icons/icon-product-details-selections-side.svg",e.B4B)("alt",t.sourceStep)}}function hi(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("src",(null==i.builderSettings?null:i.builderSettings.sidesAlternativeIconUrl)||"/assets/icons/icon-product-details-selections-side.svg",e.B4B)("alt",t.sourceStep)}}function _i(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("src",(null==i.builderSettings?null:i.builderSettings.drinksAlternativeIconUrl)||"/assets/icons/icon-product-details-selections-drink.svg",e.B4B)("alt",t.sourceStep)}}function fi(n,s){if(1&n&&e.nrm(0,"img",9),2&n){const t=e.XpG(2).$implicit,i=e.XpG();e.Y8G("src",(null==i.builderSettings?null:i.builderSettings.saucesAlternativeIconUrl)||"/assets/icons/icon-product-details-selections-sauce.svg",e.B4B)("alt",t.sourceStep)}}function xi(n,s){if(1&n&&(e.qex(0,10),e.DNE(1,ui,1,2,"img",11),e.DNE(2,mi,1,2,"img",11),e.DNE(3,gi,1,2,"img",11),e.DNE(4,hi,1,2,"img",11),e.DNE(5,_i,1,2,"img",11),e.DNE(6,fi,1,2,"img",11),e.bVm()),2&n){const t=e.XpG().$implicit,i=e.XpG();e.Y8G("ngSwitch",t.sourceStep),e.R7$(1),e.Y8G("ngSwitchCase",i.MealStepEnum.AdditionalSides1),e.R7$(1),e.Y8G("ngSwitchCase",i.MealStepEnum.AdditionalSides2),e.R7$(1),e.Y8G("ngSwitchCase",i.MealStepEnum.AdditionalSides3),e.R7$(1),e.Y8G("ngSwitchCase",i.MealStepEnum.Sides),e.R7$(1),e.Y8G("ngSwitchCase",i.MealStepEnum.Drinks),e.R7$(1),e.Y8G("ngSwitchCase",i.MealStepEnum.Sauces)}}function Ci(n,s){if(1&n){const t=e.RV6();e.j41(0,"button",5,6),e.bIt("click",function(){const o=e.eBV(t),a=o.$implicit,r=o.index,l=e.XpG();return e.Njj(l.itemSelected(a,r))}),e.DNE(2,pi,1,2,"img",7),e.DNE(3,xi,7,7,"ng-container",8),e.k0s()}if(2&n){const t=s.$implicit;e.AVh("focused",t.focused),e.BMQ("aria-current",t.focused?"step":"false"),e.R7$(2),e.Y8G("ngIf",t.imageUrl),e.R7$(1),e.Y8G("ngIf",!t.imageUrl)}}let Mi=(()=>{class n{set mealStep(t){this.currentStep=t,this.populateList(this.form.getRawValue()),t!==c.Summary&&(this.focusFirstBlankInStep(),this.scrollToFocusedItem(),this.focusSelectedButton())}get selectedMeal(){return this.form.controls.selectedMeal}get additionalSides1(){return this.form.controls.additionalSides1}get additionalSides2(){return this.form.controls.additionalSides2}get additionalSides3(){return this.form.controls.additionalSides3}get sides(){return this.form.controls.sides}get drinks(){return this.form.controls.drinks}get sauces(){return this.form.controls.sauces}get builderSettings(){return this.selectedMeal.value?.menuBuilderSettings}constructor(t,i,o){this.cd=t,this.messageService=i,this.translateService=o,this.mealStepChange=new e.bkB,this.currentStep=c.Start,this.customStepsOrder=[],this.list=[],this.MealStepEnum=c,this.sub=new A.yU}ngOnInit(){this.listenToFormChanges(),this.populateList(this.form.value),this.focusFirstBlankInStep(),this.scrollToFocusedItem()}ngAfterViewInit(){this.focusSelectedButton()}ngOnDestroy(){this.sub.unsubscribe()}trackListItem(t,i){return i?i.externalId:void 0}itemSelected(t,i){if(t.sourceStep!==this.currentStep)return this.checkIfSelectedStepAvailable(t.sourceStep)?void this.mealStepChange.emit(t.sourceStep):void this.show
1FormInvalidToast();this.list.forEach(o=>o.focused=!1),t.focused=!0,this.scrollToFocusedItem(),this.refreshView()}focusSelectedButton(){if(!this.buttonsList)return;const t=this.buttonsList.find(i=>i.nativeElement.classList.contains("focused"));t&&t.nativeElement.focus()}listenToFormChanges(){this.sub.add(this.form.valueChanges.subscribe(t=>{this.populateList(t),this.focusFirstBlankInStep(),this.scrollToFocusedItem()}))}populateList(t){if(!t.selectedMeal)return void this.showFormInvalidToast();const i=t.selectedMeal.menuBuilderSettings.comboExtraListsOrder;if(i&&i.length){const o=[c.Start,...le(i),c.Summary];this.setExtrasInCustomOrder(o,t)}else{const o=[c.Start,...Me(),c.Summary];this.setExtrasInCustomOrder(o,t)}}setExtrasInCustomOrder(t,i){if(!i.selectedMeal)return void this.showFormInvalidToast();this.customStepsOrder=[...t];const o=this.customStepsOrder.findIndex(l=>l===this.currentStep);if(o<0)return;this.list=[{externalId:i.selectedMeal.externalId,imageUrl:i.selectedMeal.imageUrl||null,sourceStep:c.Start,focused:!1}];const a=[...this.customStepsOrder].reverse().findIndex(l=>this.getExtrasForCustomOrder(l,i).some(u=>!!u.externalId));let r=a<0?o:this.customStepsOrder.length-1-a;r<o&&(r=o);for(let l=0;l<=r;l++)this.list.push(...this.getExtrasForCustomOrder(this.customStepsOrder[l],i));for(let l=r+1;l<this.customStepsOrder.length;l++){const _=this.getExtrasForCustomOrder(this.customStepsOrder[l],i);_.filter(h=>!!h.externalId).length>0&&this.list.push(..._)}}getExtrasForCustomOrder(t,i){if(!i.selectedMeal)return[];const o=i.selectedMeal;switch(t){case c.AdditionalSides1:return this.getExtrasForList(c.AdditionalSides1,i.additionalSides1||[],o);case c.AdditionalSides2:return this.getExtrasForList(c.AdditionalSides2,i.additionalSides2||[],o);case c.AdditionalSides3:return this.getExtrasForList(c.AdditionalSides3,i.additionalSides3||[],o);case c.Sides:return this.getExtrasForList(c.Sides,i.sides||[],o);case c.Drinks:return this.getExtrasForList(c.Drinks,i.drinks||[],o);case c.Sauces:return this.getExtrasForList(c.Sauces,i.sauces||[],o);default:return[]}}getExtrasForList(t,i,o){const a=[];let r=null;switch(t){case c.AdditionalSides1:r=o.additionalSides1Limit||null;break;case c.AdditionalSides2:r=o.additionalSides2Limit||null;break;case c.AdditionalSides3:r=o.additionalSides3Limit||null;break;case c.Sides:r=o.sidesLimit||null;break;case c.Drinks:r=o.drinksLimit||null;break;case c.Sauces:r=o.saucesLimit||null}if(!r)return[];if(i?.forEach(l=>{if(!l.selected)return;let u=l.selectedIncluded+l.selectedExtra;for(;u--;)a.push({externalId:l.externalId,imageUrl:l.imageUrl,sourceStep:t,focused:!1})}),r>0&&a.length<r){let l=r-a.length;for(;l--;)a.push({externalId:null,imageUrl:null,sourceStep:t,focused:!1})}return a}focusFirstBlankInStep(){if(this.list.forEach(o=>o.focused=!1),this.refreshView(),this.currentStep===c.Summary)return;const t=this.list.filter(o=>o.sourceStep===this.currentStep),i=t.find(o=>!o.externalId);if(i)return i.focused=!0,void this.refreshView();t[t.length-1].focused=!0,this.refreshView()}checkIfSelectedStepAvailable(t){const i=this.builderSettings?.comboExtraListsOrder;return i&&i.length>0?this.customStepsOrder.findIndex(r=>r===t)<this.customStepsOrder.findIndex(r=>r===this.currentStep)||this.checkIfStepValid(this.currentStep):t<this.currentStep||this.checkIfStepValid(this.currentStep)}checkIfStepValid(t){switch(t){case c.Start:return this.form.controls.customizeBurger.valid||!1;case c.AdditionalSides1:return this.form.controls.additionalSides1.valid||!1;case c.AdditionalSides2:return this.form.controls.additionalSides2.valid||!1;case c.AdditionalSides3:return this.form.controls.additionalSides3.valid||!1;case c.Sides:return this.form.controls.sides.valid||!1;case c.Drinks:return this.form.controls.drinks.valid||!1;case c.Sauces:return this.form.controls.sauces.valid||!1;default:return!0}}scrollToFocusedItem(){setTimeout(()=>{if(!this.buttonsContainer||!this.buttonsList)return;const t=this.buttonsList.find(l=>
1l.nativeElement.classList.contains("focused"));if(!t)return;const i=this.buttonsContainer.nativeElement.clientWidth;this.buttonsContainer.nativeElement.scrollTo({left:t.nativeElement.offsetLeft-i+(i/2+t.nativeElement.clientWidth/2),behavior:"smooth"})},0)}showFormInvalidToast(){const t=this.translateService.instant("menu.details.add-to-basket.error.selection");this.messageService.showWarningToast(t)}refreshView(){this.cd.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(e.gRc),e.rXU(L.b),e.rXU(C.c$))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-meal-selected-extras"]],viewQuery:function(i,o){if(1&i&&(e.GBs(ci,5),e.GBs(di,5)),2&i){let a;e.mGM(a=e.lsd())&&(o.buttonsContainer=a.first),e.mGM(a=e.lsd())&&(o.buttonsList=a)}},inputs:{form:"form",mealStep:"mealStep"},outputs:{mealStepChange:"mealStepChange"},decls:7,vars:5,consts:[[1,"selections"],[1,"selections__title"],[1,"selections__btns"],["buttons",""],["class","selections__btn",3,"focused","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"selections__btn",3,"click"],["button",""],[3,"src","alt",4,"ngIf"],[3,"ngSwitch",4,"ngIf"],[3,"src","alt"],[3,"ngSwitch"],[3,"src","alt",4,"ngSwitchCase"]],template:function(i,o){1&i&&(e.j41(0,"section",0)(1,"h2",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",2,3),e.DNE(6,Ci,4,5,"button",4),e.k0s()()),2&i&&(e.R7$(2),e.JRh(e.bMT(3,3,"menu.details.customize.selections.title")),e.R7$(4),e.Y8G("ngForOf",o.list)("ngForTrackBy",o.trackListItem))},dependencies:[g.Sq,g.bT,g.ux,g.e1,E.L,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.selections__title[_ngcontent-%COMP%]{margin-bottom:12px;font-size:20px;line-height:32px;font-weight:700;color:#502314}.selections__btns[_ngcontent-%COMP%]{margin:0 -20px;padding:0 20px 32px;overflow-x:auto;position:relative;display:flex;flex-flow:row nowrap;gap:12px}.selections__btn[_ngcontent-%COMP%]{flex-shrink:0;width:62px;height:62px;border:none;border-radius:10px;background:#fff;box-shadow:0 4px 12px #0000001a;overflow:hidden}.selections__btn.focused[_ngcontent-%COMP%]{border:2px solid #d62300}.selections__btn[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;padding:4px;object-fit:contain;object-position:center}"],changeDetection:0})}}return n})();function bi(n,s){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"translate"),e.bVm()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.meal-size-selection.small")," "))}function Si(n,s){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"translate"),e.bVm()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.meal-size-selection.medium")," "))}function yi(n,s){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"translate"),e.bVm()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.meal-size-selection.large")," "))}let Pi=(()=>{class n{constructor(){this.isSelected=!1,this.size=R.Medium,this.tileSelect=new e.bkB,this.MealSize=R}onSelect(){this.isSelected||this.tileSelect.emit()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-meal-size-selection-tile"]],inputs:{isSelected:"isSelected",size:"size"},outputs:{tileSelect:"tileSelect"},decls:6,vars:8,consts:[["type","button",1,"tile",3,"click"],["checkStyle","checkbox","aria-hidden","true","tabindex","-1",3,"isSelected"],[1,"label",3,"ngSwitch"],[4,"ngSwitchCase"]],template:function(i,o){1&i&&(e.j41(0,"button",0),e.bIt("click",function(){return o.onSelect()}),e.nrm(1,"app-checkmark",1),e.j41(2,"span",2),e.DNE(3,bi,3,3,"ng-container",3),e.DNE(4,Si,3,3,"ng-container",3),e.DNE(5,yi,3,3,"ng-container",3),e.k0s()()),2&i&&(e.AVh("selected",o.isSelected),e.BMQ("aria-pressed",o.isSelected),e.R7$(1),e.Y8G("isSelected",o.isSelected),e.R7$(1),e.Y8G("ngSwitch",o.size),e.R7$(1),e.Y8G("ngSwitchCase",o.MealSize.Small),e.R7$(1),e.Y8G("ngSwitchCase",o.MealSize.Medium),e.R7$(1),e.Y8G("ngSwitchCase",o.MealSize.Large))},dependencies:[g.ux,g.e1,ee.B,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.tile[_ngcontent-%COMP%]{width:100%;padding:20px 20px 20px 24px;border:none;border-radius:8px;background:#f5ebdc;display:flex;flex-flow:row nowrap;align-items:center;gap:16px}.tile.selected[_ngcontent-%COMP%]{background:#fff;box-shadow:0 4px 20px #0000001a}
1.tile[_ngcontent-%COMP%]   .label[_ngcontent-%COMP%]{font-family:Flame,Arial,Helvetica,sans-serif;font-size:14px;line-height:24px;font-weight:400;color:#502314}"],changeDetection:0})}}return n})();var He=p(971);function Oi(n,s){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI("",e.bMT(2,1,"basket.items.condiments.extra")," "))}function ki(n,s){if(1&n&&(e.j41(0,"p",12),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.desc)}}function Ii(n,s){if(1&n&&(e.j41(0,"p",13)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4),e.nI1(5,"numberToCurrency"),e.k0s()()),2&n){const t=s.$implicit;e.R7$(2),e.SpI("",t.name," "),e.R7$(2),e.SpI("(",e.bMT(5,2,t.price),")")}}function vi(n,s){1&n&&(e.j41(0,"span"),e.EFF(1,"+ "),e.k0s())}function wi(n,s){if(1&n&&(e.j41(0,"span",16),e.EFF(1),e.nI1(2,"numberToCurrency"),e.k0s()),2&n){const t=e.XpG(2).$implicit;e.R7$(1),e.SpI(" ",e.bMT(2,1,t.discountedPricePerItem)," ")}}function Ti(n,s){if(1&n&&(e.j41(0,"div",14),e.DNE(1,vi,2,0,"span",7),e.j41(2,"span"),e.EFF(3),e.nI1(4,"numberToCurrency"),e.k0s(),e.DNE(5,wi,3,3,"span",15),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",!t.isBaseItem),e.R7$(1),e.AVh("old",t.discountedPricePerItem),e.R7$(1),e.SpI(" ",e.bMT(4,5,t.pricePerItem)," "),e.R7$(2),e.Y8G("ngIf",t.discountedPricePerItem)}}function Ei(n,s){if(1&n&&(e.j41(0,"li",4)(1,"div",5)(2,"h3",6),e.DNE(3,Oi,3,3,"span",7),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.DNE(6,ki,2,1,"p",8),e.DNE(7,Ii,6,4,"p",9),e.k0s(),e.DNE(8,Ti,6,7,"div",10),e.j41(9,"div",11),e.EFF(10),e.k0s()()),2&n){const t=s.$implicit;e.R7$(3),e.Y8G("ngIf",t.isExtraItem),e.R7$(2),e.JRh(t.name),e.R7$(1),e.Y8G("ngIf",t.desc),e.R7$(1),e.Y8G("ngForOf",t.mandatoryCondiments),e.R7$(1),e.Y8G("ngIf",t.pricePerItem>0),e.R7$(2),e.SpI("x",t.amount,"")}}let Ri=(()=>{class n{get productPromo(){return this.promotion?.promotionType===O.Qw.ProductPercentage||this.promotion?.promotionType===O.Qw.FixedPrice?this.promotion:null}constructor(t,i){this.translateService=t,this.currencyNumberPipe=i,this.promotion=null,this.selectedItems=[]}ngOnInit(){this.selectedItems=this.getSelectedItems()}getSelectedItems(){const t=[],i=this.form.controls.selectedMeal.value,o=this.form.controls.customizeBurger;if(!i)return[];const a=this.getCondimentsSurcharge(o.getRawValue());let r;this.productPromo?.discount&&(r=(0,He.E)(i.price,this.productPromo.discount)+a),this.productPromo?.fixedPrice&&(r=this.productPromo.fixedPrice+a),t.push({name:i.productName||"",desc:this.getChangedCondiments(o.getRawValue()),amount:1,pricePerItem:i.price+a,discountedPricePerItem:r,mandatoryCondiments:i.condiments.filter(_=>_.isMandatory),isBaseItem:!0,isExtraItem:!1});const l=i.menuBuilderSettings.comboExtraListsOrder;return(l&&l.length?le(l):Me()).forEach(_=>t.push(...this.getMealStepSelectedItems(_))),t}getMealStepSelectedItems(t){switch(t){case c.AdditionalSides1:return this.form.controls.additionalSides1.getRawValue().filter(i=>i.selected).map(i=>this.transformSideIntoItem(i)).flat();case c.AdditionalSides2:return this.form.controls.additionalSides2.getRawValue().filter(i=>i.selected).map(i=>this.transformSideIntoItem(i)).flat();case c.AdditionalSides3:return this.form.controls.additionalSides3.getRawValue().filter(i=>i.selected).map(i=>this.transformSideIntoItem(i)).flat();case c.Sides:return this.form.controls.sides.getRawValue().filter(i=>i.selected).map(i=>this.transformSideIntoItem(i)).flat();case c.Drinks:return this.form.controls.drinks.getRawValue().filter(i=>i.selected).map(i=>this.transformSideIntoItem(i)).flat();case c.Sauces:return this.form.controls.sauces.getRawValue().filter(i=>i.selected).map(i=>this.transformSideIntoItem(i)).flat();default:return[]}}getCondimentsSurcharge(t){return t.filter(i=>!i.isDefault&&i.selectedAmount).reduce((i,o)=>i+o.price*o.selectedAmount,0)}getChangedCondiments(t){const i=t.filter(u=>u.isDefault&&!u.selectedAmount),o=t.filter(u=>!u.isDefault&&u.selectedAmount),a=this.translateService.instant("basket.items.condiments.excluded"),r=this.translateService.instant("basket.items.condiments.extra");let l="";
1return i.forEach(u=>l+=`${a} ${u.name}, `),o.forEach(u=>{let _=`${r} ${u.name}`;u.selectedAmount>1&&(_+=` x${u.selectedAmount}`),u.price&&(_+=` (${this.currencyNumberPipe.transform(u.price*u.selectedAmount)})`),l+=`${_}, `}),l.slice(0,-2)}transformSideIntoItem(t){const i=[];return t.selectedIncluded&&i.push({name:t.productName||"",desc:null,amount:t.selectedIncluded,pricePerItem:t.price,mandatoryCondiments:(t.condiments||[]).filter(o=>o.isMandatory),isExtraItem:!1,isBaseItem:!1}),t.selectedExtra&&i.push({name:t.productName||"",desc:null,amount:t.selectedExtra,pricePerItem:t.fullPrice,mandatoryCondiments:(t.condiments||[]).filter(o=>o.isMandatory),isExtraItem:!0,isBaseItem:!1}),i}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(C.c$),e.rXU(j.g))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-meal-summary"]],inputs:{form:"form",promotion:"promotion"},features:[e.Jv_([j.g])],decls:6,vars:4,consts:[[1,"summary"],[1,"summary__title"],[1,"summary__tile"],["class","summary__item",4,"ngFor","ngForOf"],[1,"summary__item"],[1,"summary__item-texts"],[1,"summary__item-name"],[4,"ngIf"],["class","summary__item-desc",4,"ngIf"],["class","summary__item-surcharge",4,"ngFor","ngForOf"],["class","summary__item-price",4,"ngIf"],[1,"summary__item-amount"],[1,"summary__item-desc"],[1,"summary__item-surcharge"],[1,"summary__item-price"],["class","new",4,"ngIf"],[1,"new"]],template:function(i,o){1&i&&(e.j41(0,"section",0)(1,"h2",1),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"ul",2),e.DNE(5,Ei,11,6,"li",3),e.k0s()()),2&i&&(e.R7$(2),e.JRh(e.bMT(3,2,"menu.details.customize.selections.title")),e.R7$(3),e.Y8G("ngForOf",o.selectedItems))},dependencies:[g.Sq,g.bT,C.D9,j.g],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.summary__title[_ngcontent-%COMP%]{margin-bottom:12px;font-size:20px;line-height:32px;font-weight:700;color:#502314}.summary__tile[_ngcontent-%COMP%]{border-radius:8px;position:relative;cursor:pointer;overflow:hidden;display:flex;flex-flow:column nowrap;gap:2px}.summary__item[_ngcontent-%COMP%]{padding:16px 16px 15px;background:#ffffff;display:flex;flex-flow:row nowrap;align-items:center;gap:16px;font-size:16px;line-height:24px;font-weight:400;color:#502314}.summary__item[_ngcontent-%COMP%]:last-child{padding-bottom:16px}.summary__item-texts[_ngcontent-%COMP%]{flex-grow:1}.summary__item-name[_ngcontent-%COMP%]{margin:0;font-size:16px;line-height:24px;font-weight:400;color:#502314}.summary__item-desc[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:0;
1font-family:Flame Sans;font-size:12px;line-height:16px;font-weight:400;color:#502314a6}.summary__item-price[_ngcontent-%COMP%]{color:#502314;white-space:nowrap}.summary__item-price[_ngcontent-%COMP%]   .old[_ngcontent-%COMP%]{line-height:14px;color:#502314a6;text-decoration:line-through}.summary__item-price[_ngcontent-%COMP%]   .new[_ngcontent-%COMP%]{margin-left:6px;line-height:14px}"]})}}return n})();var Je=p(4670),Di=p(1517);const Fi=["mealButton"];function $i(n,s){1&n&&(e.j41(0,"div",11),e.nrm(1,"app-svg-icon",12),e.j41(2,"span"),e.EFF(3),e.nI1(4,"translate"),e.k0s()()),2&n&&(e.R7$(1),e.Y8G("width",16)("height",16),e.R7$(2),e.JRh(e.bMT(4,3,"menu.details.customize.error")))}function Gi(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-additional-sides.label")," - "))}function Vi(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-additional-sides.label")," - "))}function Ni(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-additional-sides.label")," - "))}function ji(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-sides.label")," - "))}function Ai(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-drinks.label")," - "))}function Bi(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-sauces.label")," - "))}function zi(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-summary.label")," - "))}function Yi(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-add.label")," - "))}function Li(n,s){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.bVm()),2&n&&(e.R7$(2),e.SpI("",e.bMT(3,1,"menu.details.customize.meal-from.label")," "))}function Xi(n,s){1&n&&e.nrm(0,"app-spinner",13)}function Ui(n,s){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,$i,5,5,"div",4),e.j41(2,"button",5,6),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.selectMealNextStep())}),e.qex(4,7),e.DNE(5,Gi,4,3,"ng-container",8),e.DNE(6,Vi,4,3,"ng-container",8),e.DNE(7,Ni,4,3,"ng-container",8),e.DNE(8,ji,4,3,"ng-container",8),e.DNE(9,Ai,4,3,"ng-container",8),e.DNE(10,Bi,4,3,"ng-container",8),e.DNE(11,zi,4,3,"ng-container",8),e.DNE(12,Yi,4,3,"ng-container",9),e.bVm(),e.DNE(13,Li,4,3,"ng-container",1),e.j41(14,"span"),e.EFF(15),e.nI1(16,"numberToCurrency"),e.k0s(),e.DNE(17,Xi,1,0,"app-spinner",10),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.isSubmitted&&!t.currentStepValid),e.R7$(1),e.AVh("faded",!t.currentStepValid||t.mealOutOfStock),e.Y8G("disabled",t.mealOutOfStock||null),e.BMQ("aria-disabled",!t.currentStepValid),e.R7$(2),e.Y8G("ngSwitch",t.nextStep),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.AdditionalSides1),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.AdditionalSides2),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.AdditionalSides3),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.Sides),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.Drinks),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.Sauces),e.R7$(1),e.Y8G("ngSwitchCase",t.MealStepEnum.Summary),e.R7$(2),e.Y8G("ngIf",t.currentStep===t.MealStepEnum.Start),e.R7$(2),e.JRh(e.bMT(16,16,t.mealTotalPrice)),e.R7$(2),e.Y8G("ngIf",t.isLoading&&t.currentStep!==t.MealStepEnum.Start)}}function Hi(n,s){1&n&&e.nrm(0,"app-spinner",13)}function Ji(n,s){if(1&n){const t=e.RV6();e.j41(0,"button",5),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.addToCart(!1))}),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.nI1(6,"numberToCurrency"),e.k0s(),e.DNE(7,Hi,1,0,"app-spinner",10),e.k0s()}if(2&n){const t=e.XpG();e.AVh("faded",!t.currentStepValid||t.singleOutOfStock),e.Y8G("disabled",t.singleOutOfStock||null),e.BMQ("aria-disabled",!t.currentStepValid),e.R7$(2),e.SpI("",e.bMT(3,7,"menu.details.customize.add-single.label")," - "),e.R7$(3),e.JRh(e.bMT(6,9,t.singleTotalPrice)),e.R7$(2),e.Y8G("ngIf",t.isLoading)}}function Qi(n,s){if(1&n&&(e.j41(0,"div",14)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"span"),e.EFF(5),e.nI1(6,"numberToCurrency"),e.k0s()()),2&n){const t=e.XpG();e.AVh("faded",!t.currentStepValid),e.R7$(2),e.SpI("",e.bMT(3,4,"menu.details.customize.saved-amount.label")," "),e.R7$(3),e.SpI("",e.bMT(6,6,t.savedAmount),"!")}}let qi=(()=>{class n{set mealStep(t){this.currentStep=t,this.nextStep=this.getMealNextStep(t),this.currentStepValid=this.checkIfStepValid(t),this.isSubmitted=!1,t===c.Summary&&this.focusMealButton()}set promotion(t){this.promotionData=t,this.checkIfApplyPromotion(),this.setTotalPrices()}get selectedMeal(){return this.form.controls.selectedMeal.value}get isComboSelected(){return this.selectedMeal?.isComboMeal||!1}constructor(t,i,o,a,r,l,u,_){this.store$=t,this.messageService=i,this.dialogsService=o,this.changeDetector=a,this.actionsSubject=r,this.analyticsService=l,this.router=u,this.translateService=_,this.meals=[],this.mealStepChange=new e.bkB,this.scrollToExtras=new e.bkB,this.isLoading=!1,this.currentStep=c.Start,this.nextStep=c.Start,this.currentStepValid=!1,this.isSubmitted=!1,this.mealExists=!1,this.mealOutOfStock=!1,this.mealTotalPrice=0,this.singleExists=!1,this.singleOutOfStock=!1,this.singleTotalPrice=0,this.promotionData=null,this.productPromotion=null,this.qual
1ifyingProduct=!1,this.savedAmount=null,this.MealStepEnum=c,this.sub=new A.yU}ngOnInit(){this.checkIfApplyPromotion(),this.setTotalPrices(),this.listenToFormChange(),this.currentStepValid=this.checkIfStepValid(this.currentStep),this.refreshView()}ngOnDestroy(){this.sub.unsubscribe()}selectMealNextStep(){if(this.isSubmitted=!0,this.currentStepValid){if(!this.nextStep)return this.form.valid?void this.addToCart(!0):(this.showFormInvalidToast(),void this.scrollToExtras.emit());this.mealStepChange.emit(this.nextStep)}}focusMealButton(){this.mealButton&&this.mealButton.nativeElement.focus()}listenToFormChange(){this.sub.add(this.form.valueChanges.subscribe(t=>{this.setTotalPrices(),this.nextStep=this.getMealNextStep(this.currentStep);const i=this.checkIfStepValid(this.currentStep);!this.currentStepValid&&i&&this.nextStep?(this.currentStepValid=!0,this.selectMealNextStep()):this.currentStepValid=i,this.refreshView()}))}getMealNextStep(t){return be(t,this.selectedMeal)}checkIfStepValid(t){switch(t){case c.Start:return this.form.controls.customizeBurger.valid||!1;case c.AdditionalSides1:return this.form.controls.additionalSides1.valid||!1;case c.AdditionalSides2:return this.form.controls.additionalSides2.valid||!1;case c.AdditionalSides3:return this.form.controls.additionalSides3.valid||!1;case c.Sides:return this.form.controls.sides.valid||!1;case c.Drinks:return this.form.controls.drinks.valid||!1;case c.Sauces:return this.form.controls.sauces.valid||!1;default:return!0}}setTotalPrices(){const t=this.meals.find(o=>!o.isComboMeal);this.singleExists=!!t,this.singleOutOfStock=!!t&&t.outOfStock;const i=this.meals.find(o=>o.isComboMeal);this.mealExists=!!i,this.mealOutOfStock=!!i&&i.outOfStock,this.currentStep===c.Start&&(this.singleTotalPrice=this.singleExists?this.getTotalPrice(!1):0),this.mealTotalPrice=this.mealExists?this.getTotalPrice(!0):0,this.refreshView()}getTotalPrice(t){let o,i=0;if(o=this.selectedMeal?{...this.selectedMeal}:this.meals.find(t?h=>!0===h.isComboMeal:h=>!1===h.isComboMeal),!o)return 0;if(this.productPromotion)if(this.productPromotion.fixedPrice)this.savedAmount=o.price-this.productPromotion.fixedPrice,i+=this.productPromotion.fixedPrice;else if(this.productPromotion.discount){const h=(0,He.E)(o.price,this.productPromotion.discount);this.savedAmount=o.price-h,i+=h}else i+=o.price;else i+=o.price;if(this.form.controls.customizeBurger.getRawValue().filter(h=>!h.isDefault&&h.selectedAmount).forEach(h=>i+=h.price*h.selectedAmount),o.condiments.filter(h=>h.isMandatory).forEach(h=>i+=h.price),!t)return i;const r=this.form.controls.additionalSides2,l=this.form.controls.additionalSides3,u=this.form.controls.sides,_=this.form.controls.drinks,x=this.form.controls.sauces;return i+=this.getSelectedTilesPrice(this.form.controls.additionalSides1.getRawValue()),i+=this.getSelectedTilesPrice(r.getRawValue()),i+=this.getSelectedTilesPrice(l.getRawValue()),i+=this.getSelectedTilesPrice(u.getRawValue()),i+=this.getSelectedTilesPrice(_.getRawValue()),i+=this.getSelectedTilesPrice(x.getRawValue()),i}getSelectedTilesPrice(t){return t.filter(i=>i.selected).reduce((i,o)=>i+o.selectedIncluded*o.price+o.selectedExtra*o.fullPrice+(o.condiments||[]).filter(a=>a.isMandatory).reduce((a,r)=>a+r.price*(o.selectedIncluded+o.selectedExtra),0),0)}addToCart(t){var i=this;return(0,w.A)(function*(){if(i.isSubmitted=!0,i.isLoading)return;if(i.form.invalid||!i.selectedMeal)return i.showFormInvalidToast(),void i.refreshView();if(t&&i.mealOutOfStock||!t&&i.singleOutOfStock)return i.showProductOutOfStockToast(),void i.refreshView();const o=i.form.getRawValue(),a=i.transformFormIntoBasketItems(o);i.isLoading=!0;const r=yield i.addItemsToBasket(a);if(i.isLoading=!1,i.refreshView(),r){if(i.showAddedToCartToast(),i.promotionData){if(i.promotionData.promotionType===O.Qw.FreeProduct&&i.promotionData.freeProduct){const l=i.promotionData.freeProduct;(yield i.addEmptyItemToBasket(l.externalId,i.promotionData.code))?i.dialogsService.showFreeProductAddedToBasket({productName:l.productName,productImageUrl:l.imageUrl}):i.messageService.showGenericErrorToast()}else i.promotionData?.promotionType===O.Qw.OrderValue&&i.promotionData.selectedProduct&&((yield i.addPromotionToBasket(i.promotionData.code))||i.messageService.showGenericErrorToast());
1i.store$.dispatch((0,b.x3)())}i.selectedMeal.upsellItems?.length>0?i.showUpsellItemsToast():i.navigateToCategoryViewListener(),i.analyticsService.pushAddToBasket(i.selectedMeal.productName||"")}})()}addItemsToBasket(t){return this.store$.dispatch((0,b.lZ)({items:t})),(0,k._)(this.actionsSubject.pipe((0,B.i)(1),(0,M.gp)(b.Mh,b.fL),(0,y.s)(1),(0,P.T)(i=>i.type===b.Mh.type)))}addPromotionToBasket(t){return this.store$.dispatch((0,b.N)({code:t})),(0,k._)(this.actionsSubject.pipe((0,B.i)(1),(0,M.gp)(b.We,b.pc),(0,y.s)(1),(0,P.T)(i=>i.type===b.We.type)))}transformFormIntoBasketItems(t){if(!this.selectedMeal)return[];const i=[],o=[],a=[],r=[],l=[],u=[],_=[],x=[],h=[];return t.customizeBurger.forEach(f=>{f.isDefault?f.selectedAmount||o.push({externalId:f.externalId}):f.selectedAmount&&i.push({externalId:f.externalId,quantity:f.selectedAmount})}),t.additionalSides1.forEach(f=>{f.selected&&(f.selectedIncluded>0&&a.push({externalId:f.externalId,quantity:f.selectedIncluded}),f.selectedExtra>0&&h.push(f))}),t.additionalSides2.forEach(f=>{f.selected&&(f.selectedIncluded>0&&r.push({externalId:f.externalId,quantity:f.selectedIncluded}),f.selectedExtra>0&&h.push(f))}),t.additionalSides3.forEach(f=>{f.selected&&(f.selectedIncluded>0&&l.push({externalId:f.externalId,quantity:f.selectedIncluded}),f.selectedExtra>0&&h.push(f))}),t.sides.forEach(f=>{f.selected&&(f.selectedIncluded>0&&u.push({externalId:f.externalId,quantity:f.selectedIncluded}),f.selectedExtra>0&&h.push(f))}),t.drinks.forEach(f=>{f.selectedIncluded>0&&_.push({externalId:f.externalId,quantity:f.selectedIncluded}),f.selectedExtra>0&&h.push(f)}),t.sauces.forEach(f=>{f.selectedIncluded>0&&x.push({externalId:f.externalId,quantity:f.selectedIncluded}),f.selectedExtra>0&&h.push(f)}),[{menuItemId:this.selectedMeal.externalId,quantity:1,additionalCondiments:i,excludeCondiments:o,additionalSides1:a,additionalSides2:r,additionalSides3:l,sides:u,drinks:_,sauces:x,promoCode:this.productPromotion?.code||null,isComboMeal:!!this.selectedMeal.isComboMeal},...h.map(f=>({menuItemId:f.externalId,quantity:f.selectedExtra,additionalCondiments:[],excludeCondiments:[],additionalSides1:[],additionalSides2:[],additionalSides3:[],sides:[],drinks:[],sauces:[],promoCode:null,isComboMeal:!1}))]}addEmptyItemToBasket(t,i){return this.store$.dispatch((0,b.lZ)({items:[{menuItemId:t,quantity:1,additionalCondiments:[],excludeCondiments:[],additionalSides1:[],additionalSides2:[],additionalSides3:[],sides:[],drinks:[],sauces:[],isComboMeal:!1,promoCode:i}]})),(0,k._)(this.actionsSubject.pipe((0,B.i)(1),(0,M.gp)(b.Mh,b.fL),(0,y.s)(1),(0,P.T)(o=>o.type===b.Mh.type)))}navigateToCategoryViewListener(){this.store$.select(Fe.Y7).pipe((0,y.s)(1)).subscribe(t=>{t.categoryRef&&this.router.navigate([m.C.Menu,m.C.Order,t.categoryRef])})}checkIfApplyPromotion(){!this.promotionData||!this.selectedMeal||(this.productPromotion=this.promotionData.promotionType===O.Qw.ProductPercentage||this.promotionData.promotionType===O.Qw.FixedPrice?{...this.promotionData}:null,this.qualifyingProduct=this.promotionData.promotionType===O.Qw.FreeProduct||this.promotionData.promotionType===O.Qw.OrderValue&&!!this.promotionData.selectedProduct)}showAddedToCartToast(){const t=this.translateService.instant("menu.details.add-to-basket.message");this.messageService.showSuccessToast(t)}showFormInvalidToast(){const t=this.translateService.instant("menu.details.add-to-basket.error.selection");this.messageService.showWarningToast(t)}showProductOutOfStockToast(){const t=this.translateService.instant("menu.details.add-to-basket.error.out-of-stock");this.messageService.showWarningToast(t)}showUpsellItemsToast(){this.selectedMeal&&this.messageService.showUpsellItemsToast([...this.selectedMeal.upsellItems])}refreshView(){this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(d.il),e.rXU(L.b),e.rXU(Se.J),e.rXU(e.gRc),e.rXU(d.SS),e.rXU(Je.c),e.rXU(S.Ix),e.rXU(C.c$))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-add-to-basket"]],viewQuery:function(i,o){if(1&i&&e.GBs(Fi,5),2&i){let a;e.mGM(a=e.lsd())&&(o.mealButton=a.first)}},inputs:{form:"form",meals:"meals",mealStep:"mealStep",promotion:"promotion"},outputs:{mealStepChange:"mealStepChange",scrollToExtras:"scrollToExtras"},decls:4,vars:3,consts:[[1,"add-to-cart"],[4,"ngIf"],["class","add-to-cart__btn","type","button",3,"faded","disabled","click",4,"ngIf"],["class","add-to-cart__extra-info","role","status","aria-live","polite","aria-atomic","true",3,"faded",4,"ngIf"],["class","add-to-cart__error","role","alert","aria-live","assertive",4,"ngIf"],["type","button",1,"add-to-cart__btn",3,"disabled","click"],["mealButton",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["color","#fff",4,"ngIf"],["role","alert","aria-live","assertive",1,"add-to-cart__error"],["icon","exclamation-point","fill","color-spicy-red","aria-hidden","true",3,"width","height"],["color","#fff"],["role","status","aria-live","polite","aria-atomic","true",1,"add-to-cart__extra-info"]],template:function(i,o){1&i&&(e.j41(0,"section",0),e.DNE(1,Ui,18,18,"ng-container",1),e.DNE(2,Ji,8,11,"button",2),e.DNE(3,Qi,7,8,"div",3),e.k0s()),2&i&&(e.R7$(1),e.Y8G("ngIf",o.mealExists&&o.isComboSelected),e.R7$(1),e.Y8G("ngIf",o.currentStep===o.MealStepEnum.Start&&o.singleExists&&!o.isComboSelected),e.R7$(1),e.Y8G("ngIf",o.productPromotion&&o.savedAmount))},dependencies:[g.bT,g.ux,g.e1,g.fG,$.D,Di.t,C.D9,j.g],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.add-to-cart[_ngcontent-%COMP%]{margin-top:32px}.add-to-cart__error[_ngcontent-%COMP%]{margin-top:32px;margin-bottom:20px;padding:20px;background:#fff;display:flex;flex-flow:row nowrap;align-items:center}.add-to-cart__error[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{flex-shrink:0;margin-right:12px}.add-to-cart__error[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{flex-grow:1;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:16.8px;font-weight:400;color:#d90f06}.add-to-cart__btn[_ngcontent-%COMP%]{width:100%;margin-top:12px;padding:15px 15px 17px;display:flex;align-items:center;justify-content:center;font-size:16px;line-height:24px;font-weight:400;color:#f5ebdc;white-space:pre-wrap;border:none;border-radius:6px;background:#d62300;cursor:pointer;position:relative}.add-to-cart__btn[_ngcontent-%COMP%]   app-spinner[_ngcontent-%COMP%]{width:0;height:24px;position:relative;right:-24px}.add-to-cart__btn.faded[_ngcontent-%COMP%]{opacity:.3}.add-to-cart__extra-info[_ngcontent-%COMP%]{margin-top:16px;font-size:16px;line-height:24px;font-weight:400;color:#198737;text-align:center}.add-to-cart__extra-info.faded[_ngcontent-%COMP%]{opacity:.3}"],changeDetection:0})}}return n})();function Wi(n,s){if(1&n&&(e.j41(0,"span",8),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.product.shortDescription," ")}}let Ki=(()=>{class n{constructor(t){this.router=t,this.showCalories=!1}goToDetails(){const t=this.product?.slug;t&&this.router.navigate([m.C.Menu,t])}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-block-small"]],inputs:{product:"product",showCalories:"showCalories"},decls:10,vars:6,consts:[["type","button",1,"block-small",3,"click"],[1,"block-small__header"],[1,"block-small__content"],[1,"block-small__img"],[3,"src","alt"],[1,"block-small__description"],[1,"block-small__title"],["class","block-small__desc",4,"ngIf"],[1,"block-small__desc"]],template:function(i,o){1&i&&(e.j41(0,"button",0),e.bIt("click",function(){return o.goToDetails()}),e.nrm(1,"span",1),e.j41(2,"span",2)(3,"span",3),e.nrm(4,"img",4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"span",5)(7,"span",6),e.EFF(8),e.k0s(),e.DNE(9,Wi,2,1,"span",7),e.k0s()()()),2&i&&(e.R7$(4),e.Y8G("src",o.product.imageUrl,e.B4B)("alt",e.bMT(5,4,"general.alt.image-of")+(o.product.productName||"-")),e.R7$(4),e.SpI(" ",o.product.productName," "),e.R7$(1),e.Y8G("ngIf",o.product&&o.product.shortDescription))},dependencies:[g.bT,E.L,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.block-small[_ngcontent-%COMP%]{width:100%;position:relative;cursor:pointer;z-index:100;border:none;background:transparent;text-align:left}.block-small__header[_ngcontent-%COMP%]{width:44%;position:absolute;top:0;bottom:0;left:0;z-index:1;transition:width ease-in-out .2s;border-radius:8px;background-color:#f5ebdc}@media (min-width: 1024px){.block-small__header[_ngcontent-%COMP%]{width:36%}}.block-small__content[_ngcontent-%COMP%]{position:relative;z-index:2;height:100%;display:flex;padding:12px}.block-small__img[_ngcontent-%COMP%]{flex-shrink:0;width:78px;height:78px;margin-right:20px}.block-small__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}
1.block-small__title[_ngcontent-%COMP%]{font-family:Flame,Arial,Helvetica,sans-serif;font-size:20px;line-height:1.4;font-weight:700;color:#502314}.block-small__desc[_ngcontent-%COMP%]{color:#502314;font-size:14px;opacity:.65;font-family:Flame Sans,Arial,Helvetica,sans-serif}.block-small__description[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center}.block-small__description[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;text-align:left}.block-small[_ngcontent-%COMP%]:hover   .block-small__header[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})}}return n})();function Zi(n,s){if(1&n&&(e.j41(0,"span",8),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",null==t.product?null:t.product.shortDescription," ")}}let eo=(()=>{class n{constructor(t){this.router=t,this.showCalories=!1,this.showDescription=F.c.defaultLang!==ge.yf.SE}goToDetails(){const t=this.product?.slug;t&&this.router.navigate([m.C.Menu,t])}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-block"]],inputs:{product:"product",showCalories:"showCalories"},decls:10,vars:7,consts:[["type","button",1,"block",3,"click"],[1,"block__header"],[1,"block__content"],[1,"block__img"],[3,"src","alt"],[1,"block__title"],["class","block__desc",4,"ngIf"],["icon","button-hover","aria-hidden","true",3,"size"],[1,"block__desc"]],template:function(i,o){1&i&&(e.j41(0,"button",0),e.bIt("click",function(){return o.goToDetails()}),e.nrm(1,"span",1),e.j41(2,"span",2)(3,"span",3),e.nrm(4,"img",4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"span",5),e.EFF(7),e.k0s(),e.DNE(8,Zi,2,1,"span",6),e.k0s(),e.nrm(9,"app-svg-icon",7),e.k0s()),2&i&&(e.R7$(4),e.Y8G("src",null==o.product?null:o.product.imageUrl,e.B4B)("alt",e.bMT(5,5,"general.alt.image-of")+((null==o.product?null:o.product.productName)||"-")),e.R7$(3),e.JRh(null==o.product?null:o.product.productName),e.R7$(1),e.Y8G("ngIf",(null==o.product?null:o.product.shortDescription)&&o.showDescription),e.R7$(1),e.Y8G("size","enormous"))},dependencies:[g.bT,$.D,E.L,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.block[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;cursor:pointer;border:none;background:transparent}.block__header[_ngcontent-%COMP%]{width:100%;height:85px;position:absolute;top:0;left:0;z-index:1;border-radius:8px;background-color:#f5ebdc;transition:height ease-in-out .2s}@media (min-width: 1024px){.block__header[_ngcontent-%COMP%]{height:168px}}.block__content[_ngcontent-%COMP%]{z-index:10;position:relative;height:100%;padding:12px 12px 14px}@media (min-width: 1024px){.block__content[_ngcontent-%COMP%]{padding:32px}}.block__img[_ngcontent-%COMP%]{width:136px;height:136px;margin:0 auto;display:flex;justify-content:center;align-items:center}@media (min-width: 1024px){.block__img[_ngcontent-%COMP%]{height:300px;width:300px}}.block__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.block__title[_ngcontent-%COMP%]{display:block;text-align:center;font-weight:400;color:#502314;font-size:16px}@media (min-width: 1024px){.block__title[_ngcontent-%COMP%]{font-size:24px}}.block__desc[_ngcontent-%COMP%]{display:block;text-align:center;font-weight:400;color:#502314;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;opacity:.65;margin-bottom:0;font-size:13px}@media (min-width: 1024px){.block__desc[_ngcontent-%COMP%]{font-size:14px}}.block[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin:auto;position:absolute;inset:0;z-index:20;transition:opacity ease-in-out .2s;-webkit-user-select:none;user-select:none;pointer-events:none;opacity:0;display:none}@media (min-width: 1024px){.block[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{display:flex;width:300px}}.block[_ngcontent-%COMP%]:hover   app-svg-icon[_ngcontent-%COMP%]{opacity:1}.block[_ngcontent-%COMP%]:hover   .block__header[_ngcontent-%COMP%]{height:100%}"],changeDetection:0})}}return n})();var Qe=p(5153),qe=p(3541);function to(n,s){if(1&n&&(e.j41(0,"li"),e.nrm(1,"app-menu-page-block-small",6),e.k0s()),2&n){const t=s.$implicit,i=e.XpG(2);e.R7$(1),e.Y8G("product",t)("showCalories",i.showCalories)}}function no(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-show-more",8),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.loadMore())}),e.k0s()}}function io(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-hide-button",8),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.hideItems())}),e.k0s()}}function oo(n,s){if(1&n&&(e.qex(0),e.DNE(1,no,1,0,"app-show-more",7),e.DNE(2,io,1,0,"app-hide-button",7),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.paginationLimit<t.category.items.length),e.R7$(1),e.Y8G("ngIf",t.paginationLimit>=t.category.items.length)}}function so(n,s){if(1&n&&(e.j41(0,"section",1)(1,"div",2)(2,"h2"),e.EFF(3),e.k0s(),e.j41(4,"ul",3),e.DNE(5,to,2,2,"li",4),e.nI1(6,"slice"),e.k0s(),e.DNE(7,oo,3,2,"ng-container",5),e.k0s()()),2&n){const t=e.XpG();e.xc7("background",t.category.backgroundColor),e.R7$(3),e.JRh(t.category.categoryLongName),e.R7$(2),e.Y8G("ngForOf",e.brH(6,5,t.category.items,t.startPage,t.paginationLimit)),e.R7$(2),e.Y8G("ngIf",t.amountProducts&&t.category.items)}}let ao=(()=>{class n{constructor(){this.showCalories=!1,this.startPage=0,this.paginationLimit=9}get amountProducts(){return!(!this.category?.items||!this.category.items?.length)&&this.category.items.length>9}loadMore(){this.paginationLimit=Number(this.paginationLimit)+9}hideItems(){this.paginationLimit=9}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-categories-content-small"]],inputs:{category:"category",showCalories:"showCalories"},decls:1,vars:1,consts:[["class","category",3,"background",4,"ngIf"],[1,"category"],[1,"wrapper"],[1,"categories-content-small"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"product","showCalories"],[3,"click",4,"ngIf"],[3,"click"]],template:function(i,o){1&i&&e.DNE(0,so,8,9,"section",0),2&i&&e.Y8G("ngIf",o.category)},dependencies:[g.Sq,g.bT,Qe.i,qe.W,Ki,g.P9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.category[_ngcontent-%COMP%]{padding:20px 0}@media (min-width: 1024px){.category[_ngcontent-%COMP%]{padding:32px 0 30px}}.categories-content-small[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:20px}@media (min-width: 1024px){.categories-content-small[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr));gap:25px}}h2[_ngcontent-%COMP%]{margin-top:0;margin-bottom:20px;font-size:32px;line-height:42px;color:#502314}@media (min-width: 1024px){h2[_ngcontent-%COMP%]{margin-bottom:32px;font-size:48px;line-height:58px}}app-show-more[_ngcontent-%COMP%], app-hide-button[_ngcontent-%COMP%]{display:block;margin:20px 0 0}@media (min-width: 1024px){app-show-more[_ngcontent-%COMP%], app-hide-button[_ngcontent-%COMP%]{margin:32px 0 0}}","[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}"],changeDetection:0})}}return n})();function ro(n,s){if(1&n&&(e.j41(0,"li"),e.nrm(1,"app-menu-page-block",6),e.k0s()),2&n){const t=s.$implicit,i=e.XpG(2);e.R7$(1),e.Y8G("product",t)("showCalories",i.showCalories)}}function lo(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-show-more",8),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.loadMore())}),e.k0s()}}function co(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-hide-button",8),e.bIt("click",function(){e.eBV(t);const o=e.XpG(3);return e.Njj(o.hideItems())}),e.k0s()}}function po(n,s){if(1&n&&(e.qex(0),e.DNE(1,lo,1,0,"app-show-more",7),e.DNE(2,co,1,0,"app-hide-button",7),e.bVm()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.paginationLimit<t.category.items.length),e.R7$(1),e.Y8G("ngIf",t.paginationLimit>=t.category.items.length)}}function uo(n,s){if(1&n&&(e.j41(0,"section",1)(1,"div",2)(2,"h2"),e.EFF(3),e.k0s(),e.j41(4,"ul",3),e.DNE(
15,ro,2,2,"li",4),e.nI1(6,"slice"),e.k0s(),e.DNE(7,po,3,2,"ng-container",5),e.k0s()()),2&n){const t=e.XpG();e.xc7("background",t.category.backgroundColor),e.R7$(3),e.JRh(t.category.categoryLongName),e.R7$(2),e.Y8G("ngForOf",e.brH(6,5,t.category.items,t.startPage,t.paginationLimit)),e.R7$(2),e.Y8G("ngIf",t.amountProducts&&t.category.items)}}let mo=(()=>{class n{constructor(){this.showCalories=!1,this.startPage=0,this.paginationLimit=6}get amountProducts(){return!(!this.category?.items||!this.category.items?.length)&&this.category.items.length>6}loadMore(){this.paginationLimit=Number(this.paginationLimit)+6}hideItems(){this.paginationLimit=6}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-categories-content"]],inputs:{category:"category",showCalories:"showCalories"},decls:1,vars:1,consts:[["class","category",3,"background",4,"ngIf"],[1,"category"],[1,"wrapper"],[1,"categories-content"],[4,"ngFor","ngForOf"],[4,"ngIf"],[3,"product","showCalories"],[3,"click",4,"ngIf"],[3,"click"]],template:function(i,o){1&i&&e.DNE(0,uo,8,9,"section",0),2&i&&e.Y8G("ngIf",o.category)},dependencies:[g.Sq,g.bT,Qe.i,qe.W,eo,g.P9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.category[_ngcontent-%COMP%]{padding:20px 0}@media (min-width: 1024px){.category[_ngcontent-%COMP%]{padding:32px 0 30px}}.category__title[_ngcontent-%COMP%]{margin:0;font-size:32px;line-height:42px;color:#502314}@media (min-width: 1024px){.category__title[_ngcontent-%COMP%]{font-size:48px;line-height:58px}}.category__desc[_ngcontent-%COMP%]{margin-top:12px;font-size:14px;line-height:24px;color:#502314}@media (min-width: 1024px){.category__desc[_ngcontent-%COMP%]{margin-top:20px;font-size:20px;line-height:32px;text-align:center}}.categories-content[_ngcontent-%COMP%]{margin-top:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}@media (min-width: 1024px){.categories-content[_ngcontent-%COMP%]{margin-top:32px;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px}}app-show-more[_ngcontent-%COMP%], app-hide-button[_ngcontent-%COMP%]{display:block;margin:20px 0 0}@media (min-width: 1024px){app-show-more[_ngcontent-%COMP%], app-hide-button[_ngcontent-%COMP%]{margin:32px 0 0}}","[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}"],changeDetection:0})}}return n})();function go(n,s){if(1&n){const t=e.RV6();e.j41(0,"div",6)(1,"h3"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"p"),e.EFF(5),e.nI1(6,"translate"),e.k0s(),e.j41(7,"button",7),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.goToDelivery())}),e.EFF(8),e.nI1(9,"translate"),e.k0s()()}2&n&&(e.R7$(2),e.JRh(e.bMT(3,3,"menu.delivery.hungry")),e.R7$(3),e.JRh(e.bMT(6,5,"menu.delivery.description")),e.R7$(3),e.SpI(" ",e.bMT(9,7,"menu.delivery.btn.label")," "))}let ho=(()=>{class n{constructor(t,i){this.router=t,this.store=i,this.showDelivery$=this.store.select(T.B2).pipe((0,P.T)(o=>!!o&&o.length>0))}goToDelivery(){this.router.navigate([m.C.Delivery])}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix),e.rXU(d.il))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-delivery"]],decls:8,vars:6,consts:[[1,"menu-delivery"],[1,"wrapper"],[1,"menu-delivery__wrapper"],[1,"menu-delivery__img"],["src","/assets/images/food-menu-placeholder.webp",3,"alt"],["class","menu-delivery__content",4,"ngIf"],[1,"menu-delivery__content"],["type","button",1,"menu-delivery__btn",3,"click"]],template:function(i,o){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.nrm(4,"img",4),e.nI1(5,"translate"),e.k0s(),e.DNE(6,go,10,9,"div",5),e.nI1(7,"async"),e.k0s()()()),2&i&&(e.R7$(4),e.Y8G("alt",e.bMT(5,2,"menu.delivery.alt.food-placeholder")),e.R7$(2),e.Y8G("ngIf",e.bMT(7,4,o.showDelivery$)))},dependencies:[g.bT,E.L,g.Jj,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.menu-delivery[_ngcontent-%COMP%]{width:100%;margin-top:22px;padding:48px 0 32px;background-color:#fa0}@media (min-width: 1024px){.menu-delivery[_ngcontent-%COMP%]{margin-top:50px;padding:60px 0}}.menu-delivery__wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:40px}@media (min-width: 1024px){.menu-delivery__wrapper[_ngcontent-%COMP%]{grid-template-columns:repeat(2,minmax(0,1fr));gap:65px;align-items:center}}.menu-delivery__img[_ngcontent-%COMP%]{text-align:center}@media (min-width: 1024px){.menu-delivery__img[_ngcontent-%COMP%]{text-align:right}}.menu-delivery__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}@media (min-width: 1024px){.menu-delivery__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{margin-top:initial;width:initial}}
1.menu-delivery__content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:12px;font-size:32px;line-height:42px;color:#502314;font-weight:700}@media (min-width: 1024px){.menu-delivery__content[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:48px;line-height:58px}}.menu-delivery__content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#502314;font-size:16px;line-height:26px;margin-bottom:32px}.menu-delivery__btn[_ngcontent-%COMP%]{padding:12px 20px;font-size:16px;line-height:24px;font-weight:400;text-align:center;color:#fbf7f1;width:100%;display:inline-block;border:none;border-radius:6px;background-color:#502314;transition:all .2s ease-out;cursor:pointer;-webkit-user-select:none;user-select:none}@media (min-width: 1024px){.menu-delivery__btn[_ngcontent-%COMP%]{width:auto}}.menu-delivery__btn[_ngcontent-%COMP%]:hover{background-color:#fbf7f1;color:#502314}","[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}"],changeDetection:0})}}return n})(),_o=(()=>{class n{constructor(t){this.router=t}goToCategory(){this.router.navigate([m.C.Menu,m.C.Order,this.category.slug])}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-mobile-categories-single"]],inputs:{category:"category"},decls:6,vars:5,consts:[["type","button",1,"category",3,"click"],[3,"src","alt"],[1,"category__texts"],[1,"category__title"]],template:function(i,o){1&i&&(e.j41(0,"button",0),e.bIt("click",function(){return o.goToCategory()}),e.nrm(1,"img",1),e.nI1(2,"translate"),e.j41(3,"span",2)(4,"span",3),e.
1EFF(5),e.k0s()()()),2&i&&(e.R7$(1),e.Y8G("src",o.category.imageUrl,e.B4B)("alt",e.bMT(2,3,"general.alt.image-of")+(o.category.categoryLongName||o.category.categoryShortName)),e.R7$(4),e.JRh(o.category.categoryShortName))},dependencies:[E.L,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.category[_ngcontent-%COMP%]{width:100%;height:168px;padding:20px 12px;margin-bottom:8px;border:none;background-color:#f5ebdc;display:flex;flex-direction:column;align-items:center;justify-content:center}.category[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{order:0;margin:0;object-fit:contain;font-size:10px;width:80px;height:80px}.category__texts[_ngcontent-%COMP%]{order:1;align-items:center;width:100%;white-space:initial;overflow:hidden;margin-top:8px;margin-bottom:8px}.category__title[_ngcontent-%COMP%]{order:0;flex-grow:0;display:block;margin:0 0 4px;font-size:16px;line-height:26px;font-weight:400;color:#502314;text-align:center}"]})}}return n})();var H=p(3993),te=p(765);const fo=["pageTitle"];function xo(n,s){1&n&&e.nrm(0,"app-menu-page-mobile-categories-single",6),2&n&&e.Y8G("category",s.$implicit)}function Co(n,s){if(1&n&&(e.qex(0),e.DNE(1,xo,1,1,"app-menu-page-mobile-categories-single",5),e.bVm()),2&n){const t=s.ngIf;e.R7$(1),e.Y8G("ngForOf",t)}}let Mo=(()=>{class n{constructor(t,i,o,a,r,l,u,_){this.document=t,this.router=i,this.route=o,this.store=a,this.actionsSubject=r,this.translate=l,this.messageService=u,this.dialog=_,this.categories$=this.store.select(K),this.showProductNutritions$=this.store.select(T.Vz),this.selectedRestaurant$=this.store.select(v.G6),this.selectedMenu$=this.store.select(v.Tg),this.isMobile=!1,this.restaurantSlugFromUrl=null,this.tableNumberFromUrl=null,this.MenuType=O.gu,this.sub=new A.yU}ngOnInit(){this.handleUrlData()}ngAfterViewInit(){this.pageTitle&&this.pageTitle.nativeElement.focus()}ngOnDestroy(){this.sub.unsubscribe()}changeRestaurant(){this.router.navigate([m.m.Restaurants])}handleUrlData(){var t=this;return(0,w.A)(function*(){t.restaurantSlugFromUrl=t.route.snapshot.queryParams[m.C.Restaurant],t.tableNumberFromUrl=t.route.snapshot.queryParams[m.C.Table],t.router.navigate([]),t.restaurantSlugFromUrl?t.checkLocalOrdering():(yield t.getBasketDetails())?t.store.dispatch(Q()):t.handleNoRestaurant(!0)})()}getBasketDetails(){return(0,k._)(this.store.select(v.Bz).pipe((0,y.s)(1)))}checkLocalOrdering(){var t=this;return(0,w.A)(function*(){const{basketDetails:i,orderDetails:o,orderStatus:a}=yield t.getOrderData();i?i.restaurantInfo.slug!==t.restaurantSlugFromUrl?t.openConfirmationModal():(t.store.dispatch(Q()),t.tableNumberFromUrl&&t.store.dispatch((0,b.Om)({table:t.tableNumberFromUrl}))):null===o||"completed"===a?t.fetchRestaurantMenus():t.showOrderExistsModal()})()}getOrderData(){return(0,k._)(this.store.select(v.Bz).pipe((0,H.E)(this.store.select(v.L),this.store.select(v.bx)),(0,y.s)(1),(0,P.T)(([t,i,o])=>({basketDetails:t,orderDetails:i,orderStatus:o}))))}openConfirmationModal(){this.dialog.open(pe.Ib,{panelClass:["custom-panel-dialog"],data:{title:this.translate.instant("error.dialog.clear-basket.title"),desc:this.translate.instant("error.dialog.clear-basket.desc"),buttonText:this.translate.instant("error.dialog.clear-basket.confirm"),alternateButtonText:this.translate.instant("error.dialog.clear-basket.cancel"),disableClose:!1,dangerStyle:!1},disableClose:!1,closeOnNavigation:!0}).afterClosed().pipe((0,y.s)(1)).subscribe(i=>{if(i===oe.G.Primary)this.fetchRestaurantMenus();else{this.router.navigate([m.C.Menu,m.C.Order]);const o=this.document.URL.indexOf("?");this.document.location=this.document.URL.substring(0,o)}})}fetchRestaurantMenus(){var t=this;return(0,w.A)(function*(){if(!t.restaurantSlugFromUrl)return;t.store.dispatch(Re({restaurantRef:t.restaurantSlugFromUrl}));const i=yield t.getFetchRestaurantDetailsResponse();if(i){const o=i.menus.find(a=>a.orderingFlow===O.ZO.Collection);if(o)return void t.createBasket(o.id)}t.handleNoRestaurant(!1)})()}getFetchRestaurantDetailsResponse(){return(0,k._)(this.actionsSubject.pipe((0,B.i)(1),(0,M.gp)(_e,De),(0,y.s)(1),(0,P.T)(t=>t.type===_e.type?t.restaurantDetails:null)))}createBasket(t){var i=this;return(0,w.A)(function*(){i.restaurantSlugFromUrl&&(i.store.dispatch((0,b.Pm)({payload:{menuRef:t,restaurantRef:i.restaurantSlugFromUrl,tableNumber:i.tableNumberFromUrl,items:[]}})),(yield i.isCreateBasketSuccess())?(i.store.dispatch(Q()),i.tableNumberFromUrl&&i.store.dispatch((0,b.Om)({table:i.tableNumberFromUrl}))):i.handleNoRestaurant(!0))})()}isCreateBasketSuccess(){return(0,k._)(this.actionsSubject.pipe((0,B.i)(1),(0,M.gp)(b.y$,b.h$),(0,y.s)(1),(0,P.T)(t=>t.type===b.y$.type)))}handleNoRestaurant(t){t?(this.messageService.showInfoToast(this.translate.instant("restaurants.error.select-restaurant")),this.router.navigate([m.m.Restaurants])):(this.messageService.showInfoToast(this.translate.instant("restaurants.error.
1not-found")),this.router.navigate([m.C.Menu]))}showOrderExistsModal(){this.dialog.open(pe.Ib,{panelClass:["custom-panel-dialog"],data:{title:this.translate.instant("error.dialog.order-exists.title"),desc:this.translate.instant("error.dialog.order-exists.desc"),buttonText:this.translate.instant("error.dialog.order-exists.go-back"),alternateButtonText:this.translate.instant("error.dialog.order-exists.start-over"),disableClose:!0,dangerStyle:!1},disableClose:!0,closeOnNavigation:!0}).afterClosed().pipe((0,y.s)(1)).subscribe(i=>{i===oe.G.Primary?this.router.navigate([m.C.Basket,m.C.Order]):(this.store.dispatch((0,b.nt)()),this.fetchRestaurantMenus())})}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(g.qQ),e.rXU(S.Ix),e.rXU(S.nX),e.rXU(d.il),e.rXU(d.SS),e.rXU(C.c$),e.rXU(L.b),e.rXU(X.bZ))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-mobile-categories"]],viewQuery:function(i,o){if(1&i&&e.GBs(fo,5),2&i){let a;e.mGM(a=e.lsd())&&(o.pageTitle=a.first)}},decls:9,vars:6,consts:[[1,"mobile-categories"],["tabindex","-1"],["pageTitle",""],[1,"mobile-categories__container"],[4,"ngIf"],[3,"category",4,"ngFor","ngForOf"],[3,"category"]],template:function(i,o){1&i&&(e.j41(0,"div",0)(1,"h1",1,2),e.EFF(3),e.nI1(4,"translate"),e.k0s(),e.j41(5,"section",3),e.DNE(6,Co,2,1,"ng-container",4),e.nI1(7,"async"),e.k0s()(),e.nrm(8,"app-loader")),2&i&&(e.R7$(3),e.JRh(e.bMT(4,2,"app.subpage.title.our-menu")),e.R7$(3),e.Y8G("ngIf",e.bMT(7,4,o.categories$)))},dependencies:[g.Sq,g.bT,te.V,_o,g.Jj,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.mobile-categories[_ngcontent-%COMP%]{background-color:#fff2e5;display:flex;flex-direction:column;flex-wrap:wrap;padding:12px}.mobile-categories[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin-bottom:23px;font-size:32px;line-height:42px;font-weight:700;color:#502314}.mobile-categories__container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));-moz-column-gap:12px;column-gap:12px;row-gap:15px}@media (min-width: 1024px){.mobile-categories__container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1600px){.mobile-categories__container[_ngcontent-%COMP%]{grid-template-columns:repeat(5,minmax(0,1fr))}}"]})}}return n})();var bo=p(7093);function So(n,s){if(1&n&&(e.nrm(0,"img",11),e.nI1(1,"translate")),2&n){const t=e.XpG();e.Y8G("src",t.product.imageUrl,e.B4B)("alt",e.bMT(1,2,"general.alt.image-of")+t.product.productName)}}function yo(n,s){1&n&&e.nrm(0,"app-svg-icon",12),2&n&&e.Y8G("width",112)("height",132)}function Po(n,s){1&n&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI("",e.bMT(2,1,"menu.details.from-kcal")," "))}function Oo(n,s){if(1&n&&(e.j41(0,"span",13),e.DNE(1,Po,3,3,"span",14),e.j41(2,"span"),e.EFF(3),e.nI1(4,"number"),e.nI1(5,"translate"),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.product.isComboMeal),e.R7$(2),e.Lme("",e.i5U(4,3,t.product.calories,"1.0-0")," ",e.bMT(5,6,"menu.details.nutritions.kcal"),"")}}function ko(n,s){1&n&&(e.j41(0,"span",15)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"menu.details.nutritions.out-of-stock")))}function Io(n,s){if(1&n){const t=e.RV6();e.j41(0,"app-add-to-cart-button",16),e.bIt("buttonClicked",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.onQuickAdd())}),e.nI1(1,"translate"),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("cartIcon","shopping-bag-white")("ariaLabel",e.bMT(1,3,"general.aria.add-to-cart")+(t.product.productName||"-"))("isLoading",t.isLoading)}}let vo=(()=>{class n{get showAddToCartButton(){return(!this.product?.isCustomizable||this.product?.hasKeyCondiment)&&!this.product?.isComboMeal&&!this.product?.hasAlternativeVersion&&!this.product?.hasOtherProducts}constructor(t,i,o,a,r,l,u,_){this.router=t,this.route=i,this.store$=o,this.translateService=a,this.messageService=r,this.changeDetector=l,this.actionsSubject=u,this.analyticsService=_,this.isAddToCartPresent=!1,this.showCalories=!0,this.sub=new A.yU,this.isLoading=!1,this.keyCondimentData=null,this.keyCondimentOpened=!1,this.keyCondimentNoLoading=!1,this.keyCondimentYesLoading=!1}onProductClick(){this.router.navigate([this.product.slug],{relativeTo:this.route}),this.analyticsService.pushViewProductGtag(this.product.productName)}onQuickAdd(){if(!this.isLoading){if(this.isLoading=!0,!this.product.hasKeyCondiment||"pe"!==F.c.appType)return void this.addToCart();this.keyCondimentData?this.keyCondimentOpened=!0:this.store$.dis
1patch(ve({itemRef:this.product.slug,callback:this.keyCondimentCallback.bind(this)}))}}addToCartWithKeyCondiment(){this.keyCondimentYesLoading=!0,this.refreshView(),this.addToCart(!0)}addToCartWithoutKeyCondiment(){this.keyCondimentNoLoading=!0,this.refreshView(),this.addToCart()}keyCondimentCallback(t){t.isSuccess&&t.data?(this.keyCondimentData=t.data,this.keyCondimentOpened=!0,this.refreshView()):this.addToCart()}addToCart(t=!1){const i=[];t&&this.keyCondimentData&&i.push({externalId:this.keyCondimentData.externalId,quantity:1}),this.addItemToBasketListeners(),this.store$.dispatch((0,b.IZ)({itemDetails:{menuItemId:this.product.externalId,quantity:1,additionalCondiments:i,excludeCondiments:[],additionalSides1:[],additionalSides2:[],additionalSides3:[],sides:[],drinks:[],sauces:[],promoCode:null,isComboMeal:!1}}))}addItemToBasketListeners(){this.actionsSubject.pipe((0,B.i)(1),(0,M.gp)(b.JS,b.GI,b.Cd,b.L0),(0,y.s)(1)).subscribe(t=>{this.isLoading=!1,this.keyCondimentNoLoading=!1,this.keyCondimentYesLoading=!1,this.keyCondimentOpened=!1,this.refreshView(),(t.type===b.JS.type||t.type===b.Cd.type)&&(this.showSelectionToast(),this.analyticsService.pushQuickAddGtag(this.product.productName))})}showSelectionToast(){const t=this.translateService.instant("menu.details.add-to-basket.message");this.messageService.showSuccessToast(t)}refreshView(){this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix),e.rXU(S.nX),e.rXU(d.il),e.rXU(C.c$),e.rXU(L.b),e.rXU(e.gRc),e.rXU(d.SS),e.rXU(Je.c))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-mobile-single-category-products-product"]],inputs:{product:"product",category:"category",isAddToCartPresent:"isAddToCartPresent",showCalories:"showCalories"},decls:14,vars:16,consts:[[1,"product"],["type","button",1,"product__container",3,"click"],[1,"product__img"],[3,"src","alt",4,"ngIf"],["icon","default-product-image","aria-hidden","true",3,"width","height",4,"ngIf"],[1,"product__content"],[1,"product__name"],["class","product__kcal",4,"ngIf"],[1,"product__price"],["class","product__out-of-stock",4,"ngIf"],[3,"cartIcon","ariaLabel","isLoading","buttonClicked",4,"ngIf"],[3,"src","alt"],["icon","default-product-image","aria-hidden","true",3,"width","height"],[1,"product__kcal"],[4,"ngIf"],[1,"product__out-of-stock"],[3,"cartIcon","ariaLabel","isLoading","buttonClicked"]],template:function(i,o){1&i&&(e.j41(0,"section",0)(1,"button",1),e.bIt("click",function(){return!o.product.outOfStock&&o.onProductClick()}),e.j41(2,"span",2),e.DNE(3,So,2,4,"img",3),e.DNE(4,yo,1,2,"app-svg-icon",4),e.k0s(),e.j41(5,"span",5)(6,"span",6),e.EFF(7),e.k0s(),e.DNE(8,Oo,6,8,"span",7),e.j41(9,"span",8),e.EFF(10),e.nI1(11,"numberToCurrency"),e.k0s(),e.DNE(12,ko,4,3,"span",9),e.k0s()(),e.DNE(13,Io,2,5,"app-add-to-cart-button",10),e.k0s()),2&i&&(e.AVh("small",!!o.category.smallProducts)("out-of-stock",o.product.outOfStock),e.R7$(1),e.BMQ("aria-disabled",o.product.outOfStock||null),e.R7$(2),e.Y8G("ngIf",o.product.imageUrl),e.R7$(1),e.Y8G("ngIf",!o.product.imageUrl),e.R7$(1),e.AVh("space",o.showAddToCartButton&&!o.product.outOfStock),e.R7$(2),e.SpI(" ",o.product.categoryViewProductName?o.product.categoryViewProductName:o.product.productName," "),e.R7$(1),e.Y8G("ngIf",o.product.calories&&!o.product.outOfStock&&o.showCalories),e.R7$(2),e.JRh(e.bMT(11,14,o.product.price)),e.R7$(2),e.Y8G("ngIf",o.product.outOfStock),e.R7$(1),e.Y8G("ngIf",o.showAddToCartButton&&!o.product.outOfStock))},dependencies:[g.bT,$.D,bo.w,E.L,g.QX,C.D9,j.g],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.product[_ngcontent-%COMP%]{position:relative;height:100%}.product__container[_ngcontent-%COMP%]{width:100%;height:100%;border:none;border-radius:8px;background-color:#f5ebdc;padding:12px;display:flex;flex-direction:column;position:relative}.product.small[_ngcontent-%COMP%]   .product__container[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:nowrap;height:114px;border:none;padding:15px 72px 15px 8px}.product__img[_ngcontent-%COMP%]{flex-shrink:0;width:100%;height:104px;padding:8px 8px 0;margin-bottom:8px;text-align:center;overflow:hidden;display:flex;justify-content:center;align-items:center}.product__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100px;height:100px;font-size:10px;margin:0 auto;object-fit:contain;object-position:bottom}.product__img[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{max-width:96px;max-height:96px}.product.small[_ngcontent-%COMP%]   .product__img[_ngcontent-%COMP%]{width:88px;height:88px;font-size:10px;object-fit:cover;padding:0}.product.small[_ngcontent-%COMP%]   .product__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{font-size:10px;object-fit:cover;width:auto;height:auto;max-width:80px;max-height:80px}.product.out-of-stock[_ngcontent-%COMP%]   .product__img[_ngcontent-%COMP%]{opacity:.5}.product__content[_ngcontent-%COMP%]{height:100%;margin:12px 0;padding:0 10px;text-align:center;display:flex;flex-direction:column;overflow:hidden}.product__content.space[_ngcontent-%COMP%]{margin-bottom:28px}.product.small[_ngcontent-%COMP%]   .product__content[_ngcontent-%COMP%]{height:auto;margin:0;justify-content:center;text-align:left}.product__name[_ngcontent-%COMP%]{align-self:stretch;margin-bottom:4px;margin-top:0;font-size:16px;line-height:18px;font-weight:400;font-style:normal;color:#502314;overflow:hidden}.product.small[_ngcontent-%COMP%]   .product__name[_ngcontent-%COMP%]{display:block;white-space:nowrap}.product.out-of-stock[_ngcontent-%COMP%]   .product__name[_ngcontent-%COMP%]{opacity:.5}.product__kcal[_ngcontent-%COMP%]{align-self:stretch;margin-bottom:4px;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:12px;line-height:14px;color:#502314a6;font-weight:400;font-style:normal;opacity:.65;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.product__price[_ngcontent-%COMP%]{font-family:Flame,Arial,Helvetica,sans-serif;margin:0 0 4px;font-weight:400;font-style:normal;color:#502314;font-size:16px;line-height:26px;flex-grow:0;align-self:stretch}.product.out-of-stock[_ngcontent-%COMP%]   .product__price[_ngcontent-%COMP%]{opacity:.5}.product__out-of-stock[_ngcontent-%COMP%]{flex-grow:1;margin-top:4px;display:flex;align-items:flex-end}.product__out-of-stock[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:inline-block;padding:0 6px 2px;border-radius:4px;background:#BBBDC0;font-size:14px;line-height:24px;font-weight:400;color:#fff}.product.small[_ngcontent-%COMP%]   .product__out-of-stock[_ngcontent-%COMP%]{align-items:flex-start}.product[_ngcontent-%COMP%]   app-add-to-cart-button[_ngcontent-%COMP%]{position:absolute;right:calc(50% - 24px);bottom:-16px;z-index:1}.product.small[_ngcontent-%COMP%]   app-add-to-cart-button[_ngcontent-%COMP%]{position:absolute;right:16px;top:calc(50% - 24px)}"]})}}return n})();var wo=p(4642),We=p(9454);const To=["*"];let Eo=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-mobile-single-category-subcategory"]],inputs:{title:"title",imageUrl:"imageUrl"},ngContentSelectors:To,decls:9,vars:7,consts:[["hideToggle",""],[1,"image"],[3,"src","alt"],["icon","chevron-down","aria-hidden","true",1,"icon",3,"width","height"]],template:function(i,o){1&i&&(e.NAR(),e.j41(0,"mat-expansion-panel",0)(1,"mat-expansion-panel-header")(2,"div",1),e.nrm(3,"img",2),e.nI1(4,"translate"),e.k0s(),e.j41(5,"h3"),e.EFF(6),e.k0s(),e.nrm(7,"app-svg-icon",3),e.k0s(),e.SdG(8),e.k0s()),2&i&&(e.R7$(3),e.Y8G("src",o.imageUrl,e.B4B)("alt",e.bMT(4,5,"general.alt.image-of")+(o.title||"-")),e.R7$(3),e.JRh(o.title),e.R7$(1),e.Y8G("width",24)("height",24))},dependencies:[We.GK,We.Z2,$.D,E.L,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}mat-expansion-panel[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;border-radius:12px;transition:all .2s ease-out}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]{padding:0 20px 0 12px;background:#f5ebdc!important}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]     .mat-content{align-items:center;margin:0}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]{width:72px;height:80px}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]   .image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{flex-grow:1;margin:0 8px 0 12px;font-size:18px;line-height:24px;font-weight:400}mat-expansion-panel[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{padding:5px;margin-left:auto;transform:rotate(0);transition:transform .2s ease-out}mat-expansion-panel.mat-expanded[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]{background:#fff}mat-expansion-panel.mat-expanded[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{transform:rotate(180deg)}mat-expansion-panel[_ngcontent-%COMP%]     .mat-expansion-panel-body{padding:0}"],changeDetection:0})}}return n})();var Ro=p(2142);const Do=["pageTitle"];function Fo(n,s){if(1&n&&(e.j41(0,"p",9),e.EFF(1),e.k0s()),2&n){const t=e.XpG().ngIf;e.R7$(1),e.SpI(" ",t.description," ")}}function $o(n,s){if(1&n&&e.nrm(0,"app-menu-page-mobile-single-category-products-product",13),2&n){const t=e.XpG().$implicit,i=e.XpG(2).ngIf,o=e.XpG(2);e.Y8G("product",t)("category",i)("showCalories",o.isShowCalories)("isAddToCartPresent",o.isAddToCartPresent)}
1}function Go(n,s){if(1&n&&(e.qex(0),e.DNE(1,$o,1,4,"app-menu-page-mobile-single-category-products-product",12),e.bVm()),2&n){const t=s.$implicit;e.R7$(1),e.Y8G("ngIf",!t.outOfStock)}}function Vo(n,s){if(1&n&&(e.qex(0),e.j41(1,"div",10),e.DNE(2,Go,2,1,"ng-container",11),e.k0s(),e.bVm()),2&n){const t=e.XpG().ngIf;e.R7$(1),e.AVh("small",t.smallProducts),e.R7$(1),e.Y8G("ngForOf",t.items)}}function No(n,s){if(1&n&&e.nrm(0,"app-menu-page-mobile-single-category-products-product",13),2&n){const t=e.XpG().$implicit,i=e.XpG().$implicit,o=e.XpG(3);e.Y8G("product",t)("category",i)("showCalories",o.isShowCalories)("isAddToCartPresent",o.isAddToCartPresent)}}function jo(n,s){if(1&n&&(e.qex(0),e.DNE(1,No,1,4,"app-menu-page-mobile-single-category-products-product",12),e.bVm()),2&n){const t=s.$implicit;e.R7$(1),e.Y8G("ngIf",!t.outOfStock)}}function Ao(n,s){if(1&n&&(e.j41(0,"app-menu-page-mobile-single-category-subcategory",14)(1,"div",15),e.DNE(2,jo,2,1,"ng-container",11),e.k0s()()),2&n){const t=s.$implicit;e.Y8G("title",t.categoryShortName)("imageUrl",t.imageUrl),e.R7$(1),e.AVh("small",t.smallProducts),e.R7$(1),e.Y8G("ngForOf",t.items)}}function Bo(n,s){if(1&n&&(e.qex(0),e.j41(1,"h1",5,6),e.EFF(3),e.k0s(),e.DNE(4,Fo,2,1,"p",7),e.DNE(5,Vo,3,3,"ng-container",0),e.DNE(6,Ao,3,5,"app-menu-page-mobile-single-category-subcategory",8),e.nI1(7,"menuSubcategories"),e.bVm()),2&n){const t=s.ngIf;e.R7$(3),e.SpI(" ",t.categoryLongName||t.categoryShortName," "),e.R7$(1),e.Y8G("ngIf",t.description),e.R7$(1),e.Y8G("ngIf",t&&t.items&&t.items.length&&(!t.subcategories||!t.subcategories.length)),e.R7$(1),e.Y8G("ngForOf",e.bMT(7,4,t.subcategories))}}function zo(n,s){if(1&n){const t=e.RV6();e.qex(0),e.nrm(1,"app-menu-page-categories",1),e.j41(2,"div",2)(3,"button",3),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.back())}),e.nrm(4,"app-svg-icon",4),e.j41(5,"span"),e.EFF(6),e.nI1(7,"translate"),e.k0s()(),e.DNE(8,Bo,8,6,"ng-container",0),e.nI1(9,"async"),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("categories",t.categories),e.R7$(5),e.JRh(e.bMT(7,3,"general.button.back")),e.R7$(2),e.Y8G("ngIf",e.bMT(9,5,t.currentCategory$))}}let Yo=(()=>{class n{constructor(t,i,o){this.router=t,this.route=i,this.store=o,this.categories$=this.store.select(K),this.currentCategory$=this.store.select(dt),this.categories=[],this.showCaloriesSwitch$=this.store.select(T.Vz),this.routeParams={},this.isBusy=!1,this.isAddToCartPresent=!1,this.isShowCalories=!0,this.sub=new A.yU}ngOnInit(){this.handleSubscriptions()}ngAfterViewInit(){this.pageTitle&&this.pageTitle.nativeElement.focus()}ngOnDestroy(){this.sub.unsubscribe()}handleSubscriptions(){this.sub.add(this.route.params.pipe((0,G.p)(t=>!!t)).subscribe(t=>this.routeParams=t)),this.sub.add(this.categories$.pipe((0,N.M)(t=>{this.isBusy=!0,(!t||!t.length)&&this.store.dispatch(Q())}),(0,G.p)(t=>!!t&&!!t.length)).subscribe(t=>this.responseHandler(t))),this.sub.add(this.route.params.subscribe(t=>{this.isBusy||this.responseHandler(this.categories)})),this.sub.add((0,me.z)([this.store.select(T.g7),this.store.select(T.Vz)]).subscribe(([t,i])=>this.isShowCalories=t&&!!i))}back(){this.router.navigate([m.C.Menu,m.C.Order])}responseHandler(t){if(!t)return;this.isBusy=!1,this.categories=t;const i=this.routeParams[m.C.CategoryRef],o=t.find(a=>a.slug===i);o?this.isAddToCartPresent=!!o.items&&o.items.some(a=>!(a.isComboMeal||a.isCustomizable||a.hasAlternativeVersion||a.hasOtherProducts)):this.router.navigate([m.C.Menu,m.C.Order])}updateShowCalories(t){this.store.dispatch((0,wo.BN)({showCalories:t}))}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix),e.rXU(S.nX),e.rXU(d.il))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page-mobile-single-category-products"]],viewQuery:function(i,o){if(1&i&&e.GBs(Do,5),2&i){let a;e.mGM(a=e.lsd())&&(o.pageTitle=a.first)}},decls:3,vars:3,consts:[[4,"ngIf"],[3,"categories"],[1,"single-category"],["type","button",1,"single-category__back",3,"click"],["icon","arrow-left","size","large","aria-hidden","true"],["tabindex","-1",1,"single-category__title"],["pageTitle",""],["class","single-category__desc",4,"ngIf"],[3,"title","imageUrl",4,"ngFor","ngForOf"],[1,"single-category__desc"],[1,"single-category__container"],[4,"ngFor","ngForOf"],[3,"product","category","showCalories","isAddToCartPresent",4,"ngIf"],[3,"product","category","showCalories","isAddToCartPresent"],[3,"title","imageUrl"],[1,"single-category__container","has-parent"]],template:function(i,o){1&i&&(e.DNE(0,zo,10,7,"ng-container",0),e.nI1(1,"async"),e.nrm(2,"app-loader")),2&i&&e.Y8G("ngIf",e.bMT(1,1,o.categories$))},dependencies:[g.Sq,g.bT,$.D,te.V,Z,vo,Eo,g.Jj,C.D9,Ro.o],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.single-category[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;padding:16px 20px 50px;background-color:#fbf7f1}.single-category__back[_ngcontent-%COMP%]{padding:8px 20px;border-radius:6px;width:110px;height:42px;border:none;background-color:#f5ebdc;display:flex;justify-content:center;align-items:center;cursor:pointer}.single-category__back[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:10px;transition:transform ease-in-out .2s}.single-category__back[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-family:
1Flame Sans,Arial,Helvetica,sans-serif;color:#502314;font-size:16px;line-height:26px}.single-category__back[_ngcontent-%COMP%]:hover   app-svg-icon[_ngcontent-%COMP%]{transform:translate(-10px)}.single-category__title[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:12px;font-weight:700;font-style:normal;font-size:32px;line-height:48px;color:#502314}.single-category__desc[_ngcontent-%COMP%]{font-size:14px;line-height:24px;font-weight:400;color:#502314}.single-category[_ngcontent-%COMP%]   app-menu-page-mobile-single-category-subcategory[_ngcontent-%COMP%]{margin-bottom:12px}.single-category[_ngcontent-%COMP%]   app-menu-page-mobile-single-category-subcategory[_ngcontent-%COMP%]:first-of-type{margin-top:12px}.single-category[_ngcontent-%COMP%]   app-menu-page-mobile-single-category-subcategory[_ngcontent-%COMP%]:last-of-type{margin-bottom:0}.single-category__container[_ngcontent-%COMP%]{margin-top:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}@media (min-width: 1024px){.single-category__container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1600px){.single-category__container[_ngcontent-%COMP%]{grid-template-columns:repeat(5,minmax(0,1fr))}}.single-category__container.small[_ngcontent-%COMP%]{grid-template-columns:repeat(1,minmax(0,1fr));gap:12px 20px}.single-category__container.has-parent[_ngcontent-%COMP%]:not(.small){padding-bottom:16px}"]})}}return n})();function Lo(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-menu-page-categories-content",9),e.bVm()),2&n){const t=e.XpG(2),i=t.index,o=t.$implicit,a=e.XpG(3);e.R7$(1),e.Y8G("id","category-"+i)("category",o)("showCalories",a.showProductNutritions)}}function Xo(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-menu-page-categories-content-small",10),e.bVm()),2&n){const t=e.XpG(2),i=t.$implicit,o=t.index,a=e.XpG(3);e.R7$(1),e.Y8G("title",i.categoryLongName)("id","category-"+o)("category",i)("showCalories",a.showProductNutritions)}}function Uo(n,s){if(1&n&&(e.qex(0),e.DNE(1,Lo,2,3,"ng-container",5),e.DNE(2,Xo,2,4,"ng-container",5),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",!t.smallProducts),e.R7$(1),e.Y8G("ngIf",t.smallProducts)}}function Ho(n,s){if(1&n&&(e.qex(0),e.DNE(1,Uo,3,2,"ng-container",5),e.bVm()),2&n){const t=s.$implicit;e.R7$(1),e.Y8G("ngIf",t.items&&t.items.length>0)}}function Jo(n,s){if(1&n&&(e.qex(0),e.nrm(1,"app-menu-page-categories",7),e.DNE(2,Ho,2,1,"ng-container",8),e.bVm()),2&n){const t=s.ngIf;e.R7$(1),e.Y8G("categories",t),e.R7$(1),e.Y8G("ngForOf",t)}}function Qo(n,s){if(1&n){const t=e.RV6();e.j41(0,"button",11),e.bIt("click",function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.goToOffers())}),e.j41(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()}2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"general.button.see-offers")))}function qo(n,s){1&n&&e.nrm(0,"app-menu-page-delivery")}function Wo(n,s){if(1&n&&(e.j41(0,"section",1)(1,"header",2)(2,"h1",3),e.
1EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"div",4),e.DNE(6,Jo,3,2,"ng-container",5),e.nI1(7,"async"),e.DNE(8,Qo,4,3,"button",6),e.k0s(),e.DNE(9,qo,1,0,"app-menu-page-delivery",5),e.k0s()),2&n){const t=s.ngIf,i=e.XpG();e.R7$(3),e.JRh(e.bMT(4,4,"app.subpage.title.menu")),e.R7$(3),e.Y8G("ngIf",e.bMT(7,6,i.categories$)),e.R7$(2),e.Y8G("ngIf",!t.isWebview),e.R7$(1),e.Y8G("ngIf",!t.isWebview)}}const Ko=function(n){return{isWebview:n}},Zo=[{path:"",canActivate:[Ie],component:(()=>{class n{constructor(t,i,o){this.router=t,this.store=i,this.cd=o,this.isWebview$=this.store.select(ce.Vr),this.showProductNutritions=!1,this.isOrderingJourney=F.c.features.ordering,this.section25Data={type:"S25",deviceLimiter:ue.i_.Mobile,titleFirstPart:"Getting",titleSecondPart:"Hungry?",description:"We believe in the power of good food and the effect it has on our people and our planet",textColor:"000000",accentColor:"00B2A9",buttonCaption:"Start your order",link:{url:`/${m.m.Restaurants}`,isExternal:!1},backgroundColor:"FFF2E5",mediaUrl:"/assets/images/section25-mock.png",media2Url:"/assets/images/section25-img.webp"},this.sub=new A.yU,this.categories$=this.store.select(xe)}ngOnInit(){this.store.dispatch(se()),this.sub.add(this.store.select(T.Vz).subscribe(t=>{this.showProductNutritions=!!t,this.refreshView()}))}ngOnDestroy(){this.sub.unsubscribe()}goToOffers(){this.router.navigate([m.C.Offers])}refreshView(){this.cd.detectChanges()}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix),e.rXU(d.il),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-page"]],decls:3,vars:5,consts:[["class","menu",4,"ngIf"],[1,"menu"],[1,"menu__header"],[1,"menu__title"],[1,"menu__categories"],[4,"ngIf"],["class","see-offers-mobile","type","button",3,"click",4,"ngIf"],[3,"categories"],[4,"ngFor","ngForOf"],[3,"id","category","showCalories"],[3,"title","id","category","showCalories"],["type","button",1,"see-offers-mobile",3,"click"]],template:function(i,o){1&i&&(e.DNE(0,Wo,10,8,"section",0),e.nI1(1,"async"),e.nrm(2,"app-loader")),2&i&&e.Y8G("ngIf",e.eq3(3,Ko,e.bMT(1,1,o.isWebview$)))},dependencies:[g.Sq,g.bT,te.V,Z,ho,mo,ao,g.Jj,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.menu[_ngcontent-%COMP%]{height:100%;background-color:#fbf7f1}.menu__header[_ngcontent-%COMP%]{height:100px;background-color:#ff8732;display:flex;align-items:center}.menu__title[_ngcontent-%COMP%]{width:100%;margin-right:auto;margin-left:auto;max-width:1200px;padding-right:20px;padding-left:20px;font-size:32px;line-height:1.4;font-weight:400;color:#f5ebdc;text-align:left}@media (min-width: 1024px){.menu__title[_ngcontent-%COMP%]{padding-right:10px;padding-left:10px}}.see-offers-mobile[_ngcontent-%COMP%]{width:90%;height:48px;margin-top:32px;margin-left:auto;margin-right:auto;border:none;border-radius:6px;background-color:#d62300;color:#f5ebdc;cursor:pointer;position:sticky;bottom:84px;left:0;right:0;z-index:200;display:flex;align-items:center;justify-content:center}@media (min-width: 1024px){.see-offers-mobile[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})}}return n})()},{path:`${m.C.Order}`,canActivate:[de,V.yE],component:Mo},{path:`${m.C.Order}/:${m.C.CategoryRef}`,canActivate:[de,ke,V.yE],component:Yo},{path:`${m.C.Order}/:${m.C.CategoryRef}/:${m.C.ProductName}`,canActivate:[de,ke,V.yE],canDeactivate:[et],component:Le},{path:`:${m.C.ProductName}`,component:Ve,canActivate:[Ie]},{path:"**",pathMatch:"full",redirectTo:""}];let es=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({imports:[S.iI.forChild(Zo),S.iI]})}}return n})();var J=p(5558),ne=p(9437),ts=p(1626),ns=p(3710);let is=(()=>{class n{constructor(t,i){this.httpClient=t,this.errors=i,this.url=F.c.APP_API_URL}fetchRestaurantMenu(t,i,o){let a=this.url+"/{language}/restaurants/{restaurantRef}/menus/{menuId}";return null==t?this.errors.getFailure("The parameter 'language' must be defined."):null==i?this.errors.getFailure("The parameter 'restaurantRef' must be defined."):null==o?this.errors.getFailure("The parameter 'menuId' must be defined."):(a=a.replace("{language}",encodeURIComponent(""+t)),a=a.replace("{restaurantRef}",encodeURIComponent(""+i)),a=a.replace("{menuId}",encodeURIComponent(""+o)),a=a.replace(/[?&]$/,""),this.httpClient.get(a).pipe((0,ne.W)(r=>this.errors.handleError(r))))}fetchKeyCondiment(t,i,o,a){if(!t)return this.errors.getFailure("The parameter 'language' must be defined.");if(!o)return this.errors.getFailure("The parameter 'restaurantRef' must be defined.");if(!i)return this.errors.getFailure("The parameter 'itemRef' must be defined.");if(!a)return this.errors.getFailure("The parameter 'menuId' must be defined.");
1const r=new URL(`/${t}/restaurants/${o}/menus/${a}/items/${i}/keycondiment`,this.url);return this.httpClient.get(r.toString()).pipe((0,ne.W)(l=>this.errors.handleError(l,!1)))}fetchOrderingItemDetails(t,i,o,a){let r=this.url+"/{language}/restaurants/{restaurantRef}/menus/{menuId}/items/{itemRef}";return null==t?this.errors.getFailure("The parameter 'language' must be defined."):null==o?this.errors.getFailure("The parameter 'restaurantRef' must be defined."):null==i?this.errors.getFailure("The parameter 'itemRef' must be defined."):null==a?this.errors.getFailure("The parameter 'menuId' must be defined."):(r=r.replace("{language}",encodeURIComponent(""+t)),r=r.replace("{restaurantRef}",encodeURIComponent(""+o)),r=r.replace("{itemRef}",encodeURIComponent(""+i)),r=r.replace("{menuId}",encodeURIComponent(""+a)),r=r.replace(/[?&]$/,""),this.httpClient.get(r).pipe((0,ne.W)(l=>this.errors.handleError(l,!1))))}fetchNutritionData(t,i){const o=new URL("/{language}/ordering/menu/allergensandnutritions",this.url);return t?(i&&i.forEach(a=>o.searchParams.append("menuItemRefs",a)),this.httpClient.get(o.toString()).pipe((0,ne.W)(a=>this.errors.handleError(a)))):this.errors.getFailure('The parameter "language" must be defined.')}fetchRestaurantDetails(t){let i=this.url+"/api/v2/restaurants/{restaurantRef}";return null==t?this.errors.getFailure('The parameter "restaurantRef" must be defined.'):(i=i.replace("{restaurantRef}",encodeURIComponent(""+t)),i=i.replace(/[?&]$/,""),this.httpClient.get(i).pipe((0,ne.W)(o=>this.errors.handleError(o))))}static{this.\u0275fac=function(i){return new(i||n)(e.KVO(ts.Qq),e.KVO(ns.v))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var os=p(6554);let ss=(()=>{class n{constructor(t,i,o,a){this.actions$=t,this.menuService=i,this.spinner=o,this.store=a,this.fetchRestaurantDetails$=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(Re),(0,N.M)(()=>this.spinner.show()),(0,J.n)(({restaurantRef:r})=>this.menuService.fetchRestaurantDetails(r).pipe((0,P.T)(l=>l.hasErrors?De():_e({restaurantDetails:l.data})))))),this.fetchRestaurantMenu=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(Q),(0,N.M)(()=>this.spinner.show()),(0,H.E)(this.store.select(V._V),this.store.select(v.G6).pipe((0,G.p)(r=>!!r)),this.store.select(v.KL).pipe((0,G.p)(r=>!!r))),(0,J.n)(([r,l,{slug:u,externalId:_},x])=>this.menuService.fetchRestaurantMenu(l,u||_,x).pipe((0,P.T)(h=>h.hasErrors?he():ae({categories:h.data.categories})))))),this.fetchGenericRestaurantMenu=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(se),(0,N.M)(()=>this.spinner.show()),(0,H.E)(this.store.select(V._V)),(0,J.n)(([r,l])=>this.menuService.fetchRestaurantMenu(l,"generic","generic").pipe((0,P.T)(u=>u.hasErrors?he():ae({categories:u.data.categories})))))),this.fetchKeyCondiment=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(ve),(0,H.E)(this.store.select(V._V),this.store.select(v.G6).pipe((0,G.p)(r=>!!r)),this.store.select(v.KL).pipe((0,G.p)(r=>!!r))),(0,J.n)(([{itemRef:r,callback:l},u,{slug:_,externalId:x},h])=>this.menuService.fetchKeyCondiment(u,r,_||x,h).pipe((0,N.M)(D=>l({isSuccess:!D.hasErrors,data:D.data})),(0,P.T)(D=>D.hasErrors?nt():tt({data:D.data})))))),this.fetchOrderingMenuDetails=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(Te),(0,H.E)(this.store.select(V._V),this.store.select(v.G6).pipe((0,G.p)(r=>!!r)),this.store.select(v.KL).pipe((0,G.p)(r=>!!r))),(0,N.M)(()=>this.spinner.show()),(0,J.n)(([{itemRef:r},l,{slug:u,externalId:_},x])=>this.menuService.fetchOrderingItemDetails(l,r,u||_,x).pipe((0,P.T)(h=>h.hasErrors?z({errors:h.errors}):U({productDetails:h.data})))))),this.fetchOrderingMenuDetailsGeneric=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(we),(0,H.E)(this.store.select(V._V)),(0,N.M)(()=>this.spinner.show()),(0,J.n)(([{itemRef:r},l])=>this.menuService.fetchOrderingItemDetails(l,r,"generic","generic").pipe((0,P.T)(u=>u.hasErrors?z({errors:u.errors}):U({productDetails:u.data})))))),this.fetchNutritionData=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(it),(0,H.E)(this.store.select(V._V)),(0,J.n)(([{productsId:r},l])=>this.menuService.fetchNutritionData(l,r).pipe((0,P.T)(u=>u.hasErrors?ot():Ee({data:u.data})))))),this.hideSpinner$=(0,M.EH)(()=>this.actions$.pipe((0,M.gp)(ae,he,U,z),(0,N.M)(()=>this.spinner.hide())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||n)(e.KVO(M.En),e.KVO(is),e.KVO(os.ex),e.KVO(d.il))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac})}}return n})();function as(n,s){if(1&n&&(e.j41(0,"p",7),e.EFF(1),e.k0s()),2&n){const t=e.XpG();
1e.R7$(1),e.JRh(t.otherProduct.shortDescription)}}function rs(n,s){if(1&n&&(e.j41(0,"span",8),e.EFF(1),e.nI1(2,"number"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Lme(" ",e.i5U(2,2,t.otherProduct.calories,"1.0-0")," ",e.bMT(3,5,"menu.details.nutritions.kcal")," ")}}let ls=(()=>{class n{constructor(){this.showCalories=!1}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details-tile"]],inputs:{otherProduct:"otherProduct",showCalories:"showCalories"},decls:9,vars:7,consts:[[1,"tile"],[1,"tile__img"],[3,"src","alt"],[1,"tile__texts"],[1,"tile__title"],["class","tile__desc",4,"ngIf"],["class","tile__cal",4,"ngIf"],[1,"tile__desc"],[1,"tile__cal"]],template:function(i,o){1&i&&(e.j41(0,"article",0)(1,"div",1),e.nrm(2,"img",2),e.nI1(3,"translate"),e.k0s(),e.j41(4,"div",3)(5,"h3",4),e.EFF(6),e.k0s(),e.DNE(7,as,2,1,"p",5),e.DNE(8,rs,4,7,"span",6),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("src",o.otherProduct.imageUrl,e.B4B)("alt",e.bMT(3,5,"general.alt.image-of")+o.otherProduct.productName),e.R7$(4),e.JRh(o.otherProduct.productName),e.R7$(1),e.Y8G("ngIf",o.otherProduct.shortDescription),e.R7$(1),e.Y8G("ngIf",o.otherProduct.calories&&o.showCalories))},dependencies:[g.bT,E.L,g.QX,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.tile[_ngcontent-%COMP%]{margin-bottom:12px;padding:20px;border-radius:8px;background-color:#f5ebdc;display:flex;flex-flow:row nowrap;align-items:center}.tile__img[_ngcontent-%COMP%]{flex-shrink:0;width:60px;height:60px;display:flex;justify-content:center;align-items:center}@media (min-width: 1024px){.tile__img[_ngcontent-%COMP%]{width:104px;height:104px}}.tile__img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.tile__title[_ngcontent-%COMP%]{margin:0;font-size:16px;line-height:24px;color:#502314}@media (min-width: 1024px){.tile__title[_ngcontent-%COMP%]{font-size:20px;line-height:30px}}.tile__texts[_ngcontent-%COMP%]{flex-grow:1;margin-left:20px}.tile__desc[_ngcontent-%COMP%]{margin-top:4px;margin-bottom:0;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:24px;color:#502314}@media (min-width: 1024px){.tile__desc[_ngcontent-%COMP%]{font-size:16px;line-height:26px}}.tile__cal[_ngcontent-%COMP%]{margin:0;font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:24px;color:#502314;opacity:.65}"],changeDetection:0})}}return n})();function cs(n,s){if(1&n&&e.nrm(0,"app-checkmark",6),2&n){const t=e.XpG();e.Y8G("isSelected",t.isSelected)}}function ds(n,s){1&n&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"menu.details.customize.meal-selection.out-of-stock")," "))}let ps=(()=>{class n{constructor(){this.isSpicy=!1,this.isSelected=!1,this.isOutOfStock=!1}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-spice-level-tile"]],inputs:{isSpicy:"isSpicy",isSelected:"isSelected",isOutOfStock:"isOutOfStock"},decls:13,vars:24,consts:[["type","button",1,"tile"],["aria-hidden","true",3,"isSelected",4,"ngIf"],[1,"tile__image"],[3,"src","alt"],["class","tile__out-of-stock",4,"ngIf"],[1,"tile__header"],["aria-hidden","true",3,"isSelected"],[1,"tile__out-of-stock"]],template:function(i,o){1&i&&(e.j41(0,"button",0),e.nI1(1,"translate"),e.nI1(2,"translate"),e.DNE(3,cs,1,1,"app-checkmark",1),e.j41(4,"span",2),e.nrm(5,"img",3),e.nI1(6,"translate"),e.nI1(7,"translate"),e.DNE(8,ds,3,3,"span",4),e.k0s(),e.j41(9,"span",5),e.EFF(10),e.nI1(11,"translate"),e.nI1(12,"translate"),e.k0s()()),2&i&&(e.AVh("selected",o.isSelected)("out-of-stock",o.isOutOfStock),e.BMQ("aria-pressed",o.isSelected)("aria-disabled",o.isOutOfStock)("aria-label",o.isSpicy?e.bMT(1,12,"menu.details.customize.spice.spicy"):e.bMT(2,14,"menu.details.customize.spice.classic")),e.R7$(3),e.Y8G("ngIf",!o.isOutOfStock),e.R7$(2),e.Y8G("src",o.isSpicy?"/assets/images/spice-spicy.webp":"/assets/images/spice-classic.webp",e.B4B)("alt",o.isSpicy?e.bMT(6,16,"menu.details.customize.spice.spicy"):e.bMT(7,18,"menu.details.customize.spice.classic")),e.R7$(3),e.Y8G("ngIf",o.isOutOfStock),e.R7$(2),e.SpI(" ",o.isSpicy?e.bMT(11,20,"menu.details.customize.spice.spicy"):e.bMT(12,22,"menu.details.customize.spice.classic")," "))},dependencies:[g.bT,ee.B,E.L,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.tile[_ngcontent-%COMP%]{width:100%;position:relative;padding:8px 8px 16px;border:none;border-radius:8px;background-color:#f5ebdc;color:#fff;cursor:pointer;transition:all .2s ease-out}.tile.selected[_ngcontent-%COMP%]{box-shadow:0 2px 12px #0003}.tile.out-of-stock[_ngcontent-%COMP%]{filter:grayscale(1)}.tile[_ngcontent-%COMP%]   app-checkmark[_ngcontent-%COMP%]{position:absolute;top:-6px;left:-10px;z-index:1}.tile__header[_ngcontent-%COMP%]{margin-top:8px;margin-bottom:0;font-size:16px;line-height:24px;font-weight:400;color:#502314}.tile__image[_ngcontent-%COMP%]{position:relative}.tile__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:auto}.tile__out-of-stock[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:0 6px 2px;border-radius:6px;background:#BBBDC0;font-size:14px;line-height:24px;font-weight:400;color:#fff;white-space:nowrap}"]})}}return n})();function us(n,s){if(1&n&&(e.nrm(0,"img",13),e.nI1(1,"translate")),2&n){const t=e.XpG();e.Y8G("src",t.selectedMeal.imageUrl,e.B4B)("alt",e.bMT(1,2,"general.alt.image-of")+t.selectedMeal.productName)}}function ms(n,s){if(1&n&&(e.j41(0,"div",14),e.EFF(1),e.nI1(2,"number"),e.nI1(3,"translate"),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Lme(" ",e.i5U(2,2,t.selectedMeal.calories,"1.0-0")," ",e.bMT(3,5,"menu.details.nutritions.kcal")," ")}}let gs=(()=>{class n{constructor(t){this.router=t,this.showCalories=!1,this.descriptionFolded=!0}back(){const t=this.router.url.lastIndexOf("/"),i=decodeURI(this.router.url.substring(0,t));this.router.navigate([i])}unfoldDescription(){this.descriptionFolded=!1}static{this.\u0275fac=function(i){return new(i||n)(e.rXU(S.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["app-menu-details-non-ordering-header"]],inputs:{selectedMeal:"selectedMeal",showCalories:"showCalories"},decls:19,vars:8,consts:[[1,"details-header"],[1,"details-header__header-wrapper"],[1,"details-header__header"],[1,"wrapper"],["type","button",1,"details-header__back",3,"click"],["icon","arrow-left","size","large","aria-hidden","true"],[1,"details-header__title-header"],[1,"details-header__image"],[3,"src","alt",4,"ngIf"],[1,"details-header__content"],[1,"details-header__content-title"],[1,"details-header__content-desc"],["class","details-header__content-kcal",4,"ngIf"],[3,"src","alt"],[1,"details-header__content-kcal"]],template:function(i,o){1&i&&(e.j41(0,"section",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"button",4),e.bIt("click",function(){return o.back()}),e.nrm(5,"app-svg-icon",5),e.j41(6,"span"),e.EFF(7),e.nI1(8,"translate"),e.k0s()()(),e.j41(9,"h2",6),e.EFF(10),e.k0s()(),e.j41(11,"div",7),e.DNE(12,us,2,4,"img",8),e.k0s()(),e.j41(13,"div",9)(14,"h1",10),e.EFF(15),e.k0s(),e.j41(16,"div",11),e.EFF(17),e.k0s(),e.DNE(18,ms,4,7,"div",12),e.k0s()()),2&i&&(e.R7$(7),e.JRh(e.bMT(8,6,"general.button.back")),e.R7$(3),e.JRh(o.selectedMeal.productName),e.R7$(2),e.Y8G("ngIf",o.selectedMeal.imageUrl),e.R7$(3),e.SpI(" ",o.selectedMeal.productName," "),e.R7$(2),e.SpI(" ",o.selectedMeal.shortDe
1scription," "),e.R7$(1),e.Y8G("ngIf",o.selectedMeal.calories&&o.showCalories))},dependencies:[g.bT,$.D,E.L,g.QX,C.D9],styles:["[_ngcontent-%COMP%]:root{--mat-option-focus-state-layer-color: $color-mayo-egg-light}.details-header__header-wrapper[_ngcontent-%COMP%]{position:relative}.details-header__header[_ngcontent-%COMP%]{height:325px;margin-bottom:82px;background-color:#ff8732;z-index:1;position:relative;overflow:hidden}@media (min-width: 1024px){.details-header__header[_ngcontent-%COMP%]{height:420px;margin-bottom:116px}}.details-header__header[_ngcontent-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding-top:20px;display:flex;flex-flow:column nowrap}@media (min-width: 1024px){.details-header__header[_ngcontent-%COMP%]   .wrapper[_ngcontent-%COMP%]{padding-top:32px}}.details-header__back[_ngcontent-%COMP%]{padding:9px 20px;border:none;border-radius:6px;background-color:#f5ebdc;display:flex;justify-content:center;align-items:center;cursor:pointer;width:-moz-fit-content;width:fit-content}.details-header__back[_ngcontent-%COMP%]   app-svg-icon[_ngcontent-%COMP%]{margin-right:10px;transition:transform ease-in-out .2s}.details-header__back[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-family:
1Flame Sans,Arial,Helvetica,sans-serif}.details-header__back[_ngcontent-%COMP%]:hover   app-svg-icon[_ngcontent-%COMP%]{transform:translate(-10px)}.details-header__promo-header[_ngcontent-%COMP%]{margin:8px -20px 0;font-size:72px;line-height:88px;font-weight:700;text-align:center;color:#fff}.details-header__title-header[_ngcontent-%COMP%]{margin-bottom:32px;font-size:88px;line-height:88px;font-weight:700;text-align:center;color:#f5ebdc;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;bottom:0;width:auto;z-index:0;left:-100%;right:-100%}@media (min-width: 1024px){.details-header__title-header[_ngcontent-%COMP%]{font-size:148px;left:-50%;right:-50%;line-height:1}}.details-header__image[_ngcontent-%COMP%]{width:320px;height:320px;margin:auto;display:flex;justify-content:center;align-items:center;position:absolute;left:0;right:0;bottom:-82px;z-index:10}@media (min-width: 1024px){.details-header__image[_ngcontent-%COMP%]{width:400px;height:400px;bottom:-96px}}.details-header__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.details-header__content[_ngcontent-%COMP%]{max-width:1200px;padding:0 20px;margin:0 auto 32px}@media (min-width: 1024px){.details-header__content[_ngcontent-%COMP%]{max-width:600px;margin-bottom:42px;padding-left:10px;padding-right:10px}}.details-header__content-title[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:12px;font-size:32px;line-height:42px;font-weight:700;color:#502314}@media (min-width: 1024px){.details-header__content-title[_ngcontent-%COMP%]{font-size:48px;line-height:58px}}.details-header__content-promo-chip[_ngcontent-%COMP%]{display:inline-block;margin-bottom:6px;padding:0 6px 2px;border-radius:4px;background:#ff8732;
1font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:14px;line-height:24px;font-weight:400;color:#fff}.details-header__content-promo-chip.free[_ngcontent-%COMP%]{background:#198737}.details-header__content-desc[_ngcontent-%COMP%]{font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:16px;line-height:26px;color:#502314}.details-header__content-kcal[_ngcontent-%COMP%]{margin-top:20px;font-family:Flame Sans,Arial,Helvetica,sans-serif;font-size:16px;line-height:26px;font-weight:400;color:#502314a6}"],changeDetection:0})}}return n})(),hs=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({imports:[Ze.G,es,d.md.forFeature(Oe.U.Menu,ct),M.Vm.forFeature([ss])]})}}return n})();e.wjB(Le,function(){return[g.Sq,g.bT,te.V,E.L,Z,Ue,ps,Ye,li,qi,Xe,Mi,Lt,Ri,Pi]},function(){return[g.Jj,C.D9]}),e.wjB(Ve,function(){return[g.Sq,g.bT,te.V,Z,ls,Ue,gs]},function(){return[g.Jj,C.D9]})},7398:(Ke,ie,p)=>{p.d(ie,{U:()=>M});var M=function(d){return d.Basket="basket",d.Home="home",d.Loyalty="loyalty",d.Menu="menu",d.MenuBoard="menuBoard",d.Offers="offers",d.Restaurants="restaurants",d.Career="Career",d.Account="Account,",d.Allergens="allergens",d.Nutrition="nutrition",d}(M||{})}}]);

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.