"use strict";(self.webpackChunkcliq_store_locator_dist_source=self.webpackChunkcliq_store_locator_dist_source||[]).push([[977],{395:function(e,r,i){i.d(r,["showGoogleDirections",0,(e,r,i,s={})=>e.map&&r&&i&&e.g?.maps?.DirectionsService?(e.directionsService||(e.directionsService=new e.g.maps.DirectionsService,e.directionsRenderer=new e.g.maps.DirectionsRenderer({suppressMarkers:!1,preserveViewport:!1})),e.directionsRenderer.setMap(e.map),e.directionsRenderer.setPanel(s.panel||null),new Promise(s=>{e.directionsService.route({origin:{lat:Number(r.lat),lng:Number(r.lng)},destination:{lat:Number(i.lat),lng:Number(i.lng)},travelMode:e.g.maps.TravelMode.DRIVING},(r,i)=>{if("OK"!==i||!r)return void s(!1);e.directionsRenderer.setDirections(r);const t=r.routes?.[0]?.legs?.[0]||{};s({distance:t.distance?.text||"",duration:t.duration?.text||"",origin:t.start_address||""})})})):Promise.resolve(!1)])}}]);