1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[876],{8876:(Ht,S,p)=>{p.r(S),p.d(S,{StoreModule:()=>Vt});var c=p(177),g=p(9417),d=p(7316),t=p(7019),f=p(3628),D=p(4114);function I(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",18)(1,"ul",4)(2,"li",5)(3,"a",6),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.getStoreList("nearby"))}),t.EFF(4,"Nearby"),t.k0s()(),t.j41(5,"li",5)(6,"a",7),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.getStoreList("favorites"))}),t.EFF(7,"Favourites"),t.k0s()(),t.j41(8,"li",5)(9,"a",7),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.getStoreList("recents"))}),t.EFF(10,"Recents"),t.k0s()()()()}}function k(s,n){1&s&&t.nrm(0,"img",28)}function y(s,n){if(1&s&&t.nrm(0,"img",29),2&s){const e=t.XpG().$implicit;t.FS9("src",e.logo,t.B4B)}}const C=function(s,n){return{Green:s,Red:n}};function F(s,n){if(1&s&&(t.j41(0,"p",30),t.EFF(1),t.k0s()),2&s){const e=n.ngIf;t.Y8G("ngClass",t.l_i(2,C,"Open"===e,"Closed"===e)),t.R7$(1),t.SpI(" ",e," ")}}function b(s,n){if(1&s&&(t.j41(0,"p",31),t.EFF(1),t.k0s()),2&s){const e=t.XpG().$implicit;t.R7$(1),t.SpI("\u20a6 ",e.deliveryFee," ")}}function T(s,n){if(1&s){const e=t.RV6();t.j41(0,"button",32),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,a=t.XpG(2);return t.Njj(a.addFavorites(i))}),t.nrm(1,"img",33),t.k0s()}}function R(s,n){if(1&s){const e=t.RV6();t.j41(0,"button",32),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,a=t.XpG(2);return t.Njj(a.addFavorites(i))}),t.nrm(1,"img",34),t.k0s()}}function j(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",21)(1,"article",17),t.bIt("click",function(){const a=t.eBV(e).$implicit,r=t.XpG
1(2);return t.Njj(r.storeDetails(a))}),t.j41(2,"figure"),t.DNE(3,k,1,0,"img",22),t.DNE(4,y,1,1,"img",23),t.k0s(),t.j41(5,"figcaption")(6,"h4"),t.EFF(7),t.k0s(),t.j41(8,"h6"),t.nrm(9,"img",24),t.j41(10,"span"),t.EFF(11),t.k0s(),t.j41(12,"strong"),t.EFF(13),t.nI1(14,"number"),t.k0s()(),t.DNE(15,F,2,5,"p",25),t.DNE(16,b,2,1,"p",26),t.j41(17,"a"),t.EFF(18,"View store details"),t.k0s()(),t.DNE(19,T,2,0,"button",27),t.DNE(20,R,2,0,"button",27),t.k0s()()}if(2&s){const e=n.$implicit,o=t.XpG(2);t.R7$(3),t.Y8G("ngIf",""==e.logo),t.R7$(1),t.Y8G("ngIf",e.logo),t.R7$(3),t.JRh(e.storeName),t.R7$(4),t.JRh(e.avgRating),t.R7$(2),t.SpI("",t.i5U(14,9,e.distanceInKm,"1.2-2")," Km"),t.R7$(2),t.Y8G("ngIf",o.storeAvailability(e)),t.R7$(1),t.Y8G("ngIf","open"==e.storeStatus&&"delivery"==o.storeType),t.R7$(3),t.Y8G("ngIf",0==e.isFav),t.R7$(1),t.Y8G("ngIf",1==e.isFav)}}function G(s,n){if(1&s&&(t.j41(0,"div",19),t.DNE(1,j,21,12,"div",20),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",e.storeListData)}}function E(s,n){1&s&&(t.j41(0,"div",35)(1,"p"),t.EFF(2,"No Store are marked as Favourite"),t.k0s()())}const A=function(){return["/stores"]};function X(s,n){if(1&s&&t.nrm(0,"img",16),2&s){const e=t.XpG();t.FS9("src",null==e.storeData?null:e.storeData.image,t.B4B)}}function B(s,n){1&s&&t.nrm(0,"img",17)}function M(s,n){if(1&s&&t.nrm(0,"img",16),2&s){const e=t.XpG();t.FS9("src",null==e.storeData?null:e.storeData.logo,t.B4B)}}const x=function(s,n){return{Green:s,Red:n}};function w(s,n){if(1&s&&(t.j41(0,"p",18),t.EFF(1),t.k0s()),2&s){const e=n.ngIf;t.Y8G("ngClass",t.l_i(2,x,"Open"===e,"Closed"===e)),t.R7$(1),t.SpI(" ",e," ")}}function O(s,n){if(1&s&&(t.j41(0,"p",19),t.EFF(1),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.SpI(" \u20a6 ",null==e.storeData?null:e.storeData.deliveryFee," ")}}function Y(s,n){if(1&s){const e=t.RV6();t.j41(0,"button",20),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.addFavorites(i.storeData))}),t.nrm(1,"img",21),t.k0s()}}function U(s,n){if(1&s){const e=t.RV6();t.j41(0,"button",20),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.addFavorites(i.storeData))}),t.nrm(1,"img",22),t.k0s()}}function P(s,n){1&s&&(t.j41(0,"span",26),t.EFF(1," Open Now "),t.k0s())}function V(s,n){1&s&&(t.j41(0,"span",27),t.EFF(1," Closed Now "),t.k0s())}function H(s,n){if(1&s&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&s){const e=t.XpG().$implicit;t.R7$(1),t.Lme("",e.startTime," - ",e.endTime," ")}}function Q(s,n){1&s&&(t.j41(0,"span"),t.EFF(1,"Closed"),t.k0s())}function W(s,n){if(1&s&&(t.j41(0,"li")(1,"label"),t.EFF(2),t.DNE(3,P,2,0,"span",24),t.DNE(4,V,2,0,"span",25),t.k0s(),t.DNE(5,H,2,2,"span",14),t.DNE(6,Q,2,0,"span",14),t.k0s()),2&s){const e=n.$implicit,o=t.XpG(2);t.R7$(2),t.SpI(" ",e.dayName," "),t.R7$(1),t.Y8G("ngIf",o.today===e.day&&o.isOpenNow(e.startTime,e.endTime)),t.R7$(1),t.Y8G("ngIf",o.today===e.day&&!o.isOpenNow(e.startTime,e.endTime)),t.R7$(1),t.Y8G("ngIf",!1!==e.isAvaiable),t.R7$(1),t.Y8G("ngIf",!1===e.isAvaiable)}}function J(s,n){if(1&s&&(t.j41(0,"ol"),t.DNE(1,W,7,5,"li",23),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",null==e.storeData?null:e.storeData.openingHours)}}function Z(s,n){1&s&&(t.j41(0,"span",26),t.EFF(1," Open Now "),t.k0s())}function q(s,n){1&s&&(t.j41(0,"span",27),t.EFF(1," Closed Now "),t.k0s())}function z(s,n){if(1&s&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&s){const e=t.XpG().$implicit;t.R7$(1),t.Lme("",e.startTime," - ",e.endTime," ")}}function K(s,n){1&s&&(t.j41(0,"span"),t.EFF(1,"Closed"),t.k0s())}function tt(s,n){if(1&s&&(t.j41(0,"li")(1,"label"),t.EFF(2),t.DNE(3,Z,2,0,"span",24),t.DNE(4,q,2,0,"span",25),t.k0s(),t.DNE(5,z,2,2,"span",14),t.DNE(6,K,2,0,"span",14),t.k0s()),2&s){const e=n.$implicit,o=t.XpG(2);t.R7$(2),t.SpI(" ",e.dayName," "),t.R7$(1),t.Y8G("ngIf",o.today===e.day&&o.isOpenNow(e.startTime,e.endTime)),t.R7$(1),t.Y8G("ngIf",o.today===e.day&&!o.isOpenNow(e.startTime,e.endTime)),t.R7$(1),t.Y8G("ngIf",!1!==e.isAvaiable),t.R7$(1),t.Y8G("ngIf",!1===e.isAvaiable)}}function et(s,n){if(1&s&&(t.j41(0,"ol"),t.DNE(1,tt,7,5,"li",23),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",null==e.storeData?null:e.storeData.openingHours)}}
1function st(s,n){if(1&s&&t.nrm(0,"img",19),2&s){const e=t.XpG();t.FS9("src",null==e.storeData?null:e.storeData.image,t.B4B)}}function ot(s,n){1&s&&t.nrm(0,"img",20)}function at(s,n){if(1&s&&t.nrm(0,"img",19),2&s){const e=t.XpG();t.FS9("src",null==e.storeData?null:e.storeData.logo,t.B4B)}}function nt(s,n){1&s&&(t.j41(0,"p",21),t.EFF(1,"Open Now"),t.k0s())}function rt(s,n){1&s&&(t.j41(0,"p",22),t.EFF(1,"Closes"),t.k0s())}function lt(s,n){if(1&s&&(t.j41(0,"p",21),t.EFF(1),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.SpI("\u20a6 ",null==e.storeData?null:e.storeData.deliveryFee,"")}}function ct(s,n){if(1&s){const e=t.RV6();t.j41(0,"button",23),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.addFavorites(i.storeData))}),t.nrm(1,"img",24),t.k0s()}}function dt(s,n){if(1&s){const e=t.RV6();t.j41(0,"button",23),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.addFavorites(i.storeData))}),t.nrm(1,"img",25),t.k0s()}}const ut=function(s){return{active:s}};function mt(s,n){if(1&s){const e=t.RV6();t.j41(0,"li")(1,"button",26),t.bIt("click",function(){const a=t.eBV(e).$implicit,r=t.XpG
1();return t.Njj(r.categoryMenu(a))})("click",function(){const a=t.eBV(e).index,r=t.XpG();return t.Njj(r.setActive(a))}),t.EFF(2),t.k0s()()}if(2&s){const e=n.$implicit,o=n.index,i=t.XpG();t.R7$(1),t.Y8G("ngClass",t.eq3(2,ut,i.categoryActiveIndex===o)),t.R7$(1),t.JRh(e.name)}}function pt(s,n){if(1&s){const e=t.RV6();t.j41(0,"aside")(1,"button",28),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,a=t.XpG();return t.Njj(a.productDetails(i))}),t.nrm(2,"img",30),t.k0s()()}}function _t(s,n){if(1&s){const e=t.RV6();t.j41(0,"aside")(1,"button",31),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,a=t.XpG();return t.Njj(a.quantity("Decrease",i))}),t.nrm(2,"img",32),t.k0s(),t.j41(3,"span"),t.EFF(4),t.k0s(),t.j41(5,"button",31),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,a=t.XpG();return t.Njj(a.quantity("Increase",i))}),t.nrm(6,"img",33),t.k0s()()}if(2&s){const e=t.XpG().$implicit;t.R7$(4),t.SpI(" ",null==e?null:e.cartQuantity," ")}}function gt(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",27)(1,"article",28),t.bIt("click",function(){const a=t.eBV(e).$implicit,r=t.XpG
1();return t.Njj(r.productDetails(a))}),t.j41(2,"span",29),t.nrm(3,"img",19),t.k0s(),t.j41(4,"h4"),t.EFF(5),t.k0s(),t.j41(6,"p")(7,"strong"),t.EFF(8),t.k0s()()(),t.DNE(9,pt,3,0,"aside",17),t.DNE(10,_t,7,1,"aside",17),t.k0s()}if(2&s){const e=n.$implicit;t.R7$(3),t.FS9("src",e.image,t.B4B),t.R7$(2),t.JRh(e.menuName),t.R7$(3),t.SpI("\u20a6 ",e.price,""),t.R7$(1),t.Y8G("ngIf",0==e.cartQuantity),t.R7$(1),t.Y8G("ngIf",e.cartQuantity>0)}}function ht(s,n){if(1&s&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.JRh(null==e.getCartItemData||null==e.getCartItemData.cartData?null:e.getCartItemData.cartData.length)}}function ft(s,n){1&s&&(t.j41(0,"div",34),t.nrm(1,"span",35),t.j41(2,"p"),t.EFF(3,"Please wait..."),t.k0s()())}function vt(s,n){1&s&&(t.j41(0,"div",23),t.nrm(1,"span",24),t.j41(2,"p"),t.EFF(3,"Please wait..."),t.k0s()())}function St(s,n){if(1&s&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&s){const e=t.XpG().$implicit;t.R7$(1),t.SpI("Select only ",e.minSelection,"")}}function It(s,n){if(1&s&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&s){const e=t.XpG().$implicit;t.R7$(1),t.SpI("Choose ",e.quantity,"")}}function kt(s,n){if(1&s){const e=t.RV6();t.j41(0,"aside")(1,"button",33),t.bIt("click",function(){t.eBV(e);
1const i=t.XpG().$implicit,a=t.XpG().$implicit,r=t.XpG(2);return t.Njj(r.selectChoice(a,i))}),t.nrm(2,"img",34),t.k0s()()}}function yt(s,n){if(1&s){const e=t.RV6();t.j41(0,"aside")(1,"button",33),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2).$implicit,a=t.XpG().$implicit,r=t.XpG(2);return t.Njj(r.decreaseChoice(a,i))}),t.nrm(2,"img",35),t.k0s(),t.j41(3,"span"),t.EFF(4),t.k0s(),t.j41(5,"button",33),t.bIt("click",function(){t.eBV(e);const i=t.XpG(2).$implicit,a=t.XpG().$implicit,r=t.XpG(2);return t.Njj(r.increaseChoice(a,i))}),t.nrm(6,"img",34),t.k0s()()}if(2&s){const e=t.XpG(2).$implicit;t.R7$(4),t.JRh(e.cartQuantity||0)}}function Ct(s,n){if(1&s&&t.DNE(0,yt,7,1,"aside",30),2&s){t.XpG();const e=t.sdS(13),o=t.XpG().$implicit;t.Y8G("ngIf",o.quantity>1&&o.groupCartQuantity>0)("ngIfElse",e)}}function Ft(s,n){if(1&s){const e=t.RV6();t.j41(0,"aside")(1,"label",36)(2,"input",37),t.bIt("change",function(){t.eBV(e);const i=t.XpG().$implicit,a=t.XpG().$implicit,r=t.XpG(2);return t.Njj(r.selectChoice(a,i))}),t.k0s(),t.nrm(3,"span",38),t.k0s()()}if(2&s){const e=t.XpG().$implicit,o=t.XpG().index;t.R7$(2),t.Mz_("name","choices",o,""),t.Y8G("checked",e.isSelect)}}function bt(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",28)(1,"article",13),t.bIt("click",function(){const a=t.eBV(e).$implicit,r=t.XpG
1(3);return t.Njj(r.showModifier(a))}),t.j41(2,"span",29),t.nrm(3,"img",7),t.k0s(),t.j41(4,"h4"),t.EFF(5),t.k0s(),t.j41(6,"p")(7,"strong"),t.EFF(8),t.k0s()()(),t.DNE(9,kt,3,0,"aside",30),t.DNE(10,Ct,1,2,"ng-template",null,31,t.C5r),t.DNE(12,Ft,4,2,"ng-template",null,32,t.C5r),t.k0s()}if(2&s){const e=n.$implicit,o=t.sdS(11),i=t.XpG().$implicit;t.R7$(3),t.FS9("src",e.image,t.B4B),t.R7$(2),t.JRh(e.name),t.R7$(3),t.SpI("\u20a6 ",e.price,""),t.R7$(1),t.Y8G("ngIf",i.quantity>1&&(!e.cartQuantity||0===e.cartQuantity))("ngIfElse",o)}}function Tt(s,n){if(1&s&&(t.j41(0,"div",25)(1,"h4",26),t.EFF(2),t.DNE(3,St,2,1,"span",8),t.DNE(4,It,2,1,"span",8),t.k0s(),t.DNE(5,bt,14,5,"div",27),t.k0s()),2&s){const e=n.$implicit;t.R7$(2),t.SpI(" ",e.categoryName," "),t.R7$(1),t.Y8G("ngIf",e.maxSelection>1),t.R7$(1),t.Y8G("ngIf",1==e.maxSelection),t.R7$(1),t.Y8G("ngForOf",null==e?null:e.allowedItems)}}function Rt(s,n){if(1&s&&(t.j41(0,"div"),t.DNE(1,Tt,6,4,"div",15),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",null==e.getItemDetailsData?null:e.getItemDetailsData.modifierComboGroups)}}function $t(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",28)(1,"article")(2,"span",29),t.nrm(3,"img",7),t.k0s(),t.j41(4,"h4"),t.EFF(5),t.k0s(),t.j41(6,"p")(7,"strong"),t.EFF(8),t.k0s()()(),t.j41(9,"aside")(10,"label",36)(11,"input",39),t.bIt("change",function(){const a=t.eBV(e).$implicit,r=t.XpG
1().$implicit,l=t.XpG(2);return t.Njj(l.selectModifiers(r,a))}),t.k0s(),t.nrm(12,"span",38),t.k0s()()()}if(2&s){const e=n.$implicit,o=t.XpG().index;t.R7$(3),t.FS9("src",e.image,t.B4B),t.R7$(2),t.JRh(e.name),t.R7$(3),t.SpI("\u20a6 ",e.price,""),t.R7$(3),t.Mz_("name","choices",o,""),t.Y8G("checked",e.isSelect)}}function jt(s,n){if(1&s&&(t.j41(0,"div",25)(1,"h4",26),t.EFF(2),t.k0s(),t.DNE(3,$t,13,5,"div",27),t.k0s()),2&s){const e=n.$implicit;t.R7$(2),t.SpI("",e.name," "),t.R7$(1),t.Y8G("ngForOf",null==e?null:e.modifierItems)}}function Gt(s,n){if(1&s&&(t.j41(0,"div"),t.DNE(1,jt,4,2,"div",15),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",null==e.getItemDetailsData?null:e.getItemDetailsData.newModifiers)}}function Et(s,n){if(1&s){const e=t.RV6();t.j41(0,"div",28)(1,"article")(2,"span",29),t.nrm(3,"img",7),t.k0s(),t.j41(4,"h4"),t.EFF(5),t.k0s(),t.j41(6,"p")(7,"strong"),t.EFF(8),t.k0s()()(),t.j41(9,"aside")(10,"label",36)(11,"input",39),t.bIt("change",function(){const a=t.eBV(e).$implicit,r=t.XpG().$implicit,l=t.XpG();return t.Njj(l.selectModifiers(r,a))}),t.k0s(),t.nrm(12,"span",38),t.k0s()()()}if(2&s){const e=n.$implicit,o=n.index;t.R7$(3),t.FS9("src",e.image,t.B4B),t.R7$(2),t.JRh(e.name),t.R7$(3),t.SpI("\u20a6 ",e.price,""),t.R7$(3),t.Mz_("name","choices",o,""),t.Y8G("checked",e.isSelect)}}function Lt(s,n){if(1&s&&(t.j41(0,"div",25)(1,"h4",26),t.EFF(2),t.k0s(),t.DNE(3,Et,13,5,"div",27),t.k0s()),2&s){const e=n.$implicit;t.R7$(2),t.SpI(" ",e.name," "),t.R7$(1),t.Y8G("ngForOf",null==e?null:e.modifierItems)}}function Nt(s,n){1&s&&t.nrm(0,"img",13)}function Xt(s,n){if(1&s&&t.nrm(0,"img",14),2&s){const e=t.XpG().$implicit;t.FS9("src",e.image,t.B4B)}}const Bt=function(s,n){return{Green:s,Red:n}};function Mt(s,n){if(1&s&&(t.j41(0,"p",15),t.EFF(1),t.k0s()),2&s){const e=n.ngIf;t.Y8G("ngClass",t.l_i(2,Bt,"Open"===e,"Closed"===e)),t.R7$(1),t.SpI(" ",e," ")}}function xt(s,n){if(1&s&&(t.j41(0,"p",16),t.EFF(1),t.k0s()),2&s){const e=t.XpG().$implicit;t.R7$(1),t.SpI("\u20a6 ",e.deliveryFee," ")}}function wt(s,n){if(1&s&&(t.j41(0,"div",7)(1,"article")(2,"figure"),t.DNE(3,Nt,1,0,"img",8),t.DNE(4,Xt,1,1,"img",9),t.k0s(),t.j41(5,"figcaption")(6,"h4"),t.EFF(7),t.k0s(),t.j41(8,"h6"),t.nrm(9,"img",10),t.j41(10,"span"),t.EFF(11),t.k0s(),t.j41(12,"strong"),t.EFF(13),t.nI1(14,"number"),t.k0s()(),t.DNE(15,Mt,2,5,"p",11),t.DNE(16,xt,2,1,"p",12),t.k0s()()()),2&s){const e=n.$implicit,o=t.XpG(2);t.R7$(3),t.Y8G("ngIf",""==e.image),t.R7$(1),t.Y8G("ngIf",e.image),t.R7$(3),t.JRh(e.storeName),t.R7$(4),t.JRh(e.avgRating),t.R7$(2),t.SpI("",t.i5U(14,7,e.distanceInKm,"1.2-2")," Km"),t.R7$(2),t.Y8G("ngIf",o.storeAvailability(e)),t.R7$(1),t.Y8G("ngIf","open"==e.storeStatus&&"delivery"==o.storeType)}}function Ot(s,n){if(1&s&&(t.j41(0,"div",5),t.DNE(1,wt,17,10,"div",6),t.k0s()),2&s){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",e.storeListData)}}function Yt(s,n){1&s&&(t.j41(0,"div",17)(1,"p"),t.EFF(2,"No Store Found"),t.k0s()())}const Ut=[{path:"",component:(()=>{class s{constructor(e,o,i,a,r,l){this.appProvider=e,this._location=o,this.route=i,this.service=a,this.activeRoute=r,this.fb=l,this.storeType="pickup",this.searchText=""}ngOnInit(){console.log("this.currentLong ",this.currentLong,this.currentLat),this.storeFindByLocation()}storeFindByLocation(){this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.CheckoutData=localStorage.getItem("CheckoutData"),this.CheckoutData=JSON.parse(this.CheckoutData),console.log("CheckoutData",this.CheckoutData),this.dummyAddressData=localStorage.getItem("address"),this.dummyAddressData=JSON.parse(this.dummyAddressData),this.dummyAddressData?(this.currentLong=this.dummyAddressData.longitude,this.currentLat=this.dummyAddressData.latitude,this.getStoreList("nearby"),console.log("this.currentLong 111111111111",this.currentLong,this.currentLat)):this.service.getPosition().then(e=>{this.currentLong=e.lng,this.currentLat=e.lat,this.getStoreList("nearby"),console.log("this.currentLong 2222222222 ",this.currentLong,this.currentLat)}).catch(e=>{console.log("errrrrr",e),$("#LocationModal").modal("show")})}
1getStoreType(e){this.storeType=e,"delivery"==e?this.getStoreList("delivery"):"pickup"==e&&this.getStoreList("nearby")}getStoreList(e){this.service.postApiWithAuth("user/getAllRestaurantsData",{longitude:this.currentLong,latitude:this.currentLat,timezone:this.timeZone,type:e,search:""},1).subscribe({next:i=>{200==i.status&&(this.storeListData=i.data),404==i.status&&(this.storeListData=[])},error:i=>{}})}storeAvailability(e){const o=e.openingHours.find(v=>!0===v.isToday);if(!o)return"Schedule unavailable";const i=new Date,[a,r]=o.startTime.split(":").map(Number),[l,u]=o.endTime.split(":").map(Number),m=new Date;m.setHours(a,r,0,0);const _=new Date;return _.setHours(l,u,0,0),e.busyMode?"Closed":i>=m&&i<=_?"Open":"Closed"}addFavorites(e){this.service.postApiWithAuth("user/addToFavourite",{restaurantId:e._id},1).subscribe({next:i=>{200==i.status?(this.service.success(i.message),this.getStoreList(this.storeType)):this.service.err(i.message)},error:i=>{}})}storeDetails(e){this.CheckoutData?.deliveryType!==this.storeType&&this.clearCart(),localStorage.setItem("CheckoutData",JSON.stringify({deliveryType:this.storeType,storeId:e._id,storeName:e.storeName,distance:e.distanceInKm})),this.route.navigate(["/stores/details"])}clearCart(){this.service.getApiWithAuth("user/clearCart").subscribe({next:e=>{200==e.status?sessionStorage.clear():this.service.err(e.message)},error:e=>{console.log({error:e})}})}allowLocation(){navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{console.log("Latitude:",e.coords.latitude,"Longitude:",e.coords.longitude),$("#LocationModal").modal("hide")},e=>{console.error("Error getting location:",e),$("#LocationModal").modal("hide"),setTimeout(()=>{$("#LocationModal").modal("show")},1e3)}):alert("Geolocation is not supported by this browser.")}denyLocation(){$("#LocationModal").modal("hide"),this.route.navigate(["/login"])}static{this.\u0275fac=function(o){return new(o||s)(t.rXU(f.D),t.rXU(c.aZ),t.rXU(d.Ix),t.rXU(D.d),t.rXU(d.nX),t.rXU(g.ok))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-store-list"]],decls:37,vars:3,consts:[[1,"StoreListArea"],[1,"container"],[1,"TitleBox"],[1,"StoreHead"],[1,"nav","nav-tabs"],[1,"nav-item"],["data-toggle","tab",1,"nav-link","active",3,"click"],["data-toggle","tab",1,"nav-link",3,"click"],["class","StoreBody",4,"ngIf"],["class","StoreFooter",4,"ngIf"],["class","NotFound StoreFooter",4,"ngIf"],[1,"ModalBox"],["id","LocationModal",1,"modal","fade","smallModal"],[1,"modal-dialog"],[1,"modal-content"],[1,"modal-body"],[1,"LocationBox"],[3,"click"],[1,"StoreBody"],[1,"StoreFooter"],["class","StoreBox",4,"ngFor","ngForOf"],[1,"StoreBox"],["src","assets/images/Store.png",4,"ngIf"],[3,"src",4,"ngIf"],["src","assets/images/Star.png"],[3,"ngClass",4,"ngIf"],["class","Green",4,"ngIf"],["class","Wishlist",3,"click",4,"ngIf"],["src","assets/images/Store.png"],[3,"src"],[3,"ngClass"],[1,"Green"],[1,"Wishlist",3,"click"],["src","assets/images/Heart.png"],["src","assets/images/Heart-Red.png"],[1,"NotFound","StoreFooter"]],template:function(o,i){1&o&&(t.j41(0,"section")(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",1)(5,"h3"),t.EFF(6,"All Stores"),t.k0s()()(),t.j41(7,"div",3)(8,"ul",4)(9,"li",5)(10,"a",6),t.bIt("click",function(){return i.getStoreType("pickup")}),t.EFF(11,"Pickup"),t.k0s()(),t.j41(12,"li",5)(13,"a",7),t.bIt("click",function(){return i.getStoreType("delivery")}),t.EFF(14,"Delivery"),t.k0s()()()(),t.DNE(15,I,11,0,"div",8),t.DNE(16,G,2,1,"div",9),t.DNE(17,E,3,0,"div",10),t.k0s()()(),t.j41(18,"div",11)(19,"div",12)(20,"div",13)(21,"div",14)(22,"div",15)(23,"div",16)(24,"h3"),t.EFF(25,"Enable Location Services"),t.k0s(),t.j41(26,"p"),t.EFF(27,"Burger King need access to your location to "),t.nrm(28,"br"),t.EFF(29," enhance your experience. Allow access to "),t.nrm(30,"br"),t.EFF(31," get personalized store. "),t.k0s(),t.j41(32,"aside")(33,"button",17),t.bIt("click",function(){return i.allowLocation()}),t.EFF(34,"Allow"),t.k0s(),t.j41(35,"button",17),t.bIt("click",function(){return i.denyLocation()}
1),t.EFF(36,"Deny"),t.k0s()()()()()()()()),2&o&&(t.R7$(15),t.Y8G("ngIf","pickup"==i.storeType),t.R7$(1),t.Y8G("ngIf",(null==i.storeListData?null:i.storeListData.length)>0),t.R7$(1),t.Y8G("ngIf",0==(null==i.storeListData?null:i.storeListData.length)&&"pickup"==i.storeType))},dependencies:[c.YU,c.Sq,c.bT,c.QX]})}}return s})()},{path:"map",component:(()=>{class s{constructor(e,o,i,a,r,l){this.appProvider=e,this._location=o,this.route=i,this.service=a,this.activeRoute=r,this.fb=l,this.stroeType="pickup",this.storeSelected=[],this.center={lat:9.072264,lng:7.491302},this.markerPosition={lat:9.072264,lng:7.491302},this.zoom=15}ngOnInit(){this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.dummyAddressData=localStorage.getItem("address"),this.dummyAddressData=JSON.parse(this.dummyAddressData),this.dummyAddressData?(this.currentLong=this.dummyAddressData.longitude,this.currentLat=this.dummyAddressData.latitude,this.getStoreList(this.stroeType)):this.service.getPosition().then(e=>{this.currentLong=e.lng,this.currentLat=e.lat,this.center={lat:this.currentLat,lng:this.currentLong},this.getStoreList(this.stroeType)})}getStoreList(e){this.stroeType=e,this.service.postApiWithAuth("user/getAllRestaurantsData",{longitude:this.currentLong,latitude:this.currentLat,timezone:this.timeZone,type:this.stroeType},1).subscribe({next:i=>{if(200==i.status){this.storeListData=i.data;for(var a=0;a<this.storeListData.length;a++)parseFloat(this.storeListData[a].latitude),parseFloat(this.storeListData[a].longitude)}},error:i=>{}})}showInfo(e){this.storeSelected=e}addFavorites(e){this.service.postApiWithAuth("user/addToFavourite",{restaurantId:e._id},1).subscribe({next:i=>{200==i.status?(this.service.success(i.message),this.getStoreList(this.stroeType)):this.service.err(i.message)},error:i=>{}})}storeDetails(e){localStorage.setItem("CheckoutData",JSON.stringify({deliveryType:this.stroeType,storeId:e._id,distance:e.distanceInKm,menu:[]})),this.route.navigate(["/store/details"])}static{this.\u0275fac=function(o){return new(o||s)(t.rXU(f.D),t.rXU(c.aZ),t.rXU(d.Ix),t.rXU(D.d),t.rXU(d.nX),t.rXU(g.ok))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-store-map"]],decls:9,vars:2,consts:[[1,"StoreListArea",2,"padding-bottom","0"],[1,"TitleBox"],[1,"container"],[3,"routerLink"],["src","assets/images/List.png"]],template:function(o,i){1&o&&(t.j41(0,"section")(1,"div",0)(2,"div",1)(3,"div",2)(4,"a",3),t.nrm(5,"img",4),t.EFF(6," List"),t.k0s(),t.j41(7,"h3"),t.EFF(8,"All Stores"),t.k0s()()()()()),2&o&&(t.R
17$(4),t.Y8G("routerLink",t.lJ4(1,A)))},dependencies:[d.Wk]})}}return s})()},{path:"details",component:(()=>{class s{getCurrentTime(){return(new Date).toTimeString().slice(0,5)}isOpenNow(e,o){return this.currentTime>=e&&this.currentTime<=o}constructor(e,o,i,a,r,l){this.appProvider=e,this._location=o,this.route=i,this.service=a,this.activeRoute=r,this.fb=l,this.today=(new Date).toLocaleDateString("en-US",{weekday:"long"}),this.currentTime=this.getCurrentTime(),this.pickupHours=!1,this.deliveryHours=!1,this.allDays=[{dayOfWeek:1,dayName:"Monday"},{dayOfWeek:2,dayName:"Tuesday"},{dayOfWeek:3,dayName:"Wednesday"},{dayOfWeek:4,dayName:"Thursday"},{dayOfWeek:5,dayName:"Friday"},{dayOfWeek:6,dayName:"Saturday"},{dayOfWeek:7,dayName:"Sunday"}]}ngOnInit(){this.checkoutData=localStorage.getItem("CheckoutData"),this.checkoutData=JSON.parse(this.checkoutData),this.storeFindByLocation()}storeFindByLocation(){this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.dummyAddressData=localStorage.getItem("address"),this.dummyAddressData=JSON.parse(this.dummyAddressData),console.log("this.dummyAddressData ",this.dummyAddressData),this.dummyAddressData?(this.currentLong=this.dummyAddressData.longitude,this.currentLat=this.dummyAddressData.latitude,this.getStoreDetails()):this.service.getPosition().then(e=>{this.currentLong=e.lng,this.currentLat=e.lat,this.getStoreDetails()})}getStoreDetails(){this.service.postApiWithAuth("user/getRestaurantDetails",{longitude:this.currentLong,latitude:this.currentLat,restaurantId:this.checkoutData.storeId,timezone:this.timeZone},1).subscribe({next:o=>{if(200==o.status){this.storeData=o.data,console.log("this.storeData ",this.storeData),localStorage.setItem("guestSessionId",this.storeData.guestSessionId);const i=this.storeData.openingHours.map(r=>r.dayOfWeek),a=this.allDays.find(r=>!i.includes(r.dayOfWeek));a&&this.storeData.openingHours.push({...a,startTime:"00:00",endTime:"23:00",isToday:!1,isAvaiable:!1}),this.storeData.openingHours.sort((r,l)=>r.dayOfWeek-l.dayOfWeek)}},error:o=>{}})}slotDataModification(e){(new Date).toLocaleString("en-US",{weekday:"long"});let i=e.filter(r=>"Delivery"===r.type),a=e.filter(r=>"Pickup"===r.type);this.slotData={delivery:i,pickup:a}}addFavorites(e){this.service.postApiWithAuth("user/addToFavourite",{restaurantId:e._id},1).subscribe({next:i=>{200==i.status?(this.service.success(i.message),this.getStoreDetails()):this.service.err(i.message)},error:i=>{}})}productView(){const e=this.storeData.openingHours.find(h=>!0===h.isToday);if(this.storeData.busyMode)return void this.service.err("Resaturant is closed");const o=new Date,[i,a]=e.startTime.split(":").map(Number),[r,l]=e.endTime.split(":").map(Number),u=new Date;u.setHours(i,a,0,0);const m=new Date;m.setHours(r,l,0,0),o>=u&&o<=m?this.route.navigate(["/stores/product"]):this.service.err("Restaurant is closed")}storeAvailability(){const e=this.storeData?.openingHours.find(h=>!0===h.isToday);if(!e)return"Schedule unavailable";const o=new Date,[i,a]=e.startTime.split(":").map(Number),[r,l]=e.endTime.split(":").map(Number),u=new Date;u.setHours(i,a,0,0);const m=new Date;return m.setHours(r,l,0,0),this.storeData.busyMode?"Closed":o>=u&&o<=m?"Open":"Closed"}waysShow(e){"Pickup"==e?this.pickupHours=!this.pickupHours:this.deliveryHours=!this.deliveryHours}static{this.\u0275fac=function(o){return new(o||s)(t.rXU(f.D),t.rXU(c.aZ),t.rXU(d.Ix),t.rXU(D.d),t.rXU(d.nX),t.rXU(g.ok))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-store-details"]],decls:40,vars:16,consts:[[1,"StoreListArea"],[1,"TitleBox"],[1,"DetailsArea"],[1,"DetailsHead"],[3,"src",4,"ngIf"],[1,"DetailsBody"],[1,"StoreBox"],["src","assets/images/Store.png",4,"ngIf"],["src","assets/images/Star.png"],[3,"ngClass",4,"ngIf"],["class","Green",4,"ngIf"],["class","Wishlist",3,"click",4,"ngIf"],[1,"Ways"],[3,"click"],[4,"ngIf"],[1,"Order",3,"click"],[3,"src"],["src","assets/images/Store.png"],[3,"ngClass"],[1,"Green"],[1,"Wishlist",3,"click"],["src","assets/images/Heart.png"],["src","assets/images/Heart-Red.png"],[4,"ngFor","ngForOf"],["class","Badge Open",4,"ngIf"],["class","Badge Close",4,"ngIf"],[1,"Badge","Open"],[1,"Badge","Close"]],template:function(o,i){1&o&&(t.j41(0,"section")(1,"div",0)(2,"div",1)(3,"h3"),t.EFF(4,"Store Details"),t.k0s()(),t.j41(5,"div",2)(6,"div",3),t.DNE(7,X,1,1,"img",4),t.k0s(),t.j41(8,"div",5)(9,"div",6)(10,"article")(11,"figure"),t.DNE(12,B,1,0,"img",7),t.DNE(13,M,1,1,"img",4),t.k0s(),t.j41(14,"figcaption")(15,"h4"),t.EFF(16),t.k0s(),t.j41(17,"h6"),t.nrm(18,"img",8),t.j41(19,"span"),t.EFF(20),t.k0s(),t.j41(21,"strong"),t.EFF(22),t.nI1(23,"number"),t.k0s()(),t.DNE(24,w,2,5,"p",9),t.DNE(25,O,2,1,"p",10),t.j41(26,"a"),t.EFF(27),t.k0s()(),t.DNE(28,Y,2,0,"button",11),t.DNE(29,U,2,0,"button",11),t.k0s()(),t.j41(30,"div",12)(31,"h4",13),t.bIt("click",function(){return i.waysShow("Pickup")}),t.EFF(32,"Pick Up / Dine in Hours"),t.k0s(),t.DNE(33,J,2,1,"ol",14),t.k0s(),t.j41(34,"div",12)(35,"h4",13),t.bIt("click",function(){return i.waysShow("Delivery")}),t.EFF(36,"Delivery Hours"),t.k0s(),t.DNE(37,et,2,1,"ol",14),t.k0s(),t.j41(38,"button",15),t.bIt("click",function(){return i.productView()}
1),t.EFF(39,"Order Now"),t.k0s()()()()()),2&o&&(t.R7$(7),t.Y8G("ngIf",null==i.storeData?null:i.storeData.image),t.R7$(5),t.Y8G("ngIf",""==(null==i.storeData?null:i.storeData.logo)),t.R7$(1),t.Y8G("ngIf",null==i.storeData?null:i.storeData.logo),t.R7$(3),t.JRh(null==i.storeData?null:i.storeData.storeName),t.R7$(4),t.JRh(null==i.storeData?null:i.storeData.avgRating),t.R7$(2),t.SpI("",t.i5U(23,13,1.5*(null==i.storeData?null:i.storeData.distanceInKm),"1.2-2")," Miles"),t.R7$(2),t.Y8G("ngIf",i.storeAvailability()),t.R7$(1),t.Y8G("ngIf","delivery"==(null==i.checkoutData?null:i.checkoutData.deliveryType)),t.R7$(2),t.JRh(null==i.storeData?null:i.storeData.restaurantAddress),t.R7$(1),t.Y8G("ngIf",0==(null==i.storeData?null:i.storeData.isFav)),t.R7$(1),t.Y8G("ngIf",1==(null==i.storeData?null:i.storeData.isFav)),t.R7$(4),t.Y8G("ngIf",i.pickupHours),t.R7$(4),t.Y8G("ngIf",i.deliveryHours))},dependencies:[c.YU,c.Sq,c.bT,c.QX]})}}return s})()},{path:"product",component:(()=>{class s{constructor(e,o,i,a,r,l){this.appProvider=e,this._location=o,this.route=i,this.service=a,this.activeRoute=r,this.fb=l,this.productLoader=!1}ngOnInit(){this.checkoutData=localStorage.getItem("CheckoutData"),this.checkoutData=JSON.parse(this.checkoutData),this.storeFindByLocation()}storeFindByLocation(){this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.dummyAddressData=localStorage.getItem("address"),this.dummyAddressData=JSON.parse(this.dummyAddressData),this.dummyAddressData?(this.currentLong=this.dummyAddressData.longitude,this.currentLat=this.dummyAddressData.latitude,this.getStoreList(),this.getCartItem(),this.getCategoryList()):this.service.getPosition().then(e=>{this.currentLong=e.lng,this.currentLat=e.lat,this.getStoreList(),this.getCartItem(),this.getCategoryList()})}getStoreList(){this.service.postApiWithAuth("user/getRestaurantDetails",{longitude:this.currentLong,latitude:this.currentLat,timezone:this.timeZone,restaurantId:this.checkoutData.storeId},1).subscribe({next:o=>{200==o.status&&(this.storeData=o.data)},error:o=>{}})}getCartItem(){let e={longitude:this.currentLong,latitude:this.currentLat,timezone:this.timeZone,guestSessionId:localStorage.getItem("guestSessionId")};this.service.postApiWithAuth("user/getCartItem",e,1).subscribe({next:o=>{200==o.status&&(this.getCartItemData=o.data,this.service.updateCartCount(this.getCartItemData?.cartData?.length||0))},error:o=>{}})}getCategoryList(){this.service.getApiWithAuth(`user/category-list?storeId=${this.checkoutData.storeId} `).subscribe({next:e=>{200==e.status?(this.categoryListData=e.data,this.categoryMenu(this.categoryListData[0]),this.categoryActiveIndex=0):this.service.err(e.message)},error:e=>{this.service.err(e.error.message)}})}categoryMenu(e){this.productLoader=!0,this.menuCategoryId=e;let o={restaurantId:this.checkoutData.storeId,categoryId:this.menuCategoryId._id,guestSessionId:localStorage.getItem("guestSessionId")};this.service.postApiWithAuth("user/getMenuList",o,1).subscribe({next:i=>{200==i.status?(this.menuListData=i.data,this.productLoader=!1):this.service.err(i.message)},error:i=>{this.service.err(i.error.message)}})}setActive(e){this.categoryActiveIndex=e}addFavorites(e){this.service.postApiWithAuth("user/addToFavourite",{restaurantId:e._id},1).subscribe({next:i=>{200==i.status?(this.service.success(i.message),this.getStoreList()):this.service.err(i.message)},error:i=>{}})}productDetails(e){sessionStorage.setItem("singleMenuID",e._id),this.route.navigate(["/stores/addon"])}productRedirection(){this.getCartItemData?.cartData?.length>0?this.route.navigate(["/cart"]):this.service.err("Please select menu")}quantity(e,o){this.productItem=o,console.log("this.productItem",this.productItem);const a=o.cartQuantity>0;switch(e){case"Increase":this.productAddtoCart(1);break;case"Decrease":a&&this.productAddtoCart(-1)}}productAddtoCart(e){let o=null;o=this.getCartItemData.cartData.filter(r=>r.productId===this.productItem._id)[0];let a={cartId:o._id,quantity:o.quantity+e,guestSessionId:localStorage.getItem("guestSessionId")};console.log("data",a),this.service.postApiWithAuth("user/updateCart",a,1).subscribe(r=>{200==r.status?(this.service.success(r.message),$("#OrderRepeatModal").modal("hide"),this.categoryMenu(this.menuCategoryId),this.getCartItem(
1)):400==r.status?($("#ClearCartModal").modal("show"),this.service.err(r.message)):this.service.err(r.message)},r=>{console.log({error:r})})}checkProductAdded(){let e=this.menuListData?.map(o=>{const i=this.getCartItemData?.cartData?.find(a=>a.productId===o._id);return{...o,quantity:i?.quantity,isAdded:!!i}});this.menuListData=e}static{this.\u0275fac=function(o){return new(o||s)(t.rXU(f.D),t.rXU(c.aZ),t.rXU(d.Ix),t.rXU(D.d),t.rXU(d.nX),t.rXU(g.ok))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-store-product"]],decls:40,vars:19,consts:[[1,"StoreListArea"],[1,"TitleBox"],[1,"DetailsArea","MenuArea"],[1,"DetailsHead"],[3,"src",4,"ngIf"],[1,"container"],[1,"DetailsBody"],[1,"StoreBox"],["src","assets/images/Store.png",4,"ngIf"],["src","assets/images/Star.png"],["class","Green",4,"ngIf"],["class","Orange",4,"ngIf"],["class","Wishlist",3,"click",4,"ngIf"],[1,"MenuHead"],[4,"ngFor","ngForOf"],["class","MenuBox",4,"ngFor","ngForOf"],[1,"Order",3,"click"],[4,"ngIf"],["class","LoaderBox",4,"ngIf"],[3,"src"],["src","assets/images/Store.png"],[1,"Green"],[1,"Orange"],[1,"Wishlist",3,"click"],["src","assets/images/Heart.png"],["src","assets/images/Heart-Red.png"],[3,"ngClass","click"],[1,"MenuBox"],[3,"click"],[1,"Icon"],["src","assets/images/Plus.png"],[2,"width","33px",3,"click"],["src","assets/images/Decrease.png"],["src","assets/images/Increase.png"],[1,"LoaderBox"],[1,"loader"]],template:function(o,i){1&o&&(t.j41(0,"section")(1,"div",0)(2,"div",1)(3,"h3"),t.EFF(4,"Store Product"),t.k0s()(),t.j41(5,"div",2)(6,"div",3),t.DNE(7,st,1,1,"img",4),t.k0s(),t.j41(8,"div",5)(9,"div",6)(10,"div",7)(11,"article")(12,"figure"),t.DNE(13,ot,1,0,"img",8),t.DNE(14,at,1,1,"img",4),t.k0s(),t.j41(15,"figcaption")(16,"h4"),t.EFF(17),t.k0s(),t.j41(18,"h6"),t.nrm(19,"img",9),t.j41(20,"span"),t.EFF(21),t.k0s(),t.j41(22,"strong"),t.EFF(23),t.nI1(24,"number"),t.k0s()(),t.DNE(25,nt,2,0,"p",10),t.DNE(26,rt,2,0,"p",11),t.DNE(27,lt,2,1,"p",10),t.j41(28,"a"),t.EFF(29),t.k0s()(),t.DNE(30,ct,2,0,"button",12),t.DNE(31,dt,2,0,"button",12),t.k0s()(),t.j41(32,"div",13)(33,"ul"),t.DNE(34,mt,3,4,"li",14),t.k0s()(),t.DNE(35,gt,11,5,"div",15),t.j41(36,"button",16),t.bIt("click",function(){return i.productRedirection()}),t.EFF(37," Checkout "),t.DNE(38,ht,2,1,"span",17),t.k0s()()()()()(),t.DNE(39,ft,4,0,"div",18)),2&o&&(t.R7$(7),t.Y8G("ngIf",null==i.storeData?null:i.storeData.image),t.R7$(6),t.Y8G("ngIf",""==(null==i.storeData?null:i.storeData.logo)),t.R7$(1),t.Y8G("ngIf",null==i.storeData?null:i.storeData.logo),t.R7$(3),t.JRh(null==i.storeData?null:i.storeData.storeName),t.R7$(4),t.JRh(null==i.storeData?null:i.storeData.avgRating),t.R7$(2),t.SpI("",t.i5U(24,16,1.5*(null==i.storeData?null:i.storeData.distanceInKm),"1.2-2")," Miles"),t.R7$(2),t.Y8G("ngIf","open"==(null==i.storeData?null:i.storeData.storeStatus)&&"pickup"==(null==i.checkoutData?null:i.checkoutData.deliveryType)),t.R7$(1),t.Y8G("ngIf","close"==(null==i.storeData?null:i.storeData.storeStatus)&&"pickup"==(null==i.checkoutData?null:i.checkoutData.deliveryType)),t.R7$(1),t.Y8G("ngIf","open"==(null==i.storeData?null:i.storeData.storeStatus)&&"delivery"==(null==i.checkoutData?null:i.checkoutData.deliveryType)),t.R7$(2),t.JRh(null==i.storeData?null:i.storeData.restaurantAddress),t.R7$(1),t.Y8G("ngIf",0==(null==i.storeData?null:i.storeData.isFav)),t.R7$(1),t.Y8G("ngIf",1==(null==i.storeData?null:i.storeData.isFav)),t.R7$(3),t.Y8G("ngForOf",i.categoryListData),t.R7$(1),t.Y8G("ngForOf",i.menuListData),t.R7$(3),t.Y8G("ngIf",(null==i.getCartItemData||null==i.getCartItemData.cartData?null:i.getCartItemData.cartData.length)>0),t.R7$(1),t.Y8G("ngIf",1==i.productLoader))},dependencies:[c.YU,c.Sq,c.bT,c.QX]})}}return s})()},{path:"addon",component:(()=>{class s{constructor(e,o,i,a,r,l){this.appProvider=e,this._location=o,this.route=i,this.service=a,this.activeRoute=r,this.fb=l,this.singleModifierItemShow=!1,this.productLoader=!1}ngOnInit(){this.getItemDetailsId=sessionStorage.getItem("singleMenuID"),this.getSingleCartId=sessionStorage.getItem("singleCartID"),this.checkoutData=localStorage.getItem("CheckoutData"),this.checkoutData=JSON.parse(this.checkoutData),console.log("this.checkoutData",this.checkoutData),this.getItemDetails()}getItemDetails(){this.productLoader=!0,this.service.postApiWithAuth("user/getItemDetails",{storeId:this.checkoutData.storeId,itemId:this.getItemDetailsId},1).subscribe({next:o=>{200===o.status&&(this.getItemDetailsData=o.data[0],this.getItemDetailsData.isCombo&&(this.getItemDetailsData.modifierComboGroups=this.getItemDetailsData.comboConfig.bundleComponents),console.log("this.getItemDetailsData",this.getItemDetailsData),this.productLoader=!1)},error:o=>{console.error("Get Item Details Error:",o)}})}initializeSelections(){this.getItemDetailsData.modifierComboGroups.forEach(e
1=>{const o=e.defaultItem?._id;e.isSelect=!0,e.allowedItems.forEach((i,a)=>{i.isSelect=i._id===o||a<e.minSelection})})}choiceData(e,o){const i=e.allowedItems.filter(a=>a.isSelect).length;if(o.isSelect){if(i<=e.minSelection)return void alert(`You must select at least ${e.minSelection} item(s) for ${e.categoryName}.`);o.isSelect=!1}else{if(i>=e.maxSelection)return;o.isSelect=!0}}increaseChoice(e,o){"number"!=typeof o.cartQuantity&&(o.cartQuantity=0);const i=e.allowedItems.reduce((a,r)=>a+(r.cartQuantity||0),0);i<e.maxSelection?(o.cartQuantity++,o.isSelect=!0,e.groupCartQuantity=i+1):this.service.err(`Maximum limit (${e.maxSelection}) reached`),console.log("Item Details:",this.getItemDetailsData)}decreaseChoice(e,o){if("number"!=typeof o.cartQuantity&&(o.cartQuantity=0),o.cartQuantity>0){o.cartQuantity--;const i=e.allowedItems.reduce((a,r)=>a+(r.cartQuantity||0),0);e.groupCartQuantity=i,0===o.cartQuantity&&(o.isSelect=!1),0===e.groupCartQuantity&&(e.isChecked=!1)}}selectChoice(e,o){if(o.modifierGroups&&($("body").addClass("modifierDataShow"),this.singleModifierItemData=o,console.log("this.singleModifierItemData",this.singleModifierItemData)),"number"!=typeof e.groupCartQuantity&&(e.groupCartQuantity=0),"boolean"!=typeof o.isSelect&&(o.isSelect=!1),"number"!=typeof o.cartQuantity&&(o.cartQuantity=0),1===e.maxSelection)return e.allowedItems.forEach(i=>{i.isSelect=!1,i.cartQuantity=0}),o.isSelect=!0,o.cartQuantity=1,e.groupCartQuantity=1,void(e.isChecked=!0);if(o.isSelect&&o.cartQuantity>0)o.isSelect=!1,o.cartQuantity=0,e.groupCartQuantity=e.allowedItems.reduce((i,a)=>i+(a.cartQuantity||0),0),0===e.groupCartQuantity&&(e.isChecked=!1);else{const i=e.allowedItems.reduce((a,r)=>a+(r.cartQuantity||0),0);if(i>=e.maxSelection)return void this.service.err(`Maximum limit (${e.maxSelection}) reached`);o.isSelect=!0,o.cartQuantity=1,e.groupCartQuantity=i+1,e.isChecked=!0}}selectModifiers(e,o){"boolean"!=typeof o.isSelect&&(o.isSelect=!1),e.isSelect=!0,o.isSelect=!o.isSelect}calculateTotalPrice(){let e=Number(this.getItemDetailsData?.price||0);return this.getItemDetailsData?.newModifiers?.forEach(o=>{o.modifierItems?.forEach(i=>{i.isSelect&&(e+=Number(i.price||0))})}),this.getItemDetailsData?.modifierComboGroups?.forEach(o=>{o.allowedItems?.forEach(i=>{i.isSelect&&i.modifierGroups?.forEach(a=>{a.modifierItems?.forEach(r=>{r.isSelect&&(e+=Number(r.price||0))})})})}),e}productCheckValidation(){return!0}productAddtoCart(){if(this.productLoader=!0,this.productCheckValidation()){const e=this.getItemDetailsData?.modifierComboGroups?.map(a=>({bundleComponentId:a.modifierGroupId,categoryName:a.categoryName,required:a.required,minSelection:a.minSelection,maxSelection:a.maxSelection,selectedItems:a.allowedItems.filter(r=>r.isSelect).map(r=>({itemId:r._id,name:r.name,price:r.price,quantity:a.quantity,multiply:r.multiply,image:r.image,deliverect_id:r.deliverect_id,selectedModifiers:r?.modifierGroups?.filter(l=>l.isSelect).map(l=>({modifierGroupId:l._id,modifierGroupName:l.name,selectedItems:l.modifierItems?.filter(u=>u.isSelect).map(u=>({modifierItemId:u._id,name:u.name,price:u.price,quantity:1}))})).filter(l=>l.selectedItems&&l.selectedItems.length>0)||[]}))}))||[],o=this.getItemDetailsData?.modifierGroups?.filter(a=>a.isSelect).map(a=>({modifierGroupId:a._id,modifierGroupName:a.name,selectedItems:a.modifierItems?.filter(r=>r.isSelect).map(r=>({modifierItemId:r._id,name:r.name,price:r.price,quantity:1}))})).filter(a=>a.selectedItems&&a.selectedItems.length>0)||[];console.log("modifierComboData",e),console.log("modifierData",o);const i={productId:this.getItemDetailsData._id,isCombo:this.getItemDetailsData.isCombo,type:"regular",quantity:1,restaurantId:this.checkoutData.storeId,orderMethod:this.checkoutData.deliveryType,selectedBundleComponents:e,selectedModifiers:o,guestSessionId:localStorage.getItem("guestSessionId")};console.log("data",i),this.service.postApiWithAuth("user/addToCart",i,1).subscribe({next:a=>{200===a.status?(this.service.success(a.message),this._location.back()):400===a.status?(this.service.err(a.message),$("#ClearCartModal").modal("show")):this.service.err(a.message),this.productLoader=!1},error:a=>console.log({err:a})})}else this.service.err("Missing selection in one or more choices")}clearCart(){this.service.getApiWithAuth("user/clearCart").subscribe({next:e=>{200==e.status?(sessionStorage.clear(),$("#ClearCartModal").modal("hide")):this.service.err(e.message)},error:e=>{}})}goToCart(){$("#ClearCartModal").modal("hide"),this.route.navigate(["/cart"])}modifierSubmit(){$("body").removeClass("modifierDataShow"),this.singleModifierItemData=""}showModifier(e){e.modifierGroups&&e.isSelect&&($("body").addClass("modifierDataShow"),this.singleModifierItemData=e,console.log("this.singleModifierItemData",this.singleModifierItemData))}SidebarRemove(){$("body").removeClass("modifierDataShow"),this.singleModifierItemData=""}static{this.\u0275fac=function(o){return new(o||s)(t.rXU(f.D),t.rXU(c.aZ),t.rXU(d.Ix),t.rXU(D.d),t.rXU(d.nX),t.rXU(g.ok))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-store-addon"]],decls:55,vars:11,consts:[["class","LoaderBox",4,"ngIf"],[1,"StoreListArea"],[1,"TitleBox"],[1,"DetailsArea"],[1,"container"],[1,"DetailsBody"],[1,"DetailsChoices"],[3,"src"],[4,"ngIf"],[1,"ChoiceMenuTotal"],[1,"Order",3,"click"],[1,"SideModefierArea",3,"ngClass"],[1,"SideModefierHead"],[3,"click"],[1,"SideModefierBody"],["class","ChoiceMenuBox",4,"ngFor","ngForOf"],[1,"SideModefierFooter"],[1,"ModalBox"],["id","ClearCartModal",1,"modal","fade","smallModal"],[1,"modal-dialog","modal
1-dialog-centered"],[1,"modal-content"],[1,"modal-body"],[1,"SuccessfullyBox"],[1,"LoaderBox"],[1,"loader"],[1,"ChoiceMenuBox"],[1,"Addon-title"],["class","MenuBox",4,"ngFor","ngForOf"],[1,"MenuBox"],[1,"Icon"],[4,"ngIf","ngIfElse"],["hasQuantity",""],["singleSelection",""],[2,"width","33px",3,"click"],["src","assets/images/Increase.png"],["src","assets/images/Decrease.png"],[1,"Radio"],["type","radio",3,"checked","name","change"],[1,"Checkmark"],["type","checkbox",3,"checked","name","change"]],template:function(o,i){1&o&&(t.DNE(0,vt,4,0,"div",0),t.j41(1,"section")(2,"div",1)(3,"div",2)(4,"h3"),t.EFF(5,"Product Details"),t.k0s()(),t.j41(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"figure"),t.nrm(11,"img",7),t.k0s(),t.j41(12,"figcaption")(13,"h4"),t.EFF(14),t.k0s(),t.j41(15,"p"),t.EFF(16),t.k0s()()(),t.DNE(17,Rt,2,1,"div",8),t.DNE(18,Gt,2,1,"div",8),t.j41(19,"div",9)(20,"aside")(21,"h4"),t.EFF(22),t.k0s()(),t.j41(23,"button",10),t.bIt("click",function(){return i.productAddtoCart()}),t.EFF(24,"Add to Cart"),t.k0s()()()()()()(),t.j41(25,"div",11)(26,"div",12)(27,"button",13),t.bIt("click",function(){return i.SidebarRemove()}),t.EFF(28,"\xd7"),t.k0s(),t.j41(29,"h4"),t.EFF(30),t.k0s(),t.j41(31,"p"),t.EFF(32),t.k0s()(),t.j41(33,"div",14),t.DNE(34,Lt,4,2,"div",15),t.k0s(),t.j41(35,"div",16)(36,"button",13),t.bIt("click",function(){return i.modifierSubmit()}),t.EFF(37,"Submit"),t.k0s()()(),t.j41(38,"div",17)(39,"div",18)(40,"div",19)(41,"div",20)(42,"div",21)(43,"div",22)(44,"h3"),t.EFF(45,"Cart Update Required"),t.k0s(),t.j41(46,"p"),t.EFF(47,"Your cart currently contains items. To add new items, "),t.nrm(48,"br"),t.EFF(49," please clear your existing cart first."),t.k0s(),t.j41(50,"aside")(51,"button",13),t.bIt("click",function(){return i.clearCart()}),t.EFF(52,"Clear Cart"),t.k0s(),t.j41(53,"button",13),t.bIt("click",function(){return i.goToCart()}),t.EFF(54,"Go to cart"),t.k0s()()()()()()()()),2&o&&(t.Y8G("ngIf",1==i.productLoader),t.R7$(11),t.FS9("src",null==i.getItemDetailsData?null:i.getItemDetailsData.image,t.B4B),t.R7$(3),t.JRh(null==i.getItemDetailsData?null:i.getItemDetailsData.menuName),t.R7$(2),t.JRh(null==i.getItemDetailsData?null:i.getItemDetailsData.description),t.R7$(1),t.Y8G("ngIf",null==i.getItemDetailsData?null:i.getItemDetailsData.isCombo),t.R7$(1),t.Y8G("ngIf",!(null!=i.getItemDetailsData&&i.getItemDetailsData.isCombo)),t.R7$(4),t.SpI("\u20a6 ",i.calculateTotalPrice(),""),t.R7$(3),t.Y8G("ngClass",i.singleModifierItemShow?"":"show"),t.R7$(5),t.JRh(null==i.singleModifierItemData?null:i.singleModifierItemData.name),t.R7$(2),t.SpI("\u20a6 ",null==i.singleModifierItemData?null:i.singleModifierItemData.price,""),t.R7$(2),t.Y8G("ngForOf",null==i.singleModifierItemData?null:i.singleModifierItemData.modifierGroups))},dependencies:[c.YU,c.Sq,c.bT]})}}return s})()},{path:"store-all",component:(()=>{class s{constructor(e,o,i,a,r,l){this.appProvider=e,this._location=o,this.route=i,this.service=a,this.activeRoute=r,this.fb=l,this.storeType="pickup",this.searchText=""}ngOnInit(){console.log("this.currentLong ",this.currentLong,this.currentLat),this.storeFindByLocation()}storeFindByLocation(){this.timeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.CheckoutData=localStorage.getItem("CheckoutData"),this.CheckoutData=JSON.parse(this.CheckoutData),console.log("CheckoutData",this.CheckoutData),this.dummyAddressData=localStorage.getItem("address"),this.dummyAddressData=JSON.parse(this.dummyAddressData),this.dummyAddressData?(this.currentLong=this.dummyAddressData.longitude,this.currentLat=this.dummyAddressData.latitude,this.getStoreList("nearby")):($("#LocationModal").modal("show"),this.service.getPosition().then(e=>{this.currentLong=e.lng,this.currentLat=e.lat,this.getStoreList("nearby")}))}getStoreList(e){this.service.postApiWithAuth("user/getAllRestaurantsData",{longitude:this.currentLong,latitude:this.currentLat,timezone:this.timeZone,type:e,search:""},1).subscribe({next:i=>{200==i.status&&(this.storeListData=i.data),404==i.status&&(this.storeListData=[])},error:i=>{}})}storeAvailability(e){const o=e.openingHours.find(v=>!0===v.isToday);if(!o)return"Schedule unavailable";const i=new Date,[a,r]=o.startTime.split(":").map(Number),[l,u]=o.endTime.split(":").map(Number),m=new Date;m.setHours(a,r,0,0);const _=new Date;return _.setHours(l,u,0,0),e.busyMode?"Closed":i>=m&&i<=_?"Open":"Closed"}static{this.\u0275fac=function(o){return new(o||s)(t.rXU(f.D),t.rXU(c.aZ),t.rXU(d.Ix),t.rXU(D.d),t.rXU(d.nX),t.rXU(g.ok))}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["app-store-all"]],decls:9,vars:2,consts:[[1,"StoreListArea"],[1,"container"],[1,"TitleBox"],["class","StoreFooter",4,"ngIf"],["class","NotFound StoreFooter",4,"ngIf"],[1,"StoreFooter"],["class","StoreBox",4,"ngFor","ngForOf"],[1,"StoreBox"],["src","assets/images/Store.png",4,"ngIf"],[3,"src",4,"ngIf"],["src","assets/images/Star.png"],[3,"ngClass",4,"ngIf"],["class","Green",4,"ngIf"],["src","assets/images/Store.png"],[3,"src"],[3,"ngClass"],[1,"Green"],[1,"NotFound","StoreFooter"]],template:function(o,i){1&o&&(t.j41(0,"section")(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",1)(5,"h3"),t.EFF(6,"All Stores"),t.k0s()()(),t.DNE(7,Ot,2,1,"div",3),t.DNE(8,Yt,3,0,"div",4),t.k0s()()()),2&o&&(t.R
17$(7),t.Y8G("ngIf",(null==i.storeListData?null:i.storeListData.length)>0),t.R7$(1),t.Y8G("ngIf",0==(null==i.storeListData?null:i.storeListData.length)))},dependencies:[c.YU,c.Sq,c.bT,c.QX]})}}return s})()}];let Pt=(()=>{class s{static{this.\u0275fac=function(o){return new(o||s)}}static{this.\u0275mod=t.$C({type:s})}static{this.\u0275inj=t.G2t({imports:[d.iI.forChild(Ut),d.iI]})}}return s})(),Vt=(()=>{class s{static{this.\u0275fac=function(o){return new(o||s)}}static{this.\u0275mod=t.$C({type:s})}static{this.\u0275inj=t.G2t({imports:[c.MD,Pt,g.YN]})}}return s})()}}]);
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.