@mapvx/website-component 0.16.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1509,7 +1509,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
1509
1509
  `))});document=Me(Wr);sanitizer=Me(ny);config=Me(fG);iconLibrary=Me(ky);stackItem=Me(bG,{optional:!0});stack=Me(wG,{optional:!0});constructor(){this.stack!=null&&this.stackItem==null&&console.error('FontAwesome: fa-icon and fa-duotone-icon elements must specify stackItemSize attribute when wrapped into fa-stack. Example: <fa-icon stackItemSize="2x" />.')}findIconDefinition(i){let l=_G(i,this.config.defaultPrefix);if("icon"in l)return l;let d=this.iconLibrary.getIconDefinition(l.prefix,l.iconName);return d??(pG(l),null)}buildParams(){let i=this.fixedWidth(),l={flip:this.flip(),animation:this.animation(),border:this.border(),inverse:this.inverse(),size:this.size(),pull:this.pull(),rotate:this.rotate(),fixedWidth:typeof i=="boolean"?i:this.config.fixedWidth,stackItemSize:this.stackItem!=null?this.stackItem.stackItemSize():void 0},d=this.transform(),a=typeof d=="string"?NR.transform(d):d,S=this.mask(),O=S!=null?this.findIconDefinition(S):null,F={},Z=this.a11yRole();Z!=null&&(F.role=Z);let ee={};return l.rotate!=null&&!BR(l.rotate)&&(ee["--fa-rotate-angle"]=`${l.rotate}`),{title:this.title(),transform:a,classes:gG(l),mask:O??void 0,symbol:this.symbol(),attributes:F,styles:ee}}static \u0275fac=function(l){return new(l||n)};static \u0275cmp=hn({type:n,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(l,d){l&2&&(e_("innerHTML",d.renderedIconHTML(),zd),Bg("title",d.title()??void 0))},inputs:{icon:[1,"icon"],title:[1,"title"],animation:[1,"animation"],mask:[1,"mask"],flip:[1,"flip"],size:[1,"size"],pull:[1,"pull"],border:[1,"border"],inverse:[1,"inverse"],symbol:[1,"symbol"],rotate:[1,"rotate"],fixedWidth:[1,"fixedWidth"],transform:[1,"transform"],a11yRole:[1,"a11yRole"]},outputs:{icon:"iconChange",title:"titleChange",animation:"animationChange",mask:"maskChange",flip:"flipChange",size:"sizeChange",pull:"pullChange",border:"borderChange",inverse:"inverseChange",symbol:"symbolChange",rotate:"rotateChange",fixedWidth:"fixedWidthChange",transform:"transformChange",a11yRole:"a11yRoleChange"},decls:0,vars:0,template:function(l,d){},encapsulation:2,changeDetection:0})}return n})();var o1=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=qa({type:n});static \u0275inj=_a({})}return n})();var Yn=class n{iconLibrary=Me(ky);logger=Me(Pn);getIconDefinition(r,i){let l=this.iconLibrary.getIconDefinition(r,i);return l||(this.logger.logWarning(new Error(`Icon definition not found for ${r} ${i}`)),BC)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var Po=class n{logger=Me(Pn);router=Me(Ud);platformId=Me(Dl);history=[["/"]];resetHistory(){this.history=[["/"]],this.router.navigate(["/"])}getCurrentPath(){return this.history.at(-1)?.join("")??"/"}navigateToHome(){this.router.navigate(["/"]),this.history.push(["/"])}navigateToListView(){this.router.navigate(["/list"]),this.history.push(["/list"])}navigateToSearchView(){this.router.navigate(["/search"]),this.history.push(["/search"])}navigateToProfile(r){this.scrollToTop(),this.router.navigate(["/profile",r]),this.history.push(["/profile",r])}navigateToRoute(r){this.router.navigate(["/route",r]),this.history.push(["/route",r])}goBack(){if(this.history.length>1){this.history.pop();let r=this.history.pop();if(!r){this.logger.log("No previous path found");return}this.router.navigate(r),this.history.push(r);return}this.logger.log("Only current path in history")}scrollToTop(){if(gc(this.platformId))try{let r=document.querySelector("mapvx-website");if(r){r.scrollIntoView({behavior:"smooth",block:"start"});return}window.scrollTo({top:0,behavior:"smooth"})}catch(r){this.logger.log("Error scrolling to top:",r),window.scrollTo(0,0)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};function wS(n){return i1(n)}var CG={"Yoga Studio":["fak","beauty"],"Salon / Barbershop":["fak","services"],"Event Space":["fak","events"],"Comedy Club":["fak","events"],"Women's Store":["fak","shopping"],Gym:["fak","beauty"],Spa:["fak","beauty"],"Men's Store":["fak","shopping"],"Clothing Store":["fak","shopping"],"Shoe Store":["fak","shopping"],"Gift Shop":["fak","shopping"],Winery:["fak","food-and-beverage"],"Perfume Shop":["fak","shopping"],"Sporting Goods Shop":["fak","shopping"],"Jewelry Store":["fak","shopping"],"Flower Shop":["fak","shopping"],"Watch Shop":["fak","shopping"],"Health & Beauty Service":["fak","beauty"],"Furniture / Home Store":["fak","shopping"],"Optical Shop":["fak","beauty"],"Salad Place":["fak","food-and-beverage"],"Italian Restaurant":["fak","food-and-beverage"],Cafeteria:["fak","food-and-beverage"],Restaurant:["fak","food-and-beverage"],Caf\u00E9:["fak","food-and-beverage"],"American Restaurant":["fak","food-and-beverage"],"Fast Food Restaurant":["fak","food-and-beverage"],"Cocktail Bar":["fak","food-and-beverage"],Delicatessen:["fak","food-and-beverage"],"Japanese Restaurant":["fak","food-and-beverage"],"Middle Eastern Restaurant":["fak","food-and-beverage"],"Mediterranean Restaurant":["fak","food-and-beverage"],"Brazilian Restaurant":["fak","food-and-beverage"],Pub:["fak","food-and-beverage"],"Beer Bar":["fak","food-and-beverage"],Bar:["fak","food-and-beverage"],Lounge:["fak","food-and-beverage"],Nightclub:["fak","food-and-beverage"],"Chocolate Shop":["fak","food-and-beverage"],"Ice Cream Shop":["fak","food-and-beverage"],"Donut Shop":["fak","food-and-beverage"],"Coffee Shop":["fak","food-and-beverage"],"Grocery Store":["fak","shopping"],Pharmacy:["fak","health"],"Convenience Store":["fak","shopping"],"Dentist's Office":["fak","health"],Bank:["fak","services"],"Travel Agency":["fak","airport"],"Shipping Store":["fak","services"],"Mobile Phone Shop":["fak","shopping"],Parking:["fak","parking"],"Public Restrooms":["fak","user"],"Public Bathroom":["fak","user"],"Transport Service":["fak","user"],Hotel:["fak","hotels"],"Coming soon":["fak","user"],"Roller Rink":["fak","beauty"],"Music Venue":["fak","events"],"Football Shop":["fak","shopping"],Stage:["fak","events"],Tavern:["fak","food-and-beverage"],"Point of interest":["fak","user"],Entrance:["fak","user"],Exit:["fak","user"],"Music Festival":["fak","events"],"Public Art":["fak","palette"]};function s1(n){let r=CG[n];return r||["fak","shopping"]}var CS={};kI(CS,{faAirport:()=>SG,faArrowTopRight:()=>EG,faBackground:()=>xS,faBeauty:()=>IG,faCenter:()=>DG,faCompass:()=>TG,faCompassNorth:()=>MG,faDeals:()=>PG,faEvents:()=>AG,faFoodAndBeverage:()=>kG,faHealth:()=>RG,faHotels:()=>OG,faPalette:()=>LG,faParking:()=>FG,faRoute:()=>NG,faServices:()=>zG,faShopping:()=>BG,faUser:()=>jG});var SG={prefix:"fak",iconName:"airport",icon:[448,512,[],"e009","M431.4 140.8c-.2-.7-.6-1.3-1.1-1.9-14.7-18.5-41.3-23.7-61.9-11.8l-84.5 48.8-49.6-32.1 4.1-2.4c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-10.7 6.3-28-18.2 4.1-2.4c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-10.7 6.3-66.7-43.2-44.9 25.9 133.4 134.5-54.3 31.4c-10.7 6.1-27.7 21.2-41 36.2L33.3 254.2c-2.3-1.2-5.1-1.2-7.2 .1L4.2 266.9C2.3 268 1 270.1 .6 272.2s.4 4.5 1.9 6.1l65.4 70.9 28.8 92.1c.7 2.2 2.3 3.9 4.5 4.7 .8 .4 1.8 .5 2.8 .5 1.3 0 2.5-.4 3.7-1l21.9-12.6c2.3-1.3 3.6-3.6 3.7-6.1l2.9-80.6c19.7-4.1 41.3-11.3 51.9-17.5l54.3-31.4 49.8 182.7 44.9-25.9-4.1-79.3 10.7-6.3c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-4.1 2.4-1.7-33.5 10.7-6.3c3.6-2 4.8-6.6 2.8-10.2s-6.6-4.8-10.2-2.8l-4.1 2.4-3-59.1 84.5-48.7c20.6-11.8 29.4-37.4 20.7-59.5l-.4 .5z"]},EG={prefix:"fak",iconName:"arrow-top-right",icon:[427,512,[],"e010","M41 490.7l0-320 275.1 0-88.6-95.3 35.1-38 147.7 160-148.3 160.7-34.5-38 88.6-96-225.8 0 0 266.7-49.2 0z"]},xS={prefix:"fak",iconName:"background",icon:[388,512,[],"e00a","M387.9 193.9C387.9 86.9 301 0 193.9 0S0 86.9 0 193.9 84.7 385.6 190.1 387.7l0 67.8c-11.6 1.9-20.5 11.9-20.5 24 0 13.5 11 24.4 24.4 24.4s24.4-11 24.4-24.4c0-12.1-8.8-22.2-20.5-24l0-67.8c105.3-2 190.1-88 190.1-193.8zM210.5 479.4c0 9.2-7.4 16.6-16.6 16.6s-16.6-7.4-16.6-16.6 7.4-16.6 16.6-16.6 16.6 7.4 16.6 16.6z"]},IG={prefix:"fak",iconName:"beauty",icon:[576,512,[],"e000","M190.8 234.2c-21.8-10.6-45.1-16.3-66.9-18.6-.6-35.8 5.4-66.6 8.6-78.7 1-3.2 4.2-5.1 7.4-4.5 11.8 3.5 40 13.1 69.4 31.7-9 21.1-16 45.1-18.2 70.4l0 0zm176.6-70.4c29.1-18.6 57.6-28.2 69.4-31.7 3.2-.6 6.4 1 7.4 4.5 3.2 12.5 9.3 42.9 8.6 78.7-22.1 2.2-45.1 8-66.9 18.6-2.2-25.3-9-49-18.2-70.4l0 0zM260.9 417.6c-33.9 6.1-94.1 10.2-143.7-19.8-63-38.4-89-120-95-142.7-.6-3.2 1-6.7 4.2-7.7 21.8-5.8 101.1-23 163.8 14.4 5.1 71 49.6 131.2 70.4 155.5l0 0zM385.7 262.1c63-37.4 142.4-20.2 163.8-14.4 3.2 1 5.1 4.2 4.2 7.7-6.1 22.7-32 104.3-95 142.7-49.6 30.1-109.4 25.9-143.7 19.8 5.1-5.8 11.2-13.4 18.2-23 17.3-24 37.4-58.6 47-98.6 2.6-10.9 4.5-22.1 5.4-33.6l0 0zm-23.4-12.8c0 89.3-74.2 161.9-74.2 161.9s-74.2-72.6-74.2-161.9c0-76.8 54.4-140.8 70.1-157.8 2.2-2.2 6.1-2.2 8.3 0 15.7 17 70.1 81 70.1 157.8l0 0z"]},DG={prefix:"fak",iconName:"center",icon:[576,512,[],"e00f","M545.2 238.7l-50.9 0C486 138.2 406 57.9 305.5 49.9l0-50.9c0-9.6-8-17.3-17.3-17.3S271-10.6 271-1l0 50.9C170.5 58.2 90.5 138.2 82.2 238.7l-50.9 0c-9.6 0-17.3 8-17.3 17.3s7.7 17.3 17.3 17.3l50.9 0C90.5 373.4 170.5 454.1 271 462.1l0 50.9c0 9.6 8 17.3 17.3 17.3s17.3-7.7 17.3-17.3l0-50.9c100.2-8.3 180.8-88.6 188.8-188.8l50.9 0c9.6 0 17.3-7.7 17.3-17.3s-7.7-17.3-17.3-17.3zM459.1 256c0 5.8-.3 11.5-1 17.3-8 80.3-72.3 144.6-152.6 153-11.5 1.3-23 1.3-34.6 0-80.6-8.3-144.6-72.6-152.6-153l0 0c-.6-5.4-1-11.2-1-17.3s.3-11.5 1-17.3l0 0c8.3-80.6 72.3-144.6 152.6-152.6 11.5-1.3 23-1.3 34.6 0 80.3 8.3 144.6 72.3 152.6 152.6 .6 5.8 1 11.5 1 17.3zm-271.2 0a100.1 100.1 0 1 1 200.2 0 100.1 100.1 0 1 1 -200.2 0z"]},TG={prefix:"fak",iconName:"compass",icon:[256,512,[],"e00d","M238.9 263.4l0 257.6-47 0-118.4-163.2 0 163.2-55.7 0 0-257.6 47 0 118.4 161.6 0-161.6 55.7 0zM26.8 203.5c-3.2 0-5.8-1.3-7.7-3.5-1.6-2.2-1.9-4.8-.6-7L119.9-4.2C121.2-7 124.7-9 128.2-9s7 1.9 8.3 4.8L238 193c1.6 3.2 .6 6.7-2.6 9s-7.7 2.2-10.9 .6l-96.3-53.4-96.3 53.4s-3.2 1.3-5.1 1.3l0 0z"]},MG={prefix:"fak",iconName:"compass-north",icon:[382,512,[],"e00b","M202.8 6.9c-6.5-6.5-17-6.5-23.6 0L112.5 73.6c-4.8 4.8-6.2 11.9-3.6 18.2 2.6 6.2 8.7 10.4 15.4 10.4l133.4 0c6.7 0 12.9-4 15.4-10.4 2.6-6.2 1.2-13.3-3.6-18.2L202.8 6.9zM191 133a190.5 190.5 0 1 0 0 381 190.5 190.5 0 1 0 0-381zm38.9 278.1l-74.7-107.9 0 97.6c0 9.9-8 17.9-17.9 17.9s-17.9-8-17.9-17.9l0-154.7c0-7.9 5.1-14.8 12.5-17s15.6 .5 20 6.9l74.7 107.9 0-97.6c0-9.9 8-17.9 17.9-17.9s17.9 8 17.9 17.9l0 154.7c0 7.9-5 14.8-12.5 17-7.4 2.3-15.6-.5-20-6.9z"]},PG={prefix:"fak",iconName:"deals",icon:[512,512,[],"e007","M256 0a256 256 0 1 0 0 512 256 256 0 1 0 0-512zm0 30.1a225.9 225.9 0 1 1 0 451.8 225.9 225.9 0 1 1 0-451.8zM288 232l-10.2-2.2 0-66.9c19.5 6.1 30.7 23 36.8 41.6l46.7-18.6c-9.3-32-34.2-63.7-83.2-70.7l0-33.6-35.5 0 0 33.3c-53.4 5.8-81.3 41.6-81.3 80.6 0 51.5 30.1 73.3 73 81.3l8 1.6 0 72.3c-26.9-7.4-40.6-31-44.8-53.8l-49 18.6 .3 0c9.3 39.7 38.7 75.8 93.8 82.2l0 33.6 35.5 0 0-33.3c58.9-5.8 86.1-42.2 86.1-83.8 0-50.9-37.4-73-75.8-82.2zm-45.8-70.7l0 61.8c-17.6-4.8-27.5-13.8-27.5-31 0-12.5 7.7-26.2 27.5-30.7l0 0zM277.8 351l0-66.9c19.8 4.8 32 16 32 32.6s-9.6 30.1-32 34.2z"]},AG={prefix:"fak",iconName:"events",icon:[576,512,[],"e003","M421.4 122.6c-24.3-24.3-27.2-62.1-8.6-89.6 1.6-2.2 1.3-5.4-.6-7.4L370.2-16.3c-2.2-2.2-5.8-2.2-8 0L132.8 213.1c-2.2 2.2-2.2 5.8 0 8l11.5 11.5c3.5 3.5 3.5 9.3 0 12.8s-9.3 3.5-12.8 0L120 233.9c-2.2-2.2-5.8-2.2-8 0L15.7 330.2c-2.2 2.2-2.2 5.8 0 8l41.9 41.9c1.9 1.9 5.1 2.2 7.4 .6 27.5-18.6 65.3-15.7 89.6 8.6s27.2 62.1 8.6 89.6c-1.6 2.2-1.3 5.4 .6 7.4l41.9 41.9c2.2 2.2 5.8 2.2 8 0L310.1 432c2.2-2.2 2.2-5.8 0-8l-11.5-11.5c-3.5-3.5-3.5-9.3 0-12.5 3.5-3.5 9.3-3.5 12.5 0l11.5 11.5c2.2 2.2 5.8 2.2 8 0L560 182.1c2.2-2.2 2.2-5.8 0-8l-41.9-41.9c-1.9-1.9-5.1-2.2-7.4-.6-27.5 18.6-65.3 15.7-89.6-8.6zm-225 174.7c-4.5 4.5-11.8 4.5-16.3 0L152 269.1c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0L196.5 281c4.5 4.5 4.5 11.8 0 16.3zM247 344.6c-4.5 4.5-11.8 4.5-16.3 0l-28.2-28.2c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0L247 328.3c4.5 4.5 4.5 11.8 0 16.3zm48.3 48c-4.5 4.5-11.8 4.5-16.3 0l-28.2-28.2c-4.5-4.5-4.5-11.8 0-16.3s11.8-4.5 16.3 0l28.2 28.2c4.5 4.5 4.5 11.8 0 16.3zM421.4 229.1c-.3 2.9-2.6 5.4-5.1 6.7l-43.2 18.9c-1.9 1-3.5 2.2-4.2 4.2l-18.9 43.2s-1 1.9-1.9 2.6c-1.3 1.3-2.9 2.2-4.8 2.6-2.9 .3-6.1-.6-8-2.9l-31-35.2c-1.3-1.6-3.5-2.6-5.4-2.9l-46.7-4.5c-2.9 0-5.8-2.2-7-4.8s-1.3-6.1 0-8.3l23.7-40.3c1-1.9 1.6-4.2 1-6.1l-10.2-45.8c-.6-2.9 0-6.1 2.2-8.3s5.1-2.9 8.3-2.2l45.8 10.2c2.2 .3 4.2 0 6.1-1l40.3-23.7c2.6-1.6 5.8-1.6 8.3 0 2.6 1.3 4.5 4.2 4.8 7l4.5 46.7c0 2.2 1.3 4.2 2.9 5.4l35.2 31c2.2 1.9 3.2 5.1 2.9 8l0 0z"]},kG={prefix:"fak",iconName:"food-and-beverage",icon:[512,512,[],"e001","M497.9 145.9l-127 0 0-114.6-24 0 0 114.6-127.4 0c-8 0-14.4 6.4-14.4 14.4l0 17.3c0 8 6.4 14.4 14.4 14.4l19.2 0 3.5 53.8c-61.1-30.1-140.5-23.4-192.6 18.2-29.1 23-47.4 55-48.6 90.6 0 5.1 3.8 9.3 9 9.3l301.4 0c5.1 0 9.3-4.2 9-9.3-1.6-43.5-28.8-80.6-66.6-103l-3.8-59.5 218.9 0-17 259.2c-.6 10.9-11.8 18.2-23 18.2l-116.2 0c5.1-4.5 8.6-10.9 8.6-18.2l0-19.5c0-4.8-4.2-8.3-9-8.3l-303 0c-4.8 0-9 3.5-9 8.3l0 19.5c0 17.9 19.2 29.4 37.4 29.4l390.4 0c17-.3 32.6-11.8 33.6-28.8L479 192 498.2 192c8 0 14.4-6.4 14.4-14.4l0-17.3c0-8-6.4-14.4-14.4-14.4zm3.8 31.7c0 1.9-1.6 3.8-3.8 3.8l-278.4 0c-1.9 0-3.8-1.6-3.8-3.8l0-17.3c0-1.9 1.6-3.8 3.8-3.8l278.4 0c1.9 0 3.8 1.6 3.8 3.8l0 17.3zM9.3 402.9l301.8 0c4.8 0 8.6-3.8 8.6-8.6s-3.8-8.6-8.6-8.6l-301.8 0c-4.8 0-8.6 3.8-8.6 8.6s3.8 8.6 8.6 8.6z"]},RG={prefix:"fak",iconName:"health",icon:[512,512,[],"e002","M256 0a256 256 0 1 0 0 512 256 256 0 1 0 0-512zm0 30.1a225.9 225.9 0 1 1 0 451.8 225.9 225.9 0 1 1 0-451.8zM393.9 212.5l-94.4 0 0-94.4c0-5.1-4.2-9.3-9.3-9.3l-68.5 0c-5.1 0-9.3 4.2-9.3 9.3l0 94.4-94.4 0c-5.1 0-9.3 4.2-9.3 9.3l0 68.5c0 5.1 4.2 9.3 9.3 9.3l94.4 0 0 94.4c0 5.1 4.2 9.3 9.3 9.3l68.5 0c5.1 0 9.3-4.2 9.3-9.3l0-94.4 94.4 0c5.1 0 9.3-4.2 9.3-9.3l0-68.5c0-5.1-4.2-9.3-9.3-9.3z"]},OG={prefix:"fak",iconName:"hotels",icon:[512,512,[],"e00c","M50.1 357.8l8.1-18.1 80.6 36.1-8.1 18.1zm462.7 78.7L428 207.7c14.4-8.6 26.2-21.4 33.9-36.8 10.9-22.4 11.8-48 3.2-72.3-17.9-48.3-71.7-74.9-119.7-59.2-17 5.4-31.4 15.7-42.2 29.4-7.7-2.2-15.7-3.5-23.7-4.5-3.5-.3-6.7 0-10.2-.3-1.6-4.5-3.5-8.3-5.8-11.2-2.2-3.2-5.4-6.4-9.3-9.9-14.4-12.8-32.3-21.1-51.2-22.7-5.1-.3-9.6-.6-13.4 0-4.8 .3-10.2 2.2-16 5.1-10.9 5.4-20.5 13.4-28.8 23.7L46.2 171.8c-8.3 10.9-15 23-19.8 35.5-5.4 12.5-9.3 25.9-10.9 40.3L-.5 407c-1.3 13.1 0 25.9 3.5 37.8 1.9 6.4 4.5 11.2 7.4 15.4 2.2 3.2 5.4 6.4 9.3 9.9 14.4 12.8 32.3 21.1 51.2 22.7 2.9 .3 5.4 .3 8 .3l0 0c1.9 0 3.8 0 5.4-.3 4.8-.3 10.2-2.2 16-5.1 10.9-5.4 20.5-13.4 28.8-23.7l98.6-122.9c8.3-10.9 15-23 19.8-35.5 5.4-12.5 9.3-25.9 10.9-40l13.8-136.3 1.9 0c3.5 .3 6.7 .3 10.2 .3 .6 9.3 1.9 18.6 5.4 27.8 14.4 39 52.2 63.7 91.2 63.7 3.2 0 6.4-.3 9.6-.6l42.9 116.5-44.5 14.4 12.2 37.8 46.1-15 6.4 17-59.5 19.5 12.2 37.8 61.1-19.8 8.3 22.1 37.1-13.8zM237.6 92.5c2.9-1.6 9-3.5 17.3-4.5 .3 4.2 0 8.3 0 12.8-8.6-2.9-14.7-6.1-17.3-8.3zm1.3 170.2c-1.3 11.8-4.5 23.7-9.6 34.9-4.2 10.9-9.9 21.4-17 30.7L114 450.9c-6.4 8-13.8 14.1-22.1 18.2-4.5 2.2-7.7 2.9-9.3 3.2l-9.3 0c-14.7-1.3-28.5-7.7-40-17.9-2.9-2.6-5.1-4.8-6.7-7-1-1.3-2.6-4.2-4.2-9.6-2.6-9.3-3.8-19.2-2.6-29.8L36 248.6c1.6-11.8 4.8-23.7 9.6-34.9 4.2-10.9 9.9-21.4 17-30.7L161.1 60.5c6.4-8 13.8-14.1 22.1-18.2 4.5-2.2 7.7-2.9 9.3-3.2l9.3 0c14.7 1.3 28.5 7.7 40 17.9 2.6 2.6 5.1 5.1 6.4 7l.3 .6c-8 1.3-14.7 3.2-20.5 6.1-2.6-3.2-5.8-6.1-9.6-8-6.4-2.9-13.8-3.2-20.5-.3s-12.2 8.3-15 15c-5.8 14.1 .6 30.4 14.1 36.2 3.5 1.6 7 2.2 10.9 2.2 3.2 0 6.7-.6 9.9-1.9 1.9-1 3.5-2.2 5.1-3.5 7.4 6.1 17.9 10.9 30.1 14.1L239.2 262.1zM212.9 93.1s-1.6 2.2-2.9 2.9c-1 .6-2.9 1-5.1 0-3.8-1.6-5.4-6.4-3.8-10.6 .6-1.9 2.2-3.2 4.2-4.2 1-.6 2.9-1 5.1 0 1.9 .6 3.2 2.2 3.8 4.2-.6 1.9-1.3 3.5-1.3 5.1l0 2.6zM274.4 105c.6-5.8 .6-11.5 0-17.3l2.9 0c5.1 .6 9.6 1.3 13.4 2.2-2.2 5.1-3.8 10.2-5.1 15.7-3.2 0-6.1 0-9.6-.3l-1.9 0zm52.5 38.4c-2.6-6.7-3.5-13.4-3.5-20.2 3.5-1.6 6.7-3.2 9-5.4 6.4-5.1 8-11.2 8.3-15.4 .3-4.5-1-8.6-3.2-12.5 5.4-5.8 12.2-10.9 20.2-13.4 28.2-9.3 59.5 6.7 70.1 35.2 5.1 13.8 4.5 28.5-1.6 41.3-5.8 12.2-16.3 21.1-29.1 25.3-28.2 9.3-59.5-6.7-70.1-35.2z"]},LG={prefix:"fak",iconName:"palette",icon:[512,512,[],"e012","M453 132.6q11.2 21.2 11.2 45.1 0 46.9-37.3 64.8-5 2.4-15.2 6.6-12.9 5.4-18.9 8.5-9.8 5.1-16.3 11.1-9.2 8.5-9.1 25.7 .1 15.5 6.8 29.9 1.8 3.8 6.4 11.3 7.5 12.4 9.8 19.5 4.5 13.4 1.6 28.4-2.6 14-10.8 26.2-19.1 28.3-58.2 41.8-31.3 10.8-70.2 10.8-51.4 0-93.2-17.6-38.5-16.2-66.1-46-25.6-27.6-39.1-63.9-12.9-34.5-12.9-71.3 0-34.2 12.7-68.8 13.3-36.4 38-65.7 26.9-31.9 63.7-50.6 40.5-20.6 89.3-23.3 77.1-4.2 132.6 17 2.2 .8 3.1 2.9t.1 4.3-2.9 3.1-4.3 .1q-53.3-20.4-128-16.3-46.5 2.6-84.8 22.1-34.8 17.7-60.2 47.9-23.4 27.8-36.1 62.3-12 32.7-12 65 0 34.8 12.2 67.4 12.7 34.2 36.9 60.2 26 28 62.2 43.3 39.7 16.7 88.9 16.7 37.1 0 66.6-10.2 35.5-12.3 52.5-37.5 6.9-10.3 9.1-22 2.3-12.2-1.3-22.9-2-6-8.8-17.2-4.8-8-6.9-12.4-7.8-16.7-7.9-34.6-.1-22.1 12.8-34 7.6-6.9 18.6-12.7 6.5-3.4 19.8-8.9 9.9-4.1 14.6-6.4 30.9-14.8 30.9-54.7 0-21.1-9.9-39.8-1.1-2-.4-4.3t2.7-3.3 4.3-.4 3.3 2.7zM289.7 405.3a29.3 29.3 0 1 0 0-58.7 29.3 29.3 0 1 0 0 58.7zM267.6 162.8a29.3 29.3 0 1 0 0-58.7 29.3 29.3 0 1 0 0 58.7zM164.7 199.5a29.3 29.3 0 1 0 0-58.7 29.3 29.3 0 1 0 0 58.7zm-44.1 103a29.3 29.3 0 1 0 0-58.7 29.3 29.3 0 1 0 0 58.7zm58.8 88a29.3 29.3 0 1 0 0-58.7 29.3 29.3 0 1 0 0 58.7zM299.1 181.9c8.5 7.4 16.6 15.7 24.3 25l0 0c3.9 4.7 7.7 9.6 11.2 14.6l-19.8 21.1c1.1 12-3 24.4-12.3 33.7-.4 .4-.8 .7-1.3 1-11.3 10.6-26.1 17.2-40.8 19.9-15.1 2.8-30.7 1.5-42.4-4.3-1.6-.8-2.7-2.3-3-4.1s.3-3.6 1.6-4.9c6-6 9.1-11.4 10.8-16.5 1.8-5.2 2.2-10.2 2.6-15.6 .6-10.8 .6-23.3 12.7-35.4 9-9 21-13 32.7-12.3l22.7-21.2 1.1-1zm130.1-122c8.1-7.5 21.1-7.4 28.9 .4 4 4 6.1 9.1 6.1 14.4 .2 5.5-1.9 10.6-5.7 14.5l0 0-116.2 123.9c-3.3-4.6-6.8-9.1-10.4-13.4l0 0c-7.8-9.4-16-17.9-24.7-25.5l121.9-114.3 0 0z"]},FG={prefix:"fak",iconName:"parking",icon:[448,512,[],"e006","M16 0L246.4 0C356.5 0 432 63.7 432 165.4S356.5 332.2 247 332.2l-119.7 0 0 179.8-111.4 0 0-512zM315.8 165.4c0-45.1-36.5-73.3-89.3-73.3l-98.9 0 0 147.8 98.9 0c52.8 0 89.3-26.9 89.3-74.6z"]},NG={prefix:"fak",iconName:"route",icon:[384,512,[],"e00e","M22.7 206.4c-3.2-3.2-5.1-7.7-4.5-11.8 .3-4.2 3.2-7.4 7-8.6L347.8 82.6c4.8-1.6 10.2 0 14.1 4.2 3.8 3.8 5.8 9.6 4.2 14.1L262.7 423c-1.6 5.1-6.7 7.7-12.2 6.7-5.8-1-10.6-5.8-12.2-11.2L192.3 257 30.4 210.6c-2.6-.6-4.8-2.2-6.7-4.2l-.3 0z"]},zG={prefix:"fak",iconName:"services",icon:[512,512,[],"e005","M89.6 51.2l102.4 0c7 0 12.8-5.8 12.8-12.8S199 25.6 192 25.6l-140.8 0C22.7 25.6 0 48.6 0 76.8l0 384C0 489.3 23 512 51.2 512L192 512c7 0 12.8-5.8 12.8-12.8S199 486.4 192 486.4l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 435.2 192 435.2l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 384 192 384L89.6 384c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 332.8 192 332.8l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 281.6 192 281.6l-102.4 0c-7 0-12.8-5.8-12.8-12.8S82.6 256 89.6 256L192 256c7 0 12.8-5.8 12.8-12.8S199 230.4 192 230.4l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 179.2 192 179.2l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 128 192 128L89.6 128c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l102.4 0c7 0 12.8-5.8 12.8-12.8S199 76.8 192 76.8l-102.4 0c-7 0-12.8-5.8-12.8-12.8s5.8-12.8 12.8-12.8l0 0zM460.8 385.3l0-1.3c0-33.6-28.8-63.4-72.6-81.9 21.4-26.9 21.4-73.3 21.4-97.3 0-25.6-17.3-204.8-38.4-204.8s-38.4 179.2-38.4 204.8c0 20.2 .3 70.1 21.8 97.3-44.2 18.6-73 48.3-73 81.9l0 1.3c-29.1 6.1-51.2 31.7-51.2 62.7 0 35.5 28.8 64 64 64s64-28.8 64-64c0-31-22.1-57-51.2-62.7l0-1.3c0-23.4 25.3-46.7 64-61.4 39 14.7 64 38.1 64 61.4l0 1.3c-29.4 6.1-51.2 31.7-51.2 62.7 0 35.5 28.8 64 64 64s64-28.8 64-64c0-31-22.1-57-51.2-62.7l0 0zM256 448a38.4 38.4 0 1 1 76.8 0 38.4 38.4 0 1 1 -76.8 0zM371.2 256a12.8 12.8 0 1 1 0 25.6 12.8 12.8 0 1 1 0-25.6zM448 409.6a38.4 38.4 0 1 1 0 76.8 38.4 38.4 0 1 1 0-76.8z"]},BG={prefix:"fak",iconName:"shopping",icon:[512,512,[],"e004","M498.1 501.1L446.6 107.8c-.6-4.8-4.8-8.6-9.6-8.6l-76.5 0 0-22.4c0-42.6-34.6-77.1-77.1-77.1-9.3 0-17.9 1.6-26.2 4.8-8.3-2.9-17-4.8-26.2-4.8-42.6 0-77.1 34.6-77.1 77.1l0 22.4-77.8 0c-4.8 0-9 3.5-9.6 8.6L14.9 501.1c0 2.9 .3 5.4 2.2 7.7s4.5 3.2 7.4 3.2l464.3 0c2.9 0 5.4-1.3 7.4-3.2s2.6-5.1 2.2-7.7l0 0zM354.4 481.3l47.7-362.6 26.6 0 47.7 364.2zM283.1 19.5c32 0 57.6 25.9 57.6 57.6l0 22.4-33 0 0-22.4c0-23-10.2-43.5-25.9-57.6l1.3 0zm-25.9 6.4c18.6 9.6 31.4 28.8 31.4 51.2l0 22.4-63 0 0-22.4c0-22.4 12.8-41.9 31.4-51.2l0 0zM173 77.1c0-32 25.9-57.6 57.6-57.6l1.3 0c-16 14.1-25.9 34.9-25.9 57.6l0 22.4-33 0 0-22.4z"]},jG={prefix:"fak",iconName:"user",icon:[320,512,[],"e008","M190.7 104l0 0c28.8 0 52.2-23.4 52.2-52.2S219.5-.3 190.7-.3l0 0c-28.8 0-52.2 23.7-52.2 52.2s23.7 51.8 52.2 51.8zM75.8 381.1l0 0c-.6 1.6-1.6 3.2-2.9 4.8-11.5 13.8-22.7 27.2-34.2 41L12.1 458.6c-5.4 6.4-4.5 16 1.9 21.4l20.5 17.3c2.9 2.2 6.1 3.5 9.9 3.5 4.5 0 8.6-1.9 11.5-5.4 12.2-14.4 38.1-45.1 51.8-61.4 1.6-1.9 3.5-4.2 5.4-6.1 4.8-5.1 9.3-10.6 12.8-16.6 4.8-9 9.3-18.2 13.1-27.5L88.6 345.6c-4.2 11.8-8 23.7-12.2 35.2zM312 223.7l-1.3 0c-6.7-1-13.1-2.2-19.5-3.8-39.4-11.8-62.1-33-71.7-65.9-1.9-6.7-5.1-12.8-9-18.6-10.2-15.4-26.2-25.6-44.2-28.2-16.3-2.9-32.6 1.6-45.4 11.8-17.3 14.1-35.8 26.9-53.8 39.4L63 161.3c-10.2 7-19.5 16.3-26.6 26.9-9.9 14.1-20.2 28.2-30.7 42.2l-7 9.6c-4.8 6.7-3.5 16.3 3.2 21.1l21.8 15.7c6.7 4.8 16.3 3.5 21.1-3.5l7-9.6c11.8-16.3 23-32 34.9-47.4 2.2-2.6 4.5-5.1 7.4-7l-9.6 54.4c-3.5 19.2 3.5 38.4 18.2 50.9 11.8 9.9 24 20.2 35.8 30.1 13.4 11.2 26.9 22.4 40.3 33.9 1.6 1.3 2.9 3.2 3.8 5.4 7.7 20.5 15 41 22.4 61.4l20.5 56.3c2.2 6.1 8 9.9 14.1 9.9 1.6 0 3.5 0 5.1-1l25-9c7.7-2.9 11.8-11.5 9-19.2-9-25.3-33.9-94.1-47.7-131.2-1.3-2.9-2.9-5.4-5.4-7.7-13.8-11.8-27.5-23.7-41.6-34.9-1.6-1.3-2.2-1.6-1.3-5.4 2.9-11.2 5.1-22.4 6.7-33.6 2.2-16.3 4.2-28.8 7-42.9 29.4 31.7 69.8 50.6 112.6 53.4 4.2 0 8-1.3 11.2-3.8 3.2-2.9 4.8-7 4.8-11.2l0-26.9c0-7.7-5.8-14.1-13.1-15z"]};var Zo=class n{onDestroy=new wr;logger=Me(Pn);mapService=Me(xi);navigatorService=Me(Po);loadedDataService=Me(ui);iconLibraryService=Me(Yn);document=Me(Wr);markers=new Set;_hasCurrentLocationMarker=!1;ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}getIconFromPlace(r){this.logger.log("getIconFromPlace",r);let[i,l]=s1(r.localizedCategory||"");return this.iconLibraryService.getIconDefinition(i,l)}toSVGString(r){return _S(i=>{i(wS(xS)),i(wS(r))}).html.join("")}createPlaceMarkerElement(r){let i=this.getIconFromPlace(r);return this.createElement(r.lazarilloId,i)}createOriginMarkerElement(){let r=this.iconLibraryService.getIconDefinition("fak","user");return this.createElement("origin",r,["route-marker","origin-marker"])}createElement(r,i,l=[]){let d=this.document.createElement("div");return d.className="marker",d.classList.add(...l),d.id=`${r}-marker`,d.innerHTML=this.toSVGString(i),d}addMarker(r){if(this.markers.has(r.lazarilloId)){this.logger.log("Marker already exists for place",r.lazarilloId);return}let i={element:this.createPlaceMarkerElement(r),id:r.lazarilloId,coordinate:r.position,floorId:r.inFloors?.[0],onClick:()=>{this.logger.log("Marker clicked for place",r.lazarilloId),this.logger.logEvent("marker_clicked",{id:r.lazarilloId,name:r.title,clientId:r.clientId||""}),this.navigatorService.navigateToProfile(r.lazarilloId)},anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId),this.logger.log("Marker added for place",r.lazarilloId)}addInitialMarkers(){this.loadedDataService.getAvailablePlaces().pipe(Ls(1),os(this.onDestroy)).subscribe({next:r=>{for(let i of r)this.addMarker(i)},error:r=>{this.logger.logWarning("Error adding initial markers",r)}})}addMarkers(r){this.mapService.mapReady.pipe(bi(i=>i),Ls(1),os(this.onDestroy)).subscribe({next:()=>{this.removeAllMarkers();for(let i of r)this.addMarker(i)},error:i=>{this.logger.logWarning("Error adding markers",i)}})}removeAllMarkers(){for(let r of this.markers)this.mapService.removeMarker(r);this.markers.clear()}hasMarker(r){return this.markers.has(r)}selectMarker(r){if(!this.markers.has(r)){this.logger.logWarning("Marker not found",r);return}let i=this.document.getElementById(`${r}-marker`);if(!i){this.logger.logWarning("Marker not found",r);return}i.classList.add("selected")}deselectMarker(r){if(!this.markers.has(r)){this.logger.logWarning("Marker not found",r);return}let i=this.document.getElementById(`${r}-marker`);if(!i){this.logger.logWarning("Marker not found",r);return}i.classList.remove("selected")}deselectMarkers(){let r=this.document.querySelectorAll(".marker.selected");for(let i of r)i.classList.remove("selected")}addOriginMarker(r){let i={element:this.createOriginMarkerElement(),id:"origin",coordinate:r,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add("origin")}addDestinationMarker(r){let i={element:this.createElement(r.lazarilloId,this.getIconFromPlace(r),["route-marker","destination-marker"]),id:r.lazarilloId,coordinate:r.position,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId)}addRouteMarker(r){let i={element:this.createElement(r.lazarilloId,this.getIconFromPlace(r),["route-marker"]),id:r.lazarilloId,coordinate:r.position,anchor:"bottom"};this.mapService.addMarker(i),this.markers.add(r.lazarilloId)}addRouteMarkers(r){for(let i of r)this.addRouteMarker(i)}createCurrentLocationMarkerElement(){let r=this.document.createElement("div");return r.className="current-location-marker",r.id="current-location-marker",r.innerHTML=vA,r}addCurrentLocationMarker(r){let i={element:this.createCurrentLocationMarkerElement(),id:"current-location",coordinate:r,anchor:"bottom"};this.mapService.addMarker(i),this._hasCurrentLocationMarker=!0}updateCurrentLocationMarker(r){this.mapService.updateMarkerPosition("current-location",r)}getCurrentLocationMarkerElement(){return this.document.getElementById("current-location-marker")}get hasCurrentLocationMarker(){return this._hasCurrentLocationMarker}removeCurrentLocationMarker(){this.mapService.removeMarker("current-location"),this._hasCurrentLocationMarker=!1}prepareToMapReuse(){this.removeAllMarkers()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var Wd=class n{sdkService=Me(na);logger=Me(Pn);markerService=Me(Zo);currentlyWatchingLocation=ln(!1);currentLocation=new Hr(null);currentBearing=new Hr(null);hasBearingPermission=!1;watchId;async checkLocationPermission(){return"permissions"in navigator?navigator.permissions.query({name:"geolocation"}).then(async r=>r.state).catch(r=>(this.logger.logWarning(r),"denied")):(this.logger.log("Permissions API not supported"),"denied")}async requestLocationPermission(){return new Promise(r=>{navigator.geolocation.getCurrentPosition(()=>{console.log("requestLocationPermission granted"),r("granted")},i=>{console.log("requestLocationPermission denied",i),i.code===3?r("prompt"):r("denied")},{enableHighAccuracy:!0,timeout:5e3})})}async getCurrentLocation(){return this.currentlyWatchingLocation()&&this.currentLocation.value!=null?this.currentLocation.value:new Promise((r,i)=>{navigator.geolocation.getCurrentPosition(l=>{r(f_(l))},l=>{i(new Error("Error getting current location",{cause:l}))},{enableHighAccuracy:!0})})}checkBearingLocation(){typeof DeviceOrientationEvent<"u"&&"requestPermission"in DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission().then(i=>{this.hasBearingPermission=i==="granted"}).catch(i=>{this.logger.logWarning(i),this.hasBearingPermission=!1}),this.hasBearingPermission=!0}startWatching(){this.checkBearingLocation(),console.log("startWatching"),console.log("hasBearingPermission",this.hasBearingPermission),this.currentlyWatchingLocation.set(!0),!this.watchId&&(this.watchId=this.sdkService.watchUserLocation(r=>{this.currentLocation.next(r)},r=>{this.logger.logWarning("Error watching user location",r)}),this.hasBearingPermission&&this.sdkService.watchUserHeading(r=>{this.currentBearing.next(r)},r=>{this.logger.logWarning("Error watching user bearing",r)}))}stopWatching(){this.watchId&&this.sdkService.stopWatchingUserLocation(this.watchId),this.hasBearingPermission&&this.sdkService.stopWatchingUserHeading(),this.watchId=void 0,this.markerService.removeCurrentLocationMarker(),this.currentlyWatchingLocation.set(!1)}temporalStopWatching(){this.watchId&&this.sdkService.stopWatchingUserLocation(this.watchId),this.hasBearingPermission&&this.sdkService.stopWatchingUserHeading(),this.watchId=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var a1=(d=>(d[d.NotStarted=0]="NotStarted",d[d.Playing=1]="Playing",d[d.Paused=2]="Paused",d[d.Finished=3]="Finished",d))(a1||{});var wc=class n{logger=Me(Pn);mapService=Me(xi);sdkService=Me(na);platformId=Me(Dl);document=Me(Wr);animationStatusSubject=new Hr(0);activeRouteSubject=new Hr(null);currentStepSubject=new Hr(null);getRoute(r,i){return this.sdkService.getRoute(r,i)}getSecondaryOrangeColor(){if(!gc(this.platformId))return"#EE5845";try{return getComputedStyle(this.document.documentElement).getPropertyValue("--definitions-colors-secondary-orange").trim()}catch(r){return this.logger.logWarning("Error getting --definitions-colors-secondary-orange:",r),"#EE5845"}}startAnimatingRoute(r){let i=this.getSecondaryOrangeColor(),l={behindPathStyle:{type:"Solid",color:i},aheadPathStyle:{type:"Solid",color:"#000000"},routeIcon:this.getRouteIcon(i)},d={callBack:({isFinished:a,step:S})=>{a?(this.animationStatusSubject.next(3),this.currentStepSubject.next(null)):(this.animationStatusSubject.next(1),this.currentStepSubject.next(S))}};this.animationStatusSubject.next(1),this.activeRouteSubject.next(r),this.mapService.startAnimatingRoute(r,l,d)}getRouteIcon(r){let i=this.document.createElement("div");return i.className="route-icon",i.id="route-icon",i.innerHTML=`<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
