1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a062e9-c6ee-7f22-9ea5-d0b4ef5ffbfc")}catch(e){}}();"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2835],{72835:(z,R,c)=>{c.d(R,{$:()=>_e});var p=c(71670),y=c(66699),C=c(81258),O=c(74005),E=c(59151),b=c(26549),g=c(90978),e=c(92135),_=c(53305),d=c(43475),J=c(63370),V=c(96256),j=c(51933),Q=c(59162),X=c(38699),$=c(90910),q=c(73071),ee=c(49670),te=c(68132),ne=c(63947),oe=c(64068),A=c(94666);function ie(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.navigateToLanding())}),e.TgZ(1,"img",12),e.NdJ("error",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.onLogoError())}),e.qZA()()}if(2&l){const r=e.oxw();e.Q6J("ngClass",r.getLogoClasses(!0)),e.xp6(1),e.Q6J("src",r.sharedService.restaurantLogo,e.LSH)}}function re(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"div",13),e.NdJ("click",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.navigateToLanding())}),e.TgZ(1,"img",12),e.NdJ("error",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.onLogoError())}),e.qZA()()}if(2&l){const r=e.oxw();e.Q6J("ngClass",r.getLogoClasses(!1)),e.xp6(1),e.Q6J("src",r.sharedService.restaurantLogo,e.LSH)}}const x=function(l){return{"navigation-color":l}};function ae(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"ion-buttons",14)(1,"ion-button",15),e.NdJ("click",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.goToRestaurants())}),e._uU(2),e.qZA()()}if(2&l){const r=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(2,x,r.isLandingPage)),e.xp6(1),e.hij(" ",r.vendorService.IS_SINGLE_RESTAURANT?"Menu":"Restaurants"," ")}}function se(l,v){if(1&l&&(e.TgZ(0,"ion-select-option",18),e._uU(1),e.qZA()),2&l){const r=v.$implicit;e.Q6J("value",r.url),e.xp6(1),e.hij(" ",r.title," ")}}function le(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"ion-buttons",14)(1,"ion-select",16),e.NdJ("ionChange",function(t){e.CHM(r);const s=e.oxw();return e.KtG(s.handleSelectChange(t))}),e.YNc(2,se,2,2,"ion-select-option",17),e.qZA()()}if(2&l){const r=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(2,x,r.isLandingPage)),e.xp6(1),e.Q6J("ngForOf",r.externalLinks)}}function de(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"ion-buttons",14)(1,"ion-button",19),e.NdJ("click",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.openExternalLink(t.externalLinks[0].url))}),e._uU(2),e.qZA()()}if(2&l){const r=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(2,x,r.isLandingPage)),e.xp6(1),e.hij(" ",r.externalLinks[0].title," ")}}function ce(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"ion-buttons",20),e.NdJ("click",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.goToLogin("profile"))}),e.TgZ(1,"ion-button",21),e._uU(2," Login / Sign Up "),e.qZA()()}if(2&l){const r=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(1,x,r.isLandingPage))}}function ge(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"div",25),e.NdJ("click",function(){e.CHM(r);const t=e.oxw(2);return e.KtG(t.goToRewardsMarketplace())}
1),e._UZ(1,"ion-icon",26),e.TgZ(2,"span",27),e._uU(3),e.qZA()()}if(2&l){const r=e.oxw(2);e.xp6(1),e.ekj("pulse-animate",r.pointsAnimating),e.xp6(2),e.Oqu(r.availablePoints)}}function he(l,v){if(1&l){const r=e.EpF();e.TgZ(0,"ion-buttons",22)(1,"ion-button",23),e.NdJ("click",function(){e.CHM(r);const t=e.oxw();return e.KtG(t.goToMyAccount())}),e._uU(2),e.qZA(),e.YNc(3,ge,4,3,"div",24),e.qZA()}if(2&l){const r=e.oxw();e.xp6(1),e.Q6J("ngClass",e.VKq(3,x,r.isLandingPage)),e.xp6(1),e.hij(" ",r.userName," "),e.xp6(1),e.Q6J("ngIf","Y"==r.vendorService.REWARDS_MARKETPLACE&&"Y"==r.vendorService.SHOW_REWARDS_MARKETPLACE)}}let _e=(()=>{var l;class v{constructor(n,t,s,u,m,o,L,a,P,M,k,T,w,f,S,ue,pe,me,ve){this.screenResize=n,this.route=t,this.router=s,this.modalCtrl=u,this.storage=m,this.sharedService=o,this.vendorService=L,this.alertCtrl=a,this.statusBar=P,this.translate=M,this.platform=k,this.cartAPI=T,this.loadingCtrl=w,this.userAPI=f,this.config=S,this.domCtrl=ue,this.orderAPI=pe,this.rewardsService=me,this.restAPI=ve,this.hideBackButton=!1,this.hasBrandLogo=!0,this.userName="",this.cartEmpty=!0,this.moreExternalLinksCheck=!1,this.singleExternalLinksCheck=!1,this.externalLinks=[],this.menuVisible=!1,this.hasOrderHistory=!1,this.userEmail="",this.guestUserOnlyPhone=!1,this.url=this.config.rds_baseurl,this.isLandingPage=!1,this.remoteUrl="",this.nonRemoteUrl="",this.logoUrl="",this.brand="",this.logoPlaceholder="assets/imgs/rest-logo-placeholder.jpg",this.logoBackground="transparent",this.logoBackgroundColor="#f2f2f2",this.availablePoints=0,this.pointsAnimating=!1,this.pointsLoaded=!1,this.currentUserEmail="",this.showRestaurantsLink=!0,this.userLogInSubscription=this.userAPI.userChange.subscribe(h=>{("loggedIn"===h||"newUserWithCart"===h||"newUserAccount"===h||"newUser"===h)&&(this.pointsLoaded=!1,this.getUserInfo(),this.checkRestaurantsLinkVisibility())}),this.moreExternalLinksSubcription=this.vendorService.settingsEmit.subscribe(h=>{this.headerExternalLinks(),this.checkRestaurantsLinkVisibility()}),this.restAPI.addressChange.subscribe(()=>{this.checkRestaurantsLinkVisibility()}),this.orderAPI.newSettings.subscribe(()=>{this.checkRestaurantsLinkVisibility()}),this.sharedService.externalLinks.length>0?(this.externalLinks=this.sharedService.externalLinks,this.moreExternalLinksCheck=this.sharedService.moreExternalLinksCheck,this.singleExternalLinksCheck=this.sharedService.singleExternalLinksCheck):this.vendorService.settingsEmit.emit(this.vendorService.SETTINGS),this.sharedService.statusBar.subscribe(h=>{this.setStatusBarColor()}),this.route.queryParams.subscribe(h=>{this.vendorService.settingsEmit.subscribe(i=>{this.logoBackground=this.vendorService.GLUE_LOGO_BACKGROUND||"transparent",this.logoBackgroundColor=this.vendorService.GLUE_LOGO_BACKGROUND_COLOR||"#f2f2f2",document.documentElement.style.setProperty("--glue-logo-background-color",this.logoBackgroundColor),this.setGoogleColorsForGFO(h),this.vendorService.GLUE_HEADER_LINK_COLOR&&document.documentElement.style.setProperty("--glue-header-link-color",this.vendorService.GLUE_HEADER_LINK_COLOR),"Y"===(null==i?void 0:i.ORDER_SOURCE_BRNDING)&&h.branding?this.setupBranding(h.branding,h.utm_source):this.sharedService.restaurantLogo=this.isImageRemote(null==i?void 0:i.GLUE_LOGO)?null!=i&&i.GLUE_LOGO?null==i?void 0:i.GLUE_LOGO:""==(null==i?void 0:i.GLUE_LOGO)?"assets/imgs/logo.png":"":null!=i&&i.GLUE_LOGO?this.url+(null==i?void 0:i.GLUE_LOGO):""==(null==i?void 0:i.GLUE_LOGO)?"assets/imgs/logo.png":""})}),this.router.events.pipe((0,E.h)(h=>h instanceof C.m2)).subscribe(()=>{var h;if("Y"===(null===(h=this.vendorService)||void 0===h?void 0:h.ORDER_SOURCE_BRNDING)){var i,I,U,G,D,N;const fe={GLUE_LOGO:null===(i=this.vendorService)||void 0===i?void 0:i.GLUE_LOGO},Oe={branding:null===(I=this.route)||void 0===I||null===(U=I.snapshot)||void 0===U||null===(G=U.queryParams)||void 0===G?void 0:G.branding,utm_source:null===(D=this.route)||void 0===D||null===(N=D.snapshot)||void 0===N?void 0:N.queryParams.utm_source};this.handleLogo(Oe,fe)}else{var B,K,H,F,Y,W,Z;this.sharedService.restaurantLogo=this.isImageRemote(null===(B=this.vendorService)||void 0===B?void 0:B.GLUE_LOGO)?null!==(K=this.vendorService)&&void 0!==K&&K.GLUE_LOGO?null===(H=this.vendorService)||void 0===H?void 0:H.GLUE_LOGO:""==(null===(F=this.vendorService)||void 0===F?void 0:F.GLUE_LOGO)?"assets/imgs/logo.png":"":null!==(Y=this.vendorService)&&void 0!==Y&&Y.GLUE_LOGO?this.url+(null===(W=this.vendorService)||void 0===W?void 0:W.GLUE_LOGO):""==(null===(Z=this.vendorService)||void 0===Z?void 0:Z.GLUE_LOGO)?"assets/imgs/logo.png":""}}),this.routerSubscription=this.router.events.subscribe(h=>{h instanceof C.m2&&(this.isLandingPage="/landing"===h.url,this.logoBackgroun
1d=this.vendorService.GLUE_LOGO_BACKGROUND||"transparent",this.logoBackgroundColor=this.vendorService.GLUE_LOGO_BACKGROUND_COLOR||"#f2f2f2",document.documentElement.style.setProperty("--glue-logo-background-color",this.logoBackgroundColor))})}handleLogo(n,t){n.branding?this.setupBranding(n.branding,n.utm_source):this.sharedService.restaurantLogo=this.isImageRemote(null==t?void 0:t.GLUE_LOGO)?null!=t&&t.GLUE_LOGO?null==t?void 0:t.GLUE_LOGO:""==(null==t?void 0:t.GLUE_LOGO)?"assets/imgs/logo.png":"":null!=t&&t.GLUE_LOGO?this.url+(null==t?void 0:t.GLUE_LOGO):""==(null==t?void 0:t.GLUE_LOGO)?"assets/imgs/logo.png":""}setGoogleColorsForGFO(n){var t;"google"===(null==n||null===(t=n.utm_source)||void 0===t?void 0:t.toLowerCase())&&(this.sharedService.isGfoSource=!0,this.storage.set("isGfoSource",!0),this.domCtrl.write(()=>{document.documentElement.style.setProperty("--ion-color-primary","#4285F4"),document.documentElement.style.setProperty("--ion-color-secondary","#4285F4")}))}onLogoError(){this.sharedService.restaurantLogo=this.logoPlaceholder}navigateToLanding(){this.storage.set("allowSeeLandig",!0),this.router.navigateByUrl("landing"),setTimeout(()=>{this.sharedService.count=0},500)}onMenuIconClick(){this.setStatusBarColor()}setStatusBarColor(){b.dV.isNativePlatform()&&(g.A_.show(),g.A_.setStyle({style:g.bg.Light}),g.A_.setOverlaysWebView({overlay:!1}),g.A_.setBackgroundColor({color:"#FFFFFF"}))}ngOnInit(){this.isMobileView=this.screenResize.isMobileView,this.screenSizeEvent=this.screenResize.screenSizeChange.subscribe(n=>{this.isMobileView=n}),this.getUserInfo(),this.checkRestaurantsLinkVisibility(),this.router.events.pipe((0,E.h)(n=>n instanceof C.m2)).subscribe(()=>{this.getUserInfo(),this.checkRestaurantsLinkVisibility()}),this.setupMenu()}setupBranding(n,t){switch(n.toLowerCase()){case"source":t&&"apple"===t.toLowerCase()?this.sharedService.restaurantLogo="assets/imgs/apple-logo.png":!t||"gfo"!==t.toLowerCase()&&"rwg"!==t.toLowerCase()&&"google"!==t.toLowerCase()?!t||"fb"!==t.toLowerCase()&&"facebook"!==t.toLowerCase()?this.getDefaultLogo():this.sharedService.restaurantLogo="assets/imgs/fb-logo.png":this.sharedService.restaurantLogo="assets/imgs/google-logo.png";break;case"merchant":break;default:this.getDefaultLogo()}}getDefaultLogo(){var n,t,s,u,m,o,L;this.sharedService.restaurantLogo=this.isImageRemote(null===(n=this.vendorService)||void 0===n?void 0:n.GLUE_LOGO)?null!==(t=this.vendorService)&&void 0!==t&&t.GLUE_LOGO?null===(s=this.vendorService)||void 0===s?void 0:s.GLUE_LOGO:""==(null===(u=this.vendorService)||void 0===u?void 0:u.GLUE_LOGO)?"assets/imgs/logo.png":"":null!==(m=this.vendorService)&&void 0!==m&&m.GLUE_LOGO?this.url+(null===(o=this.vendorService)||void 0===o?void 0:o.GLUE_LOGO):""==(null===(L=this.vendorService)||void 0===L?void 0:L.GLUE_LOGO)?"assets/imgs/logo.png":""}checkOrderHistory(){this.storage.get("hasOrderHistory").then(n=>{null!=n?this.hasOrderHistory=n:this.userEmail&&this.userAPI.getOrderHistory(this.userEmail).subscribe(t=>{null!=t&&t.orders&&(this.sharedService.orderHistory=t.orders.slice(0,10)),this.hasOrderHistory=t&&t.orders.length>0,t&&t.orders.length>0&&this.storage.set("hasOrderHistory",!0).then(s=>{})},t=>{})})}toggleMenu(){this.menuVisible=!this.menuVisible}setupMenu(){this.appPages=[{title:"restaurants",url:"/restaurants",icon:"list",show:!0,isBeforeRedirect:!1,childs:[]},{title:"myAccount",url:"/account",icon:"person",isBeforeRedirect:!1,show:!0,childs:[{title:"profile",url:"/profile",icon:"",isBeforeRedirect:!1},{title:"rewardsMarketplace",url:"/rewards-marketplace",icon:"",isBeforeRedirect:!1},{title:"groupOrders",url:"groupOrders",icon:"",isBeforeRedirect:!0}]},{title:"marketplace",url:"marketplace",icon:"",isBeforeRedirect:!0,show:!0,childs:[]},{title:"reOrder",url:"/order-history",icon:"document",show:!0,isBeforeRedirect:!1,childs:[]},{title:"giftCertificates",url:"giftCertificates",icon:"document",show:!0,isBeforeRedirect:!0,childs:[]},{title:"privacyPolicy",url:"/privacy-policy",icon:"document",show:!0,isBeforeRedirect:!1,childs:[]},{title:"contactUs",url:"/contact",icon:"document",show:!0,isBeforeRedirect:!1,childs:[]}],(this.vendorService.GLUE_BECOME_A_DRIVER_LINK&&""!==this.vendorService.GLUE_BECOME_A_DRIVER_LINK||this.vendorService.GLUE_OWN_A_RESTAURANT_LINK&&""!==this.vendorService.GLUE_OWN_A_RESTAURANT_LINK)&&(this.appPages=[...this.appPages,{title:"joinUs",url:"",icon:"document",show:!(!this.vendorService.GLUE_BECOME_A_DRIVER_LINK&&!this.vendorService.GLUE_OWN_A_RESTAURANT_LINK),isBeforeRedirect:!1,childs:[{title:"becomeADriver",url:this.vendorService.GLUE_BECOME_A_DRIVER_LINK,icon:"",isBeforeRedirect:!0},{title:"becomeARestaurant",url:this.vendorService.GLUE_OWN_A_RESTAURANT_LINK,icon:"",isBeforeRedirect:!0}]}])}
1headerExternalLinks(){this.externalLinks=[],this.moreExternalLinksCheck=!1,this.singleExternalLinksCheck=!1,this.vendorService.externalLinksCount>0&&1==this.vendorService.externalLinksHeaderDisplayCount&&(this.moreExternalLinksCheck=!1,this.singleExternalLinksCheck=!0),this.vendorService.externalLinksCount>0&&this.vendorService.externalLinksHeaderDisplayCount>1&&(this.moreExternalLinksCheck=!0,this.singleExternalLinksCheck=!1),this.vendorService.externalLinksCount>0&&this.vendorService.externalLinksHeaderDisplayCount>=1&&(this.vendorService.EXTERNAL_LINK_1&&""!=this.vendorService.EXTERNAL_LINK_1&&"Y"==this.vendorService.EXTERNAL_LINK_1_DISPLAY_SECTIONS[0]&&this.externalLinks.push({title:this.vendorService.EXTERNAL_LINK_1_TITLE,url:"/external_link_1"}),this.vendorService.EXTERNAL_LINK_2&&""!=this.vendorService.EXTERNAL_LINK_2&&"Y"==this.vendorService.EXTERNAL_LINK_2_DISPLAY_SECTIONS[0]&&this.externalLinks.push({title:this.vendorService.EXTERNAL_LINK_2_TITLE,url:"/external_link_2"}),this.vendorService.EXTERNAL_LINK_3&&""!=this.vendorService.EXTERNAL_LINK_3&&"Y"==this.vendorService.EXTERNAL_LINK_3_DISPLAY_SECTIONS[0]&&this.externalLinks.push({title:this.vendorService.EXTERNAL_LINK_3_TITLE,url:"/external_link_3"})),this.sharedService.externalLinks=this.externalLinks,this.sharedService.moreExternalLinksCheck=this.moreExternalLinksCheck,this.sharedService.singleExternalLinksCheck=this.singleExternalLinksCheck}handleSelectChange(n){this.openExternalLink(n.detail.value)}openExternalLink(n){n&&""!=n&&("/external_link_1"==n?window.open(this.vendorService.EXTERNAL_LINK_1,"_blank"):"/external_link_2"==n?window.open(this.vendorService.EXTERNAL_LINK_2,"_blank"):"/external_link_3"==n&&window.open(this.vendorService.EXTERNAL_LINK_3,"_blank"))}ionViewWillEnter(){this.getUserInfo()}ngOnDestroy(){this.screenSizeEvent.unsubscribe(),this.userLogInSubscription.unsubscribe(),this.routerSubscription.unsubscribe(),this.pointsSubscription&&this.pointsSubscription.unsubscribe(),clearTimeout(this.pointsAnimatingTimer)}viewCart(){var n=this;return(0,p.Z)(function*(){const t=yield n.loadingCtrl.create({message:n.translate.instant("action.loadingCart")});yield t.present(),n.cartAPI.getCartData().then(s=>{n.cartEmpty="undefined"==s||null==s,null!=s?n.cartAPI.getEstoreCartData().then(u=>{n.storage.get("order").then(function(){var m=(0,p.Z)(function*(o){o.itemsRestaurant=[],o.itemsEStore=[],o.additionalInfo.ncd_options=yield n.storage.get("ncd_options"),o.additionalInfo.specialInstructions=yield n.storage.get("deliveryInstruction"),o.SOURCE=n.platform.is("desktop")||n.platform.is("mobileweb")?"WEB":"APP";const L=n.orderAPI.mapOrder(o,s,n.user,u);n.orderAPI.getOrderQuote(L).subscribe(a=>{if(500!=a.status){var P,M,k,T;n.storage.remove("order"),n.storage.remove("payment_methods"),n.storage.remove("alternate_payment"),n.storage.set("payment_methods",a.payment_methods).then(f=>{}),n.storage.set("alternate_payment",a.alternate_payment).then(f=>{}),o.infoOrder.additionalCharges=a.additionalCharges,o.infoOrder.additionalChargesCombinedWithTax=null==a?void 0:a.additionalChargesCombinedWithTax,o.infoOrder.additionalChargesCombinedWithFee=null==a?void 0:a.additionalChargesCombinedWithFee,o.infoOrder.additionalChargesDeliveryServiceDiscountFee=null!==(P=null!==(M=a.additionalChargesDeliveryServiceDiscountFee)&&void 0!==M?M:null===(k=a.infoOrder)||void 0===k?void 0:k.additionalChargesDeliveryServiceDiscountFee)&&void 0!==P?P:0,o.additionalChargesAsSeparateLineItems=null!==(T=a.additionalChargesAsSeparateLineItems)&&void 0!==T?T:[],o.additionalInfo=a.additionalInfo,o.infoOrder.deliveryFee=a.deliveryFee;const w=Array.isArray(a.infoRestaurant)?a.infoRestaurant:[];null!=w[0]&&(o.infoOrder.gapFeeAmount=w[0].GAPFEE,o.infoOrder.dealsApplied=w.flatMap(f=>{const S=(null==f?void 0:f.DEALSAPPLIED)||(null==f?void 0:f.dealsApplied);return Array.isArray(S)?S:[]})),o.infoOrder.customerCredit=a.customerCredit,o.infoOrder.driverTip=a.driverTip,a.driverTip>0&&(o.infoOrder.driverTipFormatted=a.driverTipFormatted),o.infoOrder.restaurantTakeoutTip=a.restaurantTakeoutTip,a.restaurantTakeoutTip>0&&(o.infoOrder.restaurantTakeoutTipFormatted=a.restaurantTakeoutTipFormatted),o.infoOrder.tipOption=a.inforDriverTip?a.inforDriverTip.SUGGESTED_LIST_OPTION:a.tipOption,o.infoOrder.restaurantDealsAmount=a.restaurantDealsAmount,o.infoOrder.rewardPointsEarned=a.rewardPointsEarned,o.infoOrder.subtotalOrder=
1a.subtotalOrder,o.infoOrder.subtotalOrderFormatted=a.subtotalOrderFormatted,o.infoOrder.totalTax=a.totalTax,o.infoOrder.totalOrder=a.totalOrder,o.infoOrder.totalOrderFormatted=a.totalOrderFormatted,o.infoDelivery.QUOTEDMINUTES=a.quotedMins,o.infoOrder.taxExempt=a.infoOrder.taxExempt,o.infoOrder.deliveryFeeExempt=a.infoOrder.deliveryFeeExempt,o.infoOrder.nonCashTransFeeExempt=a.infoOrder.nonCashTransFeeExempt,o.infoOrder.amountApplied=a.coupon.amountApplied,o.formattedItems=a.formattedItems,o.formattedEstoreItems=a.formattedEstoreItems,o.takeoutTime=a.takeoutTime,o.takeoutDTTM=a.takeoutDTTM,""==o.additionalInfo.ncd_options&&(o.additionalInfo.ncd_options="MEET_AT_DOOR"),t.dismiss(),n.presentCartModal(o,n.cartEmpty,"")}else t.dismiss()},a=>{t.dismiss()})});return function(o){return m.apply(this,arguments)}}())}):(t.dismiss(),n.presentAlertEmptyCart())})})()}presentAlertEmptyCart(){var n=this;return(0,p.Z)(function*(){yield(yield n.alertCtrl.create({header:n.translate.instant("emptyCart"),backdropDismiss:!1,message:"Choose a restaurant and start your order",buttons:[{text:"Go to restaurants!",handler:()=>{n.router.navigateByUrl("restaurants")}}]})).present()})()}presentCartModal(n,t,s){var u=this;return(0,p.Z)(function*(){const m=yield u.modalCtrl.create({component:y.CartModalPage,animated:!0});return m.componentProps={order:n,cartEmpty:t,lastPmt:s,modal:m},yield m.present()})()}goToRestaurants(){this.vendorService.IS_SINGLE_RESTAURANT?this.navigateToSingleRestaurant():this.navigateToAllRestaurants()}navigateToSingleRestaurant(){try{var n;const t=null===(n=this.vendorService.SINGLE_RESTAURANT_INFO)||void 0===n?void 0:n.RID;if(!t)return;this.router.navigate(["/restaurant",t])}catch(t){console.error("Error navigating to single restaurant:",t)}}navigateToAllRestaurants(){this.sharedService.viewAllRestCheck.emit(),this.orderAPI.newSettings.emit({routeChange:!this.isLandingPage}),this.sharedService.goToRestaurants()}checkRestaurantsLinkVisibility(){var n=this;return(0,p.Z)(function*(){var t;n.showRestaurantsLink="N"!=(null===(t=n.vendorService)||void 0===t?void 0:t.GLUE_VIEW_ALL_RESTAURANTS_LINK)||!!(yield n.storage.get("cached_address"))})()}goToLogin(n){var t=this;return(0,p.Z)(function*(){t.storage.set("redirect",n),t.presentLoginModal(!1)})()}getUserInfo(){var n=this;return(0,p.Z)(function*(){n.guestUserOnlyPhone=(yield n.storage.get("guestUserOnlyPhone"))||!1;const t=yield n.storage.get("token");n.storage.get("user").then(s=>
1{null!=s&&t&&0==n.guestUserOnlyPhone?(n.user=!0,n.userName=s.fname,n.userEmail=s.email,n.checkOrderHistory(),(s.email!==n.currentUserEmail||!n.pointsLoaded)&&(n.currentUserEmail=s.email,n.loadRewardPoints(s.email))):(n.user=!1,n.userName="",n.userEmail="",n.availablePoints=0,n.pointsLoaded=!1,n.currentUserEmail="")})})()}loadRewardPoints(n){n?(this.pointsSubscription&&this.pointsSubscription.unsubscribe(),this.pointsSubscription=this.rewardsService.getAvailablePoints(n).subscribe(t=>{console.log("MainHeader: Reward points API response:",t);let s=0;t&&"object"==typeof t&&(void 0!==t.available_points?s=t.available_points:t.message&&void 0!==t.message.available_points?s=t.message.available_points:t.data&&void 0!==t.data.available_points&&(s=t.data.available_points));const u=s||0;(u!==this.availablePoints||!this.pointsLoaded)&&(this.availablePoints=u,this.triggerPointsAnimation()),this.pointsLoaded=!0,console.log("MainHeader: Available points set to:",this.availablePoints)},t=>{console.error("MainHeader: Error loading reward points:",t),console.error("MainHeader: Error details:",JSON.stringify(t)),this.availablePoints=0,this.pointsLoaded=!0})):console.log("MainHeader: Cannot load reward points - no email provided")}triggerPointsAnimation(){clearTimeout(this.pointsAnimatingTimer),this.pointsAnimating=!1,setTimeout(()=>{this.pointsAnimating=!0,this.pointsAnimatingTimer=setTimeout(()=>{this.pointsAnimating=!1},6e3)},50)}refreshRewardPoints(){this.currentUserEmail&&(this.pointsLoaded=!1,this.loadRewardPoints(this.currentUserEmail))}goToOrderHistory(){var n=this;return(0,p.Z)(function*(){n.user?n.router.navigate(["order-history"],{queryParams:{reorder:"1"}}):yield n.goToLogin("/order-history")})()}goToMyAccount(){this.router.navigateByUrl(this.isMobileView?"/account":"profile")}goToRewardsMarketplace(){this.router.navigateByUrl("/rewards-marketplace")}changePage(n){const{url:t,isBeforeRedirect:s,childs:u}=n;u&&u.length>0||("search"==t?this.storage.get("order").then(m=>{null!=m&&m.infoDeliveryAddress.ADDRESS1?this.router.navigateByUrl(t):this.orderAPI.noAddress.emit()}):"/account"==t||"/contact"==t||"/profile"==t||"/order-history"==t?0==this.user?(this.storage.set("redirect",t),this.presentLoginModal(!0)):this.router.navigateByUrl(t):s?this.isMobileView?this.router.navigate(["/before-redirect",t]):""==t?window.open("https://www.google.com","_blank"):window.open(t,"_blank"):this.router.navigateByUrl(t))}presentLoginModal(n){var t=this;return(0,p.Z)(function*(){if(!t.sharedService.loginPopupOpen)return t.sharedService.loginPopupOpen=!0,yield(yield t.modalCtrl.create({component:O.b,animated:!0,componentProps:{showCreateBtn:n}})).present()})()}isImageRemote(n){return!(!n||0!=n.search("https"))}getLogoSizeClass(n){var t;return`${(null===(t=this.vendorService)||void 0===t?void 0:t.GLUE_LOGO_SIZE)||"medium"}-logo-${n?"mob":"web"}`}getLogoClasses(n){return{[this.getLogoSizeClass(n)]:!0,"remove-logo-background":"transparent"===this.logoBackground,"circular-filled":"circular_filled"===this.logoBackground}}getHeaderSizeClasses(){var n;const t=((null===(n=this.vendorService)||void 0===n?void 0:n.GLUE_LOGO_SIZE)||"medium").toLowerCase(),s="transparent"===this.logoBackground;return{"header-logo-transparent":s,"header-logo-small":s&&"small"===t,"header-logo-medium":s&&"medium"===t,"header-logo-large":s&&"large"===t}}getHeaderNgClasses(){return{"header-with-background":!this.isLandingPage,...this.getHeaderSizeClasses()}}}return(l=v).\u0275fac=function(n){return new(n||l)(e.Y36(_.v),e.Y36(C.gz),e.Y36(C.F0),e.Y36(d.IN),e.Y36(J.Ke),e.Y36(V.B),e.Y36(j.n),e.Y36(d.Br),e.Y36(Q.A),e.Y36(X.sK),e.Y36(d.t4),e.Y36($.N),e.Y36(d.HT),e.Y36(q.K),e.Y36(ee.D),e.Y36(d.Cb),e.Y36(te.p),e.Y36(ne.S),e.Y36(oe.T))},l.\u0275cmp=e.Xpm({type:l,selectors:[["app-main-header"]],inputs:{pageTitle:"pageTitle",hideBackButton:"hideBackButton",hasBrandLogo:"hasBrandLogo"},decls:15,vars:8,consts:[[1,"header",3,"ngClass"],["class","sd_log_mob",3,"ngClass","click",4,"ngIf"],["class","sd_log_web",3,"ngClass","click",4,"ngIf"],[1,"toolbar","ion-safe-area-top","desktop-links-container","no-shadow"],["slot","end","class","only-desktop",4,"ngIf"],["slot","end","class","only-desktop",3,"click",4,"ngIf"],["slot","end","class","only-desktop user-section",4,"ngIf"],["slot","end"],[1,"menu_toggle",3,"click"],[1,"hamburger"],[1,"hamburger-divider"],[1,"sd_log_mob",3,"ngClass","click"],["alt","Logo",3,"src","error"],[1,"sd_log_web",3,"ngClass","click"],["slot","end",1,"only-desktop"],[1,"text-button",3,"ngClass","click"],["interface","popover","selected-text","More","aria-label","External Links",1,"text-button",3,"ngClass","ionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"text-button","dropbtn",3,"ngClass","click"],["slot","end",1,"only-desktop",3,"click"],[1,"text-button",3,"ngClass"],["slot","end",1,"only-desktop","user-section"],[1,"text-button","name",3,"ngClass","click"],["class","rewards-points-badge",3,"click",4,"ngIf"],[1,"rewards-points-badge",3,"click"],["name","star"],[1,"points-value"]],template:function(n,t){1&n&&(e.TgZ(0,"div",0),e.YNc(1,ie,2,2,"div",1),e.YNc(2,re,2,2,"div",2),e.TgZ(3,"div",3),e.YNc(4,ae,3,4,"ion-buttons",4),e.YNc(5,le,3,4,"ion-buttons",4),e.YNc(6,de,3,4,"ion-buttons",4),e.YNc(7,ce,3,3,"ion-buttons",5),e.YNc(8,he,4,5,"ion-buttons",6),e.TgZ(9,"ion-buttons",7)(10,"ion-menu-button",8),e.NdJ("click",function(){return t.onMenuIconClick()}),e.TgZ(11,"div",9),e._UZ(12,"div",10)(13,"div",10)(14,"div",10),e.qZA()()()()()),2&n&&(e.Q6J("ngClass",t.getHeaderNgClasses()),e.xp6(1),e.Q6J("ngIf",t.isMobileView&&t.hasBrandLogo),e.xp6(1),e.Q6J("ngIf",!t.isMobileView&&t.hasBrandLogo),e.xp6(2),e.Q6J("ngIf",t.showRestaurantsLink),e.xp6(1),e.Q6J("ngIf",t.moreExter
1nalLinksCheck&&t.vendorService.externalLinksHeaderDisplayCount>1),e.xp6(1),e.Q6J("ngIf",t.singleExternalLinksCheck&&1==t.vendorService.externalLinksHeaderDisplayCount),e.xp6(1),e.Q6J("ngIf",!t.userName),e.xp6(1),e.Q6J("ngIf",t.userName))},dependencies:[A.mk,A.sg,A.O5,d.YG,d.Sm,d.gu,d.fG,d.t9,d.n0,d.QI],styles:['ion-content[_ngcontent-%COMP%], ion-toolbar[_ngcontent-%COMP%], ion-header[_ngcontent-%COMP%]{--background: #f2f2f2;background:#f2f2f2}.no-shadow[_ngcontent-%COMP%]{box-shadow:none!important}.header-with-background[_ngcontent-%COMP%]{z-index:99999;box-shadow:0 3px 8px #a6adc933;position:relative!important}.desktop-links-container[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;background-color:#fff}.header[_ngcontent-%COMP%]{background-color:#fff;display:flex;height:auto;position:absolute;top:0;width:100vw;padding-right:2rem}ion-select[_ngcontent-%COMP%]::part(placeholder), ion-select[_ngcontent-%COMP%]::part(text){font-size:16px}.sd_log_mob[_ngcontent-%COMP%]{position:absolute;z-index:1100000;margin-left:15px;margin-top:0;cursor:pointer;height:65px;width:65px;border-radius:50%;background-color:#f2f2f2;object-fit:contain;padding:10px;box-shadow:0 4px 3px -2px #00000040;justify-content:center;display:flex}.sd_log_mob[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;height:100%;width:auto}.sd_log_mob.remove-logo-background[_ngcontent-%COMP%]{top:50%;transform:translateY(-50%);justify-content:center;margin-top:0}.sd_log_mob[_ngcontent-%COMP%]:not(.remove-logo-background){background-color:var(--ion-color-secondary)}.sd_log_mob.circular-filled[_ngcontent-%COMP%]{background-color:var(--glue-logo-background-color, var(--ion-color-light));box-shadow:0 4px 8px #0003}.small-logo-mob[_ngcontent-%COMP%]{width:50px!important;height:50px!important}.medium-logo-mob[_ngcontent-%COMP%]{width:60px!important;height:60px!important}.large-logo-mob[_ngcontent-%COMP%]{width:70px!important;height:70px!important}.sd_log_web[_ngcontent-%COMP%]{position:absolute;top:.5rem;z-index:10000;margin-left:26px;cursor:pointer;box-shadow:0 4px 3px -2px #00000040;height:80px;width:80px;padding:10px;border-radius:50%;object-fit:contain;justify-content:center;display:flex}.sd_log_web[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;height:100%;width:auto;align-items:center}.sd_log_web.remove-logo-background[_ngcontent-%COMP%]{top:50%;transform:translateY(-50%);justify-content:center;margin-top:0}.sd_log_web[_ngcontent-%COMP%]:not(.remove-logo-background){background-color:var(--ion-color-secondary)}.sd_log_web.circular-filled[_ngcontent-%COMP%]{background-color:var(--glue-logo-background-color, var(--ion-color-light));box-shadow:0 4px 8px #0003}.small-logo-web[_ngcontent-%COMP%]{width:70px!important;height:70px!important}.medium-logo-web[_ngcontent-%COMP%]{width:90px!important;height:90px!important}.large-logo-web[_ngcontent-%COMP%]{width:110px!important;height:110px!important}.logo[_ngcontent-%COMP%]{padding:0 50px}.logo-container[_ngcontent-%COMP%]{cursor:pointer}.page-title[_ngcontent-%COMP%]{text-align:center;width:100%;font-size:16px;color:#000;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){.logo[_ngcontent-%COMP%]{padding:0 15px}.logo[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{height:50px}.logo[_ngcontent-%COMP%] div[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%}.page-title[_ngcontent-%COMP%]{display:none}}ion-back-button[_ngcontent-%COMP%]{background:black;border-radius:5px;height:34px;width:34px;padding:2px;display:block;color:#fff}.re-order-button[_ngcontent-%COMP%]{--color: white;--background: var(--ion-color-primary);width:125px;margin-right:13px}.text-button[_ngcontent-%COMP%]{--color: #242323;margin-right:10px}@media (max-width: 768px){.only-desktop[_ngcontent-%COMP%]{display:none}ion-header[_ngcontent-%COMP%]{padding:10px 16px}.google-partner-logo-container[_ngcontent-%COMP%]{margin-left:110px!important;min-width:25vw!important}}a[_ngcontent-%COMP%]{-webkit-text-decoration:auto;text-decoration:auto}.name[_ngcontent-%COMP%]{--color: var(--ion-color-secondary)}.user-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-right:10px}.rewards-points-badge[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:4px;background:var(--ion-color-secondary);padding:0 12px;
1height:36px;border-radius:6px;cursor:pointer;transition:all .3s ease;box-shadow:0 2px 8px #00000026;position:relative;overflow:hidden}.rewards-points-badge[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent);transition:left .5s ease}.rewards-points-badge[_ngcontent-%COMP%]:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 4px 16px #00000040}.rewards-points-badge[_ngcontent-%COMP%]:hover:before{left:100%}.rewards-points-badge[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:18px;color:gold;filter:drop-shadow(0 0 2px rgba(255,215,0,.5));margin:0;flex-shrink:0}.rewards-points-badge[_ngcontent-%COMP%] ion-icon.pulse-animate[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse 2s ease-in-out 3}.rewards-points-badge[_ngcontent-%COMP%] .points-value[_ngcontent-%COMP%]{font-size:14px;font-weight:700;color:#fff;line-height:1;text-shadow:0 1px 2px rgba(0,0,0,.3)}@keyframes _ngcontent-%COMP%_pulse{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}ion-header[_ngcontent-%COMP%]{box-shadow:0 11px 17px -4px #00000040;z-index:200}.icon-badge-container[_ngcontent-%COMP%]{position:relative}.icon-badge-icon[_ngcontent-%COMP%]{font-size:30px;position:relative}.icon-badge[_ngcontent-%COMP%]{background-color:red;font-size:12px;color:#fff;text-align:center;width:20px;height:20px;border-radius:35%;position:absolute;top:-5px;left:22px}.overlay[_ngcontent-%COMP%]{width:100%;height:100%}.overlay[_ngcontent-%COMP%], .header-menu[_ngcontent-%COMP%]{transition:opacity .2s linear,visibility .2s linear;position:absolute;right:0;top:80px;bottom:0;z-index:150;background:rgba(82,82,82,.32)}.header-menu[_ngcontent-%COMP%]{width:320px;background:#ffffff;z-index:150;padding:45px}.header-menu[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{padding:25px 70px}.hide-menu[_ngcontent-%COMP%]{opacity:0;visibility:hidden}.item[_ngcontent-%COMP%]{font-size:16px;cursor:pointer;padding-bottom:5px;border-bottom:1px solid #C0C0C0}.children[_ngcontent-%COMP%]{transition:height .4s}.child-item-menu[_ngcontent-%COMP%]{padding-left:20px;height:55px}.sticky[_ngcontent-%COMP%]{position:absolute}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus, a[_ngcontent-%COMP%]:active{text-decoration:none;color:inherit}.toolbar[_ngcontent-%COMP%]{padding:15px;box-shadow:0 4px 3px -2px #00000040}.google-partner-logo-container[_ngcontent-%COMP%]{margin-left:150px;display:flex;align-items:center;min-width:20vw;height:30px;align-self:center}.google-partner-logo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:100%}@media (min-width: 2560px){.menu_toggle[_ngcontent-%COMP%]{height:3rem}.desktop-links-container[_ngcontent-%COMP%]{margin-top:3vh;margin-right:5vw}.sd_log_web[_ngcontent-%COMP%]{margin-left:5vw;margin-top:3vh}.text-button[_ngcontent-%COMP%]{font-size:2.5rem!important;margin:0 2rem}.hamburger-divider[_ngcontent-%COMP%]{width:2rem;margin-top:.25rem}}.remove-logo-background[_ngcontent-%COMP%]{background-color:transparent!important;box-shadow:none!important;padding:.25rem;border-radius:0}.sd_log_web.remove-logo-background[_ngcontent-%COMP%]{width:auto!important;height:80px!important;padding:0!important}.small-logo-web.remove-logo-background[_ngcontent-%COMP%]{height:60px!important}.medium-logo-web.remove-logo-background[_ngcontent-%COMP%]{height:75px!important}.large-logo-web.remove-logo-background[_ngcontent-%COMP%]{height:100px!important}.sd_log_mob.remove-logo-background[_ngcontent-%COMP%]{width:auto!important;height:60px!important;padding:0!important}.small-logo-mob.remove-logo-background[_ngcontent-%COMP%]{height:25px!important}.medium-logo-mob.remove-logo-background[_ngcontent-%COMP%]{height:35px!important}.large-logo-mob.remove-logo-background[_ngcontent-%COMP%]{height:45px!important}.navigation-color[_ngcontent-%COMP%]{--color: var(--glue-header-link-color)}ion-select.navigation-color[_ngcontent-%COMP%]::part(placeholder), ion-select.navigation-color[_ngcontent-%COMP%]::part(text){color:var(--glue-header-link-color)!important}.header-logo-transparent[_ngcontent-%COMP%]{padding-top:.5rem}.header-logo-small.header-logo-transparent[_ngcontent-%COMP%]{min-height:70px}.header-logo-medium.header-logo-transparent[_ngcontent-%COMP%]{min-height:100px}.header-logo-large.header-logo-transparent[_ngcontent-%COMP%]{min-height:130px}@media (max-width: 768px){.header-logo-small.header-logo-transparent[_ngcontent-%COMP%]{min-height:56px}.header-logo-medium.header-logo-transparent[_ngcontent-%COMP%]{min-height:64px}.header-logo-large.header-logo-transparent[_ngcontent-%COMP%]{min-height:72px}.toolbar[_ngcontent-%COMP%]{padding:10px}}']}
1),v})()},63947:(z,R,c)=>{c.d(R,{S:()=>C});var p=c(92135),y=c(5830);let C=(()=>{var O;class E extends y.s{constructor(){super(...arguments),this.pointsUpdated=new p.vpe,this.itemRedeemed=new p.vpe}getAvailablePoints(g,e){let _=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/reward-points`;return e&&(_+=`?auid=${e}`),this.get(_)}getMarketplaceItems(g,e){let _=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/rewards`;if(e){const d=[];e.search&&d.push(`search=${encodeURIComponent(e.search)}`),e.amount_filter&&d.push(`amount_filter=${e.amount_filter}`),e.sort&&d.push(`sort=${e.sort}`),void 0!==e.redeemable&&d.push(`redeemable=${e.redeemable}`),e.auid&&d.push(`auid=${e.auid}`),d.length>0&&(_+=`?${d.join("&")}`)}return this.get(_)}getItemDetails(g,e,_){let d=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/rewards/items/${e}`;return _&&(d+=`?auid=${_}`),this.get(d)}redeemItem(g,e,_){const d=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/rewards/${e}/redeem`;return this.post(d,_)}getRewardsHistory(g,e){let _=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/reward-history`;if(e){const d=[];e.page&&d.push(`page=${e.page}`),e.auid&&d.push(`auid=${e.auid}`),d.length>0&&(_+=`?${d.join("&")}`)}return this.get(_)}getPurchaseDetails(g,e){const _=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/reward-history/${e}`;return this.get(_)}resendGiftCardEmail(g,e){const _=`${this.config.api_baseurl_v2}/users/${encodeURIComponent(g)}/reward-history/${e}/resend-email`;return this.post(_,{})}}return(O=E).\u0275fac=function(){let b;return function(e){return(b||(b=p.n5z(O)))(e||O)}}(),O.\u0275prov=p.Yz7({token:O,factory:O.\u0275fac,providedIn:"root"}),E})()}}]); 2//# chunkId=01a062e9-c6ee-7f22-9ea5-d0b4ef5ffbfc
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.