PageSourceSearch

https://www.here.com/_next/static/chunks/982.312c5358e90258de.js

js here.com collected 2026-10-01 07:29:50 UTC 10,344 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[982],{70982:(e,t,n)=>{n.r(t),n.d(t,{Map:()=>v});var l=n(78557),r=n(28105),a=n(17618),i=n(30698),o=n(7678),s=n(89476),c=n(53763);n(32020),n(88692);let d=(0,i.tv)({slots:{wrapper:"w-full",container:"flex w-full lg:w-screen !m-0 !px-[20px] md:!pl-[48px] lg:!pl-[96px] md:!pr-[20px] min-[1440px]:!pl-[calc((100vw-1248px)/2)] lg:!pr-[max(100px,10vw)]",slide:"flex w-full sm:max-w-[calc(100dvw-40px)] min-[1440px]:max-w-[306px] h-[164px]",location:"w-full min-[1440px]:!max-w-[306px] h-[164px] bg-background-secondary rounded-lg py-[10px] px-5 paragraph-small shadow-md border border-transparent border-[2px]",locationCity:"text-foreground-primary font-body-small-strong",locationAddress:"text-foreground-secondary"},variants:{active:{true:{location:"border-action-press"}}}}),u={direction:"horizontal",speed:700,slidesPerView:1,spaceBetween:8,breakpoints:{768:{slidesPerView:2,slidesPerGroup:2},1024:{slidesPerView:3,slidesPerGroup:3},1280:{slidesPerView:4,slidesPerGroup:4}}};function p(e){let{locations:t,activeLocation:n,onLocationClick:a}=e,i=d(),o=(0,r.useRef)(null);return(0,r.useEffect)(()=>{var e;null==(e=o.current)||e.swiper.slideTo(0,1,!0)},[t]),(0,l.jsx)("div",{className:i.wrapper(),children:(0,l.jsx)(c.RC,{...u,className:i.container(),ref:o,children:t.map(e=>(0,l.jsx)(c.qr,{className:i.slide(),children:(0,l.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>{a(e)},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&a(e)},className:i.location({active:n.address===e.address}),children:[(0,l.jsx)("h4",{className:i.locationCity(),children:e.city}),(0,l.jsx)("p",{className:i.locationAddress(),children:e.address})]})},e.address))})})}let m=(0,i.tv)({slots:{container:"relative w-full h-[640px] lg:h-[800px] overflow-hidden",map:"w-full h-[640px] lg:h-[800px]",swiper:"absolute bottom-[30px] right-0 w-full"}});function v(e){let{apiKey:t,locations:n,themeVariant:i,spacingBottom:c,spacingTop:d}=e,u=m(),v=n.filter(e=>"number"==typeof e.lat&&"number"==typeof e.lng&&!isNaN(e.lat)&&!isNaN(e.lng)&&e.lat>=-90&&e.lat<=90&&e.lng>=-180&&e.lng<=180),[g]=(0,o.d)(),h=["mobile"].includes(g),[f,C]=(0,r.useState)(v[0]),[w,x]=(0,r.useState)(v),[E,A]=(0,r.useState)(null),y=(0,r.useRef)(null),b=(0,r.useRef)(null),k=(0,r.useRef)(null),M=(0,r.useRef)(null),L=(0,r.useRef)(()=>{}),P=(0,r.useRef)(()=>{}),T=(0,r.useRef)(()=>{}),N=(0,r.useCallback)(e=>{var t,n;e.stopPropagation();let l=null==(n=b.current)||null==(t=n.getElement())?void 0:t.firstElementChild;if(!l)return;l.style.pointerEvents="none",l._scrollTimeout&&clearTimeout(l._scrollTimeout);let r=setTimeout(()=>{l.style.pointerEvents="auto"},500);l._scrollTimeout=r},[]);function j(e){var t;null==(t=b.current)||t.setZoom(15).setCenter(e.getGeometry(),!0),document.querySelectorAll(".map-marker").forEach(e=>{e.classList.remove("active")}),M.current=e}function _(){v.forEach(e=>{!function(e){var t;let n='\n  <div class="map-marker" id="marker-'.concat(e.address,'">\n    <div class="map-marker-content">\n      <div class="map-marker-wrapper">\n        <div class="map-marker-content-inner">\n          <strong class="heading-2">').concat(e.city,"</strong>\n          <p>").concat(e.address,'</p>\n          <a href="').concat(e.href,'" target="_blank">Get directions</a>\n        </div>\n      </div>\n    </div>\n    <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">\n      <path d="M8.65694 28.0739L8.65704 28.074L19.1803 38.4886C19.57 38.8742 20.1975 38.8742 20.5871 38.4886L31.1104 28.074L31.1105 28.0739C33.9848 25.2285 35.7674 21.2945 35.7674 16.9479C35.7674 8.25234 28.6493 1.22223 19.8837 1.22223C11.1181 1.22223 4 8.25234 4 16.9479C4 21.2945 5.78262 25.2285 8.65694 28.0739Z" fill="#007E79" stroke="white" stroke-width="2" stroke-linejoin="round"/>\n      <path fill-rule="evenodd" clip-rule="evenodd" d="M19.8837 2.22223C11.6637 2.22223 5 8.816 5 16.9498C5 21.0167 6.66592 24.6986 9.35934 27.3638L19.8837 37.7778L30.4081 27.3638C33.1015 24.6986 34.7674 21.0167 34.7674 16.9498C34.7674 8.816 28.1038 2.22223 19.8837 2.22223ZM34.354 17.0201C34.354 20.8869 32.8125 24.5103 30.1165 27.1907L19.8837 37.3643L9.65091 27.1907C6.95489 24.5103 5.41344 20.8869 5.41344 
117.0201C5.41344 9.0763 11.8915 2.63567 19.8837 2.63567C27.8759 2.63567 34.354 9.0763 34.354 17.0201Z" fill="#007E79"/>\n      <ellipse cx="19.8146" cy="17.037" rx="4.44444" ry="4.44444" fill="white"/>\n    </svg>\n  </div>'),l=new a.A.geo.Point(e.lat,e.lng),r=new a.A.map.DomIcon(n,{onAttach:(e,t,n)=>{let l=M.current;n.getId()===(null==l?void 0:l.getId())&&e.classList.add("active"),e.addEventListener("click",()=>{j(n)})}}),i=new a.A.map.DomMarker(l,{icon:r,data:{id:"marker-".concat(e.address)}});null==(t=b.current)||t.addObject(i);let o=new a.A.geo.Point(52.53086,13.38469);o.equals(l)?j(new a.A.map.DomMarker(o,{icon:r,data:{id:"marker-".concat(e.address)}})):0===v.indexOf(e)&&j(i)}(e)})}function G(e,t){let n=e=>e*Math.PI/180,l=n(t.lat-e.lat),r=n(t.lng-e.lng),a=Math.sin(l/2)*Math.sin(l/2)+Math.cos(n(e.lat))*Math.cos(n(t.lat))*Math.sin(r/2)*Math.sin(r/2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))*6371}function H(){var e;let t=null==(e=M.current)?void 0:e.getGeometry();if(!t)return;let n=[...v].sort((e,n)=>G(t,{lat:e.lat,lng:e.lng})-G(t,{lat:n.lat,lng:n.lng}));x(n),C(n[0])}function R(e){var t;let n=null==(t=b.current)?void 0:t.getObjects(),l=[],r=[];return n.forEach(t=>{let n=e.distance(t.getGeometry());l[n]=t,r.push(n)}),r.sort((e,t)=>e-t),l[r[0]]}function V(){E?(j(R(E)),H()):navigator.geolocation.getCurrentPosition(e=>{let t=new a.A.geo.Point(e.coords.latitude,e.coords.longitude);A(t),j(R(t)),H()})}let B=()=>{var e;let t=null==(e=b.current)?void 0:e.getViewPort();null==t||t.resize()};return(0,r.useEffect)(()=>{L.current=B}),(0,r.useEffect)(()=>{P.current=_}),(0,r.useEffect)(()=>{T.current=V}),(0,r.useEffect)(()=>{if(!b.current){var e;let n=a.A.Map.EngineType.HARP;k.current=new a.A.service.Platform({apikey:t});let l=k.current.createDefaultLayers({engineType:n,pois:!0,ppi:250}),r="Core Light"===i?l.raster.terrain.map:l.raster.normal.mapnight,o=new a.A.Map(y.current,r,{zoom:15,center:v[0],engineType:n});new a.A.mapevents.Behavior(new a.A.mapevents.MapEvents(o),{enabled:a.A.mapevents.Behavior.DRAGGING|a.A.mapevents.Behavior.DBLTAPZOOM}),o.getElement().firstElementChild.style.pointerEvents="auto";let s=a.A.ui.UI.createDefault(o,l);s.getControl("mapsettings").setVisibility(!1),s.getControl("scalebar").setVisibility(!1),s.getControl("zoom").setAlignment(a.A.ui.LayoutAlignment.RIGHT_TOP).addClass("map-control"),null==(e=s.getControl("zoom"))||e.getChildren().forEac
1h(e=>{var t;let n=e.getElement();(null==(t=e.getElement())?void 0:t.title)==="Zoom out"&&n?n.innerHTML='<svg width="16" height="2" viewBox="0 0 16 2" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M0.820513 1.64103C0.367356 1.64103 0 1.27367 0 0.820513C0 0.367356 0.367356 0 0.820513 0H15.1795C15.6326 0 16 0.367356 16 0.820513C16 1.27367 15.6326 1.64103 15.1795 1.64103H0.820513Z" fill="#727FA5"/>\n</svg>':n&&(n.innerHTML='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C7.54684 0 7.17949 0.367356 7.17949 0.820513V7.17949H0.820513C0.367356 7.17949 0 7.54684 0 8C0 8.45316 0.367356 8.82051 0.820513 8.82051H7.17949V15.1795C7.17949 15.6326 7.54684 16 8 16C8.45316 16 8.82051 15.6326 8.82051 15.1795V8.82051H15.1795C15.6326 8.82051 16 8.45316 16 8C16 7.54684 15.6326 7.17949 15.1795 7.17949H8.82051V0.820513C8.82051 0.367356 8.45316 0 8 0Z" fill="#727FA5"/>\n</svg>'),n&&(n.role="button")});let c=new a.A.ui.base.Button({label:'<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n          <path d="M7 2C7.98891 2 8.95561 2.29324 9.77785 2.84265C10.6001 3.39206 11.241 4.17295 11.6194 5.08658C11.9978 6.00021 12.0969 7.00555 11.9039 7.97545C11.711 8.94536 11.2348 9.83627 10.5355 10.5355C9.83627 11.2348 8.94536 11.711 7.97545 11.9039C7.00555 12.0969 6.00022 11.9978 5.08659 11.6194C4.17296 11.241 3.39206 10.6001 2.84265 9.77785C2.29325 8.95561 2 7.98891 2 7C2 5.67392 2.52679 4.40215 3.46447 3.46447C4.40215 2.52678 5.67392 2 7 2ZM7 0C5.61553 0 4.26216 0.410543 3.11101 1.17971C1.95987 1.94888 1.06266 3.04213 0.532846 4.32122C0.00303298 5.6003 -0.13559 7.00776 0.134506 8.36563C0.404603 9.7235 1.07129 10.9708 2.05026 11.9497C3.02922 12.9287 4.2765 13.5954 5.63437 13.8655C6.99224 14.1356 8.3997 13.997 9.67879 13.4672C10.9579 12.9373 12.0511 12.0401 12.8203 10.889C13.5895 9.73785 14 8.38447 14 7C14 5.14348 13.2625 3.36301 11.9497 2.05025C10.637 0.737498 8.85652 0 7 0ZM7 4C6.40666 4 5.82664 4.17595 5.33329 4.50559C4.83994 4.83524 4.45543 5.30377 4.22836 5.85195C4.0013 6.40013 3.94189 7.00333 4.05765 7.58527C4.1734 8.16721 4.45913 8.70176 4.87868 9.12132C5.29824 9.54088 5.83279 9.8266 6.41473 9.94236C6.99668 10.0581 7.59987 9.9987 8.14805 9.77164C8.69623 9.54458 9.16477 9.16006 9.49441 8.66671C9.82406 8.17336 10 7.59334 10 7C10 6.20435 9.68393 5.44129 9.12132 4.87868C8.55871 4.31607 7.79565 4 7 4Z" fill="#8890A0"/>\n        </svg>',onStateChange:T.current,data:{title:"Geo Location"}}),d=new a.A.ui.Control;return d.setAlignment(a.A.ui.LayoutAlignment.RIGHT_TOP).addClass(" H_zoom H_grp map-control"),d.addChild(c),s.addControl("geoLocation",d),b.current=o,P.current(),()=>{}}},[t,h,v,i]),(0,r.useEffect)(()=>{let e=y.current,t=b.current;if(e&&t)return e.addEventListener("wheel",N,{passive:!1}),()=>{var n;let l=null==(n=t.getElement())?void 0:n.firstElementChild;l&&l._scrollTimeout&&clearTimeout(l._scrollTimeout),e.removeEventListener("wheel",N)}},[N]),(0,r.useEffect)(()=>{let e=()=>{L.current()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),(0,l.jsx)(s.ComponentThemeSwitch,{themeVariant:i,spacingBottom:c,spacingTop:d,parentComponent:"Map",children:(0,l.jsxs)("div",{className:u.container(),children:[(0,l.jsx)("div",{className:u.map(),ref:y}),(0,l.jsx)("div",{className:u.swiper(),children:(0,l.jsx)(p,{locations:w,activeLocation:f,onLocationClick:e=>{var t,n;C(e),j((t=e.address,null==(n=b.current)?void 0:n.getObjects().find(e=>e.getData().id==="marker-".concat(t)))),H()}})})]})})}}}]);
2//# sourceMappingURL=982.312c5358e90258de.js.map

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.