{"version":3,"sources":["webpack:///./src/helpers/locationHelpers.js","webpack:///./src/views/CompanyLocations.vue","webpack:///src/views/CompanyLocations.vue","webpack:///./src/views/CompanyLocations.vue?8bbb","webpack:///./src/views/CompanyLocations.vue?2708","webpack:///./src/assets/img/map_icon.svg","webpack:///./src/views/CompanyLocations.vue?d3ea"],"names":["bgEnums","require","enum","locationPerimeterType","location","parseLatLng","loc","latLng","split","length","lat","Number","lng","parsePerimetersFromDb","dbPerimeters","perimeters","forEach","perimeter","index","type","POLYGON","value","dbValue","push","name","paths","center","radius","MARKER","parsePerimetersToDb","map","x","verifyPerimeters","every","setPolygonPaths","mvcPaths","i","getLength","path","j","getAt","point","render","_vm","this","_c","_self","attrs","_v","staticStyle","slot","staticClass","gettingLocations","ref","mapCenter","_l","filter","key","refInFor","parseFloat","markers","marker","position","on","$event","toggleInfoWindow","infoWindowPos","infoWinOpen","params","deviceId","infoContent","id","tab","_s","address","staticRenderFns","reportsNames","planCapabilities","metaInfo","title","components","card","mixins","data","currentMidx","currentMap","currentMarkers","totalLocaltions","computed","currentCompany","seedMap","findDeviceGroupsInStore","google","query","companyId","mounted","methods","seedMapFromAPI","findDeviceGroups","$skip","$limit","skipDeviceGroups","skipDevices","updatedMarkers","allDevicesLocations","bounds","contentInfo","setTimeout","component","module","exports"],"mappings":"0HAAA,MAAMA,EAAUC,EAAQ,QAAwBC,MAE1C,sBAAEC,GAA0BH,EAAQI,SAC3B,QACbC,YAAYC,GACV,MAAMC,EAASD,EAAIE,MAAM,KACzB,OAAsB,IAAlBD,EAAOE,OAAqB,CAAEC,IAAKC,OAAOJ,EAAO,IAAKK,IAAKD,OAAOJ,EAAO,KACvD,IAAlBA,EAAOE,OACF,CAAEC,IAAKC,OAAQ,GAAEJ,EAAO,MAAMA,EAAO,MAAOK,IAAKD,OAAQ,GAAEJ,EAAO,MAAMA,EAAO,OAEjF,MAETM,sBAAsBC,GACpB,MAAMC,EAAa,GAuBnB,OAtBAD,EAAaE,QAAQ,CAAC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CAAAC,oCACA,oCACAC,oBACAhC,UACA,kCACA,SAGA,sBACAiC,OACAC,oCAGA,+BAEA/E,aAEA,WAoBA,sBACA,iBAEAgF,UACA,gCAEAC,YACA,2BAAAC,2BACA,oCAAAC,0BACA,iBACA,4BACA,+BACA,sBAEA,6BACA,QACA,qCACAL,OACAC,iCACAK,QACAC,cAGAC,OACA,6BACA,iBACA,0BAGA,wBACA,QACA,mCACAR,OACAC,iCACAK,WAGAG,OACA,6BACA,iBACA,sBAGArC,sBACA,8BACA,+BAEA,qBACA,oCAEA,oBACA,qBAGAsC,kBACA,qBAEA,OADA,yBACA,GAEA,yBACA,0CACA,KAoBA,OAnBAC,mBACA,2CACA,2CACAC,YACA7C,QACAE,WACA4C,aACAnC,QACA/C,YACAkD,uBAIAiC,gBACA,4BACA,gCACA,2BAEA,KACA,KC5P0V,I,wBCQtVC,EAAY,eACd,EACAlE,EACAiC,GACA,EACA,KACA,WACA,MAIa,aAAAiC,E,uDCnBfC,EAAOC,QAAU,IAA0B,6B,kCCA3C","file":"js/chunk-7b411d6c.48d717ff.js","sourcesContent":["const bgEnums = require('../../../cross/index').enum;\n\nconst { locationPerimeterType } = bgEnums.location;\nexport default {\n parseLatLng(loc) {\n const latLng = loc.split(',');\n if (latLng.length === 2) return { lat: Number(latLng[0]), lng: Number(latLng[1]) };\n if (latLng.length === 4) {\n return { lat: Number(`${latLng[0]}.${latLng[1]}`), lng: Number(`${latLng[2]}.${latLng[3]}`) };\n }\n return null;\n },\n parsePerimetersFromDb(dbPerimeters) {\n const perimeters = [];\n dbPerimeters.forEach((perimeter, index) => {\n if (perimeter.type === locationPerimeterType.POLYGON.value.dbValue) {\n perimeters.push({\n name: `Geo-fence ${index + 1}`,\n value: index,\n type: locationPerimeterType.POLYGON.value,\n paths: perimeter.paths,\n center: { lat: null, lng: null },\n radius: null,\n });\n }\n if (perimeter.type === locationPerimeterType.MARKER.value.dbValue) {\n perimeters.push({\n name: `Geo-fence ${index + 1}`,\n value: index,\n type: locationPerimeterType.MARKER.value,\n paths: [],\n center: perimeter.center,\n radius: perimeter.radius,\n });\n }\n });\n return perimeters;\n },\n parsePerimetersToDb(perimeters) {\n return perimeters.map((x) => {\n if (x.type.dbValue === locationPerimeterType.POLYGON.value.dbValue) {\n return {\n type: x.type.dbValue,\n paths: x.paths,\n };\n }\n return {\n type: x.type.dbValue,\n center: x.center,\n radius: x.radius,\n };\n });\n },\n verifyPerimeters(perimeters) {\n return perimeters.every(((perimeter) => {\n if (perimeter.type === locationPerimeterType.POLYGON.value.dbValue) {\n return perimeter.paths.length > 0;\n }\n return perimeter.center && perimeter.radius;\n }));\n },\n setPolygonPaths(mvcPaths) {\n const paths = [];\n // eslint-disable-next-line no-plusplus\n for (let i = 0; i < mvcPaths.getLength(); i++) {\n const path = [];\n // eslint-disable-next-line no-plusplus\n for (let j = 0; j < mvcPaths.getAt(i).getLength(); j++) {\n const point = mvcPaths.getAt(i).getAt(j);\n path.push({ lat: point.lat(), lng: point.lng() });\n }\n paths.push(path);\n }\n return paths;\n },\n};\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('portal',{attrs:{\"to\":\"breadcrumb\"}},[_c('Breadcrumb',[_c('b-breadcrumb-item',{attrs:{\"active\":\"\"}},[_vm._v(\" Map \")])],1)],1),_c('card',{staticStyle:{\"overflow\":\"visible\"},attrs:{\"slot\":\"external-body\",\"external-card\":\"material-card-content\",\"internal-card\":\"material-card\",\"style-internal-card\":\"flex:auto\"},slot:\"external-body\"},[_c('div',{staticClass:\"map-view\",attrs:{\"slot\":\"header\",\"id\":\"companyMapContainer\"},slot:\"header\"},[_c('div',{staticStyle:{\"height\":\"85vh\",\"z-index\":\"0\"},attrs:{\"slot\":\"body\"},slot:\"body\"},[_c('b-loading',{attrs:{\"is-full-page\":false,\"active\":_vm.gettingLocations,\"can-cancel\":false}}),_c('GmapMap',{ref:\"map\",staticStyle:{\"height\":\"85vh\",\"z-index\":\"0\"},attrs:{\"center\":_vm.mapCenter,\"zoom\":2,\"options\":{\n 'minZoom': 2,\n 'maxZoom': 20,\n 'streetViewControl': false,\n 'mapTypeControl': false,\n 'clickableIcons': false\n }}},[_vm._l((_vm.perimeters.filter(\n (x) => x.type.dbValue === _vm.locationPerimeterType.POLYGON.value.dbValue)),function(perimeter,index){return _c('gmap-polygon',{key:index,ref:\"polygon\",refInFor:true,attrs:{\"paths\":perimeter.paths}})}),_vm._l((_vm.perimeters.filter((x) =>\n x.type.dbValue === _vm.locationPerimeterType.MARKER.value.dbValue\n && x.center.lat && x.center.lng\n && x.radius)),function(perimeter){return _c('GmapCircle',{key:perimeter.name,attrs:{\"center\":{lat: parseFloat(perimeter.center.lat),\n lng: parseFloat(perimeter.center.lng)},\"radius\":parseFloat(perimeter.radius),\"visible\":true,\"options\":{'fillColor':'red', 'fillOpacity':0.2}}})}),_vm._l((_vm.markers),function(marker,index){return _c('gmap-marker',{key:index,attrs:{\"position\":marker.position,\"icon\":{'url': require('@/assets/img/map_icon.svg')}},on:{\"click\":function($event){return _vm.toggleInfoWindow(marker,index)}}})}),_c('gmap-info-window',{attrs:{\"position\":_vm.infoWindowPos,\"opened\":_vm.infoWinOpen},on:{\"closeclick\":function($event){_vm.infoWinOpen=false}}},[_c('div',[_c('router-link',{attrs:{\"to\":{ name: 'device', params: { deviceId: _vm.infoContent.id, tab: 'location' } }}},[_c('strong',[_vm._v(_vm._s(_vm.infoContent.name))]),_c('br')]),_vm._v(\" \"+_vm._s(_vm.infoContent.address)+\" \")],1)])],2)],1)])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n Map\n \n \n \n \n \n \n \n \n x.type.dbValue === locationPerimeterType.POLYGON.value.dbValue)\"\n :key=\"index\"\n ref=\"polygon\"\n :paths=\"perimeter.paths\"\n />\n \n x.type.dbValue === locationPerimeterType.MARKER.value.dbValue\n && x.center.lat && x.center.lng\n && x.radius)\"\n :key=\"perimeter.name\"\n :center=\"{lat: parseFloat(perimeter.center.lat),\n lng: parseFloat(perimeter.center.lng)}\"\n :radius=\"parseFloat(perimeter.radius)\"\n :visible=\"true\"\n :options=\"{'fillColor':'red', 'fillOpacity':0.2}\"\n />\n \n \n \n \n {{ infoContent.name }}\n \n {{ infoContent.address }}\n \n \n \n \n \n \n \n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyLocations.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyLocations.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CompanyLocations.vue?vue&type=template&id=5bcc9c12&scoped=true&\"\nimport script from \"./CompanyLocations.vue?vue&type=script&lang=js&\"\nexport * from \"./CompanyLocations.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CompanyLocations.vue?vue&type=style&index=0&id=5bcc9c12&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5bcc9c12\",\n null\n \n)\n\nexport default component.exports","module.exports = __webpack_public_path__ + \"img/map_icon.b14380e1.svg\";","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyLocations.vue?vue&type=style&index=0&id=5bcc9c12&prod&scoped=true&lang=css&\""],"sourceRoot":""}