@mapvx/web-components-ssr 1.1.1-dev.1 → 1.2.0-dev.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.
- package/dist/browser/main.js +1 -1
- package/package.json +1 -1
package/dist/browser/main.js
CHANGED
|
@@ -2005,7 +2005,7 @@ If it declares any Font Awesome CSS pseudo-elements, they will not be rendered a
|
|
|
2005
2005
|
`))});cspNonce=be(zf);document=be(Xn);sanitizer=be(kg);config=be(GZ);iconLibrary=be(py);stackItem=be(JZ,{optional:!0});stack=be(QZ,{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(t){let o=KZ(t,this.config.defaultPrefix);if("icon"in o)return o;let u=this.iconLibrary.getIconDefinition(o.prefix,o.iconName);return u??(WZ(o),null)}buildParams(){let t=this.fixedWidth(),o={flip:this.flip(),animation:this.animation(),border:this.border(),inverse:this.inverse(),size:this.size(),pull:this.pull(),rotate:this.rotate(),fixedWidth:typeof t=="boolean"?t:this.config.fixedWidth,stackItemSize:this.stackItem!=null?this.stackItem.stackItemSize():void 0},u=this.transform(),s=typeof u=="string"?LL.transform(u):u,g=this.mask(),x=g!=null?this.findIconDefinition(g):null,C={},M=this.a11yRole();M!=null&&(C.role=M);let T={};return o.rotate!=null&&!NL(o.rotate)&&(T["--fa-rotate-angle"]=`${o.rotate}`),{title:this.title(),transform:s,classes:ZZ(o),mask:x??void 0,symbol:this.symbol(),attributes:C,styles:T}}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=zt({type:r,selectors:[["fa-icon"]],hostAttrs:[1,"ng-fa-icon"],hostVars:2,hostBindings:function(o,u){o&2&&(I_("innerHTML",u.renderedIconHTML(),su),vg("title",u.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(o,u){},encapsulation:2})}return r})();var X1=(()=>{class r{static \u0275fac=function(o){return new(o||r)};static \u0275mod=Aa({type:r});static \u0275inj=Bs({})}return r})();var mn=class r{iconLibrary=be(py);logger=be(Zt);getIconDefinition(e,t){let o=this.iconLibrary.getIconDefinition(e,t);return o||(this.logger.logWarning(new Error(`Icon definition not found for ${e} ${t}`)),FE)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var Ni=class r{logger=be(Zt);router=be(du);platformId=be(wa);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(e){this.scrollToTop(),this.router.navigate(["/profile",e]),this.history.push(["/profile",e])}navigateToRoute(e){this.router.navigate(["/route",e]),this.history.push(["/route",e])}goBack(){if(this.history.length>1){this.history.pop();let e=this.history.pop();if(!e){this.logger.log("No previous path found");return}this.router.navigate(e),this.history.push(e);return}this.logger.log("Only current path in history")}scrollToTop(){if(fl(this.platformId))try{let e=document.querySelector("mapvx-website");if(e){e.scrollIntoView({behavior:"smooth",block:"start"});return}window.scrollTo({top:0,behavior:"smooth"})}catch(e){this.logger.log("Error scrolling to top:",e),window.scrollTo(0,0)}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};q1.autoAddCss=!1;function _I(r){return Z1(r)}var tX={"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 Y1(r){let e=tX[r];return e||["fak","shopping"]}var xI={};ZT(xI,{faAirport:()=>nX,faArrowTopRight:()=>rX,faBackground:()=>bI,faBeauty:()=>iX,faCenter:()=>oX,faCompass:()=>sX,faCompassNorth:()=>aX,faDeals:()=>lX,faEvents:()=>cX,faFoodAndBeverage:()=>uX,faHealth:()=>dX,faHotels:()=>hX,faPalette:()=>fX,faParking:()=>pX,faRoute:()=>mX,faServices:()=>gX,faShopping:()=>yX,faUser:()=>vX});var nX={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"]},rX={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"]},bI={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"]},iX={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"]},oX={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"]},sX={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"]},aX={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"]},lX={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"]},cX={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"]},uX={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"]},dX={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"]},hX={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"]},fX={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"]},pX={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"]},mX={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"]},gX={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"]},yX={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"]},vX={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 Qi=class r{onDestroy=new kn;logger=be(Zt);mapService=be(Pr);navigatorService=be(Ni);loadedDataService=be(mr);iconLibraryService=be(mn);document=be(Xn);markers=new Set;_hasCurrentLocationMarker=!1;ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}getIconFromPlace(e){this.logger.log("getIconFromPlace",e);let[t,o]=Y1(e.localizedCategory||"");return this.iconLibraryService.getIconDefinition(t,o)}toSVGString(e){return yI(t=>{t(_I(bI)),t(_I(e))}).html.join("")}createPlaceMarkerElement(e){let t=this.getIconFromPlace(e);return this.createElement(e.mapvxId,t)}createOriginMarkerElement(){let e=this.iconLibraryService.getIconDefinition("fak","user");return this.createElement("origin",e,["route-marker","origin-marker"])}createElement(e,t,o=[]){let u=this.document.createElement("div");return u.className="marker",u.classList.add(...o),u.id=`${e}-marker`,u.innerHTML=this.toSVGString(t),u}addMarker(e){if(this.markers.has(e.mapvxId)){this.logger.log("Marker already exists for place",e.mapvxId);return}let t={element:this.createPlaceMarkerElement(e),id:e.mapvxId,coordinate:e.position,floorId:e.inFloors?.[0],onClick:()=>{this.logger.log("Marker clicked for place",e.mapvxId),this.logger.logEvent("marker_clicked",{id:e.mapvxId,name:e.title,clientId:e.clientId||""}),this.navigatorService.navigateToProfile(e.mapvxId)},anchor:"bottom"};this.mapService.addMarker(t),this.markers.add(e.mapvxId),this.logger.log("Marker added for place",e.mapvxId)}addInitialMarkers(){this.loadedDataService.getAvailablePlaces().pipe(Fo(1),qi(this.onDestroy)).subscribe({next:e=>{for(let t of e)this.addMarker(t)},error:e=>{this.logger.logWarning("Error adding initial markers",e)}})}addMarkers(e){this.mapService.mapReady.pipe(Jr(t=>t),Fo(1),qi(this.onDestroy)).subscribe({next:()=>{this.removeAllMarkers();for(let t of e)this.addMarker(t)},error:t=>{this.logger.logWarning("Error adding markers",t)}})}removeAllMarkers(){for(let e of this.markers)this.mapService.removeMarker(e);this.markers.clear()}hasMarker(e){return this.markers.has(e)}selectMarker(e){if(!this.markers.has(e)){this.logger.logWarning("Marker not found",e);return}let t=this.document.getElementById(`${e}-marker`);if(!t){this.logger.logWarning("Marker not found",e);return}t.classList.add("selected")}deselectMarker(e){if(!this.markers.has(e)){this.logger.logWarning("Marker not found",e);return}let t=this.document.getElementById(`${e}-marker`);if(!t){this.logger.logWarning("Marker not found",e);return}t.classList.remove("selected")}deselectMarkers(){let e=this.document.querySelectorAll(".marker.selected");for(let t of e)t.classList.remove("selected")}addOriginMarker(e){let t={element:this.createOriginMarkerElement(),id:"origin",coordinate:e,anchor:"bottom"};this.mapService.addMarker(t),this.markers.add("origin")}addDestinationMarker(e){let t={element:this.createElement(e.mapvxId,this.getIconFromPlace(e),["route-marker","destination-marker"]),id:e.mapvxId,coordinate:e.position,anchor:"bottom"};this.mapService.addMarker(t),this.markers.add(e.mapvxId)}addRouteMarker(e){let t={element:this.createElement(e.mapvxId,this.getIconFromPlace(e),["route-marker"]),id:e.mapvxId,coordinate:e.position,anchor:"bottom"};this.mapService.addMarker(t),this.markers.add(e.mapvxId)}addRouteMarkers(e){for(let t of e)this.addRouteMarker(t)}createCurrentLocationMarkerElement(){let e=this.document.createElement("div");return e.className="current-location-marker",e.id="current-location-marker",e.innerHTML=Fk,e}addCurrentLocationMarker(e){let t={element:this.createCurrentLocationMarkerElement(),id:"current-location",coordinate:e,anchor:"bottom"};this.mapService.addMarker(t),this._hasCurrentLocationMarker=!0}updateCurrentLocationMarker(e){this.mapService.updateMarkerPosition("current-location",e)}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(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var xu=class r{sdkService=be(ts);logger=be(Zt);markerService=be(Qi);currentlyWatchingLocation=Rt(!1);currentLocation=new er(null);currentBearing=new er(null);hasBearingPermission=!1;watchId;async checkLocationPermission(){return"permissions"in navigator?navigator.permissions.query({name:"geolocation"}).then(async e=>e.state).catch(e=>(this.logger.logWarning(e),"denied")):(this.logger.log("Permissions API not supported"),"denied")}async requestLocationPermission(){return new Promise(e=>{navigator.geolocation.getCurrentPosition(()=>{console.log("requestLocationPermission granted"),e("granted")},t=>{console.log("requestLocationPermission denied",t),t.code===3?e("prompt"):e("denied")},{enableHighAccuracy:!0,timeout:5e3})})}async getCurrentLocation(){return this.currentlyWatchingLocation()&&this.currentLocation.value!=null?this.currentLocation.value:new Promise((e,t)=>{navigator.geolocation.getCurrentPosition(o=>{e(j_(o))},o=>{t(new Error("Error getting current location",{cause:o}))},{enableHighAccuracy:!0})})}checkBearingLocation(){typeof DeviceOrientationEvent<"u"&&"requestPermission"in DeviceOrientationEvent?DeviceOrientationEvent.requestPermission().then(t=>{this.hasBearingPermission=t==="granted"}).catch(t=>{this.logger.logWarning(t),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(e=>{this.currentLocation.next(e)},e=>{this.logger.logWarning("Error watching user location",e)}),this.hasBearingPermission&&this.sdkService.watchUserHeading(e=>{this.currentBearing.next(e)},e=>{this.logger.logWarning("Error watching user bearing",e)}))}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(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var K1=(u=>(u[u.NotStarted=0]="NotStarted",u[u.Playing=1]="Playing",u[u.Paused=2]="Paused",u[u.Finished=3]="Finished",u))(K1||{});var yl=class r{logger=be(Zt);mapService=be(Pr);sdkService=be(ts);platformId=be(wa);document=be(Xn);animationStatusSubject=new er(0);activeRouteSubject=new er(null);currentStepSubject=new er(null);getRoute(e,t){return this.sdkService.getRoute(e,t)}getSecondaryOrangeColor(){if(!fl(this.platformId))return"#EE5845";try{return getComputedStyle(this.document.documentElement).getPropertyValue("--definitions-colors-secondary-orange").trim()}catch(e){return this.logger.logWarning("Error getting --definitions-colors-secondary-orange:",e),"#EE5845"}}startAnimatingRoute(e){let t=this.getSecondaryOrangeColor(),o={behindPathStyle:{type:"Solid",color:t},aheadPathStyle:{type:"Solid",color:"#000000"},routeIcon:this.getRouteIcon(t)},u={callBack:({isFinished:s,step:g})=>{s?(this.animationStatusSubject.next(3),this.currentStepSubject.next(null)):(this.animationStatusSubject.next(1),this.currentStepSubject.next(g))}};this.animationStatusSubject.next(1),this.activeRouteSubject.next(e),this.mapService.startAnimatingRoute(e,o,u)}getRouteIcon(e){let t=this.document.createElement("div");return t.className="route-icon",t.id="route-icon",t.innerHTML=`<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2006
2006
|
<circle cx="15" cy="15" r="15" fill="${e}"/>
|
|
2007
2007
|
<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"/>
|
|
2008
|
-
</svg>`,t}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(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var J1={term:"",results:[]};function Q1(r,e){let t=e?.injector??be(Zi),o=new zs(1),u=tn(()=>{let s;try{s=r()}catch(g){Xi(()=>o.error(g));return}Xi(()=>o.next(s))},{injector:t,manualCleanup:!0});return t.get(wo).onDestroy(()=>{u.destroy(),o.complete()}),o.asObservable()}function bi(r,e){let o=!e?.manualCleanup?e?.injector?.get(wo)??be(wo):null,u=_X(e?.equal),s;e?.requireSync?s=Rt({kind:0},{equal:u}):s=Rt({kind:1,value:e?.initialValue},{equal:u});let g,x=r.subscribe({next:C=>s.set({kind:1,value:C}),error:C=>{s.set({kind:2,error:C}),g?.()},complete:()=>{g?.()}});if(e?.requireSync&&s().kind===0)throw new St(601,!1);return g=o?.onDestroy(x.unsubscribe.bind(x)),bt(()=>{let C=s();switch(C.kind){case 1:return C.value;case 2:throw C.error;case 0:throw new St(601,!1)}},{equal:e?.equal})}function _X(r=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&r(e.value,t.value)}var Cr=class r{loadedDataService=be(mr);homePlaces=Rt([]);showCategoryFilters=Rt(!0);showCityFilter=Rt(!0);defaultToMap=Rt(!1);activeView=Yi(()=>this.defaultToMap()?"map":"grid");inputValue=Rt("");selectedInstitution=Rt("");hideDeals=Rt(!1);cardWidth=Rt(void 0);rowsPerPage=Rt(2);initialInstitutionId=Rt("");showDealLabels=Rt(!1);lastListedPlaces=Rt([]);categoryFiltersData=bi(this.loadedDataService.getInstitution().pipe(En(e=>{let t=e.properties;if(t){let o=t.filter(u=>"childPlaces"in u&&u.childPlaces!==void 0).map(u=>({placeData:"childPlaces"in u?u.childPlaces:[],name:u.title}));return o.splice(1,0,{name:"All",placeData:[]}),o}return[]})),{initialValue:[]});selectedFilter=Yi({source:this.categoryFiltersData,computation:(e,t)=>{let o=e.map(s=>s.name),u=t?.value;return u&&o.includes(u)?u:e[0]?.name??""}});selectedCity=Yi(()=>{let e=this.selectedInstitution(),t=this.loadedDataService.cityFilterOptions();return t.find(u=>u.institutionId===e)||t.length>0?t[0]:void 0});filterId=bt(()=>{let e=this.selectedCity();return e?e.filterId:this.initialInstitutionId()});currentPageIndex=Yi({source:this.selectedFilter,computation:(e,t)=>e!==t?.source?1:t?.value??1});lastCardSelected=new kn;userAction=new kn;lastSearchData=Rt(J1);static \u0275fac=function(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var FL={fas:{},fak:{}},wI=[];function zL(r){Object.keys(r).forEach(function(e){if(e!=="prefix"){var t=r[e],o=t.icon[2];o.forEach(function(u){typeof u=="string"&&(FL[t.prefix][u]=t)}),FL[t.prefix][t.iconName]=t,wI.push(t)}})}zL(zE);zL(xI);var eb=class r{destroy$=new kn;apiKey=_n("");institutionId=_n("");initialData=_n("");showCategoryFilters=_n(!0,{transform:e=>typeof e=="string"?e==="true":e});showCityFilter=_n(!0,{transform:e=>typeof e=="string"?e==="true":e});defaultToMap=_n(!1,{transform:e=>typeof e=="string"?e==="true":e});inheritFontFamily=_n(!1,{transform:e=>typeof e=="string"?e==="true":e});hideDeals=_n(!1,{transform:this.transformToBoolean});showDealLabels=_n(!1,{transform:this.transformToBoolean});cardWidth=_n(void 0,{transform:e=>{if(!(e==null||e==="")){if(typeof e=="string"){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}return typeof e=="number"&&e<=0?void 0:e}}});rowsPerPage=_n(2,{transform:e=>{if(typeof e=="string"){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?2:Math.min(Math.max(t,1),10)}return e<=0?2:Math.min(Math.max(e,1),10)}});cardSelected=Co();userAction=Co();router=be(du);navigatorService=be(Ni);locationStrategy=be(hl);platformId=be(wa);logger=be(Zt);sdkService=be(ts);loadedDataService=be(mr);homeStateService=be(Cr);iconLibrary=be(py);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;static INSTITUTION_FETCH_RETRIES=3;static INSTITUTION_FETCH_RETRY_DELAY_MS=1e3;constructor(){this.loadIcons(),this.logger.sessionStart(),tn(()=>{let e=this.apiKey();e&&e.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(e.trim()),this.logger.setApiKey(e.trim()),this.loadData())}),tn(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),tn(()=>{let e=this.showDealLabels();this.homeStateService.showDealLabels.set(e)}),tn(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),tn(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),tn(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),tn(()=>{let e=this.initialData();e&&e.trim()!==""&&this.processInitialData(e)}),tn(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),tn(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),tn(()=>{let e=this.defaultToMap();this.logger.log("====> defaultToMap input",e),this.homeStateService.defaultToMap.set(e)}),tn(()=>{let e=this.institutionId(),t=this.loadedDataService.institutionsLoaded();e&&e.trim()!==""&&t&&(this.loadedDataService.updateInstitution(e),this.logger.setInstitutionId(e))}),this.homeStateService.lastCardSelected.pipe(qi(this.destroy$)).subscribe(e=>{this.cardSelected.emit(e),this.logger.log("====> cardSelected",e)}),this.homeStateService.userAction.pipe(qi(this.destroy$)).subscribe(e=>{this.userAction.emit(e),this.logger.log("====> userAction",e)})}ngOnInit(){fl(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(...wI)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(e){this.loadedDataService.cityFilterOptions.set(e);let t=e[0];t&&this.homeStateService.selectedInstitution.set(t.institutionId);let o=e.filter(u=>u.type==="parent-place");Promise.all(o.map(async u=>{let s=async()=>{let x=await this.sdkService.getPlaceDetail(u.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(x)},g=async()=>{let x=await this.sdkService.getSubPlaces(u.parentPlaceId);this.loadedDataService.updateAvailablePlaces(x)};await Promise.all([s(),g()])}))}transformToBoolean(e){return typeof e=="string"?e==="true":e}processInitialData(e){try{let t=JSON.parse(e);if(t.availablePlaces){let u=t.availablePlaces.map(s=>new Ji(s)).filter(s=>s.generalCategory!=="transport"&&!s.hidePlace);this.loadedDataService.updateAvailablePlaces(u),this.logger.log(`\u2705 Successfully loaded ${u.length} places from initial data`)}if(t.institutions){let o=t.institutions.map(s=>{try{return new nh(s)}catch(g){this.logger.logWarning("\u274C Error parsing institution",g);return}}).filter(s=>s!==void 0);this.loadedDataService.setInstitutions(o);let u=o.find(s=>s.mapvxId===this.institutionId());u?this.loadedDataService.setInstitution(u):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(t){this.logger.log("\u274C Error processing initial data",t),this.logger.log(`\u274C Data: ${e}`)}}async loadPlaces(){let e=fl(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${e}...`);let t=await this.sdkService.getAvailablePlaces(),o=t.filter(u=>u.generalCategory!=="transport"&&!u.hidePlace);this.loadedDataService.updateAvailablePlaces(o),this.logger.log(`\u2705 Successfully loaded ${t.length} places on ${e}`)}catch(t){this.logger.log(`\u274C Error loading initial places data on ${e}:`,t)}}async loadConfiguration(){try{let e=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(e);let t=e.cityOptions||[];this.loadCityFilterOptions(t),this.logger.log("\u2705 Successfully loaded configuration",e)}catch(e){this.logger.log("\u274C Error loading initial configuration",e)}}async loadInstitution(){try{let e=await this.fetchInstitutionsWithRetry(),t=e.find(o=>o.mapvxId===this.institutionId());this.loadedDataService.setInstitutions(e),t?(this.loadedDataService.setInstitution(t),this.logger.log("\u2705 Successfully loaded institution",t)):this.logger.log("\u274C Institution not found")}catch(e){this.logger.log(`\u274C Error loading institution data after ${r.INSTITUTION_FETCH_RETRIES} retries`,e)}}async fetchInstitutionsWithRetry(){let e;for(let t=0;t<=r.INSTITUTION_FETCH_RETRIES;t++)try{return await this.sdkService.getInstitutions()}catch(o){e=o,t<r.INSTITUTION_FETCH_RETRIES&&(this.logger.logWarning(`\u26A0\uFE0F Error loading institutions, retrying (${t+1}/${r.INSTITUTION_FETCH_RETRIES})`,o),await this.delay(r.INSTITUTION_FETCH_RETRY_DELAY_MS*(t+1)))}throw e}delay(e){return new Promise(t=>setTimeout(t,e))}handleInstanceTracking(){r.instanceCount++;let e=this.checkForExistingRouterContent(),t=this.router.url;r.hasBeenConnected||e||t!=="/"&&r.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${r.instanceCount}`),this.logger.log(` - URL del router: ${t}`),this.logger.log(` - Contenido en router outlet: ${e}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${r.instanceCount})`),r.hasBeenConnected=!0}checkForExistingRouterContent(){try{let e=document.querySelector("router-outlet");return e?e.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(){fl(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let e=this.router.url,t=this.router.routerState.root.firstChild;e==="/"&&!t?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(o=>{console.error("Error en navegaci\xF3n inicial:",o),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let e=fl(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},e)}checkAndFixRouterSync(){if(!fl(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let e=this.locationStrategy.getCurrentPath()||"/",t=this.router.url,o=this.router.routerState.root.firstChild,u=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${e}"`),this.logger.log(` - Router URL: "${t}"`),this.logger.log(` - Tiene ruta activa: ${!!o}`),this.logger.log(` - Contenido en router outlet: ${u}`),e==="/"&&t!=="/"||e==="/"&&!o&&u||e==="/"&&t==="/"&&u&&!o?(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(e=>{console.error("\u274C Error en navegaci\xF3n correctiva:",e)})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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:[T_([Ni,Cr,Qi,mn,yl,xu])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2),dt(3,"router-outlet"),qe()()()),t&2&&($e(),pr("inherit-font-family",o.inheritFontFamily()))},dependencies:[X1,qd],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%}"],changeDetection:1})};var bX=["categoryFilters"];function xX(r,e){if(r&1){let t=rr();Fe(0,"button",14),Mt("click",function(){qn(t);let u=xt();return Zn(u.onClearInput())}),dt(1,"fa-icon",6),qe()}if(r&2){let t=xt();$e(),mt("icon",t.faXmark)}}function wX(r,e){if(r&1&&dt(0,"fa-icon",6),r&2){let t=xt(2);mt("icon",t.faCaretUp)}}function CX(r,e){if(r&1&&dt(0,"fa-icon",6),r&2){let t=xt(2);mt("icon",t.faCaretDown)}}function SX(r,e){if(r&1){let t=rr();Fe(0,"button",21),Mt("click",function(){let u=qn(t).$implicit,s=xt(3);return Zn(s.onCitySelect(u))}),Pt(1),qe()}if(r&2){let t=e.$implicit;$e(),ri(" ",t.name," ")}}function EX(r,e){if(r&1&&(Fe(0,"div",19),ti(1,SX,2,1,"button",20,Vd),qe()),r&2){let t=xt(2);$e(),ni(t.citiesOptions())}}function IX(r,e){if(r&1){let t=rr();Fe(0,"div",9)(1,"button",15),Mt("click",function(){qn(t);let u=xt();return Zn(u.onCityFilterClick())}),dt(2,"fa-icon",6),qe(),Fe(3,"button",16),Mt("click",function(){qn(t);let u=xt();return Zn(u.onCityFilterClick())}),Fe(4,"span",17),Pt(5),qe(),Fe(6,"div",18),rn(7,wX,1,1,"fa-icon",6)(8,CX,1,1,"fa-icon",6),qe()(),rn(9,EX,3,0,"div",19),qe()}if(r&2){let t=xt();$e(),pr("active",t.isCityDropdownOpen()),$e(),mt("icon",t.faFilter),$e(3),Oi(t.selectedCity()?.name),$e(2),on(t.isCityDropdownOpen()?7:8),$e(2),on(t.isCityDropdownOpen()?9:-1)}}var tb=class r{logger=be(Zt);stateService=be(Cr);mapService=be(Pr);navigatorService=be(Ni);loadedDataService=be(mr);iconLibrary=be(mn);categoryFilters;activeView=bt(()=>this.stateService.activeView());showCityFilter=bt(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=bt(()=>this.stateService.inputValue());citiesOptions=bt(()=>this.loadedDataService.cityFilterOptions());selectedCity=bt(()=>this.stateService.selectedCity());isCityDropdownOpen=Rt(!1);mapReady=bi(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(){tn(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let e=this.stateService.lastListedPlaces(),t=e.map(u=>u.inFloors?.[0]),o=this.getMostFrequentValue(t);o!==void 0&&this.mapService.updateFloor(o),setTimeout(()=>{this.mapService.fitCoordinates(e.map(u=>u.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let e=new URLSearchParams(location.search),t=e.get("search");if(t){this.stateService.inputValue.set(t),setTimeout(()=>{this.logger.logEvent("search_text_from_url",{term:t}),this.navigatorService.navigateToSearchView()},100);return}let o=e.get("tenant");if(o){this.logger.logEvent("profile_from_url",{id:o}),this.navigatorService.navigateToProfile(o);return}let u=e.get("destination");u&&(this.logger.logEvent("route_from_url",{id:u}),this.navigatorService.navigateToRoute(u))}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(e){let t=e.target;this.stateService.inputValue.set(t.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(e=>!e)}onCitySelect(e){if(this.stateService.selectedInstitution.set(e.institutionId),this.stateService.selectedCity.set(e),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(e.institutionId),this.logger.setInstitutionId(e.institutionId),e.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0),this.logger.setParentPlaceId("");else{let o=this.loadedDataService.potentialParentPlaces().find(u=>u.mapvxId===e.parentPlaceId);o?(this.mapService.setParentPlace(o),this.loadedDataService.parentPlace.set(o),this.logger.setParentPlaceId(o.mapvxId)):(this.mapService.removeParentPlace(),this.logger.setParentPlaceId(""))}}getMostFrequentValue(e){if(e.length===0)return;let t=new Map,o=0,u;for(let s of e){if(s==null)continue;let g=(t.get(s)||0)+1;t.set(s,g),g>o&&(o=g,u=s)}return u}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-home-screen"]],viewQuery:function(t,o){if(t&1&&Zf(bX,5),t&2){let u;bg(u=xg())&&(o.categoryFilters=u.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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),dt(6,"fa-icon",6),qe(),Fe(7,"input",7),Mt("input",function(s){return o.onInputChange(s)}),qe(),rn(8,xX,2,1,"button",8),qe(),rn(9,IX,10,6,"div",9),qe(),Fe(10,"div",10)(11,"button",11),Mt("click",function(){return o.onGridClick()}),Fe(12,"div",12),dt(13,"fa-icon",6),qe(),Fe(14,"span"),Pt(15,"Grid View"),qe()(),Fe(16,"button",11),Mt("click",function(){return o.onMapClick()}),Fe(17,"div",12),dt(18,"fa-icon",6),qe(),Fe(19,"span"),Pt(20,"Map View"),qe()()()()(),Fe(21,"div",13),dt(22,"router-outlet"),qe()()),t&2&&($e(4),pr("active",o.inputValue()!==""),$e(2),mt("icon",o.faMagnifyingGlass),$e(),mt("value",o.inputValue()),$e(),on(o.inputValue()!==""?8:-1),$e(),on(o.showCityFilter()?9:-1),$e(2),pr("active",o.activeView()==="grid"),$e(2),mt("icon",o.faGrid2),$e(3),pr("active",o.activeView()==="map"),$e(2),mt("icon",o.faMapLocationDot))},dependencies:[Ln,qd],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}}"]})};function nb(r){return r.tags?.includes("deals")||r.tags?.includes("events")}function BL(r){let e="#EE5845";if(!r?.trim())return e;let o=/style\s*=\s*["']([^"']*)["']/i.exec(r);if(!o?.[1])return e;let u=o[1],g=/(?:^|;)\s*color\s*:\s*([^;]+)/i.exec(u);return DX(g?.[1])??e}function DX(r){if(!r)return null;let e=r.trim().replace(/\s*!important\s*$/i,""),t=e.toLowerCase(),o=/^#[0-9a-f]{3,8}$/i.test(e),u=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i.test(e),s=/^hsla?\(\s*\d{1,3}(?:deg)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i.test(e),g=/^[a-z]+$/i.test(e);return o||u||s||g?o?e.toUpperCase():t:null}var TX=()=>({rotate:42});function MX(r,e){if(r&1&&dt(0,"fa-icon",3),r&2){let t=xt();mt("icon",t.faCircleNotch)("transform",ac(2,TX))}}function AX(r,e){r&1&&(Fe(0,"div",4),Pt(1,"Deals + Events"),qe())}var rb=class r{logger=be(Zt);iconLibrary=be(mn);navigatorService=be(Ni);homeStateService=be(Cr);fromSearch=_n(!1);place=_n.required();hasDealsOrEvents=bt(()=>this.place().banners.some(nb));hideDeals=bt(()=>this.homeStateService.hideDeals());showDealLabels=bt(()=>this.homeStateService.showDealLabels());imageSrc=bt(()=>this.place().images[0]||V_);isImageLoading=Rt(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){tn(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let e=this.place(),t=e.mapvxId;this.homeStateService.lastCardSelected.next(t),this.navigatorService.navigateToProfile(t),this.fromSearch()?this.logger.logEvent("search_result_card_selected",{id:t,name:e.title,clientId:e.clientId||""}):this.logger.logEvent("card_selected",{id:t,name:e.title,clientId:e.clientId||""})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"button",0),Mt("click",function(){return o.navigateToProfile()}),Fe(1,"div",1)(2,"img",2),Mt("load",function(){return o.endImageLoading()})("error",function(){return o.endImageLoading()}),qe(),rn(3,MX,1,3,"fa-icon",3)(4,AX,2,0,"div",4),qe(),Fe(5,"div",5)(6,"h3",6),Pt(7),qe(),Fe(8,"p",7),Pt(9),qe(),Fe(10,"span",8),Pt(11),qe()()()),t&2&&($e(),pr("loading",o.isImageLoading()),$e(),mt("src",o.imageSrc(),Fd)("alt",o.place().title),$e(),on(o.isImageLoading()?3:o.hasDealsOrEvents()&&!o.hideDeals()&&o.showDealLabels()?4:-1),$e(4),Oi(o.place().title),$e(2),Oi(o.place().address),$e(2),Oi(o.place().localizedCategory))},dependencies:[Ln],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}"]})};var PX=["cardContainer"],RX=["*"];function kX(r,e){if(r&1&&dt(0,"app-location-card",3),r&2){let t=e.$implicit,o=xt();mt("place",t)("fromSearch",o.fromSearch())}}function LX(r,e){r&1&&sc(0)}function OX(r,e){if(r&1){let t=rr();Fe(0,"button",7),Mt("click",function(){qn(t);let u=xt(3);return Zn(u.previousPage())}),dt(1,"fa-icon",8),qe()}if(r&2){let t=xt(3);$e(),mt("icon",t.faChevronLeft)}}function NX(r,e){if(r&1&&rn(0,OX,2,1,"button",6),r&2){let t=xt().$implicit,o=xt();on(t<o.currentPageIndex()?0:-1)}}function FX(r,e){r&1&&(Fe(0,"button",9),Pt(1,"..."),qe())}function zX(r,e){if(r&1){let t=rr();Fe(0,"button",11),Mt("click",function(){qn(t);let u=xt(3);return Zn(u.nextPage())}),dt(1,"fa-icon",8),qe()}if(r&2){let t=xt(3);$e(),mt("icon",t.faChevronRight)}}function BX(r,e){if(r&1&&(rn(0,FX,2,0,"button",9),rn(1,zX,2,1,"button",10)),r&2){let t=xt().$implicit,o=xt();on(t<o.totalPages()?0:-1),$e(),on(t>o.currentPageIndex()?1:-1)}}function jX(r,e){if(r&1){let t=rr();rn(0,NX,1,1),Fe(1,"button",5),Mt("click",function(){let u=qn(t).$implicit,s=xt();return Zn(s.goToPage(u))}),Pt(2),qe(),rn(3,BX,2,2)}if(r&2){let t=e.$implicit,o=e.$index,u=e.$count,s=xt();on(o===0?0:-1),$e(),pr("active",s.currentPageIndex()===t),$e(),ri(" ",t," "),$e(),on(o===u-1?3:-1)}}var xp=class r{logger=be(Zt);stateService=be(Cr);iconLibrary=be(mn);cardContainer=R_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");fromSearch=_n(!1);places=_n.required();itemsPerPage=bt(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));totalPages=bt(()=>Math.ceil(this.places().length/this.itemsPerPage()));currentPageIndex=bt(()=>{let e=this.totalPages(),t=this.stateService.currentPageIndex();return e>0&&t>e?e:t});cardContainerStyles=bt(()=>{let e=this.stateService.cardWidth();return e?{"--card-width":`${e}`}:{}});pages=bt(()=>{let e=this.totalPages();switch(e){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let o=this.currentPageIndex()-1;return o<1&&(o=1),o+2>e&&(o=e-2),Array.from({length:3},(u,s)=>s+o)}}});currentPagePlaces=bt(()=>{let e=this.places(),t=this.itemsPerPage(),o=this.currentPageIndex();return e.slice((o-1)*t,o*t)});showMap=bt(()=>this.stateService.activeView()==="map");constructor(){wR(()=>{let e=this.currentPageIndex();e!==this.stateService.currentPageIndex()&&this.stateService.currentPageIndex.set(e)})}calculateItemsPerPage(e,t,o,u=2){try{if(t){let s=globalThis.getComputedStyle(t.nativeElement),g=o??Number.parseInt(s.getPropertyValue("--card-width")||"0"),x=Number.parseInt(s.getPropertyValue("--card-gap")||"0"),C=g+x;if(C<=0)return u*5;let M=t.nativeElement.clientWidth,z=Math.floor((M+x)/C)*u;return Number.isFinite(z)&&z>0?z:u*5}return u*5}catch(s){return this.logger.logError("Error calculating items per page",s),u*5}}nextPage(){let e=this.currentPageIndex(),t=this.totalPages();e<t&&this.stateService.currentPageIndex.set(e+1)}previousPage(){let e=this.currentPageIndex();e>1&&this.stateService.currentPageIndex.set(e-1)}goToPage(e){this.stateService.currentPageIndex.set(e)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-paginator"]],viewQuery:function(t,o){t&1&&Xf(o.cardContainer,PX,5),t&2&&wg()},inputs:{fromSearch:[1,"fromSearch"],places:[1,"places"]},ngContentSelectors:RX,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(t,o){t&1&&(oc(),Fe(0,"div",1)(1,"div",2,0),ti(3,kX,1,2,"app-location-card",3,es,!1,LX,1,0),qe(),Fe(6,"div",4),ti(7,jX,4,5,null,null,Vd),qe()()),t&2&&(pr("with-map",o.showMap()),$e(),pr("with-map",o.showMap()),mt("ngStyle",o.cardContainerStyles()),$e(2),ni(o.currentPagePlaces()),$e(4),ni(o.pages()))},dependencies:[Tg,ES,rb,Ln],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}']})};var ib=class r{onDestroy=new kn;iconLibrary=be(mn);mapService=be(Pr);logger=be(Zt);loadedDataService=be(mr);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){this.logger.logEvent("map_center_button_clicked");let e=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Fo(1),qi(this.onDestroy)).subscribe({next:t=>{this.mapService.updateCamera({center:t.initialCenter,zoom:t.initialZoom,pitch:t.initialPitch??0,bearing:e})},error:t=>{this.logger.logWarning("Error centering map",t)}})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(t,o){t&1&&(Fe(0,"button",0),Mt("click",function(){return o.onClick()}),dt(1,"fa-icon",1),qe()),t&2&&($e(),mt("icon",o.faCenter))},dependencies:[Ln],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)}"]})};var VX=r=>({rotate:r}),ob=class r{mapService=be(Pr);iconLibrary=be(mn);rotation=bi(this.mapService.rotation.asObservable().pipe(En(e=>360-e)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(t,o){t&1&&(Fe(0,"button",0),dt(1,"fa-icon",1),qe()),t&2&&($e(),mt("icon",o.faCompass)("transform",oS(2,VX,o.rotation())))},dependencies:[Ln],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)}"]})};var sb=class r{iconLibrary=be(mn);locationService=be(xu);logger=be(Zt);markerService=be(Qi);mapService=be(Pr);locationPermission=Rt("prompt");active=bt(()=>this.locationService.currentlyWatchingLocation());mapReady=bi(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),tn(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:e=>{this.logger.log("location",e),e!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(e.position):this.markerService.addCurrentLocationMarker(e.position))},error:e=>{this.logger.logWarning("Error updating current location marker position",e)}}),this.bearingSubscription=fs([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([e,t])=>{this.logger.log("bearing",e),this.logger.log("maprotation",t);let u=(e??0)-t;if(this.logger.log("markerRotation",u),this.markerService.hasCurrentLocationMarker){let s=this.markerService.getCurrentLocationMarkerElement();s!=null&&(s.style.transform=`rotate(${u}deg)`)}},error:e=>{this.logger.logWarning("Error updating current location marker rotation",e)}})):(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(e=>{this.locationPermission.set(e),e==="granted"&&this.active()&&this.locationService.startWatching()}).catch(e=>{this.logger.logWarning("Error checking location permission",e),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(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(t,o){t&1&&(Fe(0,"button",0),Mt("click",function(){return o.onClick()}),dt(1,"fa-icon",1),qe()),t&2&&(pr("active",o.active()),$e(),mt("icon",o.faLocation))},dependencies:[Ln],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}"]})};var ab=class r{logger=be(Zt);mapService=be(Pr);iconLibrary=be(mn);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(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"button",1),Mt("click",function(){return o.onZoomIn()}),dt(2,"fa-icon",2),qe(),Fe(3,"button",3),Mt("click",function(){return o.onZoomOut()}),dt(4,"fa-icon",2),qe()()),t&2&&($e(2),mt("icon",o.faPlus),$e(2),mt("icon",o.faMinus))},dependencies:[Ln],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)}"]})};var lb=class r{static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(t,o){t&1&&(Fe(0,"div",0),dt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),qe())},dependencies:[ob,ib,ab,sb],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"]})};function UX(r,e){if(r&1){let t=rr();Fe(0,"button",4),Mt("click",function(){let u=qn(t).$implicit,s=xt(3);return Zn(s.selectFloor(u))}),Pt(1),qe()}if(r&2){let t=e.$implicit;$e(),ri(" ",t.name," ")}}function $X(r,e){if(r&1&&(Fe(0,"div",2),ti(1,UX,2,1,"button",3,es),qe()),r&2){let t=xt(2);$e(),ni(t.floors())}}function HX(r,e){if(r&1){let t=rr();Fe(0,"button",0),Mt("click",function(){qn(t);let u=xt();return Zn(u.toggleFloorSelector())}),Fe(1,"span"),Pt(2),qe(),dt(3,"fa-icon",1),qe(),rn(4,$X,3,0,"div",2)}if(r&2){let t=xt();$e(2),Oi(t.selectedFloor().name),$e(),mt("icon",t.showFloorOptions()?t.caretUp:t.caretDown),$e(),on(t.showFloorOptions()?4:-1)}}var cb=class r{loadedDataService=be(mr);mapService=be(Pr);iconLibrary=be(mn);parentPlace=bt(()=>this.loadedDataService.parentPlace());floors=bt(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=bt(()=>this.mapService.currentFloorId());selectedFloor=bt(()=>this.floors().find(e=>e.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=Rt(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(e=>!e)}selectFloor(e){this.showFloorOptions.set(!1),this.mapService.updateFloor(e.key)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&rn(0,HX,5,3),t&2&&on(o.floors().length>0?0:-1)},dependencies:[Ln],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)}"],changeDetection:1})};var GX=["map"],WX=["*"];function qX(r,e){r&1&&dt(0,"app-floor-selector",3)}var wu=class r{mapRef;logger=be(Zt);mapService=be(Pr);markerService=be(Qi);routingService=be(yl);loadedDataService=be(mr);showFloorSelector=bt(()=>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(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-map"]],viewQuery:function(t,o){if(t&1&&Zf(GX,5),t&2){let u;bg(u=xg())&&(o.mapRef=u.first)}},ngContentSelectors:WX,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(t,o){t&1&&(oc(),Fe(0,"div",1),dt(1,"div",2,0),rn(3,qX,1,0,"app-floor-selector",3),dt(4,"app-buttons-container",4),sc(5),qe()),t&2&&($e(3),on(o.showFloorSelector()?3:-1))},dependencies:[lb,cb],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}"]})};var ZX=["*"];function XX(r,e){r&1&&(Fe(0,"div",2),dt(1,"app-map"),qe())}var wp=class r{stateService=be(Cr);showMap=bt(()=>this.stateService.activeView()==="map");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-view-container"]],ngContentSelectors:ZX,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(t,o){t&1&&(oc(),Fe(0,"div",0)(1,"div",1),sc(2),qe(),rn(3,XX,2,0,"div",2),qe()),t&2&&($e(),pr("with-map",o.showMap()),$e(2),on(o.showMap()?3:-1))},dependencies:[wu],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}}"]})};var YX=["categoryFilters"],KX=(r,e)=>e.name;function JX(r,e){if(r&1){let t=rr();Fe(0,"button",11),Mt("click",function(){let u=qn(t).$implicit,s=xt(2);return Zn(s.updateSelectedFilter(u.name))}),Pt(1),qe()}if(r&2){let t=e.$implicit,o=xt(2);pr("active",o.selectedFilter()===t.name),$e(),ri(" ",t.name," ")}}function QX(r,e){if(r&1&&(Fe(0,"div",2)(1,"div",5,0)(3,"div",6),ti(4,JX,2,3,"button",7,KX),qe(),Fe(6,"div",8),dt(7,"div",9)(8,"div",10),qe()()()),r&2){let t=xt();$e(4),ni(t.categoryFiltersData()),$e(4),Yf("left",t.indicatorPosition(),"px")}}var ub=class r{logger=be(Zt);stateService=be(Cr);loadedDataService=be(mr);markerService=be(Qi);categoryFilters=R_("categoryFilters");activeView=bt(()=>this.stateService.activeView());loadedPlaces=bi(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=bt(()=>this.stateService.categoryFiltersData());places=Yi(()=>this.loadedPlaces());selectedFilter=bt(()=>this.stateService.selectedFilter());selectedInstitution=bt(()=>this.stateService.selectedInstitution());selectedCity=bt(()=>this.stateService.selectedCity());showCategoryFilters=bt(()=>this.stateService.showCategoryFilters());showCityFilter=bt(()=>this.stateService.showCityFilter());indicatorPosition=Rt(0);constructor(){tn(()=>{let e=this.activeView();this.logger.logEvent("page_view",{page_title:"List Page",page_location:`/list?view=${e}`})}),tn(()=>{let e=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",e),e.length>0){let t=e.map(o=>o.name);this.readFilterFromUrl(t)}}),tn(()=>{if(this.activeView()==="map"){let e=this.places();this.logger.log("====> addMarkers ",e),this.markerService.addMarkers(e)}}),tn(()=>{let e=this.loadedPlaces(),t=this.showCategoryFilters(),o=e.filter(s=>s.visibility==="public");if(this.showCityFilter()){let g=this.selectedCity()?.filterId??"";g!==""&&(o=o.filter(x=>x.parentInstitutionId===g))}if(t){let s=this.selectedFilter(),g=this.categoryFiltersData();if(s!=="All"){let x=g.find(C=>C.name===s)?.placeData||[];o=o.filter(C=>x.includes(C.mapvxId))}}o.sort((s,g)=>s.title.trim().localeCompare(g.title.trim())),this.logger.log("====> filteredPlaces",o),this.places.set(o)}),tn(()=>{let e=this.places();this.stateService.lastListedPlaces.set(e)}),tn(()=>{let e=this.selectedFilter(),t=this.categoryFiltersData(),o=this.categoryFilters();this.showCategoryFilters()&&o?requestAnimationFrame(()=>{let s=this.getIndicatorPosition(e,t,o);this.indicatorPosition.set(s)}):this.indicatorPosition.set(0)})}readFilterFromUrl(e){let o=new URLSearchParams(location.search).get("tab");o&&e.includes(o)&&this.stateService.selectedFilter.set(o)}getIndicatorPosition(e,t,o){if(o==null)return 0;let u=o.nativeElement.querySelectorAll(".category-btn");if(u.length===0)return 0;let s=t.findIndex(V=>V.name===e);if(s===-1||s>=u.length)return 0;let g=u[s];if(!g)return 0;let x=o.nativeElement.getBoundingClientRect(),C=g.getBoundingClientRect(),M=C.width,T=C.left-x.left,z=80,N=T+M/2-z/2;return Math.min(Math.max(0,N),x.width-z)}updateSelectedFilter(e){this.stateService.selectedFilter.set(e),this.stateService.userAction.next({type:"select-filter",data:{filter:e}}),this.logger.logEvent("filter_selected",{filter:e})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-list-view"]],viewQuery:function(t,o){t&1&&Xf(o.categoryFilters,YX,5),t&2&&wg()},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(t,o){t&1&&(Fe(0,"div",1),rn(1,QX,9,2,"div",2),Fe(2,"app-view-container")(3,"div",3),dt(4,"app-paginator",4),qe()()()),t&2&&($e(),on(o.showCategoryFilters()?1:-1),$e(3),mt("places",o.places()))},dependencies:[wp,xp],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%}"]})};var eY=()=>({rotate:42}),db=class r{iconLibrary=be(mn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1),dt(2,"fa-icon",2),qe(),Fe(3,"div",3),dt(4,"div",4)(5,"div",5)(6,"div",6),qe()()),t&2&&($e(2),mt("icon",o.faCircleNotch)("transform",ac(2,eY)))},dependencies:[Ln],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)}"],changeDetection:1})};var tY=()=>[1,2,3,4,5,6,7,8,9,10];function nY(r,e){r&1&&dt(0,"app-loading-location-card")}var hb=class r{homeStateService=be(Cr);showMap=bt(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(t,o){t&1&&(Fe(0,"div",0),ti(1,nY,1,0,"app-loading-location-card",null,Vd),qe()),t&2&&(pr("with-map",o.showMap()),$e(),ni(ac(2,tY)))},dependencies:[db],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}"],changeDetection:1})};function rY(r,e){r&1&&(Fe(0,"p"),Pt(1,"Looking for your results..."),qe())}function iY(r,e){if(r&1&&(Fe(0,"p"),Pt(1),qe()),r&2){let t=xt(3);$e(),ri('Showing 1 result for "',t.searchTerm(),'"')}}function oY(r,e){if(r&1&&(Fe(0,"p"),Pt(1),qe()),r&2){let t=xt(3);$e(),D_("Showing ",t.places().length,' results for "',t.searchTerm(),'"')}}function sY(r,e){if(r&1&&rn(0,iY,2,1,"p")(1,oY,2,2,"p"),r&2){let t=xt(2);on(t.places().length===1?0:1)}}function aY(r,e){if(r&1&&(Fe(0,"p"),Pt(1),qe()),r&2){let t=xt(2);$e(),ri('No results found for "',t.searchTerm(),'"')}}function lY(r,e){if(r&1&&rn(0,sY,2,1)(1,aY,2,1,"p"),r&2){let t=xt();on(t.places().length>0?0:1)}}function cY(r,e){r&1&&dt(0,"app-loading-card-list")}function uY(r,e){if(r&1&&(Fe(0,"div",6)(1,"app-paginator",7)(2,"div",8),dt(3,"fa-icon",4),Fe(4,"h2"),Pt(5,"No results found"),qe(),Fe(6,"div",9)(7,"p"),Pt(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),qe()()()()()),r&2){let t=xt();$e(),mt("places",t.places())("fromSearch",!0),$e(2),mt("icon",t.faBuildingMagnifyingGlass)}}var fb=class r{logger=be(Zt);loadedDataService=be(mr);sdkService=be(ts);stateService=be(Cr);navigatorService=be(Ni);markerService=be(Qi);iconLibrary=be(mn);searching=Yi(()=>this.stateService.lastSearchData().term==="");inputValue$=Q1(this.stateService.inputValue).pipe(Tx(500),En(e=>e.trim()),Jr(e=>e!==""),Mx());searchTerm=bi(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=bi(fs([Q1(this.stateService.filterId),this.inputValue$,Q1(this.stateService.lastSearchData)]).pipe(Ri(([e,t,o])=>o.term===t?(this.logger.log("====> lastSearchData",o),this.searching.set(!1),yn(o.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",t),this.logger.logEvent("search",{term:t,searchInstitutionId:e}),this.logger.log("====> institutionId",e),fr(this.sdkService.searchPlaces(t,e)))),zo(e=>{this.searching.set(!1),e.length>0?this.logger.logEvent("search_results",{resultsCount:e.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"}),tn(()=>{let e=this.places();this.markerService.addMarkers(e)}),tn(()=>{let e=this.places();this.stateService.lastListedPlaces.set(e)}),tn(()=>{let e=this.searching();this.logger.log("====> searching",e)}),tn(()=>{let e=this.searchTerm();e&&this.stateService.userAction.next({type:"search",data:{searchTerm:e}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(J1)):(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(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),Mt("click",function(){return o.onBackClick()}),dt(4,"fa-icon",4),Fe(5,"span"),Pt(6,"Back"),qe()()(),Fe(7,"div",5),rn(8,rY,2,0,"p")(9,lY,2,1),qe()(),Fe(10,"app-view-container"),rn(11,cY,1,0,"app-loading-card-list")(12,uY,9,3,"div",6),qe()()),t&2&&($e(4),mt("icon",o.faArrowLeft),$e(4),on(o.searching()?8:9),$e(3),on(o.searching()?11:12))},dependencies:[wp,xp,X1,Ln,hb],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}']})};function pb(r){switch(r){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 gb(r){switch(r.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 dY(r){switch(r){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 mb(r){let[e,t]=r.split(":"),o=parseInt(e)%24,u=parseInt(t),s;return o<12?(s="AM",o===0&&(o=12)):(s="PM",o!==12&&(o-=12)),`${o}:${u<10?"0":""}${u} ${s}`}function UL(r){let e=mb(r.open),t=mb(r.close);return`${e} - ${t}`}function hY(r){let e=mb(r.open),t=mb(r.close);return`${e} to ${t}`}function fY(r){let e=new Date,t=new Date(e);$L(t);let o=gb(t),u=r[o];if(u&&u.length>0){for(let s of u)if(jL(s.open)&&jL(s.close)){let g=VL(s.open,t),x=VL(s.close,t);if(g>x&&pY(x),e>=g&&e<=x)return!0}}return!1}function $L(r){let e=r.getDate();r.setDate(e-1)}function pY(r){let e=r.getDate();r.setDate(e+1)}function mY(r){let t=gb(new Date),o=r[t];return o&&o.length>0}function jL(r){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(r)}function VL(r,e){let[t,o]=r.split(":").map(Number),u=e?new Date(e):new Date;return new Date(u.getFullYear(),u.getMonth(),u.getDate(),t,o,0,0)}function gY(r){return r.sort((e,t)=>e.open.localeCompare(t.open))}function yY(r){let t=gb(new Date),o=r[t];return o&&o.length>0?HL(o):""}function vY(r){let e=new Date;$L(e);let t=gb(e),o=r[t];return o&&o.length>0?HL(o):""}function _Y(r){let e=bY(r);return`Open on ${pb(e)}`}function HL(r){return r.length===1?UL(r[0]):(gY(r),r.map(hY).join(" - "))}function bY(r){let t=new Date().getDay();for(let o=0;o<7;o++){let u=(t+o)%7,s=dY(u),g=r[s];if(g&&g.length>0)return s}return"mo"}function GL(r){return fY(r)?vY(r):mY(r)?yY(r):_Y(r)}function WL(r){let e=["mo","tu","we","th","fr","sa","su"],t=x=>{let C=r[x];return!C||C.length===0?["Closed"]:C.map(M=>UL(M))},o=(x,C)=>x.length!==C.length?!1:x.every((M,T)=>M===C[T]),u=(x,C)=>x===C?pb(x):`${pb(x)} - ${pb(C)}`,s=[],g=0;for(;g<e.length;){let x=e[g],C=t(x),M=g+1;for(;M<e.length&&o(C,t(e[M]));)M++;let T=u(x,e[M-1]);s.push({day:T,schedule:C}),g=M}if(s.length>1){let x=s[0],C=s[s.length-1];if(o(x.schedule,C.schedule)){let M=x.day.split(" - "),z=C.day.split(" - ")[0],N=M.length>1?M[1]:M[0],V=`${z} - ${N}`;s[0]={day:V,schedule:x.schedule},s.pop()}}return s}function xY(r,e){if(r&1&&dt(0,"div",9),r&2){let t=e.$implicit;mt("innerHTML",t,su)}}function wY(r,e){if(r&1&&(Fe(0,"div",6)(1,"div",7),Pt(2),qe(),Fe(3,"div",8),ti(4,xY,1,1,"div",9,es),qe()()),r&2){let t=e.$implicit;$e(2),Oi(t.day),$e(2),ni(t.schedule)}}var yb=class r{iconLibrary=be(mn);schedules=_n.required({transform:e=>e?WL(e):[]});closeClicked=Co();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2),dt(3,"fa-icon",3),Fe(4,"h2"),Pt(5,"Other Schedules"),qe()(),Fe(6,"button",4),Mt("click",function(){return o.hideModal()}),dt(7,"fa-icon",3),qe()(),Fe(8,"div",5),ti(9,wY,6,1,"div",6,es),qe()()),t&2&&($e(3),mt("icon",o.faClockThree),$e(4),mt("icon",o.faXmark),$e(2),ni(o.schedules()))},dependencies:[Ln],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}}"],changeDetection:1})};var CY=()=>({rotate:42});function SY(r,e){if(r&1&&dt(0,"fa-icon",3),r&2){let t=xt();mt("icon",t.faCircleNotch)("transform",ac(2,CY))}}function EY(r,e){if(r&1){let t=rr();Fe(0,"div",10),dt(1,"fa-icon",9),Fe(2,"div",24)(3,"button",25),Mt("click",function(){qn(t);let u=xt();return Zn(u.showOtherSchedulesModal())}),qe(),Fe(4,"div",26),Pt(5,"*Hours may vary"),qe()()()}if(r&2){let t=xt();$e(),mt("icon",t.faClockThree),$e(2),mt("innerHTML",t.schedule(),su)}}function IY(r,e){if(r&1){let t=rr();Fe(0,"div",11)(1,"app-other-schedules",27),Mt("closeClicked",function(){qn(t);let u=xt();return Zn(u.hideOtherSchedulesModal())}),qe()()}if(r&2){let t=xt();$e(),mt("schedules",t.place().openingHours)}}function DY(r,e){if(r&1&&dt(0,"div",32),r&2){let t=e.$implicit;Yf("color",t.color)("border-color",t.color),mt("innerHTML",t.description,su)}}function TY(r,e){if(r&1&&(Fe(0,"div",12)(1,"div",28),dt(2,"fa-icon",9),Fe(3,"div",29),Pt(4,"Deals + Events"),qe()(),Fe(5,"div",30),ti(6,DY,1,5,"div",31,es),qe()()),r&2){let t=xt();$e(2),mt("icon",t.faBadgeDollar),$e(4),ni(t.banners())}}function MY(r,e){if(r&1&&(Fe(0,"div",21),Pt(1),qe()),r&2){let t=xt();$e(),ri(" ",t.address()," ")}}function AY(r,e){if(r&1&&(Fe(0,"div",22),Pt(1),qe()),r&2){let t=e.$implicit;$e(),ri(" ",t," ")}}function PY(r,e){if(r&1){let t=rr();Fe(0,"div",23)(1,"a",18),Mt("click",function(){let u=qn(t).$implicit,s=xt();return Zn(s.logWebsiteClick(u.url))}),Pt(2),qe()()}if(r&2){let t=e.$implicit;$e(),mt("href",t.url,Fd),$e(),Oi(t.title)}}var vb=class r{iconLibrary=be(mn);sanitizer=be(kg);logger=be(Zt);navigatorService=be(Ni);stateService=be(Cr);place=_n.required();hideDeals=_n(!1);imageSrc=bt(()=>this.place().images[0]||V_);isImageLoading=Rt(!0);schedule=bt(()=>{let e=this.place().openingHours;return e?GL(e):""});banners=bt(()=>this.place().banners.filter(nb).filter(e=>e.description!==void 0).map(e=>({description:this.sanitizer.bypassSecurityTrustHtml(e.description||""),color:BL(e.description||"")})));address=bt(()=>this.place().address||"");phones=bt(()=>this.place().properties?.filter(e=>e.type==="phone").map(e=>this.formatPhoneNumber(e.subtitle))||[]);websites=bt(()=>this.place().properties?.filter(e=>e.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=bt(()=>{let e=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${e.position.lat},${e.position.lng}&travelmode=driving`});otherSchedulesModal=Rt(!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=bt(()=>{let[e,t]=Y1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(e,t)});constructor(){tn(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(e){return xn(ht({},e),{url:e.url?.startsWith("http")?e.url:`https://${e.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(e){let t=e.replace(/^\+1/,"");return t=t.replaceAll(/\D/g,""),t.length<10?(this.logger.logWarning(`Phone number '${t}' is to short for format`),t):`${t.slice(0,3)}.${t.slice(3,6)}.${t.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().mapvxId,alias:this.place().clientId}}),this.logger.logEvent("pedestrian_directions_selected",{id:this.place().mapvxId,name:this.place().title,clientId:this.place().clientId||""}),this.navigatorService.navigateToRoute(this.place().mapvxId)}logDrivingDirectionsClick(){this.logger.logEvent("driving_directions_clicked",{id:this.place().mapvxId,name:this.place().title,clientId:this.place().clientId||"",url:this.drivingDirectionsUrl()})}logWebsiteClick(e){e&&this.logger.logEvent("profile_website_clicked",{id:this.place().mapvxId,name:this.place().title,clientId:this.place().clientId||"",url:e})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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","color","border-color"],[1,"banner-content",3,"innerHTML"]],template:function(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"img",2),Mt("load",function(){return o.endImageLoading()})("error",function(){return o.endImageLoading()}),qe(),rn(3,SY,1,3,"fa-icon",3),qe(),Fe(4,"div",4)(5,"div",5)(6,"h1",6),Pt(7),qe(),Fe(8,"div",7)(9,"div",8),dt(10,"fa-icon",9),Fe(11,"span"),Pt(12),qe()(),rn(13,EY,6,2,"div",10),rn(14,IY,2,1,"div",11),qe(),rn(15,TY,8,1,"div",12),Fe(16,"div",13),Pt(17),qe()(),Fe(18,"div",14)(19,"div",15)(20,"button",16),Mt("click",function(){return o.navigateToRoute()}),dt(21,"fa-icon",9),Fe(22,"span"),Pt(23,"Pedestrian-friendly directions"),qe()()(),Fe(24,"div",17)(25,"a",18),Mt("click",function(){return o.logDrivingDirectionsClick()}),Pt(26,"Driving directions"),qe()()(),Fe(27,"div",19),dt(28,"div",20),rn(29,MY,2,1,"div",21),ti(30,AY,2,1,"div",22,es),ti(32,PY,3,2,"div",23,es),qe()()()),t&2&&($e(),pr("loading",o.isImageLoading()),$e(),mt("src",o.imageSrc(),Fd)("alt",o.place().title),$e(),on(o.isImageLoading()?3:-1),$e(4),Oi(o.place().title),$e(3),mt("icon",o.iconCategory()),$e(2),Oi(o.place().localizedCategory),$e(),on(o.schedule()!==""?13:-1),$e(),on(o.otherSchedulesModal()?14:-1),$e(),on(o.banners().length>0&&!o.hideDeals()?15:-1),$e(2),ri(" ",o.place().description," "),$e(4),mt("icon",o.faArrowTopRight),$e(4),mt("href",o.drivingDirectionsUrl(),Fd),$e(4),on(o.address()!==""?29:-1),$e(),ni(o.phones()),$e(2),ni(o.websites()))},dependencies:[Ln,yb],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%]{width:-webkit-fill-available;width:stretch;color:var(--definitions-colors-secondary-orange);padding:10px;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}'],changeDetection:1})};var Cp=class r{iconLibraryService=be(mn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["button","backButton",""]],decls:3,vars:1,consts:[[3,"icon"]],template:function(t,o){t&1&&(dt(0,"fa-icon",0),Fe(1,"span"),Pt(2,"Back"),qe()),t&2&&mt("icon",o.faArrowLeft)},dependencies:[Ln],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}'],changeDetection:1})};function RY(r,e){if(r&1&&dt(0,"app-profile-view",5),r&2){let t=xt(),o=Sg(6);mt("place",o)("hideDeals",t.hideDeals())}}var _b=class r{onDestroy=new kn;route=be(Ws);logger=be(Zt);loadedDataService=be(mr);sdkService=be(ts);mapService=be(Pr);markerService=be(Qi);navigatorService=be(Ni);homeStateService=be(Cr);iconLibraryService=be(mn);_profileId="";place=Rt(null);mapReady=bi(this.mapService.mapReady,{requireSync:!0});hideDeals=bt(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){tn(()=>{let e=this.place();if(e&&this.mapReady()){if(e.parentType==="Place")if(this.loadedDataService.parentPlace()===void 0){let s=this.loadedDataService.potentialParentPlaces().find(g=>g.mapvxId===e.parentId);if(s){this.loadedDataService.parentPlace.set(s),this.mapService.setParentPlace(s);let g=e.inFloors?.[0];g&&this.mapService.updateFloor(g)}}else{let u=e.inFloors?.[0];u&&this.mapService.updateFloor(u)}if(!this.markerService.hasMarker(e.mapvxId)){let o=Xi(this.homeStateService.lastListedPlaces);o.length>0?this.markerService.addMarkers(o):this.markerService.addMarker(e)}this.markerService.selectMarker(e.mapvxId),setTimeout(()=>{this.mapService.updateCamera({center:e.position})},100)}})}ngOnInit(){this.addBackListener();let e=this.route.paramMap.pipe(En(t=>t.get("id")),Jr(t=>t!==null),Jr(t=>t!==this._profileId),Rx(1));fs([e,this.loadedDataService.getAvailablePlaces()]).pipe(qi(this.onDestroy),Ri(([t,o])=>{this.logger.logEvent("page_view",{page_title:"Profile Page",page_location:`/profile/${t}`});let u=o.find(s=>s.mapvxId===t||s.clientId===t);return u?yn(u):fr(this.sdkService.getPlaceDetail(t))})).subscribe({next:t=>{this._profileId!==t.mapvxId&&this.cleanOldProfile(),this._profileId=t.mapvxId,this.place.set(t),this.loadedDataService.updateInstitution(t.parentInstitutionId),this.homeStateService.selectedInstitution.set(t.parentInstitutionId),this.homeStateService.userAction.next({type:"show-place",data:{placeId:t.mapvxId,alias:t.clientId}})},error:t=>{this.logger.log("Error getting profile id",t)},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()?.mapvxId||"",name:this.place()?.title||"",clientId:this.place()?.clientId||""}),this.navigatorService.navigateToHome()}backListener(e){this.logger.log("Back listener",e),this.returnToHome()}listener=e=>this.backListener(e);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){if(t&1&&(Fe(0,"div",0)(1,"div",1)(2,"button",2),Mt("click",function(){return o.returnToHome()}),Pt(3,"Back"),qe()(),Fe(4,"div",3)(5,"div",4),Kf(6),rn(7,RY,1,2,"app-profile-view",5),qe(),Fe(8,"div",6),dt(9,"app-map"),qe()()()),t&2){$e(6);let u=Cg(o.place());$e(),on(u!==null?7:-1)}},dependencies:[wu,Cp,vb],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}}"]})};function kY(r,e){if(r&1){let t=rr();Fe(0,"button",1),Mt("click",function(){qn(t);let u=xt();return Zn(u.pauseRoute())}),dt(1,"fa-icon",2),Fe(2,"span"),Pt(3,"Pause route"),qe()()}if(r&2){let t=xt();$e(),mt("icon",t.faPause)}}function LY(r,e){if(r&1){let t=rr();Fe(0,"button",1),Mt("click",function(){qn(t);let u=xt();return Zn(u.resumeRoute())}),dt(1,"fa-icon",2),Fe(2,"span"),Pt(3,"Resume route"),qe()()}if(r&2){let t=xt();$e(),mt("icon",t.faPlay)}}function OY(r,e){if(r&1){let t=rr();Fe(0,"button",1),Mt("click",function(){qn(t);let u=xt();return Zn(u.restartRoute())}),dt(1,"fa-icon",2),Fe(2,"span"),Pt(3,"Restart route"),qe()()}if(r&2){let t=xt();$e(),mt("icon",t.faRestart)}}function NY(r,e){}var bb=class r{logger=be(Zt);iconLibrary=be(mn);routingService=be(yl);restartRouteCallback=Co();AnimationState=K1;animationStatus=bi(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(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){if(t&1&&rn(0,kY,4,1,"button",0)(1,LY,4,1,"button",0)(2,OY,4,1,"button",0)(3,NY,0,0),t&2){let u;on((u=o.animationStatus())===o.AnimationState.Playing?0:u===o.AnimationState.Paused?1:u===o.AnimationState.Finished?2:3)}},dependencies:[Ln],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}}"],changeDetection:1})};var xb=class r{iconLibrary=be(mn);currentRoute=_n.required();startRouteClick=Co();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=bt(()=>{let e=this.currentRoute();return this.toMinutes(e.duration)});distance=bt(()=>{let e=this.currentRoute();return Math.ceil(e.length*3.28084)});toMinutes(e){return Math.ceil(e/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"span",2),Pt(3,"Time"),qe(),dt(4,"fa-icon",3),Fe(5,"span",4),Pt(6),qe()(),Fe(7,"div",1)(8,"span",2),Pt(9,"Distance"),qe(),dt(10,"fa-icon",3),Fe(11,"span",4),Pt(12),qe()()(),Fe(13,"button",5),Mt("click",function(){return o.onStartRouteClick()}),dt(14,"fa-icon",3),Fe(15,"span"),Pt(16,"Start Route"),qe()()),t&2&&($e(4),mt("icon",o.faCircleSmall),$e(2),ri("",o.time()," min"),$e(4),mt("icon",o.faCircleSmall),$e(2),ri("",o.distance()," ft"),$e(2),mt("icon",o.faArrowTopRight))},dependencies:[Ln],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}'],changeDetection:1})};var FY=new Ft("",{factory:()=>qL}),qL="always";var zY=(()=>{class r{static \u0275fac=function(o){return new(o||r)};static \u0275mod=Aa({type:r});static \u0275inj=Bs({})}return r})();var ZL=(()=>{class r{static withConfig(t){return{ngModule:r,providers:[{provide:FY,useValue:t.callSetDisabledState??qL}]}}static \u0275fac=function(o){return new(o||r)};static \u0275mod=Aa({type:r});static \u0275inj=Bs({imports:[zY]})}return r})();function BY(r,e){if(r&1){let t=rr();Fe(0,"button",5),Mt("click",function(){qn(t);let u=xt();return Zn(u.clearSelectedPlace())}),dt(1,"fa-icon",6),qe()}if(r&2){let t=xt();$e(),mt("icon",t.faXmark)}}function jY(r,e){if(r&1){let t=rr();Fe(0,"button",10),Mt("click",function(){qn(t);let u=xt(2);return Zn(u.useCurrentLocation())}),Fe(1,"div",11),dt(2,"fa-icon",6),qe(),Fe(3,"div",12)(4,"div",13),Pt(5,"Use current location"),qe()()()}if(r&2){let t=xt(2);$e(2),mt("icon",t.faLocationArrow)}}function VY(r,e){if(r&1){let t=rr();Fe(0,"button",10),Mt("click",function(){let u=qn(t).$implicit,s=xt(2);return Zn(s.selectPlace(u))}),Fe(1,"div",11),dt(2,"fa-icon",6),qe(),Fe(3,"div",12)(4,"div",13),Pt(5),qe(),Fe(6,"div",14),Pt(7),qe()()()}if(r&2){let t=e.$implicit,o=xt(2);$e(2),mt("icon",o.faLocationDot),$e(3),Oi(t.title),$e(2),Oi(t.address)}}function UY(r,e){r&1&&(Fe(0,"div",9),Pt(1,"No results found"),qe())}function $Y(r,e){if(r&1&&(Fe(0,"div",4)(1,"div",7),rn(2,jY,6,1,"button",8),ti(3,VY,8,3,"button",8,es),rn(5,UY,2,0,"div",9),qe()()),r&2){let t=xt();$e(2),on(t.allowCurrentLocation()&&t.locationPermission()!=="denied"?2:-1),$e(),ni(t.filteredPlaces()),$e(2),on(t.filteredPlaces().length===0&&t.filterText().trim()?5:-1)}}var wb=class r{logger=be(Zt);locationService=be(xu);iconLibrary=be(mn);places=_n.required();initialSelectedPlace=_n(null);allowCurrentLocation=_n(!1);placeholder=_n("Set a starting point");selectedPlace=Yi(()=>this.initialSelectedPlace());selectedPlaceChange=Co();isDropdownOpen=Rt(!1);filterText=Yi(()=>this.selectedPlace()?.title||"");filteredPlaces=bt(()=>{let e=this.places(),t=this.filterText().toLowerCase().trim();return t?e.filter(o=>o.title?.toLowerCase().includes(t)||o.address?.toLowerCase().includes(t)):e});locationPermission=Rt("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(e=>{this.locationPermission.set(e)}).catch(e=>{this.logger.logWarning("Error checking location permission",e),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(e=>{this.locationPermission.set(e),e==="granted"&&this.getCurrentLocation()}).catch(e=>{this.logger.logWarning("Error requesting location permission",e),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(e=>{this.selectedPlace.set(e),this.selectedPlaceChange.emit(e)}).catch(e=>{this.logger.logWarning("Error getting current location",e)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(e){this.selectedPlace.set(e),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(e)}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(e){let t=e.target;this.filterText.set(t.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"input",2),Mt("input",function(s){return o.onInputChange(s)})("focus",function(){return o.onInputFocus()})("blur",function(){return o.onInputBlur()}),qe(),rn(3,BY,2,1,"button",3),qe(),rn(4,$Y,6,2,"div",4),qe()),t&2&&($e(2),mt("value",o.filterText())("placeholder",o.placeholder()),$e(),on(o.selectedPlace()?3:-1),$e(),on(o.isDropdownOpen()?4:-1))},dependencies:[ZL,Ln],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}}'],changeDetection:1})};var Cb=class r{logger=be(Zt);iconLibrary=be(mn);places=_n.required();initialDestination=_n(null);originPlace=Rt(null);destinationPlace=Yi(()=>this.initialDestination());originSelected=Co();destinationSelected=Co();swapPlaces=Co();clearDestination=Co();locationPermission=Rt("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=bt(()=>NS(this.originPlace())&&NS(this.destinationPlace()));onOriginSelected(e){this.originSelected.emit(e),this.originPlace.set(e)}onDestinationSelected(e){if(Pa(e)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(e),this.destinationPlace.set(e)}onSwapPlaces(){let e=this.originPlace(),t=this.destinationPlace();if(Pa(e)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(t),this.originSelected.emit(t),this.destinationPlace.set(e),this.destinationSelected.emit(e)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),z0(),Fe(4,"svg",4),dt(5,"rect",5)(6,"path",6)(7,"path",7),qe()(),B0(),Fe(8,"app-place-selector",8),Mt("selectedPlaceChange",function(s){return o.onOriginSelected(s)}),qe()()(),Fe(9,"div",9)(10,"div",10),dt(11,"fa-icon",11),qe(),dt(12,"div",12),Fe(13,"button",13),Mt("click",function(){return o.onSwapPlaces()}),dt(14,"fa-icon",11),qe()(),Fe(15,"div",14)(16,"div",2)(17,"div",3),dt(18,"fa-icon",11),qe(),Fe(19,"app-place-selector",15),Mt("selectedPlaceChange",function(s){return o.onDestinationSelected(s)}),qe()()()()),t&2&&($e(8),mt("places",o.places())("initialSelectedPlace",o.originPlace())("allowCurrentLocation",!0),$e(3),mt("icon",o.faEllipsisVertical),$e(2),mt("disabled",!o.canSwapPlaces()),$e(),mt("icon",o.faArrowsRetweet),$e(4),mt("icon",o.faLocationDot),$e(),mt("places",o.places())("initialSelectedPlace",o.destinationPlace())("placeholder","Select a destination"))},dependencies:[wb,Ln],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}}'],changeDetection:1})};function HY(r,e){if(r&1){let t=rr();Fe(0,"div",6)(1,"app-route-info",9),Mt("startRouteClick",function(){qn(t);let u=xt();return Zn(u.startStepAnimation())}),qe()()}if(r&2){xt();let t=Sg(7);$e(),mt("currentRoute",t)}}var Sb=class r{routeId="";route=be(Ws);logger=be(Zt);navigatorService=be(Ni);loadedDataService=be(mr);mapService=be(Pr);markerService=be(Qi);homeStateService=be(Cr);routingService=be(yl);mapReady=bi(this.mapService.mapReady,{requireSync:!0});places=bi(fs([this.loadedDataService.getAvailablePlaces(),this.loadedDataService.getInstitutionId()]).pipe(En(([e,t])=>e.filter(o=>o.parentInstitutionId===t))),{initialValue:[]});originPoint=Rt(null);destinationPlace=Yi(()=>this.initialDestination());initialDestination=Rt(null);currentRoute=Rt(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",this.logger.logEvent("page_view",{page_title:"Route Page",page_location:`/route/${this.routeId}`}),tn(()=>{let e=this.places();if(e.length>0){let t=e.find(o=>o.mapvxId===this.routeId||o.clientId===this.routeId);t&&this.initialDestination.set(t)}}),tn(()=>{if(this.mapReady()){let t=Xi(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(t)}}),tn(()=>{let e=this.destinationPlace();e&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(e.mapvxId)||this.markerService.addRouteMarker(e),this.markerService.selectMarker(e.mapvxId),Xi(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:e.position})},100))}),tn(()=>{let e=this.originPoint(),t=this.destinationPlace();e&&t?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(e.position),this.markerService.addDestinationMarker(t),this.logger.logEvent("route_selected",{originId:Pa(e)?"current-location":e.mapvxId,originName:e.title,destinationId:t.mapvxId,destinationName:t.title,destinationClientId:t.clientId||"",originClientId:Pa(e)?"":e.clientId||""}),this.routingService.getRoute(e,t).then(o=>{this.currentRoute.set(o),this.routingService.startAnimatingRoute(o),this.fitMapToRoute(e,t,o)}).catch(o=>{this.logger.logWarning("Error getting route",o)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId);let e=this.originPoint(),t=this.destinationPlace();this.logger.logEvent("route_back_clicked",{destinationId:t?.mapvxId||"",destinationName:t?.title||"",destinationClientId:t?.clientId||"",originId:Pa(e)?"current-location":e?.mapvxId||"",originName:e?.title||"",originClientId:Pa(e)?"":e?.clientId||""})}onDestinationSelected(e){this.destinationPlace.set(e)}onOriginSelected(e){this.originPoint.set(e)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(e,t,o){let u=e?.position??this.originPoint()?.position,s=t?.position??this.destinationPlace()?.position,g=o??this.currentRoute(),x=document.querySelector(".route-related-components");if(u&&s&&g&&x&&this.mapReady()){let C=getComputedStyle(x),M=Number.parseInt(C.getPropertyValue("--padding-top")),T=Number.parseInt(C.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(u,s,g,{padding:{top:M,left:T,right:70,bottom:50}})},100)}}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){if(t&1&&(Fe(0,"div",0)(1,"div",1)(2,"button",2),Mt("click",function(){return o.returnToProfile()}),Pt(3,"Back"),qe()(),Fe(4,"div",3)(5,"div",4)(6,"app-route-selector",5),Mt("originSelected",function(s){return o.onOriginSelected(s)})("destinationSelected",function(s){return o.onDestinationSelected(s)}),qe(),Kf(7),rn(8,HY,2,1,"div",6),qe(),Fe(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),Mt("restartRouteCallback",function(){return o.fitMapToRoute()}),qe()()()()()),t&2){$e(6),mt("places",o.places())("initialDestination",o.initialDestination()),$e();let u=Cg(o.currentRoute());$e(),on(u!==null?8:-1)}},dependencies:[Cp,wu,Cb,xb,bb],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}"]})};var XL=[{path:"",component:tb,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:ub},{path:"search",component:fb}]},{path:"profile/:id",component:_b},{path:"route/:id",component:Sb},{path:"**",redirectTo:""}];var Eb=class{handleError(e){console.error("CustomErrorHandler",e)}};var Ib=class r extends hl{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(e){return this._baseHref+"#"+e}pushState(e,t,o,u){this._updatePath(e,o,u)}replaceState(e,t,o,u){this._updatePath(e,o,u)}forward(){}back(){}getState(){return null}historyGo(e){}onPopState(e){this._popStateListeners.push(e)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(e,t,o){this._path=t+(o?"?"+o:""),this._notifyPopState(e,t)}_notifyPopState(e,t){let o={type:"popstate",state:e,url:t,pop:!0};this._popStateListeners.forEach(u=>{try{u(o)}catch(s){console.error("Error in popstate listener:",s)}})}getCurrentPath(){return this._path}setInitialPath(e){this._path=e}static \u0275fac=function(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac,providedIn:"root"})};var YL={providers:[{provide:Qo,useClass:Eb},sS(),cE(XL),{provide:hl,useClass:Ib},C0(Nk.forRoot(Lg,[{command:"config",values:[Lg,{send_page_view:!1}]}]))]};OS(YL).then(r=>{let e=SR(eb,{injector:r.injector});customElements.define("mapvx-website",e)}).catch(r=>console.error(r));
|
|
2008
|
+
</svg>`,t}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(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var J1={term:"",results:[]};function Q1(r,e){let t=e?.injector??be(Zi),o=new zs(1),u=tn(()=>{let s;try{s=r()}catch(g){Xi(()=>o.error(g));return}Xi(()=>o.next(s))},{injector:t,manualCleanup:!0});return t.get(wo).onDestroy(()=>{u.destroy(),o.complete()}),o.asObservable()}function bi(r,e){let o=!e?.manualCleanup?e?.injector?.get(wo)??be(wo):null,u=_X(e?.equal),s;e?.requireSync?s=Rt({kind:0},{equal:u}):s=Rt({kind:1,value:e?.initialValue},{equal:u});let g,x=r.subscribe({next:C=>s.set({kind:1,value:C}),error:C=>{s.set({kind:2,error:C}),g?.()},complete:()=>{g?.()}});if(e?.requireSync&&s().kind===0)throw new St(601,!1);return g=o?.onDestroy(x.unsubscribe.bind(x)),bt(()=>{let C=s();switch(C.kind){case 1:return C.value;case 2:throw C.error;case 0:throw new St(601,!1)}},{equal:e?.equal})}function _X(r=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&r(e.value,t.value)}var Cr=class r{loadedDataService=be(mr);homePlaces=Rt([]);showCategoryFilters=Rt(!0);showCityFilter=Rt(!0);defaultToMap=Rt(!1);activeView=Yi(()=>this.defaultToMap()?"map":"grid");inputValue=Rt("");selectedInstitution=Rt("");hideDeals=Rt(!1);cardWidth=Rt(void 0);rowsPerPage=Rt(2);initialInstitutionId=Rt("");showDealLabels=Rt(!1);lastListedPlaces=Rt([]);categoryFiltersData=bi(this.loadedDataService.getInstitution().pipe(En(e=>{let t=e.properties;if(t){let o=t.filter(u=>"childPlaces"in u&&u.childPlaces!==void 0).map(u=>({placeData:"childPlaces"in u?u.childPlaces:[],name:u.title}));return o.splice(1,0,{name:"All",placeData:[]}),o}return[]})),{initialValue:[]});selectedFilter=Yi({source:this.categoryFiltersData,computation:(e,t)=>{let o=e.map(s=>s.name),u=t?.value;return u&&o.includes(u)?u:e[0]?.name??""}});selectedCity=Yi(()=>{let e=this.selectedInstitution(),t=this.loadedDataService.cityFilterOptions();return t.find(u=>u.institutionId===e)||t.length>0?t[0]:void 0});filterId=bt(()=>{let e=this.selectedCity();return e?e.filterId:this.initialInstitutionId()});currentPageIndex=Yi({source:this.selectedFilter,computation:(e,t)=>e!==t?.source?1:t?.value??1});lastCardSelected=new kn;userAction=new kn;lastSearchData=Rt(J1);static \u0275fac=function(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac})};var FL={fas:{},fak:{}},wI=[];function zL(r){Object.keys(r).forEach(function(e){if(e!=="prefix"){var t=r[e],o=t.icon[2];o.forEach(function(u){typeof u=="string"&&(FL[t.prefix][u]=t)}),FL[t.prefix][t.iconName]=t,wI.push(t)}})}zL(zE);zL(xI);var eb=class r{destroy$=new kn;apiKey=_n("");institutionId=_n("");initialData=_n("");showCategoryFilters=_n(!0,{transform:e=>typeof e=="string"?e==="true":e});showCityFilter=_n(!0,{transform:e=>typeof e=="string"?e==="true":e});defaultToMap=_n(!1,{transform:e=>typeof e=="string"?e==="true":e});inheritFontFamily=_n(!1,{transform:e=>typeof e=="string"?e==="true":e});hideDeals=_n(!1,{transform:this.transformToBoolean});showDealLabels=_n(!1,{transform:this.transformToBoolean});cardWidth=_n(void 0,{transform:e=>{if(!(e==null||e==="")){if(typeof e=="string"){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}return typeof e=="number"&&e<=0?void 0:e}}});rowsPerPage=_n(2,{transform:e=>{if(typeof e=="string"){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?2:Math.min(Math.max(t,1),10)}return e<=0?2:Math.min(Math.max(e,1),10)}});cardSelected=Co();userAction=Co();router=be(du);navigatorService=be(Ni);locationStrategy=be(hl);platformId=be(wa);logger=be(Zt);sdkService=be(ts);loadedDataService=be(mr);homeStateService=be(Cr);iconLibrary=be(py);isInitialized=!1;isConnected=!1;static instanceCount=0;static hasBeenConnected=!1;static INSTITUTION_FETCH_RETRIES=3;static INSTITUTION_FETCH_RETRY_DELAY_MS=1e3;constructor(){this.loadIcons(),this.logger.sessionStart(),tn(()=>{let e=this.apiKey();e&&e.trim()!==""&&!this.sdkService.isInitialized()&&(this.logger.log("\u{1F511} Initializing SDK with provided API key"),this.sdkService.initialize(e.trim()),this.logger.setApiKey(e.trim()),this.loadData())}),tn(()=>{this.homeStateService.initialInstitutionId.set(this.institutionId())}),tn(()=>{let e=this.showDealLabels();this.homeStateService.showDealLabels.set(e)}),tn(()=>{this.homeStateService.hideDeals.set(this.hideDeals())}),tn(()=>{this.homeStateService.cardWidth.set(this.cardWidth())}),tn(()=>{this.homeStateService.rowsPerPage.set(this.rowsPerPage())}),tn(()=>{let e=this.initialData();e&&e.trim()!==""&&this.processInitialData(e)}),tn(()=>{this.homeStateService.showCategoryFilters.set(this.showCategoryFilters())}),tn(()=>{this.homeStateService.showCityFilter.set(this.showCityFilter())}),tn(()=>{let e=this.defaultToMap();this.logger.log("====> defaultToMap input",e),this.homeStateService.defaultToMap.set(e)}),tn(()=>{let e=this.institutionId(),t=this.loadedDataService.institutionsLoaded();e&&e.trim()!==""&&t&&(this.loadedDataService.updateInstitution(e),this.logger.setInstitutionId(e))}),this.homeStateService.lastCardSelected.pipe(qi(this.destroy$)).subscribe(e=>{this.cardSelected.emit(e),this.logger.log("====> cardSelected",e)}),this.homeStateService.userAction.pipe(qi(this.destroy$)).subscribe(e=>{this.userAction.emit(e),this.logger.log("====> userAction",e)})}ngOnInit(){fl(this.platformId)?this.handleInstanceTracking():this.logger.log("\u{1F5A5}\uFE0F Componente inicializado en servidor (SSR)")}loadIcons(){this.iconLibrary.addIcons(...wI)}loadData(){this.loadPlaces(),this.loadConfiguration(),this.loadInstitution()}async loadCityFilterOptions(e){this.loadedDataService.cityFilterOptions.set(e);let t=e[0];t&&this.homeStateService.selectedInstitution.set(t.institutionId);let o=e.filter(u=>u.type==="parent-place");Promise.all(o.map(async u=>{let s=async()=>{let x=await this.sdkService.getPlaceDetail(u.parentPlaceId);this.loadedDataService.updatePotentialParentPlaces(x)},g=async()=>{let x=await this.sdkService.getSubPlaces(u.parentPlaceId);this.loadedDataService.updateAvailablePlaces(x)};await Promise.all([s(),g()])}))}transformToBoolean(e){return typeof e=="string"?e==="true":e}processInitialData(e){try{let t=JSON.parse(e);if(t.availablePlaces){let u=t.availablePlaces.map(s=>new Ji(s)).filter(s=>s.generalCategory!=="transport"&&!s.hidePlace);this.loadedDataService.updateAvailablePlaces(u),this.logger.log(`\u2705 Successfully loaded ${u.length} places from initial data`)}if(t.institutions){let o=t.institutions.map(s=>{try{return new nh(s)}catch(g){this.logger.logWarning("\u274C Error parsing institution",g);return}}).filter(s=>s!==void 0);this.loadedDataService.setInstitutions(o);let u=o.find(s=>s.mapvxId===this.institutionId());u?this.loadedDataService.setInstitution(u):this.logger.log(`\u274C Institution not found for id ${this.institutionId()}`)}}catch(t){this.logger.log("\u274C Error processing initial data",t),this.logger.log(`\u274C Data: ${e}`)}}async loadPlaces(){let e=fl(this.platformId)?"Browser":"Server";try{this.logger.log(`\u{1F4CD} Loading initial places data on ${e}...`);let t=await this.sdkService.getAvailablePlaces(),o=t.filter(u=>u.generalCategory!=="transport"&&!u.hidePlace);this.loadedDataService.updateAvailablePlaces(o),this.logger.log(`\u2705 Successfully loaded ${t.length} places on ${e}`)}catch(t){this.logger.log(`\u274C Error loading initial places data on ${e}:`,t)}}async loadConfiguration(){try{let e=await this.sdkService.getConfiguration();this.loadedDataService.setConfiguration(e);let t=e.cityOptions||[];this.loadCityFilterOptions(t),this.logger.log("\u2705 Successfully loaded configuration",e)}catch(e){this.logger.log("\u274C Error loading initial configuration",e)}}async loadInstitution(){try{let e=await this.fetchInstitutionsWithRetry(),t=e.find(o=>o.mapvxId===this.institutionId());this.loadedDataService.setInstitutions(e),t?(this.loadedDataService.setInstitution(t),this.logger.log("\u2705 Successfully loaded institution",t)):this.logger.log("\u274C Institution not found")}catch(e){this.logger.log(`\u274C Error loading institution data after ${r.INSTITUTION_FETCH_RETRIES} retries`,e)}}async fetchInstitutionsWithRetry(){let e;for(let t=0;t<=r.INSTITUTION_FETCH_RETRIES;t++)try{return await this.sdkService.getInstitutions()}catch(o){e=o,t<r.INSTITUTION_FETCH_RETRIES&&(this.logger.logWarning(`\u26A0\uFE0F Error loading institutions, retrying (${t+1}/${r.INSTITUTION_FETCH_RETRIES})`,o),await this.delay(r.INSTITUTION_FETCH_RETRY_DELAY_MS*(t+1)))}throw e}delay(e){return new Promise(t=>setTimeout(t,e))}handleInstanceTracking(){r.instanceCount++;let e=this.checkForExistingRouterContent(),t=this.router.url;r.hasBeenConnected||e||t!=="/"&&r.instanceCount===1?(this.logger.log("\u{1F504} Detectada reconexi\xF3n del web component"),this.logger.log(` - Instancia #${r.instanceCount}`),this.logger.log(` - URL del router: ${t}`),this.logger.log(` - Contenido en router outlet: ${e}`),this.handleReconnection()):this.logger.log(`\u{1F680} Primera conexi\xF3n del web component (instancia #${r.instanceCount})`),r.hasBeenConnected=!0}checkForExistingRouterContent(){try{let e=document.querySelector("router-outlet");return e?e.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(){fl(this.platformId)?requestAnimationFrame(()=>{this.initializeRouter()}):setTimeout(()=>{this.initializeRouter()},0)}initializeRouter(){if(this.isInitialized&&this.isConnected)return;this.locationStrategy.setInitialPath("/");let e=this.router.url,t=this.router.routerState.root.firstChild;e==="/"&&!t?this.router.navigateByUrl("/").then(()=>{this.isInitialized=!0}).catch(o=>{console.error("Error en navegaci\xF3n inicial:",o),this.isInitialized=!0}):this.isInitialized=!0}handleReconnection(){this.logger.log("\u{1F504} Procesando reconexi\xF3n del web component");let e=fl(this.platformId)?10:50;setTimeout(()=>{this.checkAndFixRouterSync()},e)}checkAndFixRouterSync(){if(!fl(this.platformId)){this.logger.log("\u2139\uFE0F Saltando verificaci\xF3n de sincronizaci\xF3n en servidor");return}let e=this.locationStrategy.getCurrentPath()||"/",t=this.router.url,o=this.router.routerState.root.firstChild,u=this.checkForExistingRouterContent();this.logger.log("\u{1F50D} Verificando sincronizaci\xF3n del router:"),this.logger.log(` - Path interno: "${e}"`),this.logger.log(` - Router URL: "${t}"`),this.logger.log(` - Tiene ruta activa: ${!!o}`),this.logger.log(` - Contenido en router outlet: ${u}`),e==="/"&&t!=="/"||e==="/"&&!o&&u||e==="/"&&t==="/"&&u&&!o?(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(e=>{console.error("\u274C Error en navegaci\xF3n correctiva:",e)})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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:[T_([Ni,Cr,Qi,mn,yl,xu])],decls:4,vars:2,consts:[[1,"named-container"],[1,"app-container"],[1,"app-content"]],template:function(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2),dt(3,"router-outlet"),qe()()()),t&2&&($e(),pr("inherit-font-family",o.inheritFontFamily()))},dependencies:[X1,qd],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%}"],changeDetection:1})};var bX=["categoryFilters"];function xX(r,e){if(r&1){let t=rr();Fe(0,"button",14),Mt("click",function(){qn(t);let u=xt();return Zn(u.onClearInput())}),dt(1,"fa-icon",6),qe()}if(r&2){let t=xt();$e(),mt("icon",t.faXmark)}}function wX(r,e){if(r&1&&dt(0,"fa-icon",6),r&2){let t=xt(2);mt("icon",t.faCaretUp)}}function CX(r,e){if(r&1&&dt(0,"fa-icon",6),r&2){let t=xt(2);mt("icon",t.faCaretDown)}}function SX(r,e){if(r&1){let t=rr();Fe(0,"button",21),Mt("click",function(){let u=qn(t).$implicit,s=xt(3);return Zn(s.onCitySelect(u))}),Pt(1),qe()}if(r&2){let t=e.$implicit;$e(),ri(" ",t.name," ")}}function EX(r,e){if(r&1&&(Fe(0,"div",19),ti(1,SX,2,1,"button",20,Vd),qe()),r&2){let t=xt(2);$e(),ni(t.citiesOptions())}}function IX(r,e){if(r&1){let t=rr();Fe(0,"div",9)(1,"button",15),Mt("click",function(){qn(t);let u=xt();return Zn(u.onCityFilterClick())}),dt(2,"fa-icon",6),qe(),Fe(3,"button",16),Mt("click",function(){qn(t);let u=xt();return Zn(u.onCityFilterClick())}),Fe(4,"span",17),Pt(5),qe(),Fe(6,"div",18),rn(7,wX,1,1,"fa-icon",6)(8,CX,1,1,"fa-icon",6),qe()(),rn(9,EX,3,0,"div",19),qe()}if(r&2){let t=xt();$e(),pr("active",t.isCityDropdownOpen()),$e(),mt("icon",t.faFilter),$e(3),Oi(t.selectedCity()?.name),$e(2),on(t.isCityDropdownOpen()?7:8),$e(2),on(t.isCityDropdownOpen()?9:-1)}}var tb=class r{logger=be(Zt);stateService=be(Cr);mapService=be(Pr);navigatorService=be(Ni);loadedDataService=be(mr);iconLibrary=be(mn);categoryFilters;activeView=bt(()=>this.stateService.activeView());showCityFilter=bt(()=>this.stateService.showCityFilter()&&this.citiesOptions().length>0);inputValue=bt(()=>this.stateService.inputValue());citiesOptions=bt(()=>this.loadedDataService.cityFilterOptions());selectedCity=bt(()=>this.stateService.selectedCity());isCityDropdownOpen=Rt(!1);mapReady=bi(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(){tn(()=>{if(this.stateService.activeView()==="map"&&this.mapReady()){let e=this.stateService.lastListedPlaces(),t=e.map(u=>u.inFloors?.[0]),o=this.getMostFrequentValue(t);o!==void 0&&this.mapService.updateFloor(o),setTimeout(()=>{this.mapService.fitCoordinates(e.map(u=>u.position),{padding:{top:100,left:100,right:100,bottom:100}})},100)}})}ngOnInit(){this.stateService.inputValue()!==""&&this.navigatorService.navigateToSearchView()}ngAfterViewInit(){this.readUrlParams()}readUrlParams(){let e=new URLSearchParams(location.search),t=e.get("search");if(t){this.stateService.inputValue.set(t),setTimeout(()=>{this.logger.logEvent("search_text_from_url",{term:t}),this.navigatorService.navigateToSearchView()},100);return}let o=e.get("tenant");if(o){this.logger.logEvent("profile_from_url",{id:o}),this.navigatorService.navigateToProfile(o);return}let u=e.get("destination");u&&(this.logger.logEvent("route_from_url",{id:u}),this.navigatorService.navigateToRoute(u))}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(e){let t=e.target;this.stateService.inputValue.set(t.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(e=>!e)}onCitySelect(e){if(this.stateService.selectedInstitution.set(e.institutionId),this.stateService.selectedCity.set(e),this.isCityDropdownOpen.set(!1),this.loadedDataService.updateInstitution(e.institutionId),this.logger.setInstitutionId(e.institutionId),e.type==="institution")this.mapService.removeParentPlace(),this.loadedDataService.parentPlace.set(void 0),this.logger.setParentPlaceId("");else{let o=this.loadedDataService.potentialParentPlaces().find(u=>u.mapvxId===e.parentPlaceId);o?(this.mapService.setParentPlace(o),this.loadedDataService.parentPlace.set(o),this.logger.setParentPlaceId(o.mapvxId)):(this.mapService.removeParentPlace(),this.logger.setParentPlaceId(""))}}getMostFrequentValue(e){if(e.length===0)return;let t=new Map,o=0,u;for(let s of e){if(s==null)continue;let g=(t.get(s)||0)+1;t.set(s,g),g>o&&(o=g,u=s)}return u}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-home-screen"]],viewQuery:function(t,o){if(t&1&&Zf(bX,5),t&2){let u;bg(u=xg())&&(o.categoryFilters=u.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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),dt(6,"fa-icon",6),qe(),Fe(7,"input",7),Mt("input",function(s){return o.onInputChange(s)}),qe(),rn(8,xX,2,1,"button",8),qe(),rn(9,IX,10,6,"div",9),qe(),Fe(10,"div",10)(11,"button",11),Mt("click",function(){return o.onGridClick()}),Fe(12,"div",12),dt(13,"fa-icon",6),qe(),Fe(14,"span"),Pt(15,"Grid View"),qe()(),Fe(16,"button",11),Mt("click",function(){return o.onMapClick()}),Fe(17,"div",12),dt(18,"fa-icon",6),qe(),Fe(19,"span"),Pt(20,"Map View"),qe()()()()(),Fe(21,"div",13),dt(22,"router-outlet"),qe()()),t&2&&($e(4),pr("active",o.inputValue()!==""),$e(2),mt("icon",o.faMagnifyingGlass),$e(),mt("value",o.inputValue()),$e(),on(o.inputValue()!==""?8:-1),$e(),on(o.showCityFilter()?9:-1),$e(2),pr("active",o.activeView()==="grid"),$e(2),mt("icon",o.faGrid2),$e(3),pr("active",o.activeView()==="map"),$e(2),mt("icon",o.faMapLocationDot))},dependencies:[Ln,qd],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}}"]})};function nb(r){return r.tags?.includes("deals")||r.tags?.includes("events")}function BL(r){let e="#EE5845";if(!r?.trim())return e;let o=/style\s*=\s*["']([^"']*)["']/i.exec(r);if(!o?.[1])return e;let u=o[1],g=/(?:^|;)\s*color\s*:\s*([^;]+)/i.exec(u);return DX(g?.[1])??e}function DX(r){if(!r)return null;let e=r.trim().replace(/\s*!important\s*$/i,""),t=e.toLowerCase(),o=/^#[0-9a-f]{3,8}$/i.test(e),u=/^rgba?\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i.test(e),s=/^hsla?\(\s*\d{1,3}(?:deg)?\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(?:\s*,\s*(0|1|0?\.\d+))?\s*\)$/i.test(e),g=/^[a-z]+$/i.test(e);return o||u||s||g?o?e.toUpperCase():t:null}var TX=()=>({rotate:42});function MX(r,e){if(r&1&&dt(0,"fa-icon",3),r&2){let t=xt();mt("icon",t.faCircleNotch)("transform",ac(2,TX))}}function AX(r,e){r&1&&(Fe(0,"div",4),Pt(1,"Deals + Events"),qe())}var rb=class r{logger=be(Zt);iconLibrary=be(mn);navigatorService=be(Ni);homeStateService=be(Cr);fromSearch=_n(!1);place=_n.required();hasDealsOrEvents=bt(()=>this.place().banners.some(nb));hideDeals=bt(()=>this.homeStateService.hideDeals());showDealLabels=bt(()=>this.homeStateService.showDealLabels());imageSrc=bt(()=>this.place().images[0]||this.place().logo||V_);isImageLoading=Rt(!0);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");constructor(){tn(()=>{this.imageSrc()&&this.startImageLoading()})}navigateToProfile(){let e=this.place(),t=e.mapvxId;this.homeStateService.lastCardSelected.next(t),this.navigatorService.navigateToProfile(t),this.fromSearch()?this.logger.logEvent("search_result_card_selected",{id:t,name:e.title,clientId:e.clientId||""}):this.logger.logEvent("card_selected",{id:t,name:e.title,clientId:e.clientId||""})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"button",0),Mt("click",function(){return o.navigateToProfile()}),Fe(1,"div",1)(2,"img",2),Mt("load",function(){return o.endImageLoading()})("error",function(){return o.endImageLoading()}),qe(),rn(3,MX,1,3,"fa-icon",3)(4,AX,2,0,"div",4),qe(),Fe(5,"div",5)(6,"h3",6),Pt(7),qe(),Fe(8,"p",7),Pt(9),qe(),Fe(10,"span",8),Pt(11),qe()()()),t&2&&($e(),pr("loading",o.isImageLoading()),$e(),mt("src",o.imageSrc(),Fd)("alt",o.place().title),$e(),on(o.isImageLoading()?3:o.hasDealsOrEvents()&&!o.hideDeals()&&o.showDealLabels()?4:-1),$e(4),Oi(o.place().title),$e(2),Oi(o.place().address),$e(2),Oi(o.place().localizedCategory))},dependencies:[Ln],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}"]})};var PX=["cardContainer"],RX=["*"];function kX(r,e){if(r&1&&dt(0,"app-location-card",3),r&2){let t=e.$implicit,o=xt();mt("place",t)("fromSearch",o.fromSearch())}}function LX(r,e){r&1&&sc(0)}function OX(r,e){if(r&1){let t=rr();Fe(0,"button",7),Mt("click",function(){qn(t);let u=xt(3);return Zn(u.previousPage())}),dt(1,"fa-icon",8),qe()}if(r&2){let t=xt(3);$e(),mt("icon",t.faChevronLeft)}}function NX(r,e){if(r&1&&rn(0,OX,2,1,"button",6),r&2){let t=xt().$implicit,o=xt();on(t<o.currentPageIndex()?0:-1)}}function FX(r,e){r&1&&(Fe(0,"button",9),Pt(1,"..."),qe())}function zX(r,e){if(r&1){let t=rr();Fe(0,"button",11),Mt("click",function(){qn(t);let u=xt(3);return Zn(u.nextPage())}),dt(1,"fa-icon",8),qe()}if(r&2){let t=xt(3);$e(),mt("icon",t.faChevronRight)}}function BX(r,e){if(r&1&&(rn(0,FX,2,0,"button",9),rn(1,zX,2,1,"button",10)),r&2){let t=xt().$implicit,o=xt();on(t<o.totalPages()?0:-1),$e(),on(t>o.currentPageIndex()?1:-1)}}function jX(r,e){if(r&1){let t=rr();rn(0,NX,1,1),Fe(1,"button",5),Mt("click",function(){let u=qn(t).$implicit,s=xt();return Zn(s.goToPage(u))}),Pt(2),qe(),rn(3,BX,2,2)}if(r&2){let t=e.$implicit,o=e.$index,u=e.$count,s=xt();on(o===0?0:-1),$e(),pr("active",s.currentPageIndex()===t),$e(),ri(" ",t," "),$e(),on(o===u-1?3:-1)}}var xp=class r{logger=be(Zt);stateService=be(Cr);iconLibrary=be(mn);cardContainer=R_("cardContainer");faChevronLeft=this.iconLibrary.getIconDefinition("fas","chevron-left");faChevronRight=this.iconLibrary.getIconDefinition("fas","chevron-right");fromSearch=_n(!1);places=_n.required();itemsPerPage=bt(()=>this.calculateItemsPerPage(this.showMap(),this.cardContainer(),this.stateService.cardWidth(),this.stateService.rowsPerPage()));totalPages=bt(()=>Math.ceil(this.places().length/this.itemsPerPage()));currentPageIndex=bt(()=>{let e=this.totalPages(),t=this.stateService.currentPageIndex();return e>0&&t>e?e:t});cardContainerStyles=bt(()=>{let e=this.stateService.cardWidth();return e?{"--card-width":`${e}`}:{}});pages=bt(()=>{let e=this.totalPages();switch(e){case 0:return[];case 1:return[1];case 2:return[1,2];default:{let o=this.currentPageIndex()-1;return o<1&&(o=1),o+2>e&&(o=e-2),Array.from({length:3},(u,s)=>s+o)}}});currentPagePlaces=bt(()=>{let e=this.places(),t=this.itemsPerPage(),o=this.currentPageIndex();return e.slice((o-1)*t,o*t)});showMap=bt(()=>this.stateService.activeView()==="map");constructor(){wR(()=>{let e=this.currentPageIndex();e!==this.stateService.currentPageIndex()&&this.stateService.currentPageIndex.set(e)})}calculateItemsPerPage(e,t,o,u=2){try{if(t){let s=globalThis.getComputedStyle(t.nativeElement),g=o??Number.parseInt(s.getPropertyValue("--card-width")||"0"),x=Number.parseInt(s.getPropertyValue("--card-gap")||"0"),C=g+x;if(C<=0)return u*5;let M=t.nativeElement.clientWidth,z=Math.floor((M+x)/C)*u;return Number.isFinite(z)&&z>0?z:u*5}return u*5}catch(s){return this.logger.logError("Error calculating items per page",s),u*5}}nextPage(){let e=this.currentPageIndex(),t=this.totalPages();e<t&&this.stateService.currentPageIndex.set(e+1)}previousPage(){let e=this.currentPageIndex();e>1&&this.stateService.currentPageIndex.set(e-1)}goToPage(e){this.stateService.currentPageIndex.set(e)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-paginator"]],viewQuery:function(t,o){t&1&&Xf(o.cardContainer,PX,5),t&2&&wg()},inputs:{fromSearch:[1,"fromSearch"],places:[1,"places"]},ngContentSelectors:RX,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(t,o){t&1&&(oc(),Fe(0,"div",1)(1,"div",2,0),ti(3,kX,1,2,"app-location-card",3,es,!1,LX,1,0),qe(),Fe(6,"div",4),ti(7,jX,4,5,null,null,Vd),qe()()),t&2&&(pr("with-map",o.showMap()),$e(),pr("with-map",o.showMap()),mt("ngStyle",o.cardContainerStyles()),$e(2),ni(o.currentPagePlaces()),$e(4),ni(o.pages()))},dependencies:[Tg,ES,rb,Ln],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}']})};var ib=class r{onDestroy=new kn;iconLibrary=be(mn);mapService=be(Pr);logger=be(Zt);loadedDataService=be(mr);faCenter=this.iconLibrary.getIconDefinition("fak","center");ngOnDestroy(){this.onDestroy.next(),this.onDestroy.complete()}onClick(){this.logger.logEvent("map_center_button_clicked");let e=this.mapService.rotation.getValue();this.loadedDataService.getConfiguration().pipe(Fo(1),qi(this.onDestroy)).subscribe({next:t=>{this.mapService.updateCamera({center:t.initialCenter,zoom:t.initialZoom,pitch:t.initialPitch??0,bearing:e})},error:t=>{this.logger.logWarning("Error centering map",t)}})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-center-map-button"]],decls:2,vars:1,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(t,o){t&1&&(Fe(0,"button",0),Mt("click",function(){return o.onClick()}),dt(1,"fa-icon",1),qe()),t&2&&($e(),mt("icon",o.faCenter))},dependencies:[Ln],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)}"]})};var VX=r=>({rotate:r}),ob=class r{mapService=be(Pr);iconLibrary=be(mn);rotation=bi(this.mapService.rotation.asObservable().pipe(En(e=>360-e)),{initialValue:0});faCompass=this.iconLibrary.getIconDefinition("fak","compass");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-compass-button"]],decls:2,vars:4,consts:[[1,"button"],[3,"icon","transform"]],template:function(t,o){t&1&&(Fe(0,"button",0),dt(1,"fa-icon",1),qe()),t&2&&($e(),mt("icon",o.faCompass)("transform",oS(2,VX,o.rotation())))},dependencies:[Ln],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)}"]})};var sb=class r{iconLibrary=be(mn);locationService=be(xu);logger=be(Zt);markerService=be(Qi);mapService=be(Pr);locationPermission=Rt("prompt");active=bt(()=>this.locationService.currentlyWatchingLocation());mapReady=bi(this.mapService.mapReady.asObservable(),{initialValue:!1});positionSubscription;bearingSubscription;faLocation=this.iconLibrary.getIconDefinition("fas","location-arrow");constructor(){this.checkLocationPermission(),tn(()=>{this.mapReady()?this.active()?(this.positionSubscription=this.locationService.currentLocation.asObservable().subscribe({next:e=>{this.logger.log("location",e),e!=null&&(this.markerService.hasCurrentLocationMarker?this.markerService.updateCurrentLocationMarker(e.position):this.markerService.addCurrentLocationMarker(e.position))},error:e=>{this.logger.logWarning("Error updating current location marker position",e)}}),this.bearingSubscription=fs([this.locationService.currentBearing.asObservable(),this.mapService.rotation.asObservable()]).subscribe({next:([e,t])=>{this.logger.log("bearing",e),this.logger.log("maprotation",t);let u=(e??0)-t;if(this.logger.log("markerRotation",u),this.markerService.hasCurrentLocationMarker){let s=this.markerService.getCurrentLocationMarkerElement();s!=null&&(s.style.transform=`rotate(${u}deg)`)}},error:e=>{this.logger.logWarning("Error updating current location marker rotation",e)}})):(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(e=>{this.locationPermission.set(e),e==="granted"&&this.active()&&this.locationService.startWatching()}).catch(e=>{this.logger.logWarning("Error checking location permission",e),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(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-location-button"]],decls:2,vars:3,consts:[[1,"button",3,"click"],[3,"icon"]],template:function(t,o){t&1&&(Fe(0,"button",0),Mt("click",function(){return o.onClick()}),dt(1,"fa-icon",1),qe()),t&2&&(pr("active",o.active()),$e(),mt("icon",o.faLocation))},dependencies:[Ln],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}"]})};var ab=class r{logger=be(Zt);mapService=be(Pr);iconLibrary=be(mn);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(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"button",1),Mt("click",function(){return o.onZoomIn()}),dt(2,"fa-icon",2),qe(),Fe(3,"button",3),Mt("click",function(){return o.onZoomOut()}),dt(4,"fa-icon",2),qe()()),t&2&&($e(2),mt("icon",o.faPlus),$e(2),mt("icon",o.faMinus))},dependencies:[Ln],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)}"]})};var lb=class r{static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-buttons-container"]],decls:5,vars:0,consts:[[1,"buttons-container-wrapper"]],template:function(t,o){t&1&&(Fe(0,"div",0),dt(1,"app-location-button")(2,"app-compass-button")(3,"app-center-map-button")(4,"app-zoom-buttons"),qe())},dependencies:[ob,ib,ab,sb],styles:[".buttons-container-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:20px}"]})};function UX(r,e){if(r&1){let t=rr();Fe(0,"button",4),Mt("click",function(){let u=qn(t).$implicit,s=xt(3);return Zn(s.selectFloor(u))}),Pt(1),qe()}if(r&2){let t=e.$implicit;$e(),ri(" ",t.name," ")}}function $X(r,e){if(r&1&&(Fe(0,"div",2),ti(1,UX,2,1,"button",3,es),qe()),r&2){let t=xt(2);$e(),ni(t.floors())}}function HX(r,e){if(r&1){let t=rr();Fe(0,"button",0),Mt("click",function(){qn(t);let u=xt();return Zn(u.toggleFloorSelector())}),Fe(1,"span"),Pt(2),qe(),dt(3,"fa-icon",1),qe(),rn(4,$X,3,0,"div",2)}if(r&2){let t=xt();$e(2),Oi(t.selectedFloor().name),$e(),mt("icon",t.showFloorOptions()?t.caretUp:t.caretDown),$e(),on(t.showFloorOptions()?4:-1)}}var cb=class r{loadedDataService=be(mr);mapService=be(Pr);iconLibrary=be(mn);parentPlace=bt(()=>this.loadedDataService.parentPlace());floors=bt(()=>this.parentPlace()?.innerFloors??[]);currentFloorId=bt(()=>this.mapService.currentFloorId());selectedFloor=bt(()=>this.floors().find(e=>e.key===this.currentFloorId())??this.floors()[0]);showFloorOptions=Rt(!1);caretDown=this.iconLibrary.getIconDefinition("fas","caret-down");caretUp=this.iconLibrary.getIconDefinition("fas","caret-up");toggleFloorSelector(){this.showFloorOptions.update(e=>!e)}selectFloor(e){this.showFloorOptions.set(!1),this.mapService.updateFloor(e.key)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&rn(0,HX,5,3),t&2&&on(o.floors().length>0?0:-1)},dependencies:[Ln],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)}"],changeDetection:1})};var GX=["map"],WX=["*"];function qX(r,e){r&1&&dt(0,"app-floor-selector",3)}var wu=class r{mapRef;logger=be(Zt);mapService=be(Pr);markerService=be(Qi);routingService=be(yl);loadedDataService=be(mr);showFloorSelector=bt(()=>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(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-map"]],viewQuery:function(t,o){if(t&1&&Zf(GX,5),t&2){let u;bg(u=xg())&&(o.mapRef=u.first)}},ngContentSelectors:WX,decls:6,vars:1,consts:[["map",""],[1,"map-wrapper"],["id","map"],[1,"floor-selector"],[1,"buttons-container"]],template:function(t,o){t&1&&(oc(),Fe(0,"div",1),dt(1,"div",2,0),rn(3,qX,1,0,"app-floor-selector",3),dt(4,"app-buttons-container",4),sc(5),qe()),t&2&&($e(3),on(o.showFloorSelector()?3:-1))},dependencies:[lb,cb],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}"]})};var ZX=["*"];function XX(r,e){r&1&&(Fe(0,"div",2),dt(1,"app-map"),qe())}var wp=class r{stateService=be(Cr);showMap=bt(()=>this.stateService.activeView()==="map");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-view-container"]],ngContentSelectors:ZX,decls:4,vars:3,consts:[[1,"view-container"],[1,"view-content"],[1,"map-container"]],template:function(t,o){t&1&&(oc(),Fe(0,"div",0)(1,"div",1),sc(2),qe(),rn(3,XX,2,0,"div",2),qe()),t&2&&($e(),pr("with-map",o.showMap()),$e(2),on(o.showMap()?3:-1))},dependencies:[wu],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}}"]})};var YX=["categoryFilters"],KX=(r,e)=>e.name;function JX(r,e){if(r&1){let t=rr();Fe(0,"button",11),Mt("click",function(){let u=qn(t).$implicit,s=xt(2);return Zn(s.updateSelectedFilter(u.name))}),Pt(1),qe()}if(r&2){let t=e.$implicit,o=xt(2);pr("active",o.selectedFilter()===t.name),$e(),ri(" ",t.name," ")}}function QX(r,e){if(r&1&&(Fe(0,"div",2)(1,"div",5,0)(3,"div",6),ti(4,JX,2,3,"button",7,KX),qe(),Fe(6,"div",8),dt(7,"div",9)(8,"div",10),qe()()()),r&2){let t=xt();$e(4),ni(t.categoryFiltersData()),$e(4),Yf("left",t.indicatorPosition(),"px")}}var ub=class r{logger=be(Zt);stateService=be(Cr);loadedDataService=be(mr);markerService=be(Qi);categoryFilters=R_("categoryFilters");activeView=bt(()=>this.stateService.activeView());loadedPlaces=bi(this.loadedDataService.getAvailablePlaces(),{initialValue:[]});categoryFiltersData=bt(()=>this.stateService.categoryFiltersData());places=Yi(()=>this.loadedPlaces());selectedFilter=bt(()=>this.stateService.selectedFilter());selectedInstitution=bt(()=>this.stateService.selectedInstitution());selectedCity=bt(()=>this.stateService.selectedCity());showCategoryFilters=bt(()=>this.stateService.showCategoryFilters());showCityFilter=bt(()=>this.stateService.showCityFilter());indicatorPosition=Rt(0);constructor(){tn(()=>{let e=this.activeView();this.logger.logEvent("page_view",{page_title:"List Page",page_location:`/list?view=${e}`})}),tn(()=>{let e=this.categoryFiltersData();if(this.logger.log("====> loadedCategoryFiltersData",e),e.length>0){let t=e.map(o=>o.name);this.readFilterFromUrl(t)}}),tn(()=>{if(this.activeView()==="map"){let e=this.places();this.logger.log("====> addMarkers ",e),this.markerService.addMarkers(e)}}),tn(()=>{let e=this.loadedPlaces(),t=this.showCategoryFilters(),o=e.filter(s=>s.visibility==="public");if(this.showCityFilter()){let g=this.selectedCity()?.filterId??"";g!==""&&(o=o.filter(x=>x.parentInstitutionId===g))}if(t){let s=this.selectedFilter(),g=this.categoryFiltersData();if(s!=="All"){let x=g.find(C=>C.name===s)?.placeData||[];o=o.filter(C=>x.includes(C.mapvxId))}}o.sort((s,g)=>s.title.trim().localeCompare(g.title.trim())),this.logger.log("====> filteredPlaces",o),this.places.set(o)}),tn(()=>{let e=this.places();this.stateService.lastListedPlaces.set(e)}),tn(()=>{let e=this.selectedFilter(),t=this.categoryFiltersData(),o=this.categoryFilters();this.showCategoryFilters()&&o?requestAnimationFrame(()=>{let s=this.getIndicatorPosition(e,t,o);this.indicatorPosition.set(s)}):this.indicatorPosition.set(0)})}readFilterFromUrl(e){let o=new URLSearchParams(location.search).get("tab");o&&e.includes(o)&&this.stateService.selectedFilter.set(o)}getIndicatorPosition(e,t,o){if(o==null)return 0;let u=o.nativeElement.querySelectorAll(".category-btn");if(u.length===0)return 0;let s=t.findIndex(V=>V.name===e);if(s===-1||s>=u.length)return 0;let g=u[s];if(!g)return 0;let x=o.nativeElement.getBoundingClientRect(),C=g.getBoundingClientRect(),M=C.width,T=C.left-x.left,z=80,N=T+M/2-z/2;return Math.min(Math.max(0,N),x.width-z)}updateSelectedFilter(e){this.stateService.selectedFilter.set(e),this.stateService.userAction.next({type:"select-filter",data:{filter:e}}),this.logger.logEvent("filter_selected",{filter:e})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-list-view"]],viewQuery:function(t,o){t&1&&Xf(o.categoryFilters,YX,5),t&2&&wg()},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(t,o){t&1&&(Fe(0,"div",1),rn(1,QX,9,2,"div",2),Fe(2,"app-view-container")(3,"div",3),dt(4,"app-paginator",4),qe()()()),t&2&&($e(),on(o.showCategoryFilters()?1:-1),$e(3),mt("places",o.places()))},dependencies:[wp,xp],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%}"]})};var eY=()=>({rotate:42}),db=class r{iconLibrary=be(mn);faCircleNotch=this.iconLibrary.getIconDefinition("fas","circle-notch");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1),dt(2,"fa-icon",2),qe(),Fe(3,"div",3),dt(4,"div",4)(5,"div",5)(6,"div",6),qe()()),t&2&&($e(2),mt("icon",o.faCircleNotch)("transform",ac(2,eY)))},dependencies:[Ln],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)}"],changeDetection:1})};var tY=()=>[1,2,3,4,5,6,7,8,9,10];function nY(r,e){r&1&&dt(0,"app-loading-location-card")}var hb=class r{homeStateService=be(Cr);showMap=bt(()=>this.homeStateService.activeView()==="map");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["app-loading-card-list"]],decls:3,vars:3,consts:[[1,"loading-container"]],template:function(t,o){t&1&&(Fe(0,"div",0),ti(1,nY,1,0,"app-loading-location-card",null,Vd),qe()),t&2&&(pr("with-map",o.showMap()),$e(),ni(ac(2,tY)))},dependencies:[db],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}"],changeDetection:1})};function rY(r,e){r&1&&(Fe(0,"p"),Pt(1,"Looking for your results..."),qe())}function iY(r,e){if(r&1&&(Fe(0,"p"),Pt(1),qe()),r&2){let t=xt(3);$e(),ri('Showing 1 result for "',t.searchTerm(),'"')}}function oY(r,e){if(r&1&&(Fe(0,"p"),Pt(1),qe()),r&2){let t=xt(3);$e(),D_("Showing ",t.places().length,' results for "',t.searchTerm(),'"')}}function sY(r,e){if(r&1&&rn(0,iY,2,1,"p")(1,oY,2,2,"p"),r&2){let t=xt(2);on(t.places().length===1?0:1)}}function aY(r,e){if(r&1&&(Fe(0,"p"),Pt(1),qe()),r&2){let t=xt(2);$e(),ri('No results found for "',t.searchTerm(),'"')}}function lY(r,e){if(r&1&&rn(0,sY,2,1)(1,aY,2,1,"p"),r&2){let t=xt();on(t.places().length>0?0:1)}}function cY(r,e){r&1&&dt(0,"app-loading-card-list")}function uY(r,e){if(r&1&&(Fe(0,"div",6)(1,"app-paginator",7)(2,"div",8),dt(3,"fa-icon",4),Fe(4,"h2"),Pt(5,"No results found"),qe(),Fe(6,"div",9)(7,"p"),Pt(8,"Sorry, we can\u2019t find any places that match your search. Please try again."),qe()()()()()),r&2){let t=xt();$e(),mt("places",t.places())("fromSearch",!0),$e(2),mt("icon",t.faBuildingMagnifyingGlass)}}var fb=class r{logger=be(Zt);loadedDataService=be(mr);sdkService=be(ts);stateService=be(Cr);navigatorService=be(Ni);markerService=be(Qi);iconLibrary=be(mn);searching=Yi(()=>this.stateService.lastSearchData().term==="");inputValue$=Q1(this.stateService.inputValue).pipe(Tx(500),En(e=>e.trim()),Jr(e=>e!==""),Mx());searchTerm=bi(this.inputValue$,{initialValue:this.stateService.lastSearchData().term});places=bi(fs([Q1(this.stateService.filterId),this.inputValue$,Q1(this.stateService.lastSearchData)]).pipe(Ri(([e,t,o])=>o.term===t?(this.logger.log("====> lastSearchData",o),this.searching.set(!1),yn(o.results)):(this.searching.set(!0),this.logger.log("====> searchTerm",t),this.logger.logEvent("search",{term:t,searchInstitutionId:e}),this.logger.log("====> institutionId",e),fr(this.sdkService.searchPlaces(t,e)))),zo(e=>{this.searching.set(!1),e.length>0?this.logger.logEvent("search_results",{resultsCount:e.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"}),tn(()=>{let e=this.places();this.markerService.addMarkers(e)}),tn(()=>{let e=this.places();this.stateService.lastListedPlaces.set(e)}),tn(()=>{let e=this.searching();this.logger.log("====> searching",e)}),tn(()=>{let e=this.searchTerm();e&&this.stateService.userAction.next({type:"search",data:{searchTerm:e}})})}ngOnDestroy(){this.stateService.inputValue()===""?(this.logger.log("====> EMPTY_SEARCH_DATA"),this.stateService.lastSearchData.set(J1)):(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(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2)(3,"button",3),Mt("click",function(){return o.onBackClick()}),dt(4,"fa-icon",4),Fe(5,"span"),Pt(6,"Back"),qe()()(),Fe(7,"div",5),rn(8,rY,2,0,"p")(9,lY,2,1),qe()(),Fe(10,"app-view-container"),rn(11,cY,1,0,"app-loading-card-list")(12,uY,9,3,"div",6),qe()()),t&2&&($e(4),mt("icon",o.faArrowLeft),$e(4),on(o.searching()?8:9),$e(3),on(o.searching()?11:12))},dependencies:[wp,xp,X1,Ln,hb],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}']})};function pb(r){switch(r){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 gb(r){switch(r.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 dY(r){switch(r){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 mb(r){let[e,t]=r.split(":"),o=parseInt(e)%24,u=parseInt(t),s;return o<12?(s="AM",o===0&&(o=12)):(s="PM",o!==12&&(o-=12)),`${o}:${u<10?"0":""}${u} ${s}`}function UL(r){let e=mb(r.open),t=mb(r.close);return`${e} - ${t}`}function hY(r){let e=mb(r.open),t=mb(r.close);return`${e} to ${t}`}function fY(r){let e=new Date,t=new Date(e);$L(t);let o=gb(t),u=r[o];if(u&&u.length>0){for(let s of u)if(jL(s.open)&&jL(s.close)){let g=VL(s.open,t),x=VL(s.close,t);if(g>x&&pY(x),e>=g&&e<=x)return!0}}return!1}function $L(r){let e=r.getDate();r.setDate(e-1)}function pY(r){let e=r.getDate();r.setDate(e+1)}function mY(r){let t=gb(new Date),o=r[t];return o&&o.length>0}function jL(r){return/^([0-9]|0[0-9]|1[0-9]|2[0-4]):[0-5][0-9]$/.test(r)}function VL(r,e){let[t,o]=r.split(":").map(Number),u=e?new Date(e):new Date;return new Date(u.getFullYear(),u.getMonth(),u.getDate(),t,o,0,0)}function gY(r){return r.sort((e,t)=>e.open.localeCompare(t.open))}function yY(r){let t=gb(new Date),o=r[t];return o&&o.length>0?HL(o):""}function vY(r){let e=new Date;$L(e);let t=gb(e),o=r[t];return o&&o.length>0?HL(o):""}function _Y(r){let e=bY(r);return`Open on ${pb(e)}`}function HL(r){return r.length===1?UL(r[0]):(gY(r),r.map(hY).join(" - "))}function bY(r){let t=new Date().getDay();for(let o=0;o<7;o++){let u=(t+o)%7,s=dY(u),g=r[s];if(g&&g.length>0)return s}return"mo"}function GL(r){return fY(r)?vY(r):mY(r)?yY(r):_Y(r)}function WL(r){let e=["mo","tu","we","th","fr","sa","su"],t=x=>{let C=r[x];return!C||C.length===0?["Closed"]:C.map(M=>UL(M))},o=(x,C)=>x.length!==C.length?!1:x.every((M,T)=>M===C[T]),u=(x,C)=>x===C?pb(x):`${pb(x)} - ${pb(C)}`,s=[],g=0;for(;g<e.length;){let x=e[g],C=t(x),M=g+1;for(;M<e.length&&o(C,t(e[M]));)M++;let T=u(x,e[M-1]);s.push({day:T,schedule:C}),g=M}if(s.length>1){let x=s[0],C=s[s.length-1];if(o(x.schedule,C.schedule)){let M=x.day.split(" - "),z=C.day.split(" - ")[0],N=M.length>1?M[1]:M[0],V=`${z} - ${N}`;s[0]={day:V,schedule:x.schedule},s.pop()}}return s}function xY(r,e){if(r&1&&dt(0,"div",9),r&2){let t=e.$implicit;mt("innerHTML",t,su)}}function wY(r,e){if(r&1&&(Fe(0,"div",6)(1,"div",7),Pt(2),qe(),Fe(3,"div",8),ti(4,xY,1,1,"div",9,es),qe()()),r&2){let t=e.$implicit;$e(2),Oi(t.day),$e(2),ni(t.schedule)}}var yb=class r{iconLibrary=be(mn);schedules=_n.required({transform:e=>e?WL(e):[]});closeClicked=Co();faClockThree=this.iconLibrary.getIconDefinition("fas","clock-three");faXmark=this.iconLibrary.getIconDefinition("fas","xmark");hideModal(){this.closeClicked.emit()}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2),dt(3,"fa-icon",3),Fe(4,"h2"),Pt(5,"Other Schedules"),qe()(),Fe(6,"button",4),Mt("click",function(){return o.hideModal()}),dt(7,"fa-icon",3),qe()(),Fe(8,"div",5),ti(9,wY,6,1,"div",6,es),qe()()),t&2&&($e(3),mt("icon",o.faClockThree),$e(4),mt("icon",o.faXmark),$e(2),ni(o.schedules()))},dependencies:[Ln],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}}"],changeDetection:1})};var CY=()=>({rotate:42});function SY(r,e){if(r&1&&dt(0,"fa-icon",3),r&2){let t=xt();mt("icon",t.faCircleNotch)("transform",ac(2,CY))}}function EY(r,e){if(r&1){let t=rr();Fe(0,"div",10),dt(1,"fa-icon",9),Fe(2,"div",24)(3,"button",25),Mt("click",function(){qn(t);let u=xt();return Zn(u.showOtherSchedulesModal())}),qe(),Fe(4,"div",26),Pt(5,"*Hours may vary"),qe()()()}if(r&2){let t=xt();$e(),mt("icon",t.faClockThree),$e(2),mt("innerHTML",t.schedule(),su)}}function IY(r,e){if(r&1){let t=rr();Fe(0,"div",11)(1,"app-other-schedules",27),Mt("closeClicked",function(){qn(t);let u=xt();return Zn(u.hideOtherSchedulesModal())}),qe()()}if(r&2){let t=xt();$e(),mt("schedules",t.place().openingHours)}}function DY(r,e){if(r&1&&dt(0,"div",32),r&2){let t=e.$implicit;Yf("color",t.color)("border-color",t.color),mt("innerHTML",t.description,su)}}function TY(r,e){if(r&1&&(Fe(0,"div",12)(1,"div",28),dt(2,"fa-icon",9),Fe(3,"div",29),Pt(4,"Deals + Events"),qe()(),Fe(5,"div",30),ti(6,DY,1,5,"div",31,es),qe()()),r&2){let t=xt();$e(2),mt("icon",t.faBadgeDollar),$e(4),ni(t.banners())}}function MY(r,e){if(r&1&&(Fe(0,"div",21),Pt(1),qe()),r&2){let t=xt();$e(),ri(" ",t.address()," ")}}function AY(r,e){if(r&1&&(Fe(0,"div",22),Pt(1),qe()),r&2){let t=e.$implicit;$e(),ri(" ",t," ")}}function PY(r,e){if(r&1){let t=rr();Fe(0,"div",23)(1,"a",18),Mt("click",function(){let u=qn(t).$implicit,s=xt();return Zn(s.logWebsiteClick(u.url))}),Pt(2),qe()()}if(r&2){let t=e.$implicit;$e(),mt("href",t.url,Fd),$e(),Oi(t.title)}}var vb=class r{iconLibrary=be(mn);sanitizer=be(kg);logger=be(Zt);navigatorService=be(Ni);stateService=be(Cr);place=_n.required();hideDeals=_n(!1);imageSrc=bt(()=>this.place().images[0]||this.place().logo||V_);isImageLoading=Rt(!0);schedule=bt(()=>{let e=this.place().openingHours;return e?GL(e):""});banners=bt(()=>this.place().banners.filter(nb).filter(e=>e.description!==void 0).map(e=>({description:this.sanitizer.bypassSecurityTrustHtml(e.description||""),color:BL(e.description||"")})));address=bt(()=>this.place().address||"");phones=bt(()=>this.place().properties?.filter(e=>e.type==="phone").map(e=>this.formatPhoneNumber(e.subtitle))||[]);websites=bt(()=>this.place().properties?.filter(e=>e.type==="url").map(this.prepareUrl)||[]);drivingDirectionsUrl=bt(()=>{let e=this.place();return`https://www.google.com/maps/dir/?api=1&destination=${e.position.lat},${e.position.lng}&travelmode=driving`});otherSchedulesModal=Rt(!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=bt(()=>{let[e,t]=Y1(this.place().localizedCategory||"");return this.iconLibrary.getIconDefinition(e,t)});constructor(){tn(()=>{this.imageSrc()&&this.startImageLoading()})}prepareUrl(e){return xn(ht({},e),{url:e.url?.startsWith("http")?e.url:`https://${e.url}`})}startImageLoading(){this.isImageLoading.set(!0)}endImageLoading(){this.isImageLoading.set(!1)}showOtherSchedulesModal(){this.otherSchedulesModal.set(!0)}hideOtherSchedulesModal(){this.otherSchedulesModal.set(!1)}formatPhoneNumber(e){let t=e.replace(/^\+1/,"");return t=t.replaceAll(/\D/g,""),t.length<10?(this.logger.logWarning(`Phone number '${t}' is to short for format`),t):`${t.slice(0,3)}.${t.slice(3,6)}.${t.slice(6)}`}navigateToRoute(){this.stateService.userAction.next({type:"select-destination",data:{destinationId:this.place().mapvxId,alias:this.place().clientId}}),this.logger.logEvent("pedestrian_directions_selected",{id:this.place().mapvxId,name:this.place().title,clientId:this.place().clientId||""}),this.navigatorService.navigateToRoute(this.place().mapvxId)}logDrivingDirectionsClick(){this.logger.logEvent("driving_directions_clicked",{id:this.place().mapvxId,name:this.place().title,clientId:this.place().clientId||"",url:this.drivingDirectionsUrl()})}logWebsiteClick(e){e&&this.logger.logEvent("profile_website_clicked",{id:this.place().mapvxId,name:this.place().title,clientId:this.place().clientId||"",url:e})}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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","color","border-color"],[1,"banner-content",3,"innerHTML"]],template:function(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"img",2),Mt("load",function(){return o.endImageLoading()})("error",function(){return o.endImageLoading()}),qe(),rn(3,SY,1,3,"fa-icon",3),qe(),Fe(4,"div",4)(5,"div",5)(6,"h1",6),Pt(7),qe(),Fe(8,"div",7)(9,"div",8),dt(10,"fa-icon",9),Fe(11,"span"),Pt(12),qe()(),rn(13,EY,6,2,"div",10),rn(14,IY,2,1,"div",11),qe(),rn(15,TY,8,1,"div",12),Fe(16,"div",13),Pt(17),qe()(),Fe(18,"div",14)(19,"div",15)(20,"button",16),Mt("click",function(){return o.navigateToRoute()}),dt(21,"fa-icon",9),Fe(22,"span"),Pt(23,"Pedestrian-friendly directions"),qe()()(),Fe(24,"div",17)(25,"a",18),Mt("click",function(){return o.logDrivingDirectionsClick()}),Pt(26,"Driving directions"),qe()()(),Fe(27,"div",19),dt(28,"div",20),rn(29,MY,2,1,"div",21),ti(30,AY,2,1,"div",22,es),ti(32,PY,3,2,"div",23,es),qe()()()),t&2&&($e(),pr("loading",o.isImageLoading()),$e(),mt("src",o.imageSrc(),Fd)("alt",o.place().title),$e(),on(o.isImageLoading()?3:-1),$e(4),Oi(o.place().title),$e(3),mt("icon",o.iconCategory()),$e(2),Oi(o.place().localizedCategory),$e(),on(o.schedule()!==""?13:-1),$e(),on(o.otherSchedulesModal()?14:-1),$e(),on(o.banners().length>0&&!o.hideDeals()?15:-1),$e(2),ri(" ",o.place().description," "),$e(4),mt("icon",o.faArrowTopRight),$e(4),mt("href",o.drivingDirectionsUrl(),Fd),$e(4),on(o.address()!==""?29:-1),$e(),ni(o.phones()),$e(2),ni(o.websites()))},dependencies:[Ln,yb],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%]{width:-webkit-fill-available;width:stretch;color:var(--definitions-colors-secondary-orange);padding:10px;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}'],changeDetection:1})};var Cp=class r{iconLibraryService=be(mn);faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,selectors:[["button","backButton",""]],decls:3,vars:1,consts:[[3,"icon"]],template:function(t,o){t&1&&(dt(0,"fa-icon",0),Fe(1,"span"),Pt(2,"Back"),qe()),t&2&&mt("icon",o.faArrowLeft)},dependencies:[Ln],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}'],changeDetection:1})};function RY(r,e){if(r&1&&dt(0,"app-profile-view",5),r&2){let t=xt(),o=Sg(6);mt("place",o)("hideDeals",t.hideDeals())}}var _b=class r{onDestroy=new kn;route=be(Ws);logger=be(Zt);loadedDataService=be(mr);sdkService=be(ts);mapService=be(Pr);markerService=be(Qi);navigatorService=be(Ni);homeStateService=be(Cr);iconLibraryService=be(mn);_profileId="";place=Rt(null);mapReady=bi(this.mapService.mapReady,{requireSync:!0});hideDeals=bt(()=>this.homeStateService.hideDeals());faArrowLeft=this.iconLibraryService.getIconDefinition("fas","arrow-left");constructor(){tn(()=>{let e=this.place();if(e&&this.mapReady()){if(e.parentType==="Place")if(this.loadedDataService.parentPlace()===void 0){let s=this.loadedDataService.potentialParentPlaces().find(g=>g.mapvxId===e.parentId);if(s){this.loadedDataService.parentPlace.set(s),this.mapService.setParentPlace(s);let g=e.inFloors?.[0];g&&this.mapService.updateFloor(g)}}else{let u=e.inFloors?.[0];u&&this.mapService.updateFloor(u)}if(!this.markerService.hasMarker(e.mapvxId)){let o=Xi(this.homeStateService.lastListedPlaces);o.length>0?this.markerService.addMarkers(o):this.markerService.addMarker(e)}this.markerService.selectMarker(e.mapvxId),setTimeout(()=>{this.mapService.updateCamera({center:e.position})},100)}})}ngOnInit(){this.addBackListener();let e=this.route.paramMap.pipe(En(t=>t.get("id")),Jr(t=>t!==null),Jr(t=>t!==this._profileId),Rx(1));fs([e,this.loadedDataService.getAvailablePlaces()]).pipe(qi(this.onDestroy),Ri(([t,o])=>{this.logger.logEvent("page_view",{page_title:"Profile Page",page_location:`/profile/${t}`});let u=o.find(s=>s.mapvxId===t||s.clientId===t);return u?yn(u):fr(this.sdkService.getPlaceDetail(t))})).subscribe({next:t=>{this._profileId!==t.mapvxId&&this.cleanOldProfile(),this._profileId=t.mapvxId,this.place.set(t),this.loadedDataService.updateInstitution(t.parentInstitutionId),this.homeStateService.selectedInstitution.set(t.parentInstitutionId),this.homeStateService.userAction.next({type:"show-place",data:{placeId:t.mapvxId,alias:t.clientId}})},error:t=>{this.logger.log("Error getting profile id",t)},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()?.mapvxId||"",name:this.place()?.title||"",clientId:this.place()?.clientId||""}),this.navigatorService.navigateToHome()}backListener(e){this.logger.log("Back listener",e),this.returnToHome()}listener=e=>this.backListener(e);addBackListener(){globalThis.addEventListener("popstate",this.listener)}removeBackListener(){globalThis.removeEventListener("popstate",this.listener)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){if(t&1&&(Fe(0,"div",0)(1,"div",1)(2,"button",2),Mt("click",function(){return o.returnToHome()}),Pt(3,"Back"),qe()(),Fe(4,"div",3)(5,"div",4),Kf(6),rn(7,RY,1,2,"app-profile-view",5),qe(),Fe(8,"div",6),dt(9,"app-map"),qe()()()),t&2){$e(6);let u=Cg(o.place());$e(),on(u!==null?7:-1)}},dependencies:[wu,Cp,vb],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}}"]})};function kY(r,e){if(r&1){let t=rr();Fe(0,"button",1),Mt("click",function(){qn(t);let u=xt();return Zn(u.pauseRoute())}),dt(1,"fa-icon",2),Fe(2,"span"),Pt(3,"Pause route"),qe()()}if(r&2){let t=xt();$e(),mt("icon",t.faPause)}}function LY(r,e){if(r&1){let t=rr();Fe(0,"button",1),Mt("click",function(){qn(t);let u=xt();return Zn(u.resumeRoute())}),dt(1,"fa-icon",2),Fe(2,"span"),Pt(3,"Resume route"),qe()()}if(r&2){let t=xt();$e(),mt("icon",t.faPlay)}}function OY(r,e){if(r&1){let t=rr();Fe(0,"button",1),Mt("click",function(){qn(t);let u=xt();return Zn(u.restartRoute())}),dt(1,"fa-icon",2),Fe(2,"span"),Pt(3,"Restart route"),qe()()}if(r&2){let t=xt();$e(),mt("icon",t.faRestart)}}function NY(r,e){}var bb=class r{logger=be(Zt);iconLibrary=be(mn);routingService=be(yl);restartRouteCallback=Co();AnimationState=K1;animationStatus=bi(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(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){if(t&1&&rn(0,kY,4,1,"button",0)(1,LY,4,1,"button",0)(2,OY,4,1,"button",0)(3,NY,0,0),t&2){let u;on((u=o.animationStatus())===o.AnimationState.Playing?0:u===o.AnimationState.Paused?1:u===o.AnimationState.Finished?2:3)}},dependencies:[Ln],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}}"],changeDetection:1})};var xb=class r{iconLibrary=be(mn);currentRoute=_n.required();startRouteClick=Co();faCircleSmall=this.iconLibrary.getIconDefinition("fas","circle-small");faArrowTopRight=this.iconLibrary.getIconDefinition("fak","arrow-top-right");time=bt(()=>{let e=this.currentRoute();return this.toMinutes(e.duration)});distance=bt(()=>{let e=this.currentRoute();return Math.ceil(e.length*3.28084)});toMinutes(e){return Math.ceil(e/60)}onStartRouteClick(){this.startRouteClick.emit()}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"span",2),Pt(3,"Time"),qe(),dt(4,"fa-icon",3),Fe(5,"span",4),Pt(6),qe()(),Fe(7,"div",1)(8,"span",2),Pt(9,"Distance"),qe(),dt(10,"fa-icon",3),Fe(11,"span",4),Pt(12),qe()()(),Fe(13,"button",5),Mt("click",function(){return o.onStartRouteClick()}),dt(14,"fa-icon",3),Fe(15,"span"),Pt(16,"Start Route"),qe()()),t&2&&($e(4),mt("icon",o.faCircleSmall),$e(2),ri("",o.time()," min"),$e(4),mt("icon",o.faCircleSmall),$e(2),ri("",o.distance()," ft"),$e(2),mt("icon",o.faArrowTopRight))},dependencies:[Ln],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}'],changeDetection:1})};var FY=new Ft("",{factory:()=>qL}),qL="always";var zY=(()=>{class r{static \u0275fac=function(o){return new(o||r)};static \u0275mod=Aa({type:r});static \u0275inj=Bs({})}return r})();var ZL=(()=>{class r{static withConfig(t){return{ngModule:r,providers:[{provide:FY,useValue:t.callSetDisabledState??qL}]}}static \u0275fac=function(o){return new(o||r)};static \u0275mod=Aa({type:r});static \u0275inj=Bs({imports:[zY]})}return r})();function BY(r,e){if(r&1){let t=rr();Fe(0,"button",5),Mt("click",function(){qn(t);let u=xt();return Zn(u.clearSelectedPlace())}),dt(1,"fa-icon",6),qe()}if(r&2){let t=xt();$e(),mt("icon",t.faXmark)}}function jY(r,e){if(r&1){let t=rr();Fe(0,"button",10),Mt("click",function(){qn(t);let u=xt(2);return Zn(u.useCurrentLocation())}),Fe(1,"div",11),dt(2,"fa-icon",6),qe(),Fe(3,"div",12)(4,"div",13),Pt(5,"Use current location"),qe()()()}if(r&2){let t=xt(2);$e(2),mt("icon",t.faLocationArrow)}}function VY(r,e){if(r&1){let t=rr();Fe(0,"button",10),Mt("click",function(){let u=qn(t).$implicit,s=xt(2);return Zn(s.selectPlace(u))}),Fe(1,"div",11),dt(2,"fa-icon",6),qe(),Fe(3,"div",12)(4,"div",13),Pt(5),qe(),Fe(6,"div",14),Pt(7),qe()()()}if(r&2){let t=e.$implicit,o=xt(2);$e(2),mt("icon",o.faLocationDot),$e(3),Oi(t.title),$e(2),Oi(t.address)}}function UY(r,e){r&1&&(Fe(0,"div",9),Pt(1,"No results found"),qe())}function $Y(r,e){if(r&1&&(Fe(0,"div",4)(1,"div",7),rn(2,jY,6,1,"button",8),ti(3,VY,8,3,"button",8,es),rn(5,UY,2,0,"div",9),qe()()),r&2){let t=xt();$e(2),on(t.allowCurrentLocation()&&t.locationPermission()!=="denied"?2:-1),$e(),ni(t.filteredPlaces()),$e(2),on(t.filteredPlaces().length===0&&t.filterText().trim()?5:-1)}}var wb=class r{logger=be(Zt);locationService=be(xu);iconLibrary=be(mn);places=_n.required();initialSelectedPlace=_n(null);allowCurrentLocation=_n(!1);placeholder=_n("Set a starting point");selectedPlace=Yi(()=>this.initialSelectedPlace());selectedPlaceChange=Co();isDropdownOpen=Rt(!1);filterText=Yi(()=>this.selectedPlace()?.title||"");filteredPlaces=bt(()=>{let e=this.places(),t=this.filterText().toLowerCase().trim();return t?e.filter(o=>o.title?.toLowerCase().includes(t)||o.address?.toLowerCase().includes(t)):e});locationPermission=Rt("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(e=>{this.locationPermission.set(e)}).catch(e=>{this.logger.logWarning("Error checking location permission",e),this.locationPermission.set("denied")})}requestLocationPermission(){this.locationService.requestLocationPermission().then(e=>{this.locationPermission.set(e),e==="granted"&&this.getCurrentLocation()}).catch(e=>{this.logger.logWarning("Error requesting location permission",e),this.locationPermission.set("denied")})}getCurrentLocation(){this.locationService.getCurrentLocation().then(e=>{this.selectedPlace.set(e),this.selectedPlaceChange.emit(e)}).catch(e=>{this.logger.logWarning("Error getting current location",e)})}useCurrentLocation(){switch(this.locationPermission()){case"granted":this.getCurrentLocation();break;case"prompt":this.requestLocationPermission();break}}selectPlace(e){this.selectedPlace.set(e),this.isDropdownOpen.set(!1),this.selectedPlaceChange.emit(e)}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(e){let t=e.target;this.filterText.set(t.value),this.isDropdownOpen.set(!0)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"input",2),Mt("input",function(s){return o.onInputChange(s)})("focus",function(){return o.onInputFocus()})("blur",function(){return o.onInputBlur()}),qe(),rn(3,BY,2,1,"button",3),qe(),rn(4,$Y,6,2,"div",4),qe()),t&2&&($e(2),mt("value",o.filterText())("placeholder",o.placeholder()),$e(),on(o.selectedPlace()?3:-1),$e(),on(o.isDropdownOpen()?4:-1))},dependencies:[ZL,Ln],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}}'],changeDetection:1})};var Cb=class r{logger=be(Zt);iconLibrary=be(mn);places=_n.required();initialDestination=_n(null);originPlace=Rt(null);destinationPlace=Yi(()=>this.initialDestination());originSelected=Co();destinationSelected=Co();swapPlaces=Co();clearDestination=Co();locationPermission=Rt("prompt");faLocationDot=this.iconLibrary.getIconDefinition("fas","location-dot");faEllipsisVertical=this.iconLibrary.getIconDefinition("fas","ellipsis-vertical");faArrowsRetweet=this.iconLibrary.getIconDefinition("fas","arrows-retweet");canSwapPlaces=bt(()=>NS(this.originPlace())&&NS(this.destinationPlace()));onOriginSelected(e){this.originSelected.emit(e),this.originPlace.set(e)}onDestinationSelected(e){if(Pa(e)){this.logger.logWarning("Current location is not allowed as destination");return}this.destinationSelected.emit(e),this.destinationPlace.set(e)}onSwapPlaces(){let e=this.originPlace(),t=this.destinationPlace();if(Pa(e)){this.logger.logWarning("Should not be possible to swap places with current location as origin");return}this.originPlace.set(t),this.originSelected.emit(t),this.destinationPlace.set(e),this.destinationSelected.emit(e)}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){t&1&&(Fe(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),z0(),Fe(4,"svg",4),dt(5,"rect",5)(6,"path",6)(7,"path",7),qe()(),B0(),Fe(8,"app-place-selector",8),Mt("selectedPlaceChange",function(s){return o.onOriginSelected(s)}),qe()()(),Fe(9,"div",9)(10,"div",10),dt(11,"fa-icon",11),qe(),dt(12,"div",12),Fe(13,"button",13),Mt("click",function(){return o.onSwapPlaces()}),dt(14,"fa-icon",11),qe()(),Fe(15,"div",14)(16,"div",2)(17,"div",3),dt(18,"fa-icon",11),qe(),Fe(19,"app-place-selector",15),Mt("selectedPlaceChange",function(s){return o.onDestinationSelected(s)}),qe()()()()),t&2&&($e(8),mt("places",o.places())("initialSelectedPlace",o.originPlace())("allowCurrentLocation",!0),$e(3),mt("icon",o.faEllipsisVertical),$e(2),mt("disabled",!o.canSwapPlaces()),$e(),mt("icon",o.faArrowsRetweet),$e(4),mt("icon",o.faLocationDot),$e(),mt("places",o.places())("initialSelectedPlace",o.destinationPlace())("placeholder","Select a destination"))},dependencies:[wb,Ln],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}}'],changeDetection:1})};function HY(r,e){if(r&1){let t=rr();Fe(0,"div",6)(1,"app-route-info",9),Mt("startRouteClick",function(){qn(t);let u=xt();return Zn(u.startStepAnimation())}),qe()()}if(r&2){xt();let t=Sg(7);$e(),mt("currentRoute",t)}}var Sb=class r{routeId="";route=be(Ws);logger=be(Zt);navigatorService=be(Ni);loadedDataService=be(mr);mapService=be(Pr);markerService=be(Qi);homeStateService=be(Cr);routingService=be(yl);mapReady=bi(this.mapService.mapReady,{requireSync:!0});places=bi(fs([this.loadedDataService.getAvailablePlaces(),this.loadedDataService.getInstitutionId()]).pipe(En(([e,t])=>e.filter(o=>o.parentInstitutionId===t))),{initialValue:[]});originPoint=Rt(null);destinationPlace=Yi(()=>this.initialDestination());initialDestination=Rt(null);currentRoute=Rt(null);constructor(){this.routeId=this.route.snapshot.params.id||"unknown",this.logger.logEvent("page_view",{page_title:"Route Page",page_location:`/route/${this.routeId}`}),tn(()=>{let e=this.places();if(e.length>0){let t=e.find(o=>o.mapvxId===this.routeId||o.clientId===this.routeId);t&&this.initialDestination.set(t)}}),tn(()=>{if(this.mapReady()){let t=Xi(this.homeStateService.lastListedPlaces);this.markerService.addRouteMarkers(t)}}),tn(()=>{let e=this.destinationPlace();e&&this.mapReady()&&(this.markerService.deselectMarkers(),this.markerService.hasMarker(e.mapvxId)||this.markerService.addRouteMarker(e),this.markerService.selectMarker(e.mapvxId),Xi(this.originPoint)===null&&setTimeout(()=>{this.mapService.updateCamera({center:e.position})},100))}),tn(()=>{let e=this.originPoint(),t=this.destinationPlace();e&&t?this.mapReady()&&(this.markerService.removeAllMarkers(),this.markerService.addOriginMarker(e.position),this.markerService.addDestinationMarker(t),this.logger.logEvent("route_selected",{originId:Pa(e)?"current-location":e.mapvxId,originName:e.title,destinationId:t.mapvxId,destinationName:t.title,destinationClientId:t.clientId||"",originClientId:Pa(e)?"":e.clientId||""}),this.routingService.getRoute(e,t).then(o=>{this.currentRoute.set(o),this.routingService.startAnimatingRoute(o),this.fitMapToRoute(e,t,o)}).catch(o=>{this.logger.logWarning("Error getting route",o)})):this.currentRoute.set(null)})}returnToProfile(){this.navigatorService.navigateToProfile(this.routeId);let e=this.originPoint(),t=this.destinationPlace();this.logger.logEvent("route_back_clicked",{destinationId:t?.mapvxId||"",destinationName:t?.title||"",destinationClientId:t?.clientId||"",originId:Pa(e)?"current-location":e?.mapvxId||"",originName:e?.title||"",originClientId:Pa(e)?"":e?.clientId||""})}onDestinationSelected(e){this.destinationPlace.set(e)}onOriginSelected(e){this.originPoint.set(e)}startStepAnimation(){this.currentRoute()&&this.logger.log("Starting step animation")}fitMapToRoute(e,t,o){let u=e?.position??this.originPoint()?.position,s=t?.position??this.destinationPlace()?.position,g=o??this.currentRoute(),x=document.querySelector(".route-related-components");if(u&&s&&g&&x&&this.mapReady()){let C=getComputedStyle(x),M=Number.parseInt(C.getPropertyValue("--padding-top")),T=Number.parseInt(C.getPropertyValue("--padding-left"));setTimeout(()=>{this.mapService.fitRoute(u,s,g,{padding:{top:M,left:T,right:70,bottom:50}})},100)}}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=zt({type:r,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(t,o){if(t&1&&(Fe(0,"div",0)(1,"div",1)(2,"button",2),Mt("click",function(){return o.returnToProfile()}),Pt(3,"Back"),qe()(),Fe(4,"div",3)(5,"div",4)(6,"app-route-selector",5),Mt("originSelected",function(s){return o.onOriginSelected(s)})("destinationSelected",function(s){return o.onDestinationSelected(s)}),qe(),Kf(7),rn(8,HY,2,1,"div",6),qe(),Fe(9,"div",7)(10,"app-map")(11,"app-route-control-button",8),Mt("restartRouteCallback",function(){return o.fitMapToRoute()}),qe()()()()()),t&2){$e(6),mt("places",o.places())("initialDestination",o.initialDestination()),$e();let u=Cg(o.currentRoute());$e(),on(u!==null?8:-1)}},dependencies:[Cp,wu,Cb,xb,bb],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}"]})};var XL=[{path:"",component:tb,children:[{path:"list",redirectTo:"",pathMatch:"full"},{path:"",component:ub},{path:"search",component:fb}]},{path:"profile/:id",component:_b},{path:"route/:id",component:Sb},{path:"**",redirectTo:""}];var Eb=class{handleError(e){console.error("CustomErrorHandler",e)}};var Ib=class r extends hl{_path="";_baseHref;_popStateListeners=[];constructor(){super(),this._baseHref=this.getBaseHref()}path(){return this._path}prepareExternalUrl(e){return this._baseHref+"#"+e}pushState(e,t,o,u){this._updatePath(e,o,u)}replaceState(e,t,o,u){this._updatePath(e,o,u)}forward(){}back(){}getState(){return null}historyGo(e){}onPopState(e){this._popStateListeners.push(e)}getBaseHref(){return typeof document<"u"?document.querySelector("base")?.href??"/":"/"}_updatePath(e,t,o){this._path=t+(o?"?"+o:""),this._notifyPopState(e,t)}_notifyPopState(e,t){let o={type:"popstate",state:e,url:t,pop:!0};this._popStateListeners.forEach(u=>{try{u(o)}catch(s){console.error("Error in popstate listener:",s)}})}getCurrentPath(){return this._path}setInitialPath(e){this._path=e}static \u0275fac=function(t){return new(t||r)};static \u0275prov=At({token:r,factory:r.\u0275fac,providedIn:"root"})};var YL={providers:[{provide:Qo,useClass:Eb},sS(),cE(XL),{provide:hl,useClass:Ib},C0(Nk.forRoot(Lg,[{command:"config",values:[Lg,{send_page_view:!1}]}]))]};OS(YL).then(r=>{let e=SR(eb,{injector:r.injector});customElements.define("mapvx-website",e)}).catch(r=>console.error(r));
|
|
2009
2009
|
/*! Bundled license information:
|
|
2010
2010
|
|
|
2011
2011
|
maplibre-gl/dist/maplibre-gl.js:
|