1"use strict";(self.webpackChunkalphabet=self.webpackChunkalphabet||[]).push([[610,1668,8892,9011],{8892:function(t,e,s){s.r(e);var a=s(4848),r=s(6540);function o(t,e){return e?(0,a.jsx)("span",{className:"filter-option__indicator-bar"}):t?(0,a.jsx)("svg",{className:"filter-option__check","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",children:(0,a.jsx)("path",{d:"M19 1.61036L6.83823 13.3945L0 6.76864L1.25477 5.55283L6.83823 10.9629L17.7451 0.394531L19 1.61036Z",fill:"currentColor"})}):null}const n=(0,r.forwardRef)((t,e)=>{const{id:s,ariaLabel:n,isChecked:i,isIndeterminate:h=!1,onChange:c}=t,l=(0,r.useRef)(null);(0,r.useEffect)(()=>{l.current&&(l.current.indeterminate=h)},[h]);return(0,a.jsxs)("div",{className:"filter-option__input-container",children:[(0,a.jsx)("input",{ref:t=>{l.current=t,((t,e)=>{"function"===typeof t?t(e):t&&"current"in t&&(t.current=e)})(e,t)},id:s,className:"filter-option__input",type:"checkbox","aria-label":n,checked:i,onChange:t=>c(t.target.checked),onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),c(!i))}}),(0,a.jsx)("span",{"aria-hidden":"true",className:"filter-option__indicator",children:o(i,h)})]})});n.displayName="FilterCheckbox",e.default=n},610:function(t,e,s){s.r(e);var a=s(4848),r=s(6540),o=s(2330),n=s(9011),i=s(8892),h=s(1668);e.default=t=>{const{attribute:e,categoryId:s,onFilterChange:c,isFirst:l,onFirstCheckboxRef:u,categoryName:d}=t,p=(0,o.K_)(),{state:w}=(0,n.useServicePartnerSearch)(),f=s===w.activeFilters.category?w.activeFilters.attributes:[],g=(0,r.useCallback)(t=>{l&&u&&u(t)},[l,u]),y=Object.keys(e.options).length,E=1===y?p("sps.filters_count_one",{category:d}):p("sps.filters_count_many",{count:y,category:d});return(0,a.jsxs)("div",{className:"filter-group",children:[(0,a.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:E}),(0,a.jsx)("div",{className:"filter-group__header",children:(0,a.jsxs)("label",{className:"filter-group__select-all",children:[(0,a.jsx)(i.default,{ref:l?g:void 0,id:`filter-group-select-all-${e.id}`,ariaLabel:p("sps.select_all"),isChecked:(()=>{const t=Object.keys(e.options);return f.length===t.length&&t.length>0})(),onChange:t=>{c(t?Object.keys(e.options):[])},isIndeterminate:(()=>{const t=Object.keys(e.options);return f.length>0&&f.length<t.length})()}),p("sps.select_all")]})}),(0,a.jsx)("div",{className:"filter-group__options",children:Object.entries(e.options).sort((t,e)=>t[1].localeCompare(e[1])).map(([t,e])=>(0,a.jsx)(h.default,{value:e,checked:f.includes(t),onChange:e=>((t,e)=>{const s=e?[...f,t]:f.filter(e=>e!==t);c(s)})(t,e)},t))})]})}},1668:function(t,e,s){s.r(e);var a=s(4848),r=s(8892);e.default=t=>{const{value:e,checked:s,onChange:o}=t;return(0,a.jsxs)("label",{className:"filter-option",children:[(0,a.jsx)(r.default,{ariaLabel:e,isChecked:s,onChange:o}),(0,a.jsx)("span",{className:"filter-option__text",children:e})]})}},9011:function(t,e,s){s.r(e),s.d(e,{ServicePartnerSearchProvider:function(){return d},useServicePartnerSearch:function(){return p}});var a=s(4848),r=s(6540),o=s(395);class n{constructor(t,e){this.config={apiEndpoint:e,googleMapsApiKey:t}}async loadCategories(){try{const t=await fetch(`${this.config.apiEndpoint}.aladin.json?path=poi/categories`),e=await t.json();return this.transformCategories(e)}catch(t){}return[]}async searchPOIs(t,e){try{const s=new URLSearchParams({lat:t.lat.toString(),lng:t.lng.toString(),max:"50"});e.attributes.forEach(t=>{s.append("fid",t)});const a=await fetch(`${this.config.apiEndpoint}.aladin.json?path=poi/location/${e.category}&${s}`);return await a.json()}catch(s){}return[]}transformCategories(t){return Array.isArray(t)?t.map(t=>({id:t.id||"",title:t.title||"",filterableAttributes:t.filterableAttributes||[]})):[]}}function i(t){const e=(0,o.S)(t);return{isLoading:!1,error:null,searchResults:[],selectedResult:null,totalResults:0,categories:[],activeFilters:{category:"",attributes:[]},mapCenter:{lat:(e.north+e.south)/2,lng:(e.east+e.west)/2},mapBounds:e,userLocation:null,locationDisplayName:null}}const h=6371e3;function c(t){return t*Math.PI/180}function l(t,e){return e?t.map(t=>{const s=function(t,e){const s=c(e.lat-t.lat),a=c(e.lng-t.lng),r=c(t.lat),o=c(e.lat),n=Math.sin(s/2)*Math.sin(s/2)+Math.cos(r)*Math.cos(o)*Math.sin(a/2)*Math.sin(a/2),i=2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n));return h*i}(e,{lat:t.lat,lng:t.lng});return{...t,distance:s}}).sort((t,e)=>void 0===t.distance||void 0===e.distance?0:t.distance-e.distance):t.map(t=>void 0===t.distance?t:{...t,distance:void 0})}const u=(0,r.createContext)(null);function d(t){const{children:e,googleApiKey:s,apiPath:o,countryCode:h,makeLocationMandatory:c}=t,[d,p]=(0,r.useReducer)((t,e)=>function(t,e,s){switch(e.type){case"SET_LOADING":return{...t,isLoading:e.payload};case"SET_ERROR":return{...t,error:e.payload};case"SET_SEARCH_RESULTS":return{...t,searchResults:l(e.payload,t.userLocation),totalResults:e.payload.length};case"SET_SELECTED_RESULT":return{...t,selectedResult:e.payload};case"SET_CATEGORIES":return{...t,categories:e.payload};case"SET_ACTIVE_FILTERS":return{...t,activeFilters:e.payload};case"SET_MAP_CENTER":return{...t,mapCenter:e.payload};case"SET_USER_LOCATION":return{...t,userLocation:e.payload,searchResults:l(t.searchResults,e.payload)};case"SET_LOCATION_DISPLAY_NAME":return{...t,locationDisplayName:e.payload};case"RESET_FILTERS":return{...t,activeFilters:{category:"",attributes:[]}};case"RESET_STATE":return i(s||"de");default:return t}}(t,e,h),i(h)),w=new n(s,o),f={setLoading:t=>{p({type:"SET_LOADING",payload:t})},setError:t=>{p({type:"SET_ERROR",payload:t})},setSearchResults:t=>{p({type:"SET_SEARCH_RESULTS",payload:t})},setSelectedResult:t=>{p({type:"SET_SELECTED_RESULT",payload:t})},setCategories:t=>{p({type:"SET_CATEGORIES",payload:t})}
1,setActiveFilters:t=>{p({type:"SET_ACTIVE_FILTERS",payload:t})},setMapCenter:t=>{p({type:"SET_MAP_CENTER",payload:t})},setUserLocation:t=>{p({type:"SET_USER_LOCATION",payload:t})},setLocationDisplayName:t=>{p({type:"SET_LOCATION_DISPLAY_NAME",payload:t})},resetFilters:()=>{p({type:"RESET_FILTERS"})},performSearch:async t=>{if(!d.activeFilters.category||c&&!d.userLocation&&!t)return;const e=t??d.mapCenter;f.setLoading(!0),f.setError(null);try{const t=await w.searchPOIs(e,d.activeFilters);f.setSearchResults(t)}catch(s){f.setError(s instanceof Error?s.message:"Search failed")}finally{f.setLoading(!1)}},loadCategories:async()=>{try{const t=await w.loadCategories();f.setCategories(t)}catch(t){f.setError(t instanceof Error?t.message:"Failed to load categories")}}};return(0,r.useEffect)(()=>{f.loadCategories()},[]),(0,a.jsx)(u.Provider,{value:{state:d,actions:f},children:e})}function p(){const t=(0,r.useContext)(u);if(!t)throw new Error("useServicePartnerSearch must be used within a ServicePartnerSearchProvider");return t}},395:function(t,e,s){s.d(e,{S:function(){return r}});const a={de:{north:55.05,south:47.3,east:15.02,west:5.87},fr:{north:51.1,south:41.36,east:9.56,west:-5.14},it:{north:47.1,south:36.6,east:18.52,west:6.62},es:{north:43.8,south:36,east:3.33,west:-9.3},gb:{north:60.86,south:49.86,east:1.76,west:-8.62},nl:{north:53.51,south:50.75,east:7.23,west:3.31},be:{north:51.51,south:49.5,east:6.4,west:2.54},at:{north:49.02,south:46.37,east:17.17,west:9.53},ch:{north:47.81,south:45.82,east:10.49,west:5.96},se:{north:69.06,south:55.34,east:24.17,west:11.11},no:{north:71.19,south:57.98,east:31.08,west:4.64},dk:{north:57.75,south:54.56,east:12.69,west:8.07},fi:{north:70.09,south:59.45,east:31.59,west:20.56},pl:{north:54.84,south:49,east:24.15,west:14.07},cz:{north:51.06,south:48.55,east:18.86,west:12.09},hu:{north:48.58,south:45.74,east:22.9,west:16.11},sk:{north:49.61,south:47.73,east:22.57,west:16.84},si:{north:46.88,south:45.42,east:16.6,west:13.37},hr:{north:46.55,south:42.39,east:19.45,west:13.49},ro:{north:48.27,south:43.62,east:29.69,west:20.26},bg:{north:44.21,south:41.24,east:28.61,west:22.34},gr:{north:41.75,south:34.75,east:29.65,west:19.35},pt:{north:42.16,south:36.95,east:-6.18,west:-9.5},ie:{north:55.43,south:51.39,east:-5.99,west:-10.48},lu:{north:50.19,south:49.44,east:6.53,west:5.72},mt:{north:36.08,south:35.8,east:14.57,west:14.18},cy:{north:35.7,south:34.56,east:34.63,west:32.2},ee:{north:59.73,south:57.47,east:28.18,west:21.77},lv:{north:57.89,south:55.67,east:28.24,west:20.97},lt:{north:56.45,south:53.89,east:26.84,west:20.93},us:{north:49.38,south:24.52,east:-66.93,west:-124.77},ca:{north:83.11,south:41.68,east:-52.62,west:-141},mx:{north:32.72,south:14.53,east:-86.81,west:-118.37},au:{north:-9.14,south:-43.64,east:153.64,west:112.91},nz:{north:-34.39,south:-47.29,east:179.06,west:166.37},jp:{north:45.52,south:24.25,east:145.82,west:122.93},kr:{north:38.63,south:33.06,east:131.87,west:124.57},cn:{north:53.56,south:18.16,east:134.77,west:73.5},in:{north:35.5,south:6.55,east:97.5,west:68.1},th:{north:20.46,south:5.6,east:105.65,west:97.34},sg:{north:1.48,south:1.23,east:104.06,west:103.58},my:{north:7.37,south:.85,east:119.27,west:99.64},id:{north:6.08,south:-11.05,east:141.02,west:94.73},ph:{north:21.12,south:4.57,east:126.6,west:116.88},vn:{north:23.38,south:8.59,east:109.46,west:102.15},ae:{north:26.1,south:22.64,east:56.49,west:51.52},sa:{north:32.15,south:15.64,east:55.67,west:34.53},za:{north:-21.97,south:-34.83,east:32.89,west:16.45},eg:{north:31.84,south:21.73,east:36.89,west:24.69},ng:{north:13.89,south:4.16,east:14.68,west:2.67},ke:{north:5.34,south:-4.9,east:41.91,west:33.92},ma:{north:35.93,south:27.63,east:-.99,west:-13.4},dz:{north:37.09,south:18.97,east:11.99,west:-8.68},tn:{north:37.54,south:30.06,east:11.6,west:7.49},ly:{north:33.19,south:19.48,east:25.15,west:9.32},br:{north:5.27,south:-33.77,east:-34.73,west:-73.98},ar:{north:-21.78,south:-55.05,east:-53.59,west:-73.59},cl:{north:-17.45,south:-55.92,east:-66.42,west:-75.64},co:{north:12.49,south:-4.24,east:-66.87,west:-79.05},pe:{north:.05,south:-18.35,east:-68.65,west:-81.37},ve:{north:12.45,south:.64,east:-59.75,west:-73.38},uy:{north:-30.08,south:-35.17,east:-53.09,west:-58.45},py:{north:-19.3,south:-27.6,east:-54.2,west:-62.6}
1,bo:{north:-9.66,south:-22.92,east:-57.43,west:-69.6},ec:{north:1.45,south:-4.95,east:-75.19,west:-81.09},gy:{north:8.59,south:1.16,east:-56.48,west:-61.39},sr:{north:6.09,south:1.81,east:-53.94,west:-58.07},gf:{north:5.93,south:2.06,east:-51.62,west:-54.54}};function r(t){const e=a[t.toLowerCase()];return e||a.de}}}]);
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.