PageSourceSearch

https://www.alphabet.com/etc.clientlibs/alphabetweb/clientlibs/cli…/resources/1523-df49910ed877499f.js

js alphabet.com collected 2026-09-24 09:15:04 UTC 27,714 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkalphabet=self.webpackChunkalphabet||[]).push([[1523,1990,2792,3390,4015,4525,5847,7385],{4525:function(e,t,r){r.r(t);var s=r(4848),n=r(2792),a=r(7433);t.default=e=>{const{controller:t,handleFilterChange:r}=e,{containerRef:l,openDropdown:i,visibleCategories:c,toggleDropdown:o,closeDropdowns:u,showAll:d,toggleShowAll:p,hiddenCategoriesBadgeCount:h,hasMoreCategories:g}=t;return(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__filters-container",children:[(0,s.jsx)("div",{ref:l,className:"cmp-servicepartnersearch__filters",children:c.map(e=>(0,s.jsx)(a.default,{category:e,isOpen:i===e.id,onToggle:o,onFilterChange:t=>r(e,t),onCloseDropdowns:u},e.id))}),g&&(0,s.jsx)(n.default,{isExpanded:d,onToggle:p,badgeCount:h})]})}},4015:function(e,t,r){r.r(t),r.d(t,{default:function(){return d}});var s=r(4848),n=r(9011),a=r(4525),l=r(7385),i=r(6540),c=r(2330),o=r(2592);var u=()=>{const e=(0,c.K_)(),{state:t,actions:r}=(0,n.useServicePartnerSearch)(),s=(0,o.Ay)("device","max"),[a,l]=(0,i.useState)(null),[u,d]=(0,i.useState)(!1),[p,h]=(0,i.useState)(!1),g=(0,i.useRef)(null);(0,i.useEffect)(()=>{const e=e=>{g.current&&!g.current.contains(e.target)&&l(null)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);const f=u?t.categories:t.categories.slice(0,5),m=t.categories.length>5,v=(()=>{if(u)return 0;const e=t.categories.slice(5);let r=0;return e.forEach(e=>{e.id===t.activeFilters.category&&(r=t.activeFilters.attributes.length||1)}),r})();return{dictionary:e,isMobile:s,openDropdown:a,showAll:u,containerRef:g,isModalOpen:p,toggleDropdown:e=>{l(t=>t===e?null:e)},closeDropdowns:()=>{l(null)},toggleShowAll:()=>{d(e=>!e)},setIsModalOpen:h,visibleCategories:f,hasMoreCategories:m,hiddenCategoriesBadgeCount:v,onFilterChange:(e,t)=>
1{r.setActiveFilters({category:e,attributes:t}),r.setSelectedResult(null),e||r.setSearchResults([])}}};var d=()=>{const e=u(),{state:t}=(0,n.useServicePartnerSearch)(),r=(r,s)=>{if(!(r.filterableAttributes.length>0&&r.filterableAttributes.some(e=>Object.values(e.options).length>0))){const s=t.activeFilters.category===r.id;return void e.onFilterChange(s?"":r.id,[])}e.onFilterChange(s.length>0?r.id:"",s)};return e.isMobile?(0,s.jsx)(l.default,{controller:e,handleFilterChange:r}):(0,s.jsx)(a.default,{controller:e,handleFilterChange:r})}},7385:function(e,t,r){r.r(t);var s=r(4848),n=r(6540),a=r(4531),l=r(2792),i=r(9011),c=r(7433);t.default=e=>{const{controller:t,handleFilterChange:r}=e,{isModalOpen:o,setIsModalOpen:u,openDropdown:d,toggleDropdown:p,closeDropdowns:h,containerRef:g,dictionary:f}=t,{state:m}=(0,i.useServicePartnerSearch)();return(0,n.useEffect)(()=>{document.body.classList.toggle(a.V.OVERFLOW_HIDDEN,o)},[o]),(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)("div",{className:"cmp-servicepartnersearch__filters-mobile",children:(0,s.jsx)(l.default,{isExpanded:o,onToggle:()=>u(!0),badgeCount:m.activeFilters.attributes.length})}),o&&(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__filters-modal",children:[(0,s.jsx)("button",{className:"cmp-servicepartnersearch__filters-modal__close",onClick:()=>u(!1),"aria-label":f("sps.less_filters"),children:(0,s.jsx)("span",{className:"icon","data-icon":"close_lt","aria-hidden":"true"})}),(0,s.jsx)("h2",{className:"cmp-servicepartnersearch__filters-modal__title",children:f("sps.filters")}),(0,s.jsx)("div",{ref:g,className:"cmp-servicepartnersearch__filters cmp-servicepartnersearch__filters--mobile",children:m.categories.map(e=>(0,s.jsx)(c.default,{category:e,isOpen:d===e.id,onToggle:p,onFilterChange:t=>r(e,t),onCloseDropdowns:h},e.id))})]})]})}},3817:function(e,t,r){r.r(t);var s=r(4848),n=r(55),a=r(2330),l=r(9011);t.default=()=>{const e=(0,a.K_)(),{state:t}=(0,l.useServicePartnerSearch)(),r=(0,n.EL)(),i=!t.activeFilters.category,c=r.makeLocationMandatory&&!t.userLocation;return!i&&!c||t.isLoading?null:(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__results-message",children:[c&&(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__results-message-item",children:[(0,s.jsx)("img",{src:"/etc.clientlibs/alphabetweb/clientlibs/clientlib-site/resources/bmw-next/information_lt.svg",alt:""}),(0,s.jsx)("p",{children:e("sps.select_location")})]}),i&&(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__results-message-item",children:[(0,s.jsx)("img",{src:"/etc.clientlibs/alphabetweb/clientlibs/clientlib-site/resources/bmw-next/information_lt.svg",alt:""}),(0,s.jsx)("p",{children:e("sps.select_category")})]})]})}},9405:function(e,t,r){r.r(t);var s=r(4848),n=r(3817),a=r(449),l=r(3130);t.default=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.default,{}),(0,s.jsx)(a.default,{}),(0,s.jsx)(l.default,{})]})},449:function(e,t,r){r.r(t);var s=r(4848),n=r(9011);t.default=()=>{const{state:e}=(0,n.useServicePartnerSearch)();return e.isLoading?(0,s.jsx)("div",{className:"cmp-servicepartnersearch__results-loading"}):null}},3682:function(e,t,r){r.d(t,{Ak:function(){return l},LR:function(){return p},ZG:function(){return d},b6:function(){return c},e9:function(){return o},m$:function(){return u},qx:function(){return i}});let s=!1,n=null,a=!1;function l(e){s=e}function i(){return s}function c(){s=!1}function o(e){n=e}function u(){return n}function d(e){a=e}function p(){const e=a;return a=!1,e}},3677:function(e,t,r){r.r(t);var s=r(4848),n=r(4550),a=r(9011),l=r(107);t.default=function(){const{state:e,actions:t}=(0,a.useServicePartnerSearch)(),r=(0,n.ko)(),i=t=>`/etc.clientlibs/alphabetweb/clientlibs/clientlib-site/resources/map-pins/${(0,l.A)(e.activeFilters.category)}${!!e.selectedResult&&t.lat===e.selectedResult.lat&&t.lng===e.selectedResult.lng?"-active":""}.svg`;return(0,s.jsx)(s.Fragment,{children:e.searchResults.map((e,a)=>(0,s.jsx)(n.J8,{position:{lat:e.lat,lng:e.lng},title:e.title,onClick:()=>(e=>{t.setSelectedResult(e),r?.setCenter({lat:e.lat,lng:e.lng}),r?.setZoom(15)})(e),children:(0,s.jsx)("img",{src:i(e),alt:e.title,style:{width:"40px",height:"60px"}})},`${e.id}-${e.lat}-${e.lng}-${a}`))})}},9276:function(e,t,r){r.r(t);var s=r(4848),n=r(6540),a=r(4550),l=r(4164),i=r(2330),c=r(2592),o=r(3682),u=r(9011),d=r(5847),p=r(3390),h=r(1990),g=r(4459);t.default=function(e){const{result:t}
1=e,[r,f]=(0,n.useState)(!0),m=(0,n.useRef)(null),v=(0,c.Ay)("device","max"),{state:C,actions:x}=(0,u.useServicePartnerSearch)(),_=(0,i.K_)(),b=(0,a.ko)(),j=t.lat===C.selectedResult?.lat&&t.lng===C.selectedResult?.lng;(0,n.useEffect)(()=>{v&&f(!1)},[v]),(0,n.useEffect)(()=>{if(!v&&j&&m.current){const e=m.current,t=e.parentElement;if(t){const r=e.offsetTop,s=m.current.getBoundingClientRect();s.top>=0&&s.bottom<=window.innerHeight||t.scrollTo({top:r-t.offsetTop,behavior:"smooth"})}}},[j,v]);const w=()=>`${t.street}, ${t.zip} ${t.city}`;return(0,s.jsxs)("li",{ref:m,className:(0,l.A)("result-item",{selected:j,expanded:r}),children:[(0,s.jsx)(g.default,{title:t.title,address:w(),preferred:t.attributes.preferred,categoryIcon:C.activeFilters.category}),(0,s.jsx)("button",{className:"result-item__link",onClick:()=>{if(j){x.setSelectedResult(null);const e=(0,o.m$)();return null!==e&&b&&b.setZoom(e),void b?.setCenter(C.mapCenter)}if(b?.setCenter({lat:t.lat,lng:t.lng}),b?.setZoom(14),x.setSelectedResult(t),v){const e=b?.getDiv();e?.scrollIntoView({block:"start",behavior:"smooth"})}},"aria-label":`${t.title} - ${w()}`}),(0,s.jsx)(h.default,{phone:t.attributes.phone,email:t.attributes.email,website:t.attributes.website}),(0,s.jsx)(p.default,{advantages:t.attributes.advantages}),(0,s.jsx)(d.default,{directionsUrl:(()=>{const e=`${t.lat},${t.lng}`,r=new URLSearchParams({api:"1",destination:e});return C.userLocation&&r.set("origin",`${C.userLocation.lat},${C.userLocation.lng}`),`https://www.google.com/maps/dir/?${r.toString()}`})(),email:t.attributes.email,link:t.attributes.link}),v&&(0,s.jsx)("button",{className:"cmp-button toggle-card-btn","aria-label":_(r?"sps.collapse_card":"sps.expand_card"),onClick:e=>{f(!r),e.stopPropagation()},children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",children:(0,s.jsx)("path",{d:"M2.5 21.0368V19.5011L16.5003 11.418L30.5 19.5008V21.0365L16.5003 12.9538L2.5 21.0368Z",fill:"#484EA0"})})})]})}},5847:function(e,t,r){r.r(t);var s=r(4848),n=r(55),a=r(2330);t.default=function(e){const{directionsUrl:t,email:r,link:l}=e,{showEmailCta:i}=(0,n.EL)(),c=(0,a.K_)();return(0,s.jsxs)("div",{className:"result-item__actions",children:[(0,s.jsx)("div",{className:"button btn--primary",children:(0,s.jsxs)("a",{className:"cmp-button",href:t,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:[c("sps.directions"),(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,s.jsx)("path",{d:"M11.1636 3.90999C10.8844 3.90999 10.6259 3.99774 10.4365 4.18709C10.2472 4.37645 10.1594 4.63502 10.1594 4.91417C10.1594 5.19333 10.2472 5.4519 10.4365 5.64124C10.6259 5.83062 10.8844 5.91838 11.1636 5.91838C11.4427 5.91838 11.7013 5.83062 11.8907 5.64124C12.08 5.4519 12.1678 5.19333 12.1678 4.91417C12.1678 4.63502 12.08 4.37645 11.8907 4.18709C11.7013 3.99774 11.4427 3.90999 11.1636 3.90999ZM10.7763 4.91417C10.7763 4.76371 10.8216 4.67441 10.8727 4.6233C10.9238 4.57219 11.0132 4.52688 11.1636 4.52688C11.3141 4.52688 11.4034 4.57219 11.4545 4.6233C11.5056 4.67441 11.5509 4.76371 11.5509 4.91417C11.5509 5.06464 11.5056 5.15394 11.4545 5.20505C11.4034 5.25616 11.3141 5.30147 11.1636 5.30147C11.0132 5.30147 10.9238 5.25616 10.8727 5.20505C10.8216 5.15394 10.7763 5.06464 10.7763 4.91417Z",fill:"white"}),(0,s.jsx)("path",{d:"M9.08108 2.81269C9.59134 2.31315 10.313 2.05469 11.1636 2.05469C12.0142 2.05469 12.7358 2.31315 13.2461 2.81269C13.7571 3.31297 14.0231 4.02283 14.0231 4.86066C14.0231 5.73085 13.631 6.54361 13.1358 7.24645C12.639 7.95156 12.0146 8.57865 11.5071 9.0768L11.4171 9.16516H10.9101L10.8201 9.0768C10.3125 8.57865 9.68823 7.95156 9.19143 7.24645C8.6962 6.54361 8.30413 5.73085 8.30413 4.86066C8.30413 4.02283 8.57009 3.31297 9.08108 2.81269ZM9.51267 3.2535C9.14226 3.61611 8.92102 4.15502 8.92102 4.86066C8.92102 5.54757 9.23299 6.23443 9.6957 6.89116C10.1299 7.5074 10.6761 8.06858 11.1625 8.54827H11.1648C11.6511 8.06858 12.1973 7.5074 12.6315 6.89116C13.0942 6.23443 13.4062 5.54757 13.4062 4.86066C13.4062 4.15502 13.1849 3.61611 12.8146 3.2535C12.4434 2.89014 11.8896 2.67158 11.1636 2.67158C10.4376 2.67158 9.88378 2.89014 9.51267 3.2535Z",fill:"white"}),(0,s.jsx)("path",{d:"M7.7211 3.88319L6.16079 2.98234H5.54033L1.81055 3.98173V12.8754L2.39152 12.8754L5.8523 11.9481H5.99539L9.20891 13.8034H9.82937L13.5591 12.804V7.8472C13.3622 8.11023 13.1523 8.36047 12.9422 8.59474V12.3307L9.84867 13.1596V9.08946C9.64792 8.88343 9.43823 8.65954 9.23178 8.4209V13.1043L6.1607 11.3312H6.13806V3.68153L7.61998 4.53713C7.63631 4.31297 7.66985 4.09431 7.7211 3.88319ZM5.52117 3.62612V11.3982L2.42744 12.2272V4.45508L5.52117 3.62612Z",fill:"white"})]})]})}),r&&i&&(0,s.jsx)("div",{className:"button btn--tertiary",children:(0,s.jsxs)("a",{className:"cmp-button",href:`mailto:${r}`,onClick:e=>e.stopPropagation(),children:[c("sps.send_an_email"),(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,s.jsx)("path",{d:"M13.8132 3.91016H2.06445V11.6398C2.06445 12.0228 2.22545 12.3523 2.54559 12.5732C2.8496 12.783 3.2688 12.8759 3.76438 12.8759H12.1133C12.6088 12.8759 13.028 12.783 13.332 12.5732C13.6522 12.3523 13.8132 12.0228 13.8132 11.6398V3.91016ZM3.22487 4.52704H12.6527L8.10542 8.31647H7.77217L3.22487 4.52704ZM13.1963 4.87709V11.6398
1C13.1963 11.832 13.1254 11.9663 12.9817 12.0654C12.8218 12.1757 12.5453 12.259 12.1133 12.259H3.76438C3.33229 12.259 3.05576 12.1757 2.89594 12.0654C2.75226 11.9663 2.68134 11.832 2.68134 11.6398V4.87711L7.54883 8.93336H8.32876L13.1963 4.87709Z",fill:"#484EA0"})})]})}),!!l?.url&&l.url.startsWith("http")&&(0,s.jsx)("div",{className:"button btn--link",children:(0,s.jsxs)("a",{className:"cmp-button",href:l.url,rel:"noopener noreferrer",target:"_blank",onClick:e=>e.stopPropagation(),children:[l.text,(0,s.jsx)("span",{className:"icon","data-icon":"arrow_right_lt","aria-hidden":"true"})]})})]})}},3390:function(e,t,r){r.r(t);var s=r(4848);t.default=function(e){const{advantages:t}=e;return 0===t.length?null:(0,s.jsx)("ul",{className:"result-item__advantages",children:t.map((e,t)=>(0,s.jsxs)("li",{children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:(0,s.jsx)("path",{d:"M19.3613 8.63867L9.75098 18.249L4.63965 13.1387L4.85352 12.9258L9.75098 17.8232L19.1484 8.42578L19.3613 8.63867Z",fill:"#262626",stroke:"black","stroke-width":"0.695739"})}),e]},t))})}},1990:function(e,t,r){r.r(t);var s=r(4848);t.default=function(e){const{phone:t,email:r,website:n}=e;if(!t&&!r&&!n)return null;const a=n?.startsWith("http")?n:`https://${n}`;return(0,s.jsxs)("div",{className:"result-item__contact",children:[t&&(0,s.jsx)("a",{href:`tel:${t}`,children:t}),r&&(0,s.jsx)("a",{href:`mailto:${r}`,children:r}),n&&(0,s.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:n})]})}},4459:function(e,t,r){r.r(t);var s=r(4848),n=r(2330),a=r(9011),l=r(107);t.default=function(e){const{title:t,address:r,categoryIcon:i,preferred:c}=e,{state:o}=(0,a.useServicePartnerSearch)(),u=(0,n.K_)(),d=o.categories.find(e=>e.id===o.activeFilters.category);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"result-item__header-badges",children:[c&&(0,s.jsx)("span",{className:"badge",children:u("sps.alphabet_partner")}),(0,s.jsx)("span",{className:"badge outline",children:d?.title})]}),(0,s.jsxs)("div",{className:"result-item__header",children:[(0,s.jsx)("span",{className:"icon","data-icon":(0,l.q)(i),"aria-hidden":"true"}),(0,s.jsxs)("div",{className:"result-item__header-content",children:[(0,s.jsx)("p",{className:"result-item__title",children:t}),(0,s.jsx)("p",{className:"result-item__address",children:r})]})]})]})}},1607:function(e,t,r){r.r(t);var s=r(4848),n=r(6540),a=r(2330),l=r(9011);t.default=()=>{const{state:e}=(0,l.useServicePartnerSearch)(),t=(0,a.K_)(),[r,i]=(0,n.useState)(0);return(0,n.useEffect)(()=>{e.activeFilters.category&&!e.isLoading&&i(e.totalResults)},[e.totalResults,e.activeFilters.category,e.isLoading]),(0,s.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",role:"status",children:0===r?t("sps.results_count_zero"):1===r?t("sps.results_count_one"):t("sps.results_count_many",{count:r.toString()})})}},3130:function(e,t,r){r.r(t);var s=r(4848),n=r(55),a=r(9011),l=r(9276),i=r(1607);t.default=()=>{const{state:e}=(0,a.useServicePartnerSearch)(),t=(0,n.EL)(),r=!e.activeFilters.category,c=t.makeLocationMandatory&&!e.userLocation;return e.isLoading||r||c?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i.default,{}),(0,s.jsx)("ul",{className:"cmp-servicepartnersearch__results-list",children:e.searchResults.map((e,t)=>(0,s.jsx)(l.default,{result:e},`${e.id}-${e.lat}-${e.lng}-${t}`))})]})}},7778:function(e,t,r){r.r(t);var s=r(4848),n=r(6540),a=r(4550),l=r(3682),i=r(3677),c=r(9481),o=r(9011);function u(e){google.maps.event.addListenerOnce(e,"idle",()=>{const t=e.getZoom();null!==t&&void 0!==t&&(0,l.e9)(t)})}function d(){const{state:e}=(0,o.useServicePartnerSearch)(),t=(0,a.ko)();return(0,n.useEffect)(()=>{if(t&&e.mapBounds){const r=new google.maps.LatLngBounds({lat:e.mapBounds.south,lng:e.mapBounds.west},{lat:e.mapBounds.north,lng:e.mapBounds.east});t.fitBounds(r,80),u(t)}},[t,e.mapBounds]),(0,n.useEffect)(()=>{if(!t||e.isLoading||0===e.searchResults.length)return;const r=new google.maps.LatLngBounds;e.searchResults.forEach(e=>{r.extend({lat:e.lat,lng:e.lng})});(0,l.qx)()&&((0,l.b6)(),r.extend({lat:e.mapCenter.lat,lng:e.mapCenter.lng})),t.fitBounds(r,80),u(t)},[t,e.searchResults,e.mapCenter,e.isLoading]),null}t.default=e=>{const{state:t}=(0,o.useServicePartnerSearch)(),r=t.mapBounds?{north:t.mapBounds.north,south:t.mapBounds.south,east:t.mapBounds.east,west:t.mapBounds.west}:void 0;return(0,s.jsx)("div",{className:"cmp-servicepartnersearch__results-map",children:(0,s.jsxs)(a.T5,{mapId:e.mapId,...r?{defaultBounds:r}:{defaultCenter:{lat:t.mapCenter.lat,lng:t.mapCenter.lng},defaultZoom:6},mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,gestureHandling:"greedy",children:[(0,s.jsx)(d,{}),(0,s.jsx)(i.default,{}),(0,s.jsx)(c.default,{})]})})}},9481:function(e,t,r){r.r(t);var s=r(4848),n=r(6540),a=r(4550),l=r(2330),i=r(3682),c=r(9011);t.default=function(){const{state:e,actions:t}=(0,c.useServicePartnerSearch)(),r=(0,a.ko)(),o=(0,l.K_)(),[u,d]=(0,n.use
1State)(!1),p=(0,n.useRef)(null),h=(0,n.useRef)(null),g=(0,n.useRef)(null);return(0,n.useEffect)(()=>{r&&e.mapCenter&&!p.current&&(p.current={...e.mapCenter},g.current={...e.mapCenter})},[r,e.mapCenter]),(0,n.useEffect)(()=>{if(r)return h.current||(h.current=r.addListener("dragend",()=>{if(!r||!e.activeFilters.category)return;const t=r.getCenter();if(!t||!p.current)return;const s=t.lat(),n=t.lng(),a=Math.abs(s-p.current.lat)>.001||Math.abs(n-p.current.lng)>.001;d(a)})),()=>{h.current&&(google.maps.event.removeListener(h.current),h.current=null)}},[r,e.activeFilters.category]),(0,n.useEffect)(()=>{e.activeFilters.category||d(!1)},[e.activeFilters.category]),(0,n.useEffect)(()=>{if(!e.mapCenter)return;if(!g.current)return void(g.current={...e.mapCenter});(Math.abs(e.mapCenter.lat-g.current.lat)>.001||Math.abs(e.mapCenter.lng-g.current.lng)>.001)&&(d(!1),p.current={...e.mapCenter},g.current={...e.mapCenter})},[e.mapCenter]),u&&e.activeFilters.category?(0,s.jsx)("div",{className:"cmp-servicepartnersearch__results-map-search-button",children:(0,s.jsx)("button",{type:"button",onClick:()=>{if(!r)return;const e=r.getCenter();if(!e)return;const s={lat:e.lat(),lng:e.lng()};p.current={...s},g.current={...s},(0,i.Ak)(!0),(0,i.ZG)(!0),t.setMapCenter(s),r.setCenter(s),t.performSearch(s),d(!1)},className:"cmp-servicepartnersearch__results-map-search-button-btn","aria-label":o("sps.search_here"),children:o("sps.search_here")})}):null}},8724:function(e,t,r){r.r(t);var s=r(4848),n=r(6540),a=r(4550),l=r(55),i=r(2330),c=r(3682),o=r(9011),u=r(395);function d(e,t,r,s=50){e.size>=s&&e.delete(e.keys().next().value),e.set(t,r)}t.default=()=>{const{actions:e,state:t}=(0,o.useServicePartnerSearch)(),r=(0,l.EL)(),p=(0,i.K_)(),h=(0,n.useRef)(null),g=(0,n.useRef)(null),f=(0,n.useRef)(null),m=(0,n.useRef)(null),v=(0,n.useRef)(null),C=(0,n.useRef)(null),x=(0,n.useRef)(t.isLoading),_=(0,n.useRef)(new Map),b=(0,n.useRef)(new Map),j=(0,n.useRef)(new Map),[w,L]=(0,n.useState)(""),[y,S]=(0,n.useState)([]),[N,k]=(0,n.useState)(!1),[R,E]=(0,n.useState)(!1),M=(0,a.ST)("places");(0,n.useEffect)(()=>{if(!M)return;(async()=>{const{AutocompleteSuggestion:e}=await google.maps.importLibrary("places");f.current=e,m.current=new google.maps.Geocoder,E(!0)})()},[M]),(0,n.useEffect)(()=>{const e=e=>{h.current&&!h.current.contains(e.target)&&k(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const F=(0,n.useCallback)(t=>{const r=t?.location;if(!r)return;const s={lat:r.lat(),lng:r.lng()};e.setMapCenter(s),e.setUserLocation(s),e.performSearch(s)},[e]),V=(0,n.useCallback)(async t=>{const{placePrediction:r}=t,{placeId:s}=r,n=r.text.text;if(L(n),e.setLocationDisplayName(n),S([]),k(!1),b.current.has(s))return F(b.current.get(s)),void(v.current=null);try{const e=r.toPlace();await e.fetchFields({fields:["location","formattedAddress","displayName"]}),d(b.current,s,e),v.current=null,F(e)}catch(a){}},[F]),P=(0,n.useCallback)(async e=>{if(!e.trim()||e.length<3||!R)return S([]),void k(!1);const t=e.trim().toLowerCase();if(_.current.has(t))return S(_.current.get(t)),void k(!0);v.current||(v.current=new google.maps.places.AutocompleteSessionToken);try{if(!f.current)return;const{suggestions:s}=await f.current.fetchAutocompleteSuggestions({input:e,sessionToken:v.current,...!0===r.restrictSuggestionsCountry&&{includedRegionCodes:[r.countryCode]}});d(_.current,t,s),S(s),k(s.length>0)}catch(s){S([]),k(!1)}},[R,r.restrictSuggestionsCountry,r.countryCode]),$=(0,n.useCallback)(e=>{const t=e.target.value;L(t),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>P(t),300)},[P]);(0,n.useEffect)(()=>{(0,c.LR)()&&(L(""),S([]),k(!1),h.current&&(h.current.value=""))},[t.mapCenter]),(0,n.useEffect)(()=>{const e=x.current;x.current=t.isLoading,e&&!t.isLoading&&!t.error&&t.locationDisplayName&&(L(t.locationDisplayName),h.current&&(h.current.value=t.locationDisplayName))},[t.isLoading,t.error,t.locationDisplayName]);return(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__search-container",children:[(0,s.jsx)("div",{ref:g,style:{display:"none"}}),(0,s.jsx)("span",{className:"icon","data-icon":"search_lt","aria-hidden":"true"}),(0,s.jsx)("input",{type:"text",ref:h,className:"cmp-servicepartnersearch__search-input",role:"combobox","aria-expanded":N,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":"cmp-suggestions-listbox","aria-label":p("sps.search_placeholder"),placeholder:p("sps.search_placeholder"),value:w,autoComplete:"off",onChange:$,onF
1ocus:()=>y.length>0&&k(!0)}),N&&y.length>0&&(0,s.jsx)("div",{id:"cmp-suggestions-listbox",className:"cmp-servicepartnersearch__suggestions",role:"listbox",children:y.map(e=>(0,s.jsx)("div",{role:"option","aria-selected":!1,tabIndex:-1,className:"cmp-servicepartnersearch__suggestion-item",onMouseDown:()=>V(e),children:e.placePrediction.text.text},e.placePrediction.placeId))}),t.locationDisplayName?(0,s.jsx)("button",{className:"cmp-servicepartnersearch__clear-location","aria-label":p("sps.clear_location"),onClick:()=>{L(""),S([]),k(!1),h.current&&(h.current.value=""),e.setLocationDisplayName(null),e.setUserLocation(null);const s=(0,u.S)(r.countryCode),n={lat:(s.north+s.south)/2,lng:(s.east+s.west)/2};e.setMapCenter(n),!r.makeLocationMandatory&&t.activeFilters.category?e.performSearch(n):e.setSearchResults([])},children:(0,s.jsx)("span",{className:"icon","data-icon":"close_lt"})}):(0,s.jsx)("button",{"aria-label":p("sps.get_current_location"),onClick:()=>{navigator.geolocation&&(e.setLoading(!0),navigator.geolocation.getCurrentPosition(t=>{const{latitude:r,longitude:s}=t.coords,n={lat:r,lng:s},a=`${r.toFixed(4)},${s.toFixed(4)}`;e.setMapCenter(n),e.setUserLocation(n),e.performSearch(n);const l=j.current.get(a);if(l)return L(l),void e.setLocationDisplayName(l);m.current?.geocode({location:n},(t,r)=>{if("OK"===r&&t?.[0]){const r=t[0].formatted_address||"";d(j.current,a,r),L(r),e.setLocationDisplayName(r)}else e.setLoading(!1)})},t=>{e.setLoading(!1)}))},children:(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"27",viewBox:"0 0 28 27",fill:"none",children:[(0,s.jsx)("path",{d:"M10.8403 10.2349C11.6292 9.44597 12.7332 9.02109 14 9.02109C15.2667 9.02109 16.3707 9.44597 17.1596 10.2349C17.9485 11.0238 18.3734 12.1278 18.3734 13.3945C18.3734 15.79 16.6138 17.768 14 17.768C12.7332 17.768 11.6292 17.343 10.8403 16.5541C10.0514 15.7652 9.62656 14.6612 9.62656 13.3945C9.62656 12.1278 10.0514 11.0238 10.8403 10.2349ZM11.7221 11.1166C11.1985 11.6402 10.8734 12.4112 10.8734 13.3945C10.8734 14.3778 11.1985 15.1488 11.7221 15.6724C12.2457 16.196 13.0167 16.5211 14 16.5211C15.8862 16.5211 17.1266 15.1411 17.1266 13.3945C17.1266 12.4112 16.8014 11.6402 16.2778 11.1166C15.7543 10.593 14.9832 10.268 14 10.268C13.0167 10.268 12.2457 10.593 11.7221 11.1166Z",fill:"#1E236E"}),(0,s.jsx)("path",{d:"M14.6234 3.41096C17.3075 3.54048 19.5905 4.50961 21.2377 6.15678C22.8849 7.80394 23.854 10.087 23.9835 12.7711H27.125V14.018H23.9835C23.854 16.702 22.8849 18.985 21.2377 20.6322C19.5905 22.2794 17.3075 23.2485 14.6234 23.3781V26.5195H13.3766V23.3781C10.6925 23.2485 8.40941 22.2794 6.76225 20.6322C5.11508 18.985 4.14595 16.702 4.01643 14.018H0.875V12.7711H4.01643C4.14595 10.087 5.11508 7.80394 6.76225 6.15678C8.40941 4.50961 10.6925 3.54048 13.3766 3.41096V0.269531H14.6234V3.41096ZM5.2484 13.3945C5.2484 16.0653 6.13596 18.2425 7.64393 19.7505C9.15191 21.2585 11.3292 22.1461 14 22.1461C16.6707 22.1461 18.848 21.2585 20.356 19.7505C21.8639 18.2425 22.7516 16.0653 22.7516 13.3945C22.7516 10.7237 21.8639 8.54644 20.356 7.03846C18.848 5.53049 16.6707 4.64293 14 4.64293C11.3292 4.64293 9.15191 5.53049 7.64393 7.03846C6.13596 8.54644 5.2484 10.7237 5.2484 13.3945Z",fill:"#1E236E"})]})})]})}},2792:function(e,t,r){r.r(t);var s=r(4848),n=r(2330);t.default=e=>{const{isExpanded:t,onToggle:r,badgeCount:a=0}=e,l=(0,n.K_)();return(0,s.jsx)("div",{className:"button btn--tertiary show-all-cta",children:(0,s.jsxs)("button",{className:"cmp-button",onClick:r,children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",children:(0,s.jsx)("path",{d:"M0.328125 0.539062H12.0768V1.20718L8.73972 4.54431C8.29273 4.9913 8.10339 5.28175 8.00766 5.63583C7.90492 6.01598 7.90242 6.48904 7.90242 7.34109V9.83735L5.29196 11.3601H4.50257V7.34109C4.50257 6.48904 4.50002 6.01598 4.39728 5.63583C4.3016 5.28175 4.11226 4.9913 3.66527 4.54431L0.328125 1.20718V0.539062ZM1.14931 1.15595L4.10146 4.10808C4.58212 4.58875 4.85661 4.97084 4.99279 5.47488C5.11955 5.94372 5.11951 6.50179 5.11946 7.29494L5.12517 10.7432L7.28553 9.48304V7.29494C7.28548 6.50179 7.28544 5.94372 7.41215 5.47488C7.54838 4.97084 7.82287 4.58875 8.30353 4.10808L11.2556 1.15595H1.14931Z",fill:"#484EA0"})}),l(t?"sps.less_filters":"sps.more_filters"),a>0&&!t&&(0,s.jsx)("span",{className:"category-badge",children:a})]})})}},1523:function(e,t,r){r.r(t),r.d(t,{default:function(){return g}});var s=r(4848),n=r(6540),a=r(4550),l=r(55),i=r(4015),c=r(9405),o=r(7778),u=r(8724),d=r(6733);var p=r(9011);function h(){const{state:e,actions:t}=(0,p.useServicePartnerSearch)(),r=(0,l.EL)(),{containerRef:h,isConsentGranted:g,isConsentChecked:f}
1=function(e){const[t,r]=(0,n.useState)(!1),[s,a]=(0,n.useState)(!1),l=(0,n.useRef)(null);return(0,n.useEffect)(()=>{(async()=>{if(l.current)try{const t=await(0,d.rA)({containerElement:l.current,onConsentGranted:()=>{r(!0),a(!0),e?.onConsentGranted?.()},onConsentRejected:()=>{r(!1),a(!0),e?.onConsentRejected?.()},onError:e=>{a(!0)}});await t.initialize()}catch(t){r(!0),a(!0)}})()},[e]),{containerRef:l,isConsentGranted:t,isConsentChecked:s}}();return(0,n.useEffect)(()=>{t.performSearch()},[e.activeFilters.attributes,e.activeFilters.category]),f?g?(0,s.jsxs)(a.c4,{apiKey:r.googleApiKey,libraries:["places"],children:[(0,s.jsx)(u.default,{}),(0,s.jsx)(i.default,{}),(0,s.jsxs)("div",{className:"cmp-servicepartnersearch__results",children:[(0,s.jsx)(c.default,{}),(0,s.jsx)(o.default,{mapId:r.googleMapId})]})]}):null:(0,s.jsx)("div",{ref:h,className:"cmp-servicepartnersearch__consent-check"})}var g=function(){const e=(0,l.EL)();return(0,s.jsx)(p.ServicePartnerSearchProvider,{apiPath:e.path,googleApiKey:e.googleApiKey,countryCode:e.countryCode,makeLocationMandatory:e.makeLocationMandatory,children:(0,s.jsx)(h,{})})}},107:function(e,t,r){r.d(t,{A:function(){return l},q:function(){return a}});const s={tyre:"wheels_and_tyre_service_lt",maintenance:"car_side_lifting_platform_lt",fuel:"fuel_pump_lt",uvv:"car_back_warning_triangle_lt",glass:"glas_repair_lt",carwash:"car_wash_neutral_lt",rental:"key_with_pendant_hand_lt",shellrecharge:"charging_electric_lt",garage:"car_side_lifting_platform_lt"},n={tyre:"wheels-and-tyre-service",maintenance:"car-side-lifting-platform",fuel:"fuel-pump",uvv:"breakdown-service",glass:"glass-repair",carwash:"car-wash",rental:"key-with-pendant-hand",shellrecharge:"charging-electric",garage:"car-side-lifting-platform"};function a(e){return s[e]??"wheels_and_tyre_service_lt"}function l(e){return n[e]??"wheels-and-tyre-service"}}}]);

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.