{"version":3,"sources":["webpack:///./src/views/DirectionsRenderer.js"],"names":["MapElementFactory","name","ctr","window","google","maps","DirectionsRenderer","events","mappedProps","props","origin","type","Object","Array","destination","travelMode","String","afterCreate","directionsRenderer","directionsService","DirectionsService","this","$watch","route","response","status","setDirections"],"mappings":"iHAAA,uBAEeA,4CAAkB,CAC/BC,KAAM,qBAENC,IAH+B,WAI7B,OAAOC,OAAOC,OAAOC,KAAKC,oBAG5BC,OAAQ,GAERC,YAAa,GAEbC,MAAO,CACLC,OAAQ,CAAEC,KAAM,CAACC,OAAQC,QACzBC,YAAa,CAAEH,KAAM,CAACC,OAAQC,QAC9BE,WAAY,CAAEJ,KAAMK,SAGtBC,YAjB+B,SAiBnBC,GAAoB,WAC1BC,EAAoB,IAAIhB,OAAOC,OAAOC,KAAKe,kBAE/CC,KAAKC,QACH,iBAAM,CAAC,EAAKZ,OAAQ,EAAKI,YAAa,EAAKC,eAC3C,WAAM,IACEL,EAAoC,EAApCA,OAAQI,EAA4B,EAA5BA,YAAaC,EAAe,EAAfA,WACtBL,GAAWI,GAAgBC,GAChCI,EAAkBI,MAChB,CACEb,SACAI,cACAC,eAEF,SAACS,EAAUC,GACM,OAAXA,GAGJP,EAAmBQ,cAAcF","file":"js/display-data8.6feb09cb.js","sourcesContent":["import { MapElementFactory } from \"vue2-google-maps\";\r\n\r\nexport default MapElementFactory({\r\n name: \"directionsRenderer\",\r\n\r\n ctr() {\r\n return window.google.maps.DirectionsRenderer;\r\n },\r\n\r\n events: [],\r\n\r\n mappedProps: {},\r\n\r\n props: {\r\n origin: { type: [Object, Array] },\r\n destination: { type: [Object, Array] },\r\n travelMode: { type: String },\r\n },\r\n\r\n afterCreate(directionsRenderer) {\r\n let directionsService = new window.google.maps.DirectionsService();\r\n\r\n this.$watch(\r\n () => [this.origin, this.destination, this.travelMode],\r\n () => {\r\n let { origin, destination, travelMode } = this;\r\n if (!origin || !destination || !travelMode) return;\r\n directionsService.route(\r\n {\r\n origin,\r\n destination,\r\n travelMode,\r\n },\r\n (response, status) => {\r\n if (status !== \"OK\") return;\r\n // eslint-disable-next-line no-debugger\r\n debugger\r\n directionsRenderer.setDirections(response);\r\n }\r\n );\r\n }\r\n );\r\n },\r\n});"],"sourceRoot":""}