{"version":3,"sources":["webpack:///./Scripts/Components/StationMap.js","webpack:///./Scripts/Hooks/useGeolocationPosition.js","webpack:///./Scripts/Hooks/useGoogleMaps.js","webpack:///./Scripts/Hooks/useNavigatorPermissionsQuery.js","webpack:///./Scripts/Hooks/useRefreshGeolocationPositionIfPermissionGranted.js","webpack:///./Scripts/Hooks/useSortedStations.js","webpack:///./Scripts/Services/GoogleMaps.js"],"names":["props","divRef","useRef","isRendered","maps","useGoogleMaps","useEffect","current","lat","long","location","LatLng","mapProp","center","zoom","map","Map","stationMarker","Marker","position","title","name","icon","path","fillColor","color","fillOpacity","strokeWeight","scale","anchor","Point","infoWindow","google","InfoWindow","maxWidth","pixelOffset","Size","content","address","phone","event","addListener","open","setZoom","ref","className","useGeolocationPosition","useState","geolocationPosition","setGeolocationPosition","refreshGeolocationPosition","navigator","geolocation","getCurrentPosition","api","setApi","useNavigatorPermissionsQuery","query","status","setStatus","refreshStatus","permissions","then","useRefreshGeolocationPositionIfPermissionGranted","geolocationPermission","state","useSortedStations","stations","googleMaps","filter","station","onlyVisibleInTireHotel","sortedStations","setSortedStations","length","p0","coords","latitude","longitude","newSortedStations","sort","a","b","geometry","spherical","computeDistanceBetween","coordinatesLat","coordinatesLong","instance","promise","Promise","resolve","script","document","createElement","src","async","defer","onload","head","appendChild"],"mappings":"4IA2EA,QAvEmB,SAACA,GAEhB,IAAMC,GAASC,cACTC,GAAaD,aAAO,GAGpBE,GAAOC,UA8Db,OA5DAC,gBAAU,WACN,GACIF,GACAH,EAAOM,UACNJ,EAAWI,SAFZH,MAGAJ,KAAOQ,KAHPJ,MAIAJ,KAAOS,KACT,CACE,IAAMC,EAAW,IAAIN,EAAKO,OAAOX,EAAMQ,IAAKR,EAAMS,MAC5CG,EAAU,CACZC,OAAQH,EACRI,KAAM,IAGJC,EAAM,IAAIX,EAAKY,IAAIf,EAAOM,QAASK,GAEnCK,EAAgB,IAAIb,EAAKc,OAAO,CAClCC,SAAUT,EACVK,IAAKA,EACLK,M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AAAgB,EAAsBN,cAAtB,eAA8BO,QAE9Bf,IATAc,EAAsBJ,kBAW3B,CAACZ,EAAqBgB,EAAsBN,S,izCChBpC,SAASQ,EAAT,GAIZ,IAHClB,EAGD,EAHCA,oBACAmB,EAED,EAFCA,SACAC,EACD,EADCA,WACD,KAC6CrB,cAASoB,EAASE,QAAO,SAACC,GAAD,OAAcA,EAAQC,2BAD5F,GACQC,EADR,KACwBC,EADxB,KAyBC,OAtBAnE,gBAAU,WACN,GAAK0C,GAA2C,IAApBmB,EAASO,QAAiBN,EAAtD,CAGA,IAAMO,EAAK,IAAIP,EAAWzD,OACtBqC,EAAoB4B,OAAOC,SAC3B7B,EAAoB4B,OAAOE,WAEzBC,EAAoB,EAAIZ,GAAUa,MACpC,SAACC,EAAGC,GAAJ,OACId,EAAWe,SAASC,UAAUC,uBAC1B,IAAIjB,EAAWzD,OAAOsE,EAAEK,eAAgBL,EAAEM,iBAC1CZ,GAEJP,EAAWe,SAASC,UAAUC,uBAC1B,IAAIjB,EAAWzD,OAAOuE,EAAEI,eAAgBJ,EAAEK,iBAC1CZ,MAGZF,EAAkBM,MACnB,CAAC/B,EAAqBmB,EAAUC,IAE5BI,I,8CClCJ,IAAMpE,EAAO,CAChBoF,SAAU,KACVC,QAAS,IAAIC,SAAQ,SAACC,GAClB,IAAMC,EAASC,SAASC,cAAc,UACtCF,EAAOG,IACH,4IACJH,EAAOI,OAAQ,EACfJ,EAAOK,OAAQ,EACfL,EAAOM,OAAS,WACZ9F,EAAKoF,SAAWxD,OAAO5B,KACvBuF,EAAQvF,EAAKoF,WAEjBK,SAASM,KAAKC,YAAYR","file":"424.e896f6d076008f3ca431.js","sourcesContent":["import React, { useRef } from 'react'\r\nimport { useEffect } from 'react'\r\nimport { useGoogleMaps } from '../Hooks'\r\n\r\nconst StationMap = (props) => {\r\n // REF\r\n const divRef = useRef()\r\n const isRendered = useRef(false)\r\n\r\n // HOOKS\r\n const maps = useGoogleMaps()\r\n\r\n useEffect(() => {\r\n if (\r\n maps &&\r\n divRef.current &&\r\n !isRendered.current &&\r\n props?.lat &&\r\n props?.long\r\n ) {\r\n const location = new maps.LatLng(props.lat, props.long)\r\n const mapProp = {\r\n center: location,\r\n zoom: 11,\r\n }\r\n\r\n const map = new maps.Map(divRef.current, mapProp)\r\n\r\n const stationMarker = new maps.Marker({\r\n position: location,\r\n map: map,\r\n title: props.name,\r\n icon: {\r\n path: 'M11.83.09A8.08,8.08,0,0,0,3.75,8.17c0,2.37,1.89,6.37,3.49,9.37.81,1.52,1.69,3.08,2.49,4.28,1.3,2,1.61,2.18,2.1,2.18s.8-.24,2.11-2.18c.77-1.2,1.69-2.76,2.49-4.28,1.59-3,3.48-7,3.48-9.37A8.08,8.08,0,0,0,11.83.09Zm0,11.05a3,3,0,1,1,3-3A3,3,0,0,1,11.83,11.14Z',\r\n fillColor: props.color,\r\n fillOpacity: 1,\r\n strokeWeight: 0,\r\n scale: 1.2,\r\n anchor: new maps.Point(20, 25),\r\n },\r\n })\r\n const infoWindow = new google.maps.InfoWindow({\r\n maxWidth: 350,\r\n pixelOffset: new google.maps.Size(-10, -25),\r\n position: location,\r\n content:\r\n '