PageSourceSearch

https://treep.app/_next/static/chunks/32mugzl6jmwzo.js

js treep.app collected 2026-09-24 13:43:50 UTC 25,904 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82602,44132,40034,e=>{"use strict";var t=e.i(99428);e.s(["DepartureBoardRounded",()=>t.DepartureBoardGlyph],82602);var l=e.i(77983);e.s(["FastfoodRounded",()=>l.FastfoodGlyph],44132);var n=e.i(66124);e.s(["FitnessCenterRounded",()=>n.FitnessCenterGlyph],40034)},72104,e=>{"use strict";var t=e.i(22060);e.s(["HistoryRounded",()=>t.HistoryGlyph])},47991,e=>{"use strict";var t=e.i(9194);e.s(["HomeRounded",()=>t.HomeGlyph])},93607,e=>{"use strict";var t=e.i(8882);e.s(["LocationOnRounded",()=>t.PlaceGlyph])},9451,e=>{"use strict";var t=e.i(43476);e.i(99887);var l=e.i(5955),l=l,n=e.i(19455),o=e.i(59619),r=e.i(75157);e.i(28856);var i=e.i(41074),a=e.i(15044),s=e.i(17031);e.s(["MenuButton",0,function({tone:e="primary",className:c}){let d=(0,a.useOverlayStore)(e=>e.openOverlay),u=(0,i.useEngagementStore)(e=>e.dismissMenuNotification),p=(0,i.useEngagementStore)(e=>e.showMenuNotification);return s.tenant.flags.showMenu?(0,t.jsxs)(n.Button,{variant:"ghost",size:"icon","aria-label":"Menu",className:(0,r.cn)("relative shrink-0",c),onClick:()=>{u(),(0,o.logEvent)("drawer_menu_open",{from:"menu_button"}),d("menu")},children:[(0,t.jsx)(l.NotesGlyph,{className:"grey"===e?"text-icon-grey":"text-icon-primary-light"}),p&&(0,t.jsx)("span",{"aria-hidden":"true",className:"bg-destructive absolute top-1.5 right-1.5 size-1.5 rounded-full"})]}):null}],9451)},77865,7409,e=>{"use strict";var t=e.i(43476);e.i(99887);var l=e.i(35199);e.s(["CheckCircleOutlineRounded",()=>l.CheckCircleOutlineGlyph],7409);var l=l,n=e.i(56558),o=e.i(75157);let r={ok:{Glyph:l.CheckCircleOutlineGlyph,color:"var(--color-status-ok)"},warn:{Glyph:n.ErrorRounded,color:"var(--color-status-warn)"},alert:{Glyph:n.ErrorRounded,color:"var(--color-status-alert)"}};e.s(["StatusIcon",0,function({status:e,size:l=24,backing:n=!1,label:i,className:a}){let{Glyph:s,color:c}=r[e],d=(0,t.jsx)(s,{size:l,style:{color:c},role:void 0===i?void 0:"img","aria-label":i,"aria-hidden":void 0===i||void 0,className:n?void 0:a});return n?(0,t.jsx)("span",{title:i,className:(0,o.cn)("inline-flex items-center justify-center rounded-full bg-white",a),style:{width:l,height:l},children:d}):void 0===i?d:(0,t.jsx)("span",{title:i,children:d})}],77865)},75169,e=>{"use strict";var t=e.i(43476),l=e.i(66027),n=e.i(33412);e.i(46190);var o=e.i(68209);e.i(28856);var r=e.i(87764),i=e.i(75931);function a({children:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"desktop:hidden absolute inset-x-0 top-0 z-(--z-map-overlay)",children:(0,t.jsx)(n.MobileSearchCard,{})}),(0,t.jsxs)("div",{className:"desktop:flex pointer-events-none absolute top-4 left-4 z-(--z-map-overlay) hidden h-[calc(100%-32px)] w-[450px] flex-col gap-4",children:[(0,t.jsx)("div",{className:"pointer-events-auto shrink-0",children:(0,t.jsx)(n.DesktopSearchCard,{})}),(0,t.jsx)("div",{className:"pointer-events-auto flex min-h-0 flex-1 flex-col",children:e})]})]})}e.s(["HomeLines",0,function({lines:e,cityId:l}){return(0,t.jsx)(a,{children:(0,t.jsx)(i.LinesScreen,{lines:e,cityId:l,variant:"home"})})},"HomeLinesClient",0,function(){let e=(0,r.useCityStore)(e=>e.cityId),{data:n,isPending:s}=(0,l.useQuery)((0,o.linesQuery)(e));return(0,t.jsx)(a,{children:(0,t.jsx)(i.LinesScreen,{lines:n??[],cityId:e,isLoading:s,variant:"home"})})}])},27213,e=>{"use strict";var t=e.i(43476);e.i(85269);var l=e.i(22831);e.i(99887);var n=e.i(32099),n=n,o=e.i(39915),r=e.i(19455),i=e.i(71645),a=e.i(59619);e.i(28856);var s=e.i(10849),c=e.i(99467);e.s(["LineFavoriteButton",0,function({line:e,cityId:d,className:u}){let p,m,h,x,y,{t:f}=(0,l.useTranslation)(),{isFavorite:g,toggle:v}=(p=(0,s.useUserStore)(e=>e.favoriteLines),m=(0,s.useUserStore)(e=>e.addFavoriteLine),h=(0,s.useUserStore)(e=>e.removeFavoriteLine),x=(0,i.useCallback)(e=>p.some(t=>t.lineId===e),[p]),y=(0,i.useCallback)(e=>{if(null===d)return;let t=(0,c.lineLabel)(e),l={route_id:e.route_id,route_short_name:e.route_short_name??null};if(x(e.route_id)){h(e.route_id),(0,a.logEvent)("fav_line_removed",l);return}(0,a.logEvent)("fav_line_added",l),m({lineId:e.route_id,cityId:d,name:t,color:e.route_color??null,addedAt:new Date().toISOString()})},[m,d,x,h]),{isFavorite:x,toggle:y}),b=g(e.route_id);return(0,t.jsx)(r.Button,{type:"button",variant:"ghost",size:"icon","aria-pressed":b,"aria-label":f("lines.add_to_favorites"),title:b?void 0:f("lines.add_to_favorites"),onClick:()=>{v(e)},className:u,children:b?(0,t.jsx)(o.FavoriteRounded,{className:"text-status-alert"}):(0,t.jsx)(n.FavoriteBorderGlyph,{className:"text-icon-grey"})})}],27213)},42207,e=>{"use strict";var t=e.i(43476),l=e.i(22016);e.i(85269);
1var n=e.i(22831),o=e.i(77865),r=e.i(41217),i=e.i(59619),a=e.i(99467),s=e.i(27213);function c(e,t){let l=`/routes/${t}/${encodeURIComponent(e.route_id)}`,n=e.shape_id?.trim();return n?`${l}/${encodeURIComponent(n)}`:l}e.s(["LineItem",0,function({line:e,cityId:d,iconUrl:u,hasOperatorNews:p=!1}){let{t:m}=(0,n.useTranslation)(),h=(0,a.routeColor)(e.route_color);return(0,t.jsxs)("li",{className:"relative",children:[(0,t.jsxs)(l.default,{href:c(e,d),onClick:()=>{(0,i.logEvent)("line_details",{from:"lines",route_id:e.route_id,route_short_name:e.route_short_name??null,route_type:e.route_type??null,transport_type_id:e.transport_type_id??e.transport_type?.transport_type_id??null})},className:"bg-card shadow-card desktop:mt-2.5 desktop:mr-4 desktop:mb-0 desktop:shadow-none focus-visible:ring-ring mb-[5px] flex h-12 w-full items-center gap-4 rounded-lg py-3 pr-14 pl-2.5 focus-visible:ring-2 focus-visible:outline-none",children:[(0,t.jsx)(r.TransportGlyph,{iconUrl:u,color:h,size:32,radius:10,glyphSize:27}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"text-foreground desktop:text-lg desktop:font-normal block truncate text-sm font-semibold",children:(0,a.lineLabel)(e)}),e.route_desc?(0,t.jsx)("span",{className:"desktop:text-sm desktop:text-text-grey block truncate text-[10px] text-black/60",children:e.route_desc}):null]}),(0,t.jsx)(o.StatusIcon,{status:p?"warn":"ok",label:m(p?"lines.active_alert_or_detour":"lines.line_without_delays"),className:"shrink-0"})]}),(0,t.jsx)(s.LineFavoriteButton,{line:e,cityId:d,className:"desktop:right-1 desktop:bottom-1 absolute right-2 bottom-2"})]})},"lineItemHref",0,c])},75931,e=>{"use strict";var t=e.i(43476),l=e.i(22016),n=e.i(71645),o=e.i(66027);e.i(85269);var r=e.i(22831);e.i(99887);var i=e.i(78130),a=e.i(90938),s=e.i(24143),c=e.i(45999),d=e.i(15358),u=e.i(2747);e.i(47641);var p=e.i(37564),m=e.i(76127);e.i(46190);var h=e.i(29881),x=e.i(70481),y=e.i(75157);e.i(28856);var f=e.i(10849),g=e.i(17031),v=e.i(42207),b=e.i(34330),_=e.i(44644),_=_,k=e.i(41217);function j({types:e,value:l,onChange:n}){var o;let{t:i}=(0,r.useTranslation)(),a=(o=i("lines.transport_types.all"),[...e.map(e=>({id:e.transport_type_id,label:e.name??"",iconUrl:e.flat_icon??null})),{id:0,label:o,iconUrl:null}]);return(0,t.jsx)("div",{className:"flex items-center gap-3 overflow-x-auto px-4",children:a.map(e=>{let o=e.id===l;return(0,t.jsxs)("button",{type:"button","aria-pressed":o,onClick:()=>{n(e.id)},className:(0,y.cn)("flex h-8 shrink-0 items-center gap-1.5 border-b-2 text-sm font-normal outline-none",o?"border-primary text-primary":"text-icon-grey border-transparent"),children:[null===e.iconUrl?(0,t.jsx)(_.AllInclusiveGlyph,{"aria-hidden":!0,className:"size-6"}):(0,t.jsx)(k.TransportGlyph,{iconUrl:e.iconUrl,size:24}),e.label]},e.id)})})}function N({message:e}){return(0,t.jsx)("p",{className:"px-4 py-3 text-center text-base text-[#cfcfcf]",children:e})}function w(){let e=Array.from({length:10},(e,l)=>(0,t.jsxs)("li",{className:"bg-card shadow-card desktop:mt-2.5 desktop:mr-4 desktop:mb-0 desktop:shadow-none mb-[5px] flex h-12 w-full items-center gap-4 roun
1ded-lg py-3 pr-14 pl-2.5",children:[(0,t.jsx)(u.Skeleton,{className:"size-8 shrink-0 rounded-[10px]"}),(0,t.jsx)(u.Skeleton,{className:"h-4 min-w-0 flex-1 rounded"})]},l));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("ul",{className:"desktop:hidden flex flex-col",children:e}),(0,t.jsx)(S,{title:null,children:e})]})}function S({title:e,children:l}){return(0,t.jsxs)("section",{className:"desktop:block desktop:border-divider desktop:last:border-b-0 mb-4 hidden border-b p-4 last:mb-0",children:[null===e?null:(0,t.jsx)("h2",{className:"text-foreground mb-[18px] text-lg font-normal",children:e}),(0,t.jsx)("ul",{className:"flex flex-col",children:l})]})}e.s(["LinesScreen",0,function({lines:e,cityId:u,isLoading:_=!1,variant:k="page"}){let R="home"===k,{t:C}=(0,r.useTranslation)(),{name:L,transportTypes:T}=(0,m.useCityConfig)(),[F,I]=(0,n.useState)(""),z=(0,f.useUserStore)(e=>e.transportationType),G=(0,f.useUserStore)(e=>e.setTransportationType),O=(0,f.useUserStore)(e=>e.favoriteLines),M=null==u?null:{city_id:u},{data:P}=(0,o.useQuery)({...(0,h.operatorGtfsAlertsQuery)(M),refetchInterval:h.OPERATOR_NEWS_REFRESH_MS}),{data:B}=(0,o.useQuery)({...(0,h.operatorDetoursQuery)(M),refetchInterval:h.OPERATOR_NEWS_REFRESH_MS}),E=(0,n.useMemo)(()=>{let t=new Set;for(let l of(0,b.listedLines)(e))(0,h.operatorNewsAffectsRoute)(P,B,l)&&t.add(l.route_id);return t},[e,P,B]),A=(0,n.useMemo)(()=>(0,b.availableTransportTypes)(T,e),[e,T]),U=(0,n.useMemo)(()=>new Map(T.map(e=>[e.transport_type_id,e.flat_icon??null])),[T]),H=0===z||A.some(e=>e.transport_type_id===z)?z:0,$=(0,n.useMemo)(()=>{let t=(0,b.normalizeTerm)(F);return(0,x.prioritizeEscobarComunalLines)((0,b.listedLines)(e).filter(e=>(0===H||(0,b.transportTypeIdOf)(e)===H)&&(0,b.matchesTerm)(e,t)))},[e,H,F]),K=(0,n.useMemo)(()=>new Set(O.map(e=>e.lineId)),[O]),D=$.filter(e=>K.has(e.route_id)),Q=$.filter(e=>!K.has(e.route_id)),W=[...D,...Q],q=0===H?(0,b.groupLinesByTransportType)(Q,g.tenant.sortRouteTypeId):(0,b.groupLinesByAgency)(Q),J=e=>null===u?null:e.map(e=>{let l;return(0,t.jsx)(v.LineItem,{line:e,cityId:u,iconUrl:(null===(l=(0,b.transportTypeIdOf)(e))?null:U.get(l)??null)??e.transport_type?.flat_icon??null,hasOperatorNews:E.has(e.route_id)},e.route_id)});return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("section",{className:(0,y.cn)("flex flex-col overflow-hidden",R?"bg-card shadow-card desktop:shadow-panel desktop:mx-0 mx-4 min-h-0 flex-1 rounded-2xl":"bg-background desktop:inset-auto desktop:top-4 desktop:left-4 desktop:h-[calc(100%-32px)] desktop:w-[450px] desktop:gap-4 desktop:bg-transparent absolute inset-0 z-(--z-map-overlay)"),children:[(0,t.jsxs)("div",{className:(0,y.cn)("desktop:hidden shrink-0",R?"px-4 pt-3":"bg-background"),children:[R?null:(0,t.jsx)(d.PageHeader,{title:C("lines.header.title"),backHref:"/",backLabel:C("search.back")}),(0,t.jsx)("div",{className:R?void 0:"px-4",children:(0,t.jsx)(p.PickerSearchField,{value:F,onChange:I,placeholder:C("lines.autocomplete.placeholder")})}),A.length>0?(0,t.jsx)("div",{className:(0,y.cn)(R?"mt-3":"mt-4 pb-4"),children:(0,t.jsx)(j,{types:A,value:H,onChange:G})}):null]}),(0,t.jsxs)("div",{className:(0,y.cn)("desktop:block hidden shrink-0",R?"pt-4":"bg-card shadow-panel rounded-2xl py-4"),children:[R?null:(0,t.jsxs)("div",{className:"flex items-center px-2",children:[(0,t.jsx)(l.default,{href:"/","aria-label":C("search.back"),className:"text-icon-grey inline-flex size-10 items-center justify-center rounded-full hover:bg-black/[0.04]",children:(0,t.jsx)(i.ArrowBackRounded,{className:"size-6"})}),(0,t.jsx)("span",{className:"flex min-w-0 flex-1 items-center justify-center",children:(0,t.jsx)(c.TenantLogo,{className:"h-[38px] max-w-40"})}),(0,t.jsxs)("span",{className:"text-text-grey inline-flex max-w-[40%] items-center gap-1 truncate pr-2 text-sm",children:[(0,t.jsx)(a.PlaceRounded,{"aria-hidden":!0,className:"text-icon-grey size-4 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:L??g.tenant.appName})]})]}),(0,t.jsx)("div",{className:(0,y.cn)("px-4",R?void 0:"mt-3"),children:(0,t.jsxs)("label",{className:"border-outline flex h-10 items-center gap-2 rounded-lg border px-3",children:[(0,t.jsx)(s.SearchRounded,{"aria-hidden":!0,
1className:"text-icon-grey size-5 shrink-0"}),(0,t.jsx)("input",{type:"text",value:F,onChange:e=>{I(e.target.value)},placeholder:C("lines.autocomplete.alternative_placeholder"),"aria-label":C("lines.autocomplete.alternative_placeholder"),className:"text-foreground min-w-0 flex-1 bg-transparent text-base outline-none"})]})}),A.length>0?(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)(j,{types:A,value:H,onChange:G})}):null]}),(0,t.jsxs)("div",{className:(0,y.cn)("desktop:[scrollbar-gutter:stable] desktop:px-0 min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain px-4",R?"mt-3 px-4":"bg-background desktop:bg-card desktop:rounded-2xl desktop:shadow-panel"),children:[_?(0,t.jsx)(w,{}):0===$.length?(0,t.jsx)(N,{message:C("lines.helper_text")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("ul",{className:"desktop:hidden flex flex-col",children:J(W)}),D.length>0?(0,t.jsx)(S,{title:C("lines.favorites.title"),children:J(D)}):null,q.map(e=>(0,t.jsx)(S,{title:e.name,children:J(e.lines)},e.id))]}),R?null:(0,t.jsx)("div",{"aria-hidden":!0,className:"desktop:hidden",style:{height:"calc(56px + env(safe-area-inset-bottom, 0px))"}})]})]})})}],75931)},1691,e=>{"use strict";e.i(99887);var t=e.i(82602),l=e.i(44132),n=e.i(39915),o=e.i(40034),r=e.i(72104),i=e.i(47991),a=e.i(36027),a=a,s=e.i(71957),s=s,c=e.i(34750),c=c,d=e.i(92875),u=e.i(87379),u=u,p=e.i(65216),p=p,m=e.i(12707),h=e.i(93607),x=e.i(81405),x=x,y=e.i(21005),y=y,f=e.i(17701),f=f,g=e.i(90938),v=e.i(57342),v=v,b=e.i(2183),b=b,_=e.i(44607),_=_,k=e.i(98957),j=e.i(46229);let N={building:{glyph:m.LocationCityRounded,color:null},bus_stop:{glyph:t.DepartureBoardRounded,color:"#fa7b17"},cafe:{glyph:a.LocalCafeGlyph,color:"#fa7b17"},cinema:{glyph:x.MovieGlyph,color:"#ff5252"},commercial:{glyph:d.LocalMallRounded,color:"#F06292"},confectionery:{glyph:a.LocalCafeGlyph,color:"#fa7b17"},fast_food:{glyph:l.FastfoodRounded,color:"#fece60"},fitness_centre:{glyph:o.FitnessCenterRounded,color:"#fece60"},furniture:{glyph:d.LocalMallRounded,color:"#F06292"},government:{glyph:m.LocationCityRounded,color:null},hospital:{glyph:s.LocalHospitalGlyph,color:"#F06292"},hotel:{glyph:c.LocalHotelGlyph,color:null},house_number:{glyph:m.LocationCityRounded,color:null},kiosk:{glyph:_.StorefrontGlyph,color:"#fece60"},mall:{glyph:d.LocalMallRounded,color:"#F06292"},museum:{glyph:y.MuseumGlyph,color:"#fece60"},park:{glyph:f.NatureGlyph,color:"#99ca0d"},parking:{glyph:u.LocalParkingGlyph,color:"#ff99cc"},pharmacy:{glyph:p.LocalPharmacyGlyph,color:"#F06292"},place_of_worship:{glyph:m.LocationCityRounded,color:null},recent_place:{glyph:r.HistoryRounded,color:null},recreation_ground:{glyph:b.SportsSoccerGlyph,color:"#fece60"},residential:{glyph:m.LocationCityRounded,color:null},restaurant:{glyph:l.FastfoodRounded,color:"#fece60"},retail:{glyph:d.LocalMallRounded,color:"#F06292"},saved_place:{glyph:n.FavoriteRounded,color:"#F06292"},saved_place_home:{glyph:i.HomeRounded,color:"#ff99cc"},saved_place_work:{glyph:k.WorkRounded,color:null},school:{glyph:v.SchoolGlyph,color:"#fece60"},social_facility:{glyph:m.LocationCityRounded,color:null},sports_centre:{glyph:b.SportsSoccerGlyph,color:"#fece60"},stadium:{glyph:b.SportsSoccerGlyph,color:"#fece60"},townhall:{glyph:m.LocationCityRounded,color:null},university:{glyph:v.SchoolGlyph,color:null}},w={glyph:h.LocationOnRounded,color:null};function S(e){let t=(null==e?void 0:N[e])??w;return{glyph:t.glyph,color:t.color}}function R(e){return"string"==typeof e&&""!==e.trim()?e:null}function C(e,t){return null===e?null:(0,j.getDistanceFromLatLonInKm)(e.lat,e.lng,t.lat,t.lng)}function L(e,t,l,n){let o={id:e,name:t,latLng:l};return null!=n.cityId&&(o.cityId=n.cityId),null!=n.categoryId&&(o.categoryId=n.categoryId),void 0!==n.providerName&&(o.providerName=n.providerName),o}e.s(["byDistance",0,function(e,t){return null===e.distanceKm||null===t.distanceKm?0:e.distanceKm-t.distanceKm},"formatDistance",0,function(e){return null!==e&&Number.isFinite(e)?`${Math.round(e)}km`:null},"myLocationSuggestion",0,function(e,t,l){return{key:"my-location",kind:"my-location",place:L("my-location",l,e,{cityId:t,providerName:"user_position"}
1),title:l,subtitle:null,distanceKm:0,icon:S(null)}},"placeCategoryIcon",0,S,"placesSearchSuggestion",0,function(e,t,l){var n;let{latitude:o,longitude:r}=e;if(!Number.isFinite(o)||!Number.isFinite(r))return null;let i=R(e.street)??R(e.name)??R(e.label);if(null===i)return null;let a=null==e.id?`${o},${r}`:String(e.id),s={lat:o,lng:r},c="Point Address"===(n=e.placeType)||"Address Range"===n?"house_number":null;return{key:`place:${a}`,kind:"place",place:L(a,i,s,{cityId:t,categoryId:c,providerName:"ualabee_maps_search"}),title:i,subtitle:R(e.city)??R(e.state),distanceKm:e.distance??C(l,s),icon:S(c)}},"poiSuggestion",0,function(e,t,l){let n={lat:e.lat,lng:e.lon};return{key:`poi:${e.id}`,kind:"poi",place:L(`poi-${e.id}`,e.name,n,{cityId:t,categoryId:"poi",providerName:"points_of_interest"}),title:e.name,subtitle:[e.type,e.address].filter(Boolean).join(" · ")||null,distanceKm:C(l,n),icon:{glyph:g.PlaceRounded,color:e.color??"#757575",solid:!0}}},"recentSuggestion",0,function(e,t){return{key:`recent:${e.id}`,kind:"recent",place:e,title:e.name,subtitle:e.address??null,distanceKm:C(t,e.latLng),icon:S(e.categoryId??"recent_place")}},"stopSuggestion",0,function(e,t,l,n,o=null){let{stop_lat:r,stop_lon:i,stop_name:a}=e;if(null==r||null==i||!a)return null;let s={lat:r,lng:i};return{key:`stop:${e.stop_id}`,kind:"stop",place:L(e.stop_id,a,s,{cityId:t,providerName:"ualabee_api"}),title:a,subtitle:n,distanceKm:C(l,s),icon:{glyph:g.PlaceRounded,color:null,imageUrl:o}}},"suggestionTile",0,function(e){return!0===e.solid?{background:e.color??"#757575",foreground:"#ffffff"}:null===e.color?{background:"color-mix(in srgb, var(--primary) 23%, transparent)",foreground:"var(--primary)"}:{background:`${e.color}3a`,foreground:e.color}}],1691)},33412,e=>{"use strict";var t=e.i(43476),l=e.i(18566);e.i(85269);var n=e.i(22831);e.i(99887);var o=e.i(39915),r=e.i(63027),i=e.i(47991),a=e.i(59927),a=a,s=e.i(90938),c=e.i(24143),d=e.i(98957),u=e.i(47935),p=e.i(9451),m=e.i(45999),h=e.i(2747);e.i(47641);var x=e.i(76127),y=e.i(59619),f=e.i(75157);e.i(28856);var g=e.i(15044),v=e.i(45338),b=e.i(17031),_=e.i(47144),k=e.i(87349);function j({lowered:e}){let l=(0,g.useOverlayStore)(e=>e.openOverlay);return b.tenant.flags.showFilters?(0,t.jsx)("button",{type:"button","aria-label":"Filtros",className:(0,f.cn)("bg-card shadow-float absolute right-0 z-(--z-map-overlay) flex size-[45px] items-center justify-center rounded-full",e?"-bottom-[110px]":"-bottom-[61px]"),onClick:()=>{(0,y.logEvent)("open_map_filters_menu",{from:"home"}),l("mapFilters")},children:(0,t.jsx)(r.FilterListRounded,{className:"text-icon-primary size-6"})}):null}function N(e){return"home"===e?"HOME":"work"===e?"WORK":"OTHERS"}function w(e){v.useTripPlannerStore.getState().setOrientation("to"),e.push((0,_.searchPath)("to"))}function S(){let e=(0,l.useRouter)(),r=function(){let{t:e}=(0,n.useTranslation)(),t=(0,k.useSavedPlaces)(),l=t.find(e=>"home"===(0,k.savedPlaceTypeOf)(e.place))??null,r=t.find(e=>"work"===(0,k.savedPlaceTypeOf)(e.place))??null,a=t.filter(e=>"place"===(0,k.savedPlaceTypeOf)(e.place));return[{key:"home",label:e(null===l?"home.places.add_home":"home.places.home"),icon:i.HomeRounded,tint:"primary",suggestion:l,addType:"home"},{key:"work",label:e(null===r?"home.places.add_work":"home.places.work"),icon:d.WorkRounded,tint:"primary",suggestion:r,addType:"work"},...a.map(e=>({key:e.key,label:e.title,icon:o.FavoriteRounded,tint:"pink",suggestion:e,addType:"place"})),{key:"add-place",label:e("home.places.add_favorite_place"),icon:o.FavoriteRounded,tint:"pink",suggestion:null,addType:"place"}]}(),a=(0,u.useAccount)(),s=(0,v.useTripPlannerStore)(e=>e.setPlace),c=(0,v.useTripPlannerStore)(e=>e.setOrientation);return null===a?null:(0,t.jsx)("div",{className:"flex w-screen [scrollbar-width:none] items-center gap-2 overflow-x-auto px-4 py-2 [&::-webkit-scrollbar]:hidden",children:r.map(l=>{let n=l.icon,o="pink"===l.tint?"#F06292":void 0;return(0,t.jsxs)("button",{type:"button",onClick:()=>(t=>{if(null===t.suggestion){(0,y.logEvent)("add_fav_place",{from:"home",place_type_id:N(t.addType)}),e.push(`/choose-from-map?add_favorite_place=${t.addType}`);return}(0,y.logEvent)("select_fav_place",{from:"home",place_type_id:N(t.key)}),c("to"),s("to",t.suggestion.place),e.push("/destination-preview")})(l),className:"bg-card flex min-w-[45%] shrink-0 items-center gap-2.5 rounded-[10px] p-2.5 text-left shadow-[0_0_4px_0_rgba(0,0,0,0.2)]",children:[(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg",style:void 0===o?{backgroundColor:"color-mix(in srgb, var(--primary) 25%, transparent)"}:{backgroundColor:`${o}40`},children:(0,t.jsx)(n,{className:(0,f.cn)("size-[22px]",void 0===o&&"text-primary"),style:void 0===o?void 0:{color:o}})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-black",children:l.label})]},l.key)})})}function R(){let{t:e}=(0,n.useTranslation)(),o=(0,l.useRouter)(),r=(0,u.useAccount)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"bg-card shadow-float relative mx-4 mt-4 flex h-[52px] items-center rounded-[14px]",children:[(0,t.jsx)(p.MenuButton,{}),(0,t.jsx)("input",{type:"text",readOnly:!0,placeholder:e("hint_location_B"),"aria-label":e("hint_location_B"),className:"text-foreground placeholder:text-foreground ml-2.5 min-w-0 flex-1 bg-transparent text-base outline-none",onFocus:()=>w(o),onClick:()=>w(o)}),(0,t.jsx)(u.AccountButton,{glyph:28,className:"size-11"}),(0,t.jsx)(j,{lowered:null!==r})]}),(0,t.jsx)(S,{})]})}function C(){return(0,t.jsx)("div",{className:"desktop:hidden absolute inset-x-0 top-0 z-(--z-map-overlay)",children:(0,t.jsx)(R,{})})}function L(){let{name:e}=(0,x.useCityConfig)();return(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(s.PlaceRounded,{className:"text-icon-grey size-5","aria-hidden":!0}),null===e?(0,t.jsx)(h.Skeleton,{className:"ml-2 h-4 w-[120px]"}):(0,t.jsx)("span",{className:"text-text-grey ml-2 text-base",children:e})]})}function T(){let{t:e}=(0,n.useTranslation)(),o=(0,l.useRouter)();
1return(0,t.jsxs)("div",{className:"bg-card shadow-panel rounded-2xl px-6 pt-4 pb-6",children:[(0,t.jsxs)("div",{className:"flex h-[38px] items-center justify-between",children:[(0,t.jsx)(p.MenuButton,{tone:"grey",className:"-ml-2"}),(0,t.jsx)(m.TenantLogo,{className:"h-[38px] max-w-40",priority:!0}),(0,t.jsx)(L,{})]}),(0,t.jsxs)("div",{className:"border-outline mt-[38px] flex h-[46px] items-center rounded-[10px] border",children:[(0,t.jsx)("span",{className:"flex h-full w-[68px] items-center justify-center",children:(0,t.jsx)(c.SearchRounded,{className:"text-icon-grey size-6","aria-hidden":!0})}),(0,t.jsx)("input",{type:"text",readOnly:!0,placeholder:e("hint_location_B"),"aria-label":e("hint_location_B"),className:"text-foreground placeholder:text-foreground min-w-0 flex-1 bg-transparent text-base outline-none",onClick:()=>w(o),onFocus:()=>w(o)}),(0,t.jsx)("button",{type:"button","aria-label":e("hint_location_B"),onClick:()=>w(o),className:"border-divider relative flex h-[44px] w-16 items-center justify-center rounded-[4px_10px_10px_4px] border-l",children:(0,t.jsx)(a.NavigationGlyph,{className:"text-icon-primary size-6"})})]})]})}function F(){return(0,t.jsx)("div",{className:"desktop:flex absolute top-4 left-4 z-(--z-map-overlay) hidden max-h-[calc(100%-32px)] w-[450px] flex-col",children:(0,t.jsx)(T,{})})}e.s(["DesktopSearchCard",0,T,"MobileSearchCard",0,R,"TripSearchForm",0,function(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C,{}),(0,t.jsx)(F,{})]})}],33412)},87349,e=>{"use strict";var t=e.i(19273),l=e.i(66027),n=e.i(71645);e.i(85269);var o=e.i(22831);e.i(47641);var r=e.i(76127),i=e.i(46229);e.i(28856);var a=e.i(47780),s=e.i(10849),c=e.i(1691);function d(e){return"string"==typeof e&&""!==e.trim()&&"null"!==e?e:null}function u(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e.trim()){let t=Number(e);if(Number.isFinite(t))return t}return null}async function p(t){let[{getDocs:l,query:n,where:o},{savedPlacesCollection:r,userPlacesCollection:i}]=await Promise.all([e.A(27510),e.A(66428)]),[a,s]=await Promise.all([l(n(r(),o("user_id","==",t))),l(i(t))]),c=new Map;for(let e of[...a.docs,...s.docs]){let t=function(e,t){var l;let n,o,r,i=(o=u((n="object"==typeof(l=t.location)&&null!==l?t.location:t).latitude),r=u(n.longitude),null===o||null===r?null:{lat:o,lng:r});if(null===i)return null;let a=d(t.type);return{id:e,name:d(t.name),address:d(t.address),type:"home"===a||"work"===a?a:"place",cityId:u(t.city_id),latLng:i}}(e.id,e.data());null===t||c.has(t.id)||c.set(t.id,t)}return[...c.values()]}e.s(["savedPlaceTypeOf",0,function(e){return"saved_place_home"===e.categoryId?"home":"saved_place_work"===e.categoryId?"work":"place"},"useSavedPlaces",0,function(){let{t:e}=(0,o.useTranslation)(),d=(0,s.useUserStore)(e=>e.auth),{cityId:u}=(0,r.useCityConfig)(),m=(0,a.useGeolocationStore)(e=>e.position),h=null===d||d.isAnonymous?null:d.uid,{data:x}=(0,l.useQuery)({queryKey:["search","saved-places",h],queryFn:null===h?t.skipToken:()=>p(h),staleTime:3e5});return(0,n.useMemo)(()=>void 0===x?[]:x.filter(e=>null===e.cityId||null===u||e.cityId===u).map(t=>{let l="home"===t.type?e("home.places.home"):"work"===t.type?e("home.places.work"):t.name??t.address??e("home.places.add_favorite_place"),n=`saved_place${"place"===t.type?"":`_${t.type}`}`,o={id:t.id,name:l,latLng:t.latLng,categoryId:n,providerName:"saved_place",...null===t.address?{}:{address:t.address},...null===u?{}:{cityId:u}};return{key:`saved:${t.id}`,kind:"saved",place:o,title:l,subtitle:t.address,distanceKm:null===m?null:(0,i.getDistanceFromLatLonInKm)(m.lat,m.lng,t.latLng.lat,t.latLng.lng),icon:(0,c.placeCategoryIcon)(n)}}),[x,u,m,e])}])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.