PageSourceSearch

https://www.gap.at/_next/static/chunks/pages/retail-8fd854348763c731.js

js gap.at collected 2026-10-06 13:18:24 UTC 5,564 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1733],{25743:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/retail",function(){return t(36512)}])},36512:(e,l,t)=>{"use strict";t.r(l),t.d(l,{__N_SSG:()=>j,default:()=>_});var r=t(26514),s=t(41246),a=t(55047),o=t(51973),n=t(14366),c=t(46225),i=t(75834),d=t(8918),u=t(75406);let m=({sidebarItems:e})=>{let l=(0,i.useRef)(null);return(0,i.useEffect)(()=>{l.current&&(l.current.scrollTop=0)},[e]),(0,r.jsx)("ul",{className:"overflow-auto lg:pr-8",ref:l,children:(0,r.jsx)(g,{retails:e})})},g=({retails:e})=>{let[l,t]=(0,i.useState)(null),s=(0,c.useRouter)(),{t:m}=(0,a.Bd)("common");(0,i.useEffect)(()=>{t(s.asPath)},[s.asPath]);let g="flex lowercase text-sm items-center justify-center w-18 h-[26px] bg-opacity-10";return(0,r.jsx)(r.Fragment,{children:e.map((e,t)=>(0,r.jsx)("li",{className:"border-b border-gray-300 first:border-t last:border-0 py-5 overflow-hidden",children:(0,r.jsxs)(o.A,{href:e.url,className:"group block relative pr-10",children:[(0,r.jsxs)("div",{className:"lg:grid gap-2 lg:grid-cols-[2fr_1fr_0.5fr]",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:(0,u.cn)({"group-hover:underline text-small font-bold mb-1":!0,"font-bold":e.url===l}),children:e.name}),(0,r.jsx)("div",{className:"text-small mb-1",children:`${e.street}, ${e.zipCode} ${e.city}`})]}),e.distanceFormated&&(0,r.jsxs)("div",{className:"text-gray-700 flex gap-2 text-small items-center lg:order-last lg:justify-self-end",children:[(0,r.jsx)(n.I,{icon:"/images/icons/pin-alt.svg",className:"w-4 h-4 shrink-0"}),(0,r.jsx)("span",{className:"whitespace-nowrap",children:e.distanceFormated})]}),(0,r.jsxs)("div",{className:"flex lg:flex-col xl:flex-row lg:justify-center items-center gap-2 lg:gap-x-8 mt-5 lg:mt-0",children:[(0,d.Zl)(e.openingHours)?(0,r.jsx)("span",{className:(0,u.cn)({[g]:!0,"border border-[--retail-open__border-color] text-[--retail-open__text-color] bg-[--retail-open__bg-color]":!0}),children:m("open")}):(0,r.jsx)("span",{className:(0,u.cn)({[g]:!0,"border border-[--retail-close__border-color] text-[--retail-close__text-color] bg-[--retail-close__bg-color]":!0}),children:m("closed")}),(0,r.jsx)("div",{className:"text-small flex gap-x-2 lg:block min-w-[84px]",children:(0,d.aE)(e.openingHours).map((e,l)=>(0,r.jsx)("div",{children:e},l))})]})]}),(0,r.jsx)(n.I,{icon:"/images/icons/chevron-right.svg",className:"w-5 absolute right-0 top-1/2 -translate-y-1/2"})]})},t))})};var x=t(95920),p=t(16074),f=t(39285),h=t(39034);let b=({retailList:e})=>(0,r.jsx)(h.C2,{children:(0,r.jsx)(N,{retailList:e})}),N=({retailList:e})=>{let{location:l,calculateDistance:t,geometryReady:o,placeAutocompleteParentElementRef:n,createPlaceAutocompleteInstance:c}=(0,x.l)(),{t:d}=(0,a.Bd)("common"),g=(0,f.H)({orsay:"!text-5xl"}),b=e.map(e=>({position:{lat:Number(e.latitude),lng:Number(e.longitude)},title:e.name,url:e.url}));(0,i.useEffect)(()=>{c(d("city-or-zip"))},[c,d]);let N=(0,i.useMemo)(()=>l&&o?e.map(e=>{let{distance:l,distanceFormated:r}=t(e);return{...e,distance:l,distanceFormated:r}}).sort((e,l)=>(e.distance||0)>(l.distance||0)?1:-1):e,[l,o,e,t]);return(0,r.jsxs)(s.m,{maxW:"2xl",children:[(0,r.jsx)("h1",{className:"sr-only",children:d("retail__our-stores")}),(0,r.jsxs)("div",{className:"grid lg:grid-cols-2  lg:pt-12 lg:px-7  pb-7 lg:pb-32",children:[(0,r.jsxs)("aside",{className:"flex flex-col order-1 lg:pr-11 lg:h-[578px]",children:[(0,r.jsx)("div",{ref:n,className:"mb-6 w-full"}),(0,r.jsx)(m,{sidebarItems:N})]}),(0,r.jsxs)("article",{className:"mb-6 mx-5 lg:order-2 lg:m-0",children:[(0,r.jsx)(p.h,{heading:2,className:(0,u.cn)({"!mt-5 lg:!mt-0 mx-0 text-center lg:text-left":!0,...g}),children:d("retail__our-stores")}),(0,r.jsx)(h.T5,{lat:l?l.lat:Number("47.2"),lng:l?l.lng:Number("13.2"),mapZoom:l?11:Number("7"),markers:b,fitNearestMarker:l?.source==="geolocation",className:"h-[474px] lg:h-[578px] w-full"})]})]})]})};t(21687),t(29305),t(54532),t(53098);var j=!0;let _=({initialData:e})=>(0,r.jsx)(b,{retailList:e.retailList})},95920:(e,l,t)=>{"use strict";t.d(l,{l:()=>o});var r=t(75834),s=t(81586),a=t(14205);let o=()=>{let{settings:e}=(0,s.Pj)(),l=(0,a.ST)("places"),t=(0,a.ST)("geometry"),[o,n]=(0,r.useState)(null),[c,i]=(0,r.useState)(null),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>{n(l=>
1l??{lat:e.coords.latitude,lng:e.coords.longitude,source:"geolocation"})},e=>{console.warn("Geolocation denied or failed",e.code,e.message)},{enableHighAccuracy:!0,maximumAge:3e5,timeout:1e4})},[]);let u=(0,r.useCallback)(e=>{if(!o||!t)return{distance:null,distanceFormated:null};let l=new google.maps.LatLng(o.lat,o.lng),r=new google.maps.LatLng(Number(e.latitude),Number(e.longitude)),s=t.spherical.computeDistanceBetween(l,r),a=s>500?(s/1e3).toFixed(1)+" km":s.toFixed(0)+" m";return{distance:s,distanceFormated:a}},[o,t]),m=(0,r.useCallback)(async t=>{if(!l||!d.current||c)return;let r=new l.PlaceAutocompleteElement({includedRegionCodes:[e.defaultCountryISO],placeholder:t});r.style.background="#f0f0f0",r.style.colorScheme="light",d.current.appendChild(r),r.addEventListener("gmp-select",async e=>{let l=e.placePrediction.toPlace();await l.fetchFields({fields:["location"]});let t=l.location?.lat(),r=l.location?.lng();t&&r&&n({lat:t,lng:r,source:"search"})}),i(r)},[e.defaultCountryISO,l,c]);return{location:o,calculateDistance:u,geometryReady:!!t,placeAutocompleteParentElementRef:d,createPlaceAutocompleteInstance:m}}}},e=>{e.O(0,[6456,4205,5502,636,6593,8792],()=>e(e.s=25743)),_N_E=e.O()}]);

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.