1510
1510
  <circle cx="15" cy="15" r="15" fill="${r}"/>
1511
1511
  <path d="M10.0788 19.6042L14.5476 8.6442C14.7061 8.25536 15.0835 8 15.5013 8C15.9191 8 16.2965 8.25536 16.455 8.6442L20.9238 19.6042C21.1946 20.2717 20.7106 21 19.9932 21C19.7684 21 19.5523 20.9246 19.3766 20.7882L15.5013 17.75L11.6232 20.7882C11.4474 20.9246 11.2313 21 11.0066 21C10.292 21 9.80512 20.2687 10.076 19.6042H10.0788Z" fill="white"/>
1512
- </svg>`,i}pauseRouteAnimation(){this.animationStatusSubject.next(2),this.mapService.pauseAnimatingRoute()}resumeRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.resumeAnimatingRoute()}restartRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.restartAnimatingRoute()}removeRoute(){this.animationStatusSubject.next(0),this.activeRouteSubject.next(null),this.currentStepSubject.next(null),this.mapService.removeRoute()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var l1={term:"",results:[]};function c1(n,r){let i=r?.injector??Me(Ho),l=new ja(1),d=Un(()=>{let a;try{a=n()}catch(S){qo(()=>l.error(S));return}qo(()=>l.next(a))},{injector:i,manualCleanup:!0});return i.get(ea).onDestroy(()=>{d.destroy(),l.complete()}),l.asObservable()}function vo(n,r){let l=!r?.manualCleanup?r?.injector?.get(ea)??Me(ea):null,d=VG(r?.equal),a;r?.requireSync?a=ln({kind:0},{equal:d}):a=ln({kind:1,value:r?.initialValue},{equal:d});let S,O=n.subscribe({next:F=>a.set({kind:1,value:F}),error:F=>{a.set({kind:2,error:F}),S?.()},complete:()=>{S?.()}});if(r?.requireSync&&a().kind===0)throw new Yt(601,!1);return S=l?.onDestroy(O.unsubscribe.bind(O)),Qt(()=>{let F=a();switch(F.kind){case 1:return F.value;case 2:throw F.error;case 0:throw new Yt(601,!1)}},{equal:r?.equal})}function VG(n=Object.is){return(r,i)=>r.kind===1&&i.kind===1&&n(r.value,i.value)}var yi=class n{loadedDataService=Me(ui);homePlaces=ln([]);showCategoryFilters=ln(!0);showCityFilter=ln(!0);defaultToMap=ln(!1);activeView=ls(()=>this.defaultToMap()?"map":"grid");inputValue=ln("");selectedInstitution=ln("");hideDeals=ln(!1);cardWidth=ln(void 0);rowsPerPage=ln(2);initialInstitutionId=ln("");showDealLabels=ln(!1);lastListedPlaces=ln([]);categoryFiltersData=vo(this.loadedDataService.getInstitution().pipe(En(r=>{let i=r.properties;if(i){let l=i.filter(d=>"childPlaces"in d&&d.childPlaces!==void 0).map(d=>({placeData:"childPlaces"in d?d.childPlaces:[],name:d.title}));return l.splice(1,0,{name:"All",placeData:[]}),l}return[]})),{initialValue:[]});selectedFilter=ls({source:this.categoryFiltersData,computation:(r,i)=>{let l=r.map(a=>a.name),d=i?.value;return d&&l.includes(d)?d:r[0]?.name??""}});selectedCity=ls(()=>{let r=this.selectedInstitution(),i=this.loadedDataService.cityFilterOptions();return i.find(d=>d.institutionId===r)||i.length>0?i[0]:void 0});filterId=Qt(()=>{let r=this.selectedCity();return r?r.filterId:this.initialInstitutionId()});currentPageIndex=ls({source:this.selectedFilter,computation:(r,i)=>r!==i?.source?1:i?.value??1});lastCardSelected=new wr;userAction=new wr;lastSearchData=ln(l1);static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var jR={fas:{},fak:{}},SS=[];function VR(n){Object.keys(n).forEach(function(r){if(r!=="prefix"){var i=n[r],l=i.icon[2];l.forEach(function(d){typeof d=="string"&&(jR[i.prefix][d]=i)}),jR[i.prefix][i.iconName]=i,SS.push(i)}})}VR(jC);VR(CS);var Ry=RI(FC());var u1=class n{destroy$=new wr;apiKey=ir("");institutionId=ir("");initialData=ir("");showCategoryFilters=ir(!0,{transform:r=>typeof r=="string"?r==="true":r});showCityFilter=ir(!0,{transform:r=>typeof r=="string"?r==="true":r});defaultToMap=ir(!1,{transform:r=>typeof r=="string"?r==="true":r});inheritFontFamily=ir(!1,{transform:r=>typeof r=="string"?r==="true":r});hideDeals=ir(!1,{transform:this.transformToBoolean});showDealLabels=ir(!1,{transform:this.transformToBoolean});cardWidth=ir(void 0,{transform:r=>{if(!(r==null||r==="")){if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?void 0:i}return typeof r=="number"&&r<=0?void 0:r}}});rowsPerPage=ir(2,{transform:r=>{if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?2:Math.min(Math.max(i,1),10)}return r<=0?2:Math.min(Math.max(r,1),10)}});cardSelected=_s();userAction=_s();router=Me(Ud);navigatorService=Me(Po);locationStrategy=Me(mc);platformId=Me(Dl);logger=Me(Pn);sdkService=Me(na);loadedDataService=Me(ui);homeStateService=Me(yi);iconLibrary=Me(ky);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;constructor(){this.loadIcons(),this.logger.sessionStart(),Un(()=>{let r=this.apiKey();r&&r.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(r.trim()),this.logger.setApiKey(r.trim()),this.loadData())}),Un(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),Un(()=>{let r=this.showDealLabels();this.homeStateService.showDealLabels.set(r)}),Un(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),Un(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),Un(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),Un(()=>{let r=this.initialData();r&&r.trim()!==""&&this.processInitialData(r)}),Un(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),Un(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),Un(()=>{let r=this.defaultToMap();this.logger.log("====> defaultToMap input",r),this.homeStateService.defaultToMap.set(r)}),Un(()=>{let r=this.institutionId();r&&r.trim()!==""&&(this.updateInstitution(r),this.logger.setInstitutionId(r))}),this.homeStateService.lastCardSelected.pipe(os(this.destroy$)).subscribe(r=>{this.cardSelected.emit(r),this.logger.log("====> cardSelected",r)}),this.homeStateService.userAction.pipe(os(this.destroy$)).subscribe(r=>{this.userAction.emit(r),this.logger.log("====> userAction",r)})}ngOnInit(){gc(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(...SS)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(r){this.loadedDataService.cityFilterOptions.set(r);let i=r[0];i&&this.homeStateService.selectedInstitution.set(i.institutionId);let l=r.filter(d=>d.type==="parent-place");Promise.all(l.map(async d=>{let a=async()=>{let O=await this.sdkService.getPlaceDetail(d.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(O)},S=async()=>{let O=await this.sdkService.getSubPlaces(d.parentPlaceId);this.loadedDataService.updateAvailablePlaces(O)};await Promise.all([a(),S()])}))}transformToBoolean(r){return typeof r=="string"?r==="true":r}processInitialData(r){try{let i=JSON.parse(r);if(i.availablePlaces){let d=i.availablePlaces.map(a=>new Ry.LzPlace(a)).filter(a=>a.generalCategory!=="transport"&&!a.hidePlace);this.loadedDataService.updateAvailablePlaces(d),this.logger.log(`\u2705 Successfully loaded ${d.length} places from initial data`)}if(i.institutions){let d=i.institutions.map(a=>new Ry.Institution(a)).find(a=>a.lazarilloId===this.institutionId());d?this.loadedDataService.setInstitution(d):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(i){this.logger.log("\u274C Error processing initial data",i),this.logger.log(`\u274C Data: ${r}`)}}async loadPlaces(){let r=gc(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${r}...`);let i=await this.sdkService.getAvailablePlaces(),l=i.filter(d=>d.generalCategory!=="transport"&&!d.hidePlace);this.loadedDataService.updateAvailablePlaces(l),this.logger.log(`\u2705 Successfully loaded ${i.length} places on ${r}`)}catch(i){this.logger.log(`\u274C Error loading initial places data on ${r}:`,i)}}async loadConfiguration(){try{let r=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(r);let i=r.cityOptions||[];this.loadCityFilterOptions(i),this.logger.log("\u2705 Successfully loaded configuration",r)}catch(r){this.logger.log("\u274C Error loading initial configuration",r)}}async loadInstitution(){try{let r=await this.sdkService.getInstitutions(),i=r.find(l=>l.lazarilloId===this.institutionId());this.loadedDataService.setInstitutions(r),i?(this.loadedDataService.setInstitution(i),this.logger.log("\u2705 Successfully loaded institution",i)):this.logger.log("\u274C Institution not found")}catch(r){this.logger.log("\u274C Error loading institution data",r)}}updateInstitution(r){let i=this.initialData();if(i&&i.trim()!==""){let l=JSON.parse(i);if(l.institutions){let d=l.institutions.map(S=>{try{return new Ry.Institution(S)}catch(O){this.logger.logWarning("\u274C Error parsing institution",O);return}}).filter(S=>S!==void 0),a=d.find(S=>S.lazarilloId===r);if(this.loadedDataService.setInstitutions(d),a){this.loadedDataService.setInstitution(a),this.logger.log("\u2705 Successfully updated institution",a);return}}}this.loadInstitution()}handleInstanceTracking(){n.instanceCount++;let r=this.checkForExistingRouterContent(),i=this.router.url;n.hasBeenConnected||r||i!=="/"&&n.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${n.instanceCount}`),this.logger.log(` - URL del router: ${i}`),this.logger.log(` - Contenido en router outlet: ${r}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${n.instanceCount})`),n.hasBeenConnected=!0}checkForExistingRouterContent(){try{let r=document.querySelector("router-outlet");return r?r.children.length>0:!1}catch{return!1}}ngAfterViewInit(){this.isConnected=!0,this.scheduleRouterInitialization()}ngOnDestroy(){this.logger.sessionEnd(),this.isConnected=!1,this.destroy$.next(),this.destroy$.complete()}scheduleRouterInitialization(){gc(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let r=this.router.url,i=this.router.routerState.root.firstChild;r==="/"&&!i?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(l=>{console.error("Error en navegaci\xF3n inicial:",l),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let r=gc(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},r)}checkAndFixRouterSync(){if(!gc(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let r=this.locationStrategy.getCurrentPath()||"/",i=this.router.url,l=this.router.routerState.root.firstChild,d=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${r}"`),this.logger.log(` - Router URL: "${i}"`),this.logger.log(` - Tiene ruta activa: ${!!l}`),this.logger.log(` - Contenido en router outlet: ${d}`),r==="/"&&i!=="/"||r==="/"&&!l&&d||r==="/"&&i==="/"&&d&&!l?(this.logger.log("\u26A0\uFE0F Desincronizaci\xF3n detectada - aplicando correcci\xF3n"),this.performGentleReset()):this.logger.log("\u2705 Router sincronizado correctamente")}performGentleReset(){this.logger.log("\u{1F504} Realizando reset suave del router"),this.router.navigateByUrl("/",{replaceUrl:!0}).then(()=>{this.logger.log("\u2705 Navegaci\xF3n correctiva completada")}).catch(r=>{console.error("\u274C Error en navegaci\xF3n correctiva:",r)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-root"]],inputs:{apiKey:[1,"apiKey"],institutionId:[1,"institutionId"],initialData:[1,"initialData"],showCategoryFilters:[1,"showCategoryFilters"],showCityFilter:[1,"showCityFilter"],defaultToMap:[1,"defaultToMap"],inheritFontFamily:[1,"inheritFontFamily"],hideDeals:[1,"hideDeals"],showDealLabels:[1,"showDealLabels"],cardWidth:[1,"cardWidth"],rowsPerPage:[1,"rowsPerPage"]},outputs:{cardSelected:"cardSelected",userAction:"userAction"},features:[r_([Po,yi,Zo,Yn,wc,Wd])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"router-outlet"),lt()()()),i&2&&(at(),ci("inherit-font-family",l.inheritFontFamily()))},dependencies:[o1,mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.named-container[_ngcontent-%COMP%]{container-name:mapvx-container;container-type:inline-size;width:100%}.app-container[_ngcontent-%COMP%]{display:flex;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:22px;background:var(--definitions-colors-background-50);font-family:Open Sans,sans-serif}.app-container.inherit-font-family[_ngcontent-%COMP%]{font-family:inherit}.app-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:19px}.app-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-h1);font-family:inherit}.app-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit}.main-navigation[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.nav-button[_ngcontent-%COMP%]{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s ease}.nav-button[_ngcontent-%COMP%]:hover{background:#ffffff4d;transform:translateY(-1px)}.nav-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.route-debug[_ngcontent-%COMP%]{margin-top:.5rem;text-align:center}.route-debug[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#fffc;font-size:.8rem;font-family:Courier New,monospace;background:#0000001a;padding:.25rem .5rem;border-radius:4px}.app-content[_ngcontent-%COMP%]{width:100%}"]})};var UG=["categoryFilters"];function $G(n,r){if(n&1){let i=Fr();it(0,"button",14),on("click",function(){pr(i);let d=qt();return mr(d.onClearInput())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=qt();at(),Ft("icon",i.faXmark)}}function GG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=qt(2);Ft("icon",i.faCaretUp)}}function HG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=qt(2);Ft("icon",i.faCaretDown)}}function qG(n,r){if(n&1){let i=Fr();it(0,"button",21),on("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.onCitySelect(d))}),sn(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function WG(n,r){if(n&1&&(it(0,"div",19),Ji(1,qG,2,1,"button",20,cf),lt()),n&2){let i=qt(2);at(),Qi(i.citiesOptions())}}function ZG(n,r){if(n&1){let i=Fr();it(0,"div",9)(1,"button",15),on("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),Mt(2,"fa-icon",6),lt(),it(3,"button",16),on("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),it(4,"span",17),sn(5),lt(),it(6,"div",18),Bn(7,GG,1,1,"fa-icon",6)(8,HG,1,1,"fa-icon",6),lt()(),Bn(9,WG,3,0,"div",19),lt()}if(n&2){let i,l=qt();at(),ci("active",l.isCityDropdownOpen()),at(),Ft("icon",l.faFilter),at(3),Mo((i=l.selectedCity())==null?null:i.name),at(2),jn(l.isCityDropdownOpen()?7:8),at(2),jn(l.isCityDropdownOpen()?9:-1)}}var d1=class n{logger=Me(Pn);stateService=Me(yi);mapService=Me(xi);navigatorService=Me(Po);loadedDataService=Me(ui);iconLibrary=Me(Yn);categoryFilters;activeView=Qt(()=>this.stateService.activeView());showCityFilter=Qt(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=Qt(()=>this.stateService.inputValue());citiesOptions=Qt(()=>this.loadedDataService.cityFilterOptions());selectedCity=Qt(()=>this.stateService.selectedCity());isCityDropdownOpen=ln(!1);mapReady=vo(this.mapService.mapReady,{initialValue:!1});faGrid2=this.iconLibrary.getIconDefinition("fas","grid-2");faMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","magnifying-glass");faMapLocationDot=this.iconLibrary.getIconDefinition("fas","map-location-dot");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");faCaretDown=this.iconLibrary.getIconDefinition("fas","caret-down");faCaretUp=this.iconLibrary.getIconDefinition("fas","caret-up");faFilter=this.iconLibrary.getIconDefinition("fas","filter");constructor(){Un(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let r=this.stateService.lastListedPlaces(),i=r.map(d=>d.inFloors?.[0]),l=this.getMostFrequentValue(i);l!==void 0&&this.mapService.updateFloor(l),setTimeout(()=>{this.mapService.fitCoordinates(r.map(d=>d.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let r=new URLSearchParams(location.search),i=r.get("search");if(i){this.stateService.inputValue.set(i),setTimeout(()=>{this.logger.logEvent("search_text_from_url",{term:i}),this.navigatorService.navigateToSearchView()},100);return}let l=r.get("tenant");if(l){this.logger.logEvent("profile_from_url",{id:l}),this.navigatorService.navigateToProfile(l);return}let d=r.get("destination");d&&(this.logger.logEvent("route_from_url",{id:d}),this.navigatorService.navigateToRoute(d))}onGridClick(){this.stateService.activeView.set("grid"),this.logger.logEvent("grid_view_selected")}onMapClick(){this.stateService.activeView.set("map"),this.logger.logEvent("map_view_selected")}onInputChange(r){let i=r.target;this.stateService.inputValue.set(i.value),this.navigatorService.navigateToSearchView()}onClearInput(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}onCityFilterClick(){this.isCityDropdownOpen.update(r=>!r)}onCitySelect(r){if(this.stateService.selectedInstitution.set(r.institutionId),this.stateService.selectedCity.set(r),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(r.institutionId),this.logger.setInstitutionId(r.institutionId),r.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0),this.logger.setParentPlaceId("");else{let l=this.loadedDataService.potentialParentPlaces().find(d=>d.lazarilloId===r.parentPlaceId);l?(this.mapService.setParentPlace(l),this.loadedDataService.parentPlace.set(l),this.logger.setParentPlaceId(l.lazarilloId)):(this.mapService.removeParentPlace(),this.logger.setParentPlaceId(""))}}getMostFrequentValue(r){if(r.length===0)return;let i=new Map,l=0,d;for(let a of r){if(a==null)continue;let S=(i.get(a)||0)+1;i.set(a,S),S>l&&(l=S,d=a)}return d}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-home-screen"]],viewQuery:function(i,l){if(i&1&&Vg(UG,5),i&2){let d;Ug(d=$g())&&(l.categoryFilters=d.first)}},decls:23,vars:12,consts:[[1,"home-screen"],[1,"sub-navigation"],[1,"sub-nav-top"],[1,"search-section"],[1,"search-bar"],[1,"search-icon"],[3,"icon"],["name","search input","type","text","placeholder","Search...",1,"search-input",3,"input","value"],[1,"search-clear"],[1,"city-filter-container"],[1,"view-toggle"],[1,"view-btn",3,"click"],[1,"view-icon"],[1,"sub-content"],[1,"search-clear",3,"click"],[1,"mobile-city-filter",3,"click"],[1,"desktop-city-filter",3,"click"],[1,"city-text"],[1,"dropdown-icon"],[1,"city-dropdown"],[1,"city-option"],[1,"city-option",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),Mt(6,"fa-icon",6),lt(),it(7,"input",7),on("input",function(a){return l.onInputChange(a)}),lt(),Bn(8,$G,2,1,"button",8),lt(),Bn(9,ZG,10,6,"div",9),lt(),it(10,"div",10)(11,"button",11),on("click",function(){return l.onGridClick()}),it(12,"div",12),Mt(13,"fa-icon",6),lt(),it(14,"span"),sn(15,"Grid View"),lt()(),it(16,"button",11),on("click",function(){return l.onMapClick()}),it(17,"div",12),Mt(18,"fa-icon",6),lt(),it(19,"span"),sn(20,"Map View"),lt()()()()(),it(21,"div",13),Mt(22,"router-outlet"),lt()()),i&2&&(at(4),ci("active",l.inputValue()!==""),at(2),Ft("icon",l.faMagnifyingGlass),at(),Ft("value",l.inputValue()),at(),jn(l.inputValue()!==""?8:-1),at(),jn(l.showCityFilter()?9:-1),at(2),ci("active",l.activeView()==="grid"),at(2),Ft("icon",l.faGrid2),at(3),ci("active",l.activeView()==="map"),at(2),Ft("icon",l.faMapLocationDot))},dependencies:[Dr,mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;border:0}.home-screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.sub-navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.25rem;margin-bottom:1.5rem}.sub-nav-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:40px}@container mapvx-container (width <= 640px){.sub-nav-top[_ngcontent-%COMP%]{gap:13px}}.search-section[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:center}@container mapvx-container (width <= 640px){.search-section[_ngcontent-%COMP%]{gap:11px}}.search-bar[_ngcontent-%COMP%]{background:var(--definitions-colors-background-white);border-bottom:1px solid var(--definitions-colors-primary-black);display:flex;width:342px;padding:12px 20px;align-items:center;gap:10px}@container mapvx-container (width <= 960px){.search-bar[_ngcontent-%COMP%]{width:150px}}@container mapvx-container (width <= 640px){.search-bar[_ngcontent-%COMP%]{width:110px}}.search-bar.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--definitions-colors-secondary-orange)}.search-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);display:flex;align-items:center;font-size:20px}.search-bar.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.search-clear[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);display:flex;align-items:center;font-size:20px;border:none;background:none}.search-clear[_ngcontent-%COMP%]:hover{cursor:pointer}.search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font:var(--definitions-textFonts-desktop-button-4);font-family:inherit;color:var(--definitions-colors-text-800);width:100%}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-text-800)}.city-filter-container[_ngcontent-%COMP%]{position:relative}.desktop-city-filter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;height:45px;box-sizing:border-box;cursor:pointer;border:none;background:none}@container mapvx-container (width <= 640px){.desktop-city-filter[_ngcontent-%COMP%]{display:none}}.city-text[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap}.dropdown-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);display:flex;align-items:center;font-size:12px}.mobile-city-filter[_ngcontent-%COMP%]{display:none}@container mapvx-container (width <= 640px){.mobile-city-filter[_ngcontent-%COMP%]{display:flex;height:45px;width:52px;padding:0;justify-content:center;align-items:center;gap:10px;cursor:pointer;border:none;background:var(--definitions-colors-background-white);color:var(--definitions-colors-primary-black);font-size:20px}.mobile-city-filter.active[_ngcontent-%COMP%]{background:var(--definitions-colors-primary-black);color:var(--definitions-colors-black_white-50)}}.city-dropdown[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background:var(--definitions-colors-background-white);border:1px solid var(--definitions-colors-primary-300);z-index:1;padding:8px 0;min-width:111px}.city-option[_ngcontent-%COMP%]{display:block;width:100%;padding:12px 16px;border:none;background:none;text-align:center;cursor:pointer;font:var(--definitions-textFonts-desktop-input-2);font-family:inherit;color:var(--definitions-colors-text-900);transition:background-color .2s ease}.city-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-primary-100)}.city-option[_ngcontent-%COMP%]:hover{background:var(--definitions-colors-background-50)}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.view-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;padding:10px 28px;border:none;background:var(--definitions-colors-background-50);cursor:pointer;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap;transition:all .2s ease;position:relative;border-bottom:1px solid var(--definitions-colors-text-900)}.view-btn.active[_ngcontent-%COMP%]{background:var(--definitions-colors-text-900);color:var(--definitions-colors-text-50)}.view-btn[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%]{display:flex;align-items:center;color:currentcolor}@container mapvx-container (width <= 770px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}@container mapvx-container (width <= 640px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};function h1(n){return n.tags?.includes("deals")||n.tags?.includes("events")}var YG=()=>({rotate:42});function KG(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=qt();Ft("icon",i.faCircleNotch)("transform",Iu(2,YG))}}function XG(n,r){n&1&&(it(0,"div",4),sn(1,"Deals + Events"),lt())}var f1=class n{logger=Me(Pn);iconLibrary=Me(Yn);navigatorService=Me(Po);homeStateService=Me(yi);fromSearch=ir(!1);place=ir.required();hasDealsOrEvents=Qt(()=>this.place().banners.some(h1));hideDeals=Qt(()=>this.homeStateService.hideDeals());showDealLabels=Qt(()=>this.homeStateService.showDealLabels());imageSrc=Qt(()=>this.place().images[0]||p_);isImageLoading=ln(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){Un(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let r=this.place(),i=r.lazarilloId;this.homeStateService.lastCardSelected.next(i),this.navigatorService.navigateToProfile(i),this.fromSearch()?this.logger.logEvent("search_result_card_selected",{id:i,name:r.title,clientId:r.clientId||""}):this.logger.logEvent("card_selected",{id:i,name:r.title,clientId:r.clientId||""})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-card"]],inputs:{fromSearch:[1,"fromSearch"],place:[1,"place"]},decls:12,vars:8,consts:[[1,"location-card",3,"click"],[1,"card-image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"card-deals-or-events"],[1,"card-content"],[1,"location-name"],[1,"location-address"],[1,"location-category"]],template:function(i,l){i&1&&(it(0,"button",0),on("click",function(){return l.navigateToProfile()}),it(1,"div",1)(2,"img",2),on("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Bn(3,KG,1,3,"fa-icon",3)(4,XG,2,0,"div",4),lt(),it(5,"div",5)(6,"h3",6),sn(7),lt(),it(8,"p",7),sn(9),lt(),it(10,"span",8),sn(11),lt()()()),i&2&&(at(),ci("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),sf)("alt",l.place().title),at(),jn(l.isImageLoading()?3:l.hasDealsOrEvents()&&!l.hideDeals()&&l.showDealLabels()?4:-1),at(4),Mo(l.place().title),at(2),Mo(l.place().address),at(2),Mo(l.place().localizedCategory))},dependencies:[Dr],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px;background:var(--definitions-colors-background-50);border:none;width:100%}.location-card[_ngcontent-%COMP%]:hover{cursor:pointer}.card-image[_ngcontent-%COMP%]{width:100%;overflow:hidden;position:relative;aspect-ratio:1/1}@container mapvx-container (width <= 640px){.card-image[_ngcontent-%COMP%]{min-width:160px;min-height:160px}}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.card-image[_ngcontent-%COMP%] .card-deals-or-events[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background-color:var(--definitions-colors-secondary-orange);color:var(--definitions-colors-text-white);display:flex;padding:5px;justify-content:center;align-items:center;gap:8.462px;flex-shrink:0;font:var(--definitions-textFonts-desktop-body-4);font-family:inherit}.card-image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);display:flex;justify-content:center;align-items:center}.card-image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.card-image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.card-content[_ngcontent-%COMP%]{min-width:160px}}.location-name[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black);font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-address[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-category[_ngcontent-%COMP%]{color:var(--definitions-colors-text-light-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:none}"],changeDetection:0})};var JG=["cardContainer"],QG=["*"];function eH(n,r){if(n&1&&Mt(0,"app-location-card",3),n&2){let i=r.$implicit,l=qt();Ft("place",i)("fromSearch",l.fromSearch())}}function tH(n,r){n&1&&Eu(0)}function nH(n,r){if(n&1){let i=Fr();it(0,"button",7),on("click",function(){pr(i);let d=qt(3);return mr(d.previousPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=qt(3);at(),Ft("icon",i.faChevronLeft)}}function rH(n,r){if(n&1&&Bn(0,nH,2,1,"button",6),n&2){let i=qt().$implicit,l=qt();jn(i<l.currentPageIndex()?0:-1)}}function iH(n,r){n&1&&(it(0,"button",9),sn(1,"..."),lt())}function oH(n,r){if(n&1){let i=Fr();it(0,"button",11),on("click",function(){pr(i);let d=qt(3);return mr(d.nextPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=qt(3);at(),Ft("icon",i.faChevronRight)}}function sH(n,r){if(n&1&&(Bn(0,iH,2,0,"button",9),Bn(1,oH,2,1,"button",10)),n&2){let i=qt().$implicit,l=qt();jn(i<l.totalPages()?0:-1),at(),jn(i>l.currentPageIndex()?1:-1)}}function aH(n,r){if(n&1){let i=Fr();Bn(0,rH,1,1),it(1,"button",5),on("click",function(){let d=pr(i).$implicit,a=qt();return mr(a.goToPage(d))}),sn(2),lt(),Bn(3,sH,2,2)}if(n&2){let i=r.$implicit,l=r.$index,d=r.$count,a=qt();jn(l===0?0:-1),at(),ci("active",a.currentPageIndex()===i),at(),eo(" ",i," "),at(),jn(l===d-1?3:-1)}}var pm=class n{logger=Me(Pn);stateService=Me(yi);iconLibrary=Me(Yn);cardContainer=a_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");fromSearch=ir(!1);places=ir.required();itemsPerPage=Qt(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));currentPageIndex=Qt(()=>this.stateService.currentPageIndex());totalPages=Qt(()=>Math.ceil(this.places().length/this.itemsPerPage()));cardContainerStyles=Qt(()=>{let r=this.stateService.cardWidth();return r?{"--card-width":`${r}`}:{}});pages=Qt(()=>{let r=this.totalPages();switch(r){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let l=this.currentPageIndex()-1;return l<1&&(l=1),l+2>r&&(l=r-2),Array.from({length:3},(d,a)=>a+l)}}});currentPagePlaces=Qt(()=>{let r=this.places(),i=this.itemsPerPage(),l=this.currentPageIndex();return r.slice((l-1)*i,l*i)});showMap=Qt(()=>this.stateService.activeView()==="map");calculateItemsPerPage(r,i,l,d=2){try{if(i){let a=globalThis.getComputedStyle(i.nativeElement),S=l??Number.parseInt(a.getPropertyValue("--card-width")||"0"),O=Number.parseInt(a.getPropertyValue("--card-gap")||"0"),F=S+O;if(F<=0)return d*5;let Z=i.nativeElement.clientWidth,X=Math.floor((Z+O)/F)*d;return Number.isFinite(X)&&X>0?X:d*5}return d*5}catch(a){return this.logger.logError("Error calculating items per page",a),d*5}}nextPage(){let r=this.currentPageIndex(),i=this.totalPages();r<i&&this.stateService.currentPageIndex.set(r+1)}previousPage(){let r=this.currentPageIndex();r>1&&this.stateService.currentPageIndex.set(r-1)}goToPage(r){this.stateService.currentPageIndex.set(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-paginator"]],viewQuery:function(i,l){i&1&&Gg(l.cardContainer,JG,5),i&2&&Hg()},inputs:{fromSearch:[1,"fromSearch"],places:[1,"places"]},ngContentSelectors:QG,decls:9,vars:6,consts:[["cardContainer",""],[1,"paginator"],[1,"paginator-places",3,"ngStyle"],[3,"place","fromSearch"],[1,"paginator-buttons"],[1,"paginator-button",3,"click"],[1,"previous-button"],[1,"previous-button",3,"click"],[3,"icon"],[1,"paginator-button","ellipsis"],[1,"next-button"],[1,"next-button",3,"click"]],template:function(i,l){i&1&&(Su(),it(0,"div",1)(1,"div",2,0),Ji(3,eH,1,2,"app-location-card",3,ta,!1,tH,1,0),lt(),it(6,"div",4),Ji(7,aH,4,5,null,null,cf),lt()()),i&2&&(ci("with-map",l.showMap()),at(),ci("with-map",l.showMap()),Ft("ngStyle",l.cardContainerStyles()),at(2),Qi(l.currentPagePlaces()),at(4),Qi(l.pages()))},dependencies:[Mu,Zx,f1,Dr],styles:['.paginator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:36px}.paginator.with-map[_ngcontent-%COMP%]{min-height:730px}@container mapvx-container (width <= 1024px){.paginator.with-map[_ngcontent-%COMP%]{min-height:unset}}.paginator-places[_ngcontent-%COMP%]{--card-width: 237;--card-gap: 13;display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(var(--card-width) * 1px),1fr));align-items:flex-start;place-content:flex-start space-around;gap:24px 13px;align-self:stretch}@container mapvx-container (width <= 640px){.paginator-places[_ngcontent-%COMP%]{--card-width: 170}}.paginator-places.with-map[_ngcontent-%COMP%]{gap:16px 8px;flex-shrink:0}@container mapvx-container (width <= 640px){.paginator-places.with-map[_ngcontent-%COMP%]{display:flex;overflow-x:auto}}.paginator-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.paginator-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);text-align:center;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;border:none;background:none}.paginator-button[_ngcontent-%COMP%]:hover{cursor:pointer}.paginator-button.active[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.paginator-button.ellipsis[_ngcontent-%COMP%]:hover{cursor:default}.previous-button[_ngcontent-%COMP%], .next-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);background:none;border:none;font-size:21px}.previous-button[_ngcontent-%COMP%]:hover, .next-button[_ngcontent-%COMP%]:hover{cursor:pointer}'],changeDetection:0})};var p1=class n{onDestroy=new wr;iconLibrary=Me(Yn);mapService=Me(xi);logger=Me(Pn);loadedDataService=Me(ui);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){this.logger.logEvent("map_center_button_clicked");let r=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Ls(1),os(this.onDestroy)).subscribe({next:i=>{this.mapService.updateCamera({center:i.initialCenter,zoom:i.initialZoom,pitch:i.initialPitch??0,bearing:r})},error:i=>{this.logger.logWarning("Error centering map",i)}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),on("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCenter))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var lH=n=>({rotate:n}),m1=class n{mapService=Me(xi);iconLibrary=Me(Yn);rotation=vo(this.mapService.rotation.asObservable().pipe(En(r=>360-r)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(i,l){i&1&&(it(0,"button",0),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCompass)("transform",Ax(2,lH,l.rotation())))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var g1=class n{iconLibrary=Me(Yn);locationService=Me(Wd);logger=Me(Pn);markerService=Me(Zo);mapService=Me(xi);locationPermission=ln("prompt");active=Qt(()=>this.locationService.currentlyWatchingLocation());mapReady=vo(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),Un(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:r=>{this.logger.log("location",r),r!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(r.position):this.markerService.addCurrentLocationMarker(r.position))},error:r=>{this.logger.logWarning("Error updating current location marker position",r)}}),this.bearingSubscription=Xs([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([r,i])=>{this.logger.log("bearing",r),this.logger.log("maprotation",i);let d=(r??0)-i;if(this.logger.log("markerRotation",d),this.markerService.hasCurrentLocationMarker){let a=this.markerService.getCurrentLocationMarkerElement();a!=null&&(a.style.transform=`rotate(${d}deg)`)}},error:r=>{this.logger.logWarning("Error updating current location marker rotation",r)}})):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker(),this.positionSubscription=void 0,this.bearingSubscription=void 0):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.positionSubscription=void 0,this.bearingSubscription=void 0)})}ngOnDestroy(){this.locationService.temporalStopWatching(),this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.active()&&this.locationService.startWatching()}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}async onClick(){if(this.logger.logEvent("map_location_button_clicked"),this.active())this.locationService.stopWatching();else switch(this.locationPermission()){case"granted":this.locationService.startWatching();break;case"prompt":await this.requestPermissions();break;case"denied":this.logger.logWarning("Location permission denied");break}}async requestPermissions(){await this.locationService.requestLocationPermission()==="granted"?(this.locationPermission.set("granted"),this.locationService.startWatching()):this.locationPermission.set("denied")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),on("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(ci("active",l.active()),at(),Ft("icon",l.faLocation))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button.active[_ngcontent-%COMP%]{background-color:var(--definitions-colors-secondary-blue);color:var(--definitions-colors-text-white);border-color:var(--definitions-colors-secondary-blue)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}"],changeDetection:0})};var y1=class n{logger=Me(Pn);mapService=Me(xi);iconLibrary=Me(Yn);faPlus=this.iconLibrary.getIconDefinition("fas","plus");faMinus=this.iconLibrary.getIconDefinition("fas","minus");onZoomIn(){this.logger.logEvent("map_zoom_in_button_clicked"),this.mapService.updateZoomLevelOn(1)}onZoomOut(){this.logger.logEvent("map_zoom_out_button_clicked"),this.mapService.updateZoomLevelOn(-1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-zoom-buttons"]],decls:5,vars:2,consts:[[1,"zoom-buttons-container"],[1,"zoom-button","zoom-in",3,"click"],[3,"icon"],[1,"zoom-button","zoom-out",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"button",1),on("click",function(){return l.onZoomIn()}),Mt(2,"fa-icon",2),lt(),it(3,"button",3),on("click",function(){return l.onZoomOut()}),Mt(4,"fa-icon",2),lt()()),i&2&&(at(2),Ft("icon",l.faPlus),at(2),Ft("icon",l.faMinus))},dependencies:[Dr],styles:[".zoom-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.zoom-button[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background-color:transparent}.zoom-button[_ngcontent-%COMP%]:hover{cursor:pointer}.zoom-button.zoom-in[_ngcontent-%COMP%]{border-radius:40px 40px 0 0}.zoom-button.zoom-out[_ngcontent-%COMP%]{border-radius:0 0 40px 40px}.zoom-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var v1=class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(i,l){i&1&&(it(0,"div",0),Mt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),lt())},dependencies:[m1,p1,y1,g1],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"],changeDetection:0})};function cH(n,r){if(n&1){let i=Fr();it(0,"button",4),on("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.selectFloor(d))}),sn(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function uH(n,r){if(n&1&&(it(0,"div",2),Ji(1,cH,2,1,"button",3,ta),lt()),n&2){let i=qt(2);at(),Qi(i.floors())}}function dH(n,r){if(n&1){let i=Fr();it(0,"button",0),on("click",function(){pr(i);let d=qt();return mr(d.toggleFloorSelector())}),it(1,"span"),sn(2),lt(),Mt(3,"fa-icon",1),lt(),Bn(4,uH,3,0,"div",2)}if(n&2){let i=qt();at(2),Mo(i.selectedFloor().name),at(),Ft("icon",i.showFloorOptions()?i.caretUp:i.caretDown),at(),jn(i.showFloorOptions()?4:-1)}}var _1=class n{loadedDataService=Me(ui);mapService=Me(xi);iconLibrary=Me(Yn);parentPlace=Qt(()=>this.loadedDataService.parentPlace());floors=Qt(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=Qt(()=>this.mapService.currentFloorId());selectedFloor=Qt(()=>this.floors().find(r=>r.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=ln(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(r=>!r)}selectFloor(r){this.showFloorOptions.set(!1),this.mapService.updateFloor(r.key)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-floor-selector"]],decls:1,vars:1,consts:[[1,"floor-selector-button",3,"click"],[3,"icon"],[1,"floor-options"],[1,"floor-option"],[1,"floor-option",3,"click"]],template:function(i,l){i&1&&Bn(0,dH,5,3),i&2&&jn(l.floors().length>0?0:-1)},dependencies:[Dr],styles:[".floor-selector-button[_ngcontent-%COMP%]{padding:10px;border:0;border-radius:16px;background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.floor-options[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background-color:var(--definitions-colors-background-white);border-radius:16px;box-shadow:var(--definitions-shadows-general);display:flex;flex-direction:column}.floor-option[_ngcontent-%COMP%]{padding:10px;border:0;background-color:transparent}.floor-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-gray-200)}"]})};var hH=["map"],fH=["*"];function pH(n,r){n&1&&Mt(0,"app-floor-selector",3)}var Zd=class n{mapRef;logger=Me(Pn);mapService=Me(xi);markerService=Me(Zo);routingService=Me(wc);loadedDataService=Me(ui);showFloorSelector=Qt(()=>this.loadedDataService.parentPlace()!==void 0);ngAfterViewInit(){this.mapService.createMap(this.mapRef.nativeElement)}ngOnDestroy(){this.logger.log("Destroying map and preparing to reuse"),this.markerService.prepareToMapReuse(),this.routingService.removeRoute(),this.mapService.prepareToReuse()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-map"]],viewQuery:function(i,l){if(i&1&&Vg(hH,5),i&2){let d;Ug(d=$g())&&(l.mapRef=d.first)}},ngContentSelectors:fH,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(i,l){i&1&&(Su(),it(0,"div",1),Mt(1,"div",2,0),Bn(3,pH,1,0,"app-floor-selector",3),Mt(4,"app-buttons-container",4),Eu(5),lt()),i&2&&(at(3),jn(l.showFloorSelector()?3:-1))},dependencies:[v1,_1],styles:[".map-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}#map[_ngcontent-%COMP%]{height:100%;min-width:10px;min-height:10px}.buttons-container[_ngcontent-%COMP%]{position:absolute;bottom:18px;right:17px}.floor-selector[_ngcontent-%COMP%]{position:absolute;top:18px;right:17px}"],changeDetection:0})};var mH=["*"];function gH(n,r){n&1&&(it(0,"div",2),Mt(1,"app-map"),lt())}var mm=class n{stateService=Me(yi);showMap=Qt(()=>this.stateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-view-container"]],ngContentSelectors:mH,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(i,l){i&1&&(Su(),it(0,"div",0)(1,"div",1),Eu(2),lt(),Bn(3,gH,2,0,"div",2),lt()),i&2&&(at(),ci("with-map",l.showMap()),at(2),jn(l.showMap()?3:-1))},dependencies:[Zd],styles:[".view-container[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:8px}@container mapvx-container (width <= 1024px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}@container mapvx-container (width <= 640px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}.view-content[_ngcontent-%COMP%]{width:100%}.view-content.with-map[_ngcontent-%COMP%]{width:50%;min-width:482px;flex-shrink:0}@container mapvx-container (width <= 1024px){.view-content.with-map[_ngcontent-%COMP%]{width:100%;min-width:unset}}.map-container[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map-container[_ngcontent-%COMP%]{width:100%;height:730px}}@container mapvx-container (width <= 640px){.map-container[_ngcontent-%COMP%]{width:100%;height:400px;min-height:unset}}"],changeDetection:0})};var yH=["categoryFilters"],vH=(n,r)=>r.name;function _H(n,r){if(n&1){let i=Fr();it(0,"button",11),on("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.updateSelectedFilter(d.name))}),sn(1),lt()}if(n&2){let i=r.$implicit,l=qt(2);ci("active",l.selectedFilter()===i.name),at(),eo(" ",i.name," ")}}function bH(n,r){if(n&1&&(it(0,"div",2)(1,"div",5,0)(3,"div",6),Ji(4,_H,2,3,"button",7,vH),lt(),it(6,"div",8),Mt(7,"div",9)(8,"div",10),lt()()()),n&2){let i=qt();at(4),Qi(i.categoryFiltersData()),at(4),t_("left",i.indicatorPosition(),"px")}}var b1=class n{logger=Me(Pn);stateService=Me(yi);loadedDataService=Me(ui);markerService=Me(Zo);categoryFilters=a_("categoryFilters");activeView=Qt(()=>this.stateService.activeView());loadedPlaces=vo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=Qt(()=>this.stateService.categoryFiltersData());places=ls(()=>this.loadedPlaces());selectedFilter=Qt(()=>this.stateService.selectedFilter());selectedInstitution=Qt(()=>this.stateService.selectedInstitution());selectedCity=Qt(()=>this.stateService.selectedCity());showCategoryFilters=Qt(()=>this.stateService.showCategoryFilters());showCityFilter=Qt(()=>this.stateService.showCityFilter());indicatorPosition=ln(0);constructor(){Un(()=>{let r=this.activeView();this.logger.logEvent("page_view",{page_title:"List Page",page_location:`/list?view=${r}`})}),Un(()=>{let r=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",r),r.length>0){let i=r.map(l=>l.name);this.readFilterFromUrl(i)}}),Un(()=>{if(this.activeView()==="map"){let r=this.places();this.logger.log("====> addMarkers ",r),this.markerService.addMarkers(r)}}),Un(()=>{let r=this.loadedPlaces(),i=this.showCategoryFilters(),l=r;if(this.showCityFilter()){let S=this.selectedCity()?.filterId??"";S!==""&&(l=l.filter(O=>O.parentInstitutionId===S))}if(i){let a=this.selectedFilter(),S=this.categoryFiltersData();if(a!=="All"){let O=S.find(F=>F.name===a)?.placeData||[];l=r.filter(F=>O.includes(F.lazarilloId))}}l.sort((a,S)=>a.title.trim().localeCompare(S.title.trim())),this.logger.log("====> filteredPlaces",l),this.places.set(l)}),Un(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Un(()=>{let r=this.selectedFilter(),i=this.categoryFiltersData(),l=this.categoryFilters();this.showCategoryFilters()&&l?requestAnimationFrame(()=>{let a=this.getIndicatorPosition(r,i,l);this.indicatorPosition.set(a)}):this.indicatorPosition.set(0)})}readFilterFromUrl(r){let l=new URLSearchParams(location.search).get("tab");l&&r.includes(l)&&this.stateService.selectedFilter.set(l)}getIndicatorPosition(r,i,l){if(l==null)return 0;let d=l.nativeElement.querySelectorAll(".category-btn");if(d.length===0)return 0;let a=i.findIndex(Q=>Q.name===r);if(a===-1||a>=d.length)return 0;let S=d[a];if(!S)return 0;let O=l.nativeElement.getBoundingClientRect(),F=S.getBoundingClientRect(),Z=F.width,ee=F.left-O.left,X=80,re=ee+Z/2-X/2;return Math.min(Math.max(0,re),O.width-X)}updateSelectedFilter(r){this.stateService.selectedFilter.set(r),this.stateService.userAction.next({type:"select-filter",data:{filter:r}}),this.logger.logEvent("filter_selected",{filter:r})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-list-view"]],viewQuery:function(i,l){i&1&&Gg(l.categoryFilters,yH,5),i&2&&Hg()},decls:5,vars:2,consts:[["categoryFilters",""],[1,"list-view"],[1,"category-filters-overflow"],[1,"list-container"],[3,"places"],[1,"category-filters-container"],[1,"category-filters"],[1,"category-btn",3,"active"],[1,"active-indicator"],[1,"background-line"],[1,"active-line"],[1,"category-btn",3,"click"]],template:function(i,l){i&1&&(it(0,"div",1),Bn(1,bH,9,2,"div",2),it(2,"app-view-container")(3,"div",3),Mt(4,"app-paginator",4),lt()()()),i&2&&(at(),jn(l.showCategoryFilters()?1:-1),at(3),Ft("places",l.places()))},dependencies:[mm,pm],styles:[".list-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.category-filters-overflow[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.category-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%;min-width:max-content}.category-filters[_ngcontent-%COMP%]{display:flex;gap:2.4375rem;align-items:center}.category-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;font-weight:400;color:var(--definitions-colors-text-900);white-space:nowrap;padding:0;transition:color .2s ease}.category-btn.active[_ngcontent-%COMP%], .category-btn[_ngcontent-%COMP%]:hover{color:var(--definitions-colors-secondary-orange)}.active-indicator[_ngcontent-%COMP%]{position:relative;width:100%;height:3px;display:flex;align-items:center}.background-line[_ngcontent-%COMP%]{height:.5px;background:var(--definitions-colors-primary-black);border-radius:2px;width:100%}.active-line[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;width:80px;background:var(--definitions-colors-secondary-orange);border-radius:2px;transition:left .3s ease}.list-container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var wH=()=>({rotate:42}),w1=class n{iconLibrary=Me(Yn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-location-card"]],decls:7,vars:3,consts:[[1,"loading-location-card"],[1,"loading-card-image"],[3,"icon","transform"],[1,"loading-card-content"],[1,"loading-location-name"],[1,"loading-location-address"],[1,"loading-location-category"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1),Mt(2,"fa-icon",2),lt(),it(3,"div",3),Mt(4,"div",4)(5,"div",5)(6,"div",6),lt()()),i&2&&(at(2),Ft("icon",l.faCircleNotch)("transform",Iu(2,wH)))},dependencies:[Dr],styles:[".loading-location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px}.loading-card-image[_ngcontent-%COMP%]{display:flex;width:227px;height:227px;justify-content:center;align-items:center;background-color:var(--definitions-colors-primary-300)}@container mapvx-container (width <= 640px){.loading-card-image[_ngcontent-%COMP%]{width:160px;height:160px}}.loading-card-image[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:95px}.loading-card-content[_ngcontent-%COMP%]{display:flex;width:227px;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.loading-card-content[_ngcontent-%COMP%]{width:160px}}.loading-location-name[_ngcontent-%COMP%]{display:flex;width:85%;height:24px;padding:7.253px 0;flex-direction:column;justify-content:center;align-items:center;border-radius:28.09px;background:var(--definitions-colors-primary-300)}.loading-location-address[_ngcontent-%COMP%]{display:flex;width:70%;height:11px;align-items:center;gap:18px;flex-shrink:0;align-self:stretch;border-radius:28.09px;background:var(--definitions-colors-primary-200)}.loading-location-category[_ngcontent-%COMP%]{display:flex;width:45%;height:11px;justify-content:space-between;align-items:center;border-radius:24px;background:var(--definitions-colors-primary-200)}"]})};var xH=()=>[1,2,3,4,5,6,7,8,9,10];function CH(n,r){n&1&&Mt(0,"app-loading-location-card")}var x1=class n{homeStateService=Me(yi);showMap=Qt(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(i,l){i&1&&(it(0,"div",0),Ji(1,CH,1,0,"app-loading-location-card",null,cf),lt()),i&2&&(ci("with-map",l.showMap()),at(),Qi(Iu(2,xH)))},dependencies:[w1],styles:[".loading-container[_ngcontent-%COMP%]{display:flex;place-content:flex-start;align-items:flex-start;gap:24px 13px;align-self:stretch;flex-wrap:wrap}.loading-container.with-map[_ngcontent-%COMP%]{gap:16px 8px;height:730px}"]})};function SH(n,r){n&1&&(it(0,"p"),sn(1,"Looking for your results..."),lt())}function EH(n,r){if(n&1&&(it(0,"p"),sn(1),lt()),n&2){let i=qt(3);at(),eo('Showing 1 result for "',i.searchTerm(),'"')}}function IH(n,r){if(n&1&&(it(0,"p"),sn(1),lt()),n&2){let i=qt(3);at(),n_("Showing ",i.places().length,' results for "',i.searchTerm(),'"')}}function DH(n,r){if(n&1&&Bn(0,EH,2,1,"p")(1,IH,2,2,"p"),n&2){let i=qt(2);jn(i.places().length===1?0:1)}}function TH(n,r){if(n&1&&(it(0,"p"),sn(1),lt()),n&2){let i=qt(2);at(),eo('No results found for "',i.searchTerm(),'"')}}function MH(n,r){if(n&1&&Bn(0,DH,2,1)(1,TH,2,1,"p"),n&2){let i=qt();jn(i.places().length>0?0:1)}}function PH(n,r){n&1&&Mt(0,"app-loading-card-list")}function AH(n,r){if(n&1&&(it(0,"div",6)(1,"app-paginator",7)(2,"div",8),Mt(3,"fa-icon",4),it(4,"h2"),sn(5,"No results found"),lt(),it(6,"div",9)(7,"p"),sn(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),lt()()()()()),n&2){let i=qt();at(),Ft("places",i.places())("fromSearch",!0),at(2),Ft("icon",i.faBuildingMagnifyingGlass)}}var C1=class n{logger=Me(Pn);loadedDataService=Me(ui);sdkService=Me(na);stateService=Me(yi);navigatorService=Me(Po);markerService=Me(Zo);iconLibrary=Me(Yn);searching=ls(()=>this.stateService.lastSearchData().term==="");inputValue$=c1(this.stateService.inputValue).pipe(Qb(500),En(r=>r.trim()),bi(r=>r!==""),e2());searchTerm=vo(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=vo(Xs([c1(this.stateService.filterId),this.inputValue$,c1(this.stateService.lastSearchData)]).pipe(Yi(([r,i,l])=>l.term===i?(this.logger.log("====> lastSearchData",l),this.searching.set(!1),Sn(l.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",i),this.logger.logEvent("search",{term:i,searchInstitutionId:r}),this.logger.log("====> institutionId",r),li(this.sdkService.searchPlaces(i,r)))),Ki(r=>{this.searching.set(!1),r.length>0?this.logger.logEvent("search_results",{resultsCount:r.length.toString(),term:this.searchTerm(),searchInstitutionId:this.stateService.filterId()}):this.logger.logEvent("search_empty",{term:this.searchTerm(),searchInstitutionId:this.stateService.filterId()})})),{initialValue:this.stateService.lastSearchData().results});faArrowLeft=this.iconLibrary.getIconDefinition("fas","arrow-left");faBuildingMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","building-magnifying-glass");constructor(){this.logger.logEvent("page_view",{page_title:"Search Page",page_location:"/search"}),Un(()=>{let r=this.places();this.markerService.addMarkers(r)}),Un(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Un(()=>{let r=this.searching();this.logger.log("====> searching",r)}),Un(()=>{let r=this.searchTerm();r&&this.stateService.userAction.next({type:"search",data:{searchTerm:r}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(l1)):(this.logger.log("====> SETTING LAST SEARCH DATA"),this.stateService.lastSearchData.set({term:this.stateService.inputValue(),results:this.places()}))}onBackClick(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.logger.logEvent("search_back_clicked",{term:this.searchTerm(),searchInstitutionId:this.stateService.filterId()}),this.navigatorService.navigateToHome()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-search-view"]],decls:13,vars:3,consts:[[1,"search-view"],[1,"search-view-header"],[1,"back-button"],[1,"back-btn",3,"click"],[3,"icon"],[1,"search-view-info"],[1,"results-container"],[3,"places","fromSearch"],[1,"no-results"],[1,"no-results-description"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),on("click",function(){return l.onBackClick()}),Mt(4,"fa-icon",4),it(5,"span"),sn(6,"Back"),lt()()(),it(7,"div",5),Bn(8,SH,2,0,"p")(9,MH,2,1),lt()(),it(10,"app-view-container"),Bn(11,PH,1,0,"app-loading-card-list")(12,AH,9,3,"div",6),lt()()),i&2&&(at(4),Ft("icon",l.faArrowLeft),at(4),jn(l.searching()?8:9),at(3),jn(l.searching()?11:12))},dependencies:[mm,pm,o1,Dr,x1],styles:['*[_ngcontent-%COMP%]{margin:0;padding:0}.search-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.search-view-header[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:flex-start;gap:23px}.search-view-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit;letter-spacing:-.9px}.results-container[_ngcontent-%COMP%]{width:100%}.back-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:16px}.back-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}.back-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.back-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}.back-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}.no-results[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:31px}.no-results[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:160px;color:var(--definitions-colors-text-light-grey)}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-h2);font-family:inherit}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;text-align:center}'],changeDetection:0})};function S1(n){switch(n){case"su":return"Sunday";case"mo":return"Monday";case"tu":return"Tuesday";case"we":return"Wednesday";case"th":return"Thursday";case"fr":return"Friday";case"sa":return"Saturday"}}function I1(n){switch(n.getDay()){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function kH(n){switch(n){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function E1(n){let[r,i]=n.split(":"),l=parseInt(r)%24,d=parseInt(i),a;return l<12?(a="AM",l===0&&(l=12)):(a="PM",l!==12&&(l-=12)),`${l}:${d<10?"0":""}${d}&nbsp;${a}`}function GR(n){let r=E1(n.open),i=E1(n.close);return`${r}&nbsp;-&nbsp;${i}`}function RH(n){let r=E1(n.open),i=E1(n.close);return`${r}&nbsp;to&nbsp;${i}`}function OH(n){let r=new Date,i=new Date(r);HR(i);let l=I1(i),d=n[l];if(d&&d.length>0){for(let a of d)if(UR(a.open)&&UR(a.close)){let S=$R(a.open,i),O=$R(a.close,i);if(S>O&&LH(O),r>=S&&r<=O)return!0}}return!1}function HR(n){let r=n.getDate();n.setDate(r-1)}function LH(n){let r=n.getDate();n.setDate(r+1)}function FH(n){let i=I1(new Date),l=n[i];return l&&l.length>0}function UR(n){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(n)}function $R(n,r){let[i,l]=n.split(":").map(Number),d=r?new Date(r):new Date;return new Date(d.getFullYear(),d.getMonth(),d.getDate(),i,l,0,0)}function NH(n){return n.sort((r,i)=>r.open.localeCompare(i.open))}function zH(n){let i=I1(new Date),l=n[i];return l&&l.length>0?qR(l):""}function BH(n){let r=new Date;HR(r);let i=I1(r),l=n[i];return l&&l.length>0?qR(l):""}function jH(n){let r=VH(n);return`Open on ${S1(r)}`}function qR(n){return n.length===1?GR(n[0]):(NH(n),n.map(RH).join(" - "))}function VH(n){let i=new Date().getDay();for(let l=0;l<7;l++){let d=(i+l)%7,a=kH(d),S=n[a];if(S&&S.length>0)return a}return"mo"}function WR(n){return OH(n)?BH(n):FH(n)?zH(n):jH(n)}function ZR(n){let r=["mo","tu","we","th","fr","sa","su"],i=O=>{let F=n[O];return!F||F.length===0?["Closed"]:F.map(Z=>GR(Z))},l=(O,F)=>O.length!==F.length?!1:O.every((Z,ee)=>Z===F[ee]),d=(O,F)=>O===F?S1(O):`${S1(O)} - ${S1(F)}`,a=[],S=0;for(;S<r.length;){let O=r[S],F=i(O),Z=S+1;for(;Z<r.length&&l(F,i(r[Z]));)Z++;let ee=d(O,r[Z-1]);a.push({day:ee,schedule:F}),S=Z}if(a.length>1){let O=a[0],F=a[a.length-1];if(l(O.schedule,F.schedule)){let Z=O.day.split(" - "),X=F.day.split(" - ")[0],re=Z.length>1?Z[1]:Z[0],Q=`${X} - ${re}`;a[0]={day:Q,schedule:O.schedule},a.pop()}}return a}function UH(n,r){if(n&1&&Mt(0,"div",9),n&2){let i=r.$implicit;Ft("innerHTML",i,zd)}}function $H(n,r){if(n&1&&(it(0,"div",6)(1,"div",7),sn(2),lt(),it(3,"div",8),Ji(4,UH,1,1,"div",9,ta),lt()()),n&2){let i=r.$implicit;at(2),Mo(i.day),at(2),Qi(i.schedule)}}var D1=class n{iconLibrary=Me(Yn);schedules=ir.required({transform:r=>r?ZR(r):[]});closeClicked=_s();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-other-schedules"]],inputs:{schedules:[1,"schedules"]},outputs:{closeClicked:"closeClicked"},decls:11,vars:2,consts:[[1,"other-schedules-container"],[1,"other-schedules-header"],[1,"other-schedules-title"],[3,"icon"],[1,"close-button",3,"click"],[1,"schedules"],[1,"schedule"],[1,"schedule-day"],[1,"schedule-time"],[1,"schedule-time-item",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"fa-icon",3),it(4,"h2"),sn(5,"Other Schedules"),lt()(),it(6,"button",4),on("click",function(){return l.hideModal()}),Mt(7,"fa-icon",3),lt()(),it(8,"div",5),Ji(9,$H,6,1,"div",6,ta),lt()()),i&2&&(at(3),Ft("icon",l.faClockThree),at(4),Ft("icon",l.faXmark),at(2),Qi(l.schedules()))},dependencies:[Dr],styles:[".other-schedules-container[_ngcontent-%COMP%]{padding:16px;background-color:var(--definitions-colors-background-50);box-shadow:var(--definitions-shadows-general)}.other-schedules-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.other-schedules-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:32px}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}}.close-button[_ngcontent-%COMP%]{padding:0;background:none;border:none;cursor:pointer}.close-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.schedules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;background-color:#fff}.schedule[_ngcontent-%COMP%]{display:flex;gap:40px;align-items:center;justify-content:space-between}.schedule-times[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.schedule-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:end}.schedule-time-item[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit}@container mapvx-container (width <= 640px){.schedule-time-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400}}"]})};var GH=()=>({rotate:42});function HH(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=qt();Ft("icon",i.faCircleNotch)("transform",Iu(2,GH))}}function qH(n,r){if(n&1){let i=Fr();it(0,"div",10),Mt(1,"fa-icon",9),it(2,"div",24)(3,"button",25),on("click",function(){pr(i);let d=qt();return mr(d.showOtherSchedulesModal())}),lt(),it(4,"div",26),sn(5,"*Hours may vary"),lt()()()}if(n&2){let i=qt();at(),Ft("icon",i.faClockThree),at(2),Ft("innerHTML",i.schedule(),zd)}}function WH(n,r){if(n&1){let i=Fr();it(0,"div",11)(1,"app-other-schedules",27),on("closeClicked",function(){pr(i);let d=qt();return mr(d.hideOtherSchedulesModal())}),lt()()}if(n&2){let i=qt();at(),Ft("schedules",i.place().openingHours)}}function ZH(n,r){if(n&1&&Mt(0,"div",31),n&2){let i=r.$implicit;Ft("innerHTML",i,zd)}}function YH(n,r){if(n&1&&(it(0,"div",12)(1,"div",28),Mt(2,"fa-icon",9),it(3,"div",29),sn(4,"Deals + Events"),lt()(),it(5,"div",30),Ji(6,ZH,1,1,"div",31,ta),lt()()),n&2){let i=qt();at(2),Ft("icon",i.faBadgeDollar),at(4),Qi(i.banners())}}function KH(n,r){if(n&1&&(it(0,"div",21),sn(1),lt()),n&2){let i=qt();at(),eo(" ",i.address()," ")}}function XH(n,r){if(n&1&&(it(0,"div",22),sn(1),lt()),n&2){let i=r.$implicit;at(),eo(" ",i," ")}}function JH(n,r){if(n&1){let i=Fr();it(0,"div",23)(1,"a",18),on("click",function(){let d=pr(i).$implicit,a=qt();return mr(a.logWebsiteClick(d.url))}),sn(2),lt()()}if(n&2){let i=r.$implicit;at(),Ft("href",i.url,sf),at(),Mo(i.title)}}var T1=class n{iconLibrary=Me(Yn);sanitizer=Me(ny);logger=Me(Pn);navigatorService=Me(Po);stateService=Me(yi);place=ir.required();hideDeals=ir(!1);imageSrc=Qt(()=>this.place().images[0]||p_);isImageLoading=ln(!0);schedule=Qt(()=>{let r=this.place().openingHours;return r?WR(r):""});banners=Qt(()=>this.place().banners.filter(h1).filter(r=>r.description!==void 0).map(r=>this.sanitizer.bypassSecurityTrustHtml(r.description||"")));address=Qt(()=>this.place().address||"");phones=Qt(()=>this.place().properties?.filter(r=>r.type==="phone").map(r=>this.formatPhoneNumber(r.subtitle))||[]);websites=Qt(()=>this.place().properties?.filter(r=>r.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=Qt(()=>{let r=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${r.position.lat},${r.position.lng}&travelmode=driving`});otherSchedulesModal=ln(!1);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");faBadgeDollar=this.iconLibrary.getIconDefinition("fas","badge-dollar");faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");iconCategory=Qt(()=>{let[r,i]=s1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(r,i)});constructor(){Un(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(r){return sr(zt({},r),{url:r.url?.startsWith("http")?r.url:`https://${r.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(r){let i=r.replace(/^\+1/,"");return i=i.replaceAll(/\D/g,""),i.length<10?(this.logger.logWarning(`Phone number '${i}' is to short for format`),i):`${i.slice(0,3)}.${i.slice(3,6)}.${i.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().lazarilloId,alias:this.place().clientId}}),this.logger.logEvent("pedestrian_directions_selected",{id:this.place().lazarilloId,name:this.place().title,clientId:this.place().clientId||""}),this.navigatorService.navigateToRoute(this.place().lazarilloId)}logDrivingDirectionsClick(){this.logger.logEvent("driving_directions_clicked",{id:this.place().lazarilloId,name:this.place().title,clientId:this.place().clientId||"",url:this.drivingDirectionsUrl()})}logWebsiteClick(r){r&&this.logger.logEvent("profile_website_clicked",{id:this.place().lazarilloId,name:this.place().title,clientId:this.place().clientId||"",url:r})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-view"]],inputs:{place:[1,"place"],hideDeals:[1,"hideDeals"]},decls:34,vars:15,consts:[[1,"profile-view-content"],[1,"image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"info"],[1,"basic-info"],[1,"title"],[1,"category-schedule"],[1,"category"],[3,"icon"],[1,"schedule"],[1,"other-schedules-modal"],[1,"deals-or-events"],[1,"description"],[1,"direction-buttons"],[1,"route-button-container"],[1,"route-button",3,"click"],[1,"driving-link"],["target","_blank",3,"click","href"],[1,"properties"],[1,"separator"],[1,"address"],[1,"phone"],[1,"website"],[1,"schedule-time"],[1,"schedule-button",3,"click","innerHTML"],[1,"schedule-warning"],[3,"closeClicked","schedules"],[1,"deals-or-events-header"],[1,"deals-or-events-content-title"],[1,"deals-or-events-content"],[1,"banner-content",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"img",2),on("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Bn(3,HH,1,3,"fa-icon",3),lt(),it(4,"div",4)(5,"div",5)(6,"h1",6),sn(7),lt(),it(8,"div",7)(9,"div",8),Mt(10,"fa-icon",9),it(11,"span"),sn(12),lt()(),Bn(13,qH,6,2,"div",10),Bn(14,WH,2,1,"div",11),lt(),Bn(15,YH,8,1,"div",12),it(16,"div",13),sn(17),lt()(),it(18,"div",14)(19,"div",15)(20,"button",16),on("click",function(){return l.navigateToRoute()}),Mt(21,"fa-icon",9),it(22,"span"),sn(23,"Pedestrian-friendly directions"),lt()()(),it(24,"div",17)(25,"a",18),on("click",function(){return l.logDrivingDirectionsClick()}),sn(26,"Driving directions"),lt()()(),it(27,"div",19),Mt(28,"div",20),Bn(29,KH,2,1,"div",21),Ji(30,XH,2,1,"div",22,ta),Ji(32,JH,3,2,"div",23,ta),lt()()()),i&2&&(at(),ci("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),sf)("alt",l.place().title),at(),jn(l.isImageLoading()?3:-1),at(4),Mo(l.place().title),at(3),Ft("icon",l.iconCategory()),at(2),Mo(l.place().localizedCategory),at(),jn(l.schedule()!==""?13:-1),at(),jn(l.otherSchedulesModal()?14:-1),at(),jn(l.banners().length>0&&!l.hideDeals()?15:-1),at(2),eo(" ",l.place().description," "),at(4),Ft("icon",l.faArrowTopRight),at(4),Ft("href",l.drivingDirectionsUrl(),sf),at(4),jn(l.address()!==""?29:-1),at(),Qi(l.phones()),at(2),Qi(l.websites()))},dependencies:[Dr,D1],styles:['.profile-view-content[_ngcontent-%COMP%]{display:flex;padding:0 16px;flex-direction:column;align-items:center;gap:16px}@container mapvx-container (width <= 1024px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}@container mapvx-container (width <= 640px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;object-fit:cover;aspect-ratio:1/1}.image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);height:200px;width:100%;display:flex;justify-content:center;align-items:center}.image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;width:100%}.basic-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-h6);font-family:inherit;margin:0;color:var(--definitions-colors-text-black)}.category-schedule[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;position:relative}.category[_ngcontent-%COMP%]{display:flex;gap:18px;color:var(--definitions-colors-text-grey);align-items:center}.category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px}.schedule[_ngcontent-%COMP%]{display:flex;gap:18px;align-items:center}.schedule[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:20px}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{position:relative}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;font-size:16px;color:var(--definitions-colors-secondary-blue);border:none;background:none;cursor:pointer;text-align:start}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-warning[_ngcontent-%COMP%]{position:absolute;top:100%;margin-top:-5px;left:0;font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.other-schedules-modal[_ngcontent-%COMP%]{position:absolute;width:max-content;bottom:0;right:50%;transform:translate(50%) translateY(100%)}.deals-or-events[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.deals-or-events-header[_ngcontent-%COMP%]{display:flex;width:100%;align-items:flex-start;gap:18px;color:var(--definitions-colors-secondary-orange)}.deals-or-events-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.deals-or-events-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.deals-or-events-content-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-4);font-family:inherit;font-size:16px}.banner-content[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);padding:5px;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px;white-space:pre-wrap;border:1px solid var(--definitions-colors-secondary-orange);border-radius:8px;box-shadow:var(--definitions-shadows-general)}.description[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-2);font-family:inherit;color:var(--definitions-colors-text-black)}.direction-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;align-self:stretch;width:100%}.route-button-container[_ngcontent-%COMP%]{width:100%}.route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:var(--definitions-colors-primary-black);color:var(--definitions-colors-text-white);border:none;cursor:pointer;width:100%}.route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.driving-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--definitions-colors-primary-100)}.address[_ngcontent-%COMP%], .phone[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.website[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.website[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none}']})};var QH=["backButton",""],gm=class n{iconLibraryService=Me(Yn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["button","backButton",""]],attrs:QH,decls:3,vars:1,consts:[[3,"icon"]],template:function(i,l){i&1&&(Mt(0,"fa-icon",0),it(1,"span"),sn(2,"Back"),lt()),i&2&&Ft("icon",l.faArrowLeft)},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}']})};function eq(n,r){if(n&1&&Mt(0,"app-profile-view",5),n&2){let i=qt(),l=Wg(6);Ft("place",l)("hideDeals",i.hideDeals())}}var M1=class n{onDestroy=new wr;route=Me(Wa);logger=Me(Pn);loadedDataService=Me(ui);sdkService=Me(na);mapService=Me(xi);markerService=Me(Zo);navigatorService=Me(Po);homeStateService=Me(yi);iconLibraryService=Me(Yn);_profileId="";place=ln(null);mapReady=vo(this.mapService.mapReady,{requireSync:!0});hideDeals=Qt(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){Un(()=>{let r=this.place();if(r&&this.mapReady()){if(r.parentType==="Place")if(this.loadedDataService.parentPlace()===void 0){let a=this.loadedDataService.potentialParentPlaces().find(S=>S.lazarilloId===r.parentId);if(a){this.loadedDataService.parentPlace.set(a),this.mapService.setParentPlace(a);let S=r.inFloors?.[0];S&&this.mapService.updateFloor(S)}}else{let d=r.inFloors?.[0];d&&this.mapService.updateFloor(d)}if(!this.markerService.hasMarker(r.lazarilloId)){let l=qo(this.homeStateService.lastListedPlaces);l.length>0?this.markerService.addMarkers(l):this.markerService.addMarker(r)}this.markerService.selectMarker(r.lazarilloId),setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100)}})}ngOnInit(){this.addBackListener();let r=this.route.paramMap.pipe(En(i=>i.get("id")),bi(i=>i!==null),bi(i=>i!==this._profileId),i2(1));Xs([r,this.loadedDataService.getAvailablePlaces()]).pipe(os(this.onDestroy),Yi(([i,l])=>{this.logger.logEvent("page_view",{page_title:"Profile Page",page_location:`/profile/${i}`});let d=l.find(a=>a.lazarilloId===i||a.clientId===i);return d?Sn(d):li(this.sdkService.getPlaceDetail(i))})).subscribe({next:i=>{this._profileId!==i.lazarilloId&&this.cleanOldProfile(),this._profileId=i.lazarilloId,this.place.set(i),this.loadedDataService.updateInstitution(i.parentInstitutionId),this.homeStateService.selectedInstitution.set(i.parentInstitutionId),this.homeStateService.userAction.next({type:"show-place",data:{placeId:i.lazarilloId,alias:i.clientId}})},error:i=>{this.logger.log("Error getting profile id",i)},complete:()=>{this.logger.log("Profile id complete")}})}ngOnDestroy(){this.removeBackListener(),this.cleanOldProfile(),this.onDestroy.next(),this.onDestroy.complete()}cleanOldProfile(){this._profileId!==""&&this.markerService.deselectMarker(this._profileId)}returnToHome(){this.homeStateService.userAction.next({type:"return-to-home",data:{filter:this.homeStateService.selectedFilter()}}),this.logger.logEvent("profile_back_clicked",{id:this.place()?.lazarilloId||"",name:this.place()?.title||"",clientId:this.place()?.clientId||""}),this.navigatorService.navigateToHome()}backListener(r){this.logger.log("Back listener",r),this.returnToHome()}listener=r=>this.backListener(r);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-screen"]],decls:10,vars:2,consts:[[1,"screen"],[1,"back-button"],["backButton","",3,"click"],[1,"profile-screen-content"],[1,"profile-info"],[3,"place","hideDeals"],[1,"map"]],template:function(i,l){if(i&1){let d=Fr();it(0,"div",0)(1,"div",1)(2,"button",2),on("click",function(){return pr(d),mr(l.returnToHome())}),sn(3,"Back"),lt()(),it(4,"div",3)(5,"div",4),Kp(6),Bn(7,eq,1,2,"app-profile-view",5),lt(),it(8,"div",6),Mt(9,"app-map"),lt()()()}if(i&2){at(6);let d=qg(l.place());at(),jn(d!==null?7:-1)}},dependencies:[Zd,gm,T1],styles:[".screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.profile-screen-content[_ngcontent-%COMP%]{display:flex;width:100%}@container mapvx-container (width <= 1024px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}@container mapvx-container (width <= 640px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}.profile-info[_ngcontent-%COMP%]{display:flex;width:432px;flex-shrink:0}.profile-info[_ngcontent-%COMP%] app-profile-view[_ngcontent-%COMP%]{width:100%}@container mapvx-container (width <= 1024px){.profile-info[_ngcontent-%COMP%]{width:100%}}.map[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map[_ngcontent-%COMP%]{height:730px}}@container mapvx-container (width <= 640px){.map[_ngcontent-%COMP%]{width:100%;min-height:unset;height:400px}}"],changeDetection:0})};function tq(n,r){if(n&1){let i=Fr();it(0,"button",1),on("click",function(){pr(i);let d=qt();return mr(d.pauseRoute())}),Mt(1,"fa-icon",2),it(2,"span"),sn(3,"Pause route"),lt()()}if(n&2){let i=qt();at(),Ft("icon",i.faPause)}}function nq(n,r){if(n&1){let i=Fr();it(0,"button",1),on("click",function(){pr(i);let d=qt();return mr(d.resumeRoute())}),Mt(1,"fa-icon",2),it(2,"span"),sn(3,"Resume route"),lt()()}if(n&2){let i=qt();at(),Ft("icon",i.faPlay)}}function rq(n,r){if(n&1){let i=Fr();it(0,"button",1),on("click",function(){pr(i);let d=qt();return mr(d.restartRoute())}),Mt(1,"fa-icon",2),it(2,"span"),sn(3,"Restart route"),lt()()}if(n&2){let i=qt();at(),Ft("icon",i.faRestart)}}function iq(n,r){}var P1=class n{logger=Me(Pn);iconLibrary=Me(Yn);routingService=Me(wc);restartRouteCallback=_s();AnimationState=a1;animationStatus=vo(this.routingService.animationStatusSubject,{initialValue:0});faPlay=this.iconLibrary.getIconDefinition("fas","play");faPause=this.iconLibrary.getIconDefinition("fas","pause");faRestart=this.iconLibrary.getIconDefinition("fas","rotate-right");pauseRoute(){this.logger.logEvent("route_button_clicked",{action:"pause"}),this.routingService.pauseRouteAnimation()}resumeRoute(){this.logger.logEvent("route_button_clicked",{action:"resume"}),this.routingService.resumeRouteAnimation()}restartRoute(){this.logger.logEvent("route_button_clicked",{action:"restart"}),this.routingService.restartRouteAnimation(),this.restartRouteCallback.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-control-button"]],outputs:{restartRouteCallback:"restartRouteCallback"},decls:4,vars:1,consts:[[1,"route-control-button"],[1,"route-control-button",3,"click"],[3,"icon"]],template:function(i,l){if(i&1&&Bn(0,tq,4,1,"button",0)(1,nq,4,1,"button",0)(2,rq,4,1,"button",0)(3,iq,0,0),i&2){let d;jn((d=l.animationStatus())===l.AnimationState.Playing?0:d===l.AnimationState.Paused?1:d===l.AnimationState.Finished?2:3)}},dependencies:[Dr],styles:["[_nghost-%COMP%]{position:absolute;top:20px;left:500px}@container mapvx-container (width <= 1024px){[_nghost-%COMP%]{top:90px;left:unset;right:20px}}.route-control-button[_ngcontent-%COMP%]{display:flex;width:180px;height:45px;justify-content:center;align-items:center;gap:10px;background:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general);border:none;cursor:pointer}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%]{width:45px}}.route-control-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px}.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"]})};var A1=class n{iconLibrary=Me(Yn);currentRoute=ir.required();startRouteClick=_s();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=Qt(()=>{let r=this.currentRoute();return this.toMinutes(r.duration)});distance=Qt(()=>{let r=this.currentRoute();return Math.ceil(r.length*3.28084)});toMinutes(r){return Math.ceil(r/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-info"]],inputs:{currentRoute:[1,"currentRoute"]},outputs:{startRouteClick:"startRouteClick"},decls:17,vars:5,consts:[[1,"route-info"],[1,"route-info-item"],[1,"route-info-item-label"],[3,"icon"],[1,"route-info-item-value"],[1,"start-route-button",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"span",2),sn(3,"Time"),lt(),Mt(4,"fa-icon",3),it(5,"span",4),sn(6),lt()(),it(7,"div",1)(8,"span",2),sn(9,"Distance"),lt(),Mt(10,"fa-icon",3),it(11,"span",4),sn(12),lt()()(),it(13,"button",5),on("click",function(){return l.onStartRouteClick()}),Mt(14,"fa-icon",3),it(15,"span"),sn(16,"Start Route"),lt()()),i&2&&(at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.time()," min"),at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.distance()," ft"),at(2),Ft("icon",l.faArrowTopRight))},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:40px}.route-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.route-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:var(--definitions-colors-text-black)}.start-route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;background-color:var(--definitions-colors-primary-900);color:var(--definitions-colors-text-50);border:none;cursor:pointer;width:100%}.start-route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-feature-settings:"liga" off,"clig" off;line-height:15px}.start-route-button[_ngcontent-%COMP%]{display:none}']})};var oq={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Hye=sr(zt({},oq),{"[class.ng-submitted]":"isSubmitted"});var sq=new yn("",{providedIn:"root",factory:()=>YR}),YR="always";var aq=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=qa({type:n});static \u0275inj=_a({})}return n})();var KR=(()=>{class n{static withConfig(i){return{ngModule:n,providers:[{provide:sq,useValue:i.callSetDisabledState??YR}]}}static \u0275fac=function(l){return new(l||n)};static \u0275mod=qa({type:n});static \u0275inj=_a({imports:[aq]})}return n})();function lq(n,r){if(n&1){let i=Fr();it(0,"button",5),on("click",function(){pr(i);let d=qt();return mr(d.clearSelectedPlace())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=qt();at(),Ft("icon",i.faXmark)}}function cq(n,r){if(n&1){let i=Fr();it(0,"button",10),on("click",function(){pr(i);let d=qt(2);return mr(d.useCurrentLocation())}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),sn(5,"Use current location"),lt()()()}if(n&2){let i=qt(2);at(2),Ft("icon",i.faLocationArrow)}}function uq(n,r){if(n&1){let i=Fr();it(0,"button",10),on("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.selectPlace(d))}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),sn(5),lt(),it(6,"div",14),sn(7),lt()()()}if(n&2){let i=r.$implicit,l=qt(2);at(2),Ft("icon",l.faLocationDot),at(3),Mo(i.title),at(2),Mo(i.address)}}function dq(n,r){n&1&&(it(0,"div",9),sn(1,"No results found"),lt())}function hq(n,r){if(n&1&&(it(0,"div",4)(1,"div",7),Bn(2,cq,6,1,"button",8),Ji(3,uq,8,3,"button",8,ta),Bn(5,dq,2,0,"div",9),lt()()),n&2){let i=qt();at(2),jn(i.allowCurrentLocation()&&i.locationPermission()!=="denied"?2:-1),at(),Qi(i.filteredPlaces()),at(2),jn(i.filteredPlaces().length===0&&i.filterText().trim()?5:-1)}}var k1=class n{logger=Me(Pn);locationService=Me(Wd);iconLibrary=Me(Yn);places=ir.required();initialSelectedPlace=ir(null);allowCurrentLocation=ir(!1);placeholder=ir("Set a starting point");selectedPlace=ls(()=>this.initialSelectedPlace());selectedPlaceChange=_s();isDropdownOpen=ln(!1);filterText=ls(()=>this.selectedPlace()?.title||"");filteredPlaces=Qt(()=>{let r=this.places(),i=this.filterText().toLowerCase().trim();return i?r.filter(l=>l.title?.toLowerCase().includes(i)||l.address?.toLowerCase().includes(i)):r});locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faLocationArrow=this.iconLibrary.getIconDefinition("fas","location-arrow");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");constructor(){this.checkLocationPermission()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r)}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.getCurrentLocation()}).catch(r=>{this.logger.logWarning("Error requesting location permission",r),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(r=>{this.selectedPlace.set(r),this.selectedPlaceChange.emit(r)}).catch(r=>{this.logger.logWarning("Error getting current location",r)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(r){this.selectedPlace.set(r),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(r)}clearSelectedPlace(){this.selectedPlace.set(null),this.filterText.set(""),this.selectedPlaceChange.emit(null)}onInputFocus(){this.isDropdownOpen.set(!0)}onInputBlur(){setTimeout(()=>{this.isDropdownOpen.set(!1)},150)}onInputChange(r){let i=r.target;this.filterText.set(i.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-place-selector"]],inputs:{places:[1,"places"],initialSelectedPlace:[1,"initialSelectedPlace"],allowCurrentLocation:[1,"allowCurrentLocation"],placeholder:[1,"placeholder"]},outputs:{selectedPlaceChange:"selectedPlaceChange"},decls:5,vars:4,consts:[[1,"place-selector"],[1,"input-container"],["type","text","name","place-input",1,"place-input",3,"input","focus","blur","value","placeholder"],[1,"clear-button"],[1,"dropdown-container"],[1,"clear-button",3,"click"],[3,"icon"],[1,"dropdown-list"],["type","button",1,"place-option"],[1,"no-results"],["type","button",1,"place-option",3,"click"],[1,"place-icon"],[1,"place-info"],[1,"place-title"],[1,"place-address"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"input",2),on("input",function(a){return l.onInputChange(a)})("focus",function(){return l.onInputFocus()})("blur",function(){return l.onInputBlur()}),lt(),Bn(3,lq,2,1,"button",3),lt(),Bn(4,hq,6,2,"div",4),lt()),i&2&&(at(2),Ft("value",l.filterText())("placeholder",l.placeholder()),at(),jn(l.selectedPlace()?3:-1),at(),jn(l.isDropdownOpen()?4:-1))},dependencies:[Mu,KR,Dr],styles:['[_nghost-%COMP%]{width:100%}.place-selector[_ngcontent-%COMP%]{position:relative;width:100%}.input-container[_ngcontent-%COMP%]{width:100%;display:flex}.place-input[_ngcontent-%COMP%]{width:100%;border:none;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;text-overflow:ellipsis;outline:none;color:var(--definitions-colors-text-black)}.place-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-primary-300)}.clear-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--definitions-colors-text-900)}.dropdown-container[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:4px}.dropdown-list[_ngcontent-%COMP%]{background:var(--definitions-colors-background-50);border-radius:8px;box-shadow:var(--definitions-shadows-general);max-height:300px;overflow-y:auto;border:1px solid var(--definitions-colors-gray-200)}.place-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:15px 24px;cursor:pointer;transition:background-color .2s ease;border-bottom:1px solid #f5f5f5;background:none;border:none;width:100%;text-align:left}.place-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.place-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.place-option[_ngcontent-%COMP%]:active{background-color:#e9ecef}.place-option[_ngcontent-%COMP%]:focus{outline:2px solid #5D5D5D;outline-offset:-2px}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:19.341px;height:19.341px;margin-top:2px;color:var(--definitions-colors-primary-600)}.place-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.place-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;color:var(--definitions-colors-text-900);word-wrap:break-word}.place-address[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800);word-wrap:break-word}.no-results[_ngcontent-%COMP%]{padding:20px 24px;text-align:center;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800)}@media (width <= 768px){.place-option[_ngcontent-%COMP%]{padding:12px 20px}.place-title[_ngcontent-%COMP%]{font-size:15px}.place-address[_ngcontent-%COMP%]{font-size:13px}}']})};var R1=class n{logger=Me(Pn);iconLibrary=Me(Yn);places=ir.required();initialDestination=ir(null);originPlace=ln(null);destinationPlace=ls(()=>this.initialDestination());originSelected=_s();destinationSelected=_s();swapPlaces=_s();clearDestination=_s();locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=Qt(()=>sC(this.originPlace())&&sC(this.destinationPlace()));onOriginSelected(r){this.originSelected.emit(r),this.originPlace.set(r)}onDestinationSelected(r){if(Al(r)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(r),this.destinationPlace.set(r)}onSwapPlaces(){let r=this.originPlace(),i=this.destinationPlace();if(Al(r)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(i),this.originSelected.emit(i),this.destinationPlace.set(r),this.destinationSelected.emit(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-selector"]],inputs:{places:[1,"places"],initialDestination:[1,"initialDestination"]},outputs:{originSelected:"originSelected",destinationSelected:"destinationSelected",swapPlaces:"swapPlaces",clearDestination:"clearDestination"},decls:20,vars:10,consts:[[1,"route-selector"],[1,"routing-option","origin"],[1,"place-info"],[1,"place-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 36 36","fill","none"],["width","36","height","36","rx","18","fill","#8DC8FF"],["d","M29.2517 17.7595C29.1117 23.9741 23.9602 28.8986 17.7456 28.7586C11.5309 28.6185 6.60648 23.4671 6.74649 17.2524C6.8865 11.0378 12.038 6.11332 18.2526 6.25333C24.4673 6.39334 29.3917 11.5448 29.2517 17.7595Z","fill","#2C57A0"],["d","M13.5364 22.4764C13.4259 22.5279 13.3135 22.5415 13.199 22.5173C13.0847 22.4932 12.9902 22.4373 12.9155 22.3496C12.8298 22.2721 12.7772 22.1766 12.7577 22.0629C12.7384 21.9495 12.7519 21.8395 12.7982 21.7327L17.6404 11.5662C17.7437 11.3532 17.9102 11.2493 18.1399 11.2545C18.3697 11.2597 18.5313 11.371 18.6249 11.5884L23.0044 21.9626C23.0458 22.0714 23.0543 22.182 23.03 22.2944C23.0054 22.407 22.9485 22.5001 22.8594 22.5736C22.7808 22.6579 22.6839 22.7095 22.5687 22.7283C22.4532 22.7475 22.3415 22.7288 22.2335 22.6723L17.9278 20.6691L13.5364 22.4764ZM14.4251 20.9295L17.954 19.5064L21.4153 21.087L18.0981 13.1117L14.4251 20.9295Z","fill","white"],[3,"selectedPlaceChange","places","initialSelectedPlace","allowCurrentLocation"],[1,"connector-line"],[1,"connector-dots"],[3,"icon"],[1,"connector-line-element"],["type","button",1,"swap-button",3,"click","disabled"],[1,"routing-option","destination"],[3,"selectedPlaceChange","places","initialSelectedPlace","placeholder"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),d0(),it(4,"svg",4),Mt(5,"rect",5)(6,"path",6)(7,"path",7),lt()(),h0(),it(8,"app-place-selector",8),on("selectedPlaceChange",function(a){return l.onOriginSelected(a)}),lt()()(),it(9,"div",9)(10,"div",10),Mt(11,"fa-icon",11),lt(),Mt(12,"div",12),it(13,"button",13),on("click",function(){return l.onSwapPlaces()}),Mt(14,"fa-icon",11),lt()(),it(15,"div",14)(16,"div",2)(17,"div",3),Mt(18,"fa-icon",11),lt(),it(19,"app-place-selector",15),on("selectedPlaceChange",function(a){return l.onDestinationSelected(a)}),lt()()()()),i&2&&(at(8),Ft("places",l.places())("initialSelectedPlace",l.originPlace())("allowCurrentLocation",!0),at(3),Ft("icon",l.faEllipsisVertical),at(2),Ft("disabled",!l.canSwapPlaces()),at(),Ft("icon",l.faArrowsRetweet),at(4),Ft("icon",l.faLocationDot),at(),Ft("places",l.places())("initialSelectedPlace",l.destinationPlace())("placeholder","Select a destination"))},dependencies:[Mu,k1,Dr],styles:['.route-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;position:relative;width:100%;box-sizing:border-box}.routing-option[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:0 40px 0 0;box-sizing:border-box;width:100%}.place-info[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.destination[_ngcontent-%COMP%] .place-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black)}.connector-line[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;width:100%;position:relative}.connector-dots[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.connector-dots[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:#5d5d5d}.connector-line-element[_ngcontent-%COMP%]{flex:1;height:1px;background:#e0e0e0;position:relative}.connector-line-element[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,#e0e0e0 0,#e0e0e0 4px,transparent 4px,transparent 8px);transform:translateY(-50%)}.swap-button[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:25px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.swap-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.swap-button[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f5f5f5}.swap-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:#5d5d5d}.clear-button[_ngcontent-%COMP%]{flex-shrink:0;width:20px;height:20px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .2s ease}.clear-button[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.clear-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:12px;color:#666}.select-destination-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background-color .2s ease;flex:1;text-align:left}.select-destination-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.select-destination-button[_ngcontent-%COMP%] .place-label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-weight:600;font-size:20px;line-height:1;color:#cbcbcb;font-variation-settings:"wdth" 100;letter-spacing:-1px}.destination-selector[_ngcontent-%COMP%]{position:absolute;top:81px;left:84.5px;width:310px;z-index:1000;background:#fff;box-shadow:0 4px 4px #00000040;border-radius:8px;overflow:hidden}@media (width <= 768px){.route-selector[_ngcontent-%COMP%]{padding:20px 16px}.place-text[_ngcontent-%COMP%]{font-size:18px}.place-icon[_ngcontent-%COMP%]{width:32px;height:32px}.place-icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}.destination-selector[_ngcontent-%COMP%]{left:16px;right:16px;width:auto}}']})};function fq(n,r){if(n&1){let i=Fr();it(0,"div",6)(1,"app-route-info",9),on("startRouteClick",function(){pr(i);let d=qt();return mr(d.startStepAnimation())}),lt()()}if(n&2){qt();let i=Wg(7);at(),Ft("currentRoute",i)}}var O1=class n{routeId="";route=Me(Wa);logger=Me(Pn);navigatorService=Me(Po);loadedDataService=Me(ui);mapService=Me(xi);markerService=Me(Zo);homeStateService=Me(yi);routingService=Me(wc);mapReady=vo(this.mapService.mapReady,{requireSync:!0});places=vo(Xs([this.loadedDataService.getAvailablePlaces(),this.loadedDataService.getInstitutionId()]).pipe(En(([r,i])=>r.filter(l=>l.parentInstitutionId===i))),{initialValue:[]});originPoint=ln(null);destinationPlace=ls(()=>this.initialDestination());initialDestination=ln(null);currentRoute=ln(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",this.logger.logEvent("page_view",{page_title:"Route Page",page_location:`/route/${this.routeId}`}),Un(()=>{let r=this.places();if(r.length>0){let i=r.find(l=>l.lazarilloId===this.routeId||l.clientId===this.routeId);i&&this.initialDestination.set(i)}}),Un(()=>{if(this.mapReady()){let i=qo(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(i)}}),Un(()=>{let r=this.destinationPlace();r&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(r.lazarilloId)||this.markerService.addRouteMarker(r),this.markerService.selectMarker(r.lazarilloId),qo(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100))}),Un(()=>{let r=this.originPoint(),i=this.destinationPlace();r&&i?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(r.position),this.markerService.addDestinationMarker(i),this.logger.logEvent("route_selected",{originId:Al(r)?"current-location":r.lazarilloId,originName:r.title,destinationId:i.lazarilloId,destinationName:i.title,destinationClientId:i.clientId||"",originClientId:Al(r)?"":r.clientId||""}),this.routingService.getRoute(r,i).then(l=>{this.currentRoute.set(l),this.routingService.startAnimatingRoute(l),this.fitMapToRoute(r,i,l)}).catch(l=>{this.logger.logWarning("Error getting route",l)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId);let r=this.originPoint(),i=this.destinationPlace();this.logger.logEvent("route_back_clicked",{destinationId:i?.lazarilloId||"",destinationName:i?.title||"",destinationClientId:i?.clientId||"",originId:Al(r)?"current-location":r?.lazarilloId||"",originName:r?.title||"",originClientId:Al(r)?"":r?.clientId||""})}onDestinationSelected(r){this.destinationPlace.set(r)}onOriginSelected(r){this.originPoint.set(r)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(r,i,l){let d=r?.position??this.originPoint()?.position,a=i?.position??this.destinationPlace()?.position,S=l??this.currentRoute(),O=document.querySelector(".route-related-components");if(d&&a&&S&&O&&this.mapReady()){let F=getComputedStyle(O),Z=Number.parseInt(F.getPropertyValue("--padding-top")),ee=Number.parseInt(F.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(d,a,S,{padding:{top:Z,left:ee,right:70,bottom:50}})},100)}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-screen"]],decls:12,vars:4,consts:[[1,"route-screen"],[1,"back-button"],["backButton","",3,"click"],[1,"route-screen-content"],[1,"route-related-components"],[3,"originSelected","destinationSelected","places","initialDestination"],[1,"route-info"],[1,"map"],[3,"restartRouteCallback"],[3,"startRouteClick","currentRoute"]],template:function(i,l){if(i&1){let d=Fr();it(0,"div",0)(1,"div",1)(2,"button",2),on("click",function(){return pr(d),mr(l.returnToProfile())}),sn(3,"Back"),lt()(),it(4,"div",3)(5,"div",4)(6,"app-route-selector",5),on("originSelected",function(S){return pr(d),mr(l.onOriginSelected(S))})("destinationSelected",function(S){return pr(d),mr(l.onDestinationSelected(S))}),lt(),Kp(7),Bn(8,fq,2,1,"div",6),lt(),it(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),on("restartRouteCallback",function(){return pr(d),mr(l.fitMapToRoute())}),lt()()()()()}if(i&2){at(6),Ft("places",l.places())("initialDestination",l.initialDestination()),at();let d=qg(l.currentRoute());at(),jn(d!==null?8:-1)}},dependencies:[gm,Zd,R1,A1,P1],styles:[".route-screen-content[_ngcontent-%COMP%]{position:relative}.route-related-components[_ngcontent-%COMP%]{--padding-top: 130;--padding-left: 450;position:absolute;top:0;left:0;width:450px;box-sizing:border-box;z-index:1;display:flex;flex-direction:column;gap:40px;padding:40px 38px;background-color:var(--definitions-colors-background-white)}@container mapvx-container (width <= 1024px){.route-related-components[_ngcontent-%COMP%]{--padding-top: 70;--padding-left: 50;position:unset;width:100%}}.map[_ngcontent-%COMP%]{width:100%;height:820px}"],changeDetection:0})};var XR=[{path:"",component:d1,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:b1},{path:"search",component:C1}]},{path:"profile/:id",component:M1},{path:"route/:id",component:O1},{path:"**",redirectTo:""}];var L1=class{handleError(r){console.error("CustomErrorHandler",r)}};var F1=class n extends mc{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(r){return this._baseHref+"#"+r}pushState(r,i,l,d){this._updatePath(r,l,d)}replaceState(r,i,l,d){this._updatePath(r,l,d)}forward(){}back(){}getState(){return null}historyGo(r){}onPopState(r){this._popStateListeners.push(r)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(r,i,l){this._path=i+(l?"?"+l:""),this._notifyPopState(r,i)}_notifyPopState(r,i){let l={type:"popstate",state:r,url:i,pop:!0};this._popStateListeners.forEach(d=>{try{d(l)}catch(a){console.error("Error in popstate listener:",a)}})}getCurrentPath(){return this._path}setInitialPath(r){this._path=r}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac,providedIn:"root"})};var JR={providers:[{provide:Js,useClass:L1},Ox(),PC(XR),{provide:mc,useClass:F1},Xv(yA.forRoot(ry,[{command:"config",values:[ry,{send_page_view:!1}]}]))]};oC(JR).then(n=>{let r=aP(u1,{injector:n.injector});customElements.define("mapvx-website",r)}).catch(n=>console.error(n));
1512
+ </svg>`,i}pauseRouteAnimation(){this.animationStatusSubject.next(2),this.mapService.pauseAnimatingRoute()}resumeRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.resumeAnimatingRoute()}restartRouteAnimation(){this.animationStatusSubject.next(1),this.mapService.restartAnimatingRoute()}removeRoute(){this.animationStatusSubject.next(0),this.activeRouteSubject.next(null),this.currentStepSubject.next(null),this.mapService.removeRoute()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var l1={term:"",results:[]};function c1(n,r){let i=r?.injector??Me(Ho),l=new ja(1),d=Un(()=>{let a;try{a=n()}catch(S){qo(()=>l.error(S));return}qo(()=>l.next(a))},{injector:i,manualCleanup:!0});return i.get(ea).onDestroy(()=>{d.destroy(),l.complete()}),l.asObservable()}function vo(n,r){let l=!r?.manualCleanup?r?.injector?.get(ea)??Me(ea):null,d=VG(r?.equal),a;r?.requireSync?a=ln({kind:0},{equal:d}):a=ln({kind:1,value:r?.initialValue},{equal:d});let S,O=n.subscribe({next:F=>a.set({kind:1,value:F}),error:F=>{a.set({kind:2,error:F}),S?.()},complete:()=>{S?.()}});if(r?.requireSync&&a().kind===0)throw new Yt(601,!1);return S=l?.onDestroy(O.unsubscribe.bind(O)),Qt(()=>{let F=a();switch(F.kind){case 1:return F.value;case 2:throw F.error;case 0:throw new Yt(601,!1)}},{equal:r?.equal})}function VG(n=Object.is){return(r,i)=>r.kind===1&&i.kind===1&&n(r.value,i.value)}var yi=class n{loadedDataService=Me(ui);homePlaces=ln([]);showCategoryFilters=ln(!0);showCityFilter=ln(!0);defaultToMap=ln(!1);activeView=ls(()=>this.defaultToMap()?"map":"grid");inputValue=ln("");selectedInstitution=ln("");hideDeals=ln(!1);cardWidth=ln(void 0);rowsPerPage=ln(2);initialInstitutionId=ln("");showDealLabels=ln(!1);lastListedPlaces=ln([]);categoryFiltersData=vo(this.loadedDataService.getInstitution().pipe(En(r=>{let i=r.properties;if(i){let l=i.filter(d=>"childPlaces"in d&&d.childPlaces!==void 0).map(d=>({placeData:"childPlaces"in d?d.childPlaces:[],name:d.title}));return l.splice(1,0,{name:"All",placeData:[]}),l}return[]})),{initialValue:[]});selectedFilter=ls({source:this.categoryFiltersData,computation:(r,i)=>{let l=r.map(a=>a.name),d=i?.value;return d&&l.includes(d)?d:r[0]?.name??""}});selectedCity=ls(()=>{let r=this.selectedInstitution(),i=this.loadedDataService.cityFilterOptions();return i.find(d=>d.institutionId===r)||i.length>0?i[0]:void 0});filterId=Qt(()=>{let r=this.selectedCity();return r?r.filterId:this.initialInstitutionId()});currentPageIndex=ls({source:this.selectedFilter,computation:(r,i)=>r!==i?.source?1:i?.value??1});lastCardSelected=new wr;userAction=new wr;lastSearchData=ln(l1);static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac})};var jR={fas:{},fak:{}},SS=[];function VR(n){Object.keys(n).forEach(function(r){if(r!=="prefix"){var i=n[r],l=i.icon[2];l.forEach(function(d){typeof d=="string"&&(jR[i.prefix][d]=i)}),jR[i.prefix][i.iconName]=i,SS.push(i)}})}VR(jC);VR(CS);var Ry=RI(FC());var u1=class n{destroy$=new wr;apiKey=ir("");institutionId=ir("");initialData=ir("");showCategoryFilters=ir(!0,{transform:r=>typeof r=="string"?r==="true":r});showCityFilter=ir(!0,{transform:r=>typeof r=="string"?r==="true":r});defaultToMap=ir(!1,{transform:r=>typeof r=="string"?r==="true":r});inheritFontFamily=ir(!1,{transform:r=>typeof r=="string"?r==="true":r});hideDeals=ir(!1,{transform:this.transformToBoolean});showDealLabels=ir(!1,{transform:this.transformToBoolean});cardWidth=ir(void 0,{transform:r=>{if(!(r==null||r==="")){if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?void 0:i}return typeof r=="number"&&r<=0?void 0:r}}});rowsPerPage=ir(2,{transform:r=>{if(typeof r=="string"){let i=Number.parseInt(r,10);return Number.isNaN(i)||i<=0?2:Math.min(Math.max(i,1),10)}return r<=0?2:Math.min(Math.max(r,1),10)}});cardSelected=_s();userAction=_s();router=Me(Ud);navigatorService=Me(Po);locationStrategy=Me(mc);platformId=Me(Dl);logger=Me(Pn);sdkService=Me(na);loadedDataService=Me(ui);homeStateService=Me(yi);iconLibrary=Me(ky);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;constructor(){this.loadIcons(),this.logger.sessionStart(),Un(()=>{let r=this.apiKey();r&&r.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(r.trim()),this.logger.setApiKey(r.trim()),this.loadData())}),Un(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),Un(()=>{let r=this.showDealLabels();this.homeStateService.showDealLabels.set(r)}),Un(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),Un(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),Un(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),Un(()=>{let r=this.initialData();r&&r.trim()!==""&&this.processInitialData(r)}),Un(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),Un(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),Un(()=>{let r=this.defaultToMap();this.logger.log("====> defaultToMap input",r),this.homeStateService.defaultToMap.set(r)}),Un(()=>{let r=this.institutionId();r&&r.trim()!==""&&(this.updateInstitution(r),this.logger.setInstitutionId(r))}),this.homeStateService.lastCardSelected.pipe(os(this.destroy$)).subscribe(r=>{this.cardSelected.emit(r),this.logger.log("====> cardSelected",r)}),this.homeStateService.userAction.pipe(os(this.destroy$)).subscribe(r=>{this.userAction.emit(r),this.logger.log("====> userAction",r)})}ngOnInit(){gc(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(...SS)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(r){this.loadedDataService.cityFilterOptions.set(r);let i=r[0];i&&this.homeStateService.selectedInstitution.set(i.institutionId);let l=r.filter(d=>d.type==="parent-place");Promise.all(l.map(async d=>{let a=async()=>{let O=await this.sdkService.getPlaceDetail(d.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(O)},S=async()=>{let O=await this.sdkService.getSubPlaces(d.parentPlaceId);this.loadedDataService.updateAvailablePlaces(O)};await Promise.all([a(),S()])}))}transformToBoolean(r){return typeof r=="string"?r==="true":r}processInitialData(r){try{let i=JSON.parse(r);if(i.availablePlaces){let d=i.availablePlaces.map(a=>new Ry.LzPlace(a)).filter(a=>a.generalCategory!=="transport"&&!a.hidePlace);this.loadedDataService.updateAvailablePlaces(d),this.logger.log(`\u2705 Successfully loaded ${d.length} places from initial data`)}if(i.institutions){let d=i.institutions.map(a=>new Ry.Institution(a)).find(a=>a.lazarilloId===this.institutionId());d?this.loadedDataService.setInstitution(d):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(i){this.logger.log("\u274C Error processing initial data",i),this.logger.log(`\u274C Data: ${r}`)}}async loadPlaces(){let r=gc(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${r}...`);let i=await this.sdkService.getAvailablePlaces(),l=i.filter(d=>d.generalCategory!=="transport"&&!d.hidePlace);this.loadedDataService.updateAvailablePlaces(l),this.logger.log(`\u2705 Successfully loaded ${i.length} places on ${r}`)}catch(i){this.logger.log(`\u274C Error loading initial places data on ${r}:`,i)}}async loadConfiguration(){try{let r=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(r);let i=r.cityOptions||[];this.loadCityFilterOptions(i),this.logger.log("\u2705 Successfully loaded configuration",r)}catch(r){this.logger.log("\u274C Error loading initial configuration",r)}}async loadInstitution(){try{let r=await this.sdkService.getInstitutions(),i=r.find(l=>l.lazarilloId===this.institutionId());this.loadedDataService.setInstitutions(r),i?(this.loadedDataService.setInstitution(i),this.logger.log("\u2705 Successfully loaded institution",i)):this.logger.log("\u274C Institution not found")}catch(r){this.logger.log("\u274C Error loading institution data",r)}}updateInstitution(r){let i=this.initialData();if(i&&i.trim()!==""){let l=JSON.parse(i);if(l.institutions){let d=l.institutions.map(S=>{try{return new Ry.Institution(S)}catch(O){this.logger.logWarning("\u274C Error parsing institution",O);return}}).filter(S=>S!==void 0),a=d.find(S=>S.lazarilloId===r);if(this.loadedDataService.setInstitutions(d),a){this.loadedDataService.setInstitution(a),this.logger.log("\u2705 Successfully updated institution",a);return}}}this.loadInstitution()}handleInstanceTracking(){n.instanceCount++;let r=this.checkForExistingRouterContent(),i=this.router.url;n.hasBeenConnected||r||i!=="/"&&n.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${n.instanceCount}`),this.logger.log(` - URL del router: ${i}`),this.logger.log(` - Contenido en router outlet: ${r}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${n.instanceCount})`),n.hasBeenConnected=!0}checkForExistingRouterContent(){try{let r=document.querySelector("router-outlet");return r?r.children.length>0:!1}catch{return!1}}ngAfterViewInit(){this.isConnected=!0,this.scheduleRouterInitialization()}ngOnDestroy(){this.logger.sessionEnd(),this.isConnected=!1,this.destroy$.next(),this.destroy$.complete()}scheduleRouterInitialization(){gc(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let r=this.router.url,i=this.router.routerState.root.firstChild;r==="/"&&!i?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(l=>{console.error("Error en navegaci\xF3n inicial:",l),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let r=gc(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},r)}checkAndFixRouterSync(){if(!gc(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let r=this.locationStrategy.getCurrentPath()||"/",i=this.router.url,l=this.router.routerState.root.firstChild,d=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${r}"`),this.logger.log(` - Router URL: "${i}"`),this.logger.log(` - Tiene ruta activa: ${!!l}`),this.logger.log(` - Contenido en router outlet: ${d}`),r==="/"&&i!=="/"||r==="/"&&!l&&d||r==="/"&&i==="/"&&d&&!l?(this.logger.log("\u26A0\uFE0F Desincronizaci\xF3n detectada - aplicando correcci\xF3n"),this.performGentleReset()):this.logger.log("\u2705 Router sincronizado correctamente")}performGentleReset(){this.logger.log("\u{1F504} Realizando reset suave del router"),this.router.navigateByUrl("/",{replaceUrl:!0}).then(()=>{this.logger.log("\u2705 Navegaci\xF3n correctiva completada")}).catch(r=>{console.error("\u274C Error en navegaci\xF3n correctiva:",r)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-root"]],inputs:{apiKey:[1,"apiKey"],institutionId:[1,"institutionId"],initialData:[1,"initialData"],showCategoryFilters:[1,"showCategoryFilters"],showCityFilter:[1,"showCityFilter"],defaultToMap:[1,"defaultToMap"],inheritFontFamily:[1,"inheritFontFamily"],hideDeals:[1,"hideDeals"],showDealLabels:[1,"showDealLabels"],cardWidth:[1,"cardWidth"],rowsPerPage:[1,"rowsPerPage"]},outputs:{cardSelected:"cardSelected",userAction:"userAction"},features:[r_([Po,yi,Zo,Yn,wc,Wd])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"router-outlet"),lt()()()),i&2&&(at(),ci("inherit-font-family",l.inheritFontFamily()))},dependencies:[o1,mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.named-container[_ngcontent-%COMP%]{container-name:mapvx-container;container-type:inline-size;width:100%}.app-container[_ngcontent-%COMP%]{display:flex;padding:0;flex-direction:column;justify-content:center;align-items:flex-start;gap:22px;background:var(--definitions-colors-background-50);font-family:Open Sans,sans-serif}.app-container.inherit-font-family[_ngcontent-%COMP%]{font-family:inherit}.app-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:19px}.app-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-h1);font-family:inherit}.app-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit}.main-navigation[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}.nav-button[_ngcontent-%COMP%]{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.9rem;transition:all .2s ease}.nav-button[_ngcontent-%COMP%]:hover{background:#ffffff4d;transform:translateY(-1px)}.nav-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.route-debug[_ngcontent-%COMP%]{margin-top:.5rem;text-align:center}.route-debug[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#fffc;font-size:.8rem;font-family:Courier New,monospace;background:#0000001a;padding:.25rem .5rem;border-radius:4px}.app-content[_ngcontent-%COMP%]{width:100%}"]})};var UG=["categoryFilters"];function $G(n,r){if(n&1){let i=Fr();it(0,"button",14),on("click",function(){pr(i);let d=qt();return mr(d.onClearInput())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=qt();at(),Ft("icon",i.faXmark)}}function GG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=qt(2);Ft("icon",i.faCaretUp)}}function HG(n,r){if(n&1&&Mt(0,"fa-icon",6),n&2){let i=qt(2);Ft("icon",i.faCaretDown)}}function qG(n,r){if(n&1){let i=Fr();it(0,"button",21),on("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.onCitySelect(d))}),sn(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function WG(n,r){if(n&1&&(it(0,"div",19),Ji(1,qG,2,1,"button",20,cf),lt()),n&2){let i=qt(2);at(),Qi(i.citiesOptions())}}function ZG(n,r){if(n&1){let i=Fr();it(0,"div",9)(1,"button",15),on("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),Mt(2,"fa-icon",6),lt(),it(3,"button",16),on("click",function(){pr(i);let d=qt();return mr(d.onCityFilterClick())}),it(4,"span",17),sn(5),lt(),it(6,"div",18),Bn(7,GG,1,1,"fa-icon",6)(8,HG,1,1,"fa-icon",6),lt()(),Bn(9,WG,3,0,"div",19),lt()}if(n&2){let i,l=qt();at(),ci("active",l.isCityDropdownOpen()),at(),Ft("icon",l.faFilter),at(3),Mo((i=l.selectedCity())==null?null:i.name),at(2),jn(l.isCityDropdownOpen()?7:8),at(2),jn(l.isCityDropdownOpen()?9:-1)}}var d1=class n{logger=Me(Pn);stateService=Me(yi);mapService=Me(xi);navigatorService=Me(Po);loadedDataService=Me(ui);iconLibrary=Me(Yn);categoryFilters;activeView=Qt(()=>this.stateService.activeView());showCityFilter=Qt(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=Qt(()=>this.stateService.inputValue());citiesOptions=Qt(()=>this.loadedDataService.cityFilterOptions());selectedCity=Qt(()=>this.stateService.selectedCity());isCityDropdownOpen=ln(!1);mapReady=vo(this.mapService.mapReady,{initialValue:!1});faGrid2=this.iconLibrary.getIconDefinition("fas","grid-2");faMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","magnifying-glass");faMapLocationDot=this.iconLibrary.getIconDefinition("fas","map-location-dot");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");faCaretDown=this.iconLibrary.getIconDefinition("fas","caret-down");faCaretUp=this.iconLibrary.getIconDefinition("fas","caret-up");faFilter=this.iconLibrary.getIconDefinition("fas","filter");constructor(){Un(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let r=this.stateService.lastListedPlaces(),i=r.map(d=>d.inFloors?.[0]),l=this.getMostFrequentValue(i);l!==void 0&&this.mapService.updateFloor(l),setTimeout(()=>{this.mapService.fitCoordinates(r.map(d=>d.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let r=new URLSearchParams(location.search),i=r.get("search");if(i){this.stateService.inputValue.set(i),setTimeout(()=>{this.logger.logEvent("search_text_from_url",{term:i}),this.navigatorService.navigateToSearchView()},100);return}let l=r.get("tenant");if(l){this.logger.logEvent("profile_from_url",{id:l}),this.navigatorService.navigateToProfile(l);return}let d=r.get("destination");d&&(this.logger.logEvent("route_from_url",{id:d}),this.navigatorService.navigateToRoute(d))}onGridClick(){this.stateService.activeView.set("grid"),this.logger.logEvent("grid_view_selected")}onMapClick(){this.stateService.activeView.set("map"),this.logger.logEvent("map_view_selected")}onInputChange(r){let i=r.target;this.stateService.inputValue.set(i.value),this.navigatorService.navigateToSearchView()}onClearInput(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.navigatorService.navigateToHome()}onCityFilterClick(){this.isCityDropdownOpen.update(r=>!r)}onCitySelect(r){if(this.stateService.selectedInstitution.set(r.institutionId),this.stateService.selectedCity.set(r),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(r.institutionId),this.logger.setInstitutionId(r.institutionId),r.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0),this.logger.setParentPlaceId("");else{let l=this.loadedDataService.potentialParentPlaces().find(d=>d.lazarilloId===r.parentPlaceId);l?(this.mapService.setParentPlace(l),this.loadedDataService.parentPlace.set(l),this.logger.setParentPlaceId(l.lazarilloId)):(this.mapService.removeParentPlace(),this.logger.setParentPlaceId(""))}}getMostFrequentValue(r){if(r.length===0)return;let i=new Map,l=0,d;for(let a of r){if(a==null)continue;let S=(i.get(a)||0)+1;i.set(a,S),S>l&&(l=S,d=a)}return d}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-home-screen"]],viewQuery:function(i,l){if(i&1&&Vg(UG,5),i&2){let d;Ug(d=$g())&&(l.categoryFilters=d.first)}},decls:23,vars:12,consts:[[1,"home-screen"],[1,"sub-navigation"],[1,"sub-nav-top"],[1,"search-section"],[1,"search-bar"],[1,"search-icon"],[3,"icon"],["name","search input","type","text","placeholder","Search...",1,"search-input",3,"input","value"],[1,"search-clear"],[1,"city-filter-container"],[1,"view-toggle"],[1,"view-btn",3,"click"],[1,"view-icon"],[1,"sub-content"],[1,"search-clear",3,"click"],[1,"mobile-city-filter",3,"click"],[1,"desktop-city-filter",3,"click"],[1,"city-text"],[1,"dropdown-icon"],[1,"city-dropdown"],[1,"city-option"],[1,"city-option",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),Mt(6,"fa-icon",6),lt(),it(7,"input",7),on("input",function(a){return l.onInputChange(a)}),lt(),Bn(8,$G,2,1,"button",8),lt(),Bn(9,ZG,10,6,"div",9),lt(),it(10,"div",10)(11,"button",11),on("click",function(){return l.onGridClick()}),it(12,"div",12),Mt(13,"fa-icon",6),lt(),it(14,"span"),sn(15,"Grid View"),lt()(),it(16,"button",11),on("click",function(){return l.onMapClick()}),it(17,"div",12),Mt(18,"fa-icon",6),lt(),it(19,"span"),sn(20,"Map View"),lt()()()()(),it(21,"div",13),Mt(22,"router-outlet"),lt()()),i&2&&(at(4),ci("active",l.inputValue()!==""),at(2),Ft("icon",l.faMagnifyingGlass),at(),Ft("value",l.inputValue()),at(),jn(l.inputValue()!==""?8:-1),at(),jn(l.showCityFilter()?9:-1),at(2),ci("active",l.activeView()==="grid"),at(2),Ft("icon",l.faGrid2),at(3),ci("active",l.activeView()==="map"),at(2),Ft("icon",l.faMapLocationDot))},dependencies:[Dr,mf],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;border:0}.home-screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.sub-navigation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2.25rem;margin-bottom:1.5rem}.sub-nav-top[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:40px}@container mapvx-container (width <= 640px){.sub-nav-top[_ngcontent-%COMP%]{gap:13px}}.search-section[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:center}@container mapvx-container (width <= 640px){.search-section[_ngcontent-%COMP%]{gap:11px}}.search-bar[_ngcontent-%COMP%]{background:var(--definitions-colors-background-white);border-bottom:1px solid var(--definitions-colors-primary-black);display:flex;width:342px;padding:12px 20px;align-items:center;gap:10px}@container mapvx-container (width <= 960px){.search-bar[_ngcontent-%COMP%]{width:150px}}@container mapvx-container (width <= 640px){.search-bar[_ngcontent-%COMP%]{width:110px}}.search-bar.active[_ngcontent-%COMP%]{border-bottom:1px solid var(--definitions-colors-secondary-orange)}.search-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);display:flex;align-items:center;font-size:20px}.search-bar.active[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.search-clear[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);display:flex;align-items:center;font-size:20px;border:none;background:none}.search-clear[_ngcontent-%COMP%]:hover{cursor:pointer}.search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font:var(--definitions-textFonts-desktop-button-4);font-family:inherit;color:var(--definitions-colors-text-800);width:100%}.search-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-text-800)}.city-filter-container[_ngcontent-%COMP%]{position:relative}.desktop-city-filter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;height:45px;box-sizing:border-box;cursor:pointer;border:none;background:none}@container mapvx-container (width <= 640px){.desktop-city-filter[_ngcontent-%COMP%]{display:none}}.city-text[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap}.dropdown-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);display:flex;align-items:center;font-size:12px}.mobile-city-filter[_ngcontent-%COMP%]{display:none}@container mapvx-container (width <= 640px){.mobile-city-filter[_ngcontent-%COMP%]{display:flex;height:45px;width:52px;padding:0;justify-content:center;align-items:center;gap:10px;cursor:pointer;border:none;background:var(--definitions-colors-background-white);color:var(--definitions-colors-primary-black);font-size:20px}.mobile-city-filter.active[_ngcontent-%COMP%]{background:var(--definitions-colors-primary-black);color:var(--definitions-colors-black_white-50)}}.city-dropdown[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background:var(--definitions-colors-background-white);border:1px solid var(--definitions-colors-primary-300);z-index:1;padding:8px 0;min-width:111px}.city-option[_ngcontent-%COMP%]{display:block;width:100%;padding:12px 16px;border:none;background:none;text-align:center;cursor:pointer;font:var(--definitions-textFonts-desktop-input-2);font-family:inherit;color:var(--definitions-colors-text-900);transition:background-color .2s ease}.city-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-primary-100)}.city-option[_ngcontent-%COMP%]:hover{background:var(--definitions-colors-background-50)}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center}.view-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;padding:10px 28px;border:none;background:var(--definitions-colors-background-50);cursor:pointer;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;color:var(--definitions-colors-text-900);white-space:nowrap;transition:all .2s ease;position:relative;border-bottom:1px solid var(--definitions-colors-text-900)}.view-btn.active[_ngcontent-%COMP%]{background:var(--definitions-colors-text-900);color:var(--definitions-colors-text-50)}.view-btn[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%]{display:flex;align-items:center;color:currentcolor}@container mapvx-container (width <= 770px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}@container mapvx-container (width <= 640px){.view-btn[_ngcontent-%COMP%]{padding:10px 0;width:52px;justify-content:center}.view-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"],changeDetection:0})};function h1(n){return n.tags?.includes("deals")||n.tags?.includes("events")}var YG=()=>({rotate:42});function KG(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=qt();Ft("icon",i.faCircleNotch)("transform",Iu(2,YG))}}function XG(n,r){n&1&&(it(0,"div",4),sn(1,"Deals + Events"),lt())}var f1=class n{logger=Me(Pn);iconLibrary=Me(Yn);navigatorService=Me(Po);homeStateService=Me(yi);fromSearch=ir(!1);place=ir.required();hasDealsOrEvents=Qt(()=>this.place().banners.some(h1));hideDeals=Qt(()=>this.homeStateService.hideDeals());showDealLabels=Qt(()=>this.homeStateService.showDealLabels());imageSrc=Qt(()=>this.place().images[0]||p_);isImageLoading=ln(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){Un(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let r=this.place(),i=r.lazarilloId;this.homeStateService.lastCardSelected.next(i),this.navigatorService.navigateToProfile(i),this.fromSearch()?this.logger.logEvent("search_result_card_selected",{id:i,name:r.title,clientId:r.clientId||""}):this.logger.logEvent("card_selected",{id:i,name:r.title,clientId:r.clientId||""})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-card"]],inputs:{fromSearch:[1,"fromSearch"],place:[1,"place"]},decls:12,vars:8,consts:[[1,"location-card",3,"click"],[1,"card-image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"card-deals-or-events"],[1,"card-content"],[1,"location-name"],[1,"location-address"],[1,"location-category"]],template:function(i,l){i&1&&(it(0,"button",0),on("click",function(){return l.navigateToProfile()}),it(1,"div",1)(2,"img",2),on("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Bn(3,KG,1,3,"fa-icon",3)(4,XG,2,0,"div",4),lt(),it(5,"div",5)(6,"h3",6),sn(7),lt(),it(8,"p",7),sn(9),lt(),it(10,"span",8),sn(11),lt()()()),i&2&&(at(),ci("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),sf)("alt",l.place().title),at(),jn(l.isImageLoading()?3:l.hasDealsOrEvents()&&!l.hideDeals()&&l.showDealLabels()?4:-1),at(4),Mo(l.place().title),at(2),Mo(l.place().address),at(2),Mo(l.place().localizedCategory))},dependencies:[Dr],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0}.location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px;background:var(--definitions-colors-background-50);border:none;width:100%}.location-card[_ngcontent-%COMP%]:hover{cursor:pointer}.card-image[_ngcontent-%COMP%]{width:100%;overflow:hidden;position:relative;aspect-ratio:1/1}@container mapvx-container (width <= 640px){.card-image[_ngcontent-%COMP%]{min-width:160px;min-height:160px}}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}.card-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{transform:scale(1.2)}.card-image[_ngcontent-%COMP%] .card-deals-or-events[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;background-color:var(--definitions-colors-secondary-orange);color:var(--definitions-colors-text-white);display:flex;padding:5px;justify-content:center;align-items:center;gap:8.462px;flex-shrink:0;font:var(--definitions-textFonts-desktop-body-4);font-family:inherit}.card-image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);display:flex;justify-content:center;align-items:center}.card-image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.card-image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.card-content[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.card-content[_ngcontent-%COMP%]{min-width:160px}}.location-name[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black);font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-address[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;text-align:start}.location-category[_ngcontent-%COMP%]{color:var(--definitions-colors-text-light-grey);font:var(--definitions-textFonts-desktop-body-5);font-family:inherit;display:none}"],changeDetection:0})};var JG=["cardContainer"],QG=["*"];function eH(n,r){if(n&1&&Mt(0,"app-location-card",3),n&2){let i=r.$implicit,l=qt();Ft("place",i)("fromSearch",l.fromSearch())}}function tH(n,r){n&1&&Eu(0)}function nH(n,r){if(n&1){let i=Fr();it(0,"button",7),on("click",function(){pr(i);let d=qt(3);return mr(d.previousPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=qt(3);at(),Ft("icon",i.faChevronLeft)}}function rH(n,r){if(n&1&&Bn(0,nH,2,1,"button",6),n&2){let i=qt().$implicit,l=qt();jn(i<l.currentPageIndex()?0:-1)}}function iH(n,r){n&1&&(it(0,"button",9),sn(1,"..."),lt())}function oH(n,r){if(n&1){let i=Fr();it(0,"button",11),on("click",function(){pr(i);let d=qt(3);return mr(d.nextPage())}),Mt(1,"fa-icon",8),lt()}if(n&2){let i=qt(3);at(),Ft("icon",i.faChevronRight)}}function sH(n,r){if(n&1&&(Bn(0,iH,2,0,"button",9),Bn(1,oH,2,1,"button",10)),n&2){let i=qt().$implicit,l=qt();jn(i<l.totalPages()?0:-1),at(),jn(i>l.currentPageIndex()?1:-1)}}function aH(n,r){if(n&1){let i=Fr();Bn(0,rH,1,1),it(1,"button",5),on("click",function(){let d=pr(i).$implicit,a=qt();return mr(a.goToPage(d))}),sn(2),lt(),Bn(3,sH,2,2)}if(n&2){let i=r.$implicit,l=r.$index,d=r.$count,a=qt();jn(l===0?0:-1),at(),ci("active",a.currentPageIndex()===i),at(),eo(" ",i," "),at(),jn(l===d-1?3:-1)}}var pm=class n{logger=Me(Pn);stateService=Me(yi);iconLibrary=Me(Yn);cardContainer=a_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");fromSearch=ir(!1);places=ir.required();itemsPerPage=Qt(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));currentPageIndex=Qt(()=>this.stateService.currentPageIndex());totalPages=Qt(()=>Math.ceil(this.places().length/this.itemsPerPage()));cardContainerStyles=Qt(()=>{let r=this.stateService.cardWidth();return r?{"--card-width":`${r}`}:{}});pages=Qt(()=>{let r=this.totalPages();switch(r){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let l=this.currentPageIndex()-1;return l<1&&(l=1),l+2>r&&(l=r-2),Array.from({length:3},(d,a)=>a+l)}}});currentPagePlaces=Qt(()=>{let r=this.places(),i=this.itemsPerPage(),l=this.currentPageIndex();return r.slice((l-1)*i,l*i)});showMap=Qt(()=>this.stateService.activeView()==="map");calculateItemsPerPage(r,i,l,d=2){try{if(i){let a=globalThis.getComputedStyle(i.nativeElement),S=l??Number.parseInt(a.getPropertyValue("--card-width")||"0"),O=Number.parseInt(a.getPropertyValue("--card-gap")||"0"),F=S+O;if(F<=0)return d*5;let Z=i.nativeElement.clientWidth,X=Math.floor((Z+O)/F)*d;return Number.isFinite(X)&&X>0?X:d*5}return d*5}catch(a){return this.logger.logError("Error calculating items per page",a),d*5}}nextPage(){let r=this.currentPageIndex(),i=this.totalPages();r<i&&this.stateService.currentPageIndex.set(r+1)}previousPage(){let r=this.currentPageIndex();r>1&&this.stateService.currentPageIndex.set(r-1)}goToPage(r){this.stateService.currentPageIndex.set(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-paginator"]],viewQuery:function(i,l){i&1&&Gg(l.cardContainer,JG,5),i&2&&Hg()},inputs:{fromSearch:[1,"fromSearch"],places:[1,"places"]},ngContentSelectors:QG,decls:9,vars:6,consts:[["cardContainer",""],[1,"paginator"],[1,"paginator-places",3,"ngStyle"],[3,"place","fromSearch"],[1,"paginator-buttons"],[1,"paginator-button",3,"click"],[1,"previous-button"],[1,"previous-button",3,"click"],[3,"icon"],[1,"paginator-button","ellipsis"],[1,"next-button"],[1,"next-button",3,"click"]],template:function(i,l){i&1&&(Su(),it(0,"div",1)(1,"div",2,0),Ji(3,eH,1,2,"app-location-card",3,ta,!1,tH,1,0),lt(),it(6,"div",4),Ji(7,aH,4,5,null,null,cf),lt()()),i&2&&(ci("with-map",l.showMap()),at(),ci("with-map",l.showMap()),Ft("ngStyle",l.cardContainerStyles()),at(2),Qi(l.currentPagePlaces()),at(4),Qi(l.pages()))},dependencies:[Mu,Zx,f1,Dr],styles:['.paginator[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:36px}.paginator.with-map[_ngcontent-%COMP%]{min-height:730px}@container mapvx-container (width <= 1024px){.paginator.with-map[_ngcontent-%COMP%]{min-height:unset}}.paginator-places[_ngcontent-%COMP%]{--card-width: 237;--card-gap: 13;display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(var(--card-width) * 1px),1fr));align-items:flex-start;place-content:flex-start space-around;gap:24px 13px;align-self:stretch}@container mapvx-container (width <= 640px){.paginator-places[_ngcontent-%COMP%]{--card-width: 170}}.paginator-places.with-map[_ngcontent-%COMP%]{--card-gap: 8;gap:16px 8px;flex-shrink:0}@container mapvx-container (width <= 640px){.paginator-places.with-map[_ngcontent-%COMP%]{display:flex;overflow-x:auto}}.paginator-buttons[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap}.paginator-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);text-align:center;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;border:none;background:none}.paginator-button[_ngcontent-%COMP%]:hover{cursor:pointer}.paginator-button.active[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange)}.paginator-button.ellipsis[_ngcontent-%COMP%]:hover{cursor:default}.previous-button[_ngcontent-%COMP%], .next-button[_ngcontent-%COMP%]{color:var(--definitions-colors-text-900);background:none;border:none;font-size:21px}.previous-button[_ngcontent-%COMP%]:hover, .next-button[_ngcontent-%COMP%]:hover{cursor:pointer}'],changeDetection:0})};var p1=class n{onDestroy=new wr;iconLibrary=Me(Yn);mapService=Me(xi);logger=Me(Pn);loadedDataService=Me(ui);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){this.logger.logEvent("map_center_button_clicked");let r=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Ls(1),os(this.onDestroy)).subscribe({next:i=>{this.mapService.updateCamera({center:i.initialCenter,zoom:i.initialZoom,pitch:i.initialPitch??0,bearing:r})},error:i=>{this.logger.logWarning("Error centering map",i)}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),on("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCenter))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var lH=n=>({rotate:n}),m1=class n{mapService=Me(xi);iconLibrary=Me(Yn);rotation=vo(this.mapService.rotation.asObservable().pipe(En(r=>360-r)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(i,l){i&1&&(it(0,"button",0),Mt(1,"fa-icon",1),lt()),i&2&&(at(),Ft("icon",l.faCompass)("transform",Ax(2,lH,l.rotation())))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var g1=class n{iconLibrary=Me(Yn);locationService=Me(Wd);logger=Me(Pn);markerService=Me(Zo);mapService=Me(xi);locationPermission=ln("prompt");active=Qt(()=>this.locationService.currentlyWatchingLocation());mapReady=vo(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),Un(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:r=>{this.logger.log("location",r),r!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(r.position):this.markerService.addCurrentLocationMarker(r.position))},error:r=>{this.logger.logWarning("Error updating current location marker position",r)}}),this.bearingSubscription=Xs([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([r,i])=>{this.logger.log("bearing",r),this.logger.log("maprotation",i);let d=(r??0)-i;if(this.logger.log("markerRotation",d),this.markerService.hasCurrentLocationMarker){let a=this.markerService.getCurrentLocationMarkerElement();a!=null&&(a.style.transform=`rotate(${d}deg)`)}},error:r=>{this.logger.logWarning("Error updating current location marker rotation",r)}})):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker(),this.positionSubscription=void 0,this.bearingSubscription=void 0):(this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.positionSubscription=void 0,this.bearingSubscription=void 0)})}ngOnDestroy(){this.locationService.temporalStopWatching(),this.positionSubscription?.unsubscribe(),this.bearingSubscription?.unsubscribe(),this.markerService.removeCurrentLocationMarker()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.active()&&this.locationService.startWatching()}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}async onClick(){if(this.logger.logEvent("map_location_button_clicked"),this.active())this.locationService.stopWatching();else switch(this.locationPermission()){case"granted":this.locationService.startWatching();break;case"prompt":await this.requestPermissions();break;case"denied":this.logger.logWarning("Location permission denied");break}}async requestPermissions(){await this.locationService.requestLocationPermission()==="granted"?(this.locationPermission.set("granted"),this.locationService.startWatching()):this.locationPermission.set("denied")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(i,l){i&1&&(it(0,"button",0),on("click",function(){return l.onClick()}),Mt(1,"fa-icon",1),lt()),i&2&&(ci("active",l.active()),at(),Ft("icon",l.faLocation))},dependencies:[Dr],styles:[".button[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general)}.button[_ngcontent-%COMP%]:hover{cursor:pointer}.button.active[_ngcontent-%COMP%]{background-color:var(--definitions-colors-secondary-blue);color:var(--definitions-colors-text-white);border-color:var(--definitions-colors-secondary-blue)}.button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}"],changeDetection:0})};var y1=class n{logger=Me(Pn);mapService=Me(xi);iconLibrary=Me(Yn);faPlus=this.iconLibrary.getIconDefinition("fas","plus");faMinus=this.iconLibrary.getIconDefinition("fas","minus");onZoomIn(){this.logger.logEvent("map_zoom_in_button_clicked"),this.mapService.updateZoomLevelOn(1)}onZoomOut(){this.logger.logEvent("map_zoom_out_button_clicked"),this.mapService.updateZoomLevelOn(-1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-zoom-buttons"]],decls:5,vars:2,consts:[[1,"zoom-buttons-container"],[1,"zoom-button","zoom-in",3,"click"],[3,"icon"],[1,"zoom-button","zoom-out",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"button",1),on("click",function(){return l.onZoomIn()}),Mt(2,"fa-icon",2),lt(),it(3,"button",3),on("click",function(){return l.onZoomOut()}),Mt(4,"fa-icon",2),lt()()),i&2&&(at(2),Ft("icon",l.faPlus),at(2),Ft("icon",l.faMinus))},dependencies:[Dr],styles:[".zoom-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;border-radius:40px;border:1px solid var(--definitions-colors-primary-900);background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.zoom-button[_ngcontent-%COMP%]{width:40px;height:40px;border:none;background-color:transparent}.zoom-button[_ngcontent-%COMP%]:hover{cursor:pointer}.zoom-button.zoom-in[_ngcontent-%COMP%]{border-radius:40px 40px 0 0}.zoom-button.zoom-out[_ngcontent-%COMP%]{border-radius:0 0 40px 40px}.zoom-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--definitions-colors-text-black)}"],changeDetection:0})};var v1=class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(i,l){i&1&&(it(0,"div",0),Mt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),lt())},dependencies:[m1,p1,y1,g1],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"],changeDetection:0})};function cH(n,r){if(n&1){let i=Fr();it(0,"button",4),on("click",function(){let d=pr(i).$implicit,a=qt(3);return mr(a.selectFloor(d))}),sn(1),lt()}if(n&2){let i=r.$implicit;at(),eo(" ",i.name," ")}}function uH(n,r){if(n&1&&(it(0,"div",2),Ji(1,cH,2,1,"button",3,ta),lt()),n&2){let i=qt(2);at(),Qi(i.floors())}}function dH(n,r){if(n&1){let i=Fr();it(0,"button",0),on("click",function(){pr(i);let d=qt();return mr(d.toggleFloorSelector())}),it(1,"span"),sn(2),lt(),Mt(3,"fa-icon",1),lt(),Bn(4,uH,3,0,"div",2)}if(n&2){let i=qt();at(2),Mo(i.selectedFloor().name),at(),Ft("icon",i.showFloorOptions()?i.caretUp:i.caretDown),at(),jn(i.showFloorOptions()?4:-1)}}var _1=class n{loadedDataService=Me(ui);mapService=Me(xi);iconLibrary=Me(Yn);parentPlace=Qt(()=>this.loadedDataService.parentPlace());floors=Qt(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=Qt(()=>this.mapService.currentFloorId());selectedFloor=Qt(()=>this.floors().find(r=>r.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=ln(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(r=>!r)}selectFloor(r){this.showFloorOptions.set(!1),this.mapService.updateFloor(r.key)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-floor-selector"]],decls:1,vars:1,consts:[[1,"floor-selector-button",3,"click"],[3,"icon"],[1,"floor-options"],[1,"floor-option"],[1,"floor-option",3,"click"]],template:function(i,l){i&1&&Bn(0,dH,5,3),i&2&&jn(l.floors().length>0?0:-1)},dependencies:[Dr],styles:[".floor-selector-button[_ngcontent-%COMP%]{padding:10px;border:0;border-radius:16px;background-color:var(--definitions-colors-background-white);box-shadow:var(--definitions-shadows-general)}.floor-options[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;background-color:var(--definitions-colors-background-white);border-radius:16px;box-shadow:var(--definitions-shadows-general);display:flex;flex-direction:column}.floor-option[_ngcontent-%COMP%]{padding:10px;border:0;background-color:transparent}.floor-option[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid var(--definitions-colors-gray-200)}"]})};var hH=["map"],fH=["*"];function pH(n,r){n&1&&Mt(0,"app-floor-selector",3)}var Zd=class n{mapRef;logger=Me(Pn);mapService=Me(xi);markerService=Me(Zo);routingService=Me(wc);loadedDataService=Me(ui);showFloorSelector=Qt(()=>this.loadedDataService.parentPlace()!==void 0);ngAfterViewInit(){this.mapService.createMap(this.mapRef.nativeElement)}ngOnDestroy(){this.logger.log("Destroying map and preparing to reuse"),this.markerService.prepareToMapReuse(),this.routingService.removeRoute(),this.mapService.prepareToReuse()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-map"]],viewQuery:function(i,l){if(i&1&&Vg(hH,5),i&2){let d;Ug(d=$g())&&(l.mapRef=d.first)}},ngContentSelectors:fH,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(i,l){i&1&&(Su(),it(0,"div",1),Mt(1,"div",2,0),Bn(3,pH,1,0,"app-floor-selector",3),Mt(4,"app-buttons-container",4),Eu(5),lt()),i&2&&(at(3),jn(l.showFloorSelector()?3:-1))},dependencies:[v1,_1],styles:[".map-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;position:relative}#map[_ngcontent-%COMP%]{height:100%;min-width:10px;min-height:10px}.buttons-container[_ngcontent-%COMP%]{position:absolute;bottom:18px;right:17px}.floor-selector[_ngcontent-%COMP%]{position:absolute;top:18px;right:17px}"],changeDetection:0})};var mH=["*"];function gH(n,r){n&1&&(it(0,"div",2),Mt(1,"app-map"),lt())}var mm=class n{stateService=Me(yi);showMap=Qt(()=>this.stateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-view-container"]],ngContentSelectors:mH,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(i,l){i&1&&(Su(),it(0,"div",0)(1,"div",1),Eu(2),lt(),Bn(3,gH,2,0,"div",2),lt()),i&2&&(at(),ci("with-map",l.showMap()),at(2),jn(l.showMap()?3:-1))},dependencies:[Zd],styles:[".view-container[_ngcontent-%COMP%]{display:flex;align-items:stretch;gap:8px}@container mapvx-container (width <= 1024px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}@container mapvx-container (width <= 640px){.view-container[_ngcontent-%COMP%]{flex-direction:column-reverse;align-items:flex-start}}.view-content[_ngcontent-%COMP%]{width:100%}.view-content.with-map[_ngcontent-%COMP%]{width:50%;min-width:482px;flex-shrink:0}@container mapvx-container (width <= 1024px){.view-content.with-map[_ngcontent-%COMP%]{width:100%;min-width:unset}}.map-container[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map-container[_ngcontent-%COMP%]{width:100%;height:730px}}@container mapvx-container (width <= 640px){.map-container[_ngcontent-%COMP%]{width:100%;height:400px;min-height:unset}}"],changeDetection:0})};var yH=["categoryFilters"],vH=(n,r)=>r.name;function _H(n,r){if(n&1){let i=Fr();it(0,"button",11),on("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.updateSelectedFilter(d.name))}),sn(1),lt()}if(n&2){let i=r.$implicit,l=qt(2);ci("active",l.selectedFilter()===i.name),at(),eo(" ",i.name," ")}}function bH(n,r){if(n&1&&(it(0,"div",2)(1,"div",5,0)(3,"div",6),Ji(4,_H,2,3,"button",7,vH),lt(),it(6,"div",8),Mt(7,"div",9)(8,"div",10),lt()()()),n&2){let i=qt();at(4),Qi(i.categoryFiltersData()),at(4),t_("left",i.indicatorPosition(),"px")}}var b1=class n{logger=Me(Pn);stateService=Me(yi);loadedDataService=Me(ui);markerService=Me(Zo);categoryFilters=a_("categoryFilters");activeView=Qt(()=>this.stateService.activeView());loadedPlaces=vo(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=Qt(()=>this.stateService.categoryFiltersData());places=ls(()=>this.loadedPlaces());selectedFilter=Qt(()=>this.stateService.selectedFilter());selectedInstitution=Qt(()=>this.stateService.selectedInstitution());selectedCity=Qt(()=>this.stateService.selectedCity());showCategoryFilters=Qt(()=>this.stateService.showCategoryFilters());showCityFilter=Qt(()=>this.stateService.showCityFilter());indicatorPosition=ln(0);constructor(){Un(()=>{let r=this.activeView();this.logger.logEvent("page_view",{page_title:"List Page",page_location:`/list?view=${r}`})}),Un(()=>{let r=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",r),r.length>0){let i=r.map(l=>l.name);this.readFilterFromUrl(i)}}),Un(()=>{if(this.activeView()==="map"){let r=this.places();this.logger.log("====> addMarkers ",r),this.markerService.addMarkers(r)}}),Un(()=>{let r=this.loadedPlaces(),i=this.showCategoryFilters(),l=r;if(this.showCityFilter()){let S=this.selectedCity()?.filterId??"";S!==""&&(l=l.filter(O=>O.parentInstitutionId===S))}if(i){let a=this.selectedFilter(),S=this.categoryFiltersData();if(a!=="All"){let O=S.find(F=>F.name===a)?.placeData||[];l=r.filter(F=>O.includes(F.lazarilloId))}}l.sort((a,S)=>a.title.trim().localeCompare(S.title.trim())),this.logger.log("====> filteredPlaces",l),this.places.set(l)}),Un(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Un(()=>{let r=this.selectedFilter(),i=this.categoryFiltersData(),l=this.categoryFilters();this.showCategoryFilters()&&l?requestAnimationFrame(()=>{let a=this.getIndicatorPosition(r,i,l);this.indicatorPosition.set(a)}):this.indicatorPosition.set(0)})}readFilterFromUrl(r){let l=new URLSearchParams(location.search).get("tab");l&&r.includes(l)&&this.stateService.selectedFilter.set(l)}getIndicatorPosition(r,i,l){if(l==null)return 0;let d=l.nativeElement.querySelectorAll(".category-btn");if(d.length===0)return 0;let a=i.findIndex(Q=>Q.name===r);if(a===-1||a>=d.length)return 0;let S=d[a];if(!S)return 0;let O=l.nativeElement.getBoundingClientRect(),F=S.getBoundingClientRect(),Z=F.width,ee=F.left-O.left,X=80,re=ee+Z/2-X/2;return Math.min(Math.max(0,re),O.width-X)}updateSelectedFilter(r){this.stateService.selectedFilter.set(r),this.stateService.userAction.next({type:"select-filter",data:{filter:r}}),this.logger.logEvent("filter_selected",{filter:r})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-list-view"]],viewQuery:function(i,l){i&1&&Gg(l.categoryFilters,yH,5),i&2&&Hg()},decls:5,vars:2,consts:[["categoryFilters",""],[1,"list-view"],[1,"category-filters-overflow"],[1,"list-container"],[3,"places"],[1,"category-filters-container"],[1,"category-filters"],[1,"category-btn",3,"active"],[1,"active-indicator"],[1,"background-line"],[1,"active-line"],[1,"category-btn",3,"click"]],template:function(i,l){i&1&&(it(0,"div",1),Bn(1,bH,9,2,"div",2),it(2,"app-view-container")(3,"div",3),Mt(4,"app-paginator",4),lt()()()),i&2&&(at(),jn(l.showCategoryFilters()?1:-1),at(3),Ft("places",l.places()))},dependencies:[mm,pm],styles:[".list-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.category-filters-overflow[_ngcontent-%COMP%]{width:100%;overflow-x:auto}.category-filters-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%;min-width:max-content}.category-filters[_ngcontent-%COMP%]{display:flex;gap:2.4375rem;align-items:center}.category-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:var(--definitions-textFonts-desktop-button-5);font-family:inherit;font-weight:400;color:var(--definitions-colors-text-900);white-space:nowrap;padding:0;transition:color .2s ease}.category-btn.active[_ngcontent-%COMP%], .category-btn[_ngcontent-%COMP%]:hover{color:var(--definitions-colors-secondary-orange)}.active-indicator[_ngcontent-%COMP%]{position:relative;width:100%;height:3px;display:flex;align-items:center}.background-line[_ngcontent-%COMP%]{height:.5px;background:var(--definitions-colors-primary-black);border-radius:2px;width:100%}.active-line[_ngcontent-%COMP%]{position:absolute;top:0;height:100%;width:80px;background:var(--definitions-colors-secondary-orange);border-radius:2px;transition:left .3s ease}.list-container[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var wH=()=>({rotate:42}),w1=class n{iconLibrary=Me(Yn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-location-card"]],decls:7,vars:3,consts:[[1,"loading-location-card"],[1,"loading-card-image"],[3,"icon","transform"],[1,"loading-card-content"],[1,"loading-location-name"],[1,"loading-location-address"],[1,"loading-location-category"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1),Mt(2,"fa-icon",2),lt(),it(3,"div",3),Mt(4,"div",4)(5,"div",5)(6,"div",6),lt()()),i&2&&(at(2),Ft("icon",l.faCircleNotch)("transform",Iu(2,wH)))},dependencies:[Dr],styles:[".loading-location-card[_ngcontent-%COMP%]{display:flex;padding:5px 5px 10px;flex-direction:column;align-items:flex-start;gap:12px}.loading-card-image[_ngcontent-%COMP%]{display:flex;width:227px;height:227px;justify-content:center;align-items:center;background-color:var(--definitions-colors-primary-300)}@container mapvx-container (width <= 640px){.loading-card-image[_ngcontent-%COMP%]{width:160px;height:160px}}.loading-card-image[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:95px}.loading-card-content[_ngcontent-%COMP%]{display:flex;width:227px;flex-direction:column;align-items:flex-start;gap:8px}@container mapvx-container (width <= 640px){.loading-card-content[_ngcontent-%COMP%]{width:160px}}.loading-location-name[_ngcontent-%COMP%]{display:flex;width:85%;height:24px;padding:7.253px 0;flex-direction:column;justify-content:center;align-items:center;border-radius:28.09px;background:var(--definitions-colors-primary-300)}.loading-location-address[_ngcontent-%COMP%]{display:flex;width:70%;height:11px;align-items:center;gap:18px;flex-shrink:0;align-self:stretch;border-radius:28.09px;background:var(--definitions-colors-primary-200)}.loading-location-category[_ngcontent-%COMP%]{display:flex;width:45%;height:11px;justify-content:space-between;align-items:center;border-radius:24px;background:var(--definitions-colors-primary-200)}"]})};var xH=()=>[1,2,3,4,5,6,7,8,9,10];function CH(n,r){n&1&&Mt(0,"app-loading-location-card")}var x1=class n{homeStateService=Me(yi);showMap=Qt(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(i,l){i&1&&(it(0,"div",0),Ji(1,CH,1,0,"app-loading-location-card",null,cf),lt()),i&2&&(ci("with-map",l.showMap()),at(),Qi(Iu(2,xH)))},dependencies:[w1],styles:[".loading-container[_ngcontent-%COMP%]{display:flex;place-content:flex-start;align-items:flex-start;gap:24px 13px;align-self:stretch;flex-wrap:wrap}.loading-container.with-map[_ngcontent-%COMP%]{gap:16px 8px;height:730px}"]})};function SH(n,r){n&1&&(it(0,"p"),sn(1,"Looking for your results..."),lt())}function EH(n,r){if(n&1&&(it(0,"p"),sn(1),lt()),n&2){let i=qt(3);at(),eo('Showing 1 result for "',i.searchTerm(),'"')}}function IH(n,r){if(n&1&&(it(0,"p"),sn(1),lt()),n&2){let i=qt(3);at(),n_("Showing ",i.places().length,' results for "',i.searchTerm(),'"')}}function DH(n,r){if(n&1&&Bn(0,EH,2,1,"p")(1,IH,2,2,"p"),n&2){let i=qt(2);jn(i.places().length===1?0:1)}}function TH(n,r){if(n&1&&(it(0,"p"),sn(1),lt()),n&2){let i=qt(2);at(),eo('No results found for "',i.searchTerm(),'"')}}function MH(n,r){if(n&1&&Bn(0,DH,2,1)(1,TH,2,1,"p"),n&2){let i=qt();jn(i.places().length>0?0:1)}}function PH(n,r){n&1&&Mt(0,"app-loading-card-list")}function AH(n,r){if(n&1&&(it(0,"div",6)(1,"app-paginator",7)(2,"div",8),Mt(3,"fa-icon",4),it(4,"h2"),sn(5,"No results found"),lt(),it(6,"div",9)(7,"p"),sn(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),lt()()()()()),n&2){let i=qt();at(),Ft("places",i.places())("fromSearch",!0),at(2),Ft("icon",i.faBuildingMagnifyingGlass)}}var C1=class n{logger=Me(Pn);loadedDataService=Me(ui);sdkService=Me(na);stateService=Me(yi);navigatorService=Me(Po);markerService=Me(Zo);iconLibrary=Me(Yn);searching=ls(()=>this.stateService.lastSearchData().term==="");inputValue$=c1(this.stateService.inputValue).pipe(Qb(500),En(r=>r.trim()),bi(r=>r!==""),e2());searchTerm=vo(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=vo(Xs([c1(this.stateService.filterId),this.inputValue$,c1(this.stateService.lastSearchData)]).pipe(Yi(([r,i,l])=>l.term===i?(this.logger.log("====> lastSearchData",l),this.searching.set(!1),Sn(l.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",i),this.logger.logEvent("search",{term:i,searchInstitutionId:r}),this.logger.log("====> institutionId",r),li(this.sdkService.searchPlaces(i,r)))),Ki(r=>{this.searching.set(!1),r.length>0?this.logger.logEvent("search_results",{resultsCount:r.length.toString(),term:this.searchTerm(),searchInstitutionId:this.stateService.filterId()}):this.logger.logEvent("search_empty",{term:this.searchTerm(),searchInstitutionId:this.stateService.filterId()})})),{initialValue:this.stateService.lastSearchData().results});faArrowLeft=this.iconLibrary.getIconDefinition("fas","arrow-left");faBuildingMagnifyingGlass=this.iconLibrary.getIconDefinition("fas","building-magnifying-glass");constructor(){this.logger.logEvent("page_view",{page_title:"Search Page",page_location:"/search"}),Un(()=>{let r=this.places();this.markerService.addMarkers(r)}),Un(()=>{let r=this.places();this.stateService.lastListedPlaces.set(r)}),Un(()=>{let r=this.searching();this.logger.log("====> searching",r)}),Un(()=>{let r=this.searchTerm();r&&this.stateService.userAction.next({type:"search",data:{searchTerm:r}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(l1)):(this.logger.log("====> SETTING LAST SEARCH DATA"),this.stateService.lastSearchData.set({term:this.stateService.inputValue(),results:this.places()}))}onBackClick(){this.stateService.inputValue.set(""),this.stateService.userAction.next({type:"return-to-home",data:{filter:this.stateService.selectedFilter()}}),this.logger.logEvent("search_back_clicked",{term:this.searchTerm(),searchInstitutionId:this.stateService.filterId()}),this.navigatorService.navigateToHome()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-search-view"]],decls:13,vars:3,consts:[[1,"search-view"],[1,"search-view-header"],[1,"back-button"],[1,"back-btn",3,"click"],[3,"icon"],[1,"search-view-info"],[1,"results-container"],[3,"places","fromSearch"],[1,"no-results"],[1,"no-results-description"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),on("click",function(){return l.onBackClick()}),Mt(4,"fa-icon",4),it(5,"span"),sn(6,"Back"),lt()()(),it(7,"div",5),Bn(8,SH,2,0,"p")(9,MH,2,1),lt()(),it(10,"app-view-container"),Bn(11,PH,1,0,"app-loading-card-list")(12,AH,9,3,"div",6),lt()()),i&2&&(at(4),Ft("icon",l.faArrowLeft),at(4),jn(l.searching()?8:9),at(3),jn(l.searching()?11:12))},dependencies:[mm,pm,o1,Dr,x1],styles:['*[_ngcontent-%COMP%]{margin:0;padding:0}.search-view[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:36px}.search-view-header[_ngcontent-%COMP%]{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:flex-start;gap:23px}.search-view-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit;letter-spacing:-.9px}.results-container[_ngcontent-%COMP%]{width:100%}.back-button[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:16px}.back-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}.back-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.back-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}.back-btn[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}.no-results[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;flex-direction:column;justify-content:center;align-items:center;gap:31px}.no-results[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:160px;color:var(--definitions-colors-text-light-grey)}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-h2);font-family:inherit}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--definitions-colors-text-grey);font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;text-align:center}'],changeDetection:0})};function S1(n){switch(n){case"su":return"Sunday";case"mo":return"Monday";case"tu":return"Tuesday";case"we":return"Wednesday";case"th":return"Thursday";case"fr":return"Friday";case"sa":return"Saturday"}}function I1(n){switch(n.getDay()){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function kH(n){switch(n){case 0:return"su";case 1:return"mo";case 2:return"tu";case 3:return"we";case 4:return"th";case 5:return"fr";case 6:return"sa";default:return"mo"}}function E1(n){let[r,i]=n.split(":"),l=parseInt(r)%24,d=parseInt(i),a;return l<12?(a="AM",l===0&&(l=12)):(a="PM",l!==12&&(l-=12)),`${l}:${d<10?"0":""}${d}&nbsp;${a}`}function GR(n){let r=E1(n.open),i=E1(n.close);return`${r}&nbsp;-&nbsp;${i}`}function RH(n){let r=E1(n.open),i=E1(n.close);return`${r}&nbsp;to&nbsp;${i}`}function OH(n){let r=new Date,i=new Date(r);HR(i);let l=I1(i),d=n[l];if(d&&d.length>0){for(let a of d)if(UR(a.open)&&UR(a.close)){let S=$R(a.open,i),O=$R(a.close,i);if(S>O&&LH(O),r>=S&&r<=O)return!0}}return!1}function HR(n){let r=n.getDate();n.setDate(r-1)}function LH(n){let r=n.getDate();n.setDate(r+1)}function FH(n){let i=I1(new Date),l=n[i];return l&&l.length>0}function UR(n){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(n)}function $R(n,r){let[i,l]=n.split(":").map(Number),d=r?new Date(r):new Date;return new Date(d.getFullYear(),d.getMonth(),d.getDate(),i,l,0,0)}function NH(n){return n.sort((r,i)=>r.open.localeCompare(i.open))}function zH(n){let i=I1(new Date),l=n[i];return l&&l.length>0?qR(l):""}function BH(n){let r=new Date;HR(r);let i=I1(r),l=n[i];return l&&l.length>0?qR(l):""}function jH(n){let r=VH(n);return`Open on ${S1(r)}`}function qR(n){return n.length===1?GR(n[0]):(NH(n),n.map(RH).join(" - "))}function VH(n){let i=new Date().getDay();for(let l=0;l<7;l++){let d=(i+l)%7,a=kH(d),S=n[a];if(S&&S.length>0)return a}return"mo"}function WR(n){return OH(n)?BH(n):FH(n)?zH(n):jH(n)}function ZR(n){let r=["mo","tu","we","th","fr","sa","su"],i=O=>{let F=n[O];return!F||F.length===0?["Closed"]:F.map(Z=>GR(Z))},l=(O,F)=>O.length!==F.length?!1:O.every((Z,ee)=>Z===F[ee]),d=(O,F)=>O===F?S1(O):`${S1(O)} - ${S1(F)}`,a=[],S=0;for(;S<r.length;){let O=r[S],F=i(O),Z=S+1;for(;Z<r.length&&l(F,i(r[Z]));)Z++;let ee=d(O,r[Z-1]);a.push({day:ee,schedule:F}),S=Z}if(a.length>1){let O=a[0],F=a[a.length-1];if(l(O.schedule,F.schedule)){let Z=O.day.split(" - "),X=F.day.split(" - ")[0],re=Z.length>1?Z[1]:Z[0],Q=`${X} - ${re}`;a[0]={day:Q,schedule:O.schedule},a.pop()}}return a}function UH(n,r){if(n&1&&Mt(0,"div",9),n&2){let i=r.$implicit;Ft("innerHTML",i,zd)}}function $H(n,r){if(n&1&&(it(0,"div",6)(1,"div",7),sn(2),lt(),it(3,"div",8),Ji(4,UH,1,1,"div",9,ta),lt()()),n&2){let i=r.$implicit;at(2),Mo(i.day),at(2),Qi(i.schedule)}}var D1=class n{iconLibrary=Me(Yn);schedules=ir.required({transform:r=>r?ZR(r):[]});closeClicked=_s();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-other-schedules"]],inputs:{schedules:[1,"schedules"]},outputs:{closeClicked:"closeClicked"},decls:11,vars:2,consts:[[1,"other-schedules-container"],[1,"other-schedules-header"],[1,"other-schedules-title"],[3,"icon"],[1,"close-button",3,"click"],[1,"schedules"],[1,"schedule"],[1,"schedule-day"],[1,"schedule-time"],[1,"schedule-time-item",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2),Mt(3,"fa-icon",3),it(4,"h2"),sn(5,"Other Schedules"),lt()(),it(6,"button",4),on("click",function(){return l.hideModal()}),Mt(7,"fa-icon",3),lt()(),it(8,"div",5),Ji(9,$H,6,1,"div",6,ta),lt()()),i&2&&(at(3),Ft("icon",l.faClockThree),at(4),Ft("icon",l.faXmark),at(2),Qi(l.schedules()))},dependencies:[Dr],styles:[".other-schedules-container[_ngcontent-%COMP%]{padding:16px;background-color:var(--definitions-colors-background-50);box-shadow:var(--definitions-shadows-general)}.other-schedules-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.other-schedules-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--definitions-colors-text-900);font:var(--definitions-textFonts-desktop-sub-2);font-family:inherit}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:32px}@container mapvx-container (width <= 640px){.other-schedules-title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}}.close-button[_ngcontent-%COMP%]{padding:0;background:none;border:none;cursor:pointer}.close-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.schedules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;background-color:#fff}.schedule[_ngcontent-%COMP%]{display:flex;gap:40px;align-items:center;justify-content:space-between}.schedule-times[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.schedule-time[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:end}.schedule-time-item[_ngcontent-%COMP%]{color:var(--definitions-colors-text-800);font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit}@container mapvx-container (width <= 640px){.schedule-time-item[_ngcontent-%COMP%]{font-size:12px;font-weight:400}}"]})};var GH=()=>({rotate:42});function HH(n,r){if(n&1&&Mt(0,"fa-icon",3),n&2){let i=qt();Ft("icon",i.faCircleNotch)("transform",Iu(2,GH))}}function qH(n,r){if(n&1){let i=Fr();it(0,"div",10),Mt(1,"fa-icon",9),it(2,"div",24)(3,"button",25),on("click",function(){pr(i);let d=qt();return mr(d.showOtherSchedulesModal())}),lt(),it(4,"div",26),sn(5,"*Hours may vary"),lt()()()}if(n&2){let i=qt();at(),Ft("icon",i.faClockThree),at(2),Ft("innerHTML",i.schedule(),zd)}}function WH(n,r){if(n&1){let i=Fr();it(0,"div",11)(1,"app-other-schedules",27),on("closeClicked",function(){pr(i);let d=qt();return mr(d.hideOtherSchedulesModal())}),lt()()}if(n&2){let i=qt();at(),Ft("schedules",i.place().openingHours)}}function ZH(n,r){if(n&1&&Mt(0,"div",31),n&2){let i=r.$implicit;Ft("innerHTML",i,zd)}}function YH(n,r){if(n&1&&(it(0,"div",12)(1,"div",28),Mt(2,"fa-icon",9),it(3,"div",29),sn(4,"Deals + Events"),lt()(),it(5,"div",30),Ji(6,ZH,1,1,"div",31,ta),lt()()),n&2){let i=qt();at(2),Ft("icon",i.faBadgeDollar),at(4),Qi(i.banners())}}function KH(n,r){if(n&1&&(it(0,"div",21),sn(1),lt()),n&2){let i=qt();at(),eo(" ",i.address()," ")}}function XH(n,r){if(n&1&&(it(0,"div",22),sn(1),lt()),n&2){let i=r.$implicit;at(),eo(" ",i," ")}}function JH(n,r){if(n&1){let i=Fr();it(0,"div",23)(1,"a",18),on("click",function(){let d=pr(i).$implicit,a=qt();return mr(a.logWebsiteClick(d.url))}),sn(2),lt()()}if(n&2){let i=r.$implicit;at(),Ft("href",i.url,sf),at(),Mo(i.title)}}var T1=class n{iconLibrary=Me(Yn);sanitizer=Me(ny);logger=Me(Pn);navigatorService=Me(Po);stateService=Me(yi);place=ir.required();hideDeals=ir(!1);imageSrc=Qt(()=>this.place().images[0]||p_);isImageLoading=ln(!0);schedule=Qt(()=>{let r=this.place().openingHours;return r?WR(r):""});banners=Qt(()=>this.place().banners.filter(h1).filter(r=>r.description!==void 0).map(r=>this.sanitizer.bypassSecurityTrustHtml(r.description||"")));address=Qt(()=>this.place().address||"");phones=Qt(()=>this.place().properties?.filter(r=>r.type==="phone").map(r=>this.formatPhoneNumber(r.subtitle))||[]);websites=Qt(()=>this.place().properties?.filter(r=>r.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=Qt(()=>{let r=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${r.position.lat},${r.position.lng}&travelmode=driving`});otherSchedulesModal=ln(!1);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");faBadgeDollar=this.iconLibrary.getIconDefinition("fas","badge-dollar");faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");iconCategory=Qt(()=>{let[r,i]=s1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(r,i)});constructor(){Un(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(r){return sr(zt({},r),{url:r.url?.startsWith("http")?r.url:`https://${r.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(r){let i=r.replace(/^\+1/,"");return i=i.replaceAll(/\D/g,""),i.length<10?(this.logger.logWarning(`Phone number '${i}' is to short for format`),i):`${i.slice(0,3)}.${i.slice(3,6)}.${i.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().lazarilloId,alias:this.place().clientId}}),this.logger.logEvent("pedestrian_directions_selected",{id:this.place().lazarilloId,name:this.place().title,clientId:this.place().clientId||""}),this.navigatorService.navigateToRoute(this.place().lazarilloId)}logDrivingDirectionsClick(){this.logger.logEvent("driving_directions_clicked",{id:this.place().lazarilloId,name:this.place().title,clientId:this.place().clientId||"",url:this.drivingDirectionsUrl()})}logWebsiteClick(r){r&&this.logger.logEvent("profile_website_clicked",{id:this.place().lazarilloId,name:this.place().title,clientId:this.place().clientId||"",url:r})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-view"]],inputs:{place:[1,"place"],hideDeals:[1,"hideDeals"]},decls:34,vars:15,consts:[[1,"profile-view-content"],[1,"image"],[3,"load","error","src","alt"],[1,"loading-icon",3,"icon","transform"],[1,"info"],[1,"basic-info"],[1,"title"],[1,"category-schedule"],[1,"category"],[3,"icon"],[1,"schedule"],[1,"other-schedules-modal"],[1,"deals-or-events"],[1,"description"],[1,"direction-buttons"],[1,"route-button-container"],[1,"route-button",3,"click"],[1,"driving-link"],["target","_blank",3,"click","href"],[1,"properties"],[1,"separator"],[1,"address"],[1,"phone"],[1,"website"],[1,"schedule-time"],[1,"schedule-button",3,"click","innerHTML"],[1,"schedule-warning"],[3,"closeClicked","schedules"],[1,"deals-or-events-header"],[1,"deals-or-events-content-title"],[1,"deals-or-events-content"],[1,"banner-content",3,"innerHTML"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"img",2),on("load",function(){return l.endImageLoading()})("error",function(){return l.endImageLoading()}),lt(),Bn(3,HH,1,3,"fa-icon",3),lt(),it(4,"div",4)(5,"div",5)(6,"h1",6),sn(7),lt(),it(8,"div",7)(9,"div",8),Mt(10,"fa-icon",9),it(11,"span"),sn(12),lt()(),Bn(13,qH,6,2,"div",10),Bn(14,WH,2,1,"div",11),lt(),Bn(15,YH,8,1,"div",12),it(16,"div",13),sn(17),lt()(),it(18,"div",14)(19,"div",15)(20,"button",16),on("click",function(){return l.navigateToRoute()}),Mt(21,"fa-icon",9),it(22,"span"),sn(23,"Pedestrian-friendly directions"),lt()()(),it(24,"div",17)(25,"a",18),on("click",function(){return l.logDrivingDirectionsClick()}),sn(26,"Driving directions"),lt()()(),it(27,"div",19),Mt(28,"div",20),Bn(29,KH,2,1,"div",21),Ji(30,XH,2,1,"div",22,ta),Ji(32,JH,3,2,"div",23,ta),lt()()()),i&2&&(at(),ci("loading",l.isImageLoading()),at(),Ft("src",l.imageSrc(),sf)("alt",l.place().title),at(),jn(l.isImageLoading()?3:-1),at(4),Mo(l.place().title),at(3),Ft("icon",l.iconCategory()),at(2),Mo(l.place().localizedCategory),at(),jn(l.schedule()!==""?13:-1),at(),jn(l.otherSchedulesModal()?14:-1),at(),jn(l.banners().length>0&&!l.hideDeals()?15:-1),at(2),eo(" ",l.place().description," "),at(4),Ft("icon",l.faArrowTopRight),at(4),Ft("href",l.drivingDirectionsUrl(),sf),at(4),jn(l.address()!==""?29:-1),at(),Qi(l.phones()),at(2),Qi(l.websites()))},dependencies:[Dr,D1],styles:['.profile-view-content[_ngcontent-%COMP%]{display:flex;padding:0 16px;flex-direction:column;align-items:center;gap:16px}@container mapvx-container (width <= 1024px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}@container mapvx-container (width <= 640px){.profile-view-content[_ngcontent-%COMP%]{padding:22px 0 0}}.image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;object-fit:cover;aspect-ratio:1/1}.image.loading[_ngcontent-%COMP%]{background-color:var(--definitions-colors-primary-300);height:200px;width:100%;display:flex;justify-content:center;align-items:center}.image.loading[_ngcontent-%COMP%] .loading-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:100px}.image.loading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:none}.info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:24px;width:100%}.basic-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-h6);font-family:inherit;margin:0;color:var(--definitions-colors-text-black)}.category-schedule[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between;flex-wrap:wrap;position:relative}.category[_ngcontent-%COMP%]{display:flex;gap:18px;color:var(--definitions-colors-text-grey);align-items:center}.category[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.category[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px}.schedule[_ngcontent-%COMP%]{display:flex;gap:18px;align-items:center}.schedule[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-primary-600);font-size:20px}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%]{position:relative}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-button[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;font-size:16px;color:var(--definitions-colors-secondary-blue);border:none;background:none;cursor:pointer;text-align:start}.schedule[_ngcontent-%COMP%] .schedule-time[_ngcontent-%COMP%] .schedule-warning[_ngcontent-%COMP%]{position:absolute;top:100%;margin-top:-5px;left:0;font:var(--definitions-textFonts-desktop-sub-5);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.other-schedules-modal[_ngcontent-%COMP%]{position:absolute;width:max-content;bottom:0;right:50%;transform:translate(50%) translateY(100%)}.deals-or-events[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%}.deals-or-events-header[_ngcontent-%COMP%]{display:flex;width:100%;align-items:flex-start;gap:18px;color:var(--definitions-colors-secondary-orange)}.deals-or-events-header[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px}.deals-or-events-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.deals-or-events-content-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-4);font-family:inherit;font-size:16px}.banner-content[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-orange);padding:5px;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;font-size:16px;white-space:pre-wrap;border:1px solid var(--definitions-colors-secondary-orange);border-radius:8px;box-shadow:var(--definitions-shadows-general)}.description[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-2);font-family:inherit;color:var(--definitions-colors-text-black)}.direction-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:16px;align-self:stretch;width:100%}.route-button-container[_ngcontent-%COMP%]{width:100%}.route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:var(--definitions-colors-primary-black);color:var(--definitions-colors-text-white);border:none;cursor:pointer;width:100%}.route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.driving-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none;font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.properties[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:16px;width:100%}.separator[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--definitions-colors-primary-100)}.address[_ngcontent-%COMP%], .phone[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-sub-1);font-family:inherit;font-size:16px;color:var(--definitions-colors-text-black)}.website[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-size:16px;font-feature-settings:"liga" off,"clig" off}.website[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);text-decoration:none}']})};var QH=["backButton",""],gm=class n{iconLibraryService=Me(Yn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["button","backButton",""]],attrs:QH,decls:3,vars:1,consts:[[3,"icon"]],template:function(i,l){i&1&&(Mt(0,"fa-icon",0),it(1,"span"),sn(2,"Back"),lt()),i&2&&Ft("icon",l.faArrowLeft)},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;gap:12px;color:var(--definitions-colors-secondary-blue);border:none;background:none}[_nghost-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:24px}[_nghost-%COMP%] span[_ngcontent-%COMP%]{color:var(--definitions-colors-secondary-blue);font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px}']})};function eq(n,r){if(n&1&&Mt(0,"app-profile-view",5),n&2){let i=qt(),l=Wg(6);Ft("place",l)("hideDeals",i.hideDeals())}}var M1=class n{onDestroy=new wr;route=Me(Wa);logger=Me(Pn);loadedDataService=Me(ui);sdkService=Me(na);mapService=Me(xi);markerService=Me(Zo);navigatorService=Me(Po);homeStateService=Me(yi);iconLibraryService=Me(Yn);_profileId="";place=ln(null);mapReady=vo(this.mapService.mapReady,{requireSync:!0});hideDeals=Qt(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){Un(()=>{let r=this.place();if(r&&this.mapReady()){if(r.parentType==="Place")if(this.loadedDataService.parentPlace()===void 0){let a=this.loadedDataService.potentialParentPlaces().find(S=>S.lazarilloId===r.parentId);if(a){this.loadedDataService.parentPlace.set(a),this.mapService.setParentPlace(a);let S=r.inFloors?.[0];S&&this.mapService.updateFloor(S)}}else{let d=r.inFloors?.[0];d&&this.mapService.updateFloor(d)}if(!this.markerService.hasMarker(r.lazarilloId)){let l=qo(this.homeStateService.lastListedPlaces);l.length>0?this.markerService.addMarkers(l):this.markerService.addMarker(r)}this.markerService.selectMarker(r.lazarilloId),setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100)}})}ngOnInit(){this.addBackListener();let r=this.route.paramMap.pipe(En(i=>i.get("id")),bi(i=>i!==null),bi(i=>i!==this._profileId),i2(1));Xs([r,this.loadedDataService.getAvailablePlaces()]).pipe(os(this.onDestroy),Yi(([i,l])=>{this.logger.logEvent("page_view",{page_title:"Profile Page",page_location:`/profile/${i}`});let d=l.find(a=>a.lazarilloId===i||a.clientId===i);return d?Sn(d):li(this.sdkService.getPlaceDetail(i))})).subscribe({next:i=>{this._profileId!==i.lazarilloId&&this.cleanOldProfile(),this._profileId=i.lazarilloId,this.place.set(i),this.loadedDataService.updateInstitution(i.parentInstitutionId),this.homeStateService.selectedInstitution.set(i.parentInstitutionId),this.homeStateService.userAction.next({type:"show-place",data:{placeId:i.lazarilloId,alias:i.clientId}})},error:i=>{this.logger.log("Error getting profile id",i)},complete:()=>{this.logger.log("Profile id complete")}})}ngOnDestroy(){this.removeBackListener(),this.cleanOldProfile(),this.onDestroy.next(),this.onDestroy.complete()}cleanOldProfile(){this._profileId!==""&&this.markerService.deselectMarker(this._profileId)}returnToHome(){this.homeStateService.userAction.next({type:"return-to-home",data:{filter:this.homeStateService.selectedFilter()}}),this.logger.logEvent("profile_back_clicked",{id:this.place()?.lazarilloId||"",name:this.place()?.title||"",clientId:this.place()?.clientId||""}),this.navigatorService.navigateToHome()}backListener(r){this.logger.log("Back listener",r),this.returnToHome()}listener=r=>this.backListener(r);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-profile-screen"]],decls:10,vars:2,consts:[[1,"screen"],[1,"back-button"],["backButton","",3,"click"],[1,"profile-screen-content"],[1,"profile-info"],[3,"place","hideDeals"],[1,"map"]],template:function(i,l){if(i&1){let d=Fr();it(0,"div",0)(1,"div",1)(2,"button",2),on("click",function(){return pr(d),mr(l.returnToHome())}),sn(3,"Back"),lt()(),it(4,"div",3)(5,"div",4),Kp(6),Bn(7,eq,1,2,"app-profile-view",5),lt(),it(8,"div",6),Mt(9,"app-map"),lt()()()}if(i&2){at(6);let d=qg(l.place());at(),jn(d!==null?7:-1)}},dependencies:[Zd,gm,T1],styles:[".screen[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:18px}.profile-screen-content[_ngcontent-%COMP%]{display:flex;width:100%}@container mapvx-container (width <= 1024px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}@container mapvx-container (width <= 640px){.profile-screen-content[_ngcontent-%COMP%]{flex-direction:column-reverse}}.profile-info[_ngcontent-%COMP%]{display:flex;width:432px;flex-shrink:0}.profile-info[_ngcontent-%COMP%] app-profile-view[_ngcontent-%COMP%]{width:100%}@container mapvx-container (width <= 1024px){.profile-info[_ngcontent-%COMP%]{width:100%}}.map[_ngcontent-%COMP%]{width:100%;min-height:730px}@container mapvx-container (width <= 1024px){.map[_ngcontent-%COMP%]{height:730px}}@container mapvx-container (width <= 640px){.map[_ngcontent-%COMP%]{width:100%;min-height:unset;height:400px}}"],changeDetection:0})};function tq(n,r){if(n&1){let i=Fr();it(0,"button",1),on("click",function(){pr(i);let d=qt();return mr(d.pauseRoute())}),Mt(1,"fa-icon",2),it(2,"span"),sn(3,"Pause route"),lt()()}if(n&2){let i=qt();at(),Ft("icon",i.faPause)}}function nq(n,r){if(n&1){let i=Fr();it(0,"button",1),on("click",function(){pr(i);let d=qt();return mr(d.resumeRoute())}),Mt(1,"fa-icon",2),it(2,"span"),sn(3,"Resume route"),lt()()}if(n&2){let i=qt();at(),Ft("icon",i.faPlay)}}function rq(n,r){if(n&1){let i=Fr();it(0,"button",1),on("click",function(){pr(i);let d=qt();return mr(d.restartRoute())}),Mt(1,"fa-icon",2),it(2,"span"),sn(3,"Restart route"),lt()()}if(n&2){let i=qt();at(),Ft("icon",i.faRestart)}}function iq(n,r){}var P1=class n{logger=Me(Pn);iconLibrary=Me(Yn);routingService=Me(wc);restartRouteCallback=_s();AnimationState=a1;animationStatus=vo(this.routingService.animationStatusSubject,{initialValue:0});faPlay=this.iconLibrary.getIconDefinition("fas","play");faPause=this.iconLibrary.getIconDefinition("fas","pause");faRestart=this.iconLibrary.getIconDefinition("fas","rotate-right");pauseRoute(){this.logger.logEvent("route_button_clicked",{action:"pause"}),this.routingService.pauseRouteAnimation()}resumeRoute(){this.logger.logEvent("route_button_clicked",{action:"resume"}),this.routingService.resumeRouteAnimation()}restartRoute(){this.logger.logEvent("route_button_clicked",{action:"restart"}),this.routingService.restartRouteAnimation(),this.restartRouteCallback.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-control-button"]],outputs:{restartRouteCallback:"restartRouteCallback"},decls:4,vars:1,consts:[[1,"route-control-button"],[1,"route-control-button",3,"click"],[3,"icon"]],template:function(i,l){if(i&1&&Bn(0,tq,4,1,"button",0)(1,nq,4,1,"button",0)(2,rq,4,1,"button",0)(3,iq,0,0),i&2){let d;jn((d=l.animationStatus())===l.AnimationState.Playing?0:d===l.AnimationState.Paused?1:d===l.AnimationState.Finished?2:3)}},dependencies:[Dr],styles:["[_nghost-%COMP%]{position:absolute;top:20px;left:500px}@container mapvx-container (width <= 1024px){[_nghost-%COMP%]{top:90px;left:unset;right:20px}}.route-control-button[_ngcontent-%COMP%]{display:flex;width:180px;height:45px;justify-content:center;align-items:center;gap:10px;background:var(--definitions-colors-background-white);color:var(--definitions-colors-text-black);box-shadow:var(--definitions-shadows-general);border:none;cursor:pointer}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%]{width:45px}}.route-control-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px}.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-5);font-family:inherit}@container mapvx-container (width <= 1024px){.route-control-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:none}}"]})};var A1=class n{iconLibrary=Me(Yn);currentRoute=ir.required();startRouteClick=_s();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=Qt(()=>{let r=this.currentRoute();return this.toMinutes(r.duration)});distance=Qt(()=>{let r=this.currentRoute();return Math.ceil(r.length*3.28084)});toMinutes(r){return Math.ceil(r/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-info"]],inputs:{currentRoute:[1,"currentRoute"]},outputs:{startRouteClick:"startRouteClick"},decls:17,vars:5,consts:[[1,"route-info"],[1,"route-info-item"],[1,"route-info-item-label"],[3,"icon"],[1,"route-info-item-value"],[1,"start-route-button",3,"click"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"span",2),sn(3,"Time"),lt(),Mt(4,"fa-icon",3),it(5,"span",4),sn(6),lt()(),it(7,"div",1)(8,"span",2),sn(9,"Distance"),lt(),Mt(10,"fa-icon",3),it(11,"span",4),sn(12),lt()()(),it(13,"button",5),on("click",function(){return l.onStartRouteClick()}),Mt(14,"fa-icon",3),it(15,"span"),sn(16,"Start Route"),lt()()),i&2&&(at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.time()," min"),at(4),Ft("icon",l.faCircleSmall),at(2),eo("",l.distance()," ft"),at(2),Ft("icon",l.faArrowTopRight))},dependencies:[Dr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:40px}.route-info[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap}.route-info-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:var(--definitions-colors-text-black)}.start-route-button[_ngcontent-%COMP%]{display:flex;padding:8px 16px;justify-content:center;align-items:center;gap:10px;background-color:var(--definitions-colors-primary-900);color:var(--definitions-colors-text-50);border:none;cursor:pointer;width:100%}.start-route-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-2);font-family:inherit;font-feature-settings:"liga" off,"clig" off;line-height:15px}.start-route-button[_ngcontent-%COMP%]{display:none}']})};var oq={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Hye=sr(zt({},oq),{"[class.ng-submitted]":"isSubmitted"});var sq=new yn("",{providedIn:"root",factory:()=>YR}),YR="always";var aq=(()=>{class n{static \u0275fac=function(l){return new(l||n)};static \u0275mod=qa({type:n});static \u0275inj=_a({})}return n})();var KR=(()=>{class n{static withConfig(i){return{ngModule:n,providers:[{provide:sq,useValue:i.callSetDisabledState??YR}]}}static \u0275fac=function(l){return new(l||n)};static \u0275mod=qa({type:n});static \u0275inj=_a({imports:[aq]})}return n})();function lq(n,r){if(n&1){let i=Fr();it(0,"button",5),on("click",function(){pr(i);let d=qt();return mr(d.clearSelectedPlace())}),Mt(1,"fa-icon",6),lt()}if(n&2){let i=qt();at(),Ft("icon",i.faXmark)}}function cq(n,r){if(n&1){let i=Fr();it(0,"button",10),on("click",function(){pr(i);let d=qt(2);return mr(d.useCurrentLocation())}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),sn(5,"Use current location"),lt()()()}if(n&2){let i=qt(2);at(2),Ft("icon",i.faLocationArrow)}}function uq(n,r){if(n&1){let i=Fr();it(0,"button",10),on("click",function(){let d=pr(i).$implicit,a=qt(2);return mr(a.selectPlace(d))}),it(1,"div",11),Mt(2,"fa-icon",6),lt(),it(3,"div",12)(4,"div",13),sn(5),lt(),it(6,"div",14),sn(7),lt()()()}if(n&2){let i=r.$implicit,l=qt(2);at(2),Ft("icon",l.faLocationDot),at(3),Mo(i.title),at(2),Mo(i.address)}}function dq(n,r){n&1&&(it(0,"div",9),sn(1,"No results found"),lt())}function hq(n,r){if(n&1&&(it(0,"div",4)(1,"div",7),Bn(2,cq,6,1,"button",8),Ji(3,uq,8,3,"button",8,ta),Bn(5,dq,2,0,"div",9),lt()()),n&2){let i=qt();at(2),jn(i.allowCurrentLocation()&&i.locationPermission()!=="denied"?2:-1),at(),Qi(i.filteredPlaces()),at(2),jn(i.filteredPlaces().length===0&&i.filterText().trim()?5:-1)}}var k1=class n{logger=Me(Pn);locationService=Me(Wd);iconLibrary=Me(Yn);places=ir.required();initialSelectedPlace=ir(null);allowCurrentLocation=ir(!1);placeholder=ir("Set a starting point");selectedPlace=ls(()=>this.initialSelectedPlace());selectedPlaceChange=_s();isDropdownOpen=ln(!1);filterText=ls(()=>this.selectedPlace()?.title||"");filteredPlaces=Qt(()=>{let r=this.places(),i=this.filterText().toLowerCase().trim();return i?r.filter(l=>l.title?.toLowerCase().includes(i)||l.address?.toLowerCase().includes(i)):r});locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faLocationArrow=this.iconLibrary.getIconDefinition("fas","location-arrow");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");constructor(){this.checkLocationPermission()}checkLocationPermission(){this.locationService.checkLocationPermission().then(r=>{this.locationPermission.set(r)}).catch(r=>{this.logger.logWarning("Error checking location permission",r),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(r=>{this.locationPermission.set(r),r==="granted"&&this.getCurrentLocation()}).catch(r=>{this.logger.logWarning("Error requesting location permission",r),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(r=>{this.selectedPlace.set(r),this.selectedPlaceChange.emit(r)}).catch(r=>{this.logger.logWarning("Error getting current location",r)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(r){this.selectedPlace.set(r),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(r)}clearSelectedPlace(){this.selectedPlace.set(null),this.filterText.set(""),this.selectedPlaceChange.emit(null)}onInputFocus(){this.isDropdownOpen.set(!0)}onInputBlur(){setTimeout(()=>{this.isDropdownOpen.set(!1)},150)}onInputChange(r){let i=r.target;this.filterText.set(i.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-place-selector"]],inputs:{places:[1,"places"],initialSelectedPlace:[1,"initialSelectedPlace"],allowCurrentLocation:[1,"allowCurrentLocation"],placeholder:[1,"placeholder"]},outputs:{selectedPlaceChange:"selectedPlaceChange"},decls:5,vars:4,consts:[[1,"place-selector"],[1,"input-container"],["type","text","name","place-input",1,"place-input",3,"input","focus","blur","value","placeholder"],[1,"clear-button"],[1,"dropdown-container"],[1,"clear-button",3,"click"],[3,"icon"],[1,"dropdown-list"],["type","button",1,"place-option"],[1,"no-results"],["type","button",1,"place-option",3,"click"],[1,"place-icon"],[1,"place-info"],[1,"place-title"],[1,"place-address"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"input",2),on("input",function(a){return l.onInputChange(a)})("focus",function(){return l.onInputFocus()})("blur",function(){return l.onInputBlur()}),lt(),Bn(3,lq,2,1,"button",3),lt(),Bn(4,hq,6,2,"div",4),lt()),i&2&&(at(2),Ft("value",l.filterText())("placeholder",l.placeholder()),at(),jn(l.selectedPlace()?3:-1),at(),jn(l.isDropdownOpen()?4:-1))},dependencies:[Mu,KR,Dr],styles:['[_nghost-%COMP%]{width:100%}.place-selector[_ngcontent-%COMP%]{position:relative;width:100%}.input-container[_ngcontent-%COMP%]{width:100%;display:flex}.place-input[_ngcontent-%COMP%]{width:100%;border:none;font:var(--definitions-textFonts-desktop-button-1);font-family:inherit;font-feature-settings:"liga" off,"clig" off;letter-spacing:-1px;text-overflow:ellipsis;outline:none;color:var(--definitions-colors-text-black)}.place-input[_ngcontent-%COMP%]::placeholder{color:var(--definitions-colors-primary-300)}.clear-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--definitions-colors-text-900)}.dropdown-container[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:10;margin-top:4px}.dropdown-list[_ngcontent-%COMP%]{background:var(--definitions-colors-background-50);border-radius:8px;box-shadow:var(--definitions-shadows-general);max-height:300px;overflow-y:auto;border:1px solid var(--definitions-colors-gray-200)}.place-option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;padding:15px 24px;cursor:pointer;transition:background-color .2s ease;border-bottom:1px solid #f5f5f5;background:none;border:none;width:100%;text-align:left}.place-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.place-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.place-option[_ngcontent-%COMP%]:active{background-color:#e9ecef}.place-option[_ngcontent-%COMP%]:focus{outline:2px solid #5D5D5D;outline-offset:-2px}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:19.341px;height:19.341px;margin-top:2px;color:var(--definitions-colors-primary-600)}.place-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}.place-title[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-button-3);font-family:inherit;color:var(--definitions-colors-text-900);word-wrap:break-word}.place-address[_ngcontent-%COMP%]{font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800);word-wrap:break-word}.no-results[_ngcontent-%COMP%]{padding:20px 24px;text-align:center;font:var(--definitions-textFonts-desktop-body-3);font-family:inherit;color:var(--definitions-colors-text-800)}@media (width <= 768px){.place-option[_ngcontent-%COMP%]{padding:12px 20px}.place-title[_ngcontent-%COMP%]{font-size:15px}.place-address[_ngcontent-%COMP%]{font-size:13px}}']})};var R1=class n{logger=Me(Pn);iconLibrary=Me(Yn);places=ir.required();initialDestination=ir(null);originPlace=ln(null);destinationPlace=ls(()=>this.initialDestination());originSelected=_s();destinationSelected=_s();swapPlaces=_s();clearDestination=_s();locationPermission=ln("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=Qt(()=>sC(this.originPlace())&&sC(this.destinationPlace()));onOriginSelected(r){this.originSelected.emit(r),this.originPlace.set(r)}onDestinationSelected(r){if(Al(r)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(r),this.destinationPlace.set(r)}onSwapPlaces(){let r=this.originPlace(),i=this.destinationPlace();if(Al(r)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(i),this.originSelected.emit(i),this.destinationPlace.set(r),this.destinationSelected.emit(r)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-selector"]],inputs:{places:[1,"places"],initialDestination:[1,"initialDestination"]},outputs:{originSelected:"originSelected",destinationSelected:"destinationSelected",swapPlaces:"swapPlaces",clearDestination:"clearDestination"},decls:20,vars:10,consts:[[1,"route-selector"],[1,"routing-option","origin"],[1,"place-info"],[1,"place-icon"],["xmlns","http://www.w3.org/2000/svg","width","36","height","36","viewBox","0 0 36 36","fill","none"],["width","36","height","36","rx","18","fill","#8DC8FF"],["d","M29.2517 17.7595C29.1117 23.9741 23.9602 28.8986 17.7456 28.7586C11.5309 28.6185 6.60648 23.4671 6.74649 17.2524C6.8865 11.0378 12.038 6.11332 18.2526 6.25333C24.4673 6.39334 29.3917 11.5448 29.2517 17.7595Z","fill","#2C57A0"],["d","M13.5364 22.4764C13.4259 22.5279 13.3135 22.5415 13.199 22.5173C13.0847 22.4932 12.9902 22.4373 12.9155 22.3496C12.8298 22.2721 12.7772 22.1766 12.7577 22.0629C12.7384 21.9495 12.7519 21.8395 12.7982 21.7327L17.6404 11.5662C17.7437 11.3532 17.9102 11.2493 18.1399 11.2545C18.3697 11.2597 18.5313 11.371 18.6249 11.5884L23.0044 21.9626C23.0458 22.0714 23.0543 22.182 23.03 22.2944C23.0054 22.407 22.9485 22.5001 22.8594 22.5736C22.7808 22.6579 22.6839 22.7095 22.5687 22.7283C22.4532 22.7475 22.3415 22.7288 22.2335 22.6723L17.9278 20.6691L13.5364 22.4764ZM14.4251 20.9295L17.954 19.5064L21.4153 21.087L18.0981 13.1117L14.4251 20.9295Z","fill","white"],[3,"selectedPlaceChange","places","initialSelectedPlace","allowCurrentLocation"],[1,"connector-line"],[1,"connector-dots"],[3,"icon"],[1,"connector-line-element"],["type","button",1,"swap-button",3,"click","disabled"],[1,"routing-option","destination"],[3,"selectedPlaceChange","places","initialSelectedPlace","placeholder"]],template:function(i,l){i&1&&(it(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),d0(),it(4,"svg",4),Mt(5,"rect",5)(6,"path",6)(7,"path",7),lt()(),h0(),it(8,"app-place-selector",8),on("selectedPlaceChange",function(a){return l.onOriginSelected(a)}),lt()()(),it(9,"div",9)(10,"div",10),Mt(11,"fa-icon",11),lt(),Mt(12,"div",12),it(13,"button",13),on("click",function(){return l.onSwapPlaces()}),Mt(14,"fa-icon",11),lt()(),it(15,"div",14)(16,"div",2)(17,"div",3),Mt(18,"fa-icon",11),lt(),it(19,"app-place-selector",15),on("selectedPlaceChange",function(a){return l.onDestinationSelected(a)}),lt()()()()),i&2&&(at(8),Ft("places",l.places())("initialSelectedPlace",l.originPlace())("allowCurrentLocation",!0),at(3),Ft("icon",l.faEllipsisVertical),at(2),Ft("disabled",!l.canSwapPlaces()),at(),Ft("icon",l.faArrowsRetweet),at(4),Ft("icon",l.faLocationDot),at(),Ft("places",l.places())("initialSelectedPlace",l.destinationPlace())("placeholder","Select a destination"))},dependencies:[Mu,k1,Dr],styles:['.route-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;position:relative;width:100%;box-sizing:border-box}.routing-option[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;padding:0 40px 0 0;box-sizing:border-box;width:100%}.place-info[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;flex:1;min-width:0}.place-icon[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.destination[_ngcontent-%COMP%] .place-icon[_ngcontent-%COMP%]{color:var(--definitions-colors-text-black)}.connector-line[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;width:100%;position:relative}.connector-dots[_ngcontent-%COMP%]{flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}.connector-dots[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:20px;color:#5d5d5d}.connector-line-element[_ngcontent-%COMP%]{flex:1;height:1px;background:#e0e0e0;position:relative}.connector-line-element[_ngcontent-%COMP%]:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,#e0e0e0 0,#e0e0e0 4px,transparent 4px,transparent 8px);transform:translateY(-50%)}.swap-button[_ngcontent-%COMP%]{flex-shrink:0;width:32px;height:25px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:background-color .2s ease}.swap-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.swap-button[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#f5f5f5}.swap-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:#5d5d5d}.clear-button[_ngcontent-%COMP%]{flex-shrink:0;width:20px;height:20px;background:none;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background-color .2s ease}.clear-button[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.clear-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:12px;color:#666}.select-destination-button[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:8px 12px;border-radius:6px;transition:background-color .2s ease;flex:1;text-align:left}.select-destination-button[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.select-destination-button[_ngcontent-%COMP%] .place-label[_ngcontent-%COMP%]{font-family:Open Sans,sans-serif;font-weight:600;font-size:20px;line-height:1;color:#cbcbcb;font-variation-settings:"wdth" 100;letter-spacing:-1px}.destination-selector[_ngcontent-%COMP%]{position:absolute;top:81px;left:84.5px;width:310px;z-index:1000;background:#fff;box-shadow:0 4px 4px #00000040;border-radius:8px;overflow:hidden}@media (width <= 768px){.route-selector[_ngcontent-%COMP%]{padding:20px 16px}.place-text[_ngcontent-%COMP%]{font-size:18px}.place-icon[_ngcontent-%COMP%]{width:32px;height:32px}.place-icon[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:18px}.destination-selector[_ngcontent-%COMP%]{left:16px;right:16px;width:auto}}']})};function fq(n,r){if(n&1){let i=Fr();it(0,"div",6)(1,"app-route-info",9),on("startRouteClick",function(){pr(i);let d=qt();return mr(d.startStepAnimation())}),lt()()}if(n&2){qt();let i=Wg(7);at(),Ft("currentRoute",i)}}var O1=class n{routeId="";route=Me(Wa);logger=Me(Pn);navigatorService=Me(Po);loadedDataService=Me(ui);mapService=Me(xi);markerService=Me(Zo);homeStateService=Me(yi);routingService=Me(wc);mapReady=vo(this.mapService.mapReady,{requireSync:!0});places=vo(Xs([this.loadedDataService.getAvailablePlaces(),this.loadedDataService.getInstitutionId()]).pipe(En(([r,i])=>r.filter(l=>l.parentInstitutionId===i))),{initialValue:[]});originPoint=ln(null);destinationPlace=ls(()=>this.initialDestination());initialDestination=ln(null);currentRoute=ln(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",this.logger.logEvent("page_view",{page_title:"Route Page",page_location:`/route/${this.routeId}`}),Un(()=>{let r=this.places();if(r.length>0){let i=r.find(l=>l.lazarilloId===this.routeId||l.clientId===this.routeId);i&&this.initialDestination.set(i)}}),Un(()=>{if(this.mapReady()){let i=qo(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(i)}}),Un(()=>{let r=this.destinationPlace();r&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(r.lazarilloId)||this.markerService.addRouteMarker(r),this.markerService.selectMarker(r.lazarilloId),qo(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:r.position})},100))}),Un(()=>{let r=this.originPoint(),i=this.destinationPlace();r&&i?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(r.position),this.markerService.addDestinationMarker(i),this.logger.logEvent("route_selected",{originId:Al(r)?"current-location":r.lazarilloId,originName:r.title,destinationId:i.lazarilloId,destinationName:i.title,destinationClientId:i.clientId||"",originClientId:Al(r)?"":r.clientId||""}),this.routingService.getRoute(r,i).then(l=>{this.currentRoute.set(l),this.routingService.startAnimatingRoute(l),this.fitMapToRoute(r,i,l)}).catch(l=>{this.logger.logWarning("Error getting route",l)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId);let r=this.originPoint(),i=this.destinationPlace();this.logger.logEvent("route_back_clicked",{destinationId:i?.lazarilloId||"",destinationName:i?.title||"",destinationClientId:i?.clientId||"",originId:Al(r)?"current-location":r?.lazarilloId||"",originName:r?.title||"",originClientId:Al(r)?"":r?.clientId||""})}onDestinationSelected(r){this.destinationPlace.set(r)}onOriginSelected(r){this.originPoint.set(r)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(r,i,l){let d=r?.position??this.originPoint()?.position,a=i?.position??this.destinationPlace()?.position,S=l??this.currentRoute(),O=document.querySelector(".route-related-components");if(d&&a&&S&&O&&this.mapReady()){let F=getComputedStyle(O),Z=Number.parseInt(F.getPropertyValue("--padding-top")),ee=Number.parseInt(F.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(d,a,S,{padding:{top:Z,left:ee,right:70,bottom:50}})},100)}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=hn({type:n,selectors:[["app-route-screen"]],decls:12,vars:4,consts:[[1,"route-screen"],[1,"back-button"],["backButton","",3,"click"],[1,"route-screen-content"],[1,"route-related-components"],[3,"originSelected","destinationSelected","places","initialDestination"],[1,"route-info"],[1,"map"],[3,"restartRouteCallback"],[3,"startRouteClick","currentRoute"]],template:function(i,l){if(i&1){let d=Fr();it(0,"div",0)(1,"div",1)(2,"button",2),on("click",function(){return pr(d),mr(l.returnToProfile())}),sn(3,"Back"),lt()(),it(4,"div",3)(5,"div",4)(6,"app-route-selector",5),on("originSelected",function(S){return pr(d),mr(l.onOriginSelected(S))})("destinationSelected",function(S){return pr(d),mr(l.onDestinationSelected(S))}),lt(),Kp(7),Bn(8,fq,2,1,"div",6),lt(),it(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),on("restartRouteCallback",function(){return pr(d),mr(l.fitMapToRoute())}),lt()()()()()}if(i&2){at(6),Ft("places",l.places())("initialDestination",l.initialDestination()),at();let d=qg(l.currentRoute());at(),jn(d!==null?8:-1)}},dependencies:[gm,Zd,R1,A1,P1],styles:[".route-screen-content[_ngcontent-%COMP%]{position:relative}.route-related-components[_ngcontent-%COMP%]{--padding-top: 130;--padding-left: 450;position:absolute;top:0;left:0;width:450px;box-sizing:border-box;z-index:1;display:flex;flex-direction:column;gap:40px;padding:40px 38px;background-color:var(--definitions-colors-background-white)}@container mapvx-container (width <= 1024px){.route-related-components[_ngcontent-%COMP%]{--padding-top: 70;--padding-left: 50;position:unset;width:100%}}.map[_ngcontent-%COMP%]{width:100%;height:820px}"],changeDetection:0})};var XR=[{path:"",component:d1,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:b1},{path:"search",component:C1}]},{path:"profile/:id",component:M1},{path:"route/:id",component:O1},{path:"**",redirectTo:""}];var L1=class{handleError(r){console.error("CustomErrorHandler",r)}};var F1=class n extends mc{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(r){return this._baseHref+"#"+r}pushState(r,i,l,d){this._updatePath(r,l,d)}replaceState(r,i,l,d){this._updatePath(r,l,d)}forward(){}back(){}getState(){return null}historyGo(r){}onPopState(r){this._popStateListeners.push(r)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(r,i,l){this._path=i+(l?"?"+l:""),this._notifyPopState(r,i)}_notifyPopState(r,i){let l={type:"popstate",state:r,url:i,pop:!0};this._popStateListeners.forEach(d=>{try{d(l)}catch(a){console.error("Error in popstate listener:",a)}})}getCurrentPath(){return this._path}setInitialPath(r){this._path=r}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Bt({token:n,factory:n.\u0275fac,providedIn:"root"})};var JR={providers:[{provide:Js,useClass:L1},Ox(),PC(XR),{provide:mc,useClass:F1},Xv(yA.forRoot(ry,[{command:"config",values:[ry,{send_page_view:!1}]}]))]};oC(JR).then(n=>{let r=aP(u1,{injector:n.injector});customElements.define("mapvx-website",r)}).catch(n=>console.error(n));
1513
1513
  /*! Bundled license information:
1514
1514
 
1515
1515
  maplibre-gl/dist/maplibre-gl.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapvx/website-component",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